@ojiepermana/angular 22.1.13 → 22.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -6
- package/SUPPORT.md +3 -3
- package/chart/README.md +1 -1
- package/component/README.md +2 -2
- package/component/calendar/README.md +3 -15
- package/component/drawer/README.md +1 -2
- package/fesm2022/ojiepermana-angular-chart-area.mjs +352 -137
- package/fesm2022/ojiepermana-angular-chart-bar.mjs +744 -524
- package/fesm2022/ojiepermana-angular-chart-core.mjs +1140 -1344
- package/fesm2022/ojiepermana-angular-chart-line.mjs +393 -147
- package/fesm2022/ojiepermana-angular-chart-pie.mjs +408 -179
- package/fesm2022/ojiepermana-angular-chart-primitives.mjs +1262 -920
- package/fesm2022/ojiepermana-angular-chart-radar.mjs +473 -205
- package/fesm2022/ojiepermana-angular-chart-radial.mjs +425 -182
- package/fesm2022/ojiepermana-angular-chart-scatter.mjs +386 -210
- package/fesm2022/ojiepermana-angular-chart.mjs +3 -19
- package/fesm2022/ojiepermana-angular-component-accordion.mjs +485 -243
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +963 -325
- package/fesm2022/ojiepermana-angular-component-alert.mjs +266 -103
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +80 -35
- package/fesm2022/ojiepermana-angular-component-avatar.mjs +402 -135
- package/fesm2022/ojiepermana-angular-component-badge.mjs +109 -59
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +410 -142
- package/fesm2022/ojiepermana-angular-component-button-group.mjs +249 -96
- package/fesm2022/ojiepermana-angular-component-button.mjs +153 -75
- package/fesm2022/ojiepermana-angular-component-calendar.mjs +531 -418
- package/fesm2022/ojiepermana-angular-component-card.mjs +457 -171
- package/fesm2022/ojiepermana-angular-component-carousel.mjs +642 -272
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs +312 -108
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs +299 -115
- package/fesm2022/ojiepermana-angular-component-combobox.mjs +396 -183
- package/fesm2022/ojiepermana-angular-component-command.mjs +807 -347
- package/fesm2022/ojiepermana-angular-component-composer.mjs +807 -330
- package/fesm2022/ojiepermana-angular-component-context-menu.mjs +196 -161
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs +650 -338
- package/fesm2022/ojiepermana-angular-component-dialog.mjs +710 -316
- package/fesm2022/ojiepermana-angular-component-drawer.mjs +2 -5
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +1212 -646
- package/fesm2022/ojiepermana-angular-component-editor.mjs +987 -502
- package/fesm2022/ojiepermana-angular-component-empty.mjs +350 -137
- package/fesm2022/ojiepermana-angular-component-form.mjs +813 -434
- package/fesm2022/ojiepermana-angular-component-hover-card.mjs +486 -277
- package/fesm2022/ojiepermana-angular-component-icon.mjs +241 -140
- package/fesm2022/ojiepermana-angular-component-input-group.mjs +449 -176
- package/fesm2022/ojiepermana-angular-component-input-otp.mjs +891 -488
- package/fesm2022/ojiepermana-angular-component-input.mjs +86 -55
- package/fesm2022/ojiepermana-angular-component-item.mjs +713 -261
- package/fesm2022/ojiepermana-angular-component-kanban.mjs +714 -216
- package/fesm2022/ojiepermana-angular-component-kbd.mjs +124 -52
- package/fesm2022/ojiepermana-angular-component-label.mjs +82 -31
- package/fesm2022/ojiepermana-angular-component-menubar.mjs +479 -329
- package/fesm2022/ojiepermana-angular-component-native-select.mjs +167 -65
- package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +683 -380
- package/fesm2022/ojiepermana-angular-component-pagination.mjs +277 -94
- package/fesm2022/ojiepermana-angular-component-pillbox.mjs +1283 -607
- package/fesm2022/ojiepermana-angular-component-popover.mjs +291 -204
- package/fesm2022/ojiepermana-angular-component-progress.mjs +176 -53
- package/fesm2022/ojiepermana-angular-component-radio.mjs +449 -142
- package/fesm2022/ojiepermana-angular-component-resizable.mjs +659 -453
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +117 -39
- package/fesm2022/ojiepermana-angular-component-segmented-control.mjs +351 -172
- package/fesm2022/ojiepermana-angular-component-select.mjs +475 -345
- package/fesm2022/ojiepermana-angular-component-separator.mjs +102 -35
- package/fesm2022/ojiepermana-angular-component-sheet.mjs +797 -347
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs +62 -29
- package/fesm2022/ojiepermana-angular-component-slider.mjs +592 -376
- package/fesm2022/ojiepermana-angular-component-spinner.mjs +135 -38
- package/fesm2022/ojiepermana-angular-component-switch.mjs +315 -103
- package/fesm2022/ojiepermana-angular-component-table.mjs +440 -153
- package/fesm2022/ojiepermana-angular-component-tabs.mjs +590 -317
- package/fesm2022/ojiepermana-angular-component-textarea.mjs +85 -50
- package/fesm2022/ojiepermana-angular-component-timeline.mjs +609 -231
- package/fesm2022/ojiepermana-angular-component-toast.mjs +229 -243
- package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +573 -288
- package/fesm2022/ojiepermana-angular-component-toggle.mjs +187 -78
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs +798 -517
- package/fesm2022/ojiepermana-angular-component-utils-core.mjs +159 -292
- package/fesm2022/ojiepermana-angular-component-utils-overlay.mjs +46 -58
- package/fesm2022/ojiepermana-angular-component-utils-scale.mjs +76 -38
- package/fesm2022/ojiepermana-angular-component-utils.mjs +2 -8
- package/fesm2022/ojiepermana-angular-component.mjs +0 -10
- package/fesm2022/ojiepermana-angular-navigation-core.mjs +13 -23
- package/fesm2022/ojiepermana-angular-navigation-icon.mjs +35 -24
- package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-BKCeWzml.mjs +129 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-DFEJK2jD.mjs +811 -0
- package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-Cd-jh6tg.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-mpK9Ar08.mjs} +387 -183
- package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-BPgH7FJk.mjs +650 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-DMpYcD9t.mjs +662 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-item.component-Basp5SIk.mjs +1228 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-list.component-YUzHI9Pj.mjs +311 -0
- package/fesm2022/ojiepermana-angular-navigation-service.mjs +542 -724
- package/fesm2022/ojiepermana-angular-navigation-types.mjs +27 -56
- package/fesm2022/ojiepermana-angular-navigation.mjs +3052 -4
- package/fesm2022/ojiepermana-angular-sdk.mjs +91 -201
- package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +1115 -737
- package/fesm2022/ojiepermana-angular-theme-layout-services.mjs +245 -328
- package/fesm2022/ojiepermana-angular-theme-layout-types.mjs +35 -38
- package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +1719 -552
- package/fesm2022/ojiepermana-angular-theme-layout.mjs +847 -491
- package/fesm2022/ojiepermana-angular-theme-page-core.mjs +288 -358
- package/fesm2022/ojiepermana-angular-theme-page-filter.mjs +362 -224
- package/fesm2022/ojiepermana-angular-theme-page-overview.mjs +88 -0
- package/fesm2022/ojiepermana-angular-theme-page-root.mjs +576 -254
- package/fesm2022/ojiepermana-angular-theme-page-side.mjs +317 -177
- package/fesm2022/ojiepermana-angular-theme-page-slots.mjs +256 -112
- package/fesm2022/ojiepermana-angular-theme-page.mjs +7 -12
- package/fesm2022/ojiepermana-angular-theme-shell-services.mjs +215 -326
- package/fesm2022/ojiepermana-angular-theme-shell-types.mjs +68 -129
- package/fesm2022/ojiepermana-angular-theme-shell.mjs +907 -378
- package/fesm2022/ojiepermana-angular-theme-styles.mjs +521 -720
- package/fesm2022/ojiepermana-angular-theme.mjs +0 -10
- package/fesm2022/ojiepermana-angular.mjs +5 -24
- package/navigation/README.md +1 -1
- package/package.json +16 -12
- package/sdk/README.md +1 -1
- package/sdk/src/writer/index.js +2 -2
- package/theme/README.md +1 -1
- package/theme/layout/README.md +2 -4
- package/theme/page/README.md +50 -0
- package/theme/styles/README.md +10 -10
- package/theme/styles/css/base/prefers-dark.css +1 -1
- package/theme/styles/css/base/status.css +1 -1
- package/theme/styles/css/color/amber.css +1 -1
- package/theme/styles/css/color/blue.css +1 -1
- package/theme/styles/css/color/cyan.css +1 -1
- package/theme/styles/css/color/emerald.css +1 -1
- package/theme/styles/css/color/fuchsia.css +1 -1
- package/theme/styles/css/color/green.css +1 -1
- package/theme/styles/css/color/indigo.css +1 -1
- package/theme/styles/css/color/lime.css +1 -1
- package/theme/styles/css/color/orange.css +1 -1
- package/theme/styles/css/color/pink.css +1 -1
- package/theme/styles/css/color/purple.css +1 -1
- package/theme/styles/css/color/red.css +1 -1
- package/theme/styles/css/color/rose.css +1 -1
- package/theme/styles/css/color/sky.css +1 -1
- package/theme/styles/css/color/teal.css +1 -1
- package/theme/styles/css/color/violet.css +1 -1
- package/theme/styles/css/color/yellow.css +1 -1
- package/theme/styles/css/neutral/gray.css +1 -1
- package/theme/styles/css/neutral/mauve.css +1 -1
- package/theme/styles/css/neutral/mist.css +1 -1
- package/theme/styles/css/neutral/neutral.css +1 -1
- package/theme/styles/css/neutral/olive.css +1 -1
- package/theme/styles/css/neutral/slate.css +1 -1
- package/theme/styles/css/neutral/stone.css +1 -1
- package/theme/styles/css/neutral/taupe.css +1 -1
- package/theme/styles/css/neutral/zinc.css +1 -1
- package/types/ojiepermana-angular-chart-area.d.ts +126 -63
- package/types/ojiepermana-angular-chart-bar.d.ts +244 -154
- package/types/ojiepermana-angular-chart-core.d.ts +409 -398
- package/types/ojiepermana-angular-chart-line.d.ts +141 -68
- package/types/ojiepermana-angular-chart-pie.d.ts +192 -121
- package/types/ojiepermana-angular-chart-primitives.d.ts +283 -214
- package/types/ojiepermana-angular-chart-radar.d.ts +189 -108
- package/types/ojiepermana-angular-chart-radial.d.ts +177 -106
- package/types/ojiepermana-angular-chart-scatter.d.ts +166 -110
- package/types/ojiepermana-angular-chart.d.ts +3 -2
- package/types/ojiepermana-angular-component-accordion.d.ts +135 -81
- package/types/ojiepermana-angular-component-alert-dialog.d.ts +271 -123
- package/types/ojiepermana-angular-component-alert.d.ts +69 -39
- package/types/ojiepermana-angular-component-aspect-ratio.d.ts +20 -12
- package/types/ojiepermana-angular-component-avatar.d.ts +103 -49
- package/types/ojiepermana-angular-component-badge.d.ts +36 -24
- package/types/ojiepermana-angular-component-breadcrumb.d.ts +79 -40
- package/types/ojiepermana-angular-component-button-group.d.ts +48 -24
- package/types/ojiepermana-angular-component-button.d.ts +44 -27
- package/types/ojiepermana-angular-component-calendar.d.ts +145 -107
- package/types/ojiepermana-angular-component-card.d.ts +112 -63
- package/types/ojiepermana-angular-component-carousel.d.ts +150 -81
- package/types/ojiepermana-angular-component-checkbox.d.ts +96 -38
- package/types/ojiepermana-angular-component-collapsible.d.ts +65 -39
- package/types/ojiepermana-angular-component-combobox.d.ts +100 -55
- package/types/ojiepermana-angular-component-command.d.ts +206 -121
- package/types/ojiepermana-angular-component-composer.d.ts +184 -84
- package/types/ojiepermana-angular-component-context-menu.d.ts +51 -41
- package/types/ojiepermana-angular-component-date-picker.d.ts +199 -109
- package/types/ojiepermana-angular-component-dialog.d.ts +200 -105
- package/types/ojiepermana-angular-component-drawer.d.ts +2 -1
- package/types/ojiepermana-angular-component-dropdown-menu.d.ts +324 -202
- package/types/ojiepermana-angular-component-editor.d.ts +215 -117
- package/types/ojiepermana-angular-component-empty.d.ts +80 -45
- package/types/ojiepermana-angular-component-form.d.ts +185 -121
- package/types/ojiepermana-angular-component-hover-card.d.ts +130 -72
- package/types/ojiepermana-angular-component-icon.d.ts +87 -57
- package/types/ojiepermana-angular-component-input-group.d.ts +93 -46
- package/types/ojiepermana-angular-component-input-otp.d.ts +243 -150
- package/types/ojiepermana-angular-component-input.d.ts +27 -17
- package/types/ojiepermana-angular-component-item.d.ts +160 -84
- package/types/ojiepermana-angular-component-kanban.d.ts +157 -62
- package/types/ojiepermana-angular-component-kbd.d.ts +24 -15
- package/types/ojiepermana-angular-component-label.d.ts +19 -11
- package/types/ojiepermana-angular-component-menubar.d.ts +120 -90
- package/types/ojiepermana-angular-component-native-select.d.ts +37 -24
- package/types/ojiepermana-angular-component-navigation-menu.d.ts +157 -98
- package/types/ojiepermana-angular-component-pagination.d.ts +78 -28
- package/types/ojiepermana-angular-component-pillbox.d.ts +361 -204
- package/types/ojiepermana-angular-component-popover.d.ts +94 -64
- package/types/ojiepermana-angular-component-progress.d.ts +45 -17
- package/types/ojiepermana-angular-component-radio.d.ts +129 -53
- package/types/ojiepermana-angular-component-resizable.d.ts +160 -112
- package/types/ojiepermana-angular-component-scroll-area.d.ts +33 -15
- package/types/ojiepermana-angular-component-segmented-control.d.ts +94 -50
- package/types/ojiepermana-angular-component-select.d.ts +94 -77
- package/types/ojiepermana-angular-component-separator.d.ts +26 -14
- package/types/ojiepermana-angular-component-sheet.d.ts +226 -116
- package/types/ojiepermana-angular-component-skeleton.d.ts +13 -10
- package/types/ojiepermana-angular-component-slider.d.ts +140 -75
- package/types/ojiepermana-angular-component-spinner.d.ts +31 -13
- package/types/ojiepermana-angular-component-switch.d.ts +97 -40
- package/types/ojiepermana-angular-component-table.d.ts +102 -50
- package/types/ojiepermana-angular-component-tabs.d.ts +174 -115
- package/types/ojiepermana-angular-component-textarea.d.ts +27 -17
- package/types/ojiepermana-angular-component-timeline.d.ts +141 -59
- package/types/ojiepermana-angular-component-toast.d.ts +51 -55
- package/types/ojiepermana-angular-component-toggle-group.d.ts +159 -88
- package/types/ojiepermana-angular-component-toggle.d.ts +47 -25
- package/types/ojiepermana-angular-component-tooltip.d.ts +222 -132
- package/types/ojiepermana-angular-component-utils-core.d.ts +81 -90
- package/types/ojiepermana-angular-component-utils-overlay.d.ts +7 -11
- package/types/ojiepermana-angular-component-utils-scale.d.ts +20 -12
- package/types/ojiepermana-angular-component-utils.d.ts +2 -2
- package/types/ojiepermana-angular-component.d.ts +1 -2
- package/types/ojiepermana-angular-navigation-core.d.ts +46 -50
- package/types/ojiepermana-angular-navigation-icon.d.ts +9 -12
- package/types/ojiepermana-angular-navigation-service.d.ts +112 -115
- package/types/ojiepermana-angular-navigation-types.d.ts +121 -125
- package/types/ojiepermana-angular-navigation.d.ts +663 -374
- package/types/ojiepermana-angular-sdk.d.ts +69 -71
- package/types/ojiepermana-angular-theme-component-settings.d.ts +115 -83
- package/types/ojiepermana-angular-theme-layout-services.d.ts +119 -124
- package/types/ojiepermana-angular-theme-layout-types.d.ts +27 -31
- package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +399 -187
- package/types/ojiepermana-angular-theme-layout.d.ts +201 -112
- package/types/ojiepermana-angular-theme-page-core.d.ts +136 -142
- package/types/ojiepermana-angular-theme-page-filter.d.ts +112 -62
- package/types/ojiepermana-angular-theme-page-overview.d.ts +28 -0
- package/types/ojiepermana-angular-theme-page-root.d.ts +172 -88
- package/types/ojiepermana-angular-theme-page-side.d.ts +89 -49
- package/types/ojiepermana-angular-theme-page-slots.d.ts +58 -37
- package/types/ojiepermana-angular-theme-page.d.ts +7 -5
- package/types/ojiepermana-angular-theme-shell-services.d.ts +119 -125
- package/types/ojiepermana-angular-theme-shell-types.d.ts +38 -41
- package/types/ojiepermana-angular-theme-shell.d.ts +139 -61
- package/types/ojiepermana-angular-theme-styles.d.ts +184 -196
- package/types/ojiepermana-angular-theme.d.ts +1 -2
- package/types/ojiepermana-angular.d.ts +5 -5
- package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-CDBxQ8rk.mjs +0 -91
- package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-DBQHdvGa.mjs +0 -512
- package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-BCGvhoYj.mjs +0 -404
- package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-Dk_03e-6.mjs +0 -466
- package/fesm2022/ojiepermana-angular-navigation-ojiepermana-angular-navigation-DNKU6viC.mjs +0 -2642
|
@@ -1,410 +1,492 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { DrawerCloseDirective, DrawerComponent, DrawerContentComponent, DrawerHeaderComponent, DrawerTitleComponent } from
|
|
4
|
-
import { IconComponent } from
|
|
5
|
-
import { SegmentedControlComponent } from
|
|
6
|
-
import { globalLocalStorage, injectUniqueId
|
|
7
|
-
import {
|
|
8
|
-
import { ShellService } from
|
|
9
|
-
import { isPlatformBrowser } from
|
|
10
|
-
import { LayoutService } from
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
/** Storage key for the persisted navigation type. Owned by the package. */
|
|
18
|
-
const NAV_TYPE_STORAGE_KEY = 'nav-type';
|
|
19
|
-
/** Storage key for the persisted navigation presentation mode. Owned by the package. */
|
|
20
|
-
const NAV_TYPE_MODE_STORAGE_KEY = 'nav-type-mode';
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Component, InjectionToken, PLATFORM_ID, Service, computed, effect, inject, input, model, signal } from "@angular/core";
|
|
3
|
+
import { DrawerCloseDirective, DrawerComponent, DrawerContentComponent, DrawerHeaderComponent, DrawerTitleComponent } from "@ojiepermana/angular/component/drawer";
|
|
4
|
+
import { IconComponent } from "@ojiepermana/angular/component/icon";
|
|
5
|
+
import { SegmentedControlComponent } from "@ojiepermana/angular/component/segmented-control";
|
|
6
|
+
import { cn, globalLocalStorage, injectUniqueId } from "@ojiepermana/angular/component/utils/core";
|
|
7
|
+
import { LAYOUT_LOCKED_WIDTH, LAYOUT_TYPE_STORAGE_KEY } from "@ojiepermana/angular/theme/layout/types";
|
|
8
|
+
import { ShellService } from "@ojiepermana/angular/theme/shell/services";
|
|
9
|
+
import { isPlatformBrowser } from "@angular/common";
|
|
10
|
+
import { LayoutService } from "@ojiepermana/angular/theme/layout/services";
|
|
11
|
+
import { SHELL_COLORS, SHELL_FRAMES, SHELL_MODES, isShellDeviceForMode, resolveShellDeviceForMode, shellDevicesForMode } from "@ojiepermana/angular/theme/shell/types";
|
|
12
|
+
import { THEME_COLORS, THEME_NEUTRALS, ThemeBrandService, ThemeColorService, ThemeModeService, ThemeRadiusService, ThemeSpaceService, isThemeMode, isThemeRadius, isThemeSpace } from "@ojiepermana/angular/theme/styles";
|
|
13
|
+
const THEME_SETTINGS_ADAPTER = new InjectionToken("THEME_SETTINGS_ADAPTER");
|
|
14
|
+
const NAV_TYPE_STORAGE_KEY = "nav-type";
|
|
15
|
+
const NAV_TYPE_MODE_STORAGE_KEY = "nav-type-mode";
|
|
21
16
|
const NAV_TYPES = [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
17
|
+
"sidebar",
|
|
18
|
+
"dockbar",
|
|
19
|
+
"navbar",
|
|
20
|
+
"flyout",
|
|
21
|
+
"desktop"
|
|
27
22
|
];
|
|
28
|
-
const NAV_TYPE_MODES = [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
case 'horizontal':
|
|
40
|
-
return shellMode === 'desktop' ? ['desktop'] : ['navbar', 'flyout'];
|
|
41
|
-
default:
|
|
42
|
-
return [];
|
|
43
|
-
}
|
|
23
|
+
const NAV_TYPE_MODES = [
|
|
24
|
+
"default",
|
|
25
|
+
"collapsed",
|
|
26
|
+
"drawer"
|
|
27
|
+
];
|
|
28
|
+
function allowedNavTypes(layoutType, shellMode) {
|
|
29
|
+
switch (layoutType) {
|
|
30
|
+
case "vertical": return ["sidebar", "dockbar"];
|
|
31
|
+
case "horizontal": return shellMode === "desktop" ? ["desktop"] : ["navbar", "flyout"];
|
|
32
|
+
default: return [];
|
|
33
|
+
}
|
|
44
34
|
}
|
|
45
|
-
/**
|
|
46
|
-
* Presentation modes meaningful to a navigation type: sidebar collapses, dockbar
|
|
47
|
-
* turns into a drawer, and every other type has one presentation only.
|
|
48
|
-
*/
|
|
49
35
|
function allowedNavTypeModes(navType) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
default:
|
|
56
|
-
return ['default'];
|
|
57
|
-
}
|
|
36
|
+
switch (navType) {
|
|
37
|
+
case "sidebar": return ["default", "collapsed"];
|
|
38
|
+
case "dockbar": return ["default", "drawer"];
|
|
39
|
+
default: return ["default"];
|
|
40
|
+
}
|
|
58
41
|
}
|
|
59
|
-
/** `fluid` width only has an effect when the layout type is also `fluid`. */
|
|
60
42
|
function isWidthEnabled(layoutType, width) {
|
|
61
|
-
|
|
43
|
+
return width !== "fluid" || layoutType === "fluid";
|
|
62
44
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
else if (type !== 'fluid' && this.width() === 'fluid') {
|
|
150
|
-
this.setWidth('wide');
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
enforceNavTypeMode() {
|
|
154
|
-
const available = allowedNavTypeModes(this.navTypeState());
|
|
155
|
-
if (!available.includes(this.navTypeModeState())) {
|
|
156
|
-
this.setNavTypeMode(available[0]);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
readStoredNavType() {
|
|
160
|
-
const stored = this.storage.read(NAV_TYPE_STORAGE_KEY);
|
|
161
|
-
return stored && NAV_TYPES.includes(stored)
|
|
162
|
-
? stored
|
|
163
|
-
: 'dockbar';
|
|
164
|
-
}
|
|
165
|
-
readStoredNavTypeMode() {
|
|
166
|
-
const stored = this.storage.read(NAV_TYPE_MODE_STORAGE_KEY);
|
|
167
|
-
return stored && NAV_TYPE_MODES.includes(stored)
|
|
168
|
-
? stored
|
|
169
|
-
: 'default';
|
|
170
|
-
}
|
|
171
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ThemeSettingsDefaultAdapter, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
172
|
-
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.4", ngImport: i0, type: ThemeSettingsDefaultAdapter });
|
|
173
|
-
}
|
|
174
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ThemeSettingsDefaultAdapter, decorators: [{
|
|
175
|
-
type: Service
|
|
176
|
-
}], ctorParameters: () => [] });
|
|
177
|
-
/**
|
|
178
|
-
* Install the published {@link ThemeSettingsDefaultAdapter} on
|
|
179
|
-
* `THEME_SETTINGS_ADAPTER`, which turns on the layout and navigation sections of
|
|
180
|
-
* `<ThemeSettings>`:
|
|
181
|
-
*
|
|
182
|
-
* ```ts
|
|
183
|
-
* providers: [provideThemeSettingsAdapter()];
|
|
184
|
-
* ```
|
|
185
|
-
*
|
|
186
|
-
* Additive: consumers that provide their own adapter, or none at all, are
|
|
187
|
-
* unaffected.
|
|
188
|
-
*/
|
|
45
|
+
var ThemeSettingsDefaultAdapter = class ThemeSettingsDefaultAdapter {
|
|
46
|
+
platformId = inject(PLATFORM_ID);
|
|
47
|
+
storage = globalLocalStorage(isPlatformBrowser(this.platformId));
|
|
48
|
+
layout = inject(LayoutService);
|
|
49
|
+
shell = inject(ShellService);
|
|
50
|
+
surface = this.layout.surface;
|
|
51
|
+
appearance = this.layout.appearance;
|
|
52
|
+
width = this.layout.width;
|
|
53
|
+
layoutTypeState = signal(this.layout.getStoredType(), ...ngDevMode ? [{ debugName: "layoutTypeState" }] : /* istanbul ignore next */ []);
|
|
54
|
+
navTypeState = signal(this.readStoredNavType(), ...ngDevMode ? [{ debugName: "navTypeState" }] : /* istanbul ignore next */ []);
|
|
55
|
+
navTypeModeState = signal(this.readStoredNavTypeMode(), ...ngDevMode ? [{ debugName: "navTypeModeState" }] : /* istanbul ignore next */ []);
|
|
56
|
+
layoutType = this.layoutTypeState.asReadonly();
|
|
57
|
+
navType = this.navTypeState.asReadonly();
|
|
58
|
+
navTypeMode = this.navTypeModeState.asReadonly();
|
|
59
|
+
shellMode = this.shell.mode;
|
|
60
|
+
constructor() {
|
|
61
|
+
effect(() => this.enforceConstraints(this.layoutTypeState(), this.shell.mode()));
|
|
62
|
+
}
|
|
63
|
+
setSurface(surface) {
|
|
64
|
+
this.layout.setSurface(surface);
|
|
65
|
+
}
|
|
66
|
+
setAppearance(appearance) {
|
|
67
|
+
this.layout.setAppearance(appearance);
|
|
68
|
+
}
|
|
69
|
+
setWidth(width) {
|
|
70
|
+
this.layout.setWidth(width);
|
|
71
|
+
}
|
|
72
|
+
setLayoutType(type) {
|
|
73
|
+
this.layoutTypeState.set(type);
|
|
74
|
+
this.storage.write(LAYOUT_TYPE_STORAGE_KEY, type);
|
|
75
|
+
this.enforceConstraints(type, this.shell.mode());
|
|
76
|
+
}
|
|
77
|
+
setNavType(type) {
|
|
78
|
+
if (!allowedNavTypes(this.layoutTypeState(), this.shell.mode()).includes(type)) return;
|
|
79
|
+
this.navTypeState.set(type);
|
|
80
|
+
this.storage.write(NAV_TYPE_STORAGE_KEY, type);
|
|
81
|
+
this.enforceNavTypeMode();
|
|
82
|
+
}
|
|
83
|
+
setNavTypeMode(mode) {
|
|
84
|
+
if (!allowedNavTypeModes(this.navTypeState()).includes(mode)) return;
|
|
85
|
+
this.navTypeModeState.set(mode);
|
|
86
|
+
this.storage.write(NAV_TYPE_MODE_STORAGE_KEY, mode);
|
|
87
|
+
}
|
|
88
|
+
enforceConstraints(type, shellMode) {
|
|
89
|
+
const navs = allowedNavTypes(type, shellMode);
|
|
90
|
+
if (navs.length && !navs.includes(this.navTypeState())) this.setNavType(navs[0]);
|
|
91
|
+
this.enforceNavTypeMode();
|
|
92
|
+
if (type === "fluid" && this.width() !== "fluid") this.setWidth("fluid");
|
|
93
|
+
else if (type !== "fluid" && this.width() === "fluid") this.setWidth("wide");
|
|
94
|
+
}
|
|
95
|
+
enforceNavTypeMode() {
|
|
96
|
+
const available = allowedNavTypeModes(this.navTypeState());
|
|
97
|
+
if (!available.includes(this.navTypeModeState())) this.setNavTypeMode(available[0]);
|
|
98
|
+
}
|
|
99
|
+
readStoredNavType() {
|
|
100
|
+
const stored = this.storage.read(NAV_TYPE_STORAGE_KEY);
|
|
101
|
+
return stored && NAV_TYPES.includes(stored) ? stored : "dockbar";
|
|
102
|
+
}
|
|
103
|
+
readStoredNavTypeMode() {
|
|
104
|
+
const stored = this.storage.read(NAV_TYPE_MODE_STORAGE_KEY);
|
|
105
|
+
return stored && NAV_TYPE_MODES.includes(stored) ? stored : "default";
|
|
106
|
+
}
|
|
107
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
108
|
+
minVersion: "12.0.0",
|
|
109
|
+
version: "22.2.0",
|
|
110
|
+
ngImport: i0,
|
|
111
|
+
type: ThemeSettingsDefaultAdapter,
|
|
112
|
+
deps: [],
|
|
113
|
+
target: i0.ɵɵFactoryTarget.Service
|
|
114
|
+
});
|
|
115
|
+
static ɵprov = i0.ɵɵngDeclareService({
|
|
116
|
+
minVersion: "22.0.0",
|
|
117
|
+
version: "22.2.0",
|
|
118
|
+
ngImport: i0,
|
|
119
|
+
type: ThemeSettingsDefaultAdapter
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
123
|
+
minVersion: "12.0.0",
|
|
124
|
+
version: "22.2.0",
|
|
125
|
+
ngImport: i0,
|
|
126
|
+
type: ThemeSettingsDefaultAdapter,
|
|
127
|
+
decorators: [{ type: Service }],
|
|
128
|
+
ctorParameters: () => []
|
|
129
|
+
});
|
|
189
130
|
function provideThemeSettingsAdapter() {
|
|
190
|
-
|
|
131
|
+
return [{
|
|
132
|
+
provide: THEME_SETTINGS_ADAPTER,
|
|
133
|
+
useExisting: ThemeSettingsDefaultAdapter
|
|
134
|
+
}];
|
|
191
135
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
*
|
|
196
|
-
* Two of the four sections change something that can invalidate the navigation
|
|
197
|
-
* type: the layout section (layout type) and the shell section (shell mode). Both
|
|
198
|
-
* have to run the same correction, and before the split they called one private
|
|
199
|
-
* method. Pure functions here, so neither section owns it and neither can drift.
|
|
200
|
-
*/
|
|
201
|
-
/** Nav types the active layout and shell pair allows. Empty without an adapter. */
|
|
202
|
-
function allowedNavTypes(adapter, shellMode) {
|
|
203
|
-
const layoutType = adapter?.layoutType();
|
|
204
|
-
return layoutType ? allowedNavTypes$1(layoutType, shellMode) : [];
|
|
136
|
+
function allowedNavTypes$1(adapter, shellMode) {
|
|
137
|
+
const layoutType = adapter?.layoutType();
|
|
138
|
+
return layoutType ? allowedNavTypes(layoutType, shellMode) : [];
|
|
205
139
|
}
|
|
206
|
-
/**
|
|
207
|
-
* Correct a navigation type the new layout or shell pair no longer allows.
|
|
208
|
-
* Idempotent, and a no-op without an adapter.
|
|
209
|
-
*/
|
|
210
140
|
function normalizeNavType(adapter, shellMode) {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
adapter?.setNavType(allowed[0]);
|
|
215
|
-
}
|
|
141
|
+
const current = adapter?.navType();
|
|
142
|
+
const allowed = allowedNavTypes$1(adapter, shellMode);
|
|
143
|
+
if (current && allowed.length && !allowed.includes(current)) adapter?.setNavType(allowed[0]);
|
|
216
144
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
* 700-line source-unit budget (scripts/check-library-boundaries.mjs) as axes are
|
|
223
|
-
* added. Each option list is the full domain of one axis; the component decides
|
|
224
|
-
* which entries are `disabled` in the current combination.
|
|
225
|
-
*/
|
|
226
|
-
const DEFAULT_BRAND_COLOR = '262 83% 58%';
|
|
227
|
-
const DEFAULT_BRAND_HSL = [262, 83, 58];
|
|
145
|
+
const DEFAULT_BRAND_HSL = [
|
|
146
|
+
262,
|
|
147
|
+
83,
|
|
148
|
+
58
|
|
149
|
+
];
|
|
228
150
|
const MODE_OPTIONS = [
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
151
|
+
{
|
|
152
|
+
value: "light",
|
|
153
|
+
label: "Light",
|
|
154
|
+
icon: "light_mode"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
value: "dark",
|
|
158
|
+
label: "Dark",
|
|
159
|
+
icon: "dark_mode"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
value: "system",
|
|
163
|
+
label: "System",
|
|
164
|
+
icon: "desktop_windows"
|
|
165
|
+
}
|
|
232
166
|
];
|
|
233
|
-
/**
|
|
234
|
-
* Shell delivery targets (`@ojiepermana/angular/theme/shell`). Everything but
|
|
235
|
-
* `web` owns its whole surface, which is what locks the layout width to `full`.
|
|
236
|
-
*/
|
|
237
167
|
const SHELL_MODE_OPTIONS = [
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
168
|
+
{
|
|
169
|
+
value: "web",
|
|
170
|
+
label: "Web",
|
|
171
|
+
icon: "public"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
value: "desktop",
|
|
175
|
+
label: "Desktop",
|
|
176
|
+
icon: "desktop_windows"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
value: "tablet",
|
|
180
|
+
label: "Tablet",
|
|
181
|
+
icon: "tablet"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
value: "mobile",
|
|
185
|
+
label: "Mobile",
|
|
186
|
+
icon: "smartphone"
|
|
187
|
+
}
|
|
250
188
|
];
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
189
|
+
const SHELL_COLOR_OPTIONS = [{
|
|
190
|
+
value: "sync",
|
|
191
|
+
label: "Sync",
|
|
192
|
+
icon: "palette"
|
|
193
|
+
}, {
|
|
194
|
+
value: "default",
|
|
195
|
+
label: "Native",
|
|
196
|
+
icon: "desktop_mac"
|
|
197
|
+
}];
|
|
198
|
+
const SHELL_FRAME_OPTIONS = [{
|
|
199
|
+
value: "classic",
|
|
200
|
+
label: "Classic",
|
|
201
|
+
icon: "crop_din"
|
|
202
|
+
}, {
|
|
203
|
+
value: "modern",
|
|
204
|
+
label: "Modern",
|
|
205
|
+
icon: "fullscreen_exit"
|
|
206
|
+
}];
|
|
264
207
|
const SHELL_DEVICE_OPTIONS = {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
208
|
+
browser: {
|
|
209
|
+
value: "browser",
|
|
210
|
+
label: "Browser",
|
|
211
|
+
icon: "language"
|
|
212
|
+
},
|
|
213
|
+
macos: {
|
|
214
|
+
value: "macos",
|
|
215
|
+
label: "macOS",
|
|
216
|
+
icon: "laptop_mac"
|
|
217
|
+
},
|
|
218
|
+
windows: {
|
|
219
|
+
value: "windows",
|
|
220
|
+
label: "Windows",
|
|
221
|
+
icon: "laptop_windows"
|
|
222
|
+
},
|
|
223
|
+
linux: {
|
|
224
|
+
value: "linux",
|
|
225
|
+
label: "Linux",
|
|
226
|
+
icon: "terminal"
|
|
227
|
+
},
|
|
228
|
+
ipad: {
|
|
229
|
+
value: "ipad",
|
|
230
|
+
label: "iPad",
|
|
231
|
+
icon: "tablet_mac"
|
|
232
|
+
},
|
|
233
|
+
android: {
|
|
234
|
+
value: "android",
|
|
235
|
+
label: "Android",
|
|
236
|
+
icon: "android"
|
|
237
|
+
},
|
|
238
|
+
ios: {
|
|
239
|
+
value: "ios",
|
|
240
|
+
label: "iOS",
|
|
241
|
+
icon: "phone_iphone"
|
|
242
|
+
}
|
|
272
243
|
};
|
|
273
|
-
/** Corner radius axis; each preset carries Tailwind's stock value for its name. */
|
|
274
244
|
const RADIUS_OPTIONS = [
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
245
|
+
{
|
|
246
|
+
value: "none",
|
|
247
|
+
label: "None",
|
|
248
|
+
icon: "crop_square"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
value: "xs",
|
|
252
|
+
label: "Xs",
|
|
253
|
+
icon: "rounded_corner"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
value: "sm",
|
|
257
|
+
label: "Sm",
|
|
258
|
+
icon: "rounded_corner"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
value: "md",
|
|
262
|
+
label: "Md",
|
|
263
|
+
icon: "rounded_corner"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
value: "xl",
|
|
267
|
+
label: "Xl",
|
|
268
|
+
icon: "rounded_corner"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
value: "full",
|
|
272
|
+
label: "Full",
|
|
273
|
+
icon: "circle"
|
|
274
|
+
}
|
|
289
275
|
];
|
|
276
|
+
const SPACE_OPTIONS = [{
|
|
277
|
+
value: "compact",
|
|
278
|
+
label: "Compact",
|
|
279
|
+
icon: "density_small"
|
|
280
|
+
}, {
|
|
281
|
+
value: "normal",
|
|
282
|
+
label: "Normal",
|
|
283
|
+
icon: "density_medium"
|
|
284
|
+
}];
|
|
285
|
+
const APPEARANCE_OPTIONS = [{
|
|
286
|
+
value: "flat",
|
|
287
|
+
label: "Flat",
|
|
288
|
+
icon: "web_asset"
|
|
289
|
+
}, {
|
|
290
|
+
value: "border-rail",
|
|
291
|
+
label: "Border rail",
|
|
292
|
+
icon: "border_outer"
|
|
293
|
+
}];
|
|
290
294
|
const SURFACE_OPTIONS = [
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
295
|
+
{
|
|
296
|
+
value: "flat",
|
|
297
|
+
label: "Flat",
|
|
298
|
+
icon: "format_color_reset"
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
value: "grid",
|
|
302
|
+
label: "Grid",
|
|
303
|
+
icon: "grid_4x4"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
value: "grid-line",
|
|
307
|
+
label: "Grid line",
|
|
308
|
+
icon: "grid_view"
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
value: "honeycomb",
|
|
312
|
+
label: "Honeycomb",
|
|
313
|
+
icon: "hexagon"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
value: "matrix",
|
|
317
|
+
label: "Matrix",
|
|
318
|
+
icon: "data_object"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
value: "circuit",
|
|
322
|
+
label: "Circuit",
|
|
323
|
+
icon: "memory"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
value: "line-vertical",
|
|
327
|
+
label: "Vertical lines",
|
|
328
|
+
icon: "view_column"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
value: "line-horizontal",
|
|
332
|
+
label: "Horizontal lines",
|
|
333
|
+
icon: "view_agenda"
|
|
334
|
+
}
|
|
299
335
|
];
|
|
300
336
|
const LAYOUT_TYPE_OPTIONS = [
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
337
|
+
{
|
|
338
|
+
value: "vertical",
|
|
339
|
+
label: "Vertical",
|
|
340
|
+
icon: "view_sidebar"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
value: "horizontal",
|
|
344
|
+
label: "Horizontal",
|
|
345
|
+
icon: "view_stream"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
value: "empty",
|
|
349
|
+
label: "Empty",
|
|
350
|
+
icon: "crop_free"
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
value: "fluid",
|
|
354
|
+
label: "Fluid",
|
|
355
|
+
icon: "fit_screen"
|
|
356
|
+
}
|
|
305
357
|
];
|
|
306
358
|
const WIDTH_OPTIONS = [
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
359
|
+
{
|
|
360
|
+
value: "full",
|
|
361
|
+
label: "Full",
|
|
362
|
+
icon: "width_full"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
value: "wide",
|
|
366
|
+
label: "Wide",
|
|
367
|
+
icon: "width_wide"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
value: "container",
|
|
371
|
+
label: "Container",
|
|
372
|
+
icon: "width_normal"
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
value: "fluid",
|
|
376
|
+
label: "Fluid",
|
|
377
|
+
icon: "aspect_ratio"
|
|
378
|
+
}
|
|
311
379
|
];
|
|
312
380
|
const NAV_TYPE_OPTIONS = [
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
381
|
+
{
|
|
382
|
+
value: "sidebar",
|
|
383
|
+
label: "Sidebar",
|
|
384
|
+
icon: "left_panel_open"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
value: "dockbar",
|
|
388
|
+
label: "Dockbar",
|
|
389
|
+
icon: "dock_to_left"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
value: "navbar",
|
|
393
|
+
label: "Navbar",
|
|
394
|
+
icon: "menu"
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
value: "flyout",
|
|
398
|
+
label: "Flyout",
|
|
399
|
+
icon: "open_in_new"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
value: "desktop",
|
|
403
|
+
label: "Desktop",
|
|
404
|
+
icon: "desktop_windows"
|
|
405
|
+
}
|
|
318
406
|
];
|
|
319
407
|
const ACCENT_SWATCH = {
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
408
|
+
base: "hsl(240 6% 10%)",
|
|
409
|
+
red: "hsl(0 72% 48%)",
|
|
410
|
+
orange: "hsl(24 95% 48%)",
|
|
411
|
+
amber: "hsl(38 92% 48%)",
|
|
412
|
+
yellow: "hsl(48 96% 48%)",
|
|
413
|
+
lime: "hsl(84 78% 44%)",
|
|
414
|
+
green: "hsl(142 69% 40%)",
|
|
415
|
+
emerald: "hsl(160 78% 38%)",
|
|
416
|
+
teal: "hsl(173 75% 38%)",
|
|
417
|
+
cyan: "hsl(191 85% 40%)",
|
|
418
|
+
sky: "hsl(199 89% 46%)",
|
|
419
|
+
blue: "hsl(221 83% 53%)",
|
|
420
|
+
indigo: "hsl(239 78% 60%)",
|
|
421
|
+
violet: "hsl(258 86% 62%)",
|
|
422
|
+
purple: "hsl(271 81% 56%)",
|
|
423
|
+
fuchsia: "hsl(292 80% 56%)",
|
|
424
|
+
pink: "hsl(330 78% 54%)",
|
|
425
|
+
rose: "hsl(349 84% 52%)",
|
|
426
|
+
brand: "hsl(var(--brand))"
|
|
339
427
|
};
|
|
340
428
|
const NEUTRAL_SWATCH = {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
429
|
+
base: "hsl(220 9% 46%)",
|
|
430
|
+
slate: "hsl(215 16% 47%)",
|
|
431
|
+
gray: "hsl(220 9% 46%)",
|
|
432
|
+
zinc: "hsl(240 5% 46%)",
|
|
433
|
+
neutral: "hsl(0 0% 46%)",
|
|
434
|
+
stone: "hsl(30 6% 46%)",
|
|
435
|
+
mauve: "hsl(280 6% 47%)",
|
|
436
|
+
olive: "hsl(80 8% 42%)",
|
|
437
|
+
mist: "hsl(200 14% 50%)",
|
|
438
|
+
taupe: "hsl(28 10% 46%)"
|
|
351
439
|
};
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
return;
|
|
403
|
-
if (WIDTH_OPTIONS.some((option) => option.value === value))
|
|
404
|
-
this.settings.setWidth(value);
|
|
405
|
-
}
|
|
406
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ThemeSettingsLayoutSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
407
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: ThemeSettingsLayoutSectionComponent, isStandalone: true, selector: "ThemeSettingsLayoutSection", host: { classAttribute: "contents" }, ngImport: i0, template: `
|
|
440
|
+
var ThemeSettingsLayoutSectionComponent = class ThemeSettingsLayoutSectionComponent {
|
|
441
|
+
shell = inject(ShellService);
|
|
442
|
+
settings = inject(THEME_SETTINGS_ADAPTER);
|
|
443
|
+
shellMode = this.shell.mode;
|
|
444
|
+
widthLocked = computed(() => this.shellMode() !== "web", ...ngDevMode ? [{ debugName: "widthLocked" }] : /* istanbul ignore next */ []);
|
|
445
|
+
appearanceOptions = APPEARANCE_OPTIONS;
|
|
446
|
+
surfaceOptions = SURFACE_OPTIONS;
|
|
447
|
+
layoutTypeOptions = LAYOUT_TYPE_OPTIONS;
|
|
448
|
+
widthOptions = computed(() => WIDTH_OPTIONS.map((option) => ({
|
|
449
|
+
...option,
|
|
450
|
+
disabled: this.widthLocked() && option.value !== LAYOUT_LOCKED_WIDTH || option.value === "fluid" && this.settings.layoutType() !== "fluid"
|
|
451
|
+
})), ...ngDevMode ? [{ debugName: "widthOptions" }] : /* istanbul ignore next */ []);
|
|
452
|
+
layoutGroupId = injectUniqueId("theme-settings-layout");
|
|
453
|
+
appearanceLabelId = injectUniqueId("theme-settings-appearance");
|
|
454
|
+
surfaceLabelId = injectUniqueId("theme-settings-surface");
|
|
455
|
+
layoutTypeLabelId = injectUniqueId("theme-settings-layout-type");
|
|
456
|
+
widthLabelId = injectUniqueId("theme-settings-width");
|
|
457
|
+
setAppearance(value) {
|
|
458
|
+
if (value === "flat" || value === "border-rail") this.settings.setAppearance(value);
|
|
459
|
+
}
|
|
460
|
+
setSurface(value) {
|
|
461
|
+
if (SURFACE_OPTIONS.some((option) => option.value === value)) this.settings.setSurface(value);
|
|
462
|
+
}
|
|
463
|
+
setLayoutType(value) {
|
|
464
|
+
if (LAYOUT_TYPE_OPTIONS.some((option) => option.value === value)) {
|
|
465
|
+
this.settings.setLayoutType(value);
|
|
466
|
+
normalizeNavType(this.settings, this.shellMode());
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
setWidth(value) {
|
|
470
|
+
if (this.widthLocked()) return;
|
|
471
|
+
if (WIDTH_OPTIONS.some((option) => option.value === value)) this.settings.setWidth(value);
|
|
472
|
+
}
|
|
473
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
474
|
+
minVersion: "12.0.0",
|
|
475
|
+
version: "22.2.0",
|
|
476
|
+
ngImport: i0,
|
|
477
|
+
type: ThemeSettingsLayoutSectionComponent,
|
|
478
|
+
deps: [],
|
|
479
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
480
|
+
});
|
|
481
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
482
|
+
minVersion: "17.0.0",
|
|
483
|
+
version: "22.2.0",
|
|
484
|
+
type: ThemeSettingsLayoutSectionComponent,
|
|
485
|
+
isStandalone: true,
|
|
486
|
+
selector: "ThemeSettingsLayoutSection",
|
|
487
|
+
host: { classAttribute: "contents" },
|
|
488
|
+
ngImport: i0,
|
|
489
|
+
template: `
|
|
408
490
|
<section
|
|
409
491
|
class="flex flex-col gap-5 border-t border-border pt-7"
|
|
410
492
|
[attr.aria-labelledby]="layoutGroupId"
|
|
@@ -463,15 +545,39 @@ class ThemeSettingsLayoutSectionComponent {
|
|
|
463
545
|
}
|
|
464
546
|
</div>
|
|
465
547
|
</section>
|
|
466
|
-
`,
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
548
|
+
`,
|
|
549
|
+
isInline: true,
|
|
550
|
+
dependencies: [{
|
|
551
|
+
kind: "component",
|
|
552
|
+
type: SegmentedControlComponent,
|
|
553
|
+
selector: "SegmentedControl",
|
|
554
|
+
inputs: [
|
|
555
|
+
"options",
|
|
556
|
+
"value",
|
|
557
|
+
"appearance",
|
|
558
|
+
"space",
|
|
559
|
+
"disabled",
|
|
560
|
+
"aria-label",
|
|
561
|
+
"aria-labelledby",
|
|
562
|
+
"aria-describedby",
|
|
563
|
+
"class"
|
|
564
|
+
],
|
|
565
|
+
outputs: ["valueChange"]
|
|
566
|
+
}]
|
|
567
|
+
});
|
|
568
|
+
};
|
|
569
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
570
|
+
minVersion: "12.0.0",
|
|
571
|
+
version: "22.2.0",
|
|
572
|
+
ngImport: i0,
|
|
573
|
+
type: ThemeSettingsLayoutSectionComponent,
|
|
574
|
+
decorators: [{
|
|
575
|
+
type: Component,
|
|
576
|
+
args: [{
|
|
577
|
+
selector: "ThemeSettingsLayoutSection",
|
|
578
|
+
imports: [SegmentedControlComponent],
|
|
579
|
+
host: { class: "contents" },
|
|
580
|
+
template: `
|
|
475
581
|
<section
|
|
476
582
|
class="flex flex-col gap-5 border-t border-border pt-7"
|
|
477
583
|
[attr.aria-labelledby]="layoutGroupId"
|
|
@@ -530,57 +636,70 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
530
636
|
}
|
|
531
637
|
</div>
|
|
532
638
|
</section>
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
639
|
+
`
|
|
640
|
+
}]
|
|
641
|
+
}]
|
|
642
|
+
});
|
|
643
|
+
var ThemeSettingsNavigationSectionComponent = class ThemeSettingsNavigationSectionComponent {
|
|
644
|
+
shell = inject(ShellService);
|
|
645
|
+
settings = inject(THEME_SETTINGS_ADAPTER);
|
|
646
|
+
navTypeOptions = computed(() => NAV_TYPE_OPTIONS.map((option) => ({
|
|
647
|
+
...option,
|
|
648
|
+
disabled: !allowedNavTypes$1(this.settings, this.shell.mode()).includes(option.value)
|
|
649
|
+
})), ...ngDevMode ? [{ debugName: "navTypeOptions" }] : /* istanbul ignore next */ []);
|
|
650
|
+
navTypeModeOptions = computed(() => {
|
|
651
|
+
switch (this.settings.navType()) {
|
|
652
|
+
case "sidebar": return [{
|
|
653
|
+
value: "default",
|
|
654
|
+
label: "Default",
|
|
655
|
+
icon: "view_sidebar"
|
|
656
|
+
}, {
|
|
657
|
+
value: "collapsed",
|
|
658
|
+
label: "Collapsed",
|
|
659
|
+
icon: "first_page"
|
|
660
|
+
}];
|
|
661
|
+
case "dockbar": return [{
|
|
662
|
+
value: "default",
|
|
663
|
+
label: "Sticky",
|
|
664
|
+
icon: "dock_to_left"
|
|
665
|
+
}, {
|
|
666
|
+
value: "drawer",
|
|
667
|
+
label: "Drawer",
|
|
668
|
+
icon: "side_navigation"
|
|
669
|
+
}];
|
|
670
|
+
default: return [{
|
|
671
|
+
value: "default",
|
|
672
|
+
label: "Default",
|
|
673
|
+
icon: "tune"
|
|
674
|
+
}];
|
|
675
|
+
}
|
|
676
|
+
}, ...ngDevMode ? [{ debugName: "navTypeModeOptions" }] : /* istanbul ignore next */ []);
|
|
677
|
+
navigationGroupId = injectUniqueId("theme-settings-navigation");
|
|
678
|
+
navTypeLabelId = injectUniqueId("theme-settings-nav-type");
|
|
679
|
+
navTypeModeLabelId = injectUniqueId("theme-settings-nav-type-mode");
|
|
680
|
+
setNavType(value) {
|
|
681
|
+
if (value && allowedNavTypes$1(this.settings, this.shell.mode()).includes(value)) this.settings.setNavType(value);
|
|
682
|
+
}
|
|
683
|
+
setNavTypeMode(value) {
|
|
684
|
+
if (value === "default" || value === "collapsed" || value === "drawer") this.settings.setNavTypeMode(value);
|
|
685
|
+
}
|
|
686
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
687
|
+
minVersion: "12.0.0",
|
|
688
|
+
version: "22.2.0",
|
|
689
|
+
ngImport: i0,
|
|
690
|
+
type: ThemeSettingsNavigationSectionComponent,
|
|
691
|
+
deps: [],
|
|
692
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
693
|
+
});
|
|
694
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
695
|
+
minVersion: "14.0.0",
|
|
696
|
+
version: "22.2.0",
|
|
697
|
+
type: ThemeSettingsNavigationSectionComponent,
|
|
698
|
+
isStandalone: true,
|
|
699
|
+
selector: "ThemeSettingsNavigationSection",
|
|
700
|
+
host: { classAttribute: "contents" },
|
|
701
|
+
ngImport: i0,
|
|
702
|
+
template: `
|
|
584
703
|
<section
|
|
585
704
|
class="flex flex-col gap-5 border-t border-border pt-7"
|
|
586
705
|
[attr.aria-labelledby]="navigationGroupId"
|
|
@@ -609,15 +728,39 @@ class ThemeSettingsNavigationSectionComponent {
|
|
|
609
728
|
/>
|
|
610
729
|
</div>
|
|
611
730
|
</section>
|
|
612
|
-
`,
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
731
|
+
`,
|
|
732
|
+
isInline: true,
|
|
733
|
+
dependencies: [{
|
|
734
|
+
kind: "component",
|
|
735
|
+
type: SegmentedControlComponent,
|
|
736
|
+
selector: "SegmentedControl",
|
|
737
|
+
inputs: [
|
|
738
|
+
"options",
|
|
739
|
+
"value",
|
|
740
|
+
"appearance",
|
|
741
|
+
"space",
|
|
742
|
+
"disabled",
|
|
743
|
+
"aria-label",
|
|
744
|
+
"aria-labelledby",
|
|
745
|
+
"aria-describedby",
|
|
746
|
+
"class"
|
|
747
|
+
],
|
|
748
|
+
outputs: ["valueChange"]
|
|
749
|
+
}]
|
|
750
|
+
});
|
|
751
|
+
};
|
|
752
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
753
|
+
minVersion: "12.0.0",
|
|
754
|
+
version: "22.2.0",
|
|
755
|
+
ngImport: i0,
|
|
756
|
+
type: ThemeSettingsNavigationSectionComponent,
|
|
757
|
+
decorators: [{
|
|
758
|
+
type: Component,
|
|
759
|
+
args: [{
|
|
760
|
+
selector: "ThemeSettingsNavigationSection",
|
|
761
|
+
imports: [SegmentedControlComponent],
|
|
762
|
+
host: { class: "contents" },
|
|
763
|
+
template: `
|
|
621
764
|
<section
|
|
622
765
|
class="flex flex-col gap-5 border-t border-border pt-7"
|
|
623
766
|
[attr.aria-labelledby]="navigationGroupId"
|
|
@@ -646,73 +789,62 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
646
789
|
/>
|
|
647
790
|
</div>
|
|
648
791
|
</section>
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
if (value === 'modern' && this.shellMode() !== 'desktop')
|
|
706
|
-
return;
|
|
707
|
-
if (SHELL_FRAMES.includes(value))
|
|
708
|
-
this.shell.setFrame(value);
|
|
709
|
-
}
|
|
710
|
-
setShellColor(value) {
|
|
711
|
-
if (SHELL_COLORS.includes(value))
|
|
712
|
-
this.shell.setColor(value);
|
|
713
|
-
}
|
|
714
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ThemeSettingsShellSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
715
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: ThemeSettingsShellSectionComponent, isStandalone: true, selector: "ThemeSettingsShellSection", host: { classAttribute: "contents" }, ngImport: i0, template: `
|
|
792
|
+
`
|
|
793
|
+
}]
|
|
794
|
+
}]
|
|
795
|
+
});
|
|
796
|
+
var ThemeSettingsShellSectionComponent = class ThemeSettingsShellSectionComponent {
|
|
797
|
+
shell = inject(ShellService);
|
|
798
|
+
settings = inject(THEME_SETTINGS_ADAPTER, { optional: true });
|
|
799
|
+
shellMode = this.shell.mode;
|
|
800
|
+
shellColor = this.shell.color;
|
|
801
|
+
shellFrame = this.shell.frame;
|
|
802
|
+
shellFrameOptions = computed(() => SHELL_FRAME_OPTIONS.map((option) => ({
|
|
803
|
+
...option,
|
|
804
|
+
disabled: option.value === "modern" && this.shellMode() !== "desktop"
|
|
805
|
+
})), ...ngDevMode ? [{ debugName: "shellFrameOptions" }] : /* istanbul ignore next */ []);
|
|
806
|
+
shellDevice = computed(() => resolveShellDeviceForMode(this.shellMode(), this.shell.device()), ...ngDevMode ? [{ debugName: "shellDevice" }] : /* istanbul ignore next */ []);
|
|
807
|
+
shellDeviceOptions = computed(() => shellDevicesForMode(this.shellMode()).map((device) => SHELL_DEVICE_OPTIONS[device]), ...ngDevMode ? [{ debugName: "shellDeviceOptions" }] : /* istanbul ignore next */ []);
|
|
808
|
+
shellModeOptions = SHELL_MODE_OPTIONS;
|
|
809
|
+
shellColorOptions = SHELL_COLOR_OPTIONS;
|
|
810
|
+
shellGroupId = injectUniqueId("theme-settings-shell");
|
|
811
|
+
shellModeLabelId = injectUniqueId("theme-settings-shell-mode");
|
|
812
|
+
shellDeviceLabelId = injectUniqueId("theme-settings-shell-device");
|
|
813
|
+
shellColorLabelId = injectUniqueId("theme-settings-shell-color");
|
|
814
|
+
shellFrameLabelId = injectUniqueId("theme-settings-shell-frame");
|
|
815
|
+
setShellMode(value) {
|
|
816
|
+
if (SHELL_MODES.includes(value)) {
|
|
817
|
+
this.shell.setMode(value);
|
|
818
|
+
normalizeNavType(this.settings, this.shellMode());
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
setShellDevice(value) {
|
|
822
|
+
if (value && isShellDeviceForMode(this.shellMode(), value)) this.shell.setDevice(value);
|
|
823
|
+
}
|
|
824
|
+
setShellFrame(value) {
|
|
825
|
+
if (value === "modern" && this.shellMode() !== "desktop") return;
|
|
826
|
+
if (SHELL_FRAMES.includes(value)) this.shell.setFrame(value);
|
|
827
|
+
}
|
|
828
|
+
setShellColor(value) {
|
|
829
|
+
if (SHELL_COLORS.includes(value)) this.shell.setColor(value);
|
|
830
|
+
}
|
|
831
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
832
|
+
minVersion: "12.0.0",
|
|
833
|
+
version: "22.2.0",
|
|
834
|
+
ngImport: i0,
|
|
835
|
+
type: ThemeSettingsShellSectionComponent,
|
|
836
|
+
deps: [],
|
|
837
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
838
|
+
});
|
|
839
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
840
|
+
minVersion: "17.0.0",
|
|
841
|
+
version: "22.2.0",
|
|
842
|
+
type: ThemeSettingsShellSectionComponent,
|
|
843
|
+
isStandalone: true,
|
|
844
|
+
selector: "ThemeSettingsShellSection",
|
|
845
|
+
host: { classAttribute: "contents" },
|
|
846
|
+
ngImport: i0,
|
|
847
|
+
template: `
|
|
716
848
|
<section
|
|
717
849
|
class="flex flex-col gap-5 border-t border-border pt-7"
|
|
718
850
|
[attr.aria-labelledby]="shellGroupId"
|
|
@@ -784,15 +916,39 @@ class ThemeSettingsShellSectionComponent {
|
|
|
784
916
|
</p>
|
|
785
917
|
</div>
|
|
786
918
|
</section>
|
|
787
|
-
`,
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
919
|
+
`,
|
|
920
|
+
isInline: true,
|
|
921
|
+
dependencies: [{
|
|
922
|
+
kind: "component",
|
|
923
|
+
type: SegmentedControlComponent,
|
|
924
|
+
selector: "SegmentedControl",
|
|
925
|
+
inputs: [
|
|
926
|
+
"options",
|
|
927
|
+
"value",
|
|
928
|
+
"appearance",
|
|
929
|
+
"space",
|
|
930
|
+
"disabled",
|
|
931
|
+
"aria-label",
|
|
932
|
+
"aria-labelledby",
|
|
933
|
+
"aria-describedby",
|
|
934
|
+
"class"
|
|
935
|
+
],
|
|
936
|
+
outputs: ["valueChange"]
|
|
937
|
+
}]
|
|
938
|
+
});
|
|
939
|
+
};
|
|
940
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
941
|
+
minVersion: "12.0.0",
|
|
942
|
+
version: "22.2.0",
|
|
943
|
+
ngImport: i0,
|
|
944
|
+
type: ThemeSettingsShellSectionComponent,
|
|
945
|
+
decorators: [{
|
|
946
|
+
type: Component,
|
|
947
|
+
args: [{
|
|
948
|
+
selector: "ThemeSettingsShellSection",
|
|
949
|
+
imports: [SegmentedControlComponent],
|
|
950
|
+
host: { class: "contents" },
|
|
951
|
+
template: `
|
|
796
952
|
<section
|
|
797
953
|
class="flex flex-col gap-5 border-t border-border pt-7"
|
|
798
954
|
[attr.aria-labelledby]="shellGroupId"
|
|
@@ -864,158 +1020,153 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
864
1020
|
</p>
|
|
865
1021
|
</div>
|
|
866
1022
|
</section>
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
/*
|
|
872
|
-
* Brand-color math for `ThemeSettings`.
|
|
873
|
-
*
|
|
874
|
-
* The drawer's brand picker is a native `<input type="color">`, which speaks hex,
|
|
875
|
-
* while the design system's tokens are HSL triplets (`H S% L%`). These pure
|
|
876
|
-
* conversions bridge the two, plus pick a readable foreground for a chosen brand.
|
|
877
|
-
*
|
|
878
|
-
* Extracted from the component so the drawer stays inside the 700-line source-unit
|
|
879
|
-
* budget (scripts/check-library-boundaries.mjs) as shell axes are added.
|
|
880
|
-
*/
|
|
1023
|
+
`
|
|
1024
|
+
}]
|
|
1025
|
+
}]
|
|
1026
|
+
});
|
|
881
1027
|
function hslToHex(color) {
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
1028
|
+
const match = /^(\d+(?:\.\d+)?)\s+(\d+(?:\.\d+)?)%\s+(\d+(?:\.\d+)?)%$/.exec(color);
|
|
1029
|
+
const [hue, saturation, lightness] = match ? [
|
|
1030
|
+
Number(match[1]),
|
|
1031
|
+
Number(match[2]),
|
|
1032
|
+
Number(match[3])
|
|
1033
|
+
] : DEFAULT_BRAND_HSL;
|
|
1034
|
+
const chroma = (1 - Math.abs(2 * (lightness / 100) - 1)) * (saturation / 100);
|
|
1035
|
+
const segment = hue / 60;
|
|
1036
|
+
const x = chroma * (1 - Math.abs(segment % 2 - 1));
|
|
1037
|
+
const matchLightness = lightness / 100 - chroma / 2;
|
|
1038
|
+
const [red, green, blue] = segment < 1 ? [
|
|
1039
|
+
chroma,
|
|
1040
|
+
x,
|
|
1041
|
+
0
|
|
1042
|
+
] : segment < 2 ? [
|
|
1043
|
+
x,
|
|
1044
|
+
chroma,
|
|
1045
|
+
0
|
|
1046
|
+
] : segment < 3 ? [
|
|
1047
|
+
0,
|
|
1048
|
+
chroma,
|
|
1049
|
+
x
|
|
1050
|
+
] : segment < 4 ? [
|
|
1051
|
+
0,
|
|
1052
|
+
x,
|
|
1053
|
+
chroma
|
|
1054
|
+
] : segment < 5 ? [
|
|
1055
|
+
x,
|
|
1056
|
+
0,
|
|
1057
|
+
chroma
|
|
1058
|
+
] : [
|
|
1059
|
+
chroma,
|
|
1060
|
+
0,
|
|
1061
|
+
x
|
|
1062
|
+
];
|
|
1063
|
+
const channel = (value) => Math.round((value + matchLightness) * 255).toString(16).padStart(2, "0");
|
|
1064
|
+
return `#${channel(red)}${channel(green)}${channel(blue)}`;
|
|
905
1065
|
}
|
|
906
1066
|
function hexToHsl(color) {
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
if (hue < 0)
|
|
925
|
-
hue += 360;
|
|
926
|
-
const saturation = delta === 0 ? 0 : delta / (1 - Math.abs(2 * lightness - 1));
|
|
927
|
-
return `${Math.round(hue)} ${Math.round(saturation * 100)}% ${Math.round(lightness * 100)}%`;
|
|
1067
|
+
const match = /^#([0-9a-f]{6})$/i.exec(color);
|
|
1068
|
+
if (!match) return null;
|
|
1069
|
+
const hex = match[1];
|
|
1070
|
+
const [red, green, blue] = [
|
|
1071
|
+
0,
|
|
1072
|
+
2,
|
|
1073
|
+
4
|
|
1074
|
+
].map((index) => Number.parseInt(hex.slice(index, index + 2), 16) / 255);
|
|
1075
|
+
const max = Math.max(red, green, blue);
|
|
1076
|
+
const min = Math.min(red, green, blue);
|
|
1077
|
+
const delta = max - min;
|
|
1078
|
+
const lightness = (max + min) / 2;
|
|
1079
|
+
let hue = 0;
|
|
1080
|
+
if (delta !== 0) hue = max === red ? 60 * ((green - blue) / delta % 6) : max === green ? 60 * ((blue - red) / delta + 2) : 60 * ((red - green) / delta + 4);
|
|
1081
|
+
if (hue < 0) hue += 360;
|
|
1082
|
+
const saturation = delta === 0 ? 0 : delta / (1 - Math.abs(2 * lightness - 1));
|
|
1083
|
+
return `${Math.round(hue)} ${Math.round(saturation * 100)}% ${Math.round(lightness * 100)}%`;
|
|
928
1084
|
}
|
|
929
1085
|
function brandForeground(color) {
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
1086
|
+
const match = /^#([0-9a-f]{6})$/i.exec(color);
|
|
1087
|
+
if (!match) return "0 0% 100%";
|
|
1088
|
+
const channels = [
|
|
1089
|
+
0,
|
|
1090
|
+
2,
|
|
1091
|
+
4
|
|
1092
|
+
].map((index) => Number.parseInt(match[1].slice(index, index + 2), 16));
|
|
1093
|
+
const linear = (channel) => {
|
|
1094
|
+
const value = channel / 255;
|
|
1095
|
+
return value <= .04045 ? value / 12.92 : ((value + .055) / 1.055) ** 2.4;
|
|
1096
|
+
};
|
|
1097
|
+
return linear(channels[0]) * .2126 + linear(channels[1]) * .7152 + linear(channels[2]) * .0722 > .179 ? "0 0% 0%" : "0 0% 100%";
|
|
940
1098
|
}
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
if (!hsl)
|
|
1013
|
-
return;
|
|
1014
|
-
this.themeBrand.setBrand(hsl, brandForeground(color));
|
|
1015
|
-
this.themeColor.setColor('brand');
|
|
1016
|
-
}
|
|
1017
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ThemeSettingsThemeSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1018
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: ThemeSettingsThemeSectionComponent, isStandalone: true, selector: "ThemeSettingsThemeSection", host: { classAttribute: "contents" }, ngImport: i0, template: `
|
|
1099
|
+
var ThemeSettingsThemeSectionComponent = class ThemeSettingsThemeSectionComponent {
|
|
1100
|
+
themeMode = inject(ThemeModeService);
|
|
1101
|
+
themeColor = inject(ThemeColorService);
|
|
1102
|
+
themeBrand = inject(ThemeBrandService);
|
|
1103
|
+
themeRadius = inject(ThemeRadiusService);
|
|
1104
|
+
themeSpace = inject(ThemeSpaceService);
|
|
1105
|
+
mode = this.themeMode.mode;
|
|
1106
|
+
resolvedMode = this.themeMode.resolvedMode;
|
|
1107
|
+
color = this.themeColor.color;
|
|
1108
|
+
neutralColor = this.themeColor.neutral;
|
|
1109
|
+
brand = this.themeBrand.brand;
|
|
1110
|
+
brandHex = computed(() => hslToHex(this.brand()?.color ?? "262 83% 58%"), ...ngDevMode ? [{ debugName: "brandHex" }] : /* istanbul ignore next */ []);
|
|
1111
|
+
radius = this.themeRadius.radius;
|
|
1112
|
+
space = this.themeSpace.space;
|
|
1113
|
+
accents = THEME_COLORS;
|
|
1114
|
+
neutrals = THEME_NEUTRALS;
|
|
1115
|
+
accentSwatch = ACCENT_SWATCH;
|
|
1116
|
+
neutralSwatch = NEUTRAL_SWATCH;
|
|
1117
|
+
modeOptions = MODE_OPTIONS;
|
|
1118
|
+
radiusOptions = RADIUS_OPTIONS;
|
|
1119
|
+
spaceOptions = SPACE_OPTIONS;
|
|
1120
|
+
themeGroupId = injectUniqueId("theme-settings-theme");
|
|
1121
|
+
modeLabelId = injectUniqueId("theme-settings-mode");
|
|
1122
|
+
brandLabelId = injectUniqueId("theme-settings-brand");
|
|
1123
|
+
accentLabelId = injectUniqueId("theme-settings-accent");
|
|
1124
|
+
neutralLabelId = injectUniqueId("theme-settings-neutral");
|
|
1125
|
+
spaceLabelId = injectUniqueId("theme-settings-space");
|
|
1126
|
+
radiusLabelId = injectUniqueId("theme-settings-radius");
|
|
1127
|
+
swatchClasses(active) {
|
|
1128
|
+
return cn("inline-flex size-[18px] rounded-full ring-1 ring-black/10 transition-[transform,box-shadow] duration-200 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");
|
|
1129
|
+
}
|
|
1130
|
+
setMode(value) {
|
|
1131
|
+
if (isThemeMode(value)) this.themeMode.setMode(value);
|
|
1132
|
+
}
|
|
1133
|
+
setColor(value) {
|
|
1134
|
+
this.themeColor.setColor(value);
|
|
1135
|
+
}
|
|
1136
|
+
setNeutral(value) {
|
|
1137
|
+
this.themeColor.setNeutral(value);
|
|
1138
|
+
}
|
|
1139
|
+
setRadius(value) {
|
|
1140
|
+
if (isThemeRadius(value)) this.themeRadius.setRadius(value);
|
|
1141
|
+
}
|
|
1142
|
+
setSpace(value) {
|
|
1143
|
+
if (isThemeSpace(value)) this.themeSpace.setSpace(value);
|
|
1144
|
+
}
|
|
1145
|
+
setBrandFromPicker(event) {
|
|
1146
|
+
if (!(event.target instanceof HTMLInputElement)) return;
|
|
1147
|
+
const color = event.target.value;
|
|
1148
|
+
const hsl = hexToHsl(color);
|
|
1149
|
+
if (!hsl) return;
|
|
1150
|
+
this.themeBrand.setBrand(hsl, brandForeground(color));
|
|
1151
|
+
this.themeColor.setColor("brand");
|
|
1152
|
+
}
|
|
1153
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1154
|
+
minVersion: "12.0.0",
|
|
1155
|
+
version: "22.2.0",
|
|
1156
|
+
ngImport: i0,
|
|
1157
|
+
type: ThemeSettingsThemeSectionComponent,
|
|
1158
|
+
deps: [],
|
|
1159
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1160
|
+
});
|
|
1161
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1162
|
+
minVersion: "17.0.0",
|
|
1163
|
+
version: "22.2.0",
|
|
1164
|
+
type: ThemeSettingsThemeSectionComponent,
|
|
1165
|
+
isStandalone: true,
|
|
1166
|
+
selector: "ThemeSettingsThemeSection",
|
|
1167
|
+
host: { classAttribute: "contents" },
|
|
1168
|
+
ngImport: i0,
|
|
1169
|
+
template: `
|
|
1019
1170
|
<section class="flex flex-col gap-5" [attr.aria-labelledby]="themeGroupId">
|
|
1020
1171
|
<h2 [id]="themeGroupId" class="nav-heading text-foreground">Theme</h2>
|
|
1021
1172
|
<div class="flex flex-col gap-2">
|
|
@@ -1109,15 +1260,39 @@ class ThemeSettingsThemeSectionComponent {
|
|
|
1109
1260
|
/>
|
|
1110
1261
|
</div>
|
|
1111
1262
|
</section>
|
|
1112
|
-
`,
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1263
|
+
`,
|
|
1264
|
+
isInline: true,
|
|
1265
|
+
dependencies: [{
|
|
1266
|
+
kind: "component",
|
|
1267
|
+
type: SegmentedControlComponent,
|
|
1268
|
+
selector: "SegmentedControl",
|
|
1269
|
+
inputs: [
|
|
1270
|
+
"options",
|
|
1271
|
+
"value",
|
|
1272
|
+
"appearance",
|
|
1273
|
+
"space",
|
|
1274
|
+
"disabled",
|
|
1275
|
+
"aria-label",
|
|
1276
|
+
"aria-labelledby",
|
|
1277
|
+
"aria-describedby",
|
|
1278
|
+
"class"
|
|
1279
|
+
],
|
|
1280
|
+
outputs: ["valueChange"]
|
|
1281
|
+
}]
|
|
1282
|
+
});
|
|
1283
|
+
};
|
|
1284
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1285
|
+
minVersion: "12.0.0",
|
|
1286
|
+
version: "22.2.0",
|
|
1287
|
+
ngImport: i0,
|
|
1288
|
+
type: ThemeSettingsThemeSectionComponent,
|
|
1289
|
+
decorators: [{
|
|
1290
|
+
type: Component,
|
|
1291
|
+
args: [{
|
|
1292
|
+
selector: "ThemeSettingsThemeSection",
|
|
1293
|
+
imports: [SegmentedControlComponent],
|
|
1294
|
+
host: { class: "contents" },
|
|
1295
|
+
template: `
|
|
1121
1296
|
<section class="flex flex-col gap-5" [attr.aria-labelledby]="themeGroupId">
|
|
1122
1297
|
<h2 [id]="themeGroupId" class="nav-heading text-foreground">Theme</h2>
|
|
1123
1298
|
<div class="flex flex-col gap-2">
|
|
@@ -1211,39 +1386,98 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
1211
1386
|
/>
|
|
1212
1387
|
</div>
|
|
1213
1388
|
</section>
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1389
|
+
`
|
|
1390
|
+
}]
|
|
1391
|
+
}]
|
|
1392
|
+
});
|
|
1393
|
+
var ThemeSettingsComponent = class ThemeSettingsComponent {
|
|
1394
|
+
settings = inject(THEME_SETTINGS_ADAPTER, { optional: true });
|
|
1395
|
+
open = model(false, ...ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []);
|
|
1396
|
+
trigger = input("button", ...ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []);
|
|
1397
|
+
triggerLabel = input("Theme settings", ...ngDevMode ? [{ debugName: "triggerLabel" }] : /* istanbul ignore next */ []);
|
|
1398
|
+
triggerIconOnly = input(false, {
|
|
1399
|
+
...ngDevMode ? { debugName: "triggerIconOnly" } : /* istanbul ignore next */ {},
|
|
1400
|
+
alias: "trigger-icon-only"
|
|
1401
|
+
});
|
|
1402
|
+
showTrigger = input(true, {
|
|
1403
|
+
...ngDevMode ? { debugName: "showTrigger" } : /* istanbul ignore next */ {},
|
|
1404
|
+
alias: "show-trigger"
|
|
1405
|
+
});
|
|
1406
|
+
side = input("right", ...ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []);
|
|
1407
|
+
class = input("", {
|
|
1408
|
+
...ngDevMode ? { debugName: "class" } : /* istanbul ignore next */ {},
|
|
1409
|
+
alias: "class"
|
|
1410
|
+
});
|
|
1411
|
+
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 */ []);
|
|
1412
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1413
|
+
minVersion: "12.0.0",
|
|
1414
|
+
version: "22.2.0",
|
|
1415
|
+
ngImport: i0,
|
|
1416
|
+
type: ThemeSettingsComponent,
|
|
1417
|
+
deps: [],
|
|
1418
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1419
|
+
});
|
|
1420
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1421
|
+
minVersion: "17.0.0",
|
|
1422
|
+
version: "22.2.0",
|
|
1423
|
+
type: ThemeSettingsComponent,
|
|
1424
|
+
isStandalone: true,
|
|
1425
|
+
selector: "ThemeSettings",
|
|
1426
|
+
inputs: {
|
|
1427
|
+
open: {
|
|
1428
|
+
classPropertyName: "open",
|
|
1429
|
+
publicName: "open",
|
|
1430
|
+
isSignal: true,
|
|
1431
|
+
isRequired: false,
|
|
1432
|
+
transformFunction: null
|
|
1433
|
+
},
|
|
1434
|
+
trigger: {
|
|
1435
|
+
classPropertyName: "trigger",
|
|
1436
|
+
publicName: "trigger",
|
|
1437
|
+
isSignal: true,
|
|
1438
|
+
isRequired: false,
|
|
1439
|
+
transformFunction: null
|
|
1440
|
+
},
|
|
1441
|
+
triggerLabel: {
|
|
1442
|
+
classPropertyName: "triggerLabel",
|
|
1443
|
+
publicName: "triggerLabel",
|
|
1444
|
+
isSignal: true,
|
|
1445
|
+
isRequired: false,
|
|
1446
|
+
transformFunction: null
|
|
1447
|
+
},
|
|
1448
|
+
triggerIconOnly: {
|
|
1449
|
+
classPropertyName: "triggerIconOnly",
|
|
1450
|
+
publicName: "trigger-icon-only",
|
|
1451
|
+
isSignal: true,
|
|
1452
|
+
isRequired: false,
|
|
1453
|
+
transformFunction: null
|
|
1454
|
+
},
|
|
1455
|
+
showTrigger: {
|
|
1456
|
+
classPropertyName: "showTrigger",
|
|
1457
|
+
publicName: "show-trigger",
|
|
1458
|
+
isSignal: true,
|
|
1459
|
+
isRequired: false,
|
|
1460
|
+
transformFunction: null
|
|
1461
|
+
},
|
|
1462
|
+
side: {
|
|
1463
|
+
classPropertyName: "side",
|
|
1464
|
+
publicName: "side",
|
|
1465
|
+
isSignal: true,
|
|
1466
|
+
isRequired: false,
|
|
1467
|
+
transformFunction: null
|
|
1468
|
+
},
|
|
1469
|
+
class: {
|
|
1470
|
+
classPropertyName: "class",
|
|
1471
|
+
publicName: "class",
|
|
1472
|
+
isSignal: true,
|
|
1473
|
+
isRequired: false,
|
|
1474
|
+
transformFunction: null
|
|
1475
|
+
}
|
|
1476
|
+
},
|
|
1477
|
+
outputs: { open: "openChange" },
|
|
1478
|
+
host: { classAttribute: "contents" },
|
|
1479
|
+
ngImport: i0,
|
|
1480
|
+
template: `
|
|
1247
1481
|
@if (showTrigger()) {
|
|
1248
1482
|
<button
|
|
1249
1483
|
type="button"
|
|
@@ -1302,26 +1536,113 @@ class ThemeSettingsComponent {
|
|
|
1302
1536
|
</DrawerContent>
|
|
1303
1537
|
</Drawer>
|
|
1304
1538
|
}
|
|
1305
|
-
`,
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1539
|
+
`,
|
|
1540
|
+
isInline: true,
|
|
1541
|
+
dependencies: [
|
|
1542
|
+
{
|
|
1543
|
+
kind: "directive",
|
|
1544
|
+
type: DrawerCloseDirective,
|
|
1545
|
+
selector: "button[SheetClose], a[SheetClose], button[DrawerClose], a[DrawerClose]"
|
|
1546
|
+
},
|
|
1547
|
+
{
|
|
1548
|
+
kind: "component",
|
|
1549
|
+
type: DrawerComponent,
|
|
1550
|
+
selector: "Sheet, Drawer",
|
|
1551
|
+
inputs: [
|
|
1552
|
+
"open",
|
|
1553
|
+
"side",
|
|
1554
|
+
"variant",
|
|
1555
|
+
"closeOnEscape",
|
|
1556
|
+
"closeOnBackdropClick",
|
|
1557
|
+
"backdrop",
|
|
1558
|
+
"showCloseButton",
|
|
1559
|
+
"closeButtonLabel",
|
|
1560
|
+
"restoreFocus",
|
|
1561
|
+
"aria-labelledby",
|
|
1562
|
+
"aria-describedby",
|
|
1563
|
+
"role",
|
|
1564
|
+
"class"
|
|
1565
|
+
],
|
|
1566
|
+
outputs: ["openChange", "openedChange"]
|
|
1567
|
+
},
|
|
1568
|
+
{
|
|
1569
|
+
kind: "component",
|
|
1570
|
+
type: DrawerContentComponent,
|
|
1571
|
+
selector: "SheetContent, DrawerContent",
|
|
1572
|
+
inputs: ["class"]
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
kind: "component",
|
|
1576
|
+
type: DrawerHeaderComponent,
|
|
1577
|
+
selector: "SheetHeader, DrawerHeader",
|
|
1578
|
+
inputs: ["class"]
|
|
1579
|
+
},
|
|
1580
|
+
{
|
|
1581
|
+
kind: "component",
|
|
1582
|
+
type: DrawerTitleComponent,
|
|
1583
|
+
selector: "SheetTitle, DrawerTitle, h2[SheetTitle], h2[DrawerTitle]",
|
|
1584
|
+
inputs: ["id", "class"]
|
|
1585
|
+
},
|
|
1586
|
+
{
|
|
1587
|
+
kind: "component",
|
|
1588
|
+
type: IconComponent,
|
|
1589
|
+
selector: "Icon",
|
|
1590
|
+
inputs: [
|
|
1591
|
+
"name",
|
|
1592
|
+
"class",
|
|
1593
|
+
"size",
|
|
1594
|
+
"fill",
|
|
1595
|
+
"weight",
|
|
1596
|
+
"grade",
|
|
1597
|
+
"opticalSize"
|
|
1598
|
+
]
|
|
1599
|
+
},
|
|
1600
|
+
{
|
|
1601
|
+
kind: "component",
|
|
1602
|
+
type: ThemeSettingsLayoutSectionComponent,
|
|
1603
|
+
selector: "ThemeSettingsLayoutSection"
|
|
1604
|
+
},
|
|
1605
|
+
{
|
|
1606
|
+
kind: "component",
|
|
1607
|
+
type: ThemeSettingsNavigationSectionComponent,
|
|
1608
|
+
selector: "ThemeSettingsNavigationSection"
|
|
1609
|
+
},
|
|
1610
|
+
{
|
|
1611
|
+
kind: "component",
|
|
1612
|
+
type: ThemeSettingsShellSectionComponent,
|
|
1613
|
+
selector: "ThemeSettingsShellSection"
|
|
1614
|
+
},
|
|
1615
|
+
{
|
|
1616
|
+
kind: "component",
|
|
1617
|
+
type: ThemeSettingsThemeSectionComponent,
|
|
1618
|
+
selector: "ThemeSettingsThemeSection"
|
|
1619
|
+
}
|
|
1620
|
+
]
|
|
1621
|
+
});
|
|
1622
|
+
};
|
|
1623
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1624
|
+
minVersion: "12.0.0",
|
|
1625
|
+
version: "22.2.0",
|
|
1626
|
+
ngImport: i0,
|
|
1627
|
+
type: ThemeSettingsComponent,
|
|
1628
|
+
decorators: [{
|
|
1629
|
+
type: Component,
|
|
1630
|
+
args: [{
|
|
1631
|
+
selector: "ThemeSettings",
|
|
1632
|
+
imports: [
|
|
1633
|
+
DrawerCloseDirective,
|
|
1634
|
+
DrawerComponent,
|
|
1635
|
+
DrawerContentComponent,
|
|
1636
|
+
DrawerHeaderComponent,
|
|
1637
|
+
DrawerTitleComponent,
|
|
1638
|
+
IconComponent,
|
|
1639
|
+
ThemeSettingsLayoutSectionComponent,
|
|
1640
|
+
ThemeSettingsNavigationSectionComponent,
|
|
1641
|
+
ThemeSettingsShellSectionComponent,
|
|
1642
|
+
ThemeSettingsThemeSectionComponent
|
|
1643
|
+
],
|
|
1644
|
+
host: { class: "contents" },
|
|
1645
|
+
template: `
|
|
1325
1646
|
@if (showTrigger()) {
|
|
1326
1647
|
<button
|
|
1327
1648
|
type="button"
|
|
@@ -1380,12 +1701,69 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
1380
1701
|
</DrawerContent>
|
|
1381
1702
|
</Drawer>
|
|
1382
1703
|
}
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1704
|
+
`
|
|
1705
|
+
}]
|
|
1706
|
+
}],
|
|
1707
|
+
propDecorators: {
|
|
1708
|
+
open: [{
|
|
1709
|
+
type: i0.Input,
|
|
1710
|
+
args: [{
|
|
1711
|
+
isSignal: true,
|
|
1712
|
+
alias: "open",
|
|
1713
|
+
required: false
|
|
1714
|
+
}]
|
|
1715
|
+
}, {
|
|
1716
|
+
type: i0.Output,
|
|
1717
|
+
args: ["openChange"]
|
|
1718
|
+
}],
|
|
1719
|
+
trigger: [{
|
|
1720
|
+
type: i0.Input,
|
|
1721
|
+
args: [{
|
|
1722
|
+
isSignal: true,
|
|
1723
|
+
alias: "trigger",
|
|
1724
|
+
required: false
|
|
1725
|
+
}]
|
|
1726
|
+
}],
|
|
1727
|
+
triggerLabel: [{
|
|
1728
|
+
type: i0.Input,
|
|
1729
|
+
args: [{
|
|
1730
|
+
isSignal: true,
|
|
1731
|
+
alias: "triggerLabel",
|
|
1732
|
+
required: false
|
|
1733
|
+
}]
|
|
1734
|
+
}],
|
|
1735
|
+
triggerIconOnly: [{
|
|
1736
|
+
type: i0.Input,
|
|
1737
|
+
args: [{
|
|
1738
|
+
isSignal: true,
|
|
1739
|
+
alias: "trigger-icon-only",
|
|
1740
|
+
required: false
|
|
1741
|
+
}]
|
|
1742
|
+
}],
|
|
1743
|
+
showTrigger: [{
|
|
1744
|
+
type: i0.Input,
|
|
1745
|
+
args: [{
|
|
1746
|
+
isSignal: true,
|
|
1747
|
+
alias: "show-trigger",
|
|
1748
|
+
required: false
|
|
1749
|
+
}]
|
|
1750
|
+
}],
|
|
1751
|
+
side: [{
|
|
1752
|
+
type: i0.Input,
|
|
1753
|
+
args: [{
|
|
1754
|
+
isSignal: true,
|
|
1755
|
+
alias: "side",
|
|
1756
|
+
required: false
|
|
1757
|
+
}]
|
|
1758
|
+
}],
|
|
1759
|
+
class: [{
|
|
1760
|
+
type: i0.Input,
|
|
1761
|
+
args: [{
|
|
1762
|
+
isSignal: true,
|
|
1763
|
+
alias: "class",
|
|
1764
|
+
required: false
|
|
1765
|
+
}]
|
|
1766
|
+
}]
|
|
1767
|
+
}
|
|
1768
|
+
});
|
|
1769
|
+
export { NAV_TYPE_MODE_STORAGE_KEY, NAV_TYPE_STORAGE_KEY, THEME_SETTINGS_ADAPTER, ThemeSettingsComponent, ThemeSettingsDefaultAdapter, allowedNavTypeModes, allowedNavTypes, isWidthEnabled, provideThemeSettingsAdapter };
|