@edsis/angular 22.0.73 → 22.0.75

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.
@@ -1,10 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { inject, effect, Service, InjectionToken, makeEnvironmentProviders, provideEnvironmentInitializer, Injector, linkedSignal, computed, afterNextRender, input, output, Component, ElementRef, signal, DestroyRef, Directive, provideAppInitializer } from '@angular/core';
3
3
  import { NavigationService } from '@edsis/navigation/service';
4
- import { LayoutService, isUiLayoutType, isUiLayoutWidth, isUiLayoutSurface, isUiLayoutStyle } from '@edsis/theme/layout';
5
- import { ThemeStyleService, ThemeModeService, ThemeSpaceService, ThemeRadiusService, ThemeColorService, ThemeBrandService, isThemeMode, isThemeSpace, isThemeRadius, isThemeColor, isThemeBrand, themeStylePresetEntry, DEFAULT_THEME_MODE, DEFAULT_THEME_COLOR, DEFAULT_THEME_BRAND, THEME_STYLES, THEME_MODES, THEME_COLORS, THEME_BRANDS, THEME_SPACES, THEME_RADII, isThemeStyle, isThemeStyleSettingLocked, ThemeDeviceService } from '@edsis/theme/styles';
6
- import { LAYOUT_DEFAULT_TYPE, LAYOUT_DEFAULT_WIDTH, LAYOUT_DEFAULT_SURFACE, LAYOUT_DEFAULT_STYLE } from '@edsis/theme/layout/types';
4
+ import { LayoutService, isUiLayoutType, isUiLayoutWidth, isUiLayoutSurface } from '@edsis/theme/layout';
5
+ import { ThemeAppearanceService, ThemeModeService, ThemeSpaceService, ThemeRadiusService, ThemeColorService, ThemeBrandService, isThemeMode, isThemeSpace, isThemeRadius, isThemeColor, isThemeBrand, themeAppearancePresetEntry, DEFAULT_THEME_MODE, DEFAULT_THEME_COLOR, DEFAULT_THEME_BRAND, THEME_APPEARANCES, THEME_MODES, THEME_COLORS, THEME_BRANDS, THEME_SPACES, THEME_RADII, isThemeAppearance, isThemeAppearanceSettingLocked, ThemeDeviceService } from '@edsis/theme/styles';
6
+ import { LAYOUT_DEFAULT_TYPE, LAYOUT_DEFAULT_WIDTH, LAYOUT_DEFAULT_SURFACE } from '@edsis/theme/layout/types';
7
7
  import { DOCUMENT } from '@angular/common';
8
+ import { cn } from '@edsis/component/class';
8
9
  import { SheetComponent } from '@edsis/component/sheet';
9
10
  import { LayoutService as LayoutService$1 } from '@edsis/theme/layout/services';
10
11
  import { ButtonComponent } from '@edsis/component/button';
@@ -19,9 +20,9 @@ const NAVIGATION_TYPES = ['sidebar', 'dockbar', 'navbar', 'flyout'];
19
20
  const NAVIGATION_ORIENTATIONS = ['vertical', 'horizontal'];
20
21
  const NAVIGATION_POSITIONS = ['left', 'right', 'top', 'bottom'];
21
22
  const NAVIGATION_DOCKBAR_MODES = ['default', 'drawer', 'sticky'];
22
- class ThemeStylePresetService {
23
+ class ThemeAppearancePresetService {
23
24
  config = inject(APP_PREFERENCES_CONFIG, { optional: true });
24
- themeStyle = inject(ThemeStyleService);
25
+ themeAppearance = inject(ThemeAppearanceService);
25
26
  themeMode = inject(ThemeModeService);
26
27
  themeSpace = inject(ThemeSpaceService);
27
28
  themeRadius = inject(ThemeRadiusService);
@@ -30,63 +31,60 @@ class ThemeStylePresetService {
30
31
  layout = inject(LayoutService);
31
32
  navigation = inject(NavigationService);
32
33
  constructor() {
33
- let previousStyle = this.themeStyle.style();
34
- if (this.themeStyle.hasStoredStyle()) {
35
- this.enforceLockedValues(previousStyle);
34
+ let previousAppearance = this.themeAppearance.appearance();
35
+ if (this.themeAppearance.hasStoredAppearance()) {
36
+ this.enforceLockedValues(previousAppearance);
36
37
  }
37
38
  else {
38
- this.applyPreset(previousStyle);
39
+ this.applyPreset(previousAppearance);
39
40
  }
40
41
  effect(() => {
41
- const style = this.themeStyle.style();
42
- if (style === previousStyle)
42
+ const appearance = this.themeAppearance.appearance();
43
+ if (appearance === previousAppearance)
43
44
  return;
44
- previousStyle = style;
45
- this.applyPreset(style);
45
+ previousAppearance = appearance;
46
+ this.applyPreset(appearance);
46
47
  });
47
- effect(() => this.enforceLockedValues(this.themeStyle.style()));
48
+ effect(() => this.enforceLockedValues(this.themeAppearance.appearance()));
48
49
  }
49
- applyPreset(style) {
50
- this.applyThemeValues(style);
51
- this.applyLayoutValues(style);
52
- this.applyNavigationValues(style);
50
+ applyPreset(themeAppearance) {
51
+ this.applyThemeValues(themeAppearance);
52
+ this.applyLayoutValues(themeAppearance);
53
+ this.applyNavigationValues(themeAppearance);
53
54
  }
54
- applyThemeValues(style) {
55
- const mode = this.valueFor(style, 'theme-mode', this.defaultMode());
55
+ applyThemeValues(themeAppearance) {
56
+ const mode = this.valueFor(themeAppearance, 'theme-mode', this.defaultMode());
56
57
  if (isThemeMode(mode))
57
58
  this.themeMode.setMode(mode);
58
- const space = this.valueFor(style, 'theme-space', this.defaultSpace());
59
+ const space = this.valueFor(themeAppearance, 'theme-space', this.defaultSpace());
59
60
  if (isThemeSpace(space))
60
61
  this.themeSpace.setSpace(space);
61
- const radius = this.valueFor(style, 'theme-radius', this.defaultRadius());
62
+ const radius = this.valueFor(themeAppearance, 'theme-radius', this.defaultRadius());
62
63
  if (isThemeRadius(radius))
63
64
  this.themeRadius.setRadius(radius);
64
- const color = this.valueFor(style, 'theme-color', this.defaultColor());
65
+ const color = this.valueFor(themeAppearance, 'theme-color', this.defaultColor());
65
66
  if (isThemeColor(color))
66
67
  this.themeColor.setColor(color);
67
- const brand = this.valueFor(style, 'theme-brand', this.defaultBrand());
68
+ const brand = this.valueFor(themeAppearance, 'theme-brand', this.defaultBrand());
68
69
  if (isThemeBrand(brand))
69
70
  this.themeBrand.setBrand(brand);
70
71
  }
71
- applyLayoutValues(style) {
72
- const type = this.valueFor(style, 'layout-type', this.defaultLayoutType());
72
+ applyLayoutValues(themeAppearance) {
73
+ const type = this.valueFor(themeAppearance, 'layout-type', this.defaultLayoutType());
73
74
  if (isUiLayoutType(type))
74
75
  this.layout.setType(type);
75
- const width = this.valueFor(style, 'layout-width', this.defaultLayoutWidth());
76
+ const width = this.valueFor(themeAppearance, 'layout-width', this.defaultLayoutWidth());
76
77
  if (isUiLayoutWidth(width))
77
78
  this.layout.setWidth(width);
78
- const surface = this.valueFor(style, 'layout-surface', this.defaultLayoutSurface());
79
+ const surface = this.valueFor(themeAppearance, 'layout-surface', this.defaultLayoutSurface());
79
80
  if (isUiLayoutSurface(surface))
80
81
  this.layout.setSurface(surface);
81
- const appearance = this.valueFor(style, 'layout-appearance', this.defaultLayoutAppearance());
82
- if (isUiLayoutStyle(appearance))
83
- this.layout.setAppearance(appearance);
84
- }
85
- applyNavigationValues(style) {
86
- const orientation = this.valueFor(style, 'nav-orientation', this.defaultNavigationOrientation());
87
- const type = this.valueFor(style, 'nav-type', this.defaultNavigationType());
88
- const position = this.valueFor(style, 'nav-position', this.defaultNavigationPosition());
89
- const typeMode = this.valueFor(style, 'nav-type-mode', 'default');
82
+ }
83
+ applyNavigationValues(themeAppearance) {
84
+ const orientation = this.valueFor(themeAppearance, 'nav-orientation', this.defaultNavigationOrientation());
85
+ const type = this.valueFor(themeAppearance, 'nav-type', this.defaultNavigationType());
86
+ const position = this.valueFor(themeAppearance, 'nav-position', this.defaultNavigationPosition());
87
+ const typeMode = this.valueFor(themeAppearance, 'nav-type-mode', 'default');
90
88
  this.navigation.update(PRIMARY_NAVIGATION_ID$2, {
91
89
  orientation: isNavigationOrientation(orientation)
92
90
  ? orientation
@@ -103,39 +101,35 @@ class ThemeStylePresetService {
103
101
  : this.defaultNavigationDockbarMode(),
104
102
  });
105
103
  }
106
- enforceLockedValues(style) {
107
- const mode = this.lockedValueFor(style, 'theme-mode');
104
+ enforceLockedValues(themeAppearance) {
105
+ const mode = this.lockedValueFor(themeAppearance, 'theme-mode');
108
106
  if (isThemeMode(mode) && this.themeMode.mode() !== mode)
109
107
  this.themeMode.setMode(mode);
110
- const space = this.lockedValueFor(style, 'theme-space');
108
+ const space = this.lockedValueFor(themeAppearance, 'theme-space');
111
109
  if (isThemeSpace(space) && this.themeSpace.space() !== space)
112
110
  this.themeSpace.setSpace(space);
113
- const radius = this.lockedValueFor(style, 'theme-radius');
111
+ const radius = this.lockedValueFor(themeAppearance, 'theme-radius');
114
112
  if (isThemeRadius(radius) && this.themeRadius.radius() !== radius)
115
113
  this.themeRadius.setRadius(radius);
116
- const color = this.lockedValueFor(style, 'theme-color');
114
+ const color = this.lockedValueFor(themeAppearance, 'theme-color');
117
115
  if (isThemeColor(color) && this.themeColor.color() !== color)
118
116
  this.themeColor.setColor(color);
119
- const brand = this.lockedValueFor(style, 'theme-brand');
117
+ const brand = this.lockedValueFor(themeAppearance, 'theme-brand');
120
118
  if (isThemeBrand(brand) && this.themeBrand.brand() !== brand)
121
119
  this.themeBrand.setBrand(brand);
122
- const type = this.lockedValueFor(style, 'layout-type');
120
+ const type = this.lockedValueFor(themeAppearance, 'layout-type');
123
121
  if (isUiLayoutType(type) && this.layout.type() !== type)
124
122
  this.layout.setType(type);
125
- const width = this.lockedValueFor(style, 'layout-width');
123
+ const width = this.lockedValueFor(themeAppearance, 'layout-width');
126
124
  if (isUiLayoutWidth(width) && this.layout.width() !== width)
127
125
  this.layout.setWidth(width);
128
- const surface = this.lockedValueFor(style, 'layout-surface');
126
+ const surface = this.lockedValueFor(themeAppearance, 'layout-surface');
129
127
  if (isUiLayoutSurface(surface) && this.layout.surface() !== surface)
130
128
  this.layout.setSurface(surface);
131
- const appearance = this.lockedValueFor(style, 'layout-appearance');
132
- if (isUiLayoutStyle(appearance) && this.layout.appearance() !== appearance) {
133
- this.layout.setAppearance(appearance);
134
- }
135
- const orientation = this.lockedValueFor(style, 'nav-orientation');
136
- const navigationType = this.lockedValueFor(style, 'nav-type');
137
- const position = this.lockedValueFor(style, 'nav-position');
138
- const typeMode = this.lockedValueFor(style, 'nav-type-mode');
129
+ const orientation = this.lockedValueFor(themeAppearance, 'nav-orientation');
130
+ const navigationType = this.lockedValueFor(themeAppearance, 'nav-type');
131
+ const position = this.lockedValueFor(themeAppearance, 'nav-position');
132
+ const typeMode = this.lockedValueFor(themeAppearance, 'nav-type-mode');
139
133
  const currentNavigationState = this.navigation.currentState(PRIMARY_NAVIGATION_ID$2);
140
134
  const navigationState = currentNavigationState ?? {
141
135
  id: PRIMARY_NAVIGATION_ID$2,
@@ -176,12 +170,12 @@ class ThemeStylePresetService {
176
170
  this.navigation.update(PRIMARY_NAVIGATION_ID$2, navigationUpdate);
177
171
  }
178
172
  }
179
- lockedValueFor(style, key) {
180
- const entry = themeStylePresetEntry(style, key);
173
+ lockedValueFor(themeAppearance, key) {
174
+ const entry = themeAppearancePresetEntry(themeAppearance, key);
181
175
  return entry.control === 'fix' ? entry.value : null;
182
176
  }
183
- valueFor(style, key, fallback) {
184
- const value = themeStylePresetEntry(style, key).value;
177
+ valueFor(themeAppearance, key, fallback) {
178
+ const value = themeAppearancePresetEntry(themeAppearance, key).value;
185
179
  return value === 'default' ? fallback : value;
186
180
  }
187
181
  defaultMode() {
@@ -208,9 +202,6 @@ class ThemeStylePresetService {
208
202
  defaultLayoutSurface() {
209
203
  return this.config?.defaults?.layout.surface ?? LAYOUT_DEFAULT_SURFACE;
210
204
  }
211
- defaultLayoutAppearance() {
212
- return this.config?.defaults?.layout.appearance ?? LAYOUT_DEFAULT_STYLE;
213
- }
214
205
  defaultNavigationOrientation() {
215
206
  return this.config?.defaults?.navigation.orientation ?? 'vertical';
216
207
  }
@@ -226,10 +217,10 @@ class ThemeStylePresetService {
226
217
  defaultNavigationDockbarMode() {
227
218
  return this.config?.defaults?.navigation.dockbarMode ?? 'default';
228
219
  }
229
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ThemeStylePresetService, deps: [], target: i0.ɵɵFactoryTarget.Service });
230
- static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.0.7", ngImport: i0, type: ThemeStylePresetService });
220
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ThemeAppearancePresetService, deps: [], target: i0.ɵɵFactoryTarget.Service });
221
+ static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.0.7", ngImport: i0, type: ThemeAppearancePresetService });
231
222
  }
232
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ThemeStylePresetService, decorators: [{
223
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ThemeAppearancePresetService, decorators: [{
233
224
  type: Service
234
225
  }], ctorParameters: () => [] });
235
226
  function isNavigationType(value) {
@@ -250,7 +241,7 @@ function provideAppPreferences(config = {}) {
250
241
  return makeEnvironmentProviders([
251
242
  { provide: APP_PREFERENCES_CONFIG, useValue: config },
252
243
  provideEnvironmentInitializer(() => {
253
- inject(ThemeStylePresetService);
244
+ inject(ThemeAppearancePresetService);
254
245
  }),
255
246
  ]);
256
247
  }
@@ -266,7 +257,7 @@ class AppPreferencesPanelService {
266
257
  origin = null;
267
258
  previouslyOpened = false;
268
259
  finalizationPending = false;
269
- supported = computed(() => this.layout.type() === 'vertical', /* @ts-ignore */
260
+ supported = computed(() => this.layout.type() === 'vertical' || this.layout.type() === 'horizontal', /* @ts-ignore */
270
261
  ...(ngDevMode ? [{ debugName: "supported" }] : /* istanbul ignore next */ []));
271
262
  opened = this.openedState.asReadonly();
272
263
  constructor() {
@@ -476,11 +467,10 @@ const VERTICAL_NAVIGATION_TYPES = ['sidebar', 'dockbar'];
476
467
  const HORIZONTAL_NAVIGATION_TYPES = ['navbar', 'flyout'];
477
468
  const NAVIGATION_LAYOUT_TYPES = ['vertical', 'horizontal'];
478
469
  const DOCKBAR_MODES = ['default', 'sticky', 'drawer'];
479
- const THEME_STYLE_OPTIONS = {
480
- dinamic: { label: 'Dinamis', icon: 'auto_awesome' },
470
+ const THEME_APPEARANCE_OPTIONS = {
471
+ browser: { label: 'Browser', icon: 'language' },
481
472
  rail: { label: 'Rail', icon: 'view_sidebar' },
482
- ala: { label: 'Ala', icon: 'palette' },
483
- aye: { label: 'Aye', icon: 'visibility' },
473
+ tablet: { label: 'Tablet', icon: 'tablet_android' },
484
474
  desktop: { label: 'Desktop', icon: 'desktop_windows' },
485
475
  };
486
476
  const THEME_MODE_OPTIONS = {
@@ -504,12 +494,6 @@ const THEME_RADIUS_OPTIONS = {
504
494
  medium: { label: 'Sedang', icon: 'rounded_corner' },
505
495
  large: { label: 'Besar', icon: 'rounded_corner' },
506
496
  };
507
- const LAYOUT_APPEARANCE_OPTIONS = {
508
- base: { label: 'Dasar', icon: 'crop_square' },
509
- 'border-rail': { label: 'Border rail', icon: 'border_outer' },
510
- ala: { label: 'Ala', icon: 'space_dashboard' },
511
- desktop: { label: 'Desktop', icon: 'desktop_windows' },
512
- };
513
497
  const LAYOUT_SURFACE_OPTIONS = {
514
498
  base: { label: 'Dasar', icon: 'crop_square' },
515
499
  flat: { label: 'Datar', icon: 'crop_16_9' },
@@ -555,7 +539,7 @@ class AppPreferencesSurfaceComponent {
555
539
  themeMode = inject(ThemeModeService);
556
540
  themeSpace = inject(ThemeSpaceService);
557
541
  themeRadius = inject(ThemeRadiusService);
558
- themeStyle = inject(ThemeStyleService);
542
+ themeAppearanceService = inject(ThemeAppearanceService);
559
543
  themeColor = inject(ThemeColorService);
560
544
  themeBrand = inject(ThemeBrandService);
561
545
  layout = inject(LayoutService);
@@ -570,10 +554,9 @@ class AppPreferencesSurfaceComponent {
570
554
  mode = this.themeMode.mode;
571
555
  space = this.themeSpace.space;
572
556
  radius = this.themeRadius.radius;
573
- style = this.themeStyle.style;
557
+ themeAppearance = this.themeAppearanceService.appearance;
574
558
  color = this.themeColor.color;
575
559
  brand = this.themeBrand.brand;
576
- appearance = this.layout.appearance;
577
560
  surface = this.layout.surface;
578
561
  width = this.layout.width;
579
562
  layoutType = this.layout.type;
@@ -586,13 +569,12 @@ class AppPreferencesSurfaceComponent {
586
569
  dockbarMode: 'default',
587
570
  }, /* @ts-ignore */
588
571
  ...(ngDevMode ? [{ debugName: "navigationState" }] : /* istanbul ignore next */ []));
589
- styleOptions = toOptions(THEME_STYLES, THEME_STYLE_OPTIONS);
572
+ themeAppearanceOptions = toOptions(THEME_APPEARANCES, THEME_APPEARANCE_OPTIONS);
590
573
  modeOptions = toOptions(THEME_MODES, THEME_MODE_OPTIONS);
591
574
  colorOptions = toOptions(THEME_COLORS, THEME_COLOR_OPTIONS);
592
575
  brandOptions = toOptions(THEME_BRANDS, THEME_BRAND_OPTIONS);
593
576
  spaceOptions = toOptions(THEME_SPACES, THEME_SPACE_OPTIONS);
594
577
  radiusOptions = toOptions(THEME_RADII, THEME_RADIUS_OPTIONS);
595
- appearanceOptions = toOptions(['base', 'border-rail', 'ala', 'desktop'], LAYOUT_APPEARANCE_OPTIONS);
596
578
  surfaceOptions = toOptions(['base', 'flat', 'grid'], LAYOUT_SURFACE_OPTIONS);
597
579
  widthOptions = toOptions(['full', 'wide', 'container', 'fluid'], LAYOUT_WIDTH_OPTIONS);
598
580
  layoutTypeOptions = toOptions(NAVIGATION_LAYOUT_TYPES, LAYOUT_TYPE_OPTIONS);
@@ -644,14 +626,14 @@ class AppPreferencesSurfaceComponent {
644
626
  closeButton?.focus({ preventScroll: true });
645
627
  });
646
628
  }
647
- selectStyle(value) {
648
- if (!isThemeStyle(value))
629
+ selectThemeAppearance(value) {
630
+ if (!isThemeAppearance(value))
649
631
  return;
650
- // A style may switch the shell between sidebar and dockbar. Close the
632
+ // An appearance may switch the shell between sidebar and dockbar. Close the
651
633
  // currently projected panel first so the navigation tree and preferences
652
634
  // surface do not transition at the same time.
653
635
  this.preferences.close();
654
- this.themeStyle.setStyle(value);
636
+ this.themeAppearanceService.setAppearance(value);
655
637
  }
656
638
  selectMode(value) {
657
639
  if (!this.isLocked('theme-mode') && isThemeMode(value))
@@ -673,11 +655,6 @@ class AppPreferencesSurfaceComponent {
673
655
  if (!this.isLocked('theme-radius') && isThemeRadius(value))
674
656
  this.themeRadius.setRadius(value);
675
657
  }
676
- selectAppearance(value) {
677
- if (!this.isLocked('layout-appearance') && isUiLayoutStyle(value)) {
678
- this.layout.setAppearance(value);
679
- }
680
- }
681
658
  selectSurface(value) {
682
659
  if (!this.isLocked('layout-surface') && isUiLayoutSurface(value)) {
683
660
  this.layout.setSurface(value);
@@ -759,12 +736,8 @@ class AppPreferencesSurfaceComponent {
759
736
  this.themeRadius.setRadius(defaults.theme.radius);
760
737
  changed = true;
761
738
  }
762
- if (this.style() !== defaults.theme.style) {
763
- this.themeStyle.setStyle(defaults.theme.style);
764
- changed = true;
765
- }
766
- if (!this.isLocked('layout-appearance') && this.appearance() !== defaults.layout.appearance) {
767
- this.layout.setAppearance(defaults.layout.appearance);
739
+ if (this.themeAppearance() !== defaults.theme.appearance) {
740
+ this.themeAppearanceService.setAppearance(defaults.theme.appearance);
768
741
  changed = true;
769
742
  }
770
743
  if (!this.isLocked('layout-surface') && this.surface() !== defaults.layout.surface) {
@@ -808,13 +781,13 @@ class AppPreferencesSurfaceComponent {
808
781
  queueMicrotask(() => this.announcement.set(message));
809
782
  }
810
783
  isLocked(key) {
811
- return isThemeStyleSettingLocked(this.style(), key);
784
+ return isThemeAppearanceSettingLocked(this.themeAppearance(), key);
812
785
  }
813
786
  isLayoutTypeLocked() {
814
787
  return this.isLocked('layout-type') || this.isLocked('nav-orientation');
815
788
  }
816
789
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: AppPreferencesSurfaceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
817
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: AppPreferencesSurfaceComponent, isStandalone: true, selector: "app-preferences-surface", outputs: { closeRequested: "closeRequested" }, host: { classAttribute: "block h-full min-h-0 w-full" }, ngImport: i0, template: "<Page variant=\"stacked\" height=\"fix\" scroll=\"content\" class=\"bg-background\">\n <PageHeader class=\"h-11 px-3 py-0\">\n <div class=\"flex h-full items-center justify-between gap-3\">\n <h2\n id=\"app-preferences-title\"\n class=\"min-w-0 truncate text-base font-semibold text-foreground\"\n >\n Preferensi aplikasi\n </h2>\n <button\n type=\"button\"\n Button\n variant=\"ghost\"\n size=\"icon\"\n class=\"h-11 w-11 shrink-0\"\n data-app-preferences-close\n aria-label=\"Tutup preferensi aplikasi\"\n (click)=\"closeRequested.emit()\"\n >\n <Icon name=\"close\" [size]=\"20\" />\n </button>\n </div>\n </PageHeader>\n\n <PageContent class=\"overscroll-contain bg-muted/20\">\n <div class=\"space-y-5 p-3\">\n <p class=\"text-xs leading-4 text-muted-foreground\">\n Sesuaikan tampilan dan navigasi aplikasi.\n </p>\n\n <section aria-labelledby=\"app-preferences-theme\" class=\"space-y-2\">\n <h2\n id=\"app-preferences-theme\"\n class=\"text-xs font-semibold tracking-wide text-muted-foreground\"\n >\n Tema\n </h2>\n <app-preference-setting-group\n headingId=\"app-preferences-style\"\n title=\"Gaya tema\"\n [activeLabel]=\"styleOptions.find((option) => option.value === style())?.label ?? style()\"\n [options]=\"styleOptions\"\n [selected]=\"style()\"\n (optionSelected)=\"selectStyle($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-mode\"\n title=\"Mode warna\"\n description=\"Sistem mengikuti preferensi perangkat.\"\n [activeLabel]=\"modeOptions.find((option) => option.value === mode())?.label ?? mode()\"\n [options]=\"modeOptions\"\n [selected]=\"mode()\"\n [locked]=\"isLocked('theme-mode')\"\n (optionSelected)=\"selectMode($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-color\"\n title=\"Warna tema\"\n [activeLabel]=\"colorOptions.find((option) => option.value === color())?.label ?? color()\"\n [options]=\"colorOptions\"\n [selected]=\"color()\"\n [locked]=\"isLocked('theme-color')\"\n (optionSelected)=\"selectColor($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-brand\"\n title=\"Brand\"\n [activeLabel]=\"brandOptions.find((option) => option.value === brand())?.label ?? brand()\"\n [options]=\"brandOptions\"\n [selected]=\"brand()\"\n [locked]=\"isLocked('theme-brand')\"\n (optionSelected)=\"selectBrand($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-space\"\n title=\"Kerapatan\"\n [activeLabel]=\"spaceOptions.find((option) => option.value === space())?.label ?? space()\"\n [options]=\"spaceOptions\"\n [selected]=\"space()\"\n [locked]=\"isLocked('theme-space')\"\n (optionSelected)=\"selectSpace($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-radius\"\n title=\"Sudut\"\n [activeLabel]=\"\n radiusOptions.find((option) => option.value === radius())?.label ?? radius()\n \"\n [options]=\"radiusOptions\"\n [selected]=\"radius()\"\n [locked]=\"isLocked('theme-radius')\"\n (optionSelected)=\"selectRadius($event)\"\n />\n </section>\n\n <section aria-labelledby=\"app-preferences-layout\" class=\"space-y-2\">\n <h2\n id=\"app-preferences-layout\"\n class=\"text-xs font-semibold tracking-wide text-muted-foreground\"\n >\n Layout\n </h2>\n <app-preference-setting-group\n headingId=\"app-preferences-appearance\"\n title=\"Bingkai\"\n [activeLabel]=\"\n appearanceOptions.find((option) => option.value === appearance())?.label ?? appearance()\n \"\n [options]=\"appearanceOptions\"\n [selected]=\"appearance()\"\n [locked]=\"isLocked('layout-appearance')\"\n (optionSelected)=\"selectAppearance($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-surface\"\n title=\"Latar\"\n [activeLabel]=\"\n surfaceOptions.find((option) => option.value === surface())?.label ?? surface()\n \"\n [options]=\"surfaceOptions\"\n [selected]=\"surface()\"\n [locked]=\"isLocked('layout-surface')\"\n (optionSelected)=\"selectSurface($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-layout-type\"\n title=\"Tipe layout\"\n [activeLabel]=\"\n layoutTypeOptions.find((option) => option.value === layoutType())?.label ?? layoutType()\n \"\n [options]=\"layoutTypeOptions\"\n [selected]=\"layoutType()\"\n [locked]=\"isLayoutTypeLocked()\"\n (optionSelected)=\"selectLayoutType($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-width\"\n title=\"Lebar konten\"\n [activeLabel]=\"widthOptions.find((option) => option.value === width())?.label ?? width()\"\n [options]=\"widthOptions\"\n [selected]=\"width()\"\n [locked]=\"isLocked('layout-width')\"\n (optionSelected)=\"selectWidth($event)\"\n />\n </section>\n\n <section aria-labelledby=\"app-preferences-navigation\" class=\"space-y-2\">\n <h2\n id=\"app-preferences-navigation\"\n class=\"text-xs font-semibold tracking-wide text-muted-foreground\"\n >\n Navigasi\n </h2>\n <app-preference-setting-group\n headingId=\"app-preferences-navigation-type\"\n title=\"Tipe navigation\"\n [activeLabel]=\"navigationTypeLabel()\"\n [options]=\"navigationTypeOptions()\"\n [selected]=\"navigationState().type\"\n [locked]=\"isLocked('nav-type')\"\n (optionSelected)=\"selectNavigationType($event)\"\n />\n @if (navigationState().orientation === 'vertical') {\n <app-preference-setting-group\n headingId=\"app-preferences-navigation-mode\"\n title=\"Mode navigation\"\n [activeLabel]=\"navigationModeLabel()\"\n [options]=\"navigationModeOptions()\"\n [selected]=\"navigationMode()\"\n [locked]=\"isLocked('nav-type-mode')\"\n (optionSelected)=\"selectNavigationMode($event)\"\n />\n }\n <app-preference-setting-group\n headingId=\"app-preferences-navigation-position\"\n title=\"Posisi navigation\"\n [activeLabel]=\"navigationPositionLabel()\"\n [options]=\"navigationPositionOptions()\"\n [selected]=\"navigationState().position\"\n [locked]=\"isLocked('nav-position')\"\n (optionSelected)=\"selectNavigationPosition($event)\"\n />\n </section>\n </div>\n </PageContent>\n\n @if (hasDefaults()) {\n <PageFooter class=\"px-3 py-0\">\n <button\n type=\"button\"\n Button\n variant=\"ghost\"\n class=\"h-full w-full justify-start\"\n (click)=\"resetToDefaults()\"\n >\n <Icon name=\"restart_alt\" [size]=\"18\" />\n Kembalikan default\n </button>\n </PageFooter>\n }\n\n <p class=\"sr-only\" aria-live=\"polite\" aria-atomic=\"true\">{{ announcement() }}</p>\n</Page>\n", dependencies: [{ kind: "component", type: AppPreferenceSettingGroupComponent, selector: "app-preference-setting-group", inputs: ["title", "description", "activeLabel", "options", "selected", "headingId", "locked"], outputs: ["optionSelected"] }, { kind: "component", type: ButtonComponent, selector: "button[Button], a[Button]", inputs: ["variant", "size", "class"] }, { kind: "component", type: IconComponent, selector: "Icon", inputs: ["name", "class", "size", "fill", "weight", "grade", "opticalSize"] }, { kind: "component", type: PageComponent, selector: "Page", inputs: ["variant", "height", "scroll", "position", "sideMode", "sideOpen", "sideWidth", "page-appearance", "class"], outputs: ["sideOpenChange"] }, { kind: "component", type: PageContentComponent, selector: "PageContent", inputs: ["class"] }, { kind: "component", type: PageFooterComponent, selector: "PageFooter", inputs: ["class"] }, { kind: "component", type: PageHeaderComponent, selector: "PageHeader", inputs: ["class"] }] });
790
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: AppPreferencesSurfaceComponent, isStandalone: true, selector: "app-preferences-surface", outputs: { closeRequested: "closeRequested" }, host: { classAttribute: "block h-full min-h-0 w-full" }, ngImport: i0, template: "<Page variant=\"stacked\" height=\"fix\" scroll=\"content\" class=\"bg-background\">\n <PageHeader class=\"h-11 px-3 py-0\">\n <div class=\"flex h-full items-center justify-between gap-3\">\n <h2\n id=\"app-preferences-title\"\n class=\"min-w-0 truncate text-base font-semibold text-foreground\"\n >\n Preferensi aplikasi\n </h2>\n <button\n type=\"button\"\n Button\n variant=\"ghost\"\n size=\"icon\"\n class=\"h-11 w-11 shrink-0\"\n data-app-preferences-close\n aria-label=\"Tutup preferensi aplikasi\"\n (click)=\"closeRequested.emit()\"\n >\n <Icon name=\"close\" [size]=\"20\" />\n </button>\n </div>\n </PageHeader>\n\n <PageContent class=\"overscroll-contain bg-muted/20\">\n <div class=\"space-y-5 p-3\">\n <p class=\"text-xs leading-4 text-muted-foreground\">\n Sesuaikan tampilan dan navigasi aplikasi.\n </p>\n\n <section aria-labelledby=\"app-preferences-theme\" class=\"space-y-2\">\n <h2\n id=\"app-preferences-theme\"\n class=\"text-xs font-semibold tracking-wide text-muted-foreground\"\n >\n Tema\n </h2>\n <app-preference-setting-group\n headingId=\"app-preferences-theme-appearance\"\n title=\"Tampilan tema\"\n [activeLabel]=\"\n themeAppearanceOptions.find((option) => option.value === themeAppearance())?.label ??\n themeAppearance()\n \"\n [options]=\"themeAppearanceOptions\"\n [selected]=\"themeAppearance()\"\n (optionSelected)=\"selectThemeAppearance($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-mode\"\n title=\"Mode warna\"\n description=\"Sistem mengikuti preferensi perangkat.\"\n [activeLabel]=\"modeOptions.find((option) => option.value === mode())?.label ?? mode()\"\n [options]=\"modeOptions\"\n [selected]=\"mode()\"\n [locked]=\"isLocked('theme-mode')\"\n (optionSelected)=\"selectMode($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-color\"\n title=\"Warna tema\"\n [activeLabel]=\"colorOptions.find((option) => option.value === color())?.label ?? color()\"\n [options]=\"colorOptions\"\n [selected]=\"color()\"\n [locked]=\"isLocked('theme-color')\"\n (optionSelected)=\"selectColor($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-brand\"\n title=\"Brand\"\n [activeLabel]=\"brandOptions.find((option) => option.value === brand())?.label ?? brand()\"\n [options]=\"brandOptions\"\n [selected]=\"brand()\"\n [locked]=\"isLocked('theme-brand')\"\n (optionSelected)=\"selectBrand($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-space\"\n title=\"Kerapatan\"\n [activeLabel]=\"spaceOptions.find((option) => option.value === space())?.label ?? space()\"\n [options]=\"spaceOptions\"\n [selected]=\"space()\"\n [locked]=\"isLocked('theme-space')\"\n (optionSelected)=\"selectSpace($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-radius\"\n title=\"Sudut\"\n [activeLabel]=\"\n radiusOptions.find((option) => option.value === radius())?.label ?? radius()\n \"\n [options]=\"radiusOptions\"\n [selected]=\"radius()\"\n [locked]=\"isLocked('theme-radius')\"\n (optionSelected)=\"selectRadius($event)\"\n />\n </section>\n\n <section aria-labelledby=\"app-preferences-layout\" class=\"space-y-2\">\n <h2\n id=\"app-preferences-layout\"\n class=\"text-xs font-semibold tracking-wide text-muted-foreground\"\n >\n Layout\n </h2>\n <app-preference-setting-group\n headingId=\"app-preferences-surface\"\n title=\"Latar\"\n [activeLabel]=\"\n surfaceOptions.find((option) => option.value === surface())?.label ?? surface()\n \"\n [options]=\"surfaceOptions\"\n [selected]=\"surface()\"\n [locked]=\"isLocked('layout-surface')\"\n (optionSelected)=\"selectSurface($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-layout-type\"\n title=\"Tipe layout\"\n [activeLabel]=\"\n layoutTypeOptions.find((option) => option.value === layoutType())?.label ?? layoutType()\n \"\n [options]=\"layoutTypeOptions\"\n [selected]=\"layoutType()\"\n [locked]=\"isLayoutTypeLocked()\"\n (optionSelected)=\"selectLayoutType($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-width\"\n title=\"Lebar konten\"\n [activeLabel]=\"widthOptions.find((option) => option.value === width())?.label ?? width()\"\n [options]=\"widthOptions\"\n [selected]=\"width()\"\n [locked]=\"isLocked('layout-width')\"\n (optionSelected)=\"selectWidth($event)\"\n />\n </section>\n\n <section aria-labelledby=\"app-preferences-navigation\" class=\"space-y-2\">\n <h2\n id=\"app-preferences-navigation\"\n class=\"text-xs font-semibold tracking-wide text-muted-foreground\"\n >\n Navigasi\n </h2>\n <app-preference-setting-group\n headingId=\"app-preferences-navigation-type\"\n title=\"Tipe navigation\"\n [activeLabel]=\"navigationTypeLabel()\"\n [options]=\"navigationTypeOptions()\"\n [selected]=\"navigationState().type\"\n [locked]=\"isLocked('nav-type')\"\n (optionSelected)=\"selectNavigationType($event)\"\n />\n @if (navigationState().orientation === 'vertical') {\n <app-preference-setting-group\n headingId=\"app-preferences-navigation-mode\"\n title=\"Mode navigation\"\n [activeLabel]=\"navigationModeLabel()\"\n [options]=\"navigationModeOptions()\"\n [selected]=\"navigationMode()\"\n [locked]=\"isLocked('nav-type-mode')\"\n (optionSelected)=\"selectNavigationMode($event)\"\n />\n }\n <app-preference-setting-group\n headingId=\"app-preferences-navigation-position\"\n title=\"Posisi navigation\"\n [activeLabel]=\"navigationPositionLabel()\"\n [options]=\"navigationPositionOptions()\"\n [selected]=\"navigationState().position\"\n [locked]=\"isLocked('nav-position')\"\n (optionSelected)=\"selectNavigationPosition($event)\"\n />\n </section>\n </div>\n </PageContent>\n\n @if (hasDefaults()) {\n <PageFooter class=\"px-3 py-0\">\n <button\n type=\"button\"\n Button\n variant=\"ghost\"\n class=\"h-full w-full justify-start\"\n (click)=\"resetToDefaults()\"\n >\n <Icon name=\"restart_alt\" [size]=\"18\" />\n Kembalikan default\n </button>\n </PageFooter>\n }\n\n <p class=\"sr-only\" aria-live=\"polite\" aria-atomic=\"true\">{{ announcement() }}</p>\n</Page>\n", dependencies: [{ kind: "component", type: AppPreferenceSettingGroupComponent, selector: "app-preference-setting-group", inputs: ["title", "description", "activeLabel", "options", "selected", "headingId", "locked"], outputs: ["optionSelected"] }, { kind: "component", type: ButtonComponent, selector: "button[Button], a[Button]", inputs: ["variant", "size", "class"] }, { kind: "component", type: IconComponent, selector: "Icon", inputs: ["name", "class", "size", "fill", "weight", "grade", "opticalSize"] }, { kind: "component", type: PageComponent, selector: "Page", inputs: ["variant", "height", "scroll", "position", "sideMode", "sideOpen", "sideWidth", "class"], outputs: ["sideOpenChange"] }, { kind: "component", type: PageContentComponent, selector: "PageContent", inputs: ["class"] }, { kind: "component", type: PageFooterComponent, selector: "PageFooter", inputs: ["class"] }, { kind: "component", type: PageHeaderComponent, selector: "PageHeader", inputs: ["class"] }] });
818
791
  }
819
792
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: AppPreferencesSurfaceComponent, decorators: [{
820
793
  type: Component,
@@ -828,7 +801,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
828
801
  PageHeaderComponent,
829
802
  ], host: {
830
803
  class: 'block h-full min-h-0 w-full',
831
- }, template: "<Page variant=\"stacked\" height=\"fix\" scroll=\"content\" class=\"bg-background\">\n <PageHeader class=\"h-11 px-3 py-0\">\n <div class=\"flex h-full items-center justify-between gap-3\">\n <h2\n id=\"app-preferences-title\"\n class=\"min-w-0 truncate text-base font-semibold text-foreground\"\n >\n Preferensi aplikasi\n </h2>\n <button\n type=\"button\"\n Button\n variant=\"ghost\"\n size=\"icon\"\n class=\"h-11 w-11 shrink-0\"\n data-app-preferences-close\n aria-label=\"Tutup preferensi aplikasi\"\n (click)=\"closeRequested.emit()\"\n >\n <Icon name=\"close\" [size]=\"20\" />\n </button>\n </div>\n </PageHeader>\n\n <PageContent class=\"overscroll-contain bg-muted/20\">\n <div class=\"space-y-5 p-3\">\n <p class=\"text-xs leading-4 text-muted-foreground\">\n Sesuaikan tampilan dan navigasi aplikasi.\n </p>\n\n <section aria-labelledby=\"app-preferences-theme\" class=\"space-y-2\">\n <h2\n id=\"app-preferences-theme\"\n class=\"text-xs font-semibold tracking-wide text-muted-foreground\"\n >\n Tema\n </h2>\n <app-preference-setting-group\n headingId=\"app-preferences-style\"\n title=\"Gaya tema\"\n [activeLabel]=\"styleOptions.find((option) => option.value === style())?.label ?? style()\"\n [options]=\"styleOptions\"\n [selected]=\"style()\"\n (optionSelected)=\"selectStyle($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-mode\"\n title=\"Mode warna\"\n description=\"Sistem mengikuti preferensi perangkat.\"\n [activeLabel]=\"modeOptions.find((option) => option.value === mode())?.label ?? mode()\"\n [options]=\"modeOptions\"\n [selected]=\"mode()\"\n [locked]=\"isLocked('theme-mode')\"\n (optionSelected)=\"selectMode($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-color\"\n title=\"Warna tema\"\n [activeLabel]=\"colorOptions.find((option) => option.value === color())?.label ?? color()\"\n [options]=\"colorOptions\"\n [selected]=\"color()\"\n [locked]=\"isLocked('theme-color')\"\n (optionSelected)=\"selectColor($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-brand\"\n title=\"Brand\"\n [activeLabel]=\"brandOptions.find((option) => option.value === brand())?.label ?? brand()\"\n [options]=\"brandOptions\"\n [selected]=\"brand()\"\n [locked]=\"isLocked('theme-brand')\"\n (optionSelected)=\"selectBrand($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-space\"\n title=\"Kerapatan\"\n [activeLabel]=\"spaceOptions.find((option) => option.value === space())?.label ?? space()\"\n [options]=\"spaceOptions\"\n [selected]=\"space()\"\n [locked]=\"isLocked('theme-space')\"\n (optionSelected)=\"selectSpace($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-radius\"\n title=\"Sudut\"\n [activeLabel]=\"\n radiusOptions.find((option) => option.value === radius())?.label ?? radius()\n \"\n [options]=\"radiusOptions\"\n [selected]=\"radius()\"\n [locked]=\"isLocked('theme-radius')\"\n (optionSelected)=\"selectRadius($event)\"\n />\n </section>\n\n <section aria-labelledby=\"app-preferences-layout\" class=\"space-y-2\">\n <h2\n id=\"app-preferences-layout\"\n class=\"text-xs font-semibold tracking-wide text-muted-foreground\"\n >\n Layout\n </h2>\n <app-preference-setting-group\n headingId=\"app-preferences-appearance\"\n title=\"Bingkai\"\n [activeLabel]=\"\n appearanceOptions.find((option) => option.value === appearance())?.label ?? appearance()\n \"\n [options]=\"appearanceOptions\"\n [selected]=\"appearance()\"\n [locked]=\"isLocked('layout-appearance')\"\n (optionSelected)=\"selectAppearance($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-surface\"\n title=\"Latar\"\n [activeLabel]=\"\n surfaceOptions.find((option) => option.value === surface())?.label ?? surface()\n \"\n [options]=\"surfaceOptions\"\n [selected]=\"surface()\"\n [locked]=\"isLocked('layout-surface')\"\n (optionSelected)=\"selectSurface($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-layout-type\"\n title=\"Tipe layout\"\n [activeLabel]=\"\n layoutTypeOptions.find((option) => option.value === layoutType())?.label ?? layoutType()\n \"\n [options]=\"layoutTypeOptions\"\n [selected]=\"layoutType()\"\n [locked]=\"isLayoutTypeLocked()\"\n (optionSelected)=\"selectLayoutType($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-width\"\n title=\"Lebar konten\"\n [activeLabel]=\"widthOptions.find((option) => option.value === width())?.label ?? width()\"\n [options]=\"widthOptions\"\n [selected]=\"width()\"\n [locked]=\"isLocked('layout-width')\"\n (optionSelected)=\"selectWidth($event)\"\n />\n </section>\n\n <section aria-labelledby=\"app-preferences-navigation\" class=\"space-y-2\">\n <h2\n id=\"app-preferences-navigation\"\n class=\"text-xs font-semibold tracking-wide text-muted-foreground\"\n >\n Navigasi\n </h2>\n <app-preference-setting-group\n headingId=\"app-preferences-navigation-type\"\n title=\"Tipe navigation\"\n [activeLabel]=\"navigationTypeLabel()\"\n [options]=\"navigationTypeOptions()\"\n [selected]=\"navigationState().type\"\n [locked]=\"isLocked('nav-type')\"\n (optionSelected)=\"selectNavigationType($event)\"\n />\n @if (navigationState().orientation === 'vertical') {\n <app-preference-setting-group\n headingId=\"app-preferences-navigation-mode\"\n title=\"Mode navigation\"\n [activeLabel]=\"navigationModeLabel()\"\n [options]=\"navigationModeOptions()\"\n [selected]=\"navigationMode()\"\n [locked]=\"isLocked('nav-type-mode')\"\n (optionSelected)=\"selectNavigationMode($event)\"\n />\n }\n <app-preference-setting-group\n headingId=\"app-preferences-navigation-position\"\n title=\"Posisi navigation\"\n [activeLabel]=\"navigationPositionLabel()\"\n [options]=\"navigationPositionOptions()\"\n [selected]=\"navigationState().position\"\n [locked]=\"isLocked('nav-position')\"\n (optionSelected)=\"selectNavigationPosition($event)\"\n />\n </section>\n </div>\n </PageContent>\n\n @if (hasDefaults()) {\n <PageFooter class=\"px-3 py-0\">\n <button\n type=\"button\"\n Button\n variant=\"ghost\"\n class=\"h-full w-full justify-start\"\n (click)=\"resetToDefaults()\"\n >\n <Icon name=\"restart_alt\" [size]=\"18\" />\n Kembalikan default\n </button>\n </PageFooter>\n }\n\n <p class=\"sr-only\" aria-live=\"polite\" aria-atomic=\"true\">{{ announcement() }}</p>\n</Page>\n" }]
804
+ }, template: "<Page variant=\"stacked\" height=\"fix\" scroll=\"content\" class=\"bg-background\">\n <PageHeader class=\"h-11 px-3 py-0\">\n <div class=\"flex h-full items-center justify-between gap-3\">\n <h2\n id=\"app-preferences-title\"\n class=\"min-w-0 truncate text-base font-semibold text-foreground\"\n >\n Preferensi aplikasi\n </h2>\n <button\n type=\"button\"\n Button\n variant=\"ghost\"\n size=\"icon\"\n class=\"h-11 w-11 shrink-0\"\n data-app-preferences-close\n aria-label=\"Tutup preferensi aplikasi\"\n (click)=\"closeRequested.emit()\"\n >\n <Icon name=\"close\" [size]=\"20\" />\n </button>\n </div>\n </PageHeader>\n\n <PageContent class=\"overscroll-contain bg-muted/20\">\n <div class=\"space-y-5 p-3\">\n <p class=\"text-xs leading-4 text-muted-foreground\">\n Sesuaikan tampilan dan navigasi aplikasi.\n </p>\n\n <section aria-labelledby=\"app-preferences-theme\" class=\"space-y-2\">\n <h2\n id=\"app-preferences-theme\"\n class=\"text-xs font-semibold tracking-wide text-muted-foreground\"\n >\n Tema\n </h2>\n <app-preference-setting-group\n headingId=\"app-preferences-theme-appearance\"\n title=\"Tampilan tema\"\n [activeLabel]=\"\n themeAppearanceOptions.find((option) => option.value === themeAppearance())?.label ??\n themeAppearance()\n \"\n [options]=\"themeAppearanceOptions\"\n [selected]=\"themeAppearance()\"\n (optionSelected)=\"selectThemeAppearance($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-mode\"\n title=\"Mode warna\"\n description=\"Sistem mengikuti preferensi perangkat.\"\n [activeLabel]=\"modeOptions.find((option) => option.value === mode())?.label ?? mode()\"\n [options]=\"modeOptions\"\n [selected]=\"mode()\"\n [locked]=\"isLocked('theme-mode')\"\n (optionSelected)=\"selectMode($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-color\"\n title=\"Warna tema\"\n [activeLabel]=\"colorOptions.find((option) => option.value === color())?.label ?? color()\"\n [options]=\"colorOptions\"\n [selected]=\"color()\"\n [locked]=\"isLocked('theme-color')\"\n (optionSelected)=\"selectColor($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-brand\"\n title=\"Brand\"\n [activeLabel]=\"brandOptions.find((option) => option.value === brand())?.label ?? brand()\"\n [options]=\"brandOptions\"\n [selected]=\"brand()\"\n [locked]=\"isLocked('theme-brand')\"\n (optionSelected)=\"selectBrand($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-space\"\n title=\"Kerapatan\"\n [activeLabel]=\"spaceOptions.find((option) => option.value === space())?.label ?? space()\"\n [options]=\"spaceOptions\"\n [selected]=\"space()\"\n [locked]=\"isLocked('theme-space')\"\n (optionSelected)=\"selectSpace($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-radius\"\n title=\"Sudut\"\n [activeLabel]=\"\n radiusOptions.find((option) => option.value === radius())?.label ?? radius()\n \"\n [options]=\"radiusOptions\"\n [selected]=\"radius()\"\n [locked]=\"isLocked('theme-radius')\"\n (optionSelected)=\"selectRadius($event)\"\n />\n </section>\n\n <section aria-labelledby=\"app-preferences-layout\" class=\"space-y-2\">\n <h2\n id=\"app-preferences-layout\"\n class=\"text-xs font-semibold tracking-wide text-muted-foreground\"\n >\n Layout\n </h2>\n <app-preference-setting-group\n headingId=\"app-preferences-surface\"\n title=\"Latar\"\n [activeLabel]=\"\n surfaceOptions.find((option) => option.value === surface())?.label ?? surface()\n \"\n [options]=\"surfaceOptions\"\n [selected]=\"surface()\"\n [locked]=\"isLocked('layout-surface')\"\n (optionSelected)=\"selectSurface($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-layout-type\"\n title=\"Tipe layout\"\n [activeLabel]=\"\n layoutTypeOptions.find((option) => option.value === layoutType())?.label ?? layoutType()\n \"\n [options]=\"layoutTypeOptions\"\n [selected]=\"layoutType()\"\n [locked]=\"isLayoutTypeLocked()\"\n (optionSelected)=\"selectLayoutType($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-width\"\n title=\"Lebar konten\"\n [activeLabel]=\"widthOptions.find((option) => option.value === width())?.label ?? width()\"\n [options]=\"widthOptions\"\n [selected]=\"width()\"\n [locked]=\"isLocked('layout-width')\"\n (optionSelected)=\"selectWidth($event)\"\n />\n </section>\n\n <section aria-labelledby=\"app-preferences-navigation\" class=\"space-y-2\">\n <h2\n id=\"app-preferences-navigation\"\n class=\"text-xs font-semibold tracking-wide text-muted-foreground\"\n >\n Navigasi\n </h2>\n <app-preference-setting-group\n headingId=\"app-preferences-navigation-type\"\n title=\"Tipe navigation\"\n [activeLabel]=\"navigationTypeLabel()\"\n [options]=\"navigationTypeOptions()\"\n [selected]=\"navigationState().type\"\n [locked]=\"isLocked('nav-type')\"\n (optionSelected)=\"selectNavigationType($event)\"\n />\n @if (navigationState().orientation === 'vertical') {\n <app-preference-setting-group\n headingId=\"app-preferences-navigation-mode\"\n title=\"Mode navigation\"\n [activeLabel]=\"navigationModeLabel()\"\n [options]=\"navigationModeOptions()\"\n [selected]=\"navigationMode()\"\n [locked]=\"isLocked('nav-type-mode')\"\n (optionSelected)=\"selectNavigationMode($event)\"\n />\n }\n <app-preference-setting-group\n headingId=\"app-preferences-navigation-position\"\n title=\"Posisi navigation\"\n [activeLabel]=\"navigationPositionLabel()\"\n [options]=\"navigationPositionOptions()\"\n [selected]=\"navigationState().position\"\n [locked]=\"isLocked('nav-position')\"\n (optionSelected)=\"selectNavigationPosition($event)\"\n />\n </section>\n </div>\n </PageContent>\n\n @if (hasDefaults()) {\n <PageFooter class=\"px-3 py-0\">\n <button\n type=\"button\"\n Button\n variant=\"ghost\"\n class=\"h-full w-full justify-start\"\n (click)=\"resetToDefaults()\"\n >\n <Icon name=\"restart_alt\" [size]=\"18\" />\n Kembalikan default\n </button>\n </PageFooter>\n }\n\n <p class=\"sr-only\" aria-live=\"polite\" aria-atomic=\"true\">{{ announcement() }}</p>\n</Page>\n" }]
832
805
  }], ctorParameters: () => [], propDecorators: { closeRequested: [{ type: i0.Output, args: ["closeRequested"] }] } });
833
806
  function isNavigationTypeForOrientation(value, orientation) {
834
807
  return orientation === 'vertical'
@@ -863,8 +836,14 @@ class AppPreferencesComponent {
863
836
  this.navigationState().type === 'sidebar' &&
864
837
  !this.navigationState().collapsed, /* @ts-ignore */
865
838
  ...(ngDevMode ? [{ debugName: "inline" }] : /* istanbul ignore next */ []));
866
- hostClass = computed(() => this.inline() ? 'block h-full w-76 border-r border-border' : 'relative block h-full w-16', /* @ts-ignore */
839
+ sheetSide = computed(() => this.navigationState().orientation === 'vertical' ? 'left' : 'right', /* @ts-ignore */
840
+ ...(ngDevMode ? [{ debugName: "sheetSide" }] : /* istanbul ignore next */ []));
841
+ hostClass = computed(() => this.inline()
842
+ ? 'block h-full w-76 border-r border-border'
843
+ : 'relative block h-full w-16', /* @ts-ignore */
867
844
  ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
845
+ sheetClass = computed(() => cn('w-[min(19rem,calc(100dvw-2rem))]! max-w-none! gap-0! p-0!', this.sheetSide() === 'left' ? 'border-r-2 border-border' : 'border-l-2 border-border'), /* @ts-ignore */
846
+ ...(ngDevMode ? [{ debugName: "sheetClass" }] : /* istanbul ignore next */ []));
868
847
  constructor() {
869
848
  const mediaQuery = this.mediaQuery();
870
849
  const onChange = (event) => this.narrowState.set(event.matches);
@@ -907,11 +886,11 @@ class AppPreferencesComponent {
907
886
  } @else {
908
887
  <Sheet
909
888
  [open]="preferences.opened()"
910
- side="left"
889
+ [side]="sheetSide()"
911
890
  [showCloseButton]="false"
912
891
  [restoreFocus]="false"
913
892
  aria-labelledby="app-preferences-title"
914
- class="w-[min(19rem,calc(100dvw-2rem))]! max-w-none! gap-0! p-0!"
893
+ [class]="sheetClass()"
915
894
  (openedChange)="onSheetOpenChange($event)"
916
895
  >
917
896
  <app-preferences-surface
@@ -944,11 +923,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
944
923
  } @else {
945
924
  <Sheet
946
925
  [open]="preferences.opened()"
947
- side="left"
926
+ [side]="sheetSide()"
948
927
  [showCloseButton]="false"
949
928
  [restoreFocus]="false"
950
929
  aria-labelledby="app-preferences-title"
951
- class="w-[min(19rem,calc(100dvw-2rem))]! max-w-none! gap-0! p-0!"
930
+ [class]="sheetClass()"
952
931
  (openedChange)="onSheetOpenChange($event)"
953
932
  >
954
933
  <app-preferences-surface
@@ -988,14 +967,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
988
967
  }]
989
968
  }] });
990
969
 
991
- /** Synchronizes the immutable resolved runtime device into the UI theme device service. */
970
+ /** Registers the immutable runtime device without replacing a stored theme preference. */
992
971
  function provideRuntimeThemeDevice() {
993
972
  return makeEnvironmentProviders([
994
973
  provideAppInitializer(() => {
995
974
  const runtime = inject(RuntimeContextService);
996
975
  const themeDevice = inject(ThemeDeviceService);
997
976
  return runtime.initialize().then(() => {
998
- themeDevice.setType(runtime.deviceType());
977
+ themeDevice.registerType(runtime.deviceType());
999
978
  });
1000
979
  }),
1001
980
  ]);