@sixbell-telco/sdk 4.3.0 → 4.4.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 +28 -1
- package/components/dropdown/README.md +1 -1
- package/components/dropdown/dropdown-chevron/dropdown-chevron.component.d.ts +1 -1
- package/components/dropdown/dropdown-trigger/dropdown-trigger.component.d.ts +10 -13
- package/components/dropdown-menu/README.md +1 -1
- package/components/dropdown-menu/bar/dropdown-menu-bar-content/dropdown-menu-bar-content.component.d.ts +5 -1
- package/components/dropdown-menu/bar/dropdown-menu-bar-sub-trigger/dropdown-menu-bar-sub-trigger.component.d.ts +2 -0
- package/components/dropdown-menu/bar/dropdown-menu-bar-trigger/dropdown-menu-bar-trigger.component.d.ts +2 -0
- package/components/dropdown-menu/context/dropdown-context-menu-trigger/dropdown-context-menu-trigger.component.d.ts +1 -0
- package/components/dropdown-menu/src/dropdown-menu-content/dropdown-menu-content.component.d.ts +2 -0
- package/components/dropdown-menu/src/dropdown-menu-sub-content/dropdown-menu-sub-content.component.d.ts +2 -0
- package/components/dropdown-menu/src/dropdown-menu-sub-trigger/dropdown-menu-sub-trigger.component.d.ts +1 -0
- package/components/dropdown-menu/src/dropdown-menu-trigger/dropdown-menu-trigger.component.d.ts +1 -0
- package/components/forms/combobox/README.md +1 -1
- package/components/forms/combobox/src/combobox.component.d.ts +10 -11
- package/components/forms/select/README.md +1 -1
- package/components/forms/select/src/select.component.d.ts +10 -11
- package/components/overlay/README.md +6 -1
- package/components/overlay/src/overlay.component.d.ts +9 -8
- package/components/tooltip/README.md +3 -2
- package/components/tooltip/src/tooltip.component.d.ts +8 -8
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs +18 -9
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-context.mjs +5 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-context.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs +20 -9
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs +26 -55
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +35 -49
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +35 -43
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-overlay.mjs +39 -77
- package/fesm2022/sixbell-telco-sdk-components-overlay.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs +33 -52
- package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-layouts.mjs +29 -9
- package/fesm2022/sixbell-telco-sdk-layouts.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-popover-motion.mjs +186 -0
- package/fesm2022/sixbell-telco-sdk-utils-popover-motion.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-utils-translation.mjs +129 -14
- package/fesm2022/sixbell-telco-sdk-utils-translation.mjs.map +1 -1
- package/layouts/README.md +7 -1
- package/layouts/public-api.d.ts +1 -1
- package/layouts/src/menu/menu-active.d.ts +2 -1
- package/layouts/src/menu/menu-url.d.ts +2 -0
- package/layouts/src/page-banner/page-banner.component.d.ts +13 -1
- package/package.json +35 -31
- package/src/_index.css +85 -0
- package/utils/popover-motion/README.md +38 -0
- package/utils/popover-motion/index.d.ts +5 -0
- package/utils/popover-motion/public-api.d.ts +2 -0
- package/utils/popover-motion/src/popover-menu-motion.d.ts +37 -0
- package/utils/popover-motion/src/popover-motion.d.ts +31 -0
- package/utils/translation/README.md +2 -0
- package/utils/translation/src/translation.service.d.ts +24 -0
|
@@ -109,11 +109,11 @@ class LayoutSwitcherComponent {
|
|
|
109
109
|
this.opened.set(false);
|
|
110
110
|
}
|
|
111
111
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: LayoutSwitcherComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
112
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: LayoutSwitcherComponent, isStandalone: true, selector: "st-layout-switcher", inputs: { opened: { classPropertyName: "opened", publicName: "opened", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "openedChange" }, ngImport: i0, template: "<st-dialog [(opened)]=\"opened\" width=\"lg\" [fullscreenOnMobile]=\"false\">\n\t<st-dialog-title>{{ 'sdk.layout.title' | translate }}</st-dialog-title>\n\t<st-dialog-content>\n\t\t<div class=\"grid grid-cols-2 gap-6 py-4\">\n\t\t\t@for (option of options; track option.value) {\n\t\t\t\t<!-- Preview Card -->\n\t\t\t\t<button\n\t\t\t\t\tclass=\"group rounded-box relative flex cursor-pointer flex-col items-center gap-3 border-2 p-4 transition-
|
|
112
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: LayoutSwitcherComponent, isStandalone: true, selector: "st-layout-switcher", inputs: { opened: { classPropertyName: "opened", publicName: "opened", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "openedChange" }, ngImport: i0, template: "<st-dialog [(opened)]=\"opened\" width=\"lg\" [fullscreenOnMobile]=\"false\">\n\t<st-dialog-title>{{ 'sdk.layout.title' | translate }}</st-dialog-title>\n\t<st-dialog-content>\n\t\t<div class=\"grid grid-cols-2 gap-6 py-4\">\n\t\t\t@for (option of options; track option.value) {\n\t\t\t\t<!-- Preview Card -->\n\t\t\t\t<button\n\t\t\t\t\tclass=\"group rounded-box relative flex cursor-pointer flex-col items-center gap-3 border-2 p-4 transition-[border-color,box-shadow,scale] duration-300 active:scale-[0.98]\"\n\t\t\t\t\t[class]=\"\n\t\t\t\t\t\tselectedLayout() === option.value\n\t\t\t\t\t\t\t? 'border-primary ring-primary/30 ring-4'\n\t\t\t\t\t\t\t: 'border-base-300 hover:border-primary/50 hover:ring-primary/15 hover:ring-2'\n\t\t\t\t\t\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t[attr.aria-pressed]=\"selectedLayout() === option.value\"\n\t\t\t\t\t[attr.data-st-layout-option]=\"option.value\"\n\t\t\t\t\t[attr.aria-describedby]=\"'st-layout-option-' + option.value + '-description'\"\n\t\t\t\t\t(click)=\"select(option.value)\"\n\t\t\t\t>\n\t\t\t\t\t<!-- Selected Checkmark Badge -->\n\t\t\t\t\t@if (selectedLayout() === option.value) {\n\t\t\t\t\t\t<div class=\"bg-primary text-primary-content absolute -top-2.5 -right-2.5 z-10 grid h-6 w-6 place-items-center rounded-full shadow-md\">\n\t\t\t\t\t\t\t<st-icon [icon]=\"checkIcon\" size=\"xs\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\n\t\t\t\t\t<!-- Minimap Container -->\n\t\t\t\t\t<div class=\"bg-base-200 rounded-box relative h-40 w-full overflow-hidden\">\n\t\t\t\t\t\t@switch (option.value) {\n\t\t\t\t\t\t\t<!-- ============================== -->\n\t\t\t\t\t\t\t<!-- CLASSIC MINIMAP -->\n\t\t\t\t\t\t\t<!-- ============================== -->\n\t\t\t\t\t\t\t@case ('classic') {\n\t\t\t\t\t\t\t\t<div class=\"absolute inset-0 flex\">\n\t\t\t\t\t\t\t\t\t<!-- Sidebar -->\n\t\t\t\t\t\t\t\t\t<div class=\"bg-base-300 border-base-content/10 flex flex-col justify-between border-r px-2 py-3\">\n\t\t\t\t\t\t\t\t\t\t<!-- Logo placeholder -->\n\t\t\t\t\t\t\t\t\t\t<div class=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/15 h-2 w-10 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t<!-- Menu items -->\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"mt-2 flex flex-col gap-1.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-primary/60 h-1.5 w-12 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/10 h-1.5 w-10 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/10 h-1.5 w-8 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/10 h-1.5 w-11 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<!-- Avatar placeholder at bottom -->\n\t\t\t\t\t\t\t\t\t\t<div class=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-primary/30 h-3 w-3 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/10 h-1.5 w-6 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<!-- Main content area -->\n\t\t\t\t\t\t\t\t\t<div class=\"flex flex-1 flex-col items-center justify-center gap-2 p-4\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/8 h-2 w-3/4 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/5 rounded-field h-12 w-5/6\"></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/5 rounded-field h-6 w-2/3\"></div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t<!-- ============================== -->\n\t\t\t\t\t\t\t<!-- MODERN MINIMAP -->\n\t\t\t\t\t\t\t<!-- ============================== -->\n\t\t\t\t\t\t\t@case ('modern') {\n\t\t\t\t\t\t\t\t<div class=\"absolute inset-0 flex flex-col gap-1 p-1.5\">\n\t\t\t\t\t\t\t\t\t<!-- Top navbar -->\n\t\t\t\t\t\t\t\t\t<div class=\"bg-primary/70 rounded-field flex h-6 shrink-0 items-center justify-between px-2\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"bg-primary-content/30 h-1.5 w-8 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-primary-content/20 h-2 w-2 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-primary-content/20 h-2 w-2 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-primary-content/30 h-2.5 w-2.5 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<!-- Body: sidebar + main -->\n\t\t\t\t\t\t\t\t\t<div class=\"flex min-h-0 flex-1 gap-1\">\n\t\t\t\t\t\t\t\t\t\t<!-- Sidebar (rounded) -->\n\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-300 border-base-content/10 rounded-field flex flex-col gap-1.5 border px-2 py-2\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-primary/60 h-1.5 w-12 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/10 h-1.5 w-10 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/10 h-1.5 w-8 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/10 h-1.5 w-11 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<!-- Main content -->\n\t\t\t\t\t\t\t\t\t\t<div class=\"flex flex-1 flex-col justify-center gap-1.5 px-3\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/8 h-1.5 w-3/4 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/5 rounded-field h-10 w-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/5 rounded-field h-5 w-2/3\"></div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<!-- Label -->\n\t\t\t\t\t<span stText=\"8\" stTextWeight=\"medium\" class=\"text-base-content\">{{ option.labelKey | translate }}</span>\n\t\t\t\t\t<span class=\"sr-only\" [id]=\"'st-layout-option-' + option.value + '-description'\">{{ option.descriptionKey | translate }}</span>\n\t\t\t\t</button>\n\t\t\t}\n\t\t</div>\n\t</st-dialog-content>\n</st-dialog>\n", dependencies: [{ kind: "component", type: DialogComponent, selector: "st-dialog", inputs: ["width", "fullscreenOnMobile", "xPosition", "yPosition", "opened", "stopPropagation"], outputs: ["openedChange", "closed", "clickOutside", "clicked", "pointerDown", "keyDownEnter", "keyDownSpace", "triggered"] }, { kind: "component", type: DialogTitleComponent, selector: "st-dialog-title" }, { kind: "component", type: DialogContentComponent, selector: "st-dialog-content" }, { 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 });
|
|
113
113
|
}
|
|
114
114
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: LayoutSwitcherComponent, decorators: [{
|
|
115
115
|
type: Component,
|
|
116
|
-
args: [{ selector: 'st-layout-switcher', changeDetection: ChangeDetectionStrategy.OnPush, imports: [DialogComponent, DialogTitleComponent, DialogContentComponent, IconComponent, TextDirective, TranslatePipe], template: "<st-dialog [(opened)]=\"opened\" width=\"lg\" [fullscreenOnMobile]=\"false\">\n\t<st-dialog-title>{{ 'sdk.layout.title' | translate }}</st-dialog-title>\n\t<st-dialog-content>\n\t\t<div class=\"grid grid-cols-2 gap-6 py-4\">\n\t\t\t@for (option of options; track option.value) {\n\t\t\t\t<!-- Preview Card -->\n\t\t\t\t<button\n\t\t\t\t\tclass=\"group rounded-box relative flex cursor-pointer flex-col items-center gap-3 border-2 p-4 transition-
|
|
116
|
+
args: [{ selector: 'st-layout-switcher', changeDetection: ChangeDetectionStrategy.OnPush, imports: [DialogComponent, DialogTitleComponent, DialogContentComponent, IconComponent, TextDirective, TranslatePipe], template: "<st-dialog [(opened)]=\"opened\" width=\"lg\" [fullscreenOnMobile]=\"false\">\n\t<st-dialog-title>{{ 'sdk.layout.title' | translate }}</st-dialog-title>\n\t<st-dialog-content>\n\t\t<div class=\"grid grid-cols-2 gap-6 py-4\">\n\t\t\t@for (option of options; track option.value) {\n\t\t\t\t<!-- Preview Card -->\n\t\t\t\t<button\n\t\t\t\t\tclass=\"group rounded-box relative flex cursor-pointer flex-col items-center gap-3 border-2 p-4 transition-[border-color,box-shadow,scale] duration-300 active:scale-[0.98]\"\n\t\t\t\t\t[class]=\"\n\t\t\t\t\t\tselectedLayout() === option.value\n\t\t\t\t\t\t\t? 'border-primary ring-primary/30 ring-4'\n\t\t\t\t\t\t\t: 'border-base-300 hover:border-primary/50 hover:ring-primary/15 hover:ring-2'\n\t\t\t\t\t\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t[attr.aria-pressed]=\"selectedLayout() === option.value\"\n\t\t\t\t\t[attr.data-st-layout-option]=\"option.value\"\n\t\t\t\t\t[attr.aria-describedby]=\"'st-layout-option-' + option.value + '-description'\"\n\t\t\t\t\t(click)=\"select(option.value)\"\n\t\t\t\t>\n\t\t\t\t\t<!-- Selected Checkmark Badge -->\n\t\t\t\t\t@if (selectedLayout() === option.value) {\n\t\t\t\t\t\t<div class=\"bg-primary text-primary-content absolute -top-2.5 -right-2.5 z-10 grid h-6 w-6 place-items-center rounded-full shadow-md\">\n\t\t\t\t\t\t\t<st-icon [icon]=\"checkIcon\" size=\"xs\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\n\t\t\t\t\t<!-- Minimap Container -->\n\t\t\t\t\t<div class=\"bg-base-200 rounded-box relative h-40 w-full overflow-hidden\">\n\t\t\t\t\t\t@switch (option.value) {\n\t\t\t\t\t\t\t<!-- ============================== -->\n\t\t\t\t\t\t\t<!-- CLASSIC MINIMAP -->\n\t\t\t\t\t\t\t<!-- ============================== -->\n\t\t\t\t\t\t\t@case ('classic') {\n\t\t\t\t\t\t\t\t<div class=\"absolute inset-0 flex\">\n\t\t\t\t\t\t\t\t\t<!-- Sidebar -->\n\t\t\t\t\t\t\t\t\t<div class=\"bg-base-300 border-base-content/10 flex flex-col justify-between border-r px-2 py-3\">\n\t\t\t\t\t\t\t\t\t\t<!-- Logo placeholder -->\n\t\t\t\t\t\t\t\t\t\t<div class=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/15 h-2 w-10 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t<!-- Menu items -->\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"mt-2 flex flex-col gap-1.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-primary/60 h-1.5 w-12 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/10 h-1.5 w-10 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/10 h-1.5 w-8 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/10 h-1.5 w-11 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<!-- Avatar placeholder at bottom -->\n\t\t\t\t\t\t\t\t\t\t<div class=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-primary/30 h-3 w-3 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/10 h-1.5 w-6 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<!-- Main content area -->\n\t\t\t\t\t\t\t\t\t<div class=\"flex flex-1 flex-col items-center justify-center gap-2 p-4\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/8 h-2 w-3/4 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/5 rounded-field h-12 w-5/6\"></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/5 rounded-field h-6 w-2/3\"></div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t<!-- ============================== -->\n\t\t\t\t\t\t\t<!-- MODERN MINIMAP -->\n\t\t\t\t\t\t\t<!-- ============================== -->\n\t\t\t\t\t\t\t@case ('modern') {\n\t\t\t\t\t\t\t\t<div class=\"absolute inset-0 flex flex-col gap-1 p-1.5\">\n\t\t\t\t\t\t\t\t\t<!-- Top navbar -->\n\t\t\t\t\t\t\t\t\t<div class=\"bg-primary/70 rounded-field flex h-6 shrink-0 items-center justify-between px-2\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"bg-primary-content/30 h-1.5 w-8 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-primary-content/20 h-2 w-2 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-primary-content/20 h-2 w-2 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-primary-content/30 h-2.5 w-2.5 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<!-- Body: sidebar + main -->\n\t\t\t\t\t\t\t\t\t<div class=\"flex min-h-0 flex-1 gap-1\">\n\t\t\t\t\t\t\t\t\t\t<!-- Sidebar (rounded) -->\n\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-300 border-base-content/10 rounded-field flex flex-col gap-1.5 border px-2 py-2\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-primary/60 h-1.5 w-12 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/10 h-1.5 w-10 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/10 h-1.5 w-8 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/10 h-1.5 w-11 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<!-- Main content -->\n\t\t\t\t\t\t\t\t\t\t<div class=\"flex flex-1 flex-col justify-center gap-1.5 px-3\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/8 h-1.5 w-3/4 rounded-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/5 rounded-field h-10 w-full\"></div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"bg-base-content/5 rounded-field h-5 w-2/3\"></div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<!-- Label -->\n\t\t\t\t\t<span stText=\"8\" stTextWeight=\"medium\" class=\"text-base-content\">{{ option.labelKey | translate }}</span>\n\t\t\t\t\t<span class=\"sr-only\" [id]=\"'st-layout-option-' + option.value + '-description'\">{{ option.descriptionKey | translate }}</span>\n\t\t\t\t</button>\n\t\t\t}\n\t\t</div>\n\t</st-dialog-content>\n</st-dialog>\n" }]
|
|
117
117
|
}] });
|
|
118
118
|
|
|
119
119
|
const DEFAULT_MENU_TOP_LEVEL_GROUPS = 'collapsible';
|
|
@@ -236,7 +236,7 @@ class UserMenuComponent {
|
|
|
236
236
|
}
|
|
237
237
|
});
|
|
238
238
|
hostClass = computed(() => cn(this.variant() === 'sidebar' ? 'block w-full' : 'inline-block', this.class()));
|
|
239
|
-
triggerClass = computed(() => cn('*:h-auto *:min-h-0 *:transition-
|
|
239
|
+
triggerClass = computed(() => cn('*:h-auto *:min-h-0 *:transition-[color,background-color,border-color,box-shadow,transform,width,min-width,padding,gap] *:duration-300', {
|
|
240
240
|
'w-full *:w-full *:justify-between *:px-3 *:py-1.5': this.variant() === 'sidebar' && !this.compact(),
|
|
241
241
|
'*:w-10 *:min-w-10 *:justify-center *:p-0': this.compact(),
|
|
242
242
|
'*:gap-2 *:px-2 *:py-1': this.variant() === 'navbar',
|
|
@@ -376,6 +376,10 @@ function normalizeMenuRoute(route) {
|
|
|
376
376
|
const withSlash = clean.startsWith('/') ? clean : `/${clean}`;
|
|
377
377
|
return trimTrailingSlashes(withSlash);
|
|
378
378
|
}
|
|
379
|
+
/** True for the root route `/`, the shortest route prefix of every URL. */
|
|
380
|
+
function isRootMenuRoute(route) {
|
|
381
|
+
return normalizeMenuRoute(route) === '/';
|
|
382
|
+
}
|
|
379
383
|
/** True when `url` is the known route or sits beneath it, ignoring query and fragment. */
|
|
380
384
|
function menuRoutesMatch(knownRoute, url) {
|
|
381
385
|
const known = normalizeMenuRoute(knownRoute);
|
|
@@ -424,13 +428,14 @@ function trailScore(trail) {
|
|
|
424
428
|
}
|
|
425
429
|
/**
|
|
426
430
|
* Depth-first trail to the best matching item for `url`; the longest route prefix wins, the later item on a tie.
|
|
427
|
-
* A matching child beats its own parent on an equally long route.
|
|
431
|
+
* A matching child beats its own parent on an equally long route. A root entry (`/`) matches every URL as the
|
|
432
|
+
* shortest prefix, so it is active only when no longer route matches.
|
|
428
433
|
*/
|
|
429
434
|
function findRouteTrail(items, url, ancestors = []) {
|
|
430
435
|
let best = [];
|
|
431
436
|
for (const item of items) {
|
|
432
437
|
const trail = [...ancestors, item];
|
|
433
|
-
const ownTrail = menuRoutesMatch(item.route, url) ? trail : [];
|
|
438
|
+
const ownTrail = isRootMenuRoute(item.route) || menuRoutesMatch(item.route, url) ? trail : [];
|
|
434
439
|
const childTrail = menuItemHasChildren(item) ? findRouteTrail(item.children ?? [], url, trail) : [];
|
|
435
440
|
const candidate = childTrail.length > 0 && trailScore(childTrail) >= trailScore(ownTrail) ? childTrail : ownTrail;
|
|
436
441
|
if (candidate.length > 0 && trailScore(candidate) >= trailScore(best)) {
|
|
@@ -896,6 +901,12 @@ class PageBannerComponent {
|
|
|
896
901
|
subtitle = input('');
|
|
897
902
|
/** URL the back button navigates to; no button when empty. */
|
|
898
903
|
backLink = input(null);
|
|
904
|
+
/**
|
|
905
|
+
* Query params of the current URL the back button keeps, so shell state such as the host's `?menu=` survives the
|
|
906
|
+
* navigation. Defaults to `['menu']`; page-specific params (filters, tabs) are dropped unless listed. `'all'` keeps
|
|
907
|
+
* every param, `[]` keeps none. A param written in `backLink` itself always wins.
|
|
908
|
+
*/
|
|
909
|
+
backQueryParams = input([MENU_QUERY_PARAM]);
|
|
899
910
|
/** Theme asset key of the classic banner image; `null` for a plain surface. */
|
|
900
911
|
bannerAsset = input('banner');
|
|
901
912
|
/** Luminance of the banner image; overrides the tone the theme declares for the asset. */
|
|
@@ -932,12 +943,21 @@ class PageBannerComponent {
|
|
|
932
943
|
});
|
|
933
944
|
goBack() {
|
|
934
945
|
const url = this.backLink();
|
|
935
|
-
if (url)
|
|
936
|
-
|
|
937
|
-
|
|
946
|
+
if (!url)
|
|
947
|
+
return;
|
|
948
|
+
const target = this.router.parseUrl(url);
|
|
949
|
+
target.queryParams = { ...this.carriedQueryParams(), ...target.queryParams };
|
|
950
|
+
void this.router.navigateByUrl(target);
|
|
951
|
+
}
|
|
952
|
+
carriedQueryParams() {
|
|
953
|
+
const keep = this.backQueryParams();
|
|
954
|
+
const current = this.router.parseUrl(this.router.url).queryParams;
|
|
955
|
+
if (keep === 'all')
|
|
956
|
+
return current;
|
|
957
|
+
return Object.fromEntries(keep.filter((name) => Object.hasOwn(current, name)).map((name) => [name, current[name]]));
|
|
938
958
|
}
|
|
939
959
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: PageBannerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
940
|
-
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 }, 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 (!imageTone()) {\n\t\t\t\t<!-- Unknown image tone: a caption gradient darkens only the corner behind the title, so white text reads over any photo and the rest of the art stays untouched -->\n\t\t\t\t<div\n\t\t\t\t\tdata-st-banner-scrim\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclass=\"rounded-box pointer-events-none absolute inset-0 z-0 bg-linear-to-r from-black/70 via-black/40 via-60% to-transparent\"\n\t\t\t\t></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<!-- Fixed white/black opposite to the image luminance (unknown tone = white over the caption gradient), with a soft halo of the opposite color for busy art -->\n\t\t\t<div [class]=\"textClass()\">\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=\"opacity-80\" 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/80\" 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 -->\n\t<div data-st-banner=\"modern\" class=\"mb-4 flex items-end justify-between\">\n\t\t<div class=\"text-primary-gradient-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-primary-gradient-content/70\" 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 });
|
|
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 (!imageTone()) {\n\t\t\t\t<!-- Unknown image tone: a caption gradient darkens only the corner behind the title, so white text reads over any photo and the rest of the art stays untouched -->\n\t\t\t\t<div\n\t\t\t\t\tdata-st-banner-scrim\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclass=\"rounded-box pointer-events-none absolute inset-0 z-0 bg-linear-to-r from-black/70 via-black/40 via-60% to-transparent\"\n\t\t\t\t></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<!-- Fixed white/black opposite to the image luminance (unknown tone = white over the caption gradient), with a soft halo of the opposite color for busy art -->\n\t\t\t<div [class]=\"textClass()\">\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=\"opacity-80\" 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/80\" 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 -->\n\t<div data-st-banner=\"modern\" class=\"mb-4 flex items-end justify-between\">\n\t\t<div class=\"text-primary-gradient-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-primary-gradient-content/70\" 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 });
|
|
941
961
|
}
|
|
942
962
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: PageBannerComponent, decorators: [{
|
|
943
963
|
type: Component,
|