@sdcorejs/angular 19.2.6 → 19.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/assets/scss/core/_read-state-panel.scss +57 -0
  2. package/components/table/index.d.ts +1 -0
  3. package/components/table/src/components/filter/quick-search/quick-search.component.d.ts +26 -0
  4. package/components/table/src/directives/index.d.ts +1 -0
  5. package/components/table/src/directives/sd-table-quick-search-right-def.directive.d.ts +8 -0
  6. package/components/table/src/models/table-option.model.d.ts +2 -0
  7. package/components/table/src/services/table-filter/table-filter.model.d.ts +8 -1
  8. package/components/table/src/services/table-filter/table-filter.service.d.ts +2 -1
  9. package/components/table/src/services/table-filter/table-quick-search.model.d.ts +30 -0
  10. package/components/table/src/services/table-filter/table-quick-search.util.d.ts +8 -0
  11. package/components/table/src/services/table-local/table-local.util.d.ts +2 -1
  12. package/components/table/src/table.component.d.ts +10 -2
  13. package/fesm2022/sdcorejs-angular-components-badge.mjs +2 -2
  14. package/fesm2022/sdcorejs-angular-components-badge.mjs.map +1 -1
  15. package/fesm2022/sdcorejs-angular-components-data-state.mjs +2 -2
  16. package/fesm2022/sdcorejs-angular-components-data-state.mjs.map +1 -1
  17. package/fesm2022/sdcorejs-angular-components-inform.mjs +2 -2
  18. package/fesm2022/sdcorejs-angular-components-section.mjs +2 -2
  19. package/fesm2022/sdcorejs-angular-components-section.mjs.map +1 -1
  20. package/fesm2022/sdcorejs-angular-components-table.mjs +549 -345
  21. package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
  22. package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs +2 -2
  23. package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs.map +1 -1
  24. package/fesm2022/sdcorejs-angular-forms-select.mjs +2 -2
  25. package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
  26. package/fesm2022/sdcorejs-angular-i18n.mjs +25 -0
  27. package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
  28. package/fesm2022/sdcorejs-angular-modules-layout.mjs +11 -14
  29. package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
  30. package/fesm2022/sdcorejs-angular-services-confirm.mjs +2 -2
  31. package/fesm2022/sdcorejs-angular-services-confirm.mjs.map +1 -1
  32. package/fesm2022/sdcorejs-angular-services-notify.mjs +2 -2
  33. package/i18n/src/en.d.ts +5 -0
  34. package/package.json +1 -1
@@ -54,11 +54,11 @@ class SdDataState {
54
54
  action: this.action,
55
55
  }));
56
56
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdDataState, deps: [], target: i0.ɵɵFactoryTarget.Component });
57
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdDataState, isStandalone: true, selector: "sd-data-state", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, fontSet: { classPropertyName: "fontSet", publicName: "fontSet", isSignal: true, isRequired: false, transformFunction: null }, retryable: { classPropertyName: "retryable", publicName: "retryable", isSignal: true, isRequired: false, transformFunction: null }, retryLabel: { classPropertyName: "retryLabel", publicName: "retryLabel", isSignal: true, isRequired: false, transformFunction: null }, actionLabel: { classPropertyName: "actionLabel", publicName: "actionLabel", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, fullPage: { classPropertyName: "fullPage", publicName: "fullPage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sdRetry: "sdRetry", sdAction: "sdAction" }, queries: [{ propertyName: "customTemplate", first: true, predicate: SdDataStateTemplateDirective, descendants: true, isSignal: true }], ngImport: i0, template: "@let _compact = compact();\n@let currentState = state();\n@let template = customTemplate();\n@let _role = role();\n@let _retryable = retryable();\n@let _actionLabel = actionLabel();\n@let currentIcon = effectiveIcon();\n\n@if (currentState === 'success') {\n @if (template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"templateContext()\"></ng-container>\n } @else {\n <ng-content></ng-content>\n }\n} @else if (template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"templateContext()\"></ng-container>\n} @else {\n <section\n class=\"sd-data-state\"\n [class.sd-data-state--compact]=\"_compact\"\n [class.sd-data-state--full-page]=\"fullPage()\"\n [class.sd-data-state--with-icon]=\"!!currentIcon\"\n [attr.data-state]=\"currentState\"\n [attr.role]=\"_role\"\n [attr.aria-busy]=\"currentState === 'loading' ? 'true' : null\"\n [attr.aria-live]=\"_role === 'alert' ? 'assertive' : 'polite'\">\n @if (currentIcon) {\n <span class=\"sd-data-state__symbol\" aria-hidden=\"true\">\n <sd-icon class=\"sd-data-state__icon\" [name]=\"currentIcon\" [fontSet]=\"fontSet()\" [size]=\"_compact ? '22px' : '32px'\"></sd-icon>\n </span>\n }\n\n <div class=\"sd-data-state__title\">{{ title() ?? (titleKey() | sdTranslate) }}</div>\n <div class=\"sd-data-state__message\">{{ message() ?? (messageKey() | sdTranslate) }}</div>\n\n @if (_retryable || _actionLabel) {\n <div class=\"sd-data-state__actions\">\n @if (_retryable) {\n <sd-button\n data-state-retry\n type=\"light\"\n color=\"primary\"\n size=\"sm\"\n htmlType=\"button\"\n width=\"100%\"\n prefixIcon=\"refresh\"\n fontSet=\"material-icons-outlined\"\n [title]=\"retryLabel() || ('core.component.data-state.retry' | sdTranslate)\"\n (click)=\"retry()\"></sd-button>\n }\n @if (_actionLabel; as label) {\n <sd-button\n data-state-action\n type=\"fill\"\n color=\"primary\"\n size=\"sm\"\n htmlType=\"button\"\n width=\"100%\"\n [title]=\"label\"\n (click)=\"action()\"></sd-button>\n }\n </div>\n }\n </section>\n}\n", styles: [":host{display:contents}.sd-data-state{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;min-width:0;min-height:240px;padding:32px;text-align:center;color:var(--sd-text)}.sd-data-state__symbol{display:grid;place-items:center;flex-shrink:0;width:56px;height:56px;margin-bottom:16px;border-radius:8px;background:var(--sd-surface-muted)}.sd-data-state__icon{width:32px;height:32px;font-size:32px;line-height:1;color:var(--sd-text-secondary)}.sd-data-state[data-state=error] .sd-data-state__symbol,.sd-data-state[data-state=forbidden] .sd-data-state__symbol{background:color-mix(in srgb,var(--sd-error-light) 40%,transparent)}.sd-data-state[data-state=error] .sd-data-state__icon,.sd-data-state[data-state=forbidden] .sd-data-state__icon{color:var(--sd-error)}.sd-data-state[data-state=loading] .sd-data-state__icon{color:var(--sd-primary);animation:sd-data-state-spin 1s linear infinite}.sd-data-state[data-state=loading] .sd-data-state__symbol{background:var(--sd-primary-light)}.sd-data-state[data-state=empty] .sd-data-state__symbol{background:var(--sd-warning-light)}.sd-data-state[data-state=empty] .sd-data-state__icon{color:var(--sd-warning-dark)}.sd-data-state__title{max-width:100%;font-size:16px;font-weight:600;line-height:24px;overflow-wrap:anywhere}.sd-data-state__message{max-width:440px;margin-top:4px;color:var(--sd-text-secondary);font-size:14px;line-height:22px;overflow-wrap:anywhere}.sd-data-state__message:empty,.sd-data-state__title:empty{display:none}.sd-data-state__actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;max-width:100%;margin-top:16px}.sd-data-state__actions sd-button{min-width:0;max-width:100%}.sd-data-state--compact{display:grid;grid-template-columns:minmax(0,1fr);align-content:center;align-items:start;column-gap:12px;min-height:120px;padding:16px;text-align:start}.sd-data-state--compact.sd-data-state--with-icon{grid-template-columns:32px minmax(0,1fr)}.sd-data-state--compact .sd-data-state__symbol{grid-column:1;grid-row:1/span 2;width:32px;height:32px;margin:0;border-radius:6px}.sd-data-state--compact .sd-data-state__icon{width:22px;height:22px;font-size:22px}.sd-data-state--compact .sd-data-state__title,.sd-data-state--compact .sd-data-state__message,.sd-data-state--compact .sd-data-state__actions{grid-column:-2}.sd-data-state--compact .sd-data-state__title{font-size:14px;line-height:20px}.sd-data-state--compact .sd-data-state__message{margin-top:2px;font-size:13px;line-height:20px}.sd-data-state--compact .sd-data-state__actions{justify-content:flex-start;margin-top:10px}.sd-data-state--full-page{min-height:100dvh}@keyframes sd-data-state-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.sd-data-state[data-state=loading] .sd-data-state__icon{animation:none}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "loading", "block", "htmlType"], outputs: ["click"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
57
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdDataState, isStandalone: true, selector: "sd-data-state", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, fontSet: { classPropertyName: "fontSet", publicName: "fontSet", isSignal: true, isRequired: false, transformFunction: null }, retryable: { classPropertyName: "retryable", publicName: "retryable", isSignal: true, isRequired: false, transformFunction: null }, retryLabel: { classPropertyName: "retryLabel", publicName: "retryLabel", isSignal: true, isRequired: false, transformFunction: null }, actionLabel: { classPropertyName: "actionLabel", publicName: "actionLabel", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, fullPage: { classPropertyName: "fullPage", publicName: "fullPage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sdRetry: "sdRetry", sdAction: "sdAction" }, queries: [{ propertyName: "customTemplate", first: true, predicate: SdDataStateTemplateDirective, descendants: true, isSignal: true }], ngImport: i0, template: "@let _compact = compact();\n@let currentState = state();\n@let template = customTemplate();\n@let _role = role();\n@let _retryable = retryable();\n@let _actionLabel = actionLabel();\n@let currentIcon = effectiveIcon();\n\n@if (currentState === 'success') {\n @if (template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"templateContext()\"></ng-container>\n } @else {\n <ng-content></ng-content>\n }\n} @else if (template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"templateContext()\"></ng-container>\n} @else {\n <section\n class=\"sd-data-state\"\n [class.sd-data-state--compact]=\"_compact\"\n [class.sd-data-state--full-page]=\"fullPage()\"\n [class.sd-data-state--with-icon]=\"!!currentIcon\"\n [attr.data-state]=\"currentState\"\n [attr.role]=\"_role\"\n [attr.aria-busy]=\"currentState === 'loading' ? 'true' : null\"\n [attr.aria-live]=\"_role === 'alert' ? 'assertive' : 'polite'\">\n @if (currentIcon) {\n <span class=\"sd-data-state__symbol\" aria-hidden=\"true\">\n <sd-icon class=\"sd-data-state__icon\" [name]=\"currentIcon\" [fontSet]=\"fontSet()\" [size]=\"_compact ? '22px' : '32px'\"></sd-icon>\n </span>\n }\n\n <div class=\"sd-data-state__title\">{{ title() ?? (titleKey() | sdTranslate) }}</div>\n <div class=\"sd-data-state__message\">{{ message() ?? (messageKey() | sdTranslate) }}</div>\n\n @if (_retryable || _actionLabel) {\n <div class=\"sd-data-state__actions\">\n @if (_retryable) {\n <sd-button\n data-state-retry\n type=\"light\"\n color=\"primary\"\n size=\"sm\"\n htmlType=\"button\"\n width=\"100%\"\n prefixIcon=\"refresh\"\n fontSet=\"material-icons-outlined\"\n [title]=\"retryLabel() || ('core.component.data-state.retry' | sdTranslate)\"\n (click)=\"retry()\"></sd-button>\n }\n @if (_actionLabel; as label) {\n <sd-button\n data-state-action\n type=\"fill\"\n color=\"primary\"\n size=\"sm\"\n htmlType=\"button\"\n width=\"100%\"\n [title]=\"label\"\n (click)=\"action()\"></sd-button>\n }\n </div>\n }\n </section>\n}\n", styles: [":host{display:contents}.sd-data-state{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;min-width:0;min-height:240px;padding:32px;text-align:center;color:var(--sd-text)}.sd-data-state__symbol{display:grid;place-items:center;flex-shrink:0;width:56px;height:56px;margin-bottom:16px;border-radius:50%;background:var(--sd-surface-muted)}.sd-data-state__icon{width:32px;height:32px;font-size:32px;line-height:1;color:var(--sd-text-secondary)}.sd-data-state[data-state=error] .sd-data-state__symbol,.sd-data-state[data-state=forbidden] .sd-data-state__symbol{background:color-mix(in srgb,var(--sd-error-light) 40%,transparent)}.sd-data-state[data-state=error] .sd-data-state__icon,.sd-data-state[data-state=forbidden] .sd-data-state__icon{color:var(--sd-error)}.sd-data-state[data-state=loading] .sd-data-state__icon{color:var(--sd-primary);animation:sd-data-state-spin 1s linear infinite}.sd-data-state[data-state=loading] .sd-data-state__symbol{background:var(--sd-primary-light)}.sd-data-state[data-state=empty] .sd-data-state__symbol{background:var(--sd-warning-light)}.sd-data-state[data-state=empty] .sd-data-state__icon{color:var(--sd-warning-dark)}.sd-data-state__title{max-width:100%;font-size:16px;font-weight:600;line-height:24px;overflow-wrap:anywhere}.sd-data-state__message{max-width:440px;margin-top:4px;color:var(--sd-text-secondary);font-size:14px;line-height:22px;overflow-wrap:anywhere}.sd-data-state__message:empty,.sd-data-state__title:empty{display:none}.sd-data-state__actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;max-width:100%;margin-top:16px}.sd-data-state__actions sd-button{min-width:0;max-width:100%}.sd-data-state--compact{display:grid;grid-template-columns:minmax(0,1fr);align-content:center;align-items:start;column-gap:12px;min-height:120px;padding:16px;text-align:start}.sd-data-state--compact.sd-data-state--with-icon{grid-template-columns:32px minmax(0,1fr)}.sd-data-state--compact .sd-data-state__symbol{grid-column:1;grid-row:1/span 2;width:32px;height:32px;margin:0}.sd-data-state--compact .sd-data-state__icon{width:22px;height:22px;font-size:22px}.sd-data-state--compact .sd-data-state__title,.sd-data-state--compact .sd-data-state__message,.sd-data-state--compact .sd-data-state__actions{grid-column:-2}.sd-data-state--compact .sd-data-state__title{font-size:14px;line-height:20px}.sd-data-state--compact .sd-data-state__message{margin-top:2px;font-size:13px;line-height:20px}.sd-data-state--compact .sd-data-state__actions{justify-content:flex-start;margin-top:10px}.sd-data-state--full-page{min-height:100dvh}@keyframes sd-data-state-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.sd-data-state[data-state=loading] .sd-data-state__icon{animation:none}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "loading", "block", "htmlType"], outputs: ["click"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
58
58
  }
59
59
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdDataState, decorators: [{
60
60
  type: Component,
61
- args: [{ selector: 'sd-data-state', standalone: true, imports: [NgTemplateOutlet, SdTranslatePipe, SdIcon, SdButton], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let _compact = compact();\n@let currentState = state();\n@let template = customTemplate();\n@let _role = role();\n@let _retryable = retryable();\n@let _actionLabel = actionLabel();\n@let currentIcon = effectiveIcon();\n\n@if (currentState === 'success') {\n @if (template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"templateContext()\"></ng-container>\n } @else {\n <ng-content></ng-content>\n }\n} @else if (template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"templateContext()\"></ng-container>\n} @else {\n <section\n class=\"sd-data-state\"\n [class.sd-data-state--compact]=\"_compact\"\n [class.sd-data-state--full-page]=\"fullPage()\"\n [class.sd-data-state--with-icon]=\"!!currentIcon\"\n [attr.data-state]=\"currentState\"\n [attr.role]=\"_role\"\n [attr.aria-busy]=\"currentState === 'loading' ? 'true' : null\"\n [attr.aria-live]=\"_role === 'alert' ? 'assertive' : 'polite'\">\n @if (currentIcon) {\n <span class=\"sd-data-state__symbol\" aria-hidden=\"true\">\n <sd-icon class=\"sd-data-state__icon\" [name]=\"currentIcon\" [fontSet]=\"fontSet()\" [size]=\"_compact ? '22px' : '32px'\"></sd-icon>\n </span>\n }\n\n <div class=\"sd-data-state__title\">{{ title() ?? (titleKey() | sdTranslate) }}</div>\n <div class=\"sd-data-state__message\">{{ message() ?? (messageKey() | sdTranslate) }}</div>\n\n @if (_retryable || _actionLabel) {\n <div class=\"sd-data-state__actions\">\n @if (_retryable) {\n <sd-button\n data-state-retry\n type=\"light\"\n color=\"primary\"\n size=\"sm\"\n htmlType=\"button\"\n width=\"100%\"\n prefixIcon=\"refresh\"\n fontSet=\"material-icons-outlined\"\n [title]=\"retryLabel() || ('core.component.data-state.retry' | sdTranslate)\"\n (click)=\"retry()\"></sd-button>\n }\n @if (_actionLabel; as label) {\n <sd-button\n data-state-action\n type=\"fill\"\n color=\"primary\"\n size=\"sm\"\n htmlType=\"button\"\n width=\"100%\"\n [title]=\"label\"\n (click)=\"action()\"></sd-button>\n }\n </div>\n }\n </section>\n}\n", styles: [":host{display:contents}.sd-data-state{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;min-width:0;min-height:240px;padding:32px;text-align:center;color:var(--sd-text)}.sd-data-state__symbol{display:grid;place-items:center;flex-shrink:0;width:56px;height:56px;margin-bottom:16px;border-radius:8px;background:var(--sd-surface-muted)}.sd-data-state__icon{width:32px;height:32px;font-size:32px;line-height:1;color:var(--sd-text-secondary)}.sd-data-state[data-state=error] .sd-data-state__symbol,.sd-data-state[data-state=forbidden] .sd-data-state__symbol{background:color-mix(in srgb,var(--sd-error-light) 40%,transparent)}.sd-data-state[data-state=error] .sd-data-state__icon,.sd-data-state[data-state=forbidden] .sd-data-state__icon{color:var(--sd-error)}.sd-data-state[data-state=loading] .sd-data-state__icon{color:var(--sd-primary);animation:sd-data-state-spin 1s linear infinite}.sd-data-state[data-state=loading] .sd-data-state__symbol{background:var(--sd-primary-light)}.sd-data-state[data-state=empty] .sd-data-state__symbol{background:var(--sd-warning-light)}.sd-data-state[data-state=empty] .sd-data-state__icon{color:var(--sd-warning-dark)}.sd-data-state__title{max-width:100%;font-size:16px;font-weight:600;line-height:24px;overflow-wrap:anywhere}.sd-data-state__message{max-width:440px;margin-top:4px;color:var(--sd-text-secondary);font-size:14px;line-height:22px;overflow-wrap:anywhere}.sd-data-state__message:empty,.sd-data-state__title:empty{display:none}.sd-data-state__actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;max-width:100%;margin-top:16px}.sd-data-state__actions sd-button{min-width:0;max-width:100%}.sd-data-state--compact{display:grid;grid-template-columns:minmax(0,1fr);align-content:center;align-items:start;column-gap:12px;min-height:120px;padding:16px;text-align:start}.sd-data-state--compact.sd-data-state--with-icon{grid-template-columns:32px minmax(0,1fr)}.sd-data-state--compact .sd-data-state__symbol{grid-column:1;grid-row:1/span 2;width:32px;height:32px;margin:0;border-radius:6px}.sd-data-state--compact .sd-data-state__icon{width:22px;height:22px;font-size:22px}.sd-data-state--compact .sd-data-state__title,.sd-data-state--compact .sd-data-state__message,.sd-data-state--compact .sd-data-state__actions{grid-column:-2}.sd-data-state--compact .sd-data-state__title{font-size:14px;line-height:20px}.sd-data-state--compact .sd-data-state__message{margin-top:2px;font-size:13px;line-height:20px}.sd-data-state--compact .sd-data-state__actions{justify-content:flex-start;margin-top:10px}.sd-data-state--full-page{min-height:100dvh}@keyframes sd-data-state-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.sd-data-state[data-state=loading] .sd-data-state__icon{animation:none}}\n"] }]
61
+ args: [{ selector: 'sd-data-state', standalone: true, imports: [NgTemplateOutlet, SdTranslatePipe, SdIcon, SdButton], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let _compact = compact();\n@let currentState = state();\n@let template = customTemplate();\n@let _role = role();\n@let _retryable = retryable();\n@let _actionLabel = actionLabel();\n@let currentIcon = effectiveIcon();\n\n@if (currentState === 'success') {\n @if (template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"templateContext()\"></ng-container>\n } @else {\n <ng-content></ng-content>\n }\n} @else if (template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"templateContext()\"></ng-container>\n} @else {\n <section\n class=\"sd-data-state\"\n [class.sd-data-state--compact]=\"_compact\"\n [class.sd-data-state--full-page]=\"fullPage()\"\n [class.sd-data-state--with-icon]=\"!!currentIcon\"\n [attr.data-state]=\"currentState\"\n [attr.role]=\"_role\"\n [attr.aria-busy]=\"currentState === 'loading' ? 'true' : null\"\n [attr.aria-live]=\"_role === 'alert' ? 'assertive' : 'polite'\">\n @if (currentIcon) {\n <span class=\"sd-data-state__symbol\" aria-hidden=\"true\">\n <sd-icon class=\"sd-data-state__icon\" [name]=\"currentIcon\" [fontSet]=\"fontSet()\" [size]=\"_compact ? '22px' : '32px'\"></sd-icon>\n </span>\n }\n\n <div class=\"sd-data-state__title\">{{ title() ?? (titleKey() | sdTranslate) }}</div>\n <div class=\"sd-data-state__message\">{{ message() ?? (messageKey() | sdTranslate) }}</div>\n\n @if (_retryable || _actionLabel) {\n <div class=\"sd-data-state__actions\">\n @if (_retryable) {\n <sd-button\n data-state-retry\n type=\"light\"\n color=\"primary\"\n size=\"sm\"\n htmlType=\"button\"\n width=\"100%\"\n prefixIcon=\"refresh\"\n fontSet=\"material-icons-outlined\"\n [title]=\"retryLabel() || ('core.component.data-state.retry' | sdTranslate)\"\n (click)=\"retry()\"></sd-button>\n }\n @if (_actionLabel; as label) {\n <sd-button\n data-state-action\n type=\"fill\"\n color=\"primary\"\n size=\"sm\"\n htmlType=\"button\"\n width=\"100%\"\n [title]=\"label\"\n (click)=\"action()\"></sd-button>\n }\n </div>\n }\n </section>\n}\n", styles: [":host{display:contents}.sd-data-state{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;min-width:0;min-height:240px;padding:32px;text-align:center;color:var(--sd-text)}.sd-data-state__symbol{display:grid;place-items:center;flex-shrink:0;width:56px;height:56px;margin-bottom:16px;border-radius:50%;background:var(--sd-surface-muted)}.sd-data-state__icon{width:32px;height:32px;font-size:32px;line-height:1;color:var(--sd-text-secondary)}.sd-data-state[data-state=error] .sd-data-state__symbol,.sd-data-state[data-state=forbidden] .sd-data-state__symbol{background:color-mix(in srgb,var(--sd-error-light) 40%,transparent)}.sd-data-state[data-state=error] .sd-data-state__icon,.sd-data-state[data-state=forbidden] .sd-data-state__icon{color:var(--sd-error)}.sd-data-state[data-state=loading] .sd-data-state__icon{color:var(--sd-primary);animation:sd-data-state-spin 1s linear infinite}.sd-data-state[data-state=loading] .sd-data-state__symbol{background:var(--sd-primary-light)}.sd-data-state[data-state=empty] .sd-data-state__symbol{background:var(--sd-warning-light)}.sd-data-state[data-state=empty] .sd-data-state__icon{color:var(--sd-warning-dark)}.sd-data-state__title{max-width:100%;font-size:16px;font-weight:600;line-height:24px;overflow-wrap:anywhere}.sd-data-state__message{max-width:440px;margin-top:4px;color:var(--sd-text-secondary);font-size:14px;line-height:22px;overflow-wrap:anywhere}.sd-data-state__message:empty,.sd-data-state__title:empty{display:none}.sd-data-state__actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;max-width:100%;margin-top:16px}.sd-data-state__actions sd-button{min-width:0;max-width:100%}.sd-data-state--compact{display:grid;grid-template-columns:minmax(0,1fr);align-content:center;align-items:start;column-gap:12px;min-height:120px;padding:16px;text-align:start}.sd-data-state--compact.sd-data-state--with-icon{grid-template-columns:32px minmax(0,1fr)}.sd-data-state--compact .sd-data-state__symbol{grid-column:1;grid-row:1/span 2;width:32px;height:32px;margin:0}.sd-data-state--compact .sd-data-state__icon{width:22px;height:22px;font-size:22px}.sd-data-state--compact .sd-data-state__title,.sd-data-state--compact .sd-data-state__message,.sd-data-state--compact .sd-data-state__actions{grid-column:-2}.sd-data-state--compact .sd-data-state__title{font-size:14px;line-height:20px}.sd-data-state--compact .sd-data-state__message{margin-top:2px;font-size:13px;line-height:20px}.sd-data-state--compact .sd-data-state__actions{justify-content:flex-start;margin-top:10px}.sd-data-state--full-page{min-height:100dvh}@keyframes sd-data-state-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.sd-data-state[data-state=loading] .sd-data-state__icon{animation:none}}\n"] }]
62
62
  }] });
63
63
 
64
64
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"sdcorejs-angular-components-data-state.mjs","sources":["../../../projects/sdcorejs-angular/components/data-state/src/data-state.component.ts","../../../projects/sdcorejs-angular/components/data-state/src/data-state.component.html","../../../projects/sdcorejs-angular/components/data-state/sdcorejs-angular-components-data-state.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n Directive,\n TemplateRef,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { SdTranslatePipe } from '@sdcorejs/angular/i18n';\nimport { SdButton } from '@sdcorejs/angular/components/button';\nimport { SdIcon, SdIconSet } from '@sdcorejs/angular/modules/icon';\n\nexport type SdDataStateKind = 'loading' | 'empty' | 'error' | 'forbidden' | 'success';\n\nexport interface SdDataStateTemplateContext {\n readonly $implicit: SdDataStateKind;\n readonly state: SdDataStateKind;\n readonly retry: () => void;\n readonly action: () => void;\n}\n\n@Directive({\n selector: 'ng-template[sdDataStateTemplate]',\n standalone: true,\n})\nexport class SdDataStateTemplateDirective {\n readonly template = inject<TemplateRef<SdDataStateTemplateContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: SdDataStateTemplateDirective, _context: unknown): _context is SdDataStateTemplateContext {\n return true;\n }\n}\n\nconst DEFAULT_ICON: Readonly<Record<SdDataStateKind, string | null>> = {\n loading: 'autorenew',\n empty: 'inbox',\n error: 'error_outline',\n forbidden: 'lock',\n success: null,\n};\n\n@Component({\n selector: 'sd-data-state',\n standalone: true,\n imports: [NgTemplateOutlet, SdTranslatePipe, SdIcon, SdButton],\n templateUrl: './data-state.component.html',\n styleUrl: './data-state.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SdDataState {\n readonly state = input<SdDataStateKind>('success');\n readonly title = input<string | null | undefined>();\n readonly message = input<string | null | undefined>();\n readonly icon = input<string | null | undefined>();\n readonly fontSet = input<SdIconSet | undefined>();\n readonly retryable = input(false, { transform: booleanAttribute });\n readonly retryLabel = input<string | null | undefined>();\n readonly actionLabel = input<string | null | undefined>();\n readonly compact = input(false, { transform: booleanAttribute });\n readonly fullPage = input(false, { transform: booleanAttribute });\n readonly sdRetry = output<void>();\n readonly sdAction = output<void>();\n\n protected readonly customTemplate = contentChild(SdDataStateTemplateDirective);\n protected readonly effectiveIcon = computed(() => this.icon() ?? DEFAULT_ICON[this.state()]);\n protected readonly titleKey = computed(() => `core.component.data-state.${this.state()}.title`);\n protected readonly messageKey = computed(() => `core.component.data-state.${this.state()}.message`);\n protected readonly role = computed<'alert' | 'status'>(() =>\n this.state() === 'error' || this.state() === 'forbidden' ? 'alert' : 'status'\n );\n\n protected readonly retry = (): void => this.sdRetry.emit();\n protected readonly action = (): void => this.sdAction.emit();\n protected readonly templateContext = computed<SdDataStateTemplateContext>(() => ({\n $implicit: this.state(),\n state: this.state(),\n retry: this.retry,\n action: this.action,\n }));\n}\n","@let _compact = compact();\n@let currentState = state();\n@let template = customTemplate();\n@let _role = role();\n@let _retryable = retryable();\n@let _actionLabel = actionLabel();\n@let currentIcon = effectiveIcon();\n\n@if (currentState === 'success') {\n @if (template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"templateContext()\"></ng-container>\n } @else {\n <ng-content></ng-content>\n }\n} @else if (template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"templateContext()\"></ng-container>\n} @else {\n <section\n class=\"sd-data-state\"\n [class.sd-data-state--compact]=\"_compact\"\n [class.sd-data-state--full-page]=\"fullPage()\"\n [class.sd-data-state--with-icon]=\"!!currentIcon\"\n [attr.data-state]=\"currentState\"\n [attr.role]=\"_role\"\n [attr.aria-busy]=\"currentState === 'loading' ? 'true' : null\"\n [attr.aria-live]=\"_role === 'alert' ? 'assertive' : 'polite'\">\n @if (currentIcon) {\n <span class=\"sd-data-state__symbol\" aria-hidden=\"true\">\n <sd-icon class=\"sd-data-state__icon\" [name]=\"currentIcon\" [fontSet]=\"fontSet()\" [size]=\"_compact ? '22px' : '32px'\"></sd-icon>\n </span>\n }\n\n <div class=\"sd-data-state__title\">{{ title() ?? (titleKey() | sdTranslate) }}</div>\n <div class=\"sd-data-state__message\">{{ message() ?? (messageKey() | sdTranslate) }}</div>\n\n @if (_retryable || _actionLabel) {\n <div class=\"sd-data-state__actions\">\n @if (_retryable) {\n <sd-button\n data-state-retry\n type=\"light\"\n color=\"primary\"\n size=\"sm\"\n htmlType=\"button\"\n width=\"100%\"\n prefixIcon=\"refresh\"\n fontSet=\"material-icons-outlined\"\n [title]=\"retryLabel() || ('core.component.data-state.retry' | sdTranslate)\"\n (click)=\"retry()\"></sd-button>\n }\n @if (_actionLabel; as label) {\n <sd-button\n data-state-action\n type=\"fill\"\n color=\"primary\"\n size=\"sm\"\n htmlType=\"button\"\n width=\"100%\"\n [title]=\"label\"\n (click)=\"action()\"></sd-button>\n }\n </div>\n }\n </section>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MA8Ba,4BAA4B,CAAA;AAC9B,IAAA,QAAQ,GAAG,MAAM,CAA0C,WAAW,CAAC;AAEhF,IAAA,OAAO,sBAAsB,CAAC,UAAwC,EAAE,QAAiB,EAAA;AACvF,QAAA,OAAO,IAAI;IACb;wGALW,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAA5B,4BAA4B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kCAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAA5B,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAJxC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kCAAkC;AAC5C,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;AASD,MAAM,YAAY,GAAqD;AACrE,IAAA,OAAO,EAAE,WAAW;AACpB,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,KAAK,EAAE,eAAe;AACtB,IAAA,SAAS,EAAE,MAAM;AACjB,IAAA,OAAO,EAAE,IAAI;CACd;MAUY,WAAW,CAAA;AACb,IAAA,KAAK,GAAG,KAAK,CAAkB,SAAS,CAAC;IACzC,KAAK,GAAG,KAAK,EAA6B;IAC1C,OAAO,GAAG,KAAK,EAA6B;IAC5C,IAAI,GAAG,KAAK,EAA6B;IACzC,OAAO,GAAG,KAAK,EAAyB;IACxC,SAAS,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,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,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,QAAQ,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,MAAA,EAAA,OAAA,EAAA,MAAA,EAAA,SAAA,EAAA,OAAA,EAAA,OAAA,EAAA,SAAA,EAAA,YAAA,EAAA,YAAA,EAAA,UAAA,EAAA,SAAA,EAAA,OAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAKlD,WAAW,EAAA,UAAA,EAAA,CAAA;kBARvB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,eAAe,EAAA,UAAA,EACb,IAAI,EAAA,OAAA,EACP,CAAC,gBAAgB,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAA,eAAA,EAG7C,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,s0EAAA,EAAA,MAAA,EAAA,CAAA,uxFAAA,CAAA,EAAA;;;AEpDjD;;AAEG;;;;"}
1
+ {"version":3,"file":"sdcorejs-angular-components-data-state.mjs","sources":["../../../projects/sdcorejs-angular/components/data-state/src/data-state.component.ts","../../../projects/sdcorejs-angular/components/data-state/src/data-state.component.html","../../../projects/sdcorejs-angular/components/data-state/sdcorejs-angular-components-data-state.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n Directive,\n TemplateRef,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { SdTranslatePipe } from '@sdcorejs/angular/i18n';\nimport { SdButton } from '@sdcorejs/angular/components/button';\nimport { SdIcon, SdIconSet } from '@sdcorejs/angular/modules/icon';\n\nexport type SdDataStateKind = 'loading' | 'empty' | 'error' | 'forbidden' | 'success';\n\nexport interface SdDataStateTemplateContext {\n readonly $implicit: SdDataStateKind;\n readonly state: SdDataStateKind;\n readonly retry: () => void;\n readonly action: () => void;\n}\n\n@Directive({\n selector: 'ng-template[sdDataStateTemplate]',\n standalone: true,\n})\nexport class SdDataStateTemplateDirective {\n readonly template = inject<TemplateRef<SdDataStateTemplateContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: SdDataStateTemplateDirective, _context: unknown): _context is SdDataStateTemplateContext {\n return true;\n }\n}\n\nconst DEFAULT_ICON: Readonly<Record<SdDataStateKind, string | null>> = {\n loading: 'autorenew',\n empty: 'inbox',\n error: 'error_outline',\n forbidden: 'lock',\n success: null,\n};\n\n@Component({\n selector: 'sd-data-state',\n standalone: true,\n imports: [NgTemplateOutlet, SdTranslatePipe, SdIcon, SdButton],\n templateUrl: './data-state.component.html',\n styleUrl: './data-state.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SdDataState {\n readonly state = input<SdDataStateKind>('success');\n readonly title = input<string | null | undefined>();\n readonly message = input<string | null | undefined>();\n readonly icon = input<string | null | undefined>();\n readonly fontSet = input<SdIconSet | undefined>();\n readonly retryable = input(false, { transform: booleanAttribute });\n readonly retryLabel = input<string | null | undefined>();\n readonly actionLabel = input<string | null | undefined>();\n readonly compact = input(false, { transform: booleanAttribute });\n readonly fullPage = input(false, { transform: booleanAttribute });\n readonly sdRetry = output<void>();\n readonly sdAction = output<void>();\n\n protected readonly customTemplate = contentChild(SdDataStateTemplateDirective);\n protected readonly effectiveIcon = computed(() => this.icon() ?? DEFAULT_ICON[this.state()]);\n protected readonly titleKey = computed(() => `core.component.data-state.${this.state()}.title`);\n protected readonly messageKey = computed(() => `core.component.data-state.${this.state()}.message`);\n protected readonly role = computed<'alert' | 'status'>(() =>\n this.state() === 'error' || this.state() === 'forbidden' ? 'alert' : 'status'\n );\n\n protected readonly retry = (): void => this.sdRetry.emit();\n protected readonly action = (): void => this.sdAction.emit();\n protected readonly templateContext = computed<SdDataStateTemplateContext>(() => ({\n $implicit: this.state(),\n state: this.state(),\n retry: this.retry,\n action: this.action,\n }));\n}\n","@let _compact = compact();\n@let currentState = state();\n@let template = customTemplate();\n@let _role = role();\n@let _retryable = retryable();\n@let _actionLabel = actionLabel();\n@let currentIcon = effectiveIcon();\n\n@if (currentState === 'success') {\n @if (template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"templateContext()\"></ng-container>\n } @else {\n <ng-content></ng-content>\n }\n} @else if (template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"templateContext()\"></ng-container>\n} @else {\n <section\n class=\"sd-data-state\"\n [class.sd-data-state--compact]=\"_compact\"\n [class.sd-data-state--full-page]=\"fullPage()\"\n [class.sd-data-state--with-icon]=\"!!currentIcon\"\n [attr.data-state]=\"currentState\"\n [attr.role]=\"_role\"\n [attr.aria-busy]=\"currentState === 'loading' ? 'true' : null\"\n [attr.aria-live]=\"_role === 'alert' ? 'assertive' : 'polite'\">\n @if (currentIcon) {\n <span class=\"sd-data-state__symbol\" aria-hidden=\"true\">\n <sd-icon class=\"sd-data-state__icon\" [name]=\"currentIcon\" [fontSet]=\"fontSet()\" [size]=\"_compact ? '22px' : '32px'\"></sd-icon>\n </span>\n }\n\n <div class=\"sd-data-state__title\">{{ title() ?? (titleKey() | sdTranslate) }}</div>\n <div class=\"sd-data-state__message\">{{ message() ?? (messageKey() | sdTranslate) }}</div>\n\n @if (_retryable || _actionLabel) {\n <div class=\"sd-data-state__actions\">\n @if (_retryable) {\n <sd-button\n data-state-retry\n type=\"light\"\n color=\"primary\"\n size=\"sm\"\n htmlType=\"button\"\n width=\"100%\"\n prefixIcon=\"refresh\"\n fontSet=\"material-icons-outlined\"\n [title]=\"retryLabel() || ('core.component.data-state.retry' | sdTranslate)\"\n (click)=\"retry()\"></sd-button>\n }\n @if (_actionLabel; as label) {\n <sd-button\n data-state-action\n type=\"fill\"\n color=\"primary\"\n size=\"sm\"\n htmlType=\"button\"\n width=\"100%\"\n [title]=\"label\"\n (click)=\"action()\"></sd-button>\n }\n </div>\n }\n </section>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MA8Ba,4BAA4B,CAAA;AAC9B,IAAA,QAAQ,GAAG,MAAM,CAA0C,WAAW,CAAC;AAEhF,IAAA,OAAO,sBAAsB,CAAC,UAAwC,EAAE,QAAiB,EAAA;AACvF,QAAA,OAAO,IAAI;IACb;wGALW,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAA5B,4BAA4B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kCAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAA5B,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAJxC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kCAAkC;AAC5C,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;AASD,MAAM,YAAY,GAAqD;AACrE,IAAA,OAAO,EAAE,WAAW;AACpB,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,KAAK,EAAE,eAAe;AACtB,IAAA,SAAS,EAAE,MAAM;AACjB,IAAA,OAAO,EAAE,IAAI;CACd;MAUY,WAAW,CAAA;AACb,IAAA,KAAK,GAAG,KAAK,CAAkB,SAAS,CAAC;IACzC,KAAK,GAAG,KAAK,EAA6B;IAC1C,OAAO,GAAG,KAAK,EAA6B;IAC5C,IAAI,GAAG,KAAK,EAA6B;IACzC,OAAO,GAAG,KAAK,EAAyB;IACxC,SAAS,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;IACzD,UAAU,GAAG,KAAK,EAA6B;IAC/C,WAAW,GAAG,KAAK,EAA6B;IAChD,OAAO,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,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EAAA,OAAA,EAAA,SAAA,EAAA,YAAA,EAAA,YAAA,EAAA,UAAA,EAAA,SAAA,EAAA,OAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAKlD,WAAW,EAAA,UAAA,EAAA,CAAA;kBARvB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,eAAe,EAAA,UAAA,EACb,IAAI,EAAA,OAAA,EACP,CAAC,gBAAgB,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAA,eAAA,EAG7C,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,s0EAAA,EAAA,MAAA,EAAA,CAAA,qwFAAA,CAAA,EAAA;;;AEpDjD;;AAEG;;;;"}
@@ -165,11 +165,11 @@ class SdInform {
165
165
  this.sdAction.emit(event);
166
166
  }
167
167
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdInform, deps: [], target: i0.ɵɵFactoryTarget.Component });
168
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdInform, isStandalone: true, selector: "sd-inform", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, primary: { classPropertyName: "primary", publicName: "primary", isSignal: true, isRequired: false, transformFunction: null }, secondary: { classPropertyName: "secondary", publicName: "secondary", isSignal: true, isRequired: false, transformFunction: null }, info: { classPropertyName: "info", publicName: "info", isSignal: true, isRequired: false, transformFunction: null }, success: { classPropertyName: "success", publicName: "success", isSignal: true, isRequired: false, transformFunction: null }, warning: { classPropertyName: "warning", publicName: "warning", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, hideIcon: { classPropertyName: "hideIcon", publicName: "hideIcon", isSignal: true, isRequired: false, transformFunction: null }, fontSet: { classPropertyName: "fontSet", publicName: "fontSet", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, actionLabel: { classPropertyName: "actionLabel", publicName: "actionLabel", isSignal: true, isRequired: false, transformFunction: null }, lineClamp: { classPropertyName: "lineClamp", publicName: "lineClamp", isSignal: true, isRequired: false, transformFunction: null }, autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sdClosed: "sdClosed", sdAction: "sdAction" }, queries: [{ propertyName: "actionSlot", first: true, predicate: SdInformActionDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "bodyRef", first: true, predicate: ["body"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (!dismissed()) {\n @let _effectiveIcon = effectiveIcon();\n @let _fontSet = fontSet();\n <div\n class=\"c-inform\"\n [attr.role]=\"liveRole()\"\n [ngClass]=\"colorClasses()\"\n [attr.data-autoId]=\"autoId() || null\"\n [attr.data-autoid]=\"autoId() || null\">\n @if (_effectiveIcon) {\n <span class=\"c-inform-icon-tile\" aria-hidden=\"true\"\n ><sd-icon\n class=\"c-inform-icon c-material-icon\"\n size=\"20px\"\n aria-hidden=\"true\"\n [fontSet]=\"_fontSet\"\n [name]=\"_effectiveIcon\"></sd-icon\n ></span>\n }\n\n @let _actionLabel = actionLabel();\n <div class=\"c-inform-content\">\n @if (title(); as t) {\n <div class=\"c-inform-title\">{{ t }}</div>\n }\n @if (description(); as d) {\n <div #body class=\"c-inform-body\" [class.is-clamped]=\"clampLines() !== null\" [style.-webkit-line-clamp]=\"clampLines()\">\n {{ d }}\n </div>\n }\n @if (showToggle()) {\n <button type=\"button\" class=\"c-inform-toggle\" (click)=\"toggleExpanded()\">\n {{ (expanded() ? 'core.component.inform.show-less' : 'core.component.inform.show-more') | sdTranslate }}\n </button>\n }\n\n @if (hasActionSlot()) {\n <div class=\"c-inform-action\">\n <ng-content select=\"[sdInformAction]\"></ng-content>\n </div>\n } @else if (_actionLabel) {\n <sd-button\n class=\"c-inform-action c-inform-action-link\"\n size=\"sm\"\n type=\"light\"\n color=\"primary\"\n htmlType=\"button\"\n [title]=\"_actionLabel\"\n (click)=\"onAction($event)\"></sd-button>\n }\n </div>\n\n @if (closable()) {\n <button type=\"button\" class=\"c-inform-close\" [attr.aria-label]=\"'core.common.close' | sdTranslate\" (click)=\"onClose($event)\">\n <sd-icon aria-hidden=\"true\" name=\"close\"></sd-icon>\n </button>\n }\n </div>\n}\n", styles: [":host{display:block;min-width:0}.c-inform{--inform-tone: var(--sd-primary);--inform-soft: var(--sd-primary-light);--inform-ink: var(--sd-primary-dark);display:flex;align-items:flex-start;gap:12px;padding:16px;border-radius:8px;border:1px solid color-mix(in srgb,var(--inform-tone) 22%,var(--sd-surface, #fff));background:color-mix(in srgb,var(--inform-soft) 28%,var(--sd-surface, #fff))}.c-inform.c-primary{--inform-tone: var(--sd-primary);--inform-soft: var(--sd-primary-light);--inform-ink: var(--sd-primary-dark, var(--sd-primary))}.c-inform.c-secondary{--inform-tone: var(--sd-secondary);--inform-soft: var(--sd-secondary-light);--inform-ink: var(--sd-secondary-dark, var(--sd-secondary))}.c-inform.c-info{--inform-tone: var(--sd-info);--inform-soft: var(--sd-info-light);--inform-ink: var(--sd-info-dark, var(--sd-info))}.c-inform.c-success{--inform-tone: var(--sd-success);--inform-soft: var(--sd-success-light);--inform-ink: var(--sd-success-dark, var(--sd-success))}.c-inform.c-warning{--inform-tone: var(--sd-warning);--inform-soft: var(--sd-warning-light);--inform-ink: var(--sd-warning-dark, var(--sd-warning))}.c-inform.c-error{--inform-tone: var(--sd-error);--inform-soft: var(--sd-error-light);--inform-ink: var(--sd-error-dark, var(--sd-error))}.c-inform-icon-tile{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:8px;background:var(--inform-soft);color:var(--inform-ink)}.c-inform-icon{width:20px;height:20px;font-size:20px;line-height:20px}.c-inform-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.c-inform-title{font-size:14px;line-height:20px;font-weight:600;color:var(--sd-text);overflow-wrap:anywhere}.c-inform-body{font-size:14px;line-height:21px;color:var(--sd-text);overflow-wrap:anywhere}.c-inform-body.is-clamped{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}.c-inform-action{margin-top:8px;align-self:flex-start}.c-inform-toggle{align-self:flex-start;margin-top:4px;padding:4px 0;border:0;background:transparent;font:inherit;font-size:14px;color:var(--sd-primary-dark);cursor:pointer}.c-inform-toggle:hover{text-decoration:underline}.c-inform-close{display:inline-flex;align-items:center;justify-content:center;flex:0 0 32px;width:32px;height:32px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--sd-text-secondary);cursor:pointer}.c-inform-close:hover{background:var(--sd-black100, #f3f4f6);color:var(--sd-text)}.c-inform-close sd-icon{width:18px;height:18px;font-size:18px;line-height:18px}button:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}@media(max-width:600px){.c-inform{padding:12px;gap:10px}.c-inform-close{flex-basis:44px;width:44px;height:44px;margin-top:-6px;margin-right:-6px}.c-inform-toggle{min-height:44px}:host ::ng-deep .c-inform-action button{min-height:44px}}\n"], dependencies: [{ kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
168
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdInform, isStandalone: true, selector: "sd-inform", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, primary: { classPropertyName: "primary", publicName: "primary", isSignal: true, isRequired: false, transformFunction: null }, secondary: { classPropertyName: "secondary", publicName: "secondary", isSignal: true, isRequired: false, transformFunction: null }, info: { classPropertyName: "info", publicName: "info", isSignal: true, isRequired: false, transformFunction: null }, success: { classPropertyName: "success", publicName: "success", isSignal: true, isRequired: false, transformFunction: null }, warning: { classPropertyName: "warning", publicName: "warning", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, hideIcon: { classPropertyName: "hideIcon", publicName: "hideIcon", isSignal: true, isRequired: false, transformFunction: null }, fontSet: { classPropertyName: "fontSet", publicName: "fontSet", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, actionLabel: { classPropertyName: "actionLabel", publicName: "actionLabel", isSignal: true, isRequired: false, transformFunction: null }, lineClamp: { classPropertyName: "lineClamp", publicName: "lineClamp", isSignal: true, isRequired: false, transformFunction: null }, autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sdClosed: "sdClosed", sdAction: "sdAction" }, queries: [{ propertyName: "actionSlot", first: true, predicate: SdInformActionDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "bodyRef", first: true, predicate: ["body"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (!dismissed()) {\n @let _effectiveIcon = effectiveIcon();\n @let _fontSet = fontSet();\n <div\n class=\"c-inform\"\n [attr.role]=\"liveRole()\"\n [ngClass]=\"colorClasses()\"\n [attr.data-autoId]=\"autoId() || null\"\n [attr.data-autoid]=\"autoId() || null\">\n @if (_effectiveIcon) {\n <span class=\"c-inform-icon-tile\" aria-hidden=\"true\"\n ><sd-icon\n class=\"c-inform-icon c-material-icon\"\n size=\"20px\"\n aria-hidden=\"true\"\n [fontSet]=\"_fontSet\"\n [name]=\"_effectiveIcon\"></sd-icon\n ></span>\n }\n\n @let _actionLabel = actionLabel();\n <div class=\"c-inform-content\">\n @if (title(); as t) {\n <div class=\"c-inform-title\">{{ t }}</div>\n }\n @if (description(); as d) {\n <div #body class=\"c-inform-body\" [class.is-clamped]=\"clampLines() !== null\" [style.-webkit-line-clamp]=\"clampLines()\">\n {{ d }}\n </div>\n }\n @if (showToggle()) {\n <button type=\"button\" class=\"c-inform-toggle\" (click)=\"toggleExpanded()\">\n {{ (expanded() ? 'core.component.inform.show-less' : 'core.component.inform.show-more') | sdTranslate }}\n </button>\n }\n\n @if (hasActionSlot()) {\n <div class=\"c-inform-action\">\n <ng-content select=\"[sdInformAction]\"></ng-content>\n </div>\n } @else if (_actionLabel) {\n <sd-button\n class=\"c-inform-action c-inform-action-link\"\n size=\"sm\"\n type=\"light\"\n color=\"primary\"\n htmlType=\"button\"\n [title]=\"_actionLabel\"\n (click)=\"onAction($event)\"></sd-button>\n }\n </div>\n\n @if (closable()) {\n <button type=\"button\" class=\"c-inform-close\" [attr.aria-label]=\"'core.common.close' | sdTranslate\" (click)=\"onClose($event)\">\n <sd-icon aria-hidden=\"true\" name=\"close\"></sd-icon>\n </button>\n }\n </div>\n}\n", styles: [":host{display:block;min-width:0}.c-inform{--inform-tone: var(--sd-primary);--inform-soft: var(--sd-primary-light);--inform-ink: var(--sd-primary-dark);display:flex;align-items:flex-start;gap:12px;padding:16px;border-radius:8px;border:1px solid color-mix(in srgb,var(--inform-tone) 22%,var(--sd-surface, #fff));background:color-mix(in srgb,var(--inform-soft) 28%,var(--sd-surface, #fff))}.c-inform.c-primary{--inform-tone: var(--sd-primary);--inform-soft: var(--sd-primary-light);--inform-ink: var(--sd-primary-dark, var(--sd-primary))}.c-inform.c-secondary{--inform-tone: var(--sd-secondary);--inform-soft: var(--sd-secondary-light);--inform-ink: var(--sd-secondary-dark, var(--sd-secondary))}.c-inform.c-info{--inform-tone: var(--sd-info);--inform-soft: var(--sd-info-light);--inform-ink: var(--sd-info-dark, var(--sd-info))}.c-inform.c-success{--inform-tone: var(--sd-success);--inform-soft: var(--sd-success-light);--inform-ink: var(--sd-success-dark, var(--sd-success))}.c-inform.c-warning{--inform-tone: var(--sd-warning);--inform-soft: var(--sd-warning-light);--inform-ink: var(--sd-warning-dark, var(--sd-warning))}.c-inform.c-error{--inform-tone: var(--sd-error);--inform-soft: var(--sd-error-light);--inform-ink: var(--sd-error-dark, var(--sd-error))}.c-inform-icon-tile{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:50%;background:var(--inform-soft);color:var(--inform-ink)}.c-inform-icon{width:20px;height:20px;font-size:20px;line-height:20px}.c-inform-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.c-inform-title{font-size:14px;line-height:20px;font-weight:600;color:var(--sd-text);overflow-wrap:anywhere}.c-inform-body{font-size:14px;line-height:21px;color:var(--sd-text);overflow-wrap:anywhere}.c-inform-body.is-clamped{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}.c-inform-action{margin-top:8px;align-self:flex-start}.c-inform-toggle{align-self:flex-start;margin-top:4px;padding:4px 0;border:0;background:transparent;font:inherit;font-size:14px;color:var(--sd-primary-dark);cursor:pointer}.c-inform-toggle:hover{text-decoration:underline}.c-inform-close{display:inline-flex;align-items:center;justify-content:center;flex:0 0 32px;width:32px;height:32px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--sd-text-secondary);cursor:pointer}.c-inform-close:hover{background:var(--sd-black100, #f3f4f6);color:var(--sd-text)}.c-inform-close sd-icon{width:18px;height:18px;font-size:18px;line-height:18px}button:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}@media(max-width:600px){.c-inform{padding:12px;gap:10px}.c-inform-close{flex-basis:44px;width:44px;height:44px;margin-top:-6px;margin-right:-6px}.c-inform-toggle{min-height:44px}:host ::ng-deep .c-inform-action button{min-height:44px}}\n"], dependencies: [{ kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
169
169
  }
170
170
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdInform, decorators: [{
171
171
  type: Component,
172
- args: [{ selector: 'sd-inform', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [SdButton, SdIcon, CommonModule, SdTranslatePipe], template: "@if (!dismissed()) {\n @let _effectiveIcon = effectiveIcon();\n @let _fontSet = fontSet();\n <div\n class=\"c-inform\"\n [attr.role]=\"liveRole()\"\n [ngClass]=\"colorClasses()\"\n [attr.data-autoId]=\"autoId() || null\"\n [attr.data-autoid]=\"autoId() || null\">\n @if (_effectiveIcon) {\n <span class=\"c-inform-icon-tile\" aria-hidden=\"true\"\n ><sd-icon\n class=\"c-inform-icon c-material-icon\"\n size=\"20px\"\n aria-hidden=\"true\"\n [fontSet]=\"_fontSet\"\n [name]=\"_effectiveIcon\"></sd-icon\n ></span>\n }\n\n @let _actionLabel = actionLabel();\n <div class=\"c-inform-content\">\n @if (title(); as t) {\n <div class=\"c-inform-title\">{{ t }}</div>\n }\n @if (description(); as d) {\n <div #body class=\"c-inform-body\" [class.is-clamped]=\"clampLines() !== null\" [style.-webkit-line-clamp]=\"clampLines()\">\n {{ d }}\n </div>\n }\n @if (showToggle()) {\n <button type=\"button\" class=\"c-inform-toggle\" (click)=\"toggleExpanded()\">\n {{ (expanded() ? 'core.component.inform.show-less' : 'core.component.inform.show-more') | sdTranslate }}\n </button>\n }\n\n @if (hasActionSlot()) {\n <div class=\"c-inform-action\">\n <ng-content select=\"[sdInformAction]\"></ng-content>\n </div>\n } @else if (_actionLabel) {\n <sd-button\n class=\"c-inform-action c-inform-action-link\"\n size=\"sm\"\n type=\"light\"\n color=\"primary\"\n htmlType=\"button\"\n [title]=\"_actionLabel\"\n (click)=\"onAction($event)\"></sd-button>\n }\n </div>\n\n @if (closable()) {\n <button type=\"button\" class=\"c-inform-close\" [attr.aria-label]=\"'core.common.close' | sdTranslate\" (click)=\"onClose($event)\">\n <sd-icon aria-hidden=\"true\" name=\"close\"></sd-icon>\n </button>\n }\n </div>\n}\n", styles: [":host{display:block;min-width:0}.c-inform{--inform-tone: var(--sd-primary);--inform-soft: var(--sd-primary-light);--inform-ink: var(--sd-primary-dark);display:flex;align-items:flex-start;gap:12px;padding:16px;border-radius:8px;border:1px solid color-mix(in srgb,var(--inform-tone) 22%,var(--sd-surface, #fff));background:color-mix(in srgb,var(--inform-soft) 28%,var(--sd-surface, #fff))}.c-inform.c-primary{--inform-tone: var(--sd-primary);--inform-soft: var(--sd-primary-light);--inform-ink: var(--sd-primary-dark, var(--sd-primary))}.c-inform.c-secondary{--inform-tone: var(--sd-secondary);--inform-soft: var(--sd-secondary-light);--inform-ink: var(--sd-secondary-dark, var(--sd-secondary))}.c-inform.c-info{--inform-tone: var(--sd-info);--inform-soft: var(--sd-info-light);--inform-ink: var(--sd-info-dark, var(--sd-info))}.c-inform.c-success{--inform-tone: var(--sd-success);--inform-soft: var(--sd-success-light);--inform-ink: var(--sd-success-dark, var(--sd-success))}.c-inform.c-warning{--inform-tone: var(--sd-warning);--inform-soft: var(--sd-warning-light);--inform-ink: var(--sd-warning-dark, var(--sd-warning))}.c-inform.c-error{--inform-tone: var(--sd-error);--inform-soft: var(--sd-error-light);--inform-ink: var(--sd-error-dark, var(--sd-error))}.c-inform-icon-tile{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:8px;background:var(--inform-soft);color:var(--inform-ink)}.c-inform-icon{width:20px;height:20px;font-size:20px;line-height:20px}.c-inform-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.c-inform-title{font-size:14px;line-height:20px;font-weight:600;color:var(--sd-text);overflow-wrap:anywhere}.c-inform-body{font-size:14px;line-height:21px;color:var(--sd-text);overflow-wrap:anywhere}.c-inform-body.is-clamped{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}.c-inform-action{margin-top:8px;align-self:flex-start}.c-inform-toggle{align-self:flex-start;margin-top:4px;padding:4px 0;border:0;background:transparent;font:inherit;font-size:14px;color:var(--sd-primary-dark);cursor:pointer}.c-inform-toggle:hover{text-decoration:underline}.c-inform-close{display:inline-flex;align-items:center;justify-content:center;flex:0 0 32px;width:32px;height:32px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--sd-text-secondary);cursor:pointer}.c-inform-close:hover{background:var(--sd-black100, #f3f4f6);color:var(--sd-text)}.c-inform-close sd-icon{width:18px;height:18px;font-size:18px;line-height:18px}button:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}@media(max-width:600px){.c-inform{padding:12px;gap:10px}.c-inform-close{flex-basis:44px;width:44px;height:44px;margin-top:-6px;margin-right:-6px}.c-inform-toggle{min-height:44px}:host ::ng-deep .c-inform-action button{min-height:44px}}\n"] }]
172
+ args: [{ selector: 'sd-inform', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [SdButton, SdIcon, CommonModule, SdTranslatePipe], template: "@if (!dismissed()) {\n @let _effectiveIcon = effectiveIcon();\n @let _fontSet = fontSet();\n <div\n class=\"c-inform\"\n [attr.role]=\"liveRole()\"\n [ngClass]=\"colorClasses()\"\n [attr.data-autoId]=\"autoId() || null\"\n [attr.data-autoid]=\"autoId() || null\">\n @if (_effectiveIcon) {\n <span class=\"c-inform-icon-tile\" aria-hidden=\"true\"\n ><sd-icon\n class=\"c-inform-icon c-material-icon\"\n size=\"20px\"\n aria-hidden=\"true\"\n [fontSet]=\"_fontSet\"\n [name]=\"_effectiveIcon\"></sd-icon\n ></span>\n }\n\n @let _actionLabel = actionLabel();\n <div class=\"c-inform-content\">\n @if (title(); as t) {\n <div class=\"c-inform-title\">{{ t }}</div>\n }\n @if (description(); as d) {\n <div #body class=\"c-inform-body\" [class.is-clamped]=\"clampLines() !== null\" [style.-webkit-line-clamp]=\"clampLines()\">\n {{ d }}\n </div>\n }\n @if (showToggle()) {\n <button type=\"button\" class=\"c-inform-toggle\" (click)=\"toggleExpanded()\">\n {{ (expanded() ? 'core.component.inform.show-less' : 'core.component.inform.show-more') | sdTranslate }}\n </button>\n }\n\n @if (hasActionSlot()) {\n <div class=\"c-inform-action\">\n <ng-content select=\"[sdInformAction]\"></ng-content>\n </div>\n } @else if (_actionLabel) {\n <sd-button\n class=\"c-inform-action c-inform-action-link\"\n size=\"sm\"\n type=\"light\"\n color=\"primary\"\n htmlType=\"button\"\n [title]=\"_actionLabel\"\n (click)=\"onAction($event)\"></sd-button>\n }\n </div>\n\n @if (closable()) {\n <button type=\"button\" class=\"c-inform-close\" [attr.aria-label]=\"'core.common.close' | sdTranslate\" (click)=\"onClose($event)\">\n <sd-icon aria-hidden=\"true\" name=\"close\"></sd-icon>\n </button>\n }\n </div>\n}\n", styles: [":host{display:block;min-width:0}.c-inform{--inform-tone: var(--sd-primary);--inform-soft: var(--sd-primary-light);--inform-ink: var(--sd-primary-dark);display:flex;align-items:flex-start;gap:12px;padding:16px;border-radius:8px;border:1px solid color-mix(in srgb,var(--inform-tone) 22%,var(--sd-surface, #fff));background:color-mix(in srgb,var(--inform-soft) 28%,var(--sd-surface, #fff))}.c-inform.c-primary{--inform-tone: var(--sd-primary);--inform-soft: var(--sd-primary-light);--inform-ink: var(--sd-primary-dark, var(--sd-primary))}.c-inform.c-secondary{--inform-tone: var(--sd-secondary);--inform-soft: var(--sd-secondary-light);--inform-ink: var(--sd-secondary-dark, var(--sd-secondary))}.c-inform.c-info{--inform-tone: var(--sd-info);--inform-soft: var(--sd-info-light);--inform-ink: var(--sd-info-dark, var(--sd-info))}.c-inform.c-success{--inform-tone: var(--sd-success);--inform-soft: var(--sd-success-light);--inform-ink: var(--sd-success-dark, var(--sd-success))}.c-inform.c-warning{--inform-tone: var(--sd-warning);--inform-soft: var(--sd-warning-light);--inform-ink: var(--sd-warning-dark, var(--sd-warning))}.c-inform.c-error{--inform-tone: var(--sd-error);--inform-soft: var(--sd-error-light);--inform-ink: var(--sd-error-dark, var(--sd-error))}.c-inform-icon-tile{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:50%;background:var(--inform-soft);color:var(--inform-ink)}.c-inform-icon{width:20px;height:20px;font-size:20px;line-height:20px}.c-inform-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.c-inform-title{font-size:14px;line-height:20px;font-weight:600;color:var(--sd-text);overflow-wrap:anywhere}.c-inform-body{font-size:14px;line-height:21px;color:var(--sd-text);overflow-wrap:anywhere}.c-inform-body.is-clamped{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}.c-inform-action{margin-top:8px;align-self:flex-start}.c-inform-toggle{align-self:flex-start;margin-top:4px;padding:4px 0;border:0;background:transparent;font:inherit;font-size:14px;color:var(--sd-primary-dark);cursor:pointer}.c-inform-toggle:hover{text-decoration:underline}.c-inform-close{display:inline-flex;align-items:center;justify-content:center;flex:0 0 32px;width:32px;height:32px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--sd-text-secondary);cursor:pointer}.c-inform-close:hover{background:var(--sd-black100, #f3f4f6);color:var(--sd-text)}.c-inform-close sd-icon{width:18px;height:18px;font-size:18px;line-height:18px}button:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}@media(max-width:600px){.c-inform{padding:12px;gap:10px}.c-inform-close{flex-basis:44px;width:44px;height:44px;margin-top:-6px;margin-right:-6px}.c-inform-toggle{min-height:44px}:host ::ng-deep .c-inform-action button{min-height:44px}}\n"] }]
173
173
  }], ctorParameters: () => [] });
174
174
 
175
175
  /**
@@ -58,13 +58,13 @@ class SdSection {
58
58
  this.toggleCollapse();
59
59
  };
60
60
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
61
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdSection, isStandalone: true, selector: "sd-section", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subTitle: { classPropertyName: "subTitle", publicName: "subTitle", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconColor: { classPropertyName: "iconColor", publicName: "iconColor", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, hideHeader: { classPropertyName: "hideHeader", publicName: "hideHeader", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsed: "collapsedChange" }, host: { listeners: { "click": "onHeaderClick($event)" } }, ngImport: i0, template: "@let _hideHeader = hideHeader();\n@let _collapsible = collapsible();\n@let _collapsed = collapsed();\n@let _title = title();\n@let _subTitle = subTitle();\n@let _icon = icon();\n@let _iconColor = iconColor();\n<div class=\"sd-section c-shadow-section\">\n @if (!_hideHeader) {\n <div class=\"sd-section-header\" [class.cursor-pointer]=\"_collapsible\">\n <div class=\"sd-section-header-left\">\n <ng-content select=\"[sdHeaderLeft]\">\n @if (_icon) {\n <span\n class=\"mr-8 material-icons-outlined\"\n [class.text-primary]=\"_iconColor === 'primary'\"\n [class.text-secondary]=\"_iconColor === 'secondary'\"\n [class.text-error]=\"_iconColor === 'error'\"\n [class.text-warning]=\"_iconColor === 'warning'\"\n [class.text-success]=\"_iconColor === 'success'\">\n {{ _icon }}\n </span>\n }\n <div class=\"sd-section-title-block\">\n @if (_title) {\n <div class=\"sd-section-title T16M\">{{ _title }}</div>\n }\n @if (_subTitle) {\n <div class=\"sd-section-subtitle T12R text-secondary\">{{ _subTitle }}</div>\n }\n </div>\n </ng-content>\n </div>\n <div class=\"sd-section-header-right\">\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\n @if (_collapsible) {\n <button\n type=\"button\"\n class=\"sd-section-collapse-toggle d-flex align-items-center\"\n [attr.aria-label]=\"\n (_collapsed ? 'core.component.section.expand' : 'core.component.section.collapse') | sdTranslate: { title: _title || '' }\n \"\n [attr.aria-expanded]=\"!_collapsed\"\n [attr.aria-controls]=\"bodyId\"\n (click)=\"onCollapseButtonClick($event)\">\n <sd-icon aria-hidden=\"true\" [name]=\"_collapsed ? 'expand_more' : 'expand_less'\"></sd-icon>\n </button>\n }\n </div>\n </div>\n }\n @if (!_collapsed || _hideHeader) {\n <div class=\"sd-section-body\" [id]=\"bodyId\" [class.sd-section-body--with-header]=\"!_hideHeader\">\n <ng-content></ng-content>\n </div>\n }\n <div class=\"sd-section-footer\">\n <div class=\"sd-section-footer-left\"><ng-content select=\"[sdFooterLeft]\"></ng-content></div>\n <div class=\"sd-section-footer-right\"><ng-content select=\"[sdFooterRight]\"></ng-content></div>\n </div>\n</div>\n", styles: [":host{width:100%;display:block}.sd-section{border-radius:8px;background-color:#fff}.sd-section-header,.sd-section-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;padding:8px 16px}.sd-section-collapse-toggle{padding:0;border:0;background:transparent;color:inherit;cursor:pointer;border-radius:8px}.sd-section-collapse-toggle:focus-visible{outline:2px solid var(--sd-primary, #005cbb);outline-offset:-2px}.sd-section-header-left,.sd-section-header-right,.sd-section-footer-left,.sd-section-footer-right{display:flex;align-items:center;min-width:0}.sd-section-header-left,.sd-section-footer-left{flex:1 1 auto}.sd-section-header-right,.sd-section-footer-right{flex:0 0 auto;justify-content:flex-end;gap:8px}.sd-section-footer-right{margin-left:auto}.sd-section-title-block,.sd-section-title,.sd-section-subtitle{min-width:0}.sd-section-body{padding:0}.sd-section-body--with-header,.sd-section-footer{border-top:1px solid #e6e6e6}.sd-section-footer-left:empty,.sd-section-footer-right:empty{display:none}.sd-section-footer:has(.sd-section-footer-left:empty):has(.sd-section-footer-right:empty){display:none}.c-shadow-section{box-shadow:-1px 0 #f2f2f2 inset,1px 0 #f2f2f2 inset,0 1px #f2f2f2 inset,0 -1px #f2f2f2 inset,0 1px 2px #2f31361a}.cursor-pointer{cursor:pointer}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }] });
61
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdSection, isStandalone: true, selector: "sd-section", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subTitle: { classPropertyName: "subTitle", publicName: "subTitle", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconColor: { classPropertyName: "iconColor", publicName: "iconColor", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, hideHeader: { classPropertyName: "hideHeader", publicName: "hideHeader", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsed: "collapsedChange" }, host: { listeners: { "click": "onHeaderClick($event)" } }, ngImport: i0, template: "@let _hideHeader = hideHeader();\n@let _collapsible = collapsible();\n@let _collapsed = collapsed();\n@let _title = title();\n@let _subTitle = subTitle();\n@let _icon = icon();\n@let _iconColor = iconColor();\n<div class=\"sd-section c-shadow-section\">\n @if (!_hideHeader) {\n <div class=\"sd-section-header\" [class.cursor-pointer]=\"_collapsible\">\n <div class=\"sd-section-header-left\">\n <ng-content select=\"[sdHeaderLeft]\">\n @if (_icon) {\n <span\n class=\"sd-section-header-icon mr-8 material-icons-outlined\"\n [class.text-primary]=\"_iconColor === 'primary'\"\n [class.text-secondary]=\"_iconColor === 'secondary'\"\n [class.text-info]=\"_iconColor === 'info'\"\n [class.text-error]=\"_iconColor === 'error'\"\n [class.text-warning]=\"_iconColor === 'warning'\"\n [class.text-success]=\"_iconColor === 'success'\">\n {{ _icon }}\n </span>\n }\n <div class=\"sd-section-title-block\">\n @if (_title) {\n <div class=\"sd-section-title T16M\">{{ _title }}</div>\n }\n @if (_subTitle) {\n <div class=\"sd-section-subtitle T12R text-secondary\">{{ _subTitle }}</div>\n }\n </div>\n </ng-content>\n </div>\n <div class=\"sd-section-header-right\">\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\n @if (_collapsible) {\n <button\n type=\"button\"\n class=\"sd-section-collapse-toggle d-flex align-items-center\"\n [attr.aria-label]=\"\n (_collapsed ? 'core.component.section.expand' : 'core.component.section.collapse') | sdTranslate: { title: _title || '' }\n \"\n [attr.aria-expanded]=\"!_collapsed\"\n [attr.aria-controls]=\"bodyId\"\n (click)=\"onCollapseButtonClick($event)\">\n <sd-icon aria-hidden=\"true\" [name]=\"_collapsed ? 'expand_more' : 'expand_less'\"></sd-icon>\n </button>\n }\n </div>\n </div>\n }\n @if (!_collapsed || _hideHeader) {\n <div class=\"sd-section-body\" [id]=\"bodyId\" [class.sd-section-body--with-header]=\"!_hideHeader\">\n <ng-content></ng-content>\n </div>\n }\n <div class=\"sd-section-footer\">\n <div class=\"sd-section-footer-left\"><ng-content select=\"[sdFooterLeft]\"></ng-content></div>\n <div class=\"sd-section-footer-right\"><ng-content select=\"[sdFooterRight]\"></ng-content></div>\n </div>\n</div>\n", styles: [":host{width:100%;display:block}.sd-section{border-radius:8px;background-color:#fff}.sd-section-header,.sd-section-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;padding:8px 16px}.sd-section-header-icon{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:50%;font-size:20px;line-height:1;background:var(--sd-primary-light)}.sd-section-header-icon.text-primary{background:var(--sd-primary-light)}.sd-section-header-icon.text-secondary{background:var(--sd-secondary-light)}.sd-section-header-icon.text-info{background:var(--sd-info-light)}.sd-section-header-icon.text-success{background:var(--sd-success-light)}.sd-section-header-icon.text-warning{background:var(--sd-warning-light)}.sd-section-header-icon.text-error{background:var(--sd-error-light)}.sd-section-collapse-toggle{padding:0;border:0;background:transparent;color:inherit;cursor:pointer;border-radius:8px}.sd-section-collapse-toggle:focus-visible{outline:2px solid var(--sd-primary, #005cbb);outline-offset:-2px}.sd-section-header-left,.sd-section-header-right,.sd-section-footer-left,.sd-section-footer-right{display:flex;align-items:center;min-width:0}.sd-section-header-left,.sd-section-footer-left{flex:1 1 auto}.sd-section-header-right,.sd-section-footer-right{flex:0 0 auto;justify-content:flex-end;gap:8px}.sd-section-footer-right{margin-left:auto}.sd-section-title-block,.sd-section-title,.sd-section-subtitle{min-width:0}.sd-section-body{padding:0}.sd-section-body--with-header,.sd-section-footer{border-top:1px solid #e6e6e6}.sd-section-footer-left:empty,.sd-section-footer-right:empty{display:none}.sd-section-footer:has(.sd-section-footer-left:empty):has(.sd-section-footer-right:empty){display:none}.c-shadow-section{box-shadow:-1px 0 #f2f2f2 inset,1px 0 #f2f2f2 inset,0 1px #f2f2f2 inset,0 -1px #f2f2f2 inset,0 1px 2px #2f31361a}.cursor-pointer{cursor:pointer}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }] });
62
62
  }
63
63
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdSection, decorators: [{
64
64
  type: Component,
65
65
  args: [{ selector: 'sd-section', imports: [SdIcon, SdTranslatePipe], host: {
66
66
  '(click)': 'onHeaderClick($event)',
67
- }, template: "@let _hideHeader = hideHeader();\n@let _collapsible = collapsible();\n@let _collapsed = collapsed();\n@let _title = title();\n@let _subTitle = subTitle();\n@let _icon = icon();\n@let _iconColor = iconColor();\n<div class=\"sd-section c-shadow-section\">\n @if (!_hideHeader) {\n <div class=\"sd-section-header\" [class.cursor-pointer]=\"_collapsible\">\n <div class=\"sd-section-header-left\">\n <ng-content select=\"[sdHeaderLeft]\">\n @if (_icon) {\n <span\n class=\"mr-8 material-icons-outlined\"\n [class.text-primary]=\"_iconColor === 'primary'\"\n [class.text-secondary]=\"_iconColor === 'secondary'\"\n [class.text-error]=\"_iconColor === 'error'\"\n [class.text-warning]=\"_iconColor === 'warning'\"\n [class.text-success]=\"_iconColor === 'success'\">\n {{ _icon }}\n </span>\n }\n <div class=\"sd-section-title-block\">\n @if (_title) {\n <div class=\"sd-section-title T16M\">{{ _title }}</div>\n }\n @if (_subTitle) {\n <div class=\"sd-section-subtitle T12R text-secondary\">{{ _subTitle }}</div>\n }\n </div>\n </ng-content>\n </div>\n <div class=\"sd-section-header-right\">\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\n @if (_collapsible) {\n <button\n type=\"button\"\n class=\"sd-section-collapse-toggle d-flex align-items-center\"\n [attr.aria-label]=\"\n (_collapsed ? 'core.component.section.expand' : 'core.component.section.collapse') | sdTranslate: { title: _title || '' }\n \"\n [attr.aria-expanded]=\"!_collapsed\"\n [attr.aria-controls]=\"bodyId\"\n (click)=\"onCollapseButtonClick($event)\">\n <sd-icon aria-hidden=\"true\" [name]=\"_collapsed ? 'expand_more' : 'expand_less'\"></sd-icon>\n </button>\n }\n </div>\n </div>\n }\n @if (!_collapsed || _hideHeader) {\n <div class=\"sd-section-body\" [id]=\"bodyId\" [class.sd-section-body--with-header]=\"!_hideHeader\">\n <ng-content></ng-content>\n </div>\n }\n <div class=\"sd-section-footer\">\n <div class=\"sd-section-footer-left\"><ng-content select=\"[sdFooterLeft]\"></ng-content></div>\n <div class=\"sd-section-footer-right\"><ng-content select=\"[sdFooterRight]\"></ng-content></div>\n </div>\n</div>\n", styles: [":host{width:100%;display:block}.sd-section{border-radius:8px;background-color:#fff}.sd-section-header,.sd-section-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;padding:8px 16px}.sd-section-collapse-toggle{padding:0;border:0;background:transparent;color:inherit;cursor:pointer;border-radius:8px}.sd-section-collapse-toggle:focus-visible{outline:2px solid var(--sd-primary, #005cbb);outline-offset:-2px}.sd-section-header-left,.sd-section-header-right,.sd-section-footer-left,.sd-section-footer-right{display:flex;align-items:center;min-width:0}.sd-section-header-left,.sd-section-footer-left{flex:1 1 auto}.sd-section-header-right,.sd-section-footer-right{flex:0 0 auto;justify-content:flex-end;gap:8px}.sd-section-footer-right{margin-left:auto}.sd-section-title-block,.sd-section-title,.sd-section-subtitle{min-width:0}.sd-section-body{padding:0}.sd-section-body--with-header,.sd-section-footer{border-top:1px solid #e6e6e6}.sd-section-footer-left:empty,.sd-section-footer-right:empty{display:none}.sd-section-footer:has(.sd-section-footer-left:empty):has(.sd-section-footer-right:empty){display:none}.c-shadow-section{box-shadow:-1px 0 #f2f2f2 inset,1px 0 #f2f2f2 inset,0 1px #f2f2f2 inset,0 -1px #f2f2f2 inset,0 1px 2px #2f31361a}.cursor-pointer{cursor:pointer}\n"] }]
67
+ }, template: "@let _hideHeader = hideHeader();\n@let _collapsible = collapsible();\n@let _collapsed = collapsed();\n@let _title = title();\n@let _subTitle = subTitle();\n@let _icon = icon();\n@let _iconColor = iconColor();\n<div class=\"sd-section c-shadow-section\">\n @if (!_hideHeader) {\n <div class=\"sd-section-header\" [class.cursor-pointer]=\"_collapsible\">\n <div class=\"sd-section-header-left\">\n <ng-content select=\"[sdHeaderLeft]\">\n @if (_icon) {\n <span\n class=\"sd-section-header-icon mr-8 material-icons-outlined\"\n [class.text-primary]=\"_iconColor === 'primary'\"\n [class.text-secondary]=\"_iconColor === 'secondary'\"\n [class.text-info]=\"_iconColor === 'info'\"\n [class.text-error]=\"_iconColor === 'error'\"\n [class.text-warning]=\"_iconColor === 'warning'\"\n [class.text-success]=\"_iconColor === 'success'\">\n {{ _icon }}\n </span>\n }\n <div class=\"sd-section-title-block\">\n @if (_title) {\n <div class=\"sd-section-title T16M\">{{ _title }}</div>\n }\n @if (_subTitle) {\n <div class=\"sd-section-subtitle T12R text-secondary\">{{ _subTitle }}</div>\n }\n </div>\n </ng-content>\n </div>\n <div class=\"sd-section-header-right\">\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\n @if (_collapsible) {\n <button\n type=\"button\"\n class=\"sd-section-collapse-toggle d-flex align-items-center\"\n [attr.aria-label]=\"\n (_collapsed ? 'core.component.section.expand' : 'core.component.section.collapse') | sdTranslate: { title: _title || '' }\n \"\n [attr.aria-expanded]=\"!_collapsed\"\n [attr.aria-controls]=\"bodyId\"\n (click)=\"onCollapseButtonClick($event)\">\n <sd-icon aria-hidden=\"true\" [name]=\"_collapsed ? 'expand_more' : 'expand_less'\"></sd-icon>\n </button>\n }\n </div>\n </div>\n }\n @if (!_collapsed || _hideHeader) {\n <div class=\"sd-section-body\" [id]=\"bodyId\" [class.sd-section-body--with-header]=\"!_hideHeader\">\n <ng-content></ng-content>\n </div>\n }\n <div class=\"sd-section-footer\">\n <div class=\"sd-section-footer-left\"><ng-content select=\"[sdFooterLeft]\"></ng-content></div>\n <div class=\"sd-section-footer-right\"><ng-content select=\"[sdFooterRight]\"></ng-content></div>\n </div>\n</div>\n", styles: [":host{width:100%;display:block}.sd-section{border-radius:8px;background-color:#fff}.sd-section-header,.sd-section-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;padding:8px 16px}.sd-section-header-icon{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:50%;font-size:20px;line-height:1;background:var(--sd-primary-light)}.sd-section-header-icon.text-primary{background:var(--sd-primary-light)}.sd-section-header-icon.text-secondary{background:var(--sd-secondary-light)}.sd-section-header-icon.text-info{background:var(--sd-info-light)}.sd-section-header-icon.text-success{background:var(--sd-success-light)}.sd-section-header-icon.text-warning{background:var(--sd-warning-light)}.sd-section-header-icon.text-error{background:var(--sd-error-light)}.sd-section-collapse-toggle{padding:0;border:0;background:transparent;color:inherit;cursor:pointer;border-radius:8px}.sd-section-collapse-toggle:focus-visible{outline:2px solid var(--sd-primary, #005cbb);outline-offset:-2px}.sd-section-header-left,.sd-section-header-right,.sd-section-footer-left,.sd-section-footer-right{display:flex;align-items:center;min-width:0}.sd-section-header-left,.sd-section-footer-left{flex:1 1 auto}.sd-section-header-right,.sd-section-footer-right{flex:0 0 auto;justify-content:flex-end;gap:8px}.sd-section-footer-right{margin-left:auto}.sd-section-title-block,.sd-section-title,.sd-section-subtitle{min-width:0}.sd-section-body{padding:0}.sd-section-body--with-header,.sd-section-footer{border-top:1px solid #e6e6e6}.sd-section-footer-left:empty,.sd-section-footer-right:empty{display:none}.sd-section-footer:has(.sd-section-footer-left:empty):has(.sd-section-footer-right:empty){display:none}.c-shadow-section{box-shadow:-1px 0 #f2f2f2 inset,1px 0 #f2f2f2 inset,0 1px #f2f2f2 inset,0 -1px #f2f2f2 inset,0 1px 2px #2f31361a}.cursor-pointer{cursor:pointer}\n"] }]
68
68
  }], ctorParameters: () => [] });
69
69
 
70
70
  class SdSectionItem {
@@ -1 +1 @@
1
- {"version":3,"file":"sdcorejs-angular-components-section.mjs","sources":["../../../projects/sdcorejs-angular/components/section/src/section.component.ts","../../../projects/sdcorejs-angular/components/section/src/section.component.html","../../../projects/sdcorejs-angular/components/section/src/section-item/section-item.component.ts","../../../projects/sdcorejs-angular/components/section/src/section-item/section-item.component.html","../../../projects/sdcorejs-angular/components/section/sdcorejs-angular-components-section.ts"],"sourcesContent":["import { booleanAttribute, Component, effect, ElementRef, inject, input, model } from '@angular/core';\nimport { Color } from '@sdcorejs/utils/models';\nimport { SdIcon } from '@sdcorejs/angular/modules/icon';\nimport { SdTranslatePipe } from '@sdcorejs/angular/i18n';\n\nconst SECTION_INTERACTIVE_SELECTOR =\n 'a[href], button, input, select, textarea, [role=\"button\"], [role=\"link\"], [contenteditable=\"true\"], [tabindex]';\n\n// why: id tăng dần để nối aria-controls từ header sang body — mỗi instance cần một id duy nhất.\nlet sectionBodyIdSeq = 0;\n\n@Component({\n selector: 'sd-section',\n templateUrl: './section.component.html',\n styleUrl: './section.component.scss',\n imports: [SdIcon, SdTranslatePipe],\n host: {\n '(click)': 'onHeaderClick($event)',\n },\n})\nexport class SdSection {\n #el = inject(ElementRef);\n\n title = input<string | undefined | null>(undefined);\n subTitle = input<string | undefined | null>(undefined);\n icon = input<string | undefined | null>(undefined);\n iconColor = input<Color>('primary', { alias: 'iconColor' });\n\n collapsed = model<boolean>(false, { alias: 'collapsed' });\n collapsible = input(false, { transform: booleanAttribute });\n\n hideHeader = input(false, { transform: booleanAttribute });\n\n /** Id của vùng body, để header `aria-controls` trỏ tới khi section collapsible. */\n readonly bodyId = `sd-section-body-${++sectionBodyIdSeq}`;\n\n constructor() {\n effect(() => {\n if (this.title()) {\n this.#el.nativeElement.removeAttribute('title');\n }\n });\n }\n\n toggleCollapse = () => {\n if (this.collapsible()) {\n this.collapsed.set(!this.collapsed());\n } else {\n if (this.collapsed()) {\n this.collapsed.set(false);\n }\n }\n };\n\n protected onHeaderClick = (event: MouseEvent): void => {\n const target = event.target;\n if (!(target instanceof Element)) return;\n\n const header = target.closest('.sd-section-header');\n if (!header || header.closest('sd-section') !== this.#el.nativeElement) return;\n if (target.closest(SECTION_INTERACTIVE_SELECTOR)) return;\n\n this.toggleCollapse();\n };\n\n protected onCollapseButtonClick = (event: MouseEvent): void => {\n event.stopPropagation();\n this.toggleCollapse();\n };\n\n // why: giữ public handler cũ để không làm thay đổi declaration API của component.\n onHeaderKeydown = (event: KeyboardEvent) => {\n if (event.target !== event.currentTarget) return;\n // why: chặn Space cuộn trang trước khi toggle.\n event.preventDefault();\n this.toggleCollapse();\n };\n}\n","@let _hideHeader = hideHeader();\n@let _collapsible = collapsible();\n@let _collapsed = collapsed();\n@let _title = title();\n@let _subTitle = subTitle();\n@let _icon = icon();\n@let _iconColor = iconColor();\n<div class=\"sd-section c-shadow-section\">\n @if (!_hideHeader) {\n <div class=\"sd-section-header\" [class.cursor-pointer]=\"_collapsible\">\n <div class=\"sd-section-header-left\">\n <ng-content select=\"[sdHeaderLeft]\">\n @if (_icon) {\n <span\n class=\"mr-8 material-icons-outlined\"\n [class.text-primary]=\"_iconColor === 'primary'\"\n [class.text-secondary]=\"_iconColor === 'secondary'\"\n [class.text-error]=\"_iconColor === 'error'\"\n [class.text-warning]=\"_iconColor === 'warning'\"\n [class.text-success]=\"_iconColor === 'success'\">\n {{ _icon }}\n </span>\n }\n <div class=\"sd-section-title-block\">\n @if (_title) {\n <div class=\"sd-section-title T16M\">{{ _title }}</div>\n }\n @if (_subTitle) {\n <div class=\"sd-section-subtitle T12R text-secondary\">{{ _subTitle }}</div>\n }\n </div>\n </ng-content>\n </div>\n <div class=\"sd-section-header-right\">\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\n @if (_collapsible) {\n <button\n type=\"button\"\n class=\"sd-section-collapse-toggle d-flex align-items-center\"\n [attr.aria-label]=\"\n (_collapsed ? 'core.component.section.expand' : 'core.component.section.collapse') | sdTranslate: { title: _title || '' }\n \"\n [attr.aria-expanded]=\"!_collapsed\"\n [attr.aria-controls]=\"bodyId\"\n (click)=\"onCollapseButtonClick($event)\">\n <sd-icon aria-hidden=\"true\" [name]=\"_collapsed ? 'expand_more' : 'expand_less'\"></sd-icon>\n </button>\n }\n </div>\n </div>\n }\n @if (!_collapsed || _hideHeader) {\n <div class=\"sd-section-body\" [id]=\"bodyId\" [class.sd-section-body--with-header]=\"!_hideHeader\">\n <ng-content></ng-content>\n </div>\n }\n <div class=\"sd-section-footer\">\n <div class=\"sd-section-footer-left\"><ng-content select=\"[sdFooterLeft]\"></ng-content></div>\n <div class=\"sd-section-footer-right\"><ng-content select=\"[sdFooterRight]\"></ng-content></div>\n </div>\n</div>\n","import { Component, input } from '@angular/core';\n\n@Component({\n selector: 'sd-section-item',\n templateUrl: './section-item.component.html',\n styleUrl: 'section-item.component.scss',\n standalone: true,\n})\nexport class SdSectionItem {\n label = input.required<string>();\n labelWidth = input<string, string | null | undefined>('150px', {\n transform: (val: any): string => {\n return val || '150px';\n },\n });\n}\n","<div class=\"c-item\">\n <div class=\"c-item-label T14R text-secondary\" [style.width]=\"labelWidth()\">{{ label() }}</div>\n <div class=\"c-item-content\"><ng-content></ng-content></div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAKA,MAAM,4BAA4B,GAChC,gHAAgH;AAElH;AACA,IAAI,gBAAgB,GAAG,CAAC;MAWX,SAAS,CAAA;AACpB,IAAA,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC;AAExB,IAAA,KAAK,GAAG,KAAK,CAA4B,SAAS,CAAC;AACnD,IAAA,QAAQ,GAAG,KAAK,CAA4B,SAAS,CAAC;AACtD,IAAA,IAAI,GAAG,KAAK,CAA4B,SAAS,CAAC;IAClD,SAAS,GAAG,KAAK,CAAQ,SAAS,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;IAE3D,SAAS,GAAG,KAAK,CAAU,KAAK,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;IACzD,WA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,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAb,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,aAAa,qVCR1B,yMAIA,EAAA,MAAA,EAAA,CAAA,iMAAA,CAAA,EAAA,CAAA;;4FDIa,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,cAGf,IAAI,EAAA,QAAA,EAAA,yMAAA,EAAA,MAAA,EAAA,CAAA,iMAAA,CAAA,EAAA;;;AENlB;;AAEG;;;;"}
1
+ {"version":3,"file":"sdcorejs-angular-components-section.mjs","sources":["../../../projects/sdcorejs-angular/components/section/src/section.component.ts","../../../projects/sdcorejs-angular/components/section/src/section.component.html","../../../projects/sdcorejs-angular/components/section/src/section-item/section-item.component.ts","../../../projects/sdcorejs-angular/components/section/src/section-item/section-item.component.html","../../../projects/sdcorejs-angular/components/section/sdcorejs-angular-components-section.ts"],"sourcesContent":["import { booleanAttribute, Component, effect, ElementRef, inject, input, model } from '@angular/core';\nimport { Color } from '@sdcorejs/utils/models';\nimport { SdIcon } from '@sdcorejs/angular/modules/icon';\nimport { SdTranslatePipe } from '@sdcorejs/angular/i18n';\n\nconst SECTION_INTERACTIVE_SELECTOR =\n 'a[href], button, input, select, textarea, [role=\"button\"], [role=\"link\"], [contenteditable=\"true\"], [tabindex]';\n\n// why: id tăng dần để nối aria-controls từ header sang body — mỗi instance cần một id duy nhất.\nlet sectionBodyIdSeq = 0;\n\n@Component({\n selector: 'sd-section',\n templateUrl: './section.component.html',\n styleUrl: './section.component.scss',\n imports: [SdIcon, SdTranslatePipe],\n host: {\n '(click)': 'onHeaderClick($event)',\n },\n})\nexport class SdSection {\n #el = inject(ElementRef);\n\n title = input<string | undefined | null>(undefined);\n subTitle = input<string | undefined | null>(undefined);\n icon = input<string | undefined | null>(undefined);\n iconColor = input<Color>('primary', { alias: 'iconColor' });\n\n collapsed = model<boolean>(false, { alias: 'collapsed' });\n collapsible = input(false, { transform: booleanAttribute });\n\n hideHeader = input(false, { transform: booleanAttribute });\n\n /** Id của vùng body, để header `aria-controls` trỏ tới khi section collapsible. */\n readonly bodyId = `sd-section-body-${++sectionBodyIdSeq}`;\n\n constructor() {\n effect(() => {\n if (this.title()) {\n this.#el.nativeElement.removeAttribute('title');\n }\n });\n }\n\n toggleCollapse = () => {\n if (this.collapsible()) {\n this.collapsed.set(!this.collapsed());\n } else {\n if (this.collapsed()) {\n this.collapsed.set(false);\n }\n }\n };\n\n protected onHeaderClick = (event: MouseEvent): void => {\n const target = event.target;\n if (!(target instanceof Element)) return;\n\n const header = target.closest('.sd-section-header');\n if (!header || header.closest('sd-section') !== this.#el.nativeElement) return;\n if (target.closest(SECTION_INTERACTIVE_SELECTOR)) return;\n\n this.toggleCollapse();\n };\n\n protected onCollapseButtonClick = (event: MouseEvent): void => {\n event.stopPropagation();\n this.toggleCollapse();\n };\n\n // why: giữ public handler cũ để không làm thay đổi declaration API của component.\n onHeaderKeydown = (event: KeyboardEvent) => {\n if (event.target !== event.currentTarget) return;\n // why: chặn Space cuộn trang trước khi toggle.\n event.preventDefault();\n this.toggleCollapse();\n };\n}\n","@let _hideHeader = hideHeader();\n@let _collapsible = collapsible();\n@let _collapsed = collapsed();\n@let _title = title();\n@let _subTitle = subTitle();\n@let _icon = icon();\n@let _iconColor = iconColor();\n<div class=\"sd-section c-shadow-section\">\n @if (!_hideHeader) {\n <div class=\"sd-section-header\" [class.cursor-pointer]=\"_collapsible\">\n <div class=\"sd-section-header-left\">\n <ng-content select=\"[sdHeaderLeft]\">\n @if (_icon) {\n <span\n class=\"sd-section-header-icon mr-8 material-icons-outlined\"\n [class.text-primary]=\"_iconColor === 'primary'\"\n [class.text-secondary]=\"_iconColor === 'secondary'\"\n [class.text-info]=\"_iconColor === 'info'\"\n [class.text-error]=\"_iconColor === 'error'\"\n [class.text-warning]=\"_iconColor === 'warning'\"\n [class.text-success]=\"_iconColor === 'success'\">\n {{ _icon }}\n </span>\n }\n <div class=\"sd-section-title-block\">\n @if (_title) {\n <div class=\"sd-section-title T16M\">{{ _title }}</div>\n }\n @if (_subTitle) {\n <div class=\"sd-section-subtitle T12R text-secondary\">{{ _subTitle }}</div>\n }\n </div>\n </ng-content>\n </div>\n <div class=\"sd-section-header-right\">\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\n @if (_collapsible) {\n <button\n type=\"button\"\n class=\"sd-section-collapse-toggle d-flex align-items-center\"\n [attr.aria-label]=\"\n (_collapsed ? 'core.component.section.expand' : 'core.component.section.collapse') | sdTranslate: { title: _title || '' }\n \"\n [attr.aria-expanded]=\"!_collapsed\"\n [attr.aria-controls]=\"bodyId\"\n (click)=\"onCollapseButtonClick($event)\">\n <sd-icon aria-hidden=\"true\" [name]=\"_collapsed ? 'expand_more' : 'expand_less'\"></sd-icon>\n </button>\n }\n </div>\n </div>\n }\n @if (!_collapsed || _hideHeader) {\n <div class=\"sd-section-body\" [id]=\"bodyId\" [class.sd-section-body--with-header]=\"!_hideHeader\">\n <ng-content></ng-content>\n </div>\n }\n <div class=\"sd-section-footer\">\n <div class=\"sd-section-footer-left\"><ng-content select=\"[sdFooterLeft]\"></ng-content></div>\n <div class=\"sd-section-footer-right\"><ng-content select=\"[sdFooterRight]\"></ng-content></div>\n </div>\n</div>\n","import { Component, input } from '@angular/core';\n\n@Component({\n selector: 'sd-section-item',\n templateUrl: './section-item.component.html',\n styleUrl: 'section-item.component.scss',\n standalone: true,\n})\nexport class SdSectionItem {\n label = input.required<string>();\n labelWidth = input<string, string | null | undefined>('150px', {\n transform: (val: any): string => {\n return val || '150px';\n },\n });\n}\n","<div class=\"c-item\">\n <div class=\"c-item-label T14R text-secondary\" [style.width]=\"labelWidth()\">{{ label() }}</div>\n <div class=\"c-item-content\"><ng-content></ng-content></div>\n</div>\n","/**\n * Generated bundle index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