SmartComponent Library Theming System

SmartComponent Library Theming System

The eXperience Package theming system combines runtime Angular services with SCSS build-time assets. Themes are configured through SmartExperiencePackageConfigOptions, resolved and applied by SmartThemeService, persisted via smartframework:theme local storage, and surfaced to users in the Smart Settings dialog. CSS is organized around a reusable base mixin plus per-theme overrides that toggle through <html> classes such as smartcomponents-experience-rounded-light-theme.

Configuration Surface

SmartExperiencePackageConfigOptions

Extends SmartConfig to allow runtime injection of custom themes and window mode defaults.

Theme interface

Defines theme metadata (name, title, optional cssSelector, ActiveReports reportViewerTheme, inheritance link, and arbitrary appConfig).

{ ... "themes": [ { "name": "rounded-light", "title": "Rounded Light", "cssSelector": "smartcomponents-experience-rounded-light-theme", "reportViewerTheme": { "primary": "#1c597c", "type": "light", "backgroundMain": "#ffffff", "neutral": "#1c597c", "secondary": "#1c597c" }, "appConfig": { "windowMode": "both" } }, { "name": "custom-theme", "cssSelector": "custom-theme", "title": "Custom", "appConfig": { "windowMode": "sdi" } } ] }

Default options (syntra, rounded-light, kendo-default, fluent) with selectors, report-viewer palettes, and app config fallbacks.

Report Viewer Integration

Every theme can define a reportViewerTheme payload compatible with ActiveReports’ ColorTheme. SmartThemeService.computeSmartReportViewerTheme() merges the theme’s overrides into ColorThemes.Default, ensuring the viewer aligns with UI branding whenever applyTheme() runs.

Built-in themes

Rounded Light

Extends the base mixin with rounded radius, light scheme, button/input sizing, toolbar & grid tweaks, top bar visuals, etc.

Invokes chatbot, release-notes, typography, icon-picker, generic UI control, and grid mixins for cohesive styling.