@edsis/angular 22.1.6 → 22.2.8
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/LICENSE +21 -0
- package/README.md +87 -399
- package/SECURITY.md +18 -0
- package/SUPPORT.md +15 -0
- package/chart/README.md +272 -0
- package/component/README.md +89 -0
- package/component/accordion/README.md +195 -0
- package/component/alert/README.md +184 -0
- package/component/alert-dialog/README.md +255 -0
- package/component/aspect-ratio/README.md +116 -0
- package/component/avatar/README.md +182 -0
- package/component/badge/README.md +143 -0
- package/component/breadcrumb/README.md +223 -0
- package/component/button/README.md +141 -0
- package/component/button-group/README.md +214 -0
- package/component/calendar/README.md +125 -0
- package/component/card/README.md +232 -0
- package/component/carousel/README.md +276 -0
- package/component/checkbox/README.md +153 -0
- package/component/collapsible/README.md +216 -0
- package/component/combobox/README.md +202 -0
- package/component/command/README.md +287 -0
- package/component/composer/README.md +241 -0
- package/component/context-menu/README.md +268 -0
- package/component/date-picker/README.md +202 -0
- package/component/dialog/README.md +276 -0
- package/component/drawer/README.md +146 -0
- package/component/dropdown-menu/README.md +336 -0
- package/component/editor/README.md +152 -0
- package/component/empty/README.md +193 -0
- package/component/form/README.md +216 -0
- package/component/hover-card/README.md +150 -0
- package/component/icon/README.md +52 -0
- package/component/input/README.md +160 -0
- package/component/input-group/README.md +245 -0
- package/component/input-otp/README.md +331 -0
- package/component/item/README.md +254 -0
- package/component/kanban/README.md +81 -0
- package/component/kbd/README.md +141 -0
- package/component/label/README.md +137 -0
- package/component/menubar/README.md +270 -0
- package/component/native-select/README.md +176 -0
- package/component/navigation-menu/README.md +165 -0
- package/component/pagination/README.md +151 -0
- package/component/pillbox/README.md +68 -0
- package/component/popover/README.md +54 -0
- package/component/progress/README.md +160 -0
- package/component/radio/README.md +212 -0
- package/component/resizable/README.md +178 -0
- package/component/scroll-area/README.md +150 -0
- package/component/select/README.md +228 -0
- package/component/separator/README.md +175 -0
- package/component/sheet/README.md +190 -0
- package/component/skeleton/README.md +158 -0
- package/component/slider/README.md +207 -0
- package/component/spinner/README.md +160 -0
- package/component/switch/README.md +170 -0
- package/component/table/README.md +292 -0
- package/component/tabs/README.md +220 -0
- package/component/textarea/README.md +169 -0
- package/component/timeline/README.md +94 -0
- package/component/toast/README.md +173 -0
- package/component/toggle/README.md +133 -0
- package/component/toggle-group/README.md +234 -0
- package/component/tooltip/README.md +230 -0
- package/fesm2022/edsis-angular-chart-area.mjs +508 -0
- package/fesm2022/edsis-angular-chart-bar.mjs +946 -0
- package/fesm2022/edsis-angular-chart-core.mjs +1282 -0
- package/fesm2022/edsis-angular-chart-line.mjs +544 -0
- package/fesm2022/edsis-angular-chart-pie.mjs +524 -0
- package/fesm2022/edsis-angular-chart-primitives.mjs +1647 -0
- package/fesm2022/edsis-angular-chart-radar.mjs +693 -0
- package/fesm2022/edsis-angular-chart-radial.mjs +542 -0
- package/fesm2022/edsis-angular-chart-scatter.mjs +486 -0
- package/fesm2022/edsis-angular-chart.mjs +3 -0
- package/fesm2022/edsis-angular-component-accordion.mjs +513 -0
- package/fesm2022/edsis-angular-component-alert-dialog.mjs +1001 -0
- package/fesm2022/edsis-angular-component-alert.mjs +268 -0
- package/fesm2022/edsis-angular-component-aspect-ratio.mjs +80 -0
- package/fesm2022/edsis-angular-component-avatar.mjs +410 -0
- package/fesm2022/edsis-angular-component-badge.mjs +111 -0
- package/fesm2022/edsis-angular-component-breadcrumb.mjs +464 -0
- package/fesm2022/edsis-angular-component-button-group.mjs +252 -0
- package/fesm2022/edsis-angular-component-button.mjs +155 -0
- package/fesm2022/edsis-angular-component-calendar.mjs +835 -0
- package/fesm2022/edsis-angular-component-card.mjs +460 -0
- package/fesm2022/edsis-angular-component-carousel.mjs +700 -0
- package/fesm2022/edsis-angular-component-checkbox.mjs +398 -0
- package/fesm2022/edsis-angular-component-collapsible.mjs +305 -0
- package/fesm2022/edsis-angular-component-combobox.mjs +544 -0
- package/fesm2022/edsis-angular-component-command.mjs +815 -0
- package/fesm2022/edsis-angular-component-composer.mjs +840 -0
- package/fesm2022/edsis-angular-component-context-menu.mjs +197 -0
- package/fesm2022/edsis-angular-component-date-picker.mjs +798 -0
- package/fesm2022/edsis-angular-component-dialog.mjs +798 -0
- package/fesm2022/edsis-angular-component-drawer.mjs +2 -0
- package/fesm2022/edsis-angular-component-dropdown-menu.mjs +1259 -0
- package/fesm2022/edsis-angular-component-editor.mjs +1000 -0
- package/fesm2022/edsis-angular-component-empty.mjs +351 -0
- package/fesm2022/edsis-angular-component-form.mjs +821 -0
- package/fesm2022/edsis-angular-component-hover-card.mjs +486 -0
- package/fesm2022/edsis-angular-component-icon.mjs +253 -0
- package/fesm2022/edsis-angular-component-input-group.mjs +453 -0
- package/fesm2022/edsis-angular-component-input-otp.mjs +957 -0
- package/fesm2022/edsis-angular-component-input.mjs +87 -0
- package/fesm2022/edsis-angular-component-item.mjs +720 -0
- package/fesm2022/edsis-angular-component-kanban.mjs +812 -0
- package/fesm2022/edsis-angular-component-kbd.mjs +124 -0
- package/fesm2022/edsis-angular-component-label.mjs +82 -0
- package/fesm2022/edsis-angular-component-menubar.mjs +481 -0
- package/fesm2022/edsis-angular-component-native-select.mjs +168 -0
- package/fesm2022/edsis-angular-component-navigation-menu.mjs +685 -0
- package/fesm2022/edsis-angular-component-pagination.mjs +425 -0
- package/fesm2022/edsis-angular-component-pillbox.mjs +1679 -0
- package/fesm2022/edsis-angular-component-popover.mjs +292 -0
- package/fesm2022/edsis-angular-component-progress.mjs +184 -0
- package/fesm2022/edsis-angular-component-radio.mjs +491 -0
- package/fesm2022/edsis-angular-component-resizable.mjs +703 -0
- package/fesm2022/edsis-angular-component-scroll-area.mjs +133 -0
- package/fesm2022/edsis-angular-component-segmented-control.mjs +408 -0
- package/fesm2022/edsis-angular-component-select.mjs +743 -0
- package/fesm2022/edsis-angular-component-separator.mjs +102 -0
- package/fesm2022/edsis-angular-component-sheet.mjs +874 -0
- package/fesm2022/edsis-angular-component-skeleton.mjs +62 -0
- package/fesm2022/edsis-angular-component-slider.mjs +676 -0
- package/fesm2022/edsis-angular-component-spinner.mjs +157 -0
- package/fesm2022/edsis-angular-component-switch.mjs +361 -0
- package/fesm2022/edsis-angular-component-table.mjs +446 -0
- package/fesm2022/edsis-angular-component-tabs.mjs +592 -0
- package/fesm2022/edsis-angular-component-textarea.mjs +85 -0
- package/fesm2022/edsis-angular-component-timeline.mjs +619 -0
- package/fesm2022/edsis-angular-component-toast.mjs +231 -0
- package/fesm2022/edsis-angular-component-toggle-group.mjs +579 -0
- package/fesm2022/edsis-angular-component-toggle.mjs +189 -0
- package/fesm2022/edsis-angular-component-tooltip.mjs +804 -0
- package/fesm2022/edsis-angular-component-utils-core.mjs +181 -0
- package/fesm2022/edsis-angular-component-utils-overlay.mjs +54 -0
- package/fesm2022/edsis-angular-component-utils-scale.mjs +76 -0
- package/fesm2022/edsis-angular-component-utils.mjs +2 -0
- package/fesm2022/edsis-angular-component.mjs +0 -0
- package/fesm2022/edsis-angular-navigation-core.mjs +15 -0
- package/fesm2022/edsis-angular-navigation-icon.mjs +35 -0
- package/fesm2022/edsis-angular-navigation-navigation-badge-count.component-BWWWaUgy.mjs +234 -0
- package/fesm2022/edsis-angular-navigation-navigation-dockbar-menu.component-Bx2bxTID.mjs +834 -0
- package/fesm2022/edsis-angular-navigation-navigation-entry-grid.component-Duzt1ffz.mjs +823 -0
- package/fesm2022/edsis-angular-navigation-navigation-flyout-menu.component-cJ8Q1vM6.mjs +670 -0
- package/fesm2022/edsis-angular-navigation-navigation-horizontal.component-CDQ1wt2_.mjs +689 -0
- package/fesm2022/edsis-angular-navigation-navigation-item.component-C1VzerJp.mjs +1522 -0
- package/fesm2022/edsis-angular-navigation-navigation-list.component-BPYLfrID.mjs +346 -0
- package/fesm2022/edsis-angular-navigation-service.mjs +558 -0
- package/fesm2022/edsis-angular-navigation-types.mjs +151 -0
- package/fesm2022/edsis-angular-navigation.mjs +3338 -0
- package/fesm2022/edsis-angular-sdk.mjs +100 -0
- package/fesm2022/edsis-angular-theme-component-settings.mjs +1877 -0
- package/fesm2022/edsis-angular-theme-layout-services.mjs +252 -0
- package/fesm2022/edsis-angular-theme-layout-types.mjs +45 -0
- package/fesm2022/edsis-angular-theme-layout-wrapper.mjs +2568 -0
- package/fesm2022/edsis-angular-theme-layout.mjs +1089 -0
- package/fesm2022/edsis-angular-theme-page-core.mjs +315 -0
- package/fesm2022/edsis-angular-theme-page-filter.mjs +409 -0
- package/fesm2022/edsis-angular-theme-page-overview.mjs +88 -0
- package/fesm2022/edsis-angular-theme-page-root.mjs +693 -0
- package/fesm2022/edsis-angular-theme-page-side.mjs +342 -0
- package/fesm2022/edsis-angular-theme-page-slots.mjs +258 -0
- package/fesm2022/edsis-angular-theme-page.mjs +7 -0
- package/fesm2022/edsis-angular-theme-shell-services.mjs +231 -0
- package/fesm2022/edsis-angular-theme-shell-types.mjs +102 -0
- package/fesm2022/edsis-angular-theme-shell.mjs +1352 -0
- package/fesm2022/edsis-angular-theme-styles.mjs +572 -0
- package/fesm2022/edsis-angular-theme.mjs +0 -0
- package/fesm2022/edsis-angular.mjs +5 -8
- package/navigation/README.md +576 -0
- package/package.json +477 -52
- package/sdk/README.md +212 -0
- package/sdk/schematics/collection.json +20 -0
- package/sdk/schematics/init/index.js +83 -0
- package/sdk/schematics/init/schema.json +19 -0
- package/sdk/schematics/ng-add/index.js +147 -0
- package/sdk/schematics/ng-add/schema.json +14 -0
- package/sdk/schematics/package.json +3 -0
- package/sdk/schematics/sdk/index.js +175 -0
- package/sdk/schematics/sdk/schema.json +19 -0
- package/sdk/sdk.config.example.json +24 -0
- package/sdk/src/config/loader.js +43 -0
- package/sdk/src/config/schema.js +59 -0
- package/sdk/src/emit/client.js +251 -0
- package/sdk/src/emit/metadata.js +310 -0
- package/sdk/src/emit/models.js +104 -0
- package/sdk/src/emit/navigation.js +56 -0
- package/sdk/src/emit/operations.js +118 -0
- package/sdk/src/emit/public-api.js +54 -0
- package/sdk/src/emit/services.js +110 -0
- package/sdk/src/engine.js +67 -0
- package/sdk/src/layout/per-domain.js +360 -0
- package/sdk/src/package.json +3 -0
- package/sdk/src/parser/bundle.js +25 -0
- package/sdk/src/parser/ir.js +429 -0
- package/sdk/src/parser/types.js +7 -0
- package/sdk/src/render/template.js +152 -0
- package/sdk/src/writer/index.js +286 -0
- package/theme/README.md +120 -0
- package/theme/component/settings/README.md +154 -0
- package/theme/layout/README.md +604 -0
- package/theme/page/README.md +505 -0
- package/theme/shell/README.md +344 -0
- package/theme/styles/README.md +202 -0
- package/theme/styles/css/base/components.css +577 -0
- package/theme/styles/css/base/index.css +14 -0
- package/theme/styles/css/base/package.css +9 -0
- package/theme/styles/css/base/prefers-dark.css +86 -0
- package/theme/styles/css/base/print.css +62 -0
- package/theme/styles/css/base/status.css +38 -0
- package/theme/styles/css/base/tailwind.css +208 -0
- package/theme/styles/css/base/theme.css +353 -0
- package/theme/styles/css/base/tokens.css +388 -0
- package/theme/styles/css/color/amber.css +72 -0
- package/theme/styles/css/color/blue.css +72 -0
- package/theme/styles/css/color/brand.css +38 -0
- package/theme/styles/css/color/cyan.css +72 -0
- package/theme/styles/css/color/emerald.css +72 -0
- package/theme/styles/css/color/fuchsia.css +72 -0
- package/theme/styles/css/color/green.css +72 -0
- package/theme/styles/css/color/index.css +19 -0
- package/theme/styles/css/color/indigo.css +72 -0
- package/theme/styles/css/color/lime.css +72 -0
- package/theme/styles/css/color/orange.css +72 -0
- package/theme/styles/css/color/pink.css +72 -0
- package/theme/styles/css/color/purple.css +72 -0
- package/theme/styles/css/color/red.css +72 -0
- package/theme/styles/css/color/rose.css +72 -0
- package/theme/styles/css/color/sky.css +72 -0
- package/theme/styles/css/color/teal.css +72 -0
- package/theme/styles/css/color/violet.css +72 -0
- package/theme/styles/css/color/yellow.css +72 -0
- package/theme/styles/css/fonts.css +85 -0
- package/theme/styles/css/index.css +18 -0
- package/theme/styles/css/neutral/gray.css +63 -0
- package/theme/styles/css/neutral/index.css +11 -0
- package/theme/styles/css/neutral/mauve.css +63 -0
- package/theme/styles/css/neutral/mist.css +63 -0
- package/theme/styles/css/neutral/neutral.css +63 -0
- package/theme/styles/css/neutral/olive.css +63 -0
- package/theme/styles/css/neutral/slate.css +63 -0
- package/theme/styles/css/neutral/stone.css +63 -0
- package/theme/styles/css/neutral/taupe.css +63 -0
- package/theme/styles/css/neutral/zinc.css +63 -0
- package/theme/styles/css/radius/index.css +30 -0
- package/theme/styles/css/space/index.css +20 -0
- package/types/edsis-angular-chart-area.d.ts +139 -0
- package/types/edsis-angular-chart-bar.d.ts +291 -0
- package/types/edsis-angular-chart-core.d.ts +822 -0
- package/types/edsis-angular-chart-line.d.ts +148 -0
- package/types/edsis-angular-chart-pie.d.ts +202 -0
- package/types/edsis-angular-chart-primitives.d.ts +360 -0
- package/types/edsis-angular-chart-radar.d.ts +198 -0
- package/types/edsis-angular-chart-radial.d.ts +187 -0
- package/types/edsis-angular-chart-scatter.d.ts +181 -0
- package/types/edsis-angular-chart.d.ts +3 -0
- package/types/edsis-angular-component-accordion.d.ts +139 -0
- package/types/edsis-angular-component-alert-dialog.d.ts +288 -0
- package/types/edsis-angular-component-alert.d.ts +72 -0
- package/types/edsis-angular-component-aspect-ratio.d.ts +20 -0
- package/types/edsis-angular-component-avatar.d.ts +111 -0
- package/types/edsis-angular-component-badge.d.ts +36 -0
- package/types/edsis-angular-component-breadcrumb.d.ts +85 -0
- package/types/edsis-angular-component-button-group.d.ts +50 -0
- package/types/edsis-angular-component-button.d.ts +44 -0
- package/types/edsis-angular-component-calendar.d.ts +150 -0
- package/types/edsis-angular-component-card.d.ts +123 -0
- package/types/edsis-angular-component-carousel.d.ts +155 -0
- package/types/edsis-angular-component-checkbox.d.ts +100 -0
- package/types/edsis-angular-component-collapsible.d.ts +68 -0
- package/types/edsis-angular-component-combobox.d.ts +105 -0
- package/types/edsis-angular-component-command.d.ts +215 -0
- package/types/edsis-angular-component-composer.d.ts +190 -0
- package/types/edsis-angular-component-context-menu.d.ts +64 -0
- package/types/edsis-angular-component-date-picker.d.ts +199 -0
- package/types/edsis-angular-component-dialog.d.ts +231 -0
- package/types/edsis-angular-component-drawer.d.ts +2 -0
- package/types/edsis-angular-component-dropdown-menu.d.ts +370 -0
- package/types/edsis-angular-component-editor.d.ts +234 -0
- package/types/edsis-angular-component-empty.d.ts +85 -0
- package/types/edsis-angular-component-form.d.ts +223 -0
- package/types/edsis-angular-component-hover-card.d.ts +133 -0
- package/types/edsis-angular-component-icon.d.ts +90 -0
- package/types/edsis-angular-component-input-group.d.ts +98 -0
- package/types/edsis-angular-component-input-otp.d.ts +249 -0
- package/types/edsis-angular-component-input.d.ts +31 -0
- package/types/edsis-angular-component-item.d.ts +169 -0
- package/types/edsis-angular-component-kanban.d.ts +165 -0
- package/types/edsis-angular-component-kbd.d.ts +25 -0
- package/types/edsis-angular-component-label.d.ts +19 -0
- package/types/edsis-angular-component-menubar.d.ts +123 -0
- package/types/edsis-angular-component-native-select.d.ts +39 -0
- package/types/edsis-angular-component-navigation-menu.d.ts +163 -0
- package/types/edsis-angular-component-pagination.d.ts +83 -0
- package/types/edsis-angular-component-pillbox.d.ts +380 -0
- package/types/edsis-angular-component-popover.d.ts +96 -0
- package/types/edsis-angular-component-progress.d.ts +45 -0
- package/types/edsis-angular-component-radio.d.ts +137 -0
- package/types/edsis-angular-component-resizable.d.ts +166 -0
- package/types/edsis-angular-component-scroll-area.d.ts +37 -0
- package/types/edsis-angular-component-segmented-control.d.ts +102 -0
- package/types/edsis-angular-component-select.d.ts +138 -0
- package/types/edsis-angular-component-separator.d.ts +26 -0
- package/types/edsis-angular-component-sheet.d.ts +240 -0
- package/types/edsis-angular-component-skeleton.d.ts +13 -0
- package/types/edsis-angular-component-slider.d.ts +148 -0
- package/types/edsis-angular-component-spinner.d.ts +31 -0
- package/types/edsis-angular-component-switch.d.ts +101 -0
- package/types/edsis-angular-component-table.d.ts +109 -0
- package/types/edsis-angular-component-tabs.d.ts +183 -0
- package/types/edsis-angular-component-textarea.d.ts +27 -0
- package/types/edsis-angular-component-timeline.d.ts +146 -0
- package/types/edsis-angular-component-toast.d.ts +60 -0
- package/types/edsis-angular-component-toggle-group.d.ts +161 -0
- package/types/edsis-angular-component-toggle.d.ts +47 -0
- package/types/edsis-angular-component-tooltip.d.ts +233 -0
- package/types/edsis-angular-component-utils-core.d.ts +175 -0
- package/types/edsis-angular-component-utils-overlay.d.ts +17 -0
- package/types/edsis-angular-component-utils-scale.d.ts +27 -0
- package/types/edsis-angular-component-utils.d.ts +2 -0
- package/types/edsis-angular-component.d.ts +1 -0
- package/types/edsis-angular-navigation-core.d.ts +55 -0
- package/types/edsis-angular-navigation-icon.d.ts +9 -0
- package/types/edsis-angular-navigation-service.d.ts +121 -0
- package/types/edsis-angular-navigation-types.d.ts +185 -0
- package/types/edsis-angular-navigation.d.ts +862 -0
- package/types/edsis-angular-sdk.d.ts +87 -0
- package/types/edsis-angular-theme-component-settings.d.ts +205 -0
- package/types/edsis-angular-theme-layout-services.d.ts +143 -0
- package/types/edsis-angular-theme-layout-types.d.ts +36 -0
- package/types/edsis-angular-theme-layout-wrapper.d.ts +670 -0
- package/types/edsis-angular-theme-layout.d.ts +218 -0
- package/types/edsis-angular-theme-page-core.d.ts +151 -0
- package/types/edsis-angular-theme-page-filter.d.ts +127 -0
- package/types/edsis-angular-theme-page-overview.d.ts +28 -0
- package/types/edsis-angular-theme-page-root.d.ts +172 -0
- package/types/edsis-angular-theme-page-side.d.ts +90 -0
- package/types/edsis-angular-theme-page-slots.d.ts +61 -0
- package/types/edsis-angular-theme-page.d.ts +7 -0
- package/types/edsis-angular-theme-shell-services.d.ts +188 -0
- package/types/edsis-angular-theme-shell-types.d.ts +102 -0
- package/types/edsis-angular-theme-shell.d.ts +178 -0
- package/types/edsis-angular-theme-styles.d.ts +295 -0
- package/types/edsis-angular-theme.d.ts +1 -0
- package/types/edsis-angular.d.ts +5 -2
- package/fesm2022/edsis-angular-block-shell.mjs +0 -1329
- package/fesm2022/edsis-angular-block-shell.mjs.map +0 -1
- package/fesm2022/edsis-angular-block-themes.mjs +0 -1007
- package/fesm2022/edsis-angular-block-themes.mjs.map +0 -1
- package/fesm2022/edsis-angular-module-auth.mjs +0 -2582
- package/fesm2022/edsis-angular-module-auth.mjs.map +0 -1
- package/fesm2022/edsis-angular-platform-mfe.mjs +0 -329
- package/fesm2022/edsis-angular-platform-mfe.mjs.map +0 -1
- package/fesm2022/edsis-angular-services-runtime.mjs +0 -385
- package/fesm2022/edsis-angular-services-runtime.mjs.map +0 -1
- package/fesm2022/edsis-angular.mjs.map +0 -1
- package/types/edsis-angular-block-shell.d.ts +0 -190
- package/types/edsis-angular-block-themes.d.ts +0 -94
- package/types/edsis-angular-module-auth.d.ts +0 -533
- package/types/edsis-angular-platform-mfe.d.ts +0 -126
- package/types/edsis-angular-services-runtime.d.ts +0 -118
|
@@ -0,0 +1,1877 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Component, InjectionToken, PLATFORM_ID, Service, booleanAttribute, computed, effect, inject, input, model, signal } from "@angular/core";
|
|
3
|
+
import { LucideAppWindow, LucideAppWindowMac, LucideBot, LucideBraces, LucideChevronsLeft, LucideCircle, LucideColumns3, LucideCpu, LucideDropletOff, LucideEarth, LucideExternalLink, LucideGalleryVertical, LucideGlobe, LucideGrid3x3, LucideHexagon, LucideLaptop, LucideLaptopMinimal, LucideLayoutGrid, LucideMaximize, LucideMenu, LucideMinimize, LucideMonitor, LucideMoon, LucideMoveHorizontal, LucidePalette, LucidePanelLeft, LucidePanelLeftClose, LucidePanelLeftDashed, LucidePanelLeftOpen, LucidePanelRight, LucideRatio, LucideRows2, LucideRows3, LucideRows4, LucideScan, LucideSlidersHorizontal, LucideSmartphone, LucideSquare, LucideSquareRoundCorner, LucideStretchHorizontal, LucideSun, LucideTablet, LucideTerminal, LucideUnfoldHorizontal } from "@lucide/angular";
|
|
4
|
+
import { DrawerCloseDirective, DrawerComponent, DrawerContentComponent, DrawerHeaderComponent, DrawerTitleComponent } from "@edsis/angular/component/drawer";
|
|
5
|
+
import { IconComponent, provideIcons } from "@edsis/angular/component/icon";
|
|
6
|
+
import { SegmentedControlComponent } from "@edsis/angular/component/segmented-control";
|
|
7
|
+
import { cn, globalLocalStorage, injectUniqueId } from "@edsis/angular/component/utils/core";
|
|
8
|
+
import { LAYOUT_LOCKED_WIDTH, LAYOUT_TYPE_STORAGE_KEY } from "@edsis/angular/theme/layout/types";
|
|
9
|
+
import { ShellService } from "@edsis/angular/theme/shell/services";
|
|
10
|
+
import { isPlatformBrowser } from "@angular/common";
|
|
11
|
+
import { LayoutService } from "@edsis/angular/theme/layout/services";
|
|
12
|
+
import { SHELL_COLORS, SHELL_FRAMES, SHELL_MODES, isShellDeviceForMode, resolveShellDeviceForMode, shellDevicesForMode } from "@edsis/angular/theme/shell/types";
|
|
13
|
+
import { THEME_COLORS, THEME_NEUTRALS, ThemeBrandService, ThemeColorService, ThemeModeService, ThemeRadiusService, ThemeSpaceService, isThemeMode, isThemeRadius, isThemeSpace } from "@edsis/angular/theme/styles";
|
|
14
|
+
const THEME_SETTINGS_ICONS = [
|
|
15
|
+
LucideAppWindow,
|
|
16
|
+
LucideAppWindowMac,
|
|
17
|
+
LucideBot,
|
|
18
|
+
LucideBraces,
|
|
19
|
+
LucideChevronsLeft,
|
|
20
|
+
LucideCircle,
|
|
21
|
+
LucideColumns3,
|
|
22
|
+
LucideCpu,
|
|
23
|
+
LucideDropletOff,
|
|
24
|
+
LucideEarth,
|
|
25
|
+
LucideExternalLink,
|
|
26
|
+
LucideGalleryVertical,
|
|
27
|
+
LucideGlobe,
|
|
28
|
+
LucideGrid3x3,
|
|
29
|
+
LucideHexagon,
|
|
30
|
+
LucideLaptop,
|
|
31
|
+
LucideLaptopMinimal,
|
|
32
|
+
LucideLayoutGrid,
|
|
33
|
+
LucideMaximize,
|
|
34
|
+
LucideMenu,
|
|
35
|
+
LucideMinimize,
|
|
36
|
+
LucideMonitor,
|
|
37
|
+
LucideMoon,
|
|
38
|
+
LucideMoveHorizontal,
|
|
39
|
+
LucidePalette,
|
|
40
|
+
LucidePanelLeft,
|
|
41
|
+
LucidePanelLeftClose,
|
|
42
|
+
LucidePanelLeftDashed,
|
|
43
|
+
LucidePanelLeftOpen,
|
|
44
|
+
LucidePanelRight,
|
|
45
|
+
LucideRatio,
|
|
46
|
+
LucideRows2,
|
|
47
|
+
LucideRows3,
|
|
48
|
+
LucideRows4,
|
|
49
|
+
LucideScan,
|
|
50
|
+
LucideSlidersHorizontal,
|
|
51
|
+
LucideSmartphone,
|
|
52
|
+
LucideSquare,
|
|
53
|
+
LucideSquareRoundCorner,
|
|
54
|
+
LucideStretchHorizontal,
|
|
55
|
+
LucideSun,
|
|
56
|
+
LucideTablet,
|
|
57
|
+
LucideTerminal,
|
|
58
|
+
LucideUnfoldHorizontal
|
|
59
|
+
];
|
|
60
|
+
const THEME_SETTINGS_ADAPTER = new InjectionToken("THEME_SETTINGS_ADAPTER");
|
|
61
|
+
const NAV_TYPE_STORAGE_KEY = "nav-type";
|
|
62
|
+
const NAV_TYPE_MODE_STORAGE_KEY = "nav-type-mode";
|
|
63
|
+
const NAV_TYPES = [
|
|
64
|
+
"sidebar",
|
|
65
|
+
"dockbar",
|
|
66
|
+
"minidock",
|
|
67
|
+
"navbar",
|
|
68
|
+
"flyout",
|
|
69
|
+
"desktop"
|
|
70
|
+
];
|
|
71
|
+
const NAV_TYPE_MODES = [
|
|
72
|
+
"default",
|
|
73
|
+
"collapsed",
|
|
74
|
+
"drawer"
|
|
75
|
+
];
|
|
76
|
+
function allowedNavTypes(layoutType, shellMode) {
|
|
77
|
+
switch (layoutType) {
|
|
78
|
+
case "vertical": return [
|
|
79
|
+
"sidebar",
|
|
80
|
+
"dockbar",
|
|
81
|
+
"minidock"
|
|
82
|
+
];
|
|
83
|
+
case "horizontal": return shellMode === "desktop" ? ["desktop"] : ["navbar", "flyout"];
|
|
84
|
+
default: return [];
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
function allowedNavTypeModes(navType) {
|
|
88
|
+
switch (navType) {
|
|
89
|
+
case "sidebar": return ["default", "collapsed"];
|
|
90
|
+
case "dockbar": return ["default", "drawer"];
|
|
91
|
+
default: return ["default"];
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function isWidthEnabled(layoutType, width) {
|
|
95
|
+
return width !== "fluid" || layoutType === "fluid";
|
|
96
|
+
}
|
|
97
|
+
var ThemeSettingsDefaultAdapter = class ThemeSettingsDefaultAdapter {
|
|
98
|
+
platformId = inject(PLATFORM_ID);
|
|
99
|
+
storage = globalLocalStorage(isPlatformBrowser(this.platformId));
|
|
100
|
+
layout = inject(LayoutService);
|
|
101
|
+
shell = inject(ShellService);
|
|
102
|
+
surface = this.layout.surface;
|
|
103
|
+
appearance = this.layout.appearance;
|
|
104
|
+
width = this.layout.width;
|
|
105
|
+
layoutTypeState = signal(this.layout.getStoredType(), ...ngDevMode ? [{ debugName: "layoutTypeState" }] : /* istanbul ignore next */ []);
|
|
106
|
+
navTypeState = signal(this.readStoredNavType(), ...ngDevMode ? [{ debugName: "navTypeState" }] : /* istanbul ignore next */ []);
|
|
107
|
+
navTypeModeState = signal(this.readStoredNavTypeMode(), ...ngDevMode ? [{ debugName: "navTypeModeState" }] : /* istanbul ignore next */ []);
|
|
108
|
+
layoutType = this.layoutTypeState.asReadonly();
|
|
109
|
+
navType = this.navTypeState.asReadonly();
|
|
110
|
+
navTypeMode = this.navTypeModeState.asReadonly();
|
|
111
|
+
shellMode = this.shell.mode;
|
|
112
|
+
constructor() {
|
|
113
|
+
effect(() => this.enforceConstraints(this.layoutTypeState(), this.shell.mode()));
|
|
114
|
+
}
|
|
115
|
+
setSurface(surface) {
|
|
116
|
+
this.layout.setSurface(surface);
|
|
117
|
+
}
|
|
118
|
+
setAppearance(appearance) {
|
|
119
|
+
this.layout.setAppearance(appearance);
|
|
120
|
+
}
|
|
121
|
+
setWidth(width) {
|
|
122
|
+
this.layout.setWidth(width);
|
|
123
|
+
}
|
|
124
|
+
setLayoutType(type) {
|
|
125
|
+
this.layoutTypeState.set(type);
|
|
126
|
+
this.storage.write(LAYOUT_TYPE_STORAGE_KEY, type);
|
|
127
|
+
this.enforceConstraints(type, this.shell.mode());
|
|
128
|
+
}
|
|
129
|
+
setNavType(type) {
|
|
130
|
+
if (!allowedNavTypes(this.layoutTypeState(), this.shell.mode()).includes(type)) return;
|
|
131
|
+
this.navTypeState.set(type);
|
|
132
|
+
this.storage.write(NAV_TYPE_STORAGE_KEY, type);
|
|
133
|
+
this.enforceNavTypeMode();
|
|
134
|
+
}
|
|
135
|
+
setNavTypeMode(mode) {
|
|
136
|
+
if (!allowedNavTypeModes(this.navTypeState()).includes(mode)) return;
|
|
137
|
+
this.navTypeModeState.set(mode);
|
|
138
|
+
this.storage.write(NAV_TYPE_MODE_STORAGE_KEY, mode);
|
|
139
|
+
}
|
|
140
|
+
enforceConstraints(type, shellMode) {
|
|
141
|
+
const navs = allowedNavTypes(type, shellMode);
|
|
142
|
+
if (navs.length && !navs.includes(this.navTypeState())) this.setNavType(navs[0]);
|
|
143
|
+
this.enforceNavTypeMode();
|
|
144
|
+
if (type === "fluid" && this.width() !== "fluid") this.setWidth("fluid");
|
|
145
|
+
else if (type !== "fluid" && this.width() === "fluid") this.setWidth("wide");
|
|
146
|
+
}
|
|
147
|
+
enforceNavTypeMode() {
|
|
148
|
+
const available = allowedNavTypeModes(this.navTypeState());
|
|
149
|
+
if (!available.includes(this.navTypeModeState())) this.setNavTypeMode(available[0]);
|
|
150
|
+
}
|
|
151
|
+
readStoredNavType() {
|
|
152
|
+
const stored = this.storage.read(NAV_TYPE_STORAGE_KEY);
|
|
153
|
+
return stored && NAV_TYPES.includes(stored) ? stored : "dockbar";
|
|
154
|
+
}
|
|
155
|
+
readStoredNavTypeMode() {
|
|
156
|
+
const stored = this.storage.read(NAV_TYPE_MODE_STORAGE_KEY);
|
|
157
|
+
return stored && NAV_TYPE_MODES.includes(stored) ? stored : "default";
|
|
158
|
+
}
|
|
159
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
160
|
+
minVersion: "12.0.0",
|
|
161
|
+
version: "22.2.3",
|
|
162
|
+
ngImport: i0,
|
|
163
|
+
type: ThemeSettingsDefaultAdapter,
|
|
164
|
+
deps: [],
|
|
165
|
+
target: i0.ɵɵFactoryTarget.Service
|
|
166
|
+
});
|
|
167
|
+
static ɵprov = i0.ɵɵngDeclareService({
|
|
168
|
+
minVersion: "22.0.0",
|
|
169
|
+
version: "22.2.3",
|
|
170
|
+
ngImport: i0,
|
|
171
|
+
type: ThemeSettingsDefaultAdapter
|
|
172
|
+
});
|
|
173
|
+
};
|
|
174
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
175
|
+
minVersion: "12.0.0",
|
|
176
|
+
version: "22.2.3",
|
|
177
|
+
ngImport: i0,
|
|
178
|
+
type: ThemeSettingsDefaultAdapter,
|
|
179
|
+
decorators: [{ type: Service }],
|
|
180
|
+
ctorParameters: () => []
|
|
181
|
+
});
|
|
182
|
+
function provideThemeSettingsAdapter() {
|
|
183
|
+
return [{
|
|
184
|
+
provide: THEME_SETTINGS_ADAPTER,
|
|
185
|
+
useExisting: ThemeSettingsDefaultAdapter
|
|
186
|
+
}];
|
|
187
|
+
}
|
|
188
|
+
function allowedNavTypes$1(adapter, shellMode) {
|
|
189
|
+
const layoutType = adapter?.layoutType();
|
|
190
|
+
return layoutType ? allowedNavTypes(layoutType, shellMode) : [];
|
|
191
|
+
}
|
|
192
|
+
function normalizeNavType(adapter, shellMode) {
|
|
193
|
+
const current = adapter?.navType();
|
|
194
|
+
const allowed = allowedNavTypes$1(adapter, shellMode);
|
|
195
|
+
if (current && allowed.length && !allowed.includes(current)) adapter?.setNavType(allowed[0]);
|
|
196
|
+
}
|
|
197
|
+
const DEFAULT_BRAND_HSL = [
|
|
198
|
+
262,
|
|
199
|
+
83,
|
|
200
|
+
58
|
|
201
|
+
];
|
|
202
|
+
const MODE_OPTIONS = [
|
|
203
|
+
{
|
|
204
|
+
value: "light",
|
|
205
|
+
label: "Light",
|
|
206
|
+
icon: "sun"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
value: "dark",
|
|
210
|
+
label: "Dark",
|
|
211
|
+
icon: "moon"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
value: "system",
|
|
215
|
+
label: "System",
|
|
216
|
+
icon: "monitor"
|
|
217
|
+
}
|
|
218
|
+
];
|
|
219
|
+
const SHELL_MODE_OPTIONS = [
|
|
220
|
+
{
|
|
221
|
+
value: "web",
|
|
222
|
+
label: "Web",
|
|
223
|
+
icon: "earth"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
value: "desktop",
|
|
227
|
+
label: "Desktop",
|
|
228
|
+
icon: "monitor"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
value: "tablet",
|
|
232
|
+
label: "Tablet",
|
|
233
|
+
icon: "tablet"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
value: "mobile",
|
|
237
|
+
label: "Mobile",
|
|
238
|
+
icon: "smartphone"
|
|
239
|
+
}
|
|
240
|
+
];
|
|
241
|
+
const SHELL_COLOR_OPTIONS = [{
|
|
242
|
+
value: "sync",
|
|
243
|
+
label: "Sync",
|
|
244
|
+
icon: "palette"
|
|
245
|
+
}, {
|
|
246
|
+
value: "default",
|
|
247
|
+
label: "Native",
|
|
248
|
+
icon: "app-window-mac"
|
|
249
|
+
}];
|
|
250
|
+
const SHELL_FRAME_OPTIONS = [{
|
|
251
|
+
value: "classic",
|
|
252
|
+
label: "Classic",
|
|
253
|
+
icon: "square"
|
|
254
|
+
}, {
|
|
255
|
+
value: "modern",
|
|
256
|
+
label: "Modern",
|
|
257
|
+
icon: "minimize"
|
|
258
|
+
}];
|
|
259
|
+
const SHELL_DEVICE_OPTIONS = {
|
|
260
|
+
browser: {
|
|
261
|
+
value: "browser",
|
|
262
|
+
label: "Browser",
|
|
263
|
+
icon: "globe"
|
|
264
|
+
},
|
|
265
|
+
macos: {
|
|
266
|
+
value: "macos",
|
|
267
|
+
label: "macOS",
|
|
268
|
+
icon: "laptop"
|
|
269
|
+
},
|
|
270
|
+
windows: {
|
|
271
|
+
value: "windows",
|
|
272
|
+
label: "Windows",
|
|
273
|
+
icon: "laptop-minimal"
|
|
274
|
+
},
|
|
275
|
+
linux: {
|
|
276
|
+
value: "linux",
|
|
277
|
+
label: "Linux",
|
|
278
|
+
icon: "terminal"
|
|
279
|
+
},
|
|
280
|
+
ipad: {
|
|
281
|
+
value: "ipad",
|
|
282
|
+
label: "iPad",
|
|
283
|
+
icon: "tablet"
|
|
284
|
+
},
|
|
285
|
+
android: {
|
|
286
|
+
value: "android",
|
|
287
|
+
label: "Android",
|
|
288
|
+
icon: "bot"
|
|
289
|
+
},
|
|
290
|
+
ios: {
|
|
291
|
+
value: "ios",
|
|
292
|
+
label: "iOS",
|
|
293
|
+
icon: "smartphone"
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
const RADIUS_OPTIONS = [
|
|
297
|
+
{
|
|
298
|
+
value: "none",
|
|
299
|
+
label: "None",
|
|
300
|
+
icon: "square"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
value: "xs",
|
|
304
|
+
label: "Xs",
|
|
305
|
+
icon: "square-round-corner"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
value: "sm",
|
|
309
|
+
label: "Sm",
|
|
310
|
+
icon: "square-round-corner"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
value: "md",
|
|
314
|
+
label: "Md",
|
|
315
|
+
icon: "square-round-corner"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
value: "xl",
|
|
319
|
+
label: "Xl",
|
|
320
|
+
icon: "square-round-corner"
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
value: "full",
|
|
324
|
+
label: "Full",
|
|
325
|
+
icon: "circle"
|
|
326
|
+
}
|
|
327
|
+
];
|
|
328
|
+
const SPACE_OPTIONS = [{
|
|
329
|
+
value: "compact",
|
|
330
|
+
label: "Compact",
|
|
331
|
+
icon: "rows-4"
|
|
332
|
+
}, {
|
|
333
|
+
value: "normal",
|
|
334
|
+
label: "Normal",
|
|
335
|
+
icon: "rows-3"
|
|
336
|
+
}];
|
|
337
|
+
const APPEARANCE_OPTIONS = [{
|
|
338
|
+
value: "flat",
|
|
339
|
+
label: "Flat",
|
|
340
|
+
icon: "app-window"
|
|
341
|
+
}, {
|
|
342
|
+
value: "border-rail",
|
|
343
|
+
label: "Border rail",
|
|
344
|
+
icon: "square"
|
|
345
|
+
}];
|
|
346
|
+
const SURFACE_OPTIONS = [
|
|
347
|
+
{
|
|
348
|
+
value: "flat",
|
|
349
|
+
label: "Flat",
|
|
350
|
+
icon: "droplet-off"
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
value: "grid",
|
|
354
|
+
label: "Grid",
|
|
355
|
+
icon: "grid-3x3"
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
value: "grid-line",
|
|
359
|
+
label: "Grid line",
|
|
360
|
+
icon: "layout-grid"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
value: "honeycomb",
|
|
364
|
+
label: "Honeycomb",
|
|
365
|
+
icon: "hexagon"
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
value: "matrix",
|
|
369
|
+
label: "Matrix",
|
|
370
|
+
icon: "braces"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
value: "circuit",
|
|
374
|
+
label: "Circuit",
|
|
375
|
+
icon: "cpu"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
value: "line-vertical",
|
|
379
|
+
label: "Vertical lines",
|
|
380
|
+
icon: "columns-3"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
value: "line-horizontal",
|
|
384
|
+
label: "Horizontal lines",
|
|
385
|
+
icon: "rows-2"
|
|
386
|
+
}
|
|
387
|
+
];
|
|
388
|
+
const LAYOUT_TYPE_OPTIONS = [
|
|
389
|
+
{
|
|
390
|
+
value: "vertical",
|
|
391
|
+
label: "Vertical",
|
|
392
|
+
icon: "panel-right"
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
value: "horizontal",
|
|
396
|
+
label: "Horizontal",
|
|
397
|
+
icon: "gallery-vertical"
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
value: "empty",
|
|
401
|
+
label: "Empty",
|
|
402
|
+
icon: "scan"
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
value: "fluid",
|
|
406
|
+
label: "Fluid",
|
|
407
|
+
icon: "maximize"
|
|
408
|
+
}
|
|
409
|
+
];
|
|
410
|
+
const WIDTH_OPTIONS = [
|
|
411
|
+
{
|
|
412
|
+
value: "full",
|
|
413
|
+
label: "Full",
|
|
414
|
+
icon: "move-horizontal"
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
value: "wide",
|
|
418
|
+
label: "Wide",
|
|
419
|
+
icon: "unfold-horizontal"
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
value: "container",
|
|
423
|
+
label: "Container",
|
|
424
|
+
icon: "stretch-horizontal"
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
value: "fluid",
|
|
428
|
+
label: "Fluid",
|
|
429
|
+
icon: "ratio"
|
|
430
|
+
}
|
|
431
|
+
];
|
|
432
|
+
const NAV_TYPE_OPTIONS = [
|
|
433
|
+
{
|
|
434
|
+
value: "sidebar",
|
|
435
|
+
label: "Sidebar",
|
|
436
|
+
icon: "panel-left-open"
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
value: "dockbar",
|
|
440
|
+
label: "Dockbar",
|
|
441
|
+
icon: "panel-left"
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
value: "minidock",
|
|
445
|
+
label: "Minidock",
|
|
446
|
+
icon: "panel-left-close"
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
value: "navbar",
|
|
450
|
+
label: "Navbar",
|
|
451
|
+
icon: "menu"
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
value: "flyout",
|
|
455
|
+
label: "Flyout",
|
|
456
|
+
icon: "external-link"
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
value: "desktop",
|
|
460
|
+
label: "Desktop",
|
|
461
|
+
icon: "monitor"
|
|
462
|
+
}
|
|
463
|
+
];
|
|
464
|
+
const ACCENT_SWATCH = {
|
|
465
|
+
base: "hsl(240 6% 10%)",
|
|
466
|
+
red: "hsl(0 72% 48%)",
|
|
467
|
+
orange: "hsl(24 95% 48%)",
|
|
468
|
+
amber: "hsl(38 92% 48%)",
|
|
469
|
+
yellow: "hsl(48 96% 48%)",
|
|
470
|
+
lime: "hsl(84 78% 44%)",
|
|
471
|
+
green: "hsl(142 69% 40%)",
|
|
472
|
+
emerald: "hsl(160 78% 38%)",
|
|
473
|
+
teal: "hsl(173 75% 38%)",
|
|
474
|
+
cyan: "hsl(191 85% 40%)",
|
|
475
|
+
sky: "hsl(199 89% 46%)",
|
|
476
|
+
blue: "hsl(221 83% 53%)",
|
|
477
|
+
indigo: "hsl(239 78% 60%)",
|
|
478
|
+
violet: "hsl(258 86% 62%)",
|
|
479
|
+
purple: "hsl(271 81% 56%)",
|
|
480
|
+
fuchsia: "hsl(292 80% 56%)",
|
|
481
|
+
pink: "hsl(330 78% 54%)",
|
|
482
|
+
rose: "hsl(349 84% 52%)",
|
|
483
|
+
brand: "hsl(var(--brand))"
|
|
484
|
+
};
|
|
485
|
+
const NEUTRAL_SWATCH = {
|
|
486
|
+
base: "hsl(220 9% 46%)",
|
|
487
|
+
slate: "hsl(215 16% 47%)",
|
|
488
|
+
gray: "hsl(220 9% 46%)",
|
|
489
|
+
zinc: "hsl(240 5% 46%)",
|
|
490
|
+
neutral: "hsl(0 0% 46%)",
|
|
491
|
+
stone: "hsl(30 6% 46%)",
|
|
492
|
+
mauve: "hsl(280 6% 47%)",
|
|
493
|
+
olive: "hsl(80 8% 42%)",
|
|
494
|
+
mist: "hsl(200 14% 50%)",
|
|
495
|
+
taupe: "hsl(28 10% 46%)"
|
|
496
|
+
};
|
|
497
|
+
var ThemeSettingsLayoutSectionComponent = class ThemeSettingsLayoutSectionComponent {
|
|
498
|
+
shell = inject(ShellService);
|
|
499
|
+
settings = inject(THEME_SETTINGS_ADAPTER);
|
|
500
|
+
shellMode = this.shell.mode;
|
|
501
|
+
widthLocked = computed(() => this.shellMode() !== "web", ...ngDevMode ? [{ debugName: "widthLocked" }] : /* istanbul ignore next */ []);
|
|
502
|
+
appearanceOptions = APPEARANCE_OPTIONS;
|
|
503
|
+
surfaceOptions = SURFACE_OPTIONS;
|
|
504
|
+
layoutTypeOptions = LAYOUT_TYPE_OPTIONS;
|
|
505
|
+
widthOptions = computed(() => WIDTH_OPTIONS.map((option) => ({
|
|
506
|
+
...option,
|
|
507
|
+
disabled: this.widthLocked() && option.value !== LAYOUT_LOCKED_WIDTH || option.value === "fluid" && this.settings.layoutType() !== "fluid"
|
|
508
|
+
})), ...ngDevMode ? [{ debugName: "widthOptions" }] : /* istanbul ignore next */ []);
|
|
509
|
+
layoutGroupId = injectUniqueId("theme-settings-layout");
|
|
510
|
+
appearanceLabelId = injectUniqueId("theme-settings-appearance");
|
|
511
|
+
surfaceLabelId = injectUniqueId("theme-settings-surface");
|
|
512
|
+
layoutTypeLabelId = injectUniqueId("theme-settings-layout-type");
|
|
513
|
+
widthLabelId = injectUniqueId("theme-settings-width");
|
|
514
|
+
setAppearance(value) {
|
|
515
|
+
if (value === "flat" || value === "border-rail") this.settings.setAppearance(value);
|
|
516
|
+
}
|
|
517
|
+
setSurface(value) {
|
|
518
|
+
if (SURFACE_OPTIONS.some((option) => option.value === value)) this.settings.setSurface(value);
|
|
519
|
+
}
|
|
520
|
+
setLayoutType(value) {
|
|
521
|
+
if (LAYOUT_TYPE_OPTIONS.some((option) => option.value === value)) {
|
|
522
|
+
this.settings.setLayoutType(value);
|
|
523
|
+
normalizeNavType(this.settings, this.shellMode());
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
setWidth(value) {
|
|
527
|
+
if (this.widthLocked()) return;
|
|
528
|
+
if (WIDTH_OPTIONS.some((option) => option.value === value)) this.settings.setWidth(value);
|
|
529
|
+
}
|
|
530
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
531
|
+
minVersion: "12.0.0",
|
|
532
|
+
version: "22.2.3",
|
|
533
|
+
ngImport: i0,
|
|
534
|
+
type: ThemeSettingsLayoutSectionComponent,
|
|
535
|
+
deps: [],
|
|
536
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
537
|
+
});
|
|
538
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
539
|
+
minVersion: "17.0.0",
|
|
540
|
+
version: "22.2.3",
|
|
541
|
+
type: ThemeSettingsLayoutSectionComponent,
|
|
542
|
+
isStandalone: true,
|
|
543
|
+
selector: "ThemeSettingsLayoutSection",
|
|
544
|
+
host: { classAttribute: "contents" },
|
|
545
|
+
providers: [provideIcons(...THEME_SETTINGS_ICONS)],
|
|
546
|
+
ngImport: i0,
|
|
547
|
+
template: `
|
|
548
|
+
<section
|
|
549
|
+
class="flex flex-col gap-5 border-t border-border pt-7"
|
|
550
|
+
[attr.aria-labelledby]="layoutGroupId"
|
|
551
|
+
>
|
|
552
|
+
<h2 [id]="layoutGroupId" class="nav-heading text-foreground">Layout</h2>
|
|
553
|
+
<div class="flex flex-col gap-2">
|
|
554
|
+
<h3 [id]="appearanceLabelId" class="nav-heading text-muted-foreground">
|
|
555
|
+
Layout appearance
|
|
556
|
+
</h3>
|
|
557
|
+
<SegmentedControl
|
|
558
|
+
appearance="icon-text"
|
|
559
|
+
space="compact"
|
|
560
|
+
[value]="settings.appearance()"
|
|
561
|
+
[options]="appearanceOptions"
|
|
562
|
+
[aria-labelledby]="appearanceLabelId"
|
|
563
|
+
(valueChange)="setAppearance($event)"
|
|
564
|
+
/>
|
|
565
|
+
</div>
|
|
566
|
+
<div class="flex flex-col gap-2">
|
|
567
|
+
<h3 [id]="surfaceLabelId" class="nav-heading text-muted-foreground">Layout surface</h3>
|
|
568
|
+
<SegmentedControl
|
|
569
|
+
appearance="icon-text"
|
|
570
|
+
space="compact"
|
|
571
|
+
[value]="settings.surface()"
|
|
572
|
+
[options]="surfaceOptions"
|
|
573
|
+
[aria-labelledby]="surfaceLabelId"
|
|
574
|
+
(valueChange)="setSurface($event)"
|
|
575
|
+
/>
|
|
576
|
+
</div>
|
|
577
|
+
<div class="flex flex-col gap-2">
|
|
578
|
+
<h3 [id]="layoutTypeLabelId" class="nav-heading text-muted-foreground">Layout type</h3>
|
|
579
|
+
<SegmentedControl
|
|
580
|
+
appearance="icon-text"
|
|
581
|
+
space="compact"
|
|
582
|
+
[value]="settings.layoutType()"
|
|
583
|
+
[options]="layoutTypeOptions"
|
|
584
|
+
[aria-labelledby]="layoutTypeLabelId"
|
|
585
|
+
(valueChange)="setLayoutType($event)"
|
|
586
|
+
/>
|
|
587
|
+
</div>
|
|
588
|
+
<div class="flex flex-col gap-2">
|
|
589
|
+
<h3 [id]="widthLabelId" class="nav-heading text-muted-foreground">Layout width</h3>
|
|
590
|
+
<SegmentedControl
|
|
591
|
+
appearance="icon-text"
|
|
592
|
+
space="compact"
|
|
593
|
+
[value]="settings.width()"
|
|
594
|
+
[options]="widthOptions()"
|
|
595
|
+
[aria-labelledby]="widthLabelId"
|
|
596
|
+
(valueChange)="setWidth($event)"
|
|
597
|
+
/>
|
|
598
|
+
@if (widthLocked()) {
|
|
599
|
+
<p class="text-xs text-muted-foreground" aria-live="polite">
|
|
600
|
+
Locked to full on {{ shellMode() }}: the app is the whole surface, so there is no page
|
|
601
|
+
to inset the frame within.
|
|
602
|
+
</p>
|
|
603
|
+
}
|
|
604
|
+
</div>
|
|
605
|
+
</section>
|
|
606
|
+
`,
|
|
607
|
+
isInline: true,
|
|
608
|
+
dependencies: [{
|
|
609
|
+
kind: "component",
|
|
610
|
+
type: SegmentedControlComponent,
|
|
611
|
+
selector: "SegmentedControl",
|
|
612
|
+
inputs: [
|
|
613
|
+
"options",
|
|
614
|
+
"value",
|
|
615
|
+
"appearance",
|
|
616
|
+
"space",
|
|
617
|
+
"disabled",
|
|
618
|
+
"aria-label",
|
|
619
|
+
"aria-labelledby",
|
|
620
|
+
"aria-describedby",
|
|
621
|
+
"class"
|
|
622
|
+
],
|
|
623
|
+
outputs: ["valueChange"]
|
|
624
|
+
}]
|
|
625
|
+
});
|
|
626
|
+
};
|
|
627
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
628
|
+
minVersion: "12.0.0",
|
|
629
|
+
version: "22.2.3",
|
|
630
|
+
ngImport: i0,
|
|
631
|
+
type: ThemeSettingsLayoutSectionComponent,
|
|
632
|
+
decorators: [{
|
|
633
|
+
type: Component,
|
|
634
|
+
args: [{
|
|
635
|
+
selector: "ThemeSettingsLayoutSection",
|
|
636
|
+
providers: [provideIcons(...THEME_SETTINGS_ICONS)],
|
|
637
|
+
imports: [SegmentedControlComponent],
|
|
638
|
+
host: { class: "contents" },
|
|
639
|
+
template: `
|
|
640
|
+
<section
|
|
641
|
+
class="flex flex-col gap-5 border-t border-border pt-7"
|
|
642
|
+
[attr.aria-labelledby]="layoutGroupId"
|
|
643
|
+
>
|
|
644
|
+
<h2 [id]="layoutGroupId" class="nav-heading text-foreground">Layout</h2>
|
|
645
|
+
<div class="flex flex-col gap-2">
|
|
646
|
+
<h3 [id]="appearanceLabelId" class="nav-heading text-muted-foreground">
|
|
647
|
+
Layout appearance
|
|
648
|
+
</h3>
|
|
649
|
+
<SegmentedControl
|
|
650
|
+
appearance="icon-text"
|
|
651
|
+
space="compact"
|
|
652
|
+
[value]="settings.appearance()"
|
|
653
|
+
[options]="appearanceOptions"
|
|
654
|
+
[aria-labelledby]="appearanceLabelId"
|
|
655
|
+
(valueChange)="setAppearance($event)"
|
|
656
|
+
/>
|
|
657
|
+
</div>
|
|
658
|
+
<div class="flex flex-col gap-2">
|
|
659
|
+
<h3 [id]="surfaceLabelId" class="nav-heading text-muted-foreground">Layout surface</h3>
|
|
660
|
+
<SegmentedControl
|
|
661
|
+
appearance="icon-text"
|
|
662
|
+
space="compact"
|
|
663
|
+
[value]="settings.surface()"
|
|
664
|
+
[options]="surfaceOptions"
|
|
665
|
+
[aria-labelledby]="surfaceLabelId"
|
|
666
|
+
(valueChange)="setSurface($event)"
|
|
667
|
+
/>
|
|
668
|
+
</div>
|
|
669
|
+
<div class="flex flex-col gap-2">
|
|
670
|
+
<h3 [id]="layoutTypeLabelId" class="nav-heading text-muted-foreground">Layout type</h3>
|
|
671
|
+
<SegmentedControl
|
|
672
|
+
appearance="icon-text"
|
|
673
|
+
space="compact"
|
|
674
|
+
[value]="settings.layoutType()"
|
|
675
|
+
[options]="layoutTypeOptions"
|
|
676
|
+
[aria-labelledby]="layoutTypeLabelId"
|
|
677
|
+
(valueChange)="setLayoutType($event)"
|
|
678
|
+
/>
|
|
679
|
+
</div>
|
|
680
|
+
<div class="flex flex-col gap-2">
|
|
681
|
+
<h3 [id]="widthLabelId" class="nav-heading text-muted-foreground">Layout width</h3>
|
|
682
|
+
<SegmentedControl
|
|
683
|
+
appearance="icon-text"
|
|
684
|
+
space="compact"
|
|
685
|
+
[value]="settings.width()"
|
|
686
|
+
[options]="widthOptions()"
|
|
687
|
+
[aria-labelledby]="widthLabelId"
|
|
688
|
+
(valueChange)="setWidth($event)"
|
|
689
|
+
/>
|
|
690
|
+
@if (widthLocked()) {
|
|
691
|
+
<p class="text-xs text-muted-foreground" aria-live="polite">
|
|
692
|
+
Locked to full on {{ shellMode() }}: the app is the whole surface, so there is no page
|
|
693
|
+
to inset the frame within.
|
|
694
|
+
</p>
|
|
695
|
+
}
|
|
696
|
+
</div>
|
|
697
|
+
</section>
|
|
698
|
+
`
|
|
699
|
+
}]
|
|
700
|
+
}]
|
|
701
|
+
});
|
|
702
|
+
var ThemeSettingsNavigationSectionComponent = class ThemeSettingsNavigationSectionComponent {
|
|
703
|
+
shell = inject(ShellService);
|
|
704
|
+
settings = inject(THEME_SETTINGS_ADAPTER);
|
|
705
|
+
navTypeOptions = computed(() => NAV_TYPE_OPTIONS.map((option) => ({
|
|
706
|
+
...option,
|
|
707
|
+
disabled: !allowedNavTypes$1(this.settings, this.shell.mode()).includes(option.value)
|
|
708
|
+
})), ...ngDevMode ? [{ debugName: "navTypeOptions" }] : /* istanbul ignore next */ []);
|
|
709
|
+
navTypeModeOptions = computed(() => {
|
|
710
|
+
switch (this.settings.navType()) {
|
|
711
|
+
case "sidebar": return [{
|
|
712
|
+
value: "default",
|
|
713
|
+
label: "Default",
|
|
714
|
+
icon: "panel-right"
|
|
715
|
+
}, {
|
|
716
|
+
value: "collapsed",
|
|
717
|
+
label: "Collapsed",
|
|
718
|
+
icon: "chevrons-left"
|
|
719
|
+
}];
|
|
720
|
+
case "dockbar": return [{
|
|
721
|
+
value: "default",
|
|
722
|
+
label: "Sticky",
|
|
723
|
+
icon: "panel-left"
|
|
724
|
+
}, {
|
|
725
|
+
value: "drawer",
|
|
726
|
+
label: "Drawer",
|
|
727
|
+
icon: "panel-left-dashed"
|
|
728
|
+
}];
|
|
729
|
+
default: return [{
|
|
730
|
+
value: "default",
|
|
731
|
+
label: "Default",
|
|
732
|
+
icon: "sliders-horizontal"
|
|
733
|
+
}];
|
|
734
|
+
}
|
|
735
|
+
}, ...ngDevMode ? [{ debugName: "navTypeModeOptions" }] : /* istanbul ignore next */ []);
|
|
736
|
+
navigationGroupId = injectUniqueId("theme-settings-navigation");
|
|
737
|
+
navTypeLabelId = injectUniqueId("theme-settings-nav-type");
|
|
738
|
+
navTypeModeLabelId = injectUniqueId("theme-settings-nav-type-mode");
|
|
739
|
+
setNavType(value) {
|
|
740
|
+
if (value && allowedNavTypes$1(this.settings, this.shell.mode()).includes(value)) this.settings.setNavType(value);
|
|
741
|
+
}
|
|
742
|
+
setNavTypeMode(value) {
|
|
743
|
+
if (value === "default" || value === "collapsed" || value === "drawer") this.settings.setNavTypeMode(value);
|
|
744
|
+
}
|
|
745
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
746
|
+
minVersion: "12.0.0",
|
|
747
|
+
version: "22.2.3",
|
|
748
|
+
ngImport: i0,
|
|
749
|
+
type: ThemeSettingsNavigationSectionComponent,
|
|
750
|
+
deps: [],
|
|
751
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
752
|
+
});
|
|
753
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
754
|
+
minVersion: "14.0.0",
|
|
755
|
+
version: "22.2.3",
|
|
756
|
+
type: ThemeSettingsNavigationSectionComponent,
|
|
757
|
+
isStandalone: true,
|
|
758
|
+
selector: "ThemeSettingsNavigationSection",
|
|
759
|
+
host: { classAttribute: "contents" },
|
|
760
|
+
providers: [provideIcons(...THEME_SETTINGS_ICONS)],
|
|
761
|
+
ngImport: i0,
|
|
762
|
+
template: `
|
|
763
|
+
<section
|
|
764
|
+
class="flex flex-col gap-5 border-t border-border pt-7"
|
|
765
|
+
[attr.aria-labelledby]="navigationGroupId"
|
|
766
|
+
>
|
|
767
|
+
<h2 [id]="navigationGroupId" class="nav-heading text-foreground">Navigation</h2>
|
|
768
|
+
<div class="flex flex-col gap-2">
|
|
769
|
+
<h3 [id]="navTypeLabelId" class="nav-heading text-muted-foreground">Nav type</h3>
|
|
770
|
+
<SegmentedControl
|
|
771
|
+
appearance="icon-text"
|
|
772
|
+
space="compact"
|
|
773
|
+
[value]="settings.navType()"
|
|
774
|
+
[options]="navTypeOptions()"
|
|
775
|
+
[aria-labelledby]="navTypeLabelId"
|
|
776
|
+
(valueChange)="setNavType($event)"
|
|
777
|
+
/>
|
|
778
|
+
</div>
|
|
779
|
+
<div class="flex flex-col gap-2">
|
|
780
|
+
<h3 [id]="navTypeModeLabelId" class="nav-heading text-muted-foreground">Nav type mode</h3>
|
|
781
|
+
<SegmentedControl
|
|
782
|
+
appearance="icon-text"
|
|
783
|
+
space="compact"
|
|
784
|
+
[value]="settings.navTypeMode()"
|
|
785
|
+
[options]="navTypeModeOptions()"
|
|
786
|
+
[aria-labelledby]="navTypeModeLabelId"
|
|
787
|
+
(valueChange)="setNavTypeMode($event)"
|
|
788
|
+
/>
|
|
789
|
+
</div>
|
|
790
|
+
</section>
|
|
791
|
+
`,
|
|
792
|
+
isInline: true,
|
|
793
|
+
dependencies: [{
|
|
794
|
+
kind: "component",
|
|
795
|
+
type: SegmentedControlComponent,
|
|
796
|
+
selector: "SegmentedControl",
|
|
797
|
+
inputs: [
|
|
798
|
+
"options",
|
|
799
|
+
"value",
|
|
800
|
+
"appearance",
|
|
801
|
+
"space",
|
|
802
|
+
"disabled",
|
|
803
|
+
"aria-label",
|
|
804
|
+
"aria-labelledby",
|
|
805
|
+
"aria-describedby",
|
|
806
|
+
"class"
|
|
807
|
+
],
|
|
808
|
+
outputs: ["valueChange"]
|
|
809
|
+
}]
|
|
810
|
+
});
|
|
811
|
+
};
|
|
812
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
813
|
+
minVersion: "12.0.0",
|
|
814
|
+
version: "22.2.3",
|
|
815
|
+
ngImport: i0,
|
|
816
|
+
type: ThemeSettingsNavigationSectionComponent,
|
|
817
|
+
decorators: [{
|
|
818
|
+
type: Component,
|
|
819
|
+
args: [{
|
|
820
|
+
selector: "ThemeSettingsNavigationSection",
|
|
821
|
+
providers: [provideIcons(...THEME_SETTINGS_ICONS)],
|
|
822
|
+
imports: [SegmentedControlComponent],
|
|
823
|
+
host: { class: "contents" },
|
|
824
|
+
template: `
|
|
825
|
+
<section
|
|
826
|
+
class="flex flex-col gap-5 border-t border-border pt-7"
|
|
827
|
+
[attr.aria-labelledby]="navigationGroupId"
|
|
828
|
+
>
|
|
829
|
+
<h2 [id]="navigationGroupId" class="nav-heading text-foreground">Navigation</h2>
|
|
830
|
+
<div class="flex flex-col gap-2">
|
|
831
|
+
<h3 [id]="navTypeLabelId" class="nav-heading text-muted-foreground">Nav type</h3>
|
|
832
|
+
<SegmentedControl
|
|
833
|
+
appearance="icon-text"
|
|
834
|
+
space="compact"
|
|
835
|
+
[value]="settings.navType()"
|
|
836
|
+
[options]="navTypeOptions()"
|
|
837
|
+
[aria-labelledby]="navTypeLabelId"
|
|
838
|
+
(valueChange)="setNavType($event)"
|
|
839
|
+
/>
|
|
840
|
+
</div>
|
|
841
|
+
<div class="flex flex-col gap-2">
|
|
842
|
+
<h3 [id]="navTypeModeLabelId" class="nav-heading text-muted-foreground">Nav type mode</h3>
|
|
843
|
+
<SegmentedControl
|
|
844
|
+
appearance="icon-text"
|
|
845
|
+
space="compact"
|
|
846
|
+
[value]="settings.navTypeMode()"
|
|
847
|
+
[options]="navTypeModeOptions()"
|
|
848
|
+
[aria-labelledby]="navTypeModeLabelId"
|
|
849
|
+
(valueChange)="setNavTypeMode($event)"
|
|
850
|
+
/>
|
|
851
|
+
</div>
|
|
852
|
+
</section>
|
|
853
|
+
`
|
|
854
|
+
}]
|
|
855
|
+
}]
|
|
856
|
+
});
|
|
857
|
+
var ThemeSettingsShellSectionComponent = class ThemeSettingsShellSectionComponent {
|
|
858
|
+
shell = inject(ShellService);
|
|
859
|
+
settings = inject(THEME_SETTINGS_ADAPTER, { optional: true });
|
|
860
|
+
shellMode = this.shell.mode;
|
|
861
|
+
shellColor = this.shell.color;
|
|
862
|
+
shellFrame = this.shell.frame;
|
|
863
|
+
shellFrameOptions = computed(() => SHELL_FRAME_OPTIONS.map((option) => ({
|
|
864
|
+
...option,
|
|
865
|
+
disabled: option.value === "modern" && this.shellMode() !== "desktop"
|
|
866
|
+
})), ...ngDevMode ? [{ debugName: "shellFrameOptions" }] : /* istanbul ignore next */ []);
|
|
867
|
+
shellDevice = computed(() => resolveShellDeviceForMode(this.shellMode(), this.shell.device()), ...ngDevMode ? [{ debugName: "shellDevice" }] : /* istanbul ignore next */ []);
|
|
868
|
+
shellDeviceOptions = computed(() => shellDevicesForMode(this.shellMode()).map((device) => SHELL_DEVICE_OPTIONS[device]), ...ngDevMode ? [{ debugName: "shellDeviceOptions" }] : /* istanbul ignore next */ []);
|
|
869
|
+
shellModeOptions = SHELL_MODE_OPTIONS;
|
|
870
|
+
shellColorOptions = SHELL_COLOR_OPTIONS;
|
|
871
|
+
shellGroupId = injectUniqueId("theme-settings-shell");
|
|
872
|
+
shellModeLabelId = injectUniqueId("theme-settings-shell-mode");
|
|
873
|
+
shellDeviceLabelId = injectUniqueId("theme-settings-shell-device");
|
|
874
|
+
shellColorLabelId = injectUniqueId("theme-settings-shell-color");
|
|
875
|
+
shellFrameLabelId = injectUniqueId("theme-settings-shell-frame");
|
|
876
|
+
setShellMode(value) {
|
|
877
|
+
if (SHELL_MODES.includes(value)) {
|
|
878
|
+
this.shell.setMode(value);
|
|
879
|
+
normalizeNavType(this.settings, this.shellMode());
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
setShellDevice(value) {
|
|
883
|
+
if (value && isShellDeviceForMode(this.shellMode(), value)) this.shell.setDevice(value);
|
|
884
|
+
}
|
|
885
|
+
setShellFrame(value) {
|
|
886
|
+
if (value === "modern" && this.shellMode() !== "desktop") return;
|
|
887
|
+
if (SHELL_FRAMES.includes(value)) this.shell.setFrame(value);
|
|
888
|
+
}
|
|
889
|
+
setShellColor(value) {
|
|
890
|
+
if (SHELL_COLORS.includes(value)) this.shell.setColor(value);
|
|
891
|
+
}
|
|
892
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
893
|
+
minVersion: "12.0.0",
|
|
894
|
+
version: "22.2.3",
|
|
895
|
+
ngImport: i0,
|
|
896
|
+
type: ThemeSettingsShellSectionComponent,
|
|
897
|
+
deps: [],
|
|
898
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
899
|
+
});
|
|
900
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
901
|
+
minVersion: "17.0.0",
|
|
902
|
+
version: "22.2.3",
|
|
903
|
+
type: ThemeSettingsShellSectionComponent,
|
|
904
|
+
isStandalone: true,
|
|
905
|
+
selector: "ThemeSettingsShellSection",
|
|
906
|
+
host: { classAttribute: "contents" },
|
|
907
|
+
providers: [provideIcons(...THEME_SETTINGS_ICONS)],
|
|
908
|
+
ngImport: i0,
|
|
909
|
+
template: `
|
|
910
|
+
<section
|
|
911
|
+
class="flex flex-col gap-5 border-t border-border pt-7"
|
|
912
|
+
[attr.aria-labelledby]="shellGroupId"
|
|
913
|
+
>
|
|
914
|
+
<h2 [id]="shellGroupId" class="nav-heading text-foreground">Shell</h2>
|
|
915
|
+
<div class="flex flex-col gap-2">
|
|
916
|
+
<h3 [id]="shellModeLabelId" class="nav-heading text-muted-foreground">Shell mode</h3>
|
|
917
|
+
<SegmentedControl
|
|
918
|
+
appearance="icon-text"
|
|
919
|
+
space="compact"
|
|
920
|
+
[value]="shellMode()"
|
|
921
|
+
[options]="shellModeOptions"
|
|
922
|
+
[aria-labelledby]="shellModeLabelId"
|
|
923
|
+
(valueChange)="setShellMode($event)"
|
|
924
|
+
/>
|
|
925
|
+
<p class="text-xs text-muted-foreground">
|
|
926
|
+
Where the app is delivered. Only <code>web</code> is a page inside a browser; the others
|
|
927
|
+
own the whole surface, so the layout width locks to full.
|
|
928
|
+
</p>
|
|
929
|
+
</div>
|
|
930
|
+
<div class="flex flex-col gap-2">
|
|
931
|
+
<h3 [id]="shellDeviceLabelId" class="nav-heading text-muted-foreground">Shell device</h3>
|
|
932
|
+
<SegmentedControl
|
|
933
|
+
appearance="icon-text"
|
|
934
|
+
space="compact"
|
|
935
|
+
[value]="shellDevice()"
|
|
936
|
+
[options]="shellDeviceOptions()"
|
|
937
|
+
[aria-labelledby]="shellDeviceLabelId"
|
|
938
|
+
(valueChange)="setShellDevice($event)"
|
|
939
|
+
/>
|
|
940
|
+
<p class="text-xs text-muted-foreground">
|
|
941
|
+
Which host the shell runs on. Only the devices the active mode can host are offered —
|
|
942
|
+
<code>android</code> ships on both tablet and mobile, so only the mode tells those apart.
|
|
943
|
+
</p>
|
|
944
|
+
</div>
|
|
945
|
+
<div class="flex flex-col gap-2">
|
|
946
|
+
<h3 [id]="shellFrameLabelId" class="nav-heading text-muted-foreground">Shell frame</h3>
|
|
947
|
+
<SegmentedControl
|
|
948
|
+
appearance="icon-text"
|
|
949
|
+
space="compact"
|
|
950
|
+
[value]="shellFrame()"
|
|
951
|
+
[options]="shellFrameOptions()"
|
|
952
|
+
[aria-labelledby]="shellFrameLabelId"
|
|
953
|
+
(valueChange)="setShellFrame($event)"
|
|
954
|
+
/>
|
|
955
|
+
<p class="text-xs text-muted-foreground">
|
|
956
|
+
@if (shellMode() === 'desktop') {
|
|
957
|
+
<code>modern</code> insets the app as a panel and fuses the titlebar with the surround
|
|
958
|
+
into one frame; <code>classic</code> keeps it flush under a bordered bar.
|
|
959
|
+
} @else {
|
|
960
|
+
Only a desktop window has a frame to shape, so this stays
|
|
961
|
+
<code>classic</code> on {{ shellMode() }}.
|
|
962
|
+
}
|
|
963
|
+
</p>
|
|
964
|
+
</div>
|
|
965
|
+
<div class="flex flex-col gap-2">
|
|
966
|
+
<h3 [id]="shellColorLabelId" class="nav-heading text-muted-foreground">Shell color</h3>
|
|
967
|
+
<SegmentedControl
|
|
968
|
+
appearance="icon-text"
|
|
969
|
+
space="compact"
|
|
970
|
+
[value]="shellColor()"
|
|
971
|
+
[options]="shellColorOptions"
|
|
972
|
+
[aria-labelledby]="shellColorLabelId"
|
|
973
|
+
(valueChange)="setShellColor($event)"
|
|
974
|
+
/>
|
|
975
|
+
<p class="text-xs text-muted-foreground">
|
|
976
|
+
Whether the desktop titlebar follows the theme axes above, or paints the active device's
|
|
977
|
+
own native chrome.
|
|
978
|
+
</p>
|
|
979
|
+
</div>
|
|
980
|
+
</section>
|
|
981
|
+
`,
|
|
982
|
+
isInline: true,
|
|
983
|
+
dependencies: [{
|
|
984
|
+
kind: "component",
|
|
985
|
+
type: SegmentedControlComponent,
|
|
986
|
+
selector: "SegmentedControl",
|
|
987
|
+
inputs: [
|
|
988
|
+
"options",
|
|
989
|
+
"value",
|
|
990
|
+
"appearance",
|
|
991
|
+
"space",
|
|
992
|
+
"disabled",
|
|
993
|
+
"aria-label",
|
|
994
|
+
"aria-labelledby",
|
|
995
|
+
"aria-describedby",
|
|
996
|
+
"class"
|
|
997
|
+
],
|
|
998
|
+
outputs: ["valueChange"]
|
|
999
|
+
}]
|
|
1000
|
+
});
|
|
1001
|
+
};
|
|
1002
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1003
|
+
minVersion: "12.0.0",
|
|
1004
|
+
version: "22.2.3",
|
|
1005
|
+
ngImport: i0,
|
|
1006
|
+
type: ThemeSettingsShellSectionComponent,
|
|
1007
|
+
decorators: [{
|
|
1008
|
+
type: Component,
|
|
1009
|
+
args: [{
|
|
1010
|
+
selector: "ThemeSettingsShellSection",
|
|
1011
|
+
providers: [provideIcons(...THEME_SETTINGS_ICONS)],
|
|
1012
|
+
imports: [SegmentedControlComponent],
|
|
1013
|
+
host: { class: "contents" },
|
|
1014
|
+
template: `
|
|
1015
|
+
<section
|
|
1016
|
+
class="flex flex-col gap-5 border-t border-border pt-7"
|
|
1017
|
+
[attr.aria-labelledby]="shellGroupId"
|
|
1018
|
+
>
|
|
1019
|
+
<h2 [id]="shellGroupId" class="nav-heading text-foreground">Shell</h2>
|
|
1020
|
+
<div class="flex flex-col gap-2">
|
|
1021
|
+
<h3 [id]="shellModeLabelId" class="nav-heading text-muted-foreground">Shell mode</h3>
|
|
1022
|
+
<SegmentedControl
|
|
1023
|
+
appearance="icon-text"
|
|
1024
|
+
space="compact"
|
|
1025
|
+
[value]="shellMode()"
|
|
1026
|
+
[options]="shellModeOptions"
|
|
1027
|
+
[aria-labelledby]="shellModeLabelId"
|
|
1028
|
+
(valueChange)="setShellMode($event)"
|
|
1029
|
+
/>
|
|
1030
|
+
<p class="text-xs text-muted-foreground">
|
|
1031
|
+
Where the app is delivered. Only <code>web</code> is a page inside a browser; the others
|
|
1032
|
+
own the whole surface, so the layout width locks to full.
|
|
1033
|
+
</p>
|
|
1034
|
+
</div>
|
|
1035
|
+
<div class="flex flex-col gap-2">
|
|
1036
|
+
<h3 [id]="shellDeviceLabelId" class="nav-heading text-muted-foreground">Shell device</h3>
|
|
1037
|
+
<SegmentedControl
|
|
1038
|
+
appearance="icon-text"
|
|
1039
|
+
space="compact"
|
|
1040
|
+
[value]="shellDevice()"
|
|
1041
|
+
[options]="shellDeviceOptions()"
|
|
1042
|
+
[aria-labelledby]="shellDeviceLabelId"
|
|
1043
|
+
(valueChange)="setShellDevice($event)"
|
|
1044
|
+
/>
|
|
1045
|
+
<p class="text-xs text-muted-foreground">
|
|
1046
|
+
Which host the shell runs on. Only the devices the active mode can host are offered —
|
|
1047
|
+
<code>android</code> ships on both tablet and mobile, so only the mode tells those apart.
|
|
1048
|
+
</p>
|
|
1049
|
+
</div>
|
|
1050
|
+
<div class="flex flex-col gap-2">
|
|
1051
|
+
<h3 [id]="shellFrameLabelId" class="nav-heading text-muted-foreground">Shell frame</h3>
|
|
1052
|
+
<SegmentedControl
|
|
1053
|
+
appearance="icon-text"
|
|
1054
|
+
space="compact"
|
|
1055
|
+
[value]="shellFrame()"
|
|
1056
|
+
[options]="shellFrameOptions()"
|
|
1057
|
+
[aria-labelledby]="shellFrameLabelId"
|
|
1058
|
+
(valueChange)="setShellFrame($event)"
|
|
1059
|
+
/>
|
|
1060
|
+
<p class="text-xs text-muted-foreground">
|
|
1061
|
+
@if (shellMode() === 'desktop') {
|
|
1062
|
+
<code>modern</code> insets the app as a panel and fuses the titlebar with the surround
|
|
1063
|
+
into one frame; <code>classic</code> keeps it flush under a bordered bar.
|
|
1064
|
+
} @else {
|
|
1065
|
+
Only a desktop window has a frame to shape, so this stays
|
|
1066
|
+
<code>classic</code> on {{ shellMode() }}.
|
|
1067
|
+
}
|
|
1068
|
+
</p>
|
|
1069
|
+
</div>
|
|
1070
|
+
<div class="flex flex-col gap-2">
|
|
1071
|
+
<h3 [id]="shellColorLabelId" class="nav-heading text-muted-foreground">Shell color</h3>
|
|
1072
|
+
<SegmentedControl
|
|
1073
|
+
appearance="icon-text"
|
|
1074
|
+
space="compact"
|
|
1075
|
+
[value]="shellColor()"
|
|
1076
|
+
[options]="shellColorOptions"
|
|
1077
|
+
[aria-labelledby]="shellColorLabelId"
|
|
1078
|
+
(valueChange)="setShellColor($event)"
|
|
1079
|
+
/>
|
|
1080
|
+
<p class="text-xs text-muted-foreground">
|
|
1081
|
+
Whether the desktop titlebar follows the theme axes above, or paints the active device's
|
|
1082
|
+
own native chrome.
|
|
1083
|
+
</p>
|
|
1084
|
+
</div>
|
|
1085
|
+
</section>
|
|
1086
|
+
`
|
|
1087
|
+
}]
|
|
1088
|
+
}]
|
|
1089
|
+
});
|
|
1090
|
+
function hslToHex(color) {
|
|
1091
|
+
const match = /^(\d+(?:\.\d+)?)\s+(\d+(?:\.\d+)?)%\s+(\d+(?:\.\d+)?)%$/.exec(color);
|
|
1092
|
+
const [hue, saturation, lightness] = match ? [
|
|
1093
|
+
Number(match[1]),
|
|
1094
|
+
Number(match[2]),
|
|
1095
|
+
Number(match[3])
|
|
1096
|
+
] : DEFAULT_BRAND_HSL;
|
|
1097
|
+
const chroma = (1 - Math.abs(2 * (lightness / 100) - 1)) * (saturation / 100);
|
|
1098
|
+
const segment = hue / 60;
|
|
1099
|
+
const x = chroma * (1 - Math.abs(segment % 2 - 1));
|
|
1100
|
+
const matchLightness = lightness / 100 - chroma / 2;
|
|
1101
|
+
const [red, green, blue] = segment < 1 ? [
|
|
1102
|
+
chroma,
|
|
1103
|
+
x,
|
|
1104
|
+
0
|
|
1105
|
+
] : segment < 2 ? [
|
|
1106
|
+
x,
|
|
1107
|
+
chroma,
|
|
1108
|
+
0
|
|
1109
|
+
] : segment < 3 ? [
|
|
1110
|
+
0,
|
|
1111
|
+
chroma,
|
|
1112
|
+
x
|
|
1113
|
+
] : segment < 4 ? [
|
|
1114
|
+
0,
|
|
1115
|
+
x,
|
|
1116
|
+
chroma
|
|
1117
|
+
] : segment < 5 ? [
|
|
1118
|
+
x,
|
|
1119
|
+
0,
|
|
1120
|
+
chroma
|
|
1121
|
+
] : [
|
|
1122
|
+
chroma,
|
|
1123
|
+
0,
|
|
1124
|
+
x
|
|
1125
|
+
];
|
|
1126
|
+
const channel = (value) => Math.round((value + matchLightness) * 255).toString(16).padStart(2, "0");
|
|
1127
|
+
return `#${channel(red)}${channel(green)}${channel(blue)}`;
|
|
1128
|
+
}
|
|
1129
|
+
function hexToHsl(color) {
|
|
1130
|
+
const match = /^#([0-9a-f]{6})$/i.exec(color);
|
|
1131
|
+
if (!match) return null;
|
|
1132
|
+
const hex = match[1];
|
|
1133
|
+
const [red, green, blue] = [
|
|
1134
|
+
0,
|
|
1135
|
+
2,
|
|
1136
|
+
4
|
|
1137
|
+
].map((index) => Number.parseInt(hex.slice(index, index + 2), 16) / 255);
|
|
1138
|
+
const max = Math.max(red, green, blue);
|
|
1139
|
+
const min = Math.min(red, green, blue);
|
|
1140
|
+
const delta = max - min;
|
|
1141
|
+
const lightness = (max + min) / 2;
|
|
1142
|
+
let hue = 0;
|
|
1143
|
+
if (delta !== 0) hue = max === red ? 60 * ((green - blue) / delta % 6) : max === green ? 60 * ((blue - red) / delta + 2) : 60 * ((red - green) / delta + 4);
|
|
1144
|
+
if (hue < 0) hue += 360;
|
|
1145
|
+
const saturation = delta === 0 ? 0 : delta / (1 - Math.abs(2 * lightness - 1));
|
|
1146
|
+
return `${Math.round(hue)} ${Math.round(saturation * 100)}% ${Math.round(lightness * 100)}%`;
|
|
1147
|
+
}
|
|
1148
|
+
function brandForeground(color) {
|
|
1149
|
+
const match = /^#([0-9a-f]{6})$/i.exec(color);
|
|
1150
|
+
if (!match) return "0 0% 100%";
|
|
1151
|
+
const channels = [
|
|
1152
|
+
0,
|
|
1153
|
+
2,
|
|
1154
|
+
4
|
|
1155
|
+
].map((index) => Number.parseInt(match[1].slice(index, index + 2), 16));
|
|
1156
|
+
const linear = (channel) => {
|
|
1157
|
+
const value = channel / 255;
|
|
1158
|
+
return value <= .04045 ? value / 12.92 : ((value + .055) / 1.055) ** 2.4;
|
|
1159
|
+
};
|
|
1160
|
+
return linear(channels[0]) * .2126 + linear(channels[1]) * .7152 + linear(channels[2]) * .0722 > .179 ? "0 0% 0%" : "0 0% 100%";
|
|
1161
|
+
}
|
|
1162
|
+
var ThemeSettingsThemeSectionComponent = class ThemeSettingsThemeSectionComponent {
|
|
1163
|
+
themeMode = inject(ThemeModeService);
|
|
1164
|
+
themeColor = inject(ThemeColorService);
|
|
1165
|
+
themeBrand = inject(ThemeBrandService);
|
|
1166
|
+
themeRadius = inject(ThemeRadiusService);
|
|
1167
|
+
themeSpace = inject(ThemeSpaceService);
|
|
1168
|
+
mode = this.themeMode.mode;
|
|
1169
|
+
resolvedMode = this.themeMode.resolvedMode;
|
|
1170
|
+
color = this.themeColor.color;
|
|
1171
|
+
neutralColor = this.themeColor.neutral;
|
|
1172
|
+
brand = this.themeBrand.brand;
|
|
1173
|
+
brandHex = computed(() => hslToHex(this.brand()?.color ?? "262 83% 58%"), ...ngDevMode ? [{ debugName: "brandHex" }] : /* istanbul ignore next */ []);
|
|
1174
|
+
radius = this.themeRadius.radius;
|
|
1175
|
+
space = this.themeSpace.space;
|
|
1176
|
+
accents = THEME_COLORS;
|
|
1177
|
+
neutrals = THEME_NEUTRALS;
|
|
1178
|
+
accentSwatch = ACCENT_SWATCH;
|
|
1179
|
+
neutralSwatch = NEUTRAL_SWATCH;
|
|
1180
|
+
modeOptions = MODE_OPTIONS;
|
|
1181
|
+
radiusOptions = RADIUS_OPTIONS;
|
|
1182
|
+
spaceOptions = SPACE_OPTIONS;
|
|
1183
|
+
themeGroupId = injectUniqueId("theme-settings-theme");
|
|
1184
|
+
modeLabelId = injectUniqueId("theme-settings-mode");
|
|
1185
|
+
brandLabelId = injectUniqueId("theme-settings-brand");
|
|
1186
|
+
accentLabelId = injectUniqueId("theme-settings-accent");
|
|
1187
|
+
neutralLabelId = injectUniqueId("theme-settings-neutral");
|
|
1188
|
+
spaceLabelId = injectUniqueId("theme-settings-space");
|
|
1189
|
+
radiusLabelId = injectUniqueId("theme-settings-radius");
|
|
1190
|
+
accentGroupName = injectUniqueId("theme-settings-accent-group");
|
|
1191
|
+
neutralGroupName = injectUniqueId("theme-settings-neutral-group");
|
|
1192
|
+
swatchClasses(active) {
|
|
1193
|
+
return cn("inline-flex size-[18px] rounded-full ring-1 ring-black/10 transition-[transform,box-shadow] duration-normal peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-background motion-reduce:transition-none", active ? "ring-2 ring-ring ring-offset-2 ring-offset-background shadow-sm" : "hover:scale-105");
|
|
1194
|
+
}
|
|
1195
|
+
setMode(value) {
|
|
1196
|
+
if (isThemeMode(value)) this.themeMode.setMode(value);
|
|
1197
|
+
}
|
|
1198
|
+
setColor(value) {
|
|
1199
|
+
this.themeColor.setColor(value);
|
|
1200
|
+
}
|
|
1201
|
+
setNeutral(value) {
|
|
1202
|
+
this.themeColor.setNeutral(value);
|
|
1203
|
+
}
|
|
1204
|
+
setRadius(value) {
|
|
1205
|
+
if (isThemeRadius(value)) this.themeRadius.setRadius(value);
|
|
1206
|
+
}
|
|
1207
|
+
setSpace(value) {
|
|
1208
|
+
if (isThemeSpace(value)) this.themeSpace.setSpace(value);
|
|
1209
|
+
}
|
|
1210
|
+
setBrandFromPicker(event) {
|
|
1211
|
+
if (!(event.target instanceof HTMLInputElement)) return;
|
|
1212
|
+
const color = event.target.value;
|
|
1213
|
+
const hsl = hexToHsl(color);
|
|
1214
|
+
if (!hsl) return;
|
|
1215
|
+
this.themeBrand.setBrand(hsl, brandForeground(color));
|
|
1216
|
+
this.themeColor.setColor("brand");
|
|
1217
|
+
}
|
|
1218
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1219
|
+
minVersion: "12.0.0",
|
|
1220
|
+
version: "22.2.3",
|
|
1221
|
+
ngImport: i0,
|
|
1222
|
+
type: ThemeSettingsThemeSectionComponent,
|
|
1223
|
+
deps: [],
|
|
1224
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1225
|
+
});
|
|
1226
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1227
|
+
minVersion: "17.0.0",
|
|
1228
|
+
version: "22.2.3",
|
|
1229
|
+
type: ThemeSettingsThemeSectionComponent,
|
|
1230
|
+
isStandalone: true,
|
|
1231
|
+
selector: "ThemeSettingsThemeSection",
|
|
1232
|
+
host: { classAttribute: "contents" },
|
|
1233
|
+
providers: [provideIcons(...THEME_SETTINGS_ICONS)],
|
|
1234
|
+
ngImport: i0,
|
|
1235
|
+
template: `
|
|
1236
|
+
<section class="flex flex-col gap-5" [attr.aria-labelledby]="themeGroupId">
|
|
1237
|
+
<h2 [id]="themeGroupId" class="nav-heading text-foreground">Theme</h2>
|
|
1238
|
+
<div class="flex flex-col gap-2">
|
|
1239
|
+
<div class="flex items-baseline justify-between gap-3">
|
|
1240
|
+
<h3 [id]="modeLabelId" class="nav-heading text-muted-foreground">Theme mode</h3>
|
|
1241
|
+
<span class="text-xs text-muted-foreground">{{ resolvedMode() }}</span>
|
|
1242
|
+
</div>
|
|
1243
|
+
<SegmentedControl
|
|
1244
|
+
appearance="icon-text"
|
|
1245
|
+
space="compact"
|
|
1246
|
+
[value]="mode()"
|
|
1247
|
+
[options]="modeOptions"
|
|
1248
|
+
[aria-labelledby]="modeLabelId"
|
|
1249
|
+
(valueChange)="setMode($event)"
|
|
1250
|
+
/>
|
|
1251
|
+
</div>
|
|
1252
|
+
<div class="flex flex-col gap-2">
|
|
1253
|
+
<h3 [id]="brandLabelId" class="nav-heading text-muted-foreground">Theme brand</h3>
|
|
1254
|
+
<input
|
|
1255
|
+
type="color"
|
|
1256
|
+
class="size-10 cursor-pointer appearance-none overflow-hidden rounded-full border border-border bg-transparent p-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background [&::-moz-color-swatch]:rounded-full [&::-webkit-color-swatch-wrapper]:p-0 [&::-webkit-color-swatch]:rounded-full"
|
|
1257
|
+
[value]="brandHex()"
|
|
1258
|
+
[attr.aria-labelledby]="brandLabelId"
|
|
1259
|
+
(input)="setBrandFromPicker($event)"
|
|
1260
|
+
/>
|
|
1261
|
+
</div>
|
|
1262
|
+
<div class="flex flex-col gap-2">
|
|
1263
|
+
<h3 [id]="accentLabelId" class="nav-heading text-muted-foreground">Theme color</h3>
|
|
1264
|
+
<fieldset class="grid grid-cols-5 gap-2 sm:grid-cols-6">
|
|
1265
|
+
<legend class="sr-only">Choose theme color</legend>
|
|
1266
|
+
@for (accent of accents; track accent) {
|
|
1267
|
+
<label class="inline-flex size-10 cursor-pointer items-center justify-center"
|
|
1268
|
+
><input
|
|
1269
|
+
class="peer sr-only"
|
|
1270
|
+
type="radio"
|
|
1271
|
+
[name]="accentGroupName"
|
|
1272
|
+
[value]="accent"
|
|
1273
|
+
[checked]="color() === accent"
|
|
1274
|
+
(change)="setColor(accent)"
|
|
1275
|
+
/><span
|
|
1276
|
+
[class]="swatchClasses(color() === accent)"
|
|
1277
|
+
[style.background]="accentSwatch[accent]"
|
|
1278
|
+
><span class="sr-only">{{ accent }}</span></span
|
|
1279
|
+
></label
|
|
1280
|
+
>
|
|
1281
|
+
}
|
|
1282
|
+
</fieldset>
|
|
1283
|
+
</div>
|
|
1284
|
+
<div class="flex flex-col gap-2">
|
|
1285
|
+
<h3 [id]="neutralLabelId" class="nav-heading text-muted-foreground">Theme neutral</h3>
|
|
1286
|
+
<fieldset class="grid grid-cols-5 gap-2 sm:grid-cols-6">
|
|
1287
|
+
<legend class="sr-only">Choose theme neutral</legend>
|
|
1288
|
+
@for (neutral of neutrals; track neutral) {
|
|
1289
|
+
<label class="inline-flex size-10 cursor-pointer items-center justify-center"
|
|
1290
|
+
><input
|
|
1291
|
+
class="peer sr-only"
|
|
1292
|
+
type="radio"
|
|
1293
|
+
[name]="neutralGroupName"
|
|
1294
|
+
[value]="neutral"
|
|
1295
|
+
[checked]="neutralColor() === neutral"
|
|
1296
|
+
(change)="setNeutral(neutral)"
|
|
1297
|
+
/><span
|
|
1298
|
+
[class]="swatchClasses(neutralColor() === neutral)"
|
|
1299
|
+
[style.background]="neutralSwatch[neutral]"
|
|
1300
|
+
><span class="sr-only">{{ neutral }}</span></span
|
|
1301
|
+
></label
|
|
1302
|
+
>
|
|
1303
|
+
}
|
|
1304
|
+
</fieldset>
|
|
1305
|
+
</div>
|
|
1306
|
+
<div class="flex flex-col gap-2">
|
|
1307
|
+
<h3 [id]="spaceLabelId" class="nav-heading text-muted-foreground">Theme space</h3>
|
|
1308
|
+
<SegmentedControl
|
|
1309
|
+
appearance="icon-text"
|
|
1310
|
+
space="compact"
|
|
1311
|
+
[value]="space()"
|
|
1312
|
+
[options]="spaceOptions"
|
|
1313
|
+
[aria-labelledby]="spaceLabelId"
|
|
1314
|
+
(valueChange)="setSpace($event)"
|
|
1315
|
+
/>
|
|
1316
|
+
</div>
|
|
1317
|
+
<div class="flex flex-col gap-2">
|
|
1318
|
+
<h3 [id]="radiusLabelId" class="nav-heading text-muted-foreground">Theme radius</h3>
|
|
1319
|
+
<SegmentedControl
|
|
1320
|
+
appearance="icon-text"
|
|
1321
|
+
space="compact"
|
|
1322
|
+
[value]="radius()"
|
|
1323
|
+
[options]="radiusOptions"
|
|
1324
|
+
[aria-labelledby]="radiusLabelId"
|
|
1325
|
+
(valueChange)="setRadius($event)"
|
|
1326
|
+
/>
|
|
1327
|
+
</div>
|
|
1328
|
+
</section>
|
|
1329
|
+
`,
|
|
1330
|
+
isInline: true,
|
|
1331
|
+
dependencies: [{
|
|
1332
|
+
kind: "component",
|
|
1333
|
+
type: SegmentedControlComponent,
|
|
1334
|
+
selector: "SegmentedControl",
|
|
1335
|
+
inputs: [
|
|
1336
|
+
"options",
|
|
1337
|
+
"value",
|
|
1338
|
+
"appearance",
|
|
1339
|
+
"space",
|
|
1340
|
+
"disabled",
|
|
1341
|
+
"aria-label",
|
|
1342
|
+
"aria-labelledby",
|
|
1343
|
+
"aria-describedby",
|
|
1344
|
+
"class"
|
|
1345
|
+
],
|
|
1346
|
+
outputs: ["valueChange"]
|
|
1347
|
+
}]
|
|
1348
|
+
});
|
|
1349
|
+
};
|
|
1350
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1351
|
+
minVersion: "12.0.0",
|
|
1352
|
+
version: "22.2.3",
|
|
1353
|
+
ngImport: i0,
|
|
1354
|
+
type: ThemeSettingsThemeSectionComponent,
|
|
1355
|
+
decorators: [{
|
|
1356
|
+
type: Component,
|
|
1357
|
+
args: [{
|
|
1358
|
+
selector: "ThemeSettingsThemeSection",
|
|
1359
|
+
providers: [provideIcons(...THEME_SETTINGS_ICONS)],
|
|
1360
|
+
imports: [SegmentedControlComponent],
|
|
1361
|
+
host: { class: "contents" },
|
|
1362
|
+
template: `
|
|
1363
|
+
<section class="flex flex-col gap-5" [attr.aria-labelledby]="themeGroupId">
|
|
1364
|
+
<h2 [id]="themeGroupId" class="nav-heading text-foreground">Theme</h2>
|
|
1365
|
+
<div class="flex flex-col gap-2">
|
|
1366
|
+
<div class="flex items-baseline justify-between gap-3">
|
|
1367
|
+
<h3 [id]="modeLabelId" class="nav-heading text-muted-foreground">Theme mode</h3>
|
|
1368
|
+
<span class="text-xs text-muted-foreground">{{ resolvedMode() }}</span>
|
|
1369
|
+
</div>
|
|
1370
|
+
<SegmentedControl
|
|
1371
|
+
appearance="icon-text"
|
|
1372
|
+
space="compact"
|
|
1373
|
+
[value]="mode()"
|
|
1374
|
+
[options]="modeOptions"
|
|
1375
|
+
[aria-labelledby]="modeLabelId"
|
|
1376
|
+
(valueChange)="setMode($event)"
|
|
1377
|
+
/>
|
|
1378
|
+
</div>
|
|
1379
|
+
<div class="flex flex-col gap-2">
|
|
1380
|
+
<h3 [id]="brandLabelId" class="nav-heading text-muted-foreground">Theme brand</h3>
|
|
1381
|
+
<input
|
|
1382
|
+
type="color"
|
|
1383
|
+
class="size-10 cursor-pointer appearance-none overflow-hidden rounded-full border border-border bg-transparent p-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background [&::-moz-color-swatch]:rounded-full [&::-webkit-color-swatch-wrapper]:p-0 [&::-webkit-color-swatch]:rounded-full"
|
|
1384
|
+
[value]="brandHex()"
|
|
1385
|
+
[attr.aria-labelledby]="brandLabelId"
|
|
1386
|
+
(input)="setBrandFromPicker($event)"
|
|
1387
|
+
/>
|
|
1388
|
+
</div>
|
|
1389
|
+
<div class="flex flex-col gap-2">
|
|
1390
|
+
<h3 [id]="accentLabelId" class="nav-heading text-muted-foreground">Theme color</h3>
|
|
1391
|
+
<fieldset class="grid grid-cols-5 gap-2 sm:grid-cols-6">
|
|
1392
|
+
<legend class="sr-only">Choose theme color</legend>
|
|
1393
|
+
@for (accent of accents; track accent) {
|
|
1394
|
+
<label class="inline-flex size-10 cursor-pointer items-center justify-center"
|
|
1395
|
+
><input
|
|
1396
|
+
class="peer sr-only"
|
|
1397
|
+
type="radio"
|
|
1398
|
+
[name]="accentGroupName"
|
|
1399
|
+
[value]="accent"
|
|
1400
|
+
[checked]="color() === accent"
|
|
1401
|
+
(change)="setColor(accent)"
|
|
1402
|
+
/><span
|
|
1403
|
+
[class]="swatchClasses(color() === accent)"
|
|
1404
|
+
[style.background]="accentSwatch[accent]"
|
|
1405
|
+
><span class="sr-only">{{ accent }}</span></span
|
|
1406
|
+
></label
|
|
1407
|
+
>
|
|
1408
|
+
}
|
|
1409
|
+
</fieldset>
|
|
1410
|
+
</div>
|
|
1411
|
+
<div class="flex flex-col gap-2">
|
|
1412
|
+
<h3 [id]="neutralLabelId" class="nav-heading text-muted-foreground">Theme neutral</h3>
|
|
1413
|
+
<fieldset class="grid grid-cols-5 gap-2 sm:grid-cols-6">
|
|
1414
|
+
<legend class="sr-only">Choose theme neutral</legend>
|
|
1415
|
+
@for (neutral of neutrals; track neutral) {
|
|
1416
|
+
<label class="inline-flex size-10 cursor-pointer items-center justify-center"
|
|
1417
|
+
><input
|
|
1418
|
+
class="peer sr-only"
|
|
1419
|
+
type="radio"
|
|
1420
|
+
[name]="neutralGroupName"
|
|
1421
|
+
[value]="neutral"
|
|
1422
|
+
[checked]="neutralColor() === neutral"
|
|
1423
|
+
(change)="setNeutral(neutral)"
|
|
1424
|
+
/><span
|
|
1425
|
+
[class]="swatchClasses(neutralColor() === neutral)"
|
|
1426
|
+
[style.background]="neutralSwatch[neutral]"
|
|
1427
|
+
><span class="sr-only">{{ neutral }}</span></span
|
|
1428
|
+
></label
|
|
1429
|
+
>
|
|
1430
|
+
}
|
|
1431
|
+
</fieldset>
|
|
1432
|
+
</div>
|
|
1433
|
+
<div class="flex flex-col gap-2">
|
|
1434
|
+
<h3 [id]="spaceLabelId" class="nav-heading text-muted-foreground">Theme space</h3>
|
|
1435
|
+
<SegmentedControl
|
|
1436
|
+
appearance="icon-text"
|
|
1437
|
+
space="compact"
|
|
1438
|
+
[value]="space()"
|
|
1439
|
+
[options]="spaceOptions"
|
|
1440
|
+
[aria-labelledby]="spaceLabelId"
|
|
1441
|
+
(valueChange)="setSpace($event)"
|
|
1442
|
+
/>
|
|
1443
|
+
</div>
|
|
1444
|
+
<div class="flex flex-col gap-2">
|
|
1445
|
+
<h3 [id]="radiusLabelId" class="nav-heading text-muted-foreground">Theme radius</h3>
|
|
1446
|
+
<SegmentedControl
|
|
1447
|
+
appearance="icon-text"
|
|
1448
|
+
space="compact"
|
|
1449
|
+
[value]="radius()"
|
|
1450
|
+
[options]="radiusOptions"
|
|
1451
|
+
[aria-labelledby]="radiusLabelId"
|
|
1452
|
+
(valueChange)="setRadius($event)"
|
|
1453
|
+
/>
|
|
1454
|
+
</div>
|
|
1455
|
+
</section>
|
|
1456
|
+
`
|
|
1457
|
+
}]
|
|
1458
|
+
}]
|
|
1459
|
+
});
|
|
1460
|
+
var ThemeSettingsComponent = class ThemeSettingsComponent {
|
|
1461
|
+
settings = inject(THEME_SETTINGS_ADAPTER, { optional: true });
|
|
1462
|
+
open = model(false, ...ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []);
|
|
1463
|
+
inline = input(false, {
|
|
1464
|
+
...ngDevMode ? { debugName: "inline" } : /* istanbul ignore next */ {},
|
|
1465
|
+
transform: booleanAttribute
|
|
1466
|
+
});
|
|
1467
|
+
trigger = input("button", ...ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []);
|
|
1468
|
+
triggerLabel = input("Theme settings", ...ngDevMode ? [{ debugName: "triggerLabel" }] : /* istanbul ignore next */ []);
|
|
1469
|
+
triggerIconOnly = input(false, {
|
|
1470
|
+
...ngDevMode ? { debugName: "triggerIconOnly" } : /* istanbul ignore next */ {},
|
|
1471
|
+
alias: "trigger-icon-only"
|
|
1472
|
+
});
|
|
1473
|
+
showTrigger = input(true, {
|
|
1474
|
+
...ngDevMode ? { debugName: "showTrigger" } : /* istanbul ignore next */ {},
|
|
1475
|
+
alias: "show-trigger"
|
|
1476
|
+
});
|
|
1477
|
+
side = input("right", ...ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []);
|
|
1478
|
+
class = input("", {
|
|
1479
|
+
...ngDevMode ? { debugName: "class" } : /* istanbul ignore next */ {},
|
|
1480
|
+
alias: "class"
|
|
1481
|
+
});
|
|
1482
|
+
triggerClasses = computed(() => cn("inline-flex items-center gap-2 rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none", this.trigger() === "link" ? this.triggerIconOnly() ? "size-11 p-0 text-primary underline-offset-4 hover:underline" : "min-h-11 px-1 text-primary underline-offset-4 hover:underline" : this.triggerIconOnly() ? "size-11 justify-center p-0 text-muted-foreground hover:bg-accent hover:text-foreground" : "min-h-11 justify-center px-3 text-muted-foreground hover:bg-accent hover:text-accent-foreground", this.class()), ...ngDevMode ? [{ debugName: "triggerClasses" }] : /* istanbul ignore next */ []);
|
|
1483
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1484
|
+
minVersion: "12.0.0",
|
|
1485
|
+
version: "22.2.3",
|
|
1486
|
+
ngImport: i0,
|
|
1487
|
+
type: ThemeSettingsComponent,
|
|
1488
|
+
deps: [],
|
|
1489
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1490
|
+
});
|
|
1491
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1492
|
+
minVersion: "17.0.0",
|
|
1493
|
+
version: "22.2.3",
|
|
1494
|
+
type: ThemeSettingsComponent,
|
|
1495
|
+
isStandalone: true,
|
|
1496
|
+
selector: "ThemeSettings",
|
|
1497
|
+
inputs: {
|
|
1498
|
+
open: {
|
|
1499
|
+
classPropertyName: "open",
|
|
1500
|
+
publicName: "open",
|
|
1501
|
+
isSignal: true,
|
|
1502
|
+
isRequired: false,
|
|
1503
|
+
transformFunction: null
|
|
1504
|
+
},
|
|
1505
|
+
inline: {
|
|
1506
|
+
classPropertyName: "inline",
|
|
1507
|
+
publicName: "inline",
|
|
1508
|
+
isSignal: true,
|
|
1509
|
+
isRequired: false,
|
|
1510
|
+
transformFunction: null
|
|
1511
|
+
},
|
|
1512
|
+
trigger: {
|
|
1513
|
+
classPropertyName: "trigger",
|
|
1514
|
+
publicName: "trigger",
|
|
1515
|
+
isSignal: true,
|
|
1516
|
+
isRequired: false,
|
|
1517
|
+
transformFunction: null
|
|
1518
|
+
},
|
|
1519
|
+
triggerLabel: {
|
|
1520
|
+
classPropertyName: "triggerLabel",
|
|
1521
|
+
publicName: "triggerLabel",
|
|
1522
|
+
isSignal: true,
|
|
1523
|
+
isRequired: false,
|
|
1524
|
+
transformFunction: null
|
|
1525
|
+
},
|
|
1526
|
+
triggerIconOnly: {
|
|
1527
|
+
classPropertyName: "triggerIconOnly",
|
|
1528
|
+
publicName: "trigger-icon-only",
|
|
1529
|
+
isSignal: true,
|
|
1530
|
+
isRequired: false,
|
|
1531
|
+
transformFunction: null
|
|
1532
|
+
},
|
|
1533
|
+
showTrigger: {
|
|
1534
|
+
classPropertyName: "showTrigger",
|
|
1535
|
+
publicName: "show-trigger",
|
|
1536
|
+
isSignal: true,
|
|
1537
|
+
isRequired: false,
|
|
1538
|
+
transformFunction: null
|
|
1539
|
+
},
|
|
1540
|
+
side: {
|
|
1541
|
+
classPropertyName: "side",
|
|
1542
|
+
publicName: "side",
|
|
1543
|
+
isSignal: true,
|
|
1544
|
+
isRequired: false,
|
|
1545
|
+
transformFunction: null
|
|
1546
|
+
},
|
|
1547
|
+
class: {
|
|
1548
|
+
classPropertyName: "class",
|
|
1549
|
+
publicName: "class",
|
|
1550
|
+
isSignal: true,
|
|
1551
|
+
isRequired: false,
|
|
1552
|
+
transformFunction: null
|
|
1553
|
+
}
|
|
1554
|
+
},
|
|
1555
|
+
outputs: { open: "openChange" },
|
|
1556
|
+
host: { classAttribute: "contents" },
|
|
1557
|
+
providers: [provideIcons(LucidePalette)],
|
|
1558
|
+
ngImport: i0,
|
|
1559
|
+
template: `
|
|
1560
|
+
@if (inline()) {
|
|
1561
|
+
<div data-theme-settings-inline class="flex flex-col gap-8">
|
|
1562
|
+
<ThemeSettingsThemeSection />
|
|
1563
|
+
<ThemeSettingsShellSection />
|
|
1564
|
+
@if (settings) {
|
|
1565
|
+
<ThemeSettingsLayoutSection />
|
|
1566
|
+
<ThemeSettingsNavigationSection />
|
|
1567
|
+
}
|
|
1568
|
+
</div>
|
|
1569
|
+
} @else {
|
|
1570
|
+
@if (showTrigger()) {
|
|
1571
|
+
<button
|
|
1572
|
+
type="button"
|
|
1573
|
+
[class]="triggerClasses()"
|
|
1574
|
+
[attr.aria-label]="triggerIconOnly() ? triggerLabel() : null"
|
|
1575
|
+
[attr.title]="triggerIconOnly() ? triggerLabel() : null"
|
|
1576
|
+
aria-haspopup="dialog"
|
|
1577
|
+
[attr.aria-expanded]="open()"
|
|
1578
|
+
(click)="open.set(true)"
|
|
1579
|
+
>
|
|
1580
|
+
<Icon name="palette" [size]="18" />
|
|
1581
|
+
@if (triggerIconOnly()) {
|
|
1582
|
+
<span class="sr-only">{{ triggerLabel() }}</span>
|
|
1583
|
+
} @else {
|
|
1584
|
+
<span>{{ triggerLabel() }}</span>
|
|
1585
|
+
}
|
|
1586
|
+
</button>
|
|
1587
|
+
}
|
|
1588
|
+
|
|
1589
|
+
@if (open()) {
|
|
1590
|
+
<Drawer
|
|
1591
|
+
[(open)]="open"
|
|
1592
|
+
[side]="side()"
|
|
1593
|
+
[showCloseButton]="false"
|
|
1594
|
+
class="ThemeSettings w-full max-w-md gap-0! p-0! sm:w-100"
|
|
1595
|
+
>
|
|
1596
|
+
<DrawerHeader
|
|
1597
|
+
class="flex h-(--layout-topbar-height) shrink-0 flex-row items-center gap-3 border-b border-border bg-background px-3 text-left"
|
|
1598
|
+
>
|
|
1599
|
+
<span
|
|
1600
|
+
aria-hidden="true"
|
|
1601
|
+
class="grid size-8 shrink-0 place-items-center rounded-md bg-primary/10 text-primary ring-1 ring-primary/20"
|
|
1602
|
+
><Icon name="palette" [size]="18"
|
|
1603
|
+
/></span>
|
|
1604
|
+
<div class="min-w-0 flex-1">
|
|
1605
|
+
<DrawerTitle>Theme settings</DrawerTitle>
|
|
1606
|
+
</div>
|
|
1607
|
+
<button
|
|
1608
|
+
type="button"
|
|
1609
|
+
DrawerClose
|
|
1610
|
+
class="inline-flex h-8 shrink-0 items-center rounded-md bg-primary px-2 text-xs font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background motion-reduce:transition-none"
|
|
1611
|
+
>
|
|
1612
|
+
Done
|
|
1613
|
+
</button>
|
|
1614
|
+
</DrawerHeader>
|
|
1615
|
+
|
|
1616
|
+
<DrawerContent class="min-h-0 px-4 py-5 sm:px-5">
|
|
1617
|
+
<div class="flex flex-col gap-8">
|
|
1618
|
+
<ThemeSettingsThemeSection />
|
|
1619
|
+
<ThemeSettingsShellSection />
|
|
1620
|
+
@if (settings) {
|
|
1621
|
+
<ThemeSettingsLayoutSection />
|
|
1622
|
+
<ThemeSettingsNavigationSection />
|
|
1623
|
+
}
|
|
1624
|
+
</div>
|
|
1625
|
+
</DrawerContent>
|
|
1626
|
+
</Drawer>
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
`,
|
|
1630
|
+
isInline: true,
|
|
1631
|
+
dependencies: [
|
|
1632
|
+
{
|
|
1633
|
+
kind: "directive",
|
|
1634
|
+
type: DrawerCloseDirective,
|
|
1635
|
+
selector: "button[SheetClose], a[SheetClose], button[DrawerClose], a[DrawerClose]"
|
|
1636
|
+
},
|
|
1637
|
+
{
|
|
1638
|
+
kind: "component",
|
|
1639
|
+
type: DrawerComponent,
|
|
1640
|
+
selector: "Sheet, Drawer",
|
|
1641
|
+
inputs: [
|
|
1642
|
+
"open",
|
|
1643
|
+
"side",
|
|
1644
|
+
"variant",
|
|
1645
|
+
"closeOnEscape",
|
|
1646
|
+
"closeOnBackdropClick",
|
|
1647
|
+
"backdrop",
|
|
1648
|
+
"showCloseButton",
|
|
1649
|
+
"closeButtonLabel",
|
|
1650
|
+
"restoreFocus",
|
|
1651
|
+
"aria-labelledby",
|
|
1652
|
+
"aria-describedby",
|
|
1653
|
+
"role",
|
|
1654
|
+
"class"
|
|
1655
|
+
],
|
|
1656
|
+
outputs: ["openChange", "openedChange"]
|
|
1657
|
+
},
|
|
1658
|
+
{
|
|
1659
|
+
kind: "component",
|
|
1660
|
+
type: DrawerContentComponent,
|
|
1661
|
+
selector: "SheetContent, DrawerContent",
|
|
1662
|
+
inputs: ["class"]
|
|
1663
|
+
},
|
|
1664
|
+
{
|
|
1665
|
+
kind: "component",
|
|
1666
|
+
type: DrawerHeaderComponent,
|
|
1667
|
+
selector: "SheetHeader, DrawerHeader",
|
|
1668
|
+
inputs: ["class"]
|
|
1669
|
+
},
|
|
1670
|
+
{
|
|
1671
|
+
kind: "component",
|
|
1672
|
+
type: DrawerTitleComponent,
|
|
1673
|
+
selector: "SheetTitle, DrawerTitle, h2[SheetTitle], h2[DrawerTitle]",
|
|
1674
|
+
inputs: ["id", "class"]
|
|
1675
|
+
},
|
|
1676
|
+
{
|
|
1677
|
+
kind: "component",
|
|
1678
|
+
type: IconComponent,
|
|
1679
|
+
selector: "Icon",
|
|
1680
|
+
inputs: [
|
|
1681
|
+
"name",
|
|
1682
|
+
"class",
|
|
1683
|
+
"size",
|
|
1684
|
+
"strokeWidth",
|
|
1685
|
+
"label"
|
|
1686
|
+
]
|
|
1687
|
+
},
|
|
1688
|
+
{
|
|
1689
|
+
kind: "component",
|
|
1690
|
+
type: ThemeSettingsLayoutSectionComponent,
|
|
1691
|
+
selector: "ThemeSettingsLayoutSection"
|
|
1692
|
+
},
|
|
1693
|
+
{
|
|
1694
|
+
kind: "component",
|
|
1695
|
+
type: ThemeSettingsNavigationSectionComponent,
|
|
1696
|
+
selector: "ThemeSettingsNavigationSection"
|
|
1697
|
+
},
|
|
1698
|
+
{
|
|
1699
|
+
kind: "component",
|
|
1700
|
+
type: ThemeSettingsShellSectionComponent,
|
|
1701
|
+
selector: "ThemeSettingsShellSection"
|
|
1702
|
+
},
|
|
1703
|
+
{
|
|
1704
|
+
kind: "component",
|
|
1705
|
+
type: ThemeSettingsThemeSectionComponent,
|
|
1706
|
+
selector: "ThemeSettingsThemeSection"
|
|
1707
|
+
}
|
|
1708
|
+
]
|
|
1709
|
+
});
|
|
1710
|
+
};
|
|
1711
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1712
|
+
minVersion: "12.0.0",
|
|
1713
|
+
version: "22.2.3",
|
|
1714
|
+
ngImport: i0,
|
|
1715
|
+
type: ThemeSettingsComponent,
|
|
1716
|
+
decorators: [{
|
|
1717
|
+
type: Component,
|
|
1718
|
+
args: [{
|
|
1719
|
+
selector: "ThemeSettings",
|
|
1720
|
+
providers: [provideIcons(LucidePalette)],
|
|
1721
|
+
imports: [
|
|
1722
|
+
DrawerCloseDirective,
|
|
1723
|
+
DrawerComponent,
|
|
1724
|
+
DrawerContentComponent,
|
|
1725
|
+
DrawerHeaderComponent,
|
|
1726
|
+
DrawerTitleComponent,
|
|
1727
|
+
IconComponent,
|
|
1728
|
+
ThemeSettingsLayoutSectionComponent,
|
|
1729
|
+
ThemeSettingsNavigationSectionComponent,
|
|
1730
|
+
ThemeSettingsShellSectionComponent,
|
|
1731
|
+
ThemeSettingsThemeSectionComponent
|
|
1732
|
+
],
|
|
1733
|
+
host: { class: "contents" },
|
|
1734
|
+
template: `
|
|
1735
|
+
@if (inline()) {
|
|
1736
|
+
<div data-theme-settings-inline class="flex flex-col gap-8">
|
|
1737
|
+
<ThemeSettingsThemeSection />
|
|
1738
|
+
<ThemeSettingsShellSection />
|
|
1739
|
+
@if (settings) {
|
|
1740
|
+
<ThemeSettingsLayoutSection />
|
|
1741
|
+
<ThemeSettingsNavigationSection />
|
|
1742
|
+
}
|
|
1743
|
+
</div>
|
|
1744
|
+
} @else {
|
|
1745
|
+
@if (showTrigger()) {
|
|
1746
|
+
<button
|
|
1747
|
+
type="button"
|
|
1748
|
+
[class]="triggerClasses()"
|
|
1749
|
+
[attr.aria-label]="triggerIconOnly() ? triggerLabel() : null"
|
|
1750
|
+
[attr.title]="triggerIconOnly() ? triggerLabel() : null"
|
|
1751
|
+
aria-haspopup="dialog"
|
|
1752
|
+
[attr.aria-expanded]="open()"
|
|
1753
|
+
(click)="open.set(true)"
|
|
1754
|
+
>
|
|
1755
|
+
<Icon name="palette" [size]="18" />
|
|
1756
|
+
@if (triggerIconOnly()) {
|
|
1757
|
+
<span class="sr-only">{{ triggerLabel() }}</span>
|
|
1758
|
+
} @else {
|
|
1759
|
+
<span>{{ triggerLabel() }}</span>
|
|
1760
|
+
}
|
|
1761
|
+
</button>
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
@if (open()) {
|
|
1765
|
+
<Drawer
|
|
1766
|
+
[(open)]="open"
|
|
1767
|
+
[side]="side()"
|
|
1768
|
+
[showCloseButton]="false"
|
|
1769
|
+
class="ThemeSettings w-full max-w-md gap-0! p-0! sm:w-100"
|
|
1770
|
+
>
|
|
1771
|
+
<DrawerHeader
|
|
1772
|
+
class="flex h-(--layout-topbar-height) shrink-0 flex-row items-center gap-3 border-b border-border bg-background px-3 text-left"
|
|
1773
|
+
>
|
|
1774
|
+
<span
|
|
1775
|
+
aria-hidden="true"
|
|
1776
|
+
class="grid size-8 shrink-0 place-items-center rounded-md bg-primary/10 text-primary ring-1 ring-primary/20"
|
|
1777
|
+
><Icon name="palette" [size]="18"
|
|
1778
|
+
/></span>
|
|
1779
|
+
<div class="min-w-0 flex-1">
|
|
1780
|
+
<DrawerTitle>Theme settings</DrawerTitle>
|
|
1781
|
+
</div>
|
|
1782
|
+
<button
|
|
1783
|
+
type="button"
|
|
1784
|
+
DrawerClose
|
|
1785
|
+
class="inline-flex h-8 shrink-0 items-center rounded-md bg-primary px-2 text-xs font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background motion-reduce:transition-none"
|
|
1786
|
+
>
|
|
1787
|
+
Done
|
|
1788
|
+
</button>
|
|
1789
|
+
</DrawerHeader>
|
|
1790
|
+
|
|
1791
|
+
<DrawerContent class="min-h-0 px-4 py-5 sm:px-5">
|
|
1792
|
+
<div class="flex flex-col gap-8">
|
|
1793
|
+
<ThemeSettingsThemeSection />
|
|
1794
|
+
<ThemeSettingsShellSection />
|
|
1795
|
+
@if (settings) {
|
|
1796
|
+
<ThemeSettingsLayoutSection />
|
|
1797
|
+
<ThemeSettingsNavigationSection />
|
|
1798
|
+
}
|
|
1799
|
+
</div>
|
|
1800
|
+
</DrawerContent>
|
|
1801
|
+
</Drawer>
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
`
|
|
1805
|
+
}]
|
|
1806
|
+
}],
|
|
1807
|
+
propDecorators: {
|
|
1808
|
+
open: [{
|
|
1809
|
+
type: i0.Input,
|
|
1810
|
+
args: [{
|
|
1811
|
+
isSignal: true,
|
|
1812
|
+
alias: "open",
|
|
1813
|
+
required: false
|
|
1814
|
+
}]
|
|
1815
|
+
}, {
|
|
1816
|
+
type: i0.Output,
|
|
1817
|
+
args: ["openChange"]
|
|
1818
|
+
}],
|
|
1819
|
+
inline: [{
|
|
1820
|
+
type: i0.Input,
|
|
1821
|
+
args: [{
|
|
1822
|
+
isSignal: true,
|
|
1823
|
+
alias: "inline",
|
|
1824
|
+
required: false
|
|
1825
|
+
}]
|
|
1826
|
+
}],
|
|
1827
|
+
trigger: [{
|
|
1828
|
+
type: i0.Input,
|
|
1829
|
+
args: [{
|
|
1830
|
+
isSignal: true,
|
|
1831
|
+
alias: "trigger",
|
|
1832
|
+
required: false
|
|
1833
|
+
}]
|
|
1834
|
+
}],
|
|
1835
|
+
triggerLabel: [{
|
|
1836
|
+
type: i0.Input,
|
|
1837
|
+
args: [{
|
|
1838
|
+
isSignal: true,
|
|
1839
|
+
alias: "triggerLabel",
|
|
1840
|
+
required: false
|
|
1841
|
+
}]
|
|
1842
|
+
}],
|
|
1843
|
+
triggerIconOnly: [{
|
|
1844
|
+
type: i0.Input,
|
|
1845
|
+
args: [{
|
|
1846
|
+
isSignal: true,
|
|
1847
|
+
alias: "trigger-icon-only",
|
|
1848
|
+
required: false
|
|
1849
|
+
}]
|
|
1850
|
+
}],
|
|
1851
|
+
showTrigger: [{
|
|
1852
|
+
type: i0.Input,
|
|
1853
|
+
args: [{
|
|
1854
|
+
isSignal: true,
|
|
1855
|
+
alias: "show-trigger",
|
|
1856
|
+
required: false
|
|
1857
|
+
}]
|
|
1858
|
+
}],
|
|
1859
|
+
side: [{
|
|
1860
|
+
type: i0.Input,
|
|
1861
|
+
args: [{
|
|
1862
|
+
isSignal: true,
|
|
1863
|
+
alias: "side",
|
|
1864
|
+
required: false
|
|
1865
|
+
}]
|
|
1866
|
+
}],
|
|
1867
|
+
class: [{
|
|
1868
|
+
type: i0.Input,
|
|
1869
|
+
args: [{
|
|
1870
|
+
isSignal: true,
|
|
1871
|
+
alias: "class",
|
|
1872
|
+
required: false
|
|
1873
|
+
}]
|
|
1874
|
+
}]
|
|
1875
|
+
}
|
|
1876
|
+
});
|
|
1877
|
+
export { NAV_TYPE_MODE_STORAGE_KEY, NAV_TYPE_STORAGE_KEY, THEME_SETTINGS_ADAPTER, ThemeSettingsComponent, ThemeSettingsDefaultAdapter, allowedNavTypeModes, allowedNavTypes, isWidthEnabled, provideThemeSettingsAdapter };
|