@sixbell-telco/sdk 4.4.0 → 4.6.0
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.
- package/CHANGELOG.md +272 -985
- package/GLOSSARY.md +76 -0
- package/README.md +143 -1346
- package/banner.webp +0 -0
- package/components/badge/src/badge.component.d.ts +6 -1
- package/components/dropdown-menu/README.md +1 -0
- package/components/dropdown-menu/bar/dropdown-menu-bar/dropdown-menu-bar.component.d.ts +2 -0
- package/components/dropdown-menu/bar/dropdown-menu-bar-sub-trigger/dropdown-menu-bar-sub-trigger.component.d.ts +9 -2
- package/components/dropdown-menu/bar/dropdown-menu-bar-trigger/dropdown-menu-bar-trigger.component.d.ts +6 -0
- package/components/dropdown-menu/context/dropdown-context-menu-trigger/dropdown-context-menu-trigger.component.d.ts +7 -0
- package/components/dropdown-menu/public-api.d.ts +1 -0
- package/components/dropdown-menu/src/directives/dropdown-menu-keyboard.directive.d.ts +54 -0
- package/components/dropdown-menu/src/dropdown-menu-sub-trigger/dropdown-menu-sub-trigger.component.d.ts +5 -0
- package/components/dropdown-menu/src/dropdown-menu-trigger/dropdown-menu-trigger.component.d.ts +15 -2
- package/components/forms/checkbox/src/checkbox.component.d.ts +12 -1
- package/components/status-illustration/README.md +38 -0
- package/components/status-illustration/index.d.ts +5 -0
- package/components/status-illustration/public-api.d.ts +1 -0
- package/components/status-illustration/src/status-illustration.component.d.ts +42 -0
- package/components/tab/directives/tab-content/tab-content.directive.d.ts +1 -1
- package/components/tree/README.md +11 -1
- package/components/tree/src/tree.component.d.ts +44 -5
- package/components/wizard/README.md +17 -0
- package/components/wizard/services/wizard.service.d.ts +9 -0
- package/components/wizard/wizard-indicator/wizard-indicator.component.d.ts +71 -0
- package/components/wizard/wizard-wrapper/wizard-wrapper.component.d.ts +24 -1
- package/directives/text/src/text.directive.d.ts +6 -2
- package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs +5 -5
- package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-badge.mjs +8 -2
- package/fesm2022/sixbell-telco-sdk-components-badge.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-button.mjs +1 -1
- package/fesm2022/sixbell-telco-sdk-components-button.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-card.mjs +3 -3
- package/fesm2022/sixbell-telco-sdk-components-card.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-data-table.mjs +4 -4
- package/fesm2022/sixbell-telco-sdk-components-data-table.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dialog.mjs +3 -3
- package/fesm2022/sixbell-telco-sdk-components-dialog.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs +92 -25
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-context.mjs +29 -3
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-context.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs +271 -21
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs +14 -3
- package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs +15 -5
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-paginator.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-paginator.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-product-card.mjs +1 -1
- package/fesm2022/sixbell-telco-sdk-components-product-card.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-segmented-button.mjs +1 -1
- package/fesm2022/sixbell-telco-sdk-components-segmented-button.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-sonner-toaster.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-sonner-toaster.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-sonner.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-sonner.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-status-illustration.mjs +66 -0
- package/fesm2022/sixbell-telco-sdk-components-status-illustration.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-tab.mjs +1 -0
- package/fesm2022/sixbell-telco-sdk-components-tab.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-table.mjs +4 -4
- package/fesm2022/sixbell-telco-sdk-components-table.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tree.mjs +171 -51
- package/fesm2022/sixbell-telco-sdk-components-tree.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-wizard.mjs +123 -356
- package/fesm2022/sixbell-telco-sdk-components-wizard.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-directives-text.mjs +4 -1
- package/fesm2022/sixbell-telco-sdk-directives-text.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-directives-truncate.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-directives-truncate.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-layouts.mjs +61 -17
- package/fesm2022/sixbell-telco-sdk-layouts.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-theme.mjs +23 -4
- package/fesm2022/sixbell-telco-sdk-utils-theme.mjs.map +1 -1
- package/i18n/sdk/en.json +4 -1
- package/i18n/sdk/es.json +4 -1
- package/i18n/sdk/pt.json +4 -1
- package/layouts/README.md +24 -6
- package/layouts/public-api.d.ts +1 -1
- package/layouts/src/layout-account.d.ts +16 -0
- package/layouts/src/page-banner/page-banner.component.d.ts +37 -6
- package/layouts/src/user-menu/user-menu.component.d.ts +4 -2
- package/manifest.json +10943 -0
- package/package.json +50 -38
- package/schematics/lib/plan.cjs +179 -0
- package/schematics/lib/tokens.cjs +133 -0
- package/schematics/lib/workspace.cjs +118 -0
- package/schematics/manual-steps.json +90 -0
- package/schematics/migration.json +15 -0
- package/schematics/migrations/v4-0-0/assets.cjs +331 -0
- package/schematics/migrations/v4-0-0/canonical/enghouse_networks.json +360 -0
- package/schematics/migrations/v4-0-0/canonical/shell.json +25 -0
- package/schematics/migrations/v4-0-0/canonical/theme-assets.json +44 -0
- package/schematics/migrations/v4-0-0/canonical/themes.json +11 -0
- package/schematics/migrations/v4-0-0/index.cjs +96 -0
- package/schematics/migrations/v4-0-0/layout.cjs +269 -0
- package/schematics/migrations/v4-0-0/shell.cjs +1864 -0
- package/schematics/migrations/v4-6-0/index.cjs +394 -0
- package/src/_index.css +257 -26
- package/utils/theme/README.md +1 -1
- package/utils/theme/public-api.d.ts +1 -1
- package/utils/theme/src/models/theme.d.ts +10 -0
- package/utils/theme/src/theme-assets/theme-assets.service.d.ts +12 -1
- package/banner.png +0 -0
- package/components/wizard/wizard-marker/wizard-marker.component.d.ts +0 -85
- package/components/wizard/wizard-step/wizard-step.component.d.ts +0 -83
- package/components/wizard/wizard-sub-step/wizard-sub-step.component.d.ts +0 -95
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NgTemplateOutlet } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, computed, InjectionToken, signal, Injectable, model, ChangeDetectionStrategy, Component, input, booleanAttribute, output, viewChild, ElementRef, afterRenderEffect, Injector, effect, untracked, afterNextRender, TemplateRef, Directive, contentChild } from '@angular/core';
|
|
3
|
+
import { inject, computed, InjectionToken, signal, Injectable, model, ChangeDetectionStrategy, Component, input, booleanAttribute, output, viewChild, ElementRef, afterRenderEffect, Injector, effect, untracked, afterNextRender, TemplateRef, Directive, contentChild, isDevMode } from '@angular/core';
|
|
4
4
|
import { RouterLink, Router, NavigationEnd } from '@angular/router';
|
|
5
5
|
import { ButtonComponent } from '@sixbell-telco/sdk/components/button';
|
|
6
6
|
import { matCheckOutline, matDarkModeOutline, matLightModeOutline, matComputerOutline, matColorLensOutline, matPersonOutline, matPasswordOutline, matLogoutOutline, matLanguageOutline, matDashboardCustomizeOutline, matFolderOutline, matSearchOutline, matMenuOpenOutline, matMenuOutline } from '@sixbell-telco/sdk/components/icon/material/outline';
|
|
@@ -146,8 +146,8 @@ const SCHEME_ICONS = {
|
|
|
146
146
|
dark: matDarkModeOutline,
|
|
147
147
|
};
|
|
148
148
|
/**
|
|
149
|
-
* Account menu of the SDK layouts: the user's avatar opens account actions (change password,
|
|
150
|
-
* and preferences (language, color scheme, theme, layout). The account comes from `provideLayoutAccount`.
|
|
149
|
+
* Account menu of the SDK layouts: the user's avatar opens account actions (change password, app-defined
|
|
150
|
+
* `actions`, logout) and preferences (language, color scheme, theme, layout). The account comes from `provideLayoutAccount`.
|
|
151
151
|
*/
|
|
152
152
|
class UserMenuComponent {
|
|
153
153
|
account = inject(LAYOUT_ACCOUNT);
|
|
@@ -179,6 +179,8 @@ class UserMenuComponent {
|
|
|
179
179
|
returnFocusTo = null;
|
|
180
180
|
user = this.account.user;
|
|
181
181
|
canChangePassword = !!this.account.changePassword;
|
|
182
|
+
accountActions = computed(() => this.account.actions?.() ?? []);
|
|
183
|
+
hasAccountOptions = computed(() => this.canChangePassword || this.accountActions().length > 0);
|
|
182
184
|
compact = computed(() => this.variant() === 'sidebar' && this.collapsed());
|
|
183
185
|
triggerLabel = computed(() => {
|
|
184
186
|
this.i18n();
|
|
@@ -297,7 +299,7 @@ class UserMenuComponent {
|
|
|
297
299
|
this.account.logout();
|
|
298
300
|
}
|
|
299
301
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: UserMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
300
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: UserMenuComponent, isStandalone: true, selector: "st-user-menu", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, showLanguageSelector: { classPropertyName: "showLanguageSelector", publicName: "showLanguageSelector", isSignal: true, isRequired: false, transformFunction: null }, showSchemeSelector: { classPropertyName: "showSchemeSelector", publicName: "showSchemeSelector", isSignal: true, isRequired: false, transformFunction: null }, showThemeSelector: { classPropertyName: "showThemeSelector", publicName: "showThemeSelector", isSignal: true, isRequired: false, transformFunction: null }, showLayoutSelector: { classPropertyName: "showLayoutSelector", publicName: "showLayoutSelector", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openLayoutSwitcher: "openLayoutSwitcher", openChange: "openChange" }, host: { listeners: { "document:keydown.enter": "preventSubmenuEnter($event)" }, properties: { "class": "hostClass()" } }, viewQueries: [{ propertyName: "backButton", first: true, predicate: ["backButton"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "optionsView", first: true, predicate: ["optionsView"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "@let sidebar = variant() === 'sidebar';\n<st-dropdown [class]=\"sidebar ? 'block w-full' : 'inline-block'\" (openChange)=\"handleOpenChange($event)\">\n\t<st-dropdown-trigger\n\t\t[class]=\"sidebar ? 'block w-full *:w-full' : ''\"\n\t\toriginX=\"end\"\n\t\toriginY=\"bottom\"\n\t\t[overlayX]=\"sidebar ? 'start' : 'end'\"\n\t\t[overlayY]=\"sidebar ? 'bottom' : 'top'\"\n\t>\n\t\t<st-button variant=\"base\" [ghost]=\"true\" [block]=\"sidebar && !compact()\" [class]=\"triggerClass()\" data-st-user-menu-trigger>\n\t\t\t<span class=\"sr-only\">{{ triggerLabel() }}</span>\n\t\t\t@if (user(); as currentUser) {\n\t\t\t\t<st-avatar\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclass=\"[&_span]:text-nowrap\"\n\t\t\t\t\t[class.p-1]=\"sidebar\"\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t[shape]=\"sidebar ? 'square' : 'rounded'\"\n\t\t\t\t\t[ring]=\"sidebar\"\n\t\t\t\t\t[user]=\"currentUser\"\n\t\t\t\t\t[showNameAndRole]=\"!compact()\"\n\t\t\t\t/>\n\t\t\t} @else {\n\t\t\t\t<st-icon [icon]=\"icons.person\" />\n\t\t\t}\n\t\t\t@if (sidebar && !compact()) {\n\t\t\t\t<st-dropdown-chevron aria-hidden=\"true\" position=\"right\" size=\"auto\" />\n\t\t\t}\n\t\t</st-button>\n\t</st-dropdown-trigger>\n\t<st-dropdown-content class=\"min-w-64\">\n\t\t@if (submenu(); as menu) {\n\t\t\t<div class=\"animate-morph-in\" [attr.data-st-user-menu-view]=\"view()\">\n\t\t\t\t<div class=\"inline-flex items-center gap-2 py-1.5 ps-2\">\n\t\t\t\t\t<st-button\n\t\t\t\t\t\t#backButton\n\t\t\t\t\t\tclass=\"*:text-sm\"\n\t\t\t\t\t\tvariant=\"base\"\n\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t[ghost]=\"true\"\n\t\t\t\t\t\t[circle]=\"true\"\n\t\t\t\t\t\t[icon]=\"icons.back\"\n\t\t\t\t\t\t(triggered)=\"show('options')\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"sr-only\">{{ 'sdk.layout.back' | translate }}</span>\n\t\t\t\t\t</st-button>\n\t\t\t\t\t<span stText=\"7\" stTextWeight=\"medium\">{{ menu.titleKey | translate }}</span>\n\t\t\t\t</div>\n\t\t\t\t<st-dropdown-separator />\n\t\t\t\t@for (choice of menu.choices; track choice.value) {\n\t\t\t\t\t<st-dropdown-item-radio\n\t\t\t\t\t\t[value]=\"choice.value\"\n\t\t\t\t\t\t[checked]=\"menu.current === choice.value\"\n\t\t\t\t\t\t[closeOnSelect]=\"false\"\n\t\t\t\t\t\t[attr.data-st-user-menu-choice]=\"choice.value\"\n\t\t\t\t\t\t(checkedChanged)=\"menu.select($event)\"\n\t\t\t\t\t>\n\t\t\t\t\t\t@if (view() === 'scheme') {\n\t\t\t\t\t\t\t<div class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<st-icon [icon]=\"schemeIcon(choice.value)\" />\n\t\t\t\t\t\t\t\t<span>{{ choice.label }}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t<span>{{ choice.label }}</span>\n\t\t\t\t\t\t}\n\t\t\t\t\t</st-dropdown-item-radio>\n\t\t\t\t}\n\t\t\t</div>\n\t\t} @else {\n\t\t\t<div #optionsView class=\"animate-morph-in\" data-st-user-menu-view=\"options\">\n\t\t\t\t@if (canChangePassword) {\n\t\t\t\t\t<st-dropdown-label>{{ 'sdk.layout.account' | translate }}</st-dropdown-label>\n\t\t\t\t\t<st-dropdown-item data-st-user-menu-option=\"change-password\" (selected)=\"changePassword()\">\n\t\t\t\t\t\t<div class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t\t<st-icon [icon]=\"icons.password\" />\n\t\t\t\t\t\t\t<span>{{ 'sdk.layout.change_password' | translate }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</st-dropdown-item>\n\t\t\t\t\t<st-dropdown-separator />\n\t\t\t\t}\n\t\t\t\t@if (hasPreferences()) {\n\t\t\t\t\t<st-dropdown-label>{{ 'sdk.layout.preferences' | translate }}</st-dropdown-label>\n\t\t\t\t\t@if (hasLanguageSelector()) {\n\t\t\t\t\t\t<st-dropdown-item data-st-user-menu-option=\"language\" [closeOnSelect]=\"false\" (selected)=\"show('language')\">\n\t\t\t\t\t\t\t<div class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<st-icon [icon]=\"icons.language\" />\n\t\t\t\t\t\t\t\t<span>{{ 'sdk.layout.language' | translate }}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</st-dropdown-item>\n\t\t\t\t\t}\n\t\t\t\t\t@if (hasSchemeSelector()) {\n\t\t\t\t\t\t<st-dropdown-item data-st-user-menu-option=\"scheme\" [closeOnSelect]=\"false\" (selected)=\"show('scheme')\">\n\t\t\t\t\t\t\t<div class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<st-icon [icon]=\"schemeIcon(currentScheme())\" />\n\t\t\t\t\t\t\t\t<span>{{ 'sdk.layout.scheme' | translate }}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</st-dropdown-item>\n\t\t\t\t\t}\n\t\t\t\t\t@if (hasThemeSelector()) {\n\t\t\t\t\t\t<st-dropdown-item data-st-user-menu-option=\"theme\" [closeOnSelect]=\"false\" (selected)=\"show('theme')\">\n\t\t\t\t\t\t\t<div class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<st-icon [icon]=\"icons.theme\" />\n\t\t\t\t\t\t\t\t<span>{{ 'sdk.layout.theme' | translate }}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</st-dropdown-item>\n\t\t\t\t\t}\n\t\t\t\t\t@if (hasLayoutSelector()) {\n\t\t\t\t\t\t<st-dropdown-item data-st-user-menu-option=\"layout\" (selected)=\"openLayoutSwitcher.emit()\">\n\t\t\t\t\t\t\t<div class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<st-icon [icon]=\"icons.layout\" />\n\t\t\t\t\t\t\t\t<span>{{ 'sdk.layout.layout' | translate }}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</st-dropdown-item>\n\t\t\t\t\t}\n\t\t\t\t\t<st-dropdown-separator />\n\t\t\t\t}\n\t\t\t\t<st-dropdown-item class=\"text-error\" data-st-user-menu-option=\"logout\" (selected)=\"logout()\">\n\t\t\t\t\t<div class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t<st-icon [icon]=\"icons.logout\" />\n\t\t\t\t\t\t<span>{{ 'sdk.layout.logout' | translate }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</st-dropdown-item>\n\t\t\t</div>\n\t\t}\n\t</st-dropdown-content>\n</st-dropdown>\n", dependencies: [{ kind: "component", type: AvatarComponent, selector: "st-avatar", inputs: ["variant", "shape", "size", "ring", "presence", "user", "image", "showNameAndRole"] }, { kind: "component", type: ButtonComponent, selector: "st-button", inputs: ["variant", "ghost", "outline", "link", "soft", "dash", "wide", "circle", "square", "glass", "block", "loader", "size", "shadow", "focusable", "icon", "iconPosition", "type", "disabled", "stopPropagation", "ariaLabel", "ariaExpanded", "ariaPressed", "ariaDescribedBy", "ariaControls"], outputs: ["clicked", "pointerDown", "keyDownEnter", "keyDownSpace", "triggered"] }, { kind: "component", type: DropdownComponent, selector: "st-dropdown", inputs: ["open"], outputs: ["openChange", "opened", "closed"], exportAs: ["stDropdown"] }, { kind: "component", type: DropdownTriggerComponent, selector: "st-dropdown-trigger", inputs: ["offsetX", "offsetY", "originX", "originY", "overlayX", "overlayY", "fallbacks", "stopPropagation", "triggerTabIndex"], outputs: ["opened", "closed", "clicked", "pointerDown", "keyDownEnter", "keyDownSpace", "triggered"] }, { kind: "component", type: DropdownContentComponent, selector: "st-dropdown-content", inputs: ["class", "size", "shadow"], outputs: ["closeRequested"], exportAs: ["dropdownContent"] }, { kind: "component", type: DropdownItemComponent, selector: "st-dropdown-item", inputs: ["active", "class", "disabled", "closeOnSelect", "stopPropagation"], outputs: ["selected", "clicked", "keyDownEnter", "keyDownSpace", "triggered"] }, { kind: "component", type: DropdownItemRadioComponent, selector: "st-dropdown-item-radio", inputs: ["checked", "value", "disabled", "indicator", "showIndicator", "class", "closeOnSelect", "stopPropagation"], outputs: ["checkedChanged", "triggered", "clicked", "keyDownEnter", "keyDownSpace"] }, { kind: "component", type: DropdownLabelComponent, selector: "st-dropdown-label", inputs: ["class"] }, { kind: "component", type: DropdownSeparatorComponent, selector: "st-dropdown-separator" }, { kind: "component", type: DropdownChevronComponent, selector: "st-dropdown-chevron", inputs: ["icon", "class", "size", "color", "position"] }, { kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon", "ariaLabel"] }, { kind: "directive", type: TextDirective, selector: "[stText]", inputs: ["stText", "stTextWeight", "stTextColor", "stTextOverflow", "stTextLineClamp", "stTextClass"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
302
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: UserMenuComponent, isStandalone: true, selector: "st-user-menu", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, showLanguageSelector: { classPropertyName: "showLanguageSelector", publicName: "showLanguageSelector", isSignal: true, isRequired: false, transformFunction: null }, showSchemeSelector: { classPropertyName: "showSchemeSelector", publicName: "showSchemeSelector", isSignal: true, isRequired: false, transformFunction: null }, showThemeSelector: { classPropertyName: "showThemeSelector", publicName: "showThemeSelector", isSignal: true, isRequired: false, transformFunction: null }, showLayoutSelector: { classPropertyName: "showLayoutSelector", publicName: "showLayoutSelector", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openLayoutSwitcher: "openLayoutSwitcher", openChange: "openChange" }, host: { listeners: { "document:keydown.enter": "preventSubmenuEnter($event)" }, properties: { "class": "hostClass()" } }, viewQueries: [{ propertyName: "backButton", first: true, predicate: ["backButton"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "optionsView", first: true, predicate: ["optionsView"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "@let sidebar = variant() === 'sidebar';\n<st-dropdown [class]=\"sidebar ? 'block w-full' : 'inline-block'\" (openChange)=\"handleOpenChange($event)\">\n\t<st-dropdown-trigger\n\t\t[class]=\"sidebar ? 'block w-full *:w-full' : ''\"\n\t\toriginX=\"end\"\n\t\toriginY=\"bottom\"\n\t\t[overlayX]=\"sidebar ? 'start' : 'end'\"\n\t\t[overlayY]=\"sidebar ? 'bottom' : 'top'\"\n\t>\n\t\t<st-button variant=\"base\" [ghost]=\"true\" [block]=\"sidebar && !compact()\" [class]=\"triggerClass()\" data-st-user-menu-trigger>\n\t\t\t<span class=\"sr-only\">{{ triggerLabel() }}</span>\n\t\t\t@if (user(); as currentUser) {\n\t\t\t\t<st-avatar\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclass=\"[&_span]:text-nowrap\"\n\t\t\t\t\t[class.p-1]=\"sidebar\"\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t[shape]=\"sidebar ? 'square' : 'rounded'\"\n\t\t\t\t\t[ring]=\"sidebar\"\n\t\t\t\t\t[user]=\"currentUser\"\n\t\t\t\t\t[showNameAndRole]=\"!compact()\"\n\t\t\t\t/>\n\t\t\t} @else {\n\t\t\t\t<st-icon [icon]=\"icons.person\" />\n\t\t\t}\n\t\t\t@if (sidebar && !compact()) {\n\t\t\t\t<st-dropdown-chevron aria-hidden=\"true\" position=\"right\" size=\"auto\" />\n\t\t\t}\n\t\t</st-button>\n\t</st-dropdown-trigger>\n\t<st-dropdown-content class=\"min-w-64\">\n\t\t@if (submenu(); as menu) {\n\t\t\t<div class=\"animate-morph-in\" [attr.data-st-user-menu-view]=\"view()\">\n\t\t\t\t<div class=\"inline-flex items-center gap-2 py-1.5 ps-2\">\n\t\t\t\t\t<st-button\n\t\t\t\t\t\t#backButton\n\t\t\t\t\t\tclass=\"*:text-sm\"\n\t\t\t\t\t\tvariant=\"base\"\n\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t[ghost]=\"true\"\n\t\t\t\t\t\t[circle]=\"true\"\n\t\t\t\t\t\t[icon]=\"icons.back\"\n\t\t\t\t\t\t(triggered)=\"show('options')\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"sr-only\">{{ 'sdk.layout.back' | translate }}</span>\n\t\t\t\t\t</st-button>\n\t\t\t\t\t<span stText=\"7\" stTextWeight=\"medium\">{{ menu.titleKey | translate }}</span>\n\t\t\t\t</div>\n\t\t\t\t<st-dropdown-separator />\n\t\t\t\t@for (choice of menu.choices; track choice.value) {\n\t\t\t\t\t<st-dropdown-item-radio\n\t\t\t\t\t\t[value]=\"choice.value\"\n\t\t\t\t\t\t[checked]=\"menu.current === choice.value\"\n\t\t\t\t\t\t[closeOnSelect]=\"false\"\n\t\t\t\t\t\t[attr.data-st-user-menu-choice]=\"choice.value\"\n\t\t\t\t\t\t(checkedChanged)=\"menu.select($event)\"\n\t\t\t\t\t>\n\t\t\t\t\t\t@if (view() === 'scheme') {\n\t\t\t\t\t\t\t<div class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<st-icon [icon]=\"schemeIcon(choice.value)\" />\n\t\t\t\t\t\t\t\t<span>{{ choice.label }}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t<span>{{ choice.label }}</span>\n\t\t\t\t\t\t}\n\t\t\t\t\t</st-dropdown-item-radio>\n\t\t\t\t}\n\t\t\t</div>\n\t\t} @else {\n\t\t\t<div #optionsView class=\"animate-morph-in\" data-st-user-menu-view=\"options\">\n\t\t\t\t@if (hasAccountOptions()) {\n\t\t\t\t\t<st-dropdown-label>{{ 'sdk.layout.account' | translate }}</st-dropdown-label>\n\t\t\t\t\t@if (canChangePassword) {\n\t\t\t\t\t\t<st-dropdown-item data-st-user-menu-option=\"change-password\" (selected)=\"changePassword()\">\n\t\t\t\t\t\t\t<div class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<st-icon [icon]=\"icons.password\" />\n\t\t\t\t\t\t\t\t<span>{{ 'sdk.layout.change_password' | translate }}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</st-dropdown-item>\n\t\t\t\t\t}\n\t\t\t\t\t@for (action of accountActions(); track action.id) {\n\t\t\t\t\t\t<st-dropdown-item [attr.data-st-user-menu-option]=\"action.id\" (selected)=\"action.run()\">\n\t\t\t\t\t\t\t<div class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t\t\t@if (action.icon) {\n\t\t\t\t\t\t\t\t\t<st-icon [icon]=\"action.icon\" />\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t<span>{{ action.labelKey | translate }}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</st-dropdown-item>\n\t\t\t\t\t}\n\t\t\t\t\t<st-dropdown-separator />\n\t\t\t\t}\n\t\t\t\t@if (hasPreferences()) {\n\t\t\t\t\t<st-dropdown-label>{{ 'sdk.layout.preferences' | translate }}</st-dropdown-label>\n\t\t\t\t\t@if (hasLanguageSelector()) {\n\t\t\t\t\t\t<st-dropdown-item data-st-user-menu-option=\"language\" [closeOnSelect]=\"false\" (selected)=\"show('language')\">\n\t\t\t\t\t\t\t<div class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<st-icon [icon]=\"icons.language\" />\n\t\t\t\t\t\t\t\t<span>{{ 'sdk.layout.language' | translate }}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</st-dropdown-item>\n\t\t\t\t\t}\n\t\t\t\t\t@if (hasSchemeSelector()) {\n\t\t\t\t\t\t<st-dropdown-item data-st-user-menu-option=\"scheme\" [closeOnSelect]=\"false\" (selected)=\"show('scheme')\">\n\t\t\t\t\t\t\t<div class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<st-icon [icon]=\"schemeIcon(currentScheme())\" />\n\t\t\t\t\t\t\t\t<span>{{ 'sdk.layout.scheme' | translate }}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</st-dropdown-item>\n\t\t\t\t\t}\n\t\t\t\t\t@if (hasThemeSelector()) {\n\t\t\t\t\t\t<st-dropdown-item data-st-user-menu-option=\"theme\" [closeOnSelect]=\"false\" (selected)=\"show('theme')\">\n\t\t\t\t\t\t\t<div class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<st-icon [icon]=\"icons.theme\" />\n\t\t\t\t\t\t\t\t<span>{{ 'sdk.layout.theme' | translate }}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</st-dropdown-item>\n\t\t\t\t\t}\n\t\t\t\t\t@if (hasLayoutSelector()) {\n\t\t\t\t\t\t<st-dropdown-item data-st-user-menu-option=\"layout\" (selected)=\"openLayoutSwitcher.emit()\">\n\t\t\t\t\t\t\t<div class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<st-icon [icon]=\"icons.layout\" />\n\t\t\t\t\t\t\t\t<span>{{ 'sdk.layout.layout' | translate }}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</st-dropdown-item>\n\t\t\t\t\t}\n\t\t\t\t\t<st-dropdown-separator />\n\t\t\t\t}\n\t\t\t\t<st-dropdown-item class=\"text-error\" data-st-user-menu-option=\"logout\" (selected)=\"logout()\">\n\t\t\t\t\t<div class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t<st-icon [icon]=\"icons.logout\" />\n\t\t\t\t\t\t<span>{{ 'sdk.layout.logout' | translate }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</st-dropdown-item>\n\t\t\t</div>\n\t\t}\n\t</st-dropdown-content>\n</st-dropdown>\n", dependencies: [{ kind: "component", type: AvatarComponent, selector: "st-avatar", inputs: ["variant", "shape", "size", "ring", "presence", "user", "image", "showNameAndRole"] }, { kind: "component", type: ButtonComponent, selector: "st-button", inputs: ["variant", "ghost", "outline", "link", "soft", "dash", "wide", "circle", "square", "glass", "block", "loader", "size", "shadow", "focusable", "icon", "iconPosition", "type", "disabled", "stopPropagation", "ariaLabel", "ariaExpanded", "ariaPressed", "ariaDescribedBy", "ariaControls"], outputs: ["clicked", "pointerDown", "keyDownEnter", "keyDownSpace", "triggered"] }, { kind: "component", type: DropdownComponent, selector: "st-dropdown", inputs: ["open"], outputs: ["openChange", "opened", "closed"], exportAs: ["stDropdown"] }, { kind: "component", type: DropdownTriggerComponent, selector: "st-dropdown-trigger", inputs: ["offsetX", "offsetY", "originX", "originY", "overlayX", "overlayY", "fallbacks", "stopPropagation", "triggerTabIndex"], outputs: ["opened", "closed", "clicked", "pointerDown", "keyDownEnter", "keyDownSpace", "triggered"] }, { kind: "component", type: DropdownContentComponent, selector: "st-dropdown-content", inputs: ["class", "size", "shadow"], outputs: ["closeRequested"], exportAs: ["dropdownContent"] }, { kind: "component", type: DropdownItemComponent, selector: "st-dropdown-item", inputs: ["active", "class", "disabled", "closeOnSelect", "stopPropagation"], outputs: ["selected", "clicked", "keyDownEnter", "keyDownSpace", "triggered"] }, { kind: "component", type: DropdownItemRadioComponent, selector: "st-dropdown-item-radio", inputs: ["checked", "value", "disabled", "indicator", "showIndicator", "class", "closeOnSelect", "stopPropagation"], outputs: ["checkedChanged", "triggered", "clicked", "keyDownEnter", "keyDownSpace"] }, { kind: "component", type: DropdownLabelComponent, selector: "st-dropdown-label", inputs: ["class"] }, { kind: "component", type: DropdownSeparatorComponent, selector: "st-dropdown-separator" }, { kind: "component", type: DropdownChevronComponent, selector: "st-dropdown-chevron", inputs: ["icon", "class", "size", "color", "position"] }, { kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon", "ariaLabel"] }, { kind: "directive", type: TextDirective, selector: "[stText]", inputs: ["stText", "stTextWeight", "stTextColor", "stTextOverflow", "stTextLineClamp", "stTextClass"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
301
303
|
}
|
|
302
304
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: UserMenuComponent, decorators: [{
|
|
303
305
|
type: Component,
|
|
@@ -318,7 +320,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
318
320
|
], host: {
|
|
319
321
|
'[class]': 'hostClass()',
|
|
320
322
|
'(document:keydown.enter)': 'preventSubmenuEnter($event)',
|
|
321
|
-
}, template: "@let sidebar = variant() === 'sidebar';\n<st-dropdown [class]=\"sidebar ? 'block w-full' : 'inline-block'\" (openChange)=\"handleOpenChange($event)\">\n\t<st-dropdown-trigger\n\t\t[class]=\"sidebar ? 'block w-full *:w-full' : ''\"\n\t\toriginX=\"end\"\n\t\toriginY=\"bottom\"\n\t\t[overlayX]=\"sidebar ? 'start' : 'end'\"\n\t\t[overlayY]=\"sidebar ? 'bottom' : 'top'\"\n\t>\n\t\t<st-button variant=\"base\" [ghost]=\"true\" [block]=\"sidebar && !compact()\" [class]=\"triggerClass()\" data-st-user-menu-trigger>\n\t\t\t<span class=\"sr-only\">{{ triggerLabel() }}</span>\n\t\t\t@if (user(); as currentUser) {\n\t\t\t\t<st-avatar\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclass=\"[&_span]:text-nowrap\"\n\t\t\t\t\t[class.p-1]=\"sidebar\"\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t[shape]=\"sidebar ? 'square' : 'rounded'\"\n\t\t\t\t\t[ring]=\"sidebar\"\n\t\t\t\t\t[user]=\"currentUser\"\n\t\t\t\t\t[showNameAndRole]=\"!compact()\"\n\t\t\t\t/>\n\t\t\t} @else {\n\t\t\t\t<st-icon [icon]=\"icons.person\" />\n\t\t\t}\n\t\t\t@if (sidebar && !compact()) {\n\t\t\t\t<st-dropdown-chevron aria-hidden=\"true\" position=\"right\" size=\"auto\" />\n\t\t\t}\n\t\t</st-button>\n\t</st-dropdown-trigger>\n\t<st-dropdown-content class=\"min-w-64\">\n\t\t@if (submenu(); as menu) {\n\t\t\t<div class=\"animate-morph-in\" [attr.data-st-user-menu-view]=\"view()\">\n\t\t\t\t<div class=\"inline-flex items-center gap-2 py-1.5 ps-2\">\n\t\t\t\t\t<st-button\n\t\t\t\t\t\t#backButton\n\t\t\t\t\t\tclass=\"*:text-sm\"\n\t\t\t\t\t\tvariant=\"base\"\n\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t[ghost]=\"true\"\n\t\t\t\t\t\t[circle]=\"true\"\n\t\t\t\t\t\t[icon]=\"icons.back\"\n\t\t\t\t\t\t(triggered)=\"show('options')\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"sr-only\">{{ 'sdk.layout.back' | translate }}</span>\n\t\t\t\t\t</st-button>\n\t\t\t\t\t<span stText=\"7\" stTextWeight=\"medium\">{{ menu.titleKey | translate }}</span>\n\t\t\t\t</div>\n\t\t\t\t<st-dropdown-separator />\n\t\t\t\t@for (choice of menu.choices; track choice.value) {\n\t\t\t\t\t<st-dropdown-item-radio\n\t\t\t\t\t\t[value]=\"choice.value\"\n\t\t\t\t\t\t[checked]=\"menu.current === choice.value\"\n\t\t\t\t\t\t[closeOnSelect]=\"false\"\n\t\t\t\t\t\t[attr.data-st-user-menu-choice]=\"choice.value\"\n\t\t\t\t\t\t(checkedChanged)=\"menu.select($event)\"\n\t\t\t\t\t>\n\t\t\t\t\t\t@if (view() === 'scheme') {\n\t\t\t\t\t\t\t<div class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<st-icon [icon]=\"schemeIcon(choice.value)\" />\n\t\t\t\t\t\t\t\t<span>{{ choice.label }}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t<span>{{ choice.label }}</span>\n\t\t\t\t\t\t}\n\t\t\t\t\t</st-dropdown-item-radio>\n\t\t\t\t}\n\t\t\t</div>\n\t\t} @else {\n\t\t\t<div #optionsView class=\"animate-morph-in\" data-st-user-menu-view=\"options\">\n\t\t\t\t@if (
|
|
323
|
+
}, template: "@let sidebar = variant() === 'sidebar';\n<st-dropdown [class]=\"sidebar ? 'block w-full' : 'inline-block'\" (openChange)=\"handleOpenChange($event)\">\n\t<st-dropdown-trigger\n\t\t[class]=\"sidebar ? 'block w-full *:w-full' : ''\"\n\t\toriginX=\"end\"\n\t\toriginY=\"bottom\"\n\t\t[overlayX]=\"sidebar ? 'start' : 'end'\"\n\t\t[overlayY]=\"sidebar ? 'bottom' : 'top'\"\n\t>\n\t\t<st-button variant=\"base\" [ghost]=\"true\" [block]=\"sidebar && !compact()\" [class]=\"triggerClass()\" data-st-user-menu-trigger>\n\t\t\t<span class=\"sr-only\">{{ triggerLabel() }}</span>\n\t\t\t@if (user(); as currentUser) {\n\t\t\t\t<st-avatar\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclass=\"[&_span]:text-nowrap\"\n\t\t\t\t\t[class.p-1]=\"sidebar\"\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t[shape]=\"sidebar ? 'square' : 'rounded'\"\n\t\t\t\t\t[ring]=\"sidebar\"\n\t\t\t\t\t[user]=\"currentUser\"\n\t\t\t\t\t[showNameAndRole]=\"!compact()\"\n\t\t\t\t/>\n\t\t\t} @else {\n\t\t\t\t<st-icon [icon]=\"icons.person\" />\n\t\t\t}\n\t\t\t@if (sidebar && !compact()) {\n\t\t\t\t<st-dropdown-chevron aria-hidden=\"true\" position=\"right\" size=\"auto\" />\n\t\t\t}\n\t\t</st-button>\n\t</st-dropdown-trigger>\n\t<st-dropdown-content class=\"min-w-64\">\n\t\t@if (submenu(); as menu) {\n\t\t\t<div class=\"animate-morph-in\" [attr.data-st-user-menu-view]=\"view()\">\n\t\t\t\t<div class=\"inline-flex items-center gap-2 py-1.5 ps-2\">\n\t\t\t\t\t<st-button\n\t\t\t\t\t\t#backButton\n\t\t\t\t\t\tclass=\"*:text-sm\"\n\t\t\t\t\t\tvariant=\"base\"\n\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t[ghost]=\"true\"\n\t\t\t\t\t\t[circle]=\"true\"\n\t\t\t\t\t\t[icon]=\"icons.back\"\n\t\t\t\t\t\t(triggered)=\"show('options')\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"sr-only\">{{ 'sdk.layout.back' | translate }}</span>\n\t\t\t\t\t</st-button>\n\t\t\t\t\t<span stText=\"7\" stTextWeight=\"medium\">{{ menu.titleKey | translate }}</span>\n\t\t\t\t</div>\n\t\t\t\t<st-dropdown-separator />\n\t\t\t\t@for (choice of menu.choices; track choice.value) {\n\t\t\t\t\t<st-dropdown-item-radio\n\t\t\t\t\t\t[value]=\"choice.value\"\n\t\t\t\t\t\t[checked]=\"menu.current === choice.value\"\n\t\t\t\t\t\t[closeOnSelect]=\"false\"\n\t\t\t\t\t\t[attr.data-st-user-menu-choice]=\"choice.value\"\n\t\t\t\t\t\t(checkedChanged)=\"menu.select($event)\"\n\t\t\t\t\t>\n\t\t\t\t\t\t@if (view() === 'scheme') {\n\t\t\t\t\t\t\t<div class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<st-icon [icon]=\"schemeIcon(choice.value)\" />\n\t\t\t\t\t\t\t\t<span>{{ choice.label }}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t<span>{{ choice.label }}</span>\n\t\t\t\t\t\t}\n\t\t\t\t\t</st-dropdown-item-radio>\n\t\t\t\t}\n\t\t\t</div>\n\t\t} @else {\n\t\t\t<div #optionsView class=\"animate-morph-in\" data-st-user-menu-view=\"options\">\n\t\t\t\t@if (hasAccountOptions()) {\n\t\t\t\t\t<st-dropdown-label>{{ 'sdk.layout.account' | translate }}</st-dropdown-label>\n\t\t\t\t\t@if (canChangePassword) {\n\t\t\t\t\t\t<st-dropdown-item data-st-user-menu-option=\"change-password\" (selected)=\"changePassword()\">\n\t\t\t\t\t\t\t<div class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<st-icon [icon]=\"icons.password\" />\n\t\t\t\t\t\t\t\t<span>{{ 'sdk.layout.change_password' | translate }}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</st-dropdown-item>\n\t\t\t\t\t}\n\t\t\t\t\t@for (action of accountActions(); track action.id) {\n\t\t\t\t\t\t<st-dropdown-item [attr.data-st-user-menu-option]=\"action.id\" (selected)=\"action.run()\">\n\t\t\t\t\t\t\t<div class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t\t\t@if (action.icon) {\n\t\t\t\t\t\t\t\t\t<st-icon [icon]=\"action.icon\" />\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t<span>{{ action.labelKey | translate }}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</st-dropdown-item>\n\t\t\t\t\t}\n\t\t\t\t\t<st-dropdown-separator />\n\t\t\t\t}\n\t\t\t\t@if (hasPreferences()) {\n\t\t\t\t\t<st-dropdown-label>{{ 'sdk.layout.preferences' | translate }}</st-dropdown-label>\n\t\t\t\t\t@if (hasLanguageSelector()) {\n\t\t\t\t\t\t<st-dropdown-item data-st-user-menu-option=\"language\" [closeOnSelect]=\"false\" (selected)=\"show('language')\">\n\t\t\t\t\t\t\t<div class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<st-icon [icon]=\"icons.language\" />\n\t\t\t\t\t\t\t\t<span>{{ 'sdk.layout.language' | translate }}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</st-dropdown-item>\n\t\t\t\t\t}\n\t\t\t\t\t@if (hasSchemeSelector()) {\n\t\t\t\t\t\t<st-dropdown-item data-st-user-menu-option=\"scheme\" [closeOnSelect]=\"false\" (selected)=\"show('scheme')\">\n\t\t\t\t\t\t\t<div class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<st-icon [icon]=\"schemeIcon(currentScheme())\" />\n\t\t\t\t\t\t\t\t<span>{{ 'sdk.layout.scheme' | translate }}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</st-dropdown-item>\n\t\t\t\t\t}\n\t\t\t\t\t@if (hasThemeSelector()) {\n\t\t\t\t\t\t<st-dropdown-item data-st-user-menu-option=\"theme\" [closeOnSelect]=\"false\" (selected)=\"show('theme')\">\n\t\t\t\t\t\t\t<div class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<st-icon [icon]=\"icons.theme\" />\n\t\t\t\t\t\t\t\t<span>{{ 'sdk.layout.theme' | translate }}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</st-dropdown-item>\n\t\t\t\t\t}\n\t\t\t\t\t@if (hasLayoutSelector()) {\n\t\t\t\t\t\t<st-dropdown-item data-st-user-menu-option=\"layout\" (selected)=\"openLayoutSwitcher.emit()\">\n\t\t\t\t\t\t\t<div class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<st-icon [icon]=\"icons.layout\" />\n\t\t\t\t\t\t\t\t<span>{{ 'sdk.layout.layout' | translate }}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</st-dropdown-item>\n\t\t\t\t\t}\n\t\t\t\t\t<st-dropdown-separator />\n\t\t\t\t}\n\t\t\t\t<st-dropdown-item class=\"text-error\" data-st-user-menu-option=\"logout\" (selected)=\"logout()\">\n\t\t\t\t\t<div class=\"inline-flex items-center gap-2\">\n\t\t\t\t\t\t<st-icon [icon]=\"icons.logout\" />\n\t\t\t\t\t\t<span>{{ 'sdk.layout.logout' | translate }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</st-dropdown-item>\n\t\t\t</div>\n\t\t}\n\t</st-dropdown-content>\n</st-dropdown>\n" }]
|
|
322
324
|
}], ctorParameters: () => [] });
|
|
323
325
|
|
|
324
326
|
/**
|
|
@@ -632,7 +634,7 @@ class SideMenuComponent {
|
|
|
632
634
|
* It is raised with a small shadow; hover and press mix the primary toward `base-content`, away from
|
|
633
635
|
* `primary-content`, and the press drops the shadow.
|
|
634
636
|
*/
|
|
635
|
-
activeLinkClass = cn('bg-primary text-primary-content shadow-
|
|
637
|
+
activeLinkClass = cn('bg-primary text-primary-content shadow-raised active:shadow-none', 'hover:bg-[color-mix(in_oklch,var(--color-primary)_70%,var(--color-base-content))]', 'active:bg-[color-mix(in_oklch,var(--color-primary)_55%,var(--color-base-content))]', 'focus-visible:outline-primary-content focus-visible:-outline-offset-4');
|
|
636
638
|
inactiveLinkClass = cn(entryStateClass, 'focus-visible:outline-primary focus-visible:-outline-offset-2');
|
|
637
639
|
groupStateClass = entryStateClass;
|
|
638
640
|
chevronIcon = matKeyboardArrowDown;
|
|
@@ -737,14 +739,14 @@ class SideMenuComponent {
|
|
|
737
739
|
return globalThis.matchMedia?.('(prefers-reduced-motion: reduce)').matches ?? false;
|
|
738
740
|
}
|
|
739
741
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: SideMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
740
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: SideMenuComponent, isStandalone: true, selector: "st-side-menu", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, topLevelGroups: { classPropertyName: "topLevelGroups", publicName: "topLevelGroups", isSignal: true, isRequired: false, transformFunction: null }, activeMatch: { classPropertyName: "activeMatch", publicName: "activeMatch", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, showCollapseToggle: { classPropertyName: "showCollapseToggle", publicName: "showCollapseToggle", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, search: { classPropertyName: "search", publicName: "search", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { search: "searchChange" }, host: { properties: { "class": "hostClass()", "attr.data-collapsed": "isCollapsed()" } }, ngImport: i0, template: "@let collapsedVar = isCollapsed();\n@let searchLabel = 'sdk.layout.search' | translate;\n\n<div class=\"flex min-h-0 flex-1 flex-col gap-4\">\n\t@if (searchable()) {\n\t\t<div\n\t\t\tclass=\"flex shrink-0 items-center\"\n\t\t\t[class.justify-center]=\"collapsedVar\"\n\t\t\t[attr.role]=\"collapsedVar ? null : 'search'\"\n\t\t\t[attr.aria-label]=\"collapsedVar ? null : searchLabel\"\n\t\t>\n\t\t\t@if (collapsedVar) {\n\t\t\t\t<st-tooltip [label]=\"searchLabel\" position=\"right\">\n\t\t\t\t\t<st-button\n\t\t\t\t\t\tdata-st-side-menu-search-trigger\n\t\t\t\t\t\tvariant=\"base\"\n\t\t\t\t\t\tsize=\"md\"\n\t\t\t\t\t\t[ghost]=\"true\"\n\t\t\t\t\t\t[circle]=\"true\"\n\t\t\t\t\t\t[icon]=\"searchIcon\"\n\t\t\t\t\t\t(triggered)=\"openSearch()\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"sr-only\">{{ searchLabel }}</span>\n\t\t\t\t\t</st-button>\n\t\t\t\t</st-tooltip>\n\t\t\t} @else {\n\t\t\t\t<st-input class=\"w-full\" data-st-side-menu-search [placeholder]=\"searchLabel\" [(value)]=\"search\">\n\t\t\t\t\t<st-input-content alignment=\"start\">\n\t\t\t\t\t\t<st-icon aria-hidden=\"true\" [icon]=\"searchIcon\" />\n\t\t\t\t\t</st-input-content>\n\t\t\t\t</st-input>\n\t\t\t}\n\t\t</div>\n\t\t<div class=\"bg-base-300 h-px shrink-0\" aria-hidden=\"true\"></div>\n\t}\n\n\t<nav class=\"min-h-0 flex-1 scrollbar-gutter-stable overflow-x-hidden overflow-y-auto\" [attr.aria-label]=\"'sdk.layout.navigation' | translate\">\n\t\t@if (collapsedVar) {\n\t\t\t<ul class=\"flex flex-col items-center gap-2 py-1\" data-st-side-menu-rail>\n\t\t\t\t@for (entry of railEntries(); track entry.item.id) {\n\t\t\t\t\t@let onTrail = isOnTrail(entry.item);\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<st-tooltip [label]=\"entry.item.label\" position=\"right\">\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\tclass=\"rounded-field grid size-10 place-items-center transition-[color,background-color,box-shadow] focus-visible:outline-2 motion-reduce:transition-none\"\n\t\t\t\t\t\t\t\t[class]=\"onTrail ? activeLinkClass : inactiveLinkClass\"\n\t\t\t\t\t\t\t\t[routerLink]=\"entry.target.route\"\n\t\t\t\t\t\t\t\t[queryParams]=\"linkQueryParams(entry.target)\"\n\t\t\t\t\t\t\t\t[attr.aria-current]=\"railCurrent(entry)\"\n\t\t\t\t\t\t\t\t[attr.aria-label]=\"entry.item.label\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<st-icon aria-hidden=\"true\" [icon]=\"entry.item.icon || fallbackIcon\" size=\"md\" />\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</st-tooltip>\n\t\t\t\t\t</li>\n\t\t\t\t}\n\t\t\t</ul>\n\t\t} @else {\n\t\t\t<ul class=\"flex min-w-0 flex-col gap-1 pe-1\" data-st-side-menu-tree>\n\t\t\t\t@for (section of sections(); track section.item.id) {\n\t\t\t\t\t<li class=\"min-w-0\">\n\t\t\t\t\t\t@if (section.kind === 'label') {\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclass=\"text-base-content/60 block px-3 pt-4 pb-1 text-xs font-semibold tracking-wide uppercase select-none\"\n\t\t\t\t\t\t\t\tdata-st-side-menu-label\n\t\t\t\t\t\t\t\t[id]=\"labelId(section.item)\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{{ section.item.label }}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<ul class=\"flex min-w-0 flex-col gap-1\" [attr.aria-labelledby]=\"labelId(section.item)\">\n\t\t\t\t\t\t\t\t<ng-container [ngTemplateOutlet]=\"entries\" [ngTemplateOutletContext]=\"{ $implicit: section.children }\" />\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t<ng-container [ngTemplateOutlet]=\"entry\" [ngTemplateOutletContext]=\"{ $implicit: section.item }\" />\n\t\t\t\t\t\t}\n\t\t\t\t\t</li>\n\t\t\t\t} @empty {\n\t\t\t\t\t<li class=\"text-base-content/60 px-3 py-2 text-sm\" role=\"status\">{{ 'sdk.layout.no_results' | translate }}</li>\n\t\t\t\t}\n\t\t\t</ul>\n\t\t}\n\t</nav>\n\n\t@if (showCollapseToggle()) {\n\t\t<div class=\"flex shrink-0 flex-col\">\n\t\t\t<div class=\"bg-base-300 h-px\" aria-hidden=\"true\"></div>\n\t\t\t@let pinnedCollapsedVar = isPinnedCollapsed();\n\t\t\t@let toggleLabel = (pinnedCollapsedVar ? 'sdk.layout.expand' : 'sdk.layout.collapse') | translate;\n\t\t\t<div class=\"flex items-center pt-4\" [class.justify-center]=\"collapsedVar\" [class.justify-end]=\"!collapsedVar\">\n\t\t\t\t<st-tooltip [label]=\"toggleLabel\" [position]=\"collapsedVar ? 'right' : 'top'\">\n\t\t\t\t\t<st-button\n\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tdata-st-side-menu-toggle\n\t\t\t\t\t\t[circle]=\"true\"\n\t\t\t\t\t\t[icon]=\"pinnedCollapsedVar ? expandIcon : collapseIcon\"\n\t\t\t\t\t\t(triggered)=\"toggleCollapsed()\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"sr-only\">{{ toggleLabel }}</span>\n\t\t\t\t\t</st-button>\n\t\t\t\t</st-tooltip>\n\t\t\t</div>\n\t\t</div>\n\t}\n</div>\n\n<ng-template #entries let-items>\n\t@for (item of items; track item.id) {\n\t\t<li class=\"min-w-0\">\n\t\t\t<ng-container [ngTemplateOutlet]=\"entry\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n\t\t</li>\n\t}\n</ng-template>\n\n<ng-template #entry let-item>\n\t@if (hasChildren(item)) {\n\t\t@let state = groupState(item);\n\t\t@let onTrail = isOnTrail(item);\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\tclass=\"rounded-field focus-visible:outline-primary flex min-h-10 w-full min-w-0 cursor-pointer items-center gap-2 px-3 py-2 text-start transition-[color,background-color,box-shadow] focus-visible:outline-2 focus-visible:-outline-offset-2 motion-reduce:transition-none\"\n\t\t\t[class]=\"groupStateClass\"\n\t\t\t[class.font-semibold]=\"onTrail\"\n\t\t\t[attr.aria-expanded]=\"isGroupExpanded(item)\"\n\t\t\t[attr.aria-controls]=\"groupId(item)\"\n\t\t\t(click)=\"toggleGroup(item)\"\n\t\t>\n\t\t\t@if (item.icon) {\n\t\t\t\t<st-icon aria-hidden=\"true\" class=\"shrink-0\" [icon]=\"item.icon\" size=\"md\" />\n\t\t\t}\n\t\t\t<span class=\"block min-w-0 flex-1 wrap-anywhere\">{{ item.label }}</span>\n\t\t\t<span data-st-chevron class=\"inline-flex size-[1.2em] shrink-0 items-center justify-center\">\n\t\t\t\t<st-icon aria-hidden=\"true\" [icon]=\"chevronIcon\" size=\"sm\" />\n\t\t\t</span>\n\t\t</button>\n\t\t<ul\n\t\t\tclass=\"data-[state=closing]:animate-morph-out data-[state=opening]:animate-morph-in border-base-300 ms-5 mt-1 flex min-w-0 flex-col gap-1 border-s ps-2\"\n\t\t\tdata-st-menu-group\n\t\t\t[id]=\"groupId(item)\"\n\t\t\t[attr.data-state]=\"state\"\n\t\t\t[hidden]=\"state === 'closed'\"\n\t\t\t(animationend)=\"onGroupAnimationEnd($event, item)\"\n\t\t>\n\t\t\t<ng-container [ngTemplateOutlet]=\"entries\" [ngTemplateOutletContext]=\"{ $implicit: item.children }\" />\n\t\t</ul>\n\t} @else {\n\t\t@let activeVar = isActive(item);\n\t\t<a\n\t\t\tclass=\"rounded-field flex min-h-10 w-full min-w-0 items-center gap-2 px-3 py-2 transition-[color,background-color,box-shadow] focus-visible:outline-2 motion-reduce:transition-none\"\n\t\t\t[class]=\"activeVar ? activeLinkClass : inactiveLinkClass\"\n\t\t\t[routerLink]=\"item.route\"\n\t\t\t[queryParams]=\"linkQueryParams(item)\"\n\t\t\t[attr.aria-current]=\"activeVar ? 'page' : null\"\n\t\t>\n\t\t\t@if (item.icon) {\n\t\t\t\t<st-icon aria-hidden=\"true\" class=\"shrink-0\" [icon]=\"item.icon\" size=\"md\" />\n\t\t\t}\n\t\t\t<span class=\"block min-w-0 flex-1 wrap-anywhere\">{{ item.label }}</span>\n\t\t</a>\n\t}\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: ButtonComponent, selector: "st-button", inputs: ["variant", "ghost", "outline", "link", "soft", "dash", "wide", "circle", "square", "glass", "block", "loader", "size", "shadow", "focusable", "icon", "iconPosition", "type", "disabled", "stopPropagation", "ariaLabel", "ariaExpanded", "ariaPressed", "ariaDescribedBy", "ariaControls"], outputs: ["clicked", "pointerDown", "keyDownEnter", "keyDownSpace", "triggered"] }, { kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon", "ariaLabel"] }, { kind: "component", type: InputComponent, selector: "st-input", inputs: ["variant", "size", "label", "showOptional", "optionalText", "required", "type", "name", "inputId", "passwordToggle", "placeholder", "readonly", "focus", "onlyNumbers", "ghost", "value", "parentForm", "formControlName", "disabled", "stopPropagation", "debounceTime"], outputs: ["valueChange", "disabledChange", "keyDownEnter", "triggered", "clicked", "blurred", "valueDebounced"] }, { kind: "component", type: InputContentComponent, selector: "st-input-content", inputs: ["alignment"] }, { kind: "component", type: TooltipComponent, selector: "st-tooltip", inputs: ["variant", "position", "label", "icon", "iconPosition", "closeDelay"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
742
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: SideMenuComponent, isStandalone: true, selector: "st-side-menu", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, topLevelGroups: { classPropertyName: "topLevelGroups", publicName: "topLevelGroups", isSignal: true, isRequired: false, transformFunction: null }, activeMatch: { classPropertyName: "activeMatch", publicName: "activeMatch", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, showCollapseToggle: { classPropertyName: "showCollapseToggle", publicName: "showCollapseToggle", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, search: { classPropertyName: "search", publicName: "search", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { search: "searchChange" }, host: { properties: { "class": "hostClass()", "attr.data-collapsed": "isCollapsed()" } }, ngImport: i0, template: "@let collapsedVar = isCollapsed();\n@let searchLabel = 'sdk.layout.search' | translate;\n\n<div class=\"flex min-h-0 flex-1 flex-col gap-4\">\n\t@if (searchable()) {\n\t\t<div\n\t\t\tclass=\"flex shrink-0 items-center\"\n\t\t\t[class.justify-center]=\"collapsedVar\"\n\t\t\t[attr.role]=\"collapsedVar ? null : 'search'\"\n\t\t\t[attr.aria-label]=\"collapsedVar ? null : searchLabel\"\n\t\t>\n\t\t\t@if (collapsedVar) {\n\t\t\t\t<st-tooltip [label]=\"searchLabel\" position=\"right\">\n\t\t\t\t\t<st-button\n\t\t\t\t\t\tdata-st-side-menu-search-trigger\n\t\t\t\t\t\tvariant=\"base\"\n\t\t\t\t\t\tsize=\"md\"\n\t\t\t\t\t\t[ghost]=\"true\"\n\t\t\t\t\t\t[circle]=\"true\"\n\t\t\t\t\t\t[icon]=\"searchIcon\"\n\t\t\t\t\t\t(triggered)=\"openSearch()\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"sr-only\">{{ searchLabel }}</span>\n\t\t\t\t\t</st-button>\n\t\t\t\t</st-tooltip>\n\t\t\t} @else {\n\t\t\t\t<st-input class=\"w-full\" data-st-side-menu-search [placeholder]=\"searchLabel\" [(value)]=\"search\">\n\t\t\t\t\t<st-input-content alignment=\"start\">\n\t\t\t\t\t\t<st-icon aria-hidden=\"true\" [icon]=\"searchIcon\" />\n\t\t\t\t\t</st-input-content>\n\t\t\t\t</st-input>\n\t\t\t}\n\t\t</div>\n\t\t<div class=\"bg-base-300 h-px shrink-0\" aria-hidden=\"true\"></div>\n\t}\n\n\t<nav class=\"min-h-0 flex-1 scrollbar-gutter-stable overflow-x-hidden overflow-y-auto\" [attr.aria-label]=\"'sdk.layout.navigation' | translate\">\n\t\t@if (collapsedVar) {\n\t\t\t<ul class=\"flex flex-col items-center gap-2 py-1\" data-st-side-menu-rail>\n\t\t\t\t@for (entry of railEntries(); track entry.item.id) {\n\t\t\t\t\t@let onTrail = isOnTrail(entry.item);\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<st-tooltip [label]=\"entry.item.label\" position=\"right\">\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\tclass=\"rounded-field grid size-10 place-items-center transition-[color,background-color,box-shadow] focus-visible:outline-2 motion-reduce:transition-none\"\n\t\t\t\t\t\t\t\t[class]=\"onTrail ? activeLinkClass : inactiveLinkClass\"\n\t\t\t\t\t\t\t\t[routerLink]=\"entry.target.route\"\n\t\t\t\t\t\t\t\t[queryParams]=\"linkQueryParams(entry.target)\"\n\t\t\t\t\t\t\t\t[attr.aria-current]=\"railCurrent(entry)\"\n\t\t\t\t\t\t\t\t[attr.aria-label]=\"entry.item.label\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<st-icon aria-hidden=\"true\" [icon]=\"entry.item.icon || fallbackIcon\" size=\"md\" />\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</st-tooltip>\n\t\t\t\t\t</li>\n\t\t\t\t}\n\t\t\t</ul>\n\t\t} @else {\n\t\t\t<ul class=\"flex min-w-0 flex-col gap-1 pe-1\" data-st-side-menu-tree>\n\t\t\t\t@for (section of sections(); track section.item.id) {\n\t\t\t\t\t<li class=\"min-w-0\">\n\t\t\t\t\t\t@if (section.kind === 'label') {\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclass=\"text-base-content-muted block px-3 pt-4 pb-1 text-xs font-semibold tracking-wide uppercase select-none\"\n\t\t\t\t\t\t\t\tdata-st-side-menu-label\n\t\t\t\t\t\t\t\t[id]=\"labelId(section.item)\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{{ section.item.label }}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<ul class=\"flex min-w-0 flex-col gap-1\" [attr.aria-labelledby]=\"labelId(section.item)\">\n\t\t\t\t\t\t\t\t<ng-container [ngTemplateOutlet]=\"entries\" [ngTemplateOutletContext]=\"{ $implicit: section.children }\" />\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t<ng-container [ngTemplateOutlet]=\"entry\" [ngTemplateOutletContext]=\"{ $implicit: section.item }\" />\n\t\t\t\t\t\t}\n\t\t\t\t\t</li>\n\t\t\t\t} @empty {\n\t\t\t\t\t<li class=\"text-base-content-muted px-3 py-2 text-sm\" role=\"status\">{{ 'sdk.layout.no_results' | translate }}</li>\n\t\t\t\t}\n\t\t\t</ul>\n\t\t}\n\t</nav>\n\n\t@if (showCollapseToggle()) {\n\t\t<div class=\"flex shrink-0 flex-col\">\n\t\t\t<div class=\"bg-base-300 h-px\" aria-hidden=\"true\"></div>\n\t\t\t@let pinnedCollapsedVar = isPinnedCollapsed();\n\t\t\t@let toggleLabel = (pinnedCollapsedVar ? 'sdk.layout.expand' : 'sdk.layout.collapse') | translate;\n\t\t\t<div class=\"flex items-center pt-4\" [class.justify-center]=\"collapsedVar\" [class.justify-end]=\"!collapsedVar\">\n\t\t\t\t<st-tooltip [label]=\"toggleLabel\" [position]=\"collapsedVar ? 'right' : 'top'\">\n\t\t\t\t\t<st-button\n\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tdata-st-side-menu-toggle\n\t\t\t\t\t\t[circle]=\"true\"\n\t\t\t\t\t\t[icon]=\"pinnedCollapsedVar ? expandIcon : collapseIcon\"\n\t\t\t\t\t\t(triggered)=\"toggleCollapsed()\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"sr-only\">{{ toggleLabel }}</span>\n\t\t\t\t\t</st-button>\n\t\t\t\t</st-tooltip>\n\t\t\t</div>\n\t\t</div>\n\t}\n</div>\n\n<ng-template #entries let-items>\n\t@for (item of items; track item.id) {\n\t\t<li class=\"min-w-0\">\n\t\t\t<ng-container [ngTemplateOutlet]=\"entry\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n\t\t</li>\n\t}\n</ng-template>\n\n<ng-template #entry let-item>\n\t@if (hasChildren(item)) {\n\t\t@let state = groupState(item);\n\t\t@let onTrail = isOnTrail(item);\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\tclass=\"rounded-field focus-visible:outline-primary flex min-h-10 w-full min-w-0 cursor-pointer items-center gap-2 px-3 py-2 text-start transition-[color,background-color,box-shadow] focus-visible:outline-2 focus-visible:-outline-offset-2 motion-reduce:transition-none\"\n\t\t\t[class]=\"groupStateClass\"\n\t\t\t[class.font-semibold]=\"onTrail\"\n\t\t\t[attr.aria-expanded]=\"isGroupExpanded(item)\"\n\t\t\t[attr.aria-controls]=\"groupId(item)\"\n\t\t\t(click)=\"toggleGroup(item)\"\n\t\t>\n\t\t\t@if (item.icon) {\n\t\t\t\t<st-icon aria-hidden=\"true\" class=\"shrink-0\" [icon]=\"item.icon\" size=\"md\" />\n\t\t\t}\n\t\t\t<span class=\"block min-w-0 flex-1 wrap-anywhere\">{{ item.label }}</span>\n\t\t\t<span data-st-chevron class=\"inline-flex size-[1.2em] shrink-0 items-center justify-center\">\n\t\t\t\t<st-icon aria-hidden=\"true\" [icon]=\"chevronIcon\" size=\"sm\" />\n\t\t\t</span>\n\t\t</button>\n\t\t<ul\n\t\t\tclass=\"data-[state=closing]:animate-morph-out data-[state=opening]:animate-morph-in border-base-300 ms-5 mt-1 flex min-w-0 flex-col gap-1 border-s ps-2\"\n\t\t\tdata-st-menu-group\n\t\t\t[id]=\"groupId(item)\"\n\t\t\t[attr.data-state]=\"state\"\n\t\t\t[hidden]=\"state === 'closed'\"\n\t\t\t(animationend)=\"onGroupAnimationEnd($event, item)\"\n\t\t>\n\t\t\t<ng-container [ngTemplateOutlet]=\"entries\" [ngTemplateOutletContext]=\"{ $implicit: item.children }\" />\n\t\t</ul>\n\t} @else {\n\t\t@let activeVar = isActive(item);\n\t\t<a\n\t\t\tclass=\"rounded-field flex min-h-10 w-full min-w-0 items-center gap-2 px-3 py-2 transition-[color,background-color,box-shadow] focus-visible:outline-2 motion-reduce:transition-none\"\n\t\t\t[class]=\"activeVar ? activeLinkClass : inactiveLinkClass\"\n\t\t\t[routerLink]=\"item.route\"\n\t\t\t[queryParams]=\"linkQueryParams(item)\"\n\t\t\t[attr.aria-current]=\"activeVar ? 'page' : null\"\n\t\t>\n\t\t\t@if (item.icon) {\n\t\t\t\t<st-icon aria-hidden=\"true\" class=\"shrink-0\" [icon]=\"item.icon\" size=\"md\" />\n\t\t\t}\n\t\t\t<span class=\"block min-w-0 flex-1 wrap-anywhere\">{{ item.label }}</span>\n\t\t</a>\n\t}\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: ButtonComponent, selector: "st-button", inputs: ["variant", "ghost", "outline", "link", "soft", "dash", "wide", "circle", "square", "glass", "block", "loader", "size", "shadow", "focusable", "icon", "iconPosition", "type", "disabled", "stopPropagation", "ariaLabel", "ariaExpanded", "ariaPressed", "ariaDescribedBy", "ariaControls"], outputs: ["clicked", "pointerDown", "keyDownEnter", "keyDownSpace", "triggered"] }, { kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon", "ariaLabel"] }, { kind: "component", type: InputComponent, selector: "st-input", inputs: ["variant", "size", "label", "showOptional", "optionalText", "required", "type", "name", "inputId", "passwordToggle", "placeholder", "readonly", "focus", "onlyNumbers", "ghost", "value", "parentForm", "formControlName", "disabled", "stopPropagation", "debounceTime"], outputs: ["valueChange", "disabledChange", "keyDownEnter", "triggered", "clicked", "blurred", "valueDebounced"] }, { kind: "component", type: InputContentComponent, selector: "st-input-content", inputs: ["alignment"] }, { kind: "component", type: TooltipComponent, selector: "st-tooltip", inputs: ["variant", "position", "label", "icon", "iconPosition", "closeDelay"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
741
743
|
}
|
|
742
744
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: SideMenuComponent, decorators: [{
|
|
743
745
|
type: Component,
|
|
744
746
|
args: [{ selector: 'st-side-menu', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgTemplateOutlet, RouterLink, ButtonComponent, IconComponent, InputComponent, InputContentComponent, TooltipComponent, TranslatePipe], host: {
|
|
745
747
|
'[class]': 'hostClass()',
|
|
746
748
|
'[attr.data-collapsed]': 'isCollapsed()',
|
|
747
|
-
}, template: "@let collapsedVar = isCollapsed();\n@let searchLabel = 'sdk.layout.search' | translate;\n\n<div class=\"flex min-h-0 flex-1 flex-col gap-4\">\n\t@if (searchable()) {\n\t\t<div\n\t\t\tclass=\"flex shrink-0 items-center\"\n\t\t\t[class.justify-center]=\"collapsedVar\"\n\t\t\t[attr.role]=\"collapsedVar ? null : 'search'\"\n\t\t\t[attr.aria-label]=\"collapsedVar ? null : searchLabel\"\n\t\t>\n\t\t\t@if (collapsedVar) {\n\t\t\t\t<st-tooltip [label]=\"searchLabel\" position=\"right\">\n\t\t\t\t\t<st-button\n\t\t\t\t\t\tdata-st-side-menu-search-trigger\n\t\t\t\t\t\tvariant=\"base\"\n\t\t\t\t\t\tsize=\"md\"\n\t\t\t\t\t\t[ghost]=\"true\"\n\t\t\t\t\t\t[circle]=\"true\"\n\t\t\t\t\t\t[icon]=\"searchIcon\"\n\t\t\t\t\t\t(triggered)=\"openSearch()\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"sr-only\">{{ searchLabel }}</span>\n\t\t\t\t\t</st-button>\n\t\t\t\t</st-tooltip>\n\t\t\t} @else {\n\t\t\t\t<st-input class=\"w-full\" data-st-side-menu-search [placeholder]=\"searchLabel\" [(value)]=\"search\">\n\t\t\t\t\t<st-input-content alignment=\"start\">\n\t\t\t\t\t\t<st-icon aria-hidden=\"true\" [icon]=\"searchIcon\" />\n\t\t\t\t\t</st-input-content>\n\t\t\t\t</st-input>\n\t\t\t}\n\t\t</div>\n\t\t<div class=\"bg-base-300 h-px shrink-0\" aria-hidden=\"true\"></div>\n\t}\n\n\t<nav class=\"min-h-0 flex-1 scrollbar-gutter-stable overflow-x-hidden overflow-y-auto\" [attr.aria-label]=\"'sdk.layout.navigation' | translate\">\n\t\t@if (collapsedVar) {\n\t\t\t<ul class=\"flex flex-col items-center gap-2 py-1\" data-st-side-menu-rail>\n\t\t\t\t@for (entry of railEntries(); track entry.item.id) {\n\t\t\t\t\t@let onTrail = isOnTrail(entry.item);\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<st-tooltip [label]=\"entry.item.label\" position=\"right\">\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\tclass=\"rounded-field grid size-10 place-items-center transition-[color,background-color,box-shadow] focus-visible:outline-2 motion-reduce:transition-none\"\n\t\t\t\t\t\t\t\t[class]=\"onTrail ? activeLinkClass : inactiveLinkClass\"\n\t\t\t\t\t\t\t\t[routerLink]=\"entry.target.route\"\n\t\t\t\t\t\t\t\t[queryParams]=\"linkQueryParams(entry.target)\"\n\t\t\t\t\t\t\t\t[attr.aria-current]=\"railCurrent(entry)\"\n\t\t\t\t\t\t\t\t[attr.aria-label]=\"entry.item.label\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<st-icon aria-hidden=\"true\" [icon]=\"entry.item.icon || fallbackIcon\" size=\"md\" />\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</st-tooltip>\n\t\t\t\t\t</li>\n\t\t\t\t}\n\t\t\t</ul>\n\t\t} @else {\n\t\t\t<ul class=\"flex min-w-0 flex-col gap-1 pe-1\" data-st-side-menu-tree>\n\t\t\t\t@for (section of sections(); track section.item.id) {\n\t\t\t\t\t<li class=\"min-w-0\">\n\t\t\t\t\t\t@if (section.kind === 'label') {\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclass=\"text-base-content
|
|
749
|
+
}, template: "@let collapsedVar = isCollapsed();\n@let searchLabel = 'sdk.layout.search' | translate;\n\n<div class=\"flex min-h-0 flex-1 flex-col gap-4\">\n\t@if (searchable()) {\n\t\t<div\n\t\t\tclass=\"flex shrink-0 items-center\"\n\t\t\t[class.justify-center]=\"collapsedVar\"\n\t\t\t[attr.role]=\"collapsedVar ? null : 'search'\"\n\t\t\t[attr.aria-label]=\"collapsedVar ? null : searchLabel\"\n\t\t>\n\t\t\t@if (collapsedVar) {\n\t\t\t\t<st-tooltip [label]=\"searchLabel\" position=\"right\">\n\t\t\t\t\t<st-button\n\t\t\t\t\t\tdata-st-side-menu-search-trigger\n\t\t\t\t\t\tvariant=\"base\"\n\t\t\t\t\t\tsize=\"md\"\n\t\t\t\t\t\t[ghost]=\"true\"\n\t\t\t\t\t\t[circle]=\"true\"\n\t\t\t\t\t\t[icon]=\"searchIcon\"\n\t\t\t\t\t\t(triggered)=\"openSearch()\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"sr-only\">{{ searchLabel }}</span>\n\t\t\t\t\t</st-button>\n\t\t\t\t</st-tooltip>\n\t\t\t} @else {\n\t\t\t\t<st-input class=\"w-full\" data-st-side-menu-search [placeholder]=\"searchLabel\" [(value)]=\"search\">\n\t\t\t\t\t<st-input-content alignment=\"start\">\n\t\t\t\t\t\t<st-icon aria-hidden=\"true\" [icon]=\"searchIcon\" />\n\t\t\t\t\t</st-input-content>\n\t\t\t\t</st-input>\n\t\t\t}\n\t\t</div>\n\t\t<div class=\"bg-base-300 h-px shrink-0\" aria-hidden=\"true\"></div>\n\t}\n\n\t<nav class=\"min-h-0 flex-1 scrollbar-gutter-stable overflow-x-hidden overflow-y-auto\" [attr.aria-label]=\"'sdk.layout.navigation' | translate\">\n\t\t@if (collapsedVar) {\n\t\t\t<ul class=\"flex flex-col items-center gap-2 py-1\" data-st-side-menu-rail>\n\t\t\t\t@for (entry of railEntries(); track entry.item.id) {\n\t\t\t\t\t@let onTrail = isOnTrail(entry.item);\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<st-tooltip [label]=\"entry.item.label\" position=\"right\">\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\tclass=\"rounded-field grid size-10 place-items-center transition-[color,background-color,box-shadow] focus-visible:outline-2 motion-reduce:transition-none\"\n\t\t\t\t\t\t\t\t[class]=\"onTrail ? activeLinkClass : inactiveLinkClass\"\n\t\t\t\t\t\t\t\t[routerLink]=\"entry.target.route\"\n\t\t\t\t\t\t\t\t[queryParams]=\"linkQueryParams(entry.target)\"\n\t\t\t\t\t\t\t\t[attr.aria-current]=\"railCurrent(entry)\"\n\t\t\t\t\t\t\t\t[attr.aria-label]=\"entry.item.label\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<st-icon aria-hidden=\"true\" [icon]=\"entry.item.icon || fallbackIcon\" size=\"md\" />\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</st-tooltip>\n\t\t\t\t\t</li>\n\t\t\t\t}\n\t\t\t</ul>\n\t\t} @else {\n\t\t\t<ul class=\"flex min-w-0 flex-col gap-1 pe-1\" data-st-side-menu-tree>\n\t\t\t\t@for (section of sections(); track section.item.id) {\n\t\t\t\t\t<li class=\"min-w-0\">\n\t\t\t\t\t\t@if (section.kind === 'label') {\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclass=\"text-base-content-muted block px-3 pt-4 pb-1 text-xs font-semibold tracking-wide uppercase select-none\"\n\t\t\t\t\t\t\t\tdata-st-side-menu-label\n\t\t\t\t\t\t\t\t[id]=\"labelId(section.item)\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{{ section.item.label }}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<ul class=\"flex min-w-0 flex-col gap-1\" [attr.aria-labelledby]=\"labelId(section.item)\">\n\t\t\t\t\t\t\t\t<ng-container [ngTemplateOutlet]=\"entries\" [ngTemplateOutletContext]=\"{ $implicit: section.children }\" />\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t<ng-container [ngTemplateOutlet]=\"entry\" [ngTemplateOutletContext]=\"{ $implicit: section.item }\" />\n\t\t\t\t\t\t}\n\t\t\t\t\t</li>\n\t\t\t\t} @empty {\n\t\t\t\t\t<li class=\"text-base-content-muted px-3 py-2 text-sm\" role=\"status\">{{ 'sdk.layout.no_results' | translate }}</li>\n\t\t\t\t}\n\t\t\t</ul>\n\t\t}\n\t</nav>\n\n\t@if (showCollapseToggle()) {\n\t\t<div class=\"flex shrink-0 flex-col\">\n\t\t\t<div class=\"bg-base-300 h-px\" aria-hidden=\"true\"></div>\n\t\t\t@let pinnedCollapsedVar = isPinnedCollapsed();\n\t\t\t@let toggleLabel = (pinnedCollapsedVar ? 'sdk.layout.expand' : 'sdk.layout.collapse') | translate;\n\t\t\t<div class=\"flex items-center pt-4\" [class.justify-center]=\"collapsedVar\" [class.justify-end]=\"!collapsedVar\">\n\t\t\t\t<st-tooltip [label]=\"toggleLabel\" [position]=\"collapsedVar ? 'right' : 'top'\">\n\t\t\t\t\t<st-button\n\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tdata-st-side-menu-toggle\n\t\t\t\t\t\t[circle]=\"true\"\n\t\t\t\t\t\t[icon]=\"pinnedCollapsedVar ? expandIcon : collapseIcon\"\n\t\t\t\t\t\t(triggered)=\"toggleCollapsed()\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"sr-only\">{{ toggleLabel }}</span>\n\t\t\t\t\t</st-button>\n\t\t\t\t</st-tooltip>\n\t\t\t</div>\n\t\t</div>\n\t}\n</div>\n\n<ng-template #entries let-items>\n\t@for (item of items; track item.id) {\n\t\t<li class=\"min-w-0\">\n\t\t\t<ng-container [ngTemplateOutlet]=\"entry\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n\t\t</li>\n\t}\n</ng-template>\n\n<ng-template #entry let-item>\n\t@if (hasChildren(item)) {\n\t\t@let state = groupState(item);\n\t\t@let onTrail = isOnTrail(item);\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\tclass=\"rounded-field focus-visible:outline-primary flex min-h-10 w-full min-w-0 cursor-pointer items-center gap-2 px-3 py-2 text-start transition-[color,background-color,box-shadow] focus-visible:outline-2 focus-visible:-outline-offset-2 motion-reduce:transition-none\"\n\t\t\t[class]=\"groupStateClass\"\n\t\t\t[class.font-semibold]=\"onTrail\"\n\t\t\t[attr.aria-expanded]=\"isGroupExpanded(item)\"\n\t\t\t[attr.aria-controls]=\"groupId(item)\"\n\t\t\t(click)=\"toggleGroup(item)\"\n\t\t>\n\t\t\t@if (item.icon) {\n\t\t\t\t<st-icon aria-hidden=\"true\" class=\"shrink-0\" [icon]=\"item.icon\" size=\"md\" />\n\t\t\t}\n\t\t\t<span class=\"block min-w-0 flex-1 wrap-anywhere\">{{ item.label }}</span>\n\t\t\t<span data-st-chevron class=\"inline-flex size-[1.2em] shrink-0 items-center justify-center\">\n\t\t\t\t<st-icon aria-hidden=\"true\" [icon]=\"chevronIcon\" size=\"sm\" />\n\t\t\t</span>\n\t\t</button>\n\t\t<ul\n\t\t\tclass=\"data-[state=closing]:animate-morph-out data-[state=opening]:animate-morph-in border-base-300 ms-5 mt-1 flex min-w-0 flex-col gap-1 border-s ps-2\"\n\t\t\tdata-st-menu-group\n\t\t\t[id]=\"groupId(item)\"\n\t\t\t[attr.data-state]=\"state\"\n\t\t\t[hidden]=\"state === 'closed'\"\n\t\t\t(animationend)=\"onGroupAnimationEnd($event, item)\"\n\t\t>\n\t\t\t<ng-container [ngTemplateOutlet]=\"entries\" [ngTemplateOutletContext]=\"{ $implicit: item.children }\" />\n\t\t</ul>\n\t} @else {\n\t\t@let activeVar = isActive(item);\n\t\t<a\n\t\t\tclass=\"rounded-field flex min-h-10 w-full min-w-0 items-center gap-2 px-3 py-2 transition-[color,background-color,box-shadow] focus-visible:outline-2 motion-reduce:transition-none\"\n\t\t\t[class]=\"activeVar ? activeLinkClass : inactiveLinkClass\"\n\t\t\t[routerLink]=\"item.route\"\n\t\t\t[queryParams]=\"linkQueryParams(item)\"\n\t\t\t[attr.aria-current]=\"activeVar ? 'page' : null\"\n\t\t>\n\t\t\t@if (item.icon) {\n\t\t\t\t<st-icon aria-hidden=\"true\" class=\"shrink-0\" [icon]=\"item.icon\" size=\"md\" />\n\t\t\t}\n\t\t\t<span class=\"block min-w-0 flex-1 wrap-anywhere\">{{ item.label }}</span>\n\t\t</a>\n\t}\n</ng-template>\n" }]
|
|
748
750
|
}], ctorParameters: () => [] });
|
|
749
751
|
|
|
750
752
|
const frameVariants = cva('relative grid min-h-screen', {
|
|
@@ -885,11 +887,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
885
887
|
}, template: "@let collapsed = railCollapsed();\n\n<div [class]=\"frameClass()\" [attr.data-st-app-layout]=\"layout()\">\n\t@switch (layout()) {\n\t\t@case ('modern') {\n\t\t\t<header class=\"[grid-area:header]\">\n\t\t\t\t<st-navbar\n\t\t\t\t\t[homeLink]=\"homeLink()\"\n\t\t\t\t\t[logoAlt]=\"logoAlt()\"\n\t\t\t\t\t[showLanguageSelector]=\"showLanguageSelector()\"\n\t\t\t\t\t[showSchemeSelector]=\"showSchemeSelector()\"\n\t\t\t\t\t[showThemeSelector]=\"showThemeSelector()\"\n\t\t\t\t\t[showLayoutSelector]=\"showLayoutSelector()\"\n\t\t\t\t\t(openLayoutSwitcher)=\"openSwitcher()\"\n\t\t\t\t>\n\t\t\t\t\t<!-- ng-content cannot be re-projected from inside @switch, so the end slot is a template rendered here -->\n\t\t\t\t\t<ng-container ngProjectAs=\"[stNavbarEnd]\" [ngTemplateOutlet]=\"navbarEndTemplate()\" />\n\t\t\t\t</st-navbar>\n\t\t\t</header>\n\n\t\t\t<aside [class]=\"asideClass()\" (mouseenter)=\"setHovering(true)\" (mouseleave)=\"setHovering(false)\">\n\t\t\t\t<st-side-menu\n\t\t\t\t\t[items]=\"items()\"\n\t\t\t\t\t[topLevelGroups]=\"topLevelGroups()\"\n\t\t\t\t\t[activeMatch]=\"activeMatch()\"\n\t\t\t\t\t[searchable]=\"searchable()\"\n\t\t\t\t\t[collapsed]=\"collapsed\"\n\t\t\t\t/>\n\t\t\t</aside>\n\t\t}\n\t\t@default {\n\t\t\t@let headerToggle = collapseToggle() === 'header';\n\t\t\t<aside [id]=\"sidebarId\" [class]=\"asideClass()\" (mouseenter)=\"setHovering(true)\" (mouseleave)=\"setHovering(false)\">\n\t\t\t\t<div class=\"flex gap-2\" [class]=\"collapsed ? 'flex-col items-center' : 'items-center justify-between'\" data-st-app-layout-brand>\n\t\t\t\t\t<a\n\t\t\t\t\t\tclass=\"btn btn-ghost h-10 min-h-10 min-w-0 justify-start overflow-hidden\"\n\t\t\t\t\t\t[class.p-0]=\"collapsed\"\n\t\t\t\t\t\t[class.w-10]=\"collapsed\"\n\t\t\t\t\t\t[class.flex-1]=\"!collapsed\"\n\t\t\t\t\t\t[class.px-3]=\"!collapsed\"\n\t\t\t\t\t\t[routerLink]=\"homeLink()\"\n\t\t\t\t\t\tdata-st-app-layout-home\n\t\t\t\t\t>\n\t\t\t\t\t\t@if (classicLogoUrl(); as logo) {\n\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t[src]=\"logo\"\n\t\t\t\t\t\t\t\t[alt]=\"logoLabel()\"\n\t\t\t\t\t\t\t\tclass=\"h-10 object-contain object-left\"\n\t\t\t\t\t\t\t\t[class.w-10]=\"collapsed\"\n\t\t\t\t\t\t\t\t[class.w-auto]=\"!collapsed\"\n\t\t\t\t\t\t\t\t[class.max-w-full]=\"!collapsed\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t<span class=\"truncate font-semibold\" [class.sr-only]=\"collapsed\">{{ logoLabel() }}</span>\n\t\t\t\t\t\t}\n\t\t\t\t\t</a>\n\n\t\t\t\t\t@if (headerToggle) {\n\t\t\t\t\t\t@let classicToggleLabel = (pinnedCollapsed() ? 'sdk.layout.expand' : 'sdk.layout.collapse') | translate;\n\t\t\t\t\t\t<st-tooltip variant=\"secondary\" [label]=\"classicToggleLabel\" [position]=\"collapsed ? 'right' : 'bottom'\">\n\t\t\t\t\t\t\t<st-button\n\t\t\t\t\t\t\t\tvariant=\"base\"\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t[square]=\"true\"\n\t\t\t\t\t\t\t\t[ghost]=\"true\"\n\t\t\t\t\t\t\t\tdata-st-app-layout-collapse\n\t\t\t\t\t\t\t\t[icon]=\"pinnedCollapsed() ? collapseClosedIcon : collapseOpenIcon\"\n\t\t\t\t\t\t\t\t[ariaExpanded]=\"!pinnedCollapsed()\"\n\t\t\t\t\t\t\t\t[ariaControls]=\"sidebarId\"\n\t\t\t\t\t\t\t\t(triggered)=\"toggleClassicCollapsed()\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span class=\"sr-only\">{{ classicToggleLabel }}</span>\n\t\t\t\t\t\t\t</st-button>\n\t\t\t\t\t\t</st-tooltip>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\n\t\t\t\t<st-side-menu\n\t\t\t\t\t[items]=\"items()\"\n\t\t\t\t\t[topLevelGroups]=\"topLevelGroups()\"\n\t\t\t\t\t[activeMatch]=\"activeMatch()\"\n\t\t\t\t\t[searchable]=\"searchable()\"\n\t\t\t\t\t[collapsed]=\"collapsed\"\n\t\t\t\t\t[showCollapseToggle]=\"!headerToggle\"\n\t\t\t\t/>\n\n\t\t\t\t<div class=\"bg-base-300 h-px shrink-0\" aria-hidden=\"true\"></div>\n\n\t\t\t\t<st-user-menu\n\t\t\t\t\tvariant=\"sidebar\"\n\t\t\t\t\t[collapsed]=\"collapsed\"\n\t\t\t\t\t[showLanguageSelector]=\"showLanguageSelector()\"\n\t\t\t\t\t[showSchemeSelector]=\"showSchemeSelector()\"\n\t\t\t\t\t[showThemeSelector]=\"showThemeSelector()\"\n\t\t\t\t\t[showLayoutSelector]=\"showLayoutSelector()\"\n\t\t\t\t\t(openChange)=\"setUserMenuOpen($event)\"\n\t\t\t\t\t(openLayoutSwitcher)=\"openSwitcher()\"\n\t\t\t\t/>\n\t\t\t</aside>\n\t\t}\n\t}\n\n\t<main [class]=\"mainClass()\">\n\t\t<ng-content />\n\t</main>\n</div>\n\n<st-layout-switcher [(opened)]=\"switcherOpen\" />\n" }]
|
|
886
888
|
}] });
|
|
887
889
|
|
|
890
|
+
/** @internal Dev-mode switch for the banner's console warnings; specs replace `enabled` to check prod mode. */
|
|
891
|
+
const pageBannerDevMode = { enabled: () => isDevMode() };
|
|
888
892
|
/**
|
|
889
893
|
* Page header for the SDK layouts. Classic shows the title over a theme banner image (or a plain
|
|
890
894
|
* surface when the theme has no such asset); modern shows it as light text on the brand gradient.
|
|
891
|
-
* Over an image, the
|
|
892
|
-
*
|
|
895
|
+
* Over an image, the text sits on a caption fade from the bottom-left corner, like a photo caption, matched to
|
|
896
|
+
* the image tone the theme declares in its catalog (`tone`). The catalog can prefer the scrim for an asset
|
|
897
|
+
* (`textSurface`), and the `bannerTextSurface` input overrides both.
|
|
893
898
|
* Projected content (usually a `router-outlet`) fills the remaining height.
|
|
894
899
|
*/
|
|
895
900
|
class PageBannerComponent {
|
|
@@ -907,10 +912,15 @@ class PageBannerComponent {
|
|
|
907
912
|
* every param, `[]` keeps none. A param written in `backLink` itself always wins.
|
|
908
913
|
*/
|
|
909
914
|
backQueryParams = input([MENU_QUERY_PARAM]);
|
|
910
|
-
/** Theme asset key of the classic banner image; `null` for a plain surface. */
|
|
911
|
-
bannerAsset = input('banner');
|
|
915
|
+
/** Theme asset key of the classic banner image (default `network-banner`, the product banner); `null` for a plain surface. */
|
|
916
|
+
bannerAsset = input('network-banner');
|
|
912
917
|
/** Luminance of the banner image; overrides the tone the theme declares for the asset. */
|
|
913
918
|
bannerTone = input(null);
|
|
919
|
+
/**
|
|
920
|
+
* Surface behind the classic text over art. Unset (`null`), the theme catalog's preference for the asset
|
|
921
|
+
* (`textSurface`) applies, else `caption`.
|
|
922
|
+
*/
|
|
923
|
+
bannerTextSurface = input(null);
|
|
914
924
|
class = input('');
|
|
915
925
|
backIcon = matKeyboardBackspace;
|
|
916
926
|
/**
|
|
@@ -925,14 +935,35 @@ class PageBannerComponent {
|
|
|
925
935
|
frostedBackClass = cn(this.backFocusClass, '[&_.btn]:bg-base-100/80 [&_.btn]:border-base-content/10 [&_.btn:hover]:bg-base-100 [&_.btn]:backdrop-blur-sm');
|
|
926
936
|
/** Frosted back button pinned to the top-right corner of the art. */
|
|
927
937
|
backClass = computed(() => cn('absolute top-5 right-6 z-1 flex gap-3', this.frostedBackClass));
|
|
928
|
-
/**
|
|
929
|
-
|
|
938
|
+
/**
|
|
939
|
+
* The surface in use. The scrim needs a known tone (`auto` and `scrim` alike); without one the caption is used,
|
|
940
|
+
* so the text is never left on a scrim of the wrong tone.
|
|
941
|
+
*/
|
|
942
|
+
textSurface = computed(() => this.requestedSurface() !== 'caption' && this.imageTone() ? 'scrim' : 'caption');
|
|
943
|
+
/** Tone of the scrim, when the scrim is in use. */
|
|
944
|
+
scrimTone = computed(() => (this.textSurface() === 'scrim' ? this.imageTone() : null));
|
|
945
|
+
/** Tone of the caption fade, when the caption is in use: the image tone, dark when unknown. */
|
|
946
|
+
captionTone = computed(() => (this.textSurface() === 'caption' ? (this.imageTone() ?? 'dark') : null));
|
|
947
|
+
/** Text scope (`[data-st-banner-text]` re-points base-content and secondary): `caption-<tone>`, or the scrim tone. */
|
|
948
|
+
textScope = computed(() => this.scrimTone() ?? `caption-${this.captionTone()}`);
|
|
949
|
+
textClass = 'text-base-content relative z-1 flex min-w-0 flex-col wrap-break-word';
|
|
930
950
|
hostClass = computed(() => cn('flex min-h-full flex-1 flex-col', this.class()));
|
|
931
951
|
isClassic = computed(() => this.layoutService.selectedLayout() === 'classic');
|
|
932
952
|
bannerUrl = computed(() => {
|
|
933
953
|
const asset = this.bannerAsset();
|
|
934
954
|
return asset ? this.themeAssetsService.getAssetUrl(this.themeService.selectedTheme(), asset, this.themeService.resolvedScheme()) : null;
|
|
935
955
|
});
|
|
956
|
+
/** Surface asked for: the input, else the catalog's preference for the asset, else the caption. */
|
|
957
|
+
requestedSurface = computed(() => {
|
|
958
|
+
const input = this.bannerTextSurface();
|
|
959
|
+
if (input)
|
|
960
|
+
return input;
|
|
961
|
+
const asset = this.bannerAsset();
|
|
962
|
+
const preferred = asset
|
|
963
|
+
? this.themeAssetsService.getAssetTextSurface(this.themeService.selectedTheme(), asset, this.themeService.resolvedScheme())
|
|
964
|
+
: null;
|
|
965
|
+
return preferred ?? 'caption';
|
|
966
|
+
});
|
|
936
967
|
/** Tone of the image shown; `null` when neither the input nor the theme declares it. */
|
|
937
968
|
imageTone = computed(() => {
|
|
938
969
|
const override = this.bannerTone();
|
|
@@ -941,6 +972,19 @@ class PageBannerComponent {
|
|
|
941
972
|
const asset = this.bannerAsset();
|
|
942
973
|
return asset ? this.themeAssetsService.getAssetTone(this.themeService.selectedTheme(), asset, this.themeService.resolvedScheme()) : null;
|
|
943
974
|
});
|
|
975
|
+
warnedScrimWithoutTone = false;
|
|
976
|
+
constructor() {
|
|
977
|
+
// Opting into the scrim over art of unknown tone falls back to the caption; say so once per banner in dev mode.
|
|
978
|
+
effect(() => {
|
|
979
|
+
if (this.warnedScrimWithoutTone || this.requestedSurface() !== 'scrim' || !this.isClassic() || !this.bannerUrl() || this.imageTone())
|
|
980
|
+
return;
|
|
981
|
+
if (!pageBannerDevMode.enabled())
|
|
982
|
+
return;
|
|
983
|
+
this.warnedScrimWithoutTone = true;
|
|
984
|
+
console.warn(`st-page-banner: the 'scrim' text surface (bannerTextSurface or the catalog textSurface) needs the image tone, but the banner asset "${this.bannerAsset()}" declares none and no bannerTone is set. ` +
|
|
985
|
+
'Showing the caption gradient instead. Declare a tone for the asset in the theme catalog (or pass bannerTone), or drop the scrim opt-in.');
|
|
986
|
+
});
|
|
987
|
+
}
|
|
944
988
|
goBack() {
|
|
945
989
|
const url = this.backLink();
|
|
946
990
|
if (!url)
|
|
@@ -957,14 +1001,14 @@ class PageBannerComponent {
|
|
|
957
1001
|
return Object.fromEntries(keep.filter((name) => Object.hasOwn(current, name)).map((name) => [name, current[name]]));
|
|
958
1002
|
}
|
|
959
1003
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: PageBannerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
960
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: PageBannerComponent, isStandalone: true, selector: "st-page-banner", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, backLink: { classPropertyName: "backLink", publicName: "backLink", isSignal: true, isRequired: false, transformFunction: null }, backQueryParams: { classPropertyName: "backQueryParams", publicName: "backQueryParams", isSignal: true, isRequired: false, transformFunction: null }, bannerAsset: { classPropertyName: "bannerAsset", publicName: "bannerAsset", isSignal: true, isRequired: false, transformFunction: null }, bannerTone: { classPropertyName: "bannerTone", publicName: "bannerTone", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClass()" } }, ngImport: i0, template: "@if (isClassic()) {\n\t@if (bannerUrl(); as url) {\n\t\t<div\n\t\t\tdata-st-banner=\"image\"\n\t\t\t[style.background-image]=\"'url(' + url + ')'\"\n\t\t\tclass=\"rounded-box bg-neutral relative mb-6 flex h-30 items-end justify-between bg-cover bg-center px-6 py-5\"\n\t\t>\n\t\t\t@if (
|
|
1004
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: PageBannerComponent, isStandalone: true, selector: "st-page-banner", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, backLink: { classPropertyName: "backLink", publicName: "backLink", isSignal: true, isRequired: false, transformFunction: null }, backQueryParams: { classPropertyName: "backQueryParams", publicName: "backQueryParams", isSignal: true, isRequired: false, transformFunction: null }, bannerAsset: { classPropertyName: "bannerAsset", publicName: "bannerAsset", isSignal: true, isRequired: false, transformFunction: null }, bannerTone: { classPropertyName: "bannerTone", publicName: "bannerTone", isSignal: true, isRequired: false, transformFunction: null }, bannerTextSurface: { classPropertyName: "bannerTextSurface", publicName: "bannerTextSurface", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClass()" } }, ngImport: i0, template: "@if (isClassic()) {\n\t@if (bannerUrl(); as url) {\n\t\t<div\n\t\t\tdata-st-banner=\"image\"\n\t\t\t[style.background-image]=\"'url(' + url + ')'\"\n\t\t\tclass=\"rounded-box bg-neutral relative mb-6 flex h-30 items-end justify-between bg-cover bg-center px-6 py-5\"\n\t\t>\n\t\t\t@if (scrimTone(); as tone) {\n\t\t\t\t<!-- Tone-matched veil (theme token --color-banner-scrim-<tone>), solid behind the text column and fading out to the right -->\n\t\t\t\t<div [attr.data-st-banner-scrim]=\"tone\" aria-hidden=\"true\" class=\"rounded-box pointer-events-none absolute inset-0 z-0\"></div>\n\t\t\t} @else {\n\t\t\t\t<!-- Caption fade from the bottom-left corner, matched to the image tone (theme token --color-banner-caption-<tone>) -->\n\t\t\t\t<div [attr.data-st-banner-caption]=\"captionTone()\" aria-hidden=\"true\" class=\"rounded-box pointer-events-none absolute inset-0 z-0\"></div>\n\t\t\t}\n\n\t\t\t@if (backLink()) {\n\t\t\t\t<!-- Over art the button sits on a frosted base-100 surface with base-content text, so the label keeps 4.5:1 over any pixel in either scheme -->\n\t\t\t\t<div data-st-banner-back [class]=\"backClass()\">\n\t\t\t\t\t<st-button variant=\"base\" size=\"sm\" [ghost]=\"true\" [icon]=\"backIcon\" (clicked)=\"goBack()\">\n\t\t\t\t\t\t{{ 'sdk.layout.back' | translate }}\n\t\t\t\t\t</st-button>\n\t\t\t\t</div>\n\t\t\t}\n\n\t\t\t<!-- The [data-st-banner-text] scope makes base-content white over dark art and near-black (caption) or black (scrim) over light art -->\n\t\t\t<div [class]=\"textClass\" [attr.data-st-banner-text]=\"textScope()\">\n\t\t\t\t<h1 stText=\"1\" stTextWeight=\"medium\">{{ title() }}</h1>\n\t\t\t\t@if (subtitle()) {\n\t\t\t\t\t<p class=\"text-base-content-secondary\" stText=\"7\" stTextWeight=\"medium\" stTextLineClamp=\"2\">{{ subtitle() }}</p>\n\t\t\t\t}\n\t\t\t</div>\n\t\t</div>\n\t} @else {\n\t\t<div data-st-banner=\"plain\" class=\"rounded-box bg-base-200 relative mb-6 flex h-30 items-end justify-between px-6 py-5\">\n\t\t\t@if (backLink()) {\n\t\t\t\t<div data-st-banner-back class=\"absolute top-5 right-6 flex gap-3\" [class]=\"backFocusClass\">\n\t\t\t\t\t<st-button variant=\"tertiary\" size=\"sm\" [icon]=\"backIcon\" (clicked)=\"goBack()\">\n\t\t\t\t\t\t{{ 'sdk.layout.back' | translate }}\n\t\t\t\t\t</st-button>\n\t\t\t\t</div>\n\t\t\t}\n\n\t\t\t<div class=\"text-base-content flex min-w-0 flex-col wrap-break-word\">\n\t\t\t\t<h1 stText=\"1\" stTextWeight=\"medium\">{{ title() }}</h1>\n\t\t\t\t@if (subtitle()) {\n\t\t\t\t\t<p class=\"text-base-content-secondary\" stText=\"7\" stTextWeight=\"medium\" stTextLineClamp=\"2\">{{ subtitle() }}</p>\n\t\t\t\t}\n\t\t\t</div>\n\t\t</div>\n\t}\n} @else if (title()) {\n\t<!-- Modern: on the brand gradient, primary-gradient-content stays light in both schemes. The band-text scope re-points base-content and base-content-secondary to it. -->\n\t<div data-st-banner=\"modern\" class=\"mb-4 flex items-end justify-between\">\n\t\t<div data-st-banner-band-text class=\"text-base-content flex min-w-0 flex-col wrap-break-word\">\n\t\t\t<h1 stText=\"1\" stTextWeight=\"medium\">{{ title() }}</h1>\n\t\t\t@if (subtitle()) {\n\t\t\t\t<p class=\"text-base-content-secondary\" stText=\"7\" stTextWeight=\"medium\" stTextLineClamp=\"2\">{{ subtitle() }}</p>\n\t\t\t}\n\t\t</div>\n\n\t\t@if (backLink()) {\n\t\t\t<div data-st-banner-back [class]=\"frostedBackClass\">\n\t\t\t\t<st-button variant=\"base\" size=\"sm\" [ghost]=\"true\" [icon]=\"backIcon\" (clicked)=\"goBack()\">\n\t\t\t\t\t{{ 'sdk.layout.back' | translate }}\n\t\t\t\t</st-button>\n\t\t\t</div>\n\t\t}\n\t</div>\n}\n\n<!-- Stretch the routed page (a sibling of router-outlet) so feature cards can fill the shell -->\n<div\n\tclass=\"flex min-h-0 flex-1 flex-col [&>*:not(router-outlet)]:flex [&>*:not(router-outlet)]:min-h-full [&>*:not(router-outlet)]:flex-1 [&>*:not(router-outlet)]:flex-col\"\n>\n\t<ng-content />\n</div>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "st-button", inputs: ["variant", "ghost", "outline", "link", "soft", "dash", "wide", "circle", "square", "glass", "block", "loader", "size", "shadow", "focusable", "icon", "iconPosition", "type", "disabled", "stopPropagation", "ariaLabel", "ariaExpanded", "ariaPressed", "ariaDescribedBy", "ariaControls"], outputs: ["clicked", "pointerDown", "keyDownEnter", "keyDownSpace", "triggered"] }, { kind: "directive", type: TextDirective, selector: "[stText]", inputs: ["stText", "stTextWeight", "stTextColor", "stTextOverflow", "stTextLineClamp", "stTextClass"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
961
1005
|
}
|
|
962
1006
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: PageBannerComponent, decorators: [{
|
|
963
1007
|
type: Component,
|
|
964
1008
|
args: [{ selector: 'st-page-banner', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ButtonComponent, TextDirective, TranslatePipe], host: {
|
|
965
1009
|
'[class]': 'hostClass()',
|
|
966
|
-
}, template: "@if (isClassic()) {\n\t@if (bannerUrl(); as url) {\n\t\t<div\n\t\t\tdata-st-banner=\"image\"\n\t\t\t[style.background-image]=\"'url(' + url + ')'\"\n\t\t\tclass=\"rounded-box bg-neutral relative mb-6 flex h-30 items-end justify-between bg-cover bg-center px-6 py-5\"\n\t\t>\n\t\t\t@if (
|
|
967
|
-
}] });
|
|
1010
|
+
}, template: "@if (isClassic()) {\n\t@if (bannerUrl(); as url) {\n\t\t<div\n\t\t\tdata-st-banner=\"image\"\n\t\t\t[style.background-image]=\"'url(' + url + ')'\"\n\t\t\tclass=\"rounded-box bg-neutral relative mb-6 flex h-30 items-end justify-between bg-cover bg-center px-6 py-5\"\n\t\t>\n\t\t\t@if (scrimTone(); as tone) {\n\t\t\t\t<!-- Tone-matched veil (theme token --color-banner-scrim-<tone>), solid behind the text column and fading out to the right -->\n\t\t\t\t<div [attr.data-st-banner-scrim]=\"tone\" aria-hidden=\"true\" class=\"rounded-box pointer-events-none absolute inset-0 z-0\"></div>\n\t\t\t} @else {\n\t\t\t\t<!-- Caption fade from the bottom-left corner, matched to the image tone (theme token --color-banner-caption-<tone>) -->\n\t\t\t\t<div [attr.data-st-banner-caption]=\"captionTone()\" aria-hidden=\"true\" class=\"rounded-box pointer-events-none absolute inset-0 z-0\"></div>\n\t\t\t}\n\n\t\t\t@if (backLink()) {\n\t\t\t\t<!-- Over art the button sits on a frosted base-100 surface with base-content text, so the label keeps 4.5:1 over any pixel in either scheme -->\n\t\t\t\t<div data-st-banner-back [class]=\"backClass()\">\n\t\t\t\t\t<st-button variant=\"base\" size=\"sm\" [ghost]=\"true\" [icon]=\"backIcon\" (clicked)=\"goBack()\">\n\t\t\t\t\t\t{{ 'sdk.layout.back' | translate }}\n\t\t\t\t\t</st-button>\n\t\t\t\t</div>\n\t\t\t}\n\n\t\t\t<!-- The [data-st-banner-text] scope makes base-content white over dark art and near-black (caption) or black (scrim) over light art -->\n\t\t\t<div [class]=\"textClass\" [attr.data-st-banner-text]=\"textScope()\">\n\t\t\t\t<h1 stText=\"1\" stTextWeight=\"medium\">{{ title() }}</h1>\n\t\t\t\t@if (subtitle()) {\n\t\t\t\t\t<p class=\"text-base-content-secondary\" stText=\"7\" stTextWeight=\"medium\" stTextLineClamp=\"2\">{{ subtitle() }}</p>\n\t\t\t\t}\n\t\t\t</div>\n\t\t</div>\n\t} @else {\n\t\t<div data-st-banner=\"plain\" class=\"rounded-box bg-base-200 relative mb-6 flex h-30 items-end justify-between px-6 py-5\">\n\t\t\t@if (backLink()) {\n\t\t\t\t<div data-st-banner-back class=\"absolute top-5 right-6 flex gap-3\" [class]=\"backFocusClass\">\n\t\t\t\t\t<st-button variant=\"tertiary\" size=\"sm\" [icon]=\"backIcon\" (clicked)=\"goBack()\">\n\t\t\t\t\t\t{{ 'sdk.layout.back' | translate }}\n\t\t\t\t\t</st-button>\n\t\t\t\t</div>\n\t\t\t}\n\n\t\t\t<div class=\"text-base-content flex min-w-0 flex-col wrap-break-word\">\n\t\t\t\t<h1 stText=\"1\" stTextWeight=\"medium\">{{ title() }}</h1>\n\t\t\t\t@if (subtitle()) {\n\t\t\t\t\t<p class=\"text-base-content-secondary\" stText=\"7\" stTextWeight=\"medium\" stTextLineClamp=\"2\">{{ subtitle() }}</p>\n\t\t\t\t}\n\t\t\t</div>\n\t\t</div>\n\t}\n} @else if (title()) {\n\t<!-- Modern: on the brand gradient, primary-gradient-content stays light in both schemes. The band-text scope re-points base-content and base-content-secondary to it. -->\n\t<div data-st-banner=\"modern\" class=\"mb-4 flex items-end justify-between\">\n\t\t<div data-st-banner-band-text class=\"text-base-content flex min-w-0 flex-col wrap-break-word\">\n\t\t\t<h1 stText=\"1\" stTextWeight=\"medium\">{{ title() }}</h1>\n\t\t\t@if (subtitle()) {\n\t\t\t\t<p class=\"text-base-content-secondary\" stText=\"7\" stTextWeight=\"medium\" stTextLineClamp=\"2\">{{ subtitle() }}</p>\n\t\t\t}\n\t\t</div>\n\n\t\t@if (backLink()) {\n\t\t\t<div data-st-banner-back [class]=\"frostedBackClass\">\n\t\t\t\t<st-button variant=\"base\" size=\"sm\" [ghost]=\"true\" [icon]=\"backIcon\" (clicked)=\"goBack()\">\n\t\t\t\t\t{{ 'sdk.layout.back' | translate }}\n\t\t\t\t</st-button>\n\t\t\t</div>\n\t\t}\n\t</div>\n}\n\n<!-- Stretch the routed page (a sibling of router-outlet) so feature cards can fill the shell -->\n<div\n\tclass=\"flex min-h-0 flex-1 flex-col [&>*:not(router-outlet)]:flex [&>*:not(router-outlet)]:min-h-full [&>*:not(router-outlet)]:flex-1 [&>*:not(router-outlet)]:flex-col\"\n>\n\t<ng-content />\n</div>\n" }]
|
|
1011
|
+
}], ctorParameters: () => [] });
|
|
968
1012
|
|
|
969
1013
|
/**
|
|
970
1014
|
* Generated bundle index. Do not edit.
|