@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.
Files changed (252) hide show
  1. package/README.md +8 -6
  2. package/SUPPORT.md +3 -3
  3. package/chart/README.md +1 -1
  4. package/component/README.md +2 -2
  5. package/component/calendar/README.md +3 -15
  6. package/component/drawer/README.md +1 -2
  7. package/fesm2022/ojiepermana-angular-chart-area.mjs +352 -137
  8. package/fesm2022/ojiepermana-angular-chart-bar.mjs +744 -524
  9. package/fesm2022/ojiepermana-angular-chart-core.mjs +1140 -1344
  10. package/fesm2022/ojiepermana-angular-chart-line.mjs +393 -147
  11. package/fesm2022/ojiepermana-angular-chart-pie.mjs +408 -179
  12. package/fesm2022/ojiepermana-angular-chart-primitives.mjs +1262 -920
  13. package/fesm2022/ojiepermana-angular-chart-radar.mjs +473 -205
  14. package/fesm2022/ojiepermana-angular-chart-radial.mjs +425 -182
  15. package/fesm2022/ojiepermana-angular-chart-scatter.mjs +386 -210
  16. package/fesm2022/ojiepermana-angular-chart.mjs +3 -19
  17. package/fesm2022/ojiepermana-angular-component-accordion.mjs +485 -243
  18. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +963 -325
  19. package/fesm2022/ojiepermana-angular-component-alert.mjs +266 -103
  20. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +80 -35
  21. package/fesm2022/ojiepermana-angular-component-avatar.mjs +402 -135
  22. package/fesm2022/ojiepermana-angular-component-badge.mjs +109 -59
  23. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +410 -142
  24. package/fesm2022/ojiepermana-angular-component-button-group.mjs +249 -96
  25. package/fesm2022/ojiepermana-angular-component-button.mjs +153 -75
  26. package/fesm2022/ojiepermana-angular-component-calendar.mjs +531 -418
  27. package/fesm2022/ojiepermana-angular-component-card.mjs +457 -171
  28. package/fesm2022/ojiepermana-angular-component-carousel.mjs +642 -272
  29. package/fesm2022/ojiepermana-angular-component-checkbox.mjs +312 -108
  30. package/fesm2022/ojiepermana-angular-component-collapsible.mjs +299 -115
  31. package/fesm2022/ojiepermana-angular-component-combobox.mjs +396 -183
  32. package/fesm2022/ojiepermana-angular-component-command.mjs +807 -347
  33. package/fesm2022/ojiepermana-angular-component-composer.mjs +807 -330
  34. package/fesm2022/ojiepermana-angular-component-context-menu.mjs +196 -161
  35. package/fesm2022/ojiepermana-angular-component-date-picker.mjs +650 -338
  36. package/fesm2022/ojiepermana-angular-component-dialog.mjs +710 -316
  37. package/fesm2022/ojiepermana-angular-component-drawer.mjs +2 -5
  38. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +1212 -646
  39. package/fesm2022/ojiepermana-angular-component-editor.mjs +987 -502
  40. package/fesm2022/ojiepermana-angular-component-empty.mjs +350 -137
  41. package/fesm2022/ojiepermana-angular-component-form.mjs +813 -434
  42. package/fesm2022/ojiepermana-angular-component-hover-card.mjs +486 -277
  43. package/fesm2022/ojiepermana-angular-component-icon.mjs +241 -140
  44. package/fesm2022/ojiepermana-angular-component-input-group.mjs +449 -176
  45. package/fesm2022/ojiepermana-angular-component-input-otp.mjs +891 -488
  46. package/fesm2022/ojiepermana-angular-component-input.mjs +86 -55
  47. package/fesm2022/ojiepermana-angular-component-item.mjs +713 -261
  48. package/fesm2022/ojiepermana-angular-component-kanban.mjs +714 -216
  49. package/fesm2022/ojiepermana-angular-component-kbd.mjs +124 -52
  50. package/fesm2022/ojiepermana-angular-component-label.mjs +82 -31
  51. package/fesm2022/ojiepermana-angular-component-menubar.mjs +479 -329
  52. package/fesm2022/ojiepermana-angular-component-native-select.mjs +167 -65
  53. package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +683 -380
  54. package/fesm2022/ojiepermana-angular-component-pagination.mjs +277 -94
  55. package/fesm2022/ojiepermana-angular-component-pillbox.mjs +1283 -607
  56. package/fesm2022/ojiepermana-angular-component-popover.mjs +291 -204
  57. package/fesm2022/ojiepermana-angular-component-progress.mjs +176 -53
  58. package/fesm2022/ojiepermana-angular-component-radio.mjs +449 -142
  59. package/fesm2022/ojiepermana-angular-component-resizable.mjs +659 -453
  60. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +117 -39
  61. package/fesm2022/ojiepermana-angular-component-segmented-control.mjs +351 -172
  62. package/fesm2022/ojiepermana-angular-component-select.mjs +475 -345
  63. package/fesm2022/ojiepermana-angular-component-separator.mjs +102 -35
  64. package/fesm2022/ojiepermana-angular-component-sheet.mjs +797 -347
  65. package/fesm2022/ojiepermana-angular-component-skeleton.mjs +62 -29
  66. package/fesm2022/ojiepermana-angular-component-slider.mjs +592 -376
  67. package/fesm2022/ojiepermana-angular-component-spinner.mjs +135 -38
  68. package/fesm2022/ojiepermana-angular-component-switch.mjs +315 -103
  69. package/fesm2022/ojiepermana-angular-component-table.mjs +440 -153
  70. package/fesm2022/ojiepermana-angular-component-tabs.mjs +590 -317
  71. package/fesm2022/ojiepermana-angular-component-textarea.mjs +85 -50
  72. package/fesm2022/ojiepermana-angular-component-timeline.mjs +609 -231
  73. package/fesm2022/ojiepermana-angular-component-toast.mjs +229 -243
  74. package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +573 -288
  75. package/fesm2022/ojiepermana-angular-component-toggle.mjs +187 -78
  76. package/fesm2022/ojiepermana-angular-component-tooltip.mjs +798 -517
  77. package/fesm2022/ojiepermana-angular-component-utils-core.mjs +159 -292
  78. package/fesm2022/ojiepermana-angular-component-utils-overlay.mjs +46 -58
  79. package/fesm2022/ojiepermana-angular-component-utils-scale.mjs +76 -38
  80. package/fesm2022/ojiepermana-angular-component-utils.mjs +2 -8
  81. package/fesm2022/ojiepermana-angular-component.mjs +0 -10
  82. package/fesm2022/ojiepermana-angular-navigation-core.mjs +13 -23
  83. package/fesm2022/ojiepermana-angular-navigation-icon.mjs +35 -24
  84. package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-BKCeWzml.mjs +129 -0
  85. package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-DFEJK2jD.mjs +811 -0
  86. package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-Cd-jh6tg.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-mpK9Ar08.mjs} +387 -183
  87. package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-BPgH7FJk.mjs +650 -0
  88. package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-DMpYcD9t.mjs +662 -0
  89. package/fesm2022/ojiepermana-angular-navigation-navigation-item.component-Basp5SIk.mjs +1228 -0
  90. package/fesm2022/ojiepermana-angular-navigation-navigation-list.component-YUzHI9Pj.mjs +311 -0
  91. package/fesm2022/ojiepermana-angular-navigation-service.mjs +542 -724
  92. package/fesm2022/ojiepermana-angular-navigation-types.mjs +27 -56
  93. package/fesm2022/ojiepermana-angular-navigation.mjs +3052 -4
  94. package/fesm2022/ojiepermana-angular-sdk.mjs +91 -201
  95. package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +1115 -737
  96. package/fesm2022/ojiepermana-angular-theme-layout-services.mjs +245 -328
  97. package/fesm2022/ojiepermana-angular-theme-layout-types.mjs +35 -38
  98. package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +1719 -552
  99. package/fesm2022/ojiepermana-angular-theme-layout.mjs +847 -491
  100. package/fesm2022/ojiepermana-angular-theme-page-core.mjs +288 -358
  101. package/fesm2022/ojiepermana-angular-theme-page-filter.mjs +362 -224
  102. package/fesm2022/ojiepermana-angular-theme-page-overview.mjs +88 -0
  103. package/fesm2022/ojiepermana-angular-theme-page-root.mjs +576 -254
  104. package/fesm2022/ojiepermana-angular-theme-page-side.mjs +317 -177
  105. package/fesm2022/ojiepermana-angular-theme-page-slots.mjs +256 -112
  106. package/fesm2022/ojiepermana-angular-theme-page.mjs +7 -12
  107. package/fesm2022/ojiepermana-angular-theme-shell-services.mjs +215 -326
  108. package/fesm2022/ojiepermana-angular-theme-shell-types.mjs +68 -129
  109. package/fesm2022/ojiepermana-angular-theme-shell.mjs +907 -378
  110. package/fesm2022/ojiepermana-angular-theme-styles.mjs +521 -720
  111. package/fesm2022/ojiepermana-angular-theme.mjs +0 -10
  112. package/fesm2022/ojiepermana-angular.mjs +5 -24
  113. package/navigation/README.md +1 -1
  114. package/package.json +16 -12
  115. package/sdk/README.md +1 -1
  116. package/sdk/src/writer/index.js +2 -2
  117. package/theme/README.md +1 -1
  118. package/theme/layout/README.md +2 -4
  119. package/theme/page/README.md +50 -0
  120. package/theme/styles/README.md +10 -10
  121. package/theme/styles/css/base/prefers-dark.css +1 -1
  122. package/theme/styles/css/base/status.css +1 -1
  123. package/theme/styles/css/color/amber.css +1 -1
  124. package/theme/styles/css/color/blue.css +1 -1
  125. package/theme/styles/css/color/cyan.css +1 -1
  126. package/theme/styles/css/color/emerald.css +1 -1
  127. package/theme/styles/css/color/fuchsia.css +1 -1
  128. package/theme/styles/css/color/green.css +1 -1
  129. package/theme/styles/css/color/indigo.css +1 -1
  130. package/theme/styles/css/color/lime.css +1 -1
  131. package/theme/styles/css/color/orange.css +1 -1
  132. package/theme/styles/css/color/pink.css +1 -1
  133. package/theme/styles/css/color/purple.css +1 -1
  134. package/theme/styles/css/color/red.css +1 -1
  135. package/theme/styles/css/color/rose.css +1 -1
  136. package/theme/styles/css/color/sky.css +1 -1
  137. package/theme/styles/css/color/teal.css +1 -1
  138. package/theme/styles/css/color/violet.css +1 -1
  139. package/theme/styles/css/color/yellow.css +1 -1
  140. package/theme/styles/css/neutral/gray.css +1 -1
  141. package/theme/styles/css/neutral/mauve.css +1 -1
  142. package/theme/styles/css/neutral/mist.css +1 -1
  143. package/theme/styles/css/neutral/neutral.css +1 -1
  144. package/theme/styles/css/neutral/olive.css +1 -1
  145. package/theme/styles/css/neutral/slate.css +1 -1
  146. package/theme/styles/css/neutral/stone.css +1 -1
  147. package/theme/styles/css/neutral/taupe.css +1 -1
  148. package/theme/styles/css/neutral/zinc.css +1 -1
  149. package/types/ojiepermana-angular-chart-area.d.ts +126 -63
  150. package/types/ojiepermana-angular-chart-bar.d.ts +244 -154
  151. package/types/ojiepermana-angular-chart-core.d.ts +409 -398
  152. package/types/ojiepermana-angular-chart-line.d.ts +141 -68
  153. package/types/ojiepermana-angular-chart-pie.d.ts +192 -121
  154. package/types/ojiepermana-angular-chart-primitives.d.ts +283 -214
  155. package/types/ojiepermana-angular-chart-radar.d.ts +189 -108
  156. package/types/ojiepermana-angular-chart-radial.d.ts +177 -106
  157. package/types/ojiepermana-angular-chart-scatter.d.ts +166 -110
  158. package/types/ojiepermana-angular-chart.d.ts +3 -2
  159. package/types/ojiepermana-angular-component-accordion.d.ts +135 -81
  160. package/types/ojiepermana-angular-component-alert-dialog.d.ts +271 -123
  161. package/types/ojiepermana-angular-component-alert.d.ts +69 -39
  162. package/types/ojiepermana-angular-component-aspect-ratio.d.ts +20 -12
  163. package/types/ojiepermana-angular-component-avatar.d.ts +103 -49
  164. package/types/ojiepermana-angular-component-badge.d.ts +36 -24
  165. package/types/ojiepermana-angular-component-breadcrumb.d.ts +79 -40
  166. package/types/ojiepermana-angular-component-button-group.d.ts +48 -24
  167. package/types/ojiepermana-angular-component-button.d.ts +44 -27
  168. package/types/ojiepermana-angular-component-calendar.d.ts +145 -107
  169. package/types/ojiepermana-angular-component-card.d.ts +112 -63
  170. package/types/ojiepermana-angular-component-carousel.d.ts +150 -81
  171. package/types/ojiepermana-angular-component-checkbox.d.ts +96 -38
  172. package/types/ojiepermana-angular-component-collapsible.d.ts +65 -39
  173. package/types/ojiepermana-angular-component-combobox.d.ts +100 -55
  174. package/types/ojiepermana-angular-component-command.d.ts +206 -121
  175. package/types/ojiepermana-angular-component-composer.d.ts +184 -84
  176. package/types/ojiepermana-angular-component-context-menu.d.ts +51 -41
  177. package/types/ojiepermana-angular-component-date-picker.d.ts +199 -109
  178. package/types/ojiepermana-angular-component-dialog.d.ts +200 -105
  179. package/types/ojiepermana-angular-component-drawer.d.ts +2 -1
  180. package/types/ojiepermana-angular-component-dropdown-menu.d.ts +324 -202
  181. package/types/ojiepermana-angular-component-editor.d.ts +215 -117
  182. package/types/ojiepermana-angular-component-empty.d.ts +80 -45
  183. package/types/ojiepermana-angular-component-form.d.ts +185 -121
  184. package/types/ojiepermana-angular-component-hover-card.d.ts +130 -72
  185. package/types/ojiepermana-angular-component-icon.d.ts +87 -57
  186. package/types/ojiepermana-angular-component-input-group.d.ts +93 -46
  187. package/types/ojiepermana-angular-component-input-otp.d.ts +243 -150
  188. package/types/ojiepermana-angular-component-input.d.ts +27 -17
  189. package/types/ojiepermana-angular-component-item.d.ts +160 -84
  190. package/types/ojiepermana-angular-component-kanban.d.ts +157 -62
  191. package/types/ojiepermana-angular-component-kbd.d.ts +24 -15
  192. package/types/ojiepermana-angular-component-label.d.ts +19 -11
  193. package/types/ojiepermana-angular-component-menubar.d.ts +120 -90
  194. package/types/ojiepermana-angular-component-native-select.d.ts +37 -24
  195. package/types/ojiepermana-angular-component-navigation-menu.d.ts +157 -98
  196. package/types/ojiepermana-angular-component-pagination.d.ts +78 -28
  197. package/types/ojiepermana-angular-component-pillbox.d.ts +361 -204
  198. package/types/ojiepermana-angular-component-popover.d.ts +94 -64
  199. package/types/ojiepermana-angular-component-progress.d.ts +45 -17
  200. package/types/ojiepermana-angular-component-radio.d.ts +129 -53
  201. package/types/ojiepermana-angular-component-resizable.d.ts +160 -112
  202. package/types/ojiepermana-angular-component-scroll-area.d.ts +33 -15
  203. package/types/ojiepermana-angular-component-segmented-control.d.ts +94 -50
  204. package/types/ojiepermana-angular-component-select.d.ts +94 -77
  205. package/types/ojiepermana-angular-component-separator.d.ts +26 -14
  206. package/types/ojiepermana-angular-component-sheet.d.ts +226 -116
  207. package/types/ojiepermana-angular-component-skeleton.d.ts +13 -10
  208. package/types/ojiepermana-angular-component-slider.d.ts +140 -75
  209. package/types/ojiepermana-angular-component-spinner.d.ts +31 -13
  210. package/types/ojiepermana-angular-component-switch.d.ts +97 -40
  211. package/types/ojiepermana-angular-component-table.d.ts +102 -50
  212. package/types/ojiepermana-angular-component-tabs.d.ts +174 -115
  213. package/types/ojiepermana-angular-component-textarea.d.ts +27 -17
  214. package/types/ojiepermana-angular-component-timeline.d.ts +141 -59
  215. package/types/ojiepermana-angular-component-toast.d.ts +51 -55
  216. package/types/ojiepermana-angular-component-toggle-group.d.ts +159 -88
  217. package/types/ojiepermana-angular-component-toggle.d.ts +47 -25
  218. package/types/ojiepermana-angular-component-tooltip.d.ts +222 -132
  219. package/types/ojiepermana-angular-component-utils-core.d.ts +81 -90
  220. package/types/ojiepermana-angular-component-utils-overlay.d.ts +7 -11
  221. package/types/ojiepermana-angular-component-utils-scale.d.ts +20 -12
  222. package/types/ojiepermana-angular-component-utils.d.ts +2 -2
  223. package/types/ojiepermana-angular-component.d.ts +1 -2
  224. package/types/ojiepermana-angular-navigation-core.d.ts +46 -50
  225. package/types/ojiepermana-angular-navigation-icon.d.ts +9 -12
  226. package/types/ojiepermana-angular-navigation-service.d.ts +112 -115
  227. package/types/ojiepermana-angular-navigation-types.d.ts +121 -125
  228. package/types/ojiepermana-angular-navigation.d.ts +663 -374
  229. package/types/ojiepermana-angular-sdk.d.ts +69 -71
  230. package/types/ojiepermana-angular-theme-component-settings.d.ts +115 -83
  231. package/types/ojiepermana-angular-theme-layout-services.d.ts +119 -124
  232. package/types/ojiepermana-angular-theme-layout-types.d.ts +27 -31
  233. package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +399 -187
  234. package/types/ojiepermana-angular-theme-layout.d.ts +201 -112
  235. package/types/ojiepermana-angular-theme-page-core.d.ts +136 -142
  236. package/types/ojiepermana-angular-theme-page-filter.d.ts +112 -62
  237. package/types/ojiepermana-angular-theme-page-overview.d.ts +28 -0
  238. package/types/ojiepermana-angular-theme-page-root.d.ts +172 -88
  239. package/types/ojiepermana-angular-theme-page-side.d.ts +89 -49
  240. package/types/ojiepermana-angular-theme-page-slots.d.ts +58 -37
  241. package/types/ojiepermana-angular-theme-page.d.ts +7 -5
  242. package/types/ojiepermana-angular-theme-shell-services.d.ts +119 -125
  243. package/types/ojiepermana-angular-theme-shell-types.d.ts +38 -41
  244. package/types/ojiepermana-angular-theme-shell.d.ts +139 -61
  245. package/types/ojiepermana-angular-theme-styles.d.ts +184 -196
  246. package/types/ojiepermana-angular-theme.d.ts +1 -2
  247. package/types/ojiepermana-angular.d.ts +5 -5
  248. package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-CDBxQ8rk.mjs +0 -91
  249. package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-DBQHdvGa.mjs +0 -512
  250. package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-BCGvhoYj.mjs +0 -404
  251. package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-Dk_03e-6.mjs +0 -466
  252. package/fesm2022/ojiepermana-angular-navigation-ojiepermana-angular-navigation-DNKU6viC.mjs +0 -2642
@@ -1,410 +1,492 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, PLATFORM_ID, signal, effect, Service, computed, Component, model, input } 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 { globalLocalStorage, injectUniqueId, cn } from '@ojiepermana/angular/component/utils/core';
7
- import { LAYOUT_TYPE_STORAGE_KEY, LAYOUT_LOCKED_WIDTH } 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 { resolveShellDeviceForMode, shellDevicesForMode, SHELL_MODES, isShellDeviceForMode, SHELL_FRAMES, SHELL_COLORS } from '@ojiepermana/angular/theme/shell/types';
12
- import { ThemeModeService, ThemeColorService, ThemeBrandService, ThemeRadiusService, ThemeSpaceService, THEME_COLORS, THEME_NEUTRALS, isThemeMode, isThemeRadius, isThemeSpace } from '@ojiepermana/angular/theme/styles';
13
-
14
- /** Provide this from an application's persisted layout-settings facade. */
15
- const THEME_SETTINGS_ADAPTER = new InjectionToken('THEME_SETTINGS_ADAPTER');
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
- 'sidebar',
23
- 'dockbar',
24
- 'navbar',
25
- 'flyout',
26
- 'desktop',
17
+ "sidebar",
18
+ "dockbar",
19
+ "navbar",
20
+ "flyout",
21
+ "desktop"
27
22
  ];
28
- const NAV_TYPE_MODES = ['default', 'collapsed', 'drawer'];
29
- /**
30
- * Nav types valid for a layout/shell pair — mirrors `LayoutWrapperDefault`
31
- * (`navbar`/`flyout` → web horizontal, `sidebar`/`dockbar` → vertical).
32
- * A desktop-mode horizontal shell owns exactly one navigation shape: `desktop`.
33
- * `empty` and `fluid` shells are brand-only, so no nav type applies.
34
- */
35
- function allowedNavTypes$1(layoutType, shellMode) {
36
- switch (layoutType) {
37
- case 'vertical':
38
- return ['sidebar', 'dockbar'];
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
- switch (navType) {
51
- case 'sidebar':
52
- return ['default', 'collapsed'];
53
- case 'dockbar':
54
- return ['default', 'drawer'];
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
- return width !== 'fluid' || layoutType === 'fluid';
43
+ return width !== "fluid" || layoutType === "fluid";
62
44
  }
63
- /**
64
- * Default `ThemeSettingsAdapter`: the axis coherence rules that make runtime
65
- * layout and navigation switching safe, published so every consumer shares one
66
- * tested implementation instead of copying it.
67
- *
68
- * - `surface` / `appearance` / `width` delegate to the library `LayoutService`
69
- * (already reactive and persisted, with no nav-derived override to drift from).
70
- * - `layoutType` / `navType` / `navTypeMode` are owned here: `<Layout>` writes
71
- * `type` back to the service (`persist: false`) to follow nav orientation, so
72
- * reading `layout.type()` would drift from the operator's choice. Nav type is
73
- * not `LayoutService` territory at all.
74
- *
75
- * Incoherent axis pairs auto-correct, so the shell never renders an impossible
76
- * state. Only presentation choices are stored, never identity or session data,
77
- * and storage that is unavailable or holds a foreign value falls back to the
78
- * default without throwing.
79
- *
80
- * Install with {@link provideThemeSettingsAdapter}.
81
- */
82
- class ThemeSettingsDefaultAdapter {
83
- platformId = inject(PLATFORM_ID);
84
- storage = globalLocalStorage(isPlatformBrowser(this.platformId));
85
- layout = inject(LayoutService);
86
- shell = inject(ShellService);
87
- surface = this.layout.surface;
88
- appearance = this.layout.appearance;
89
- width = this.layout.width;
90
- layoutTypeState = signal(this.layout.getStoredType(), /* @ts-ignore */
91
- ...(ngDevMode ? [{ debugName: "layoutTypeState" }] : /* istanbul ignore next */ []));
92
- navTypeState = signal(this.readStoredNavType(), /* @ts-ignore */
93
- ...(ngDevMode ? [{ debugName: "navTypeState" }] : /* istanbul ignore next */ []));
94
- navTypeModeState = signal(this.readStoredNavTypeMode(), /* @ts-ignore */
95
- ...(ngDevMode ? [{ debugName: "navTypeModeState" }] : /* istanbul ignore next */ []));
96
- layoutType = this.layoutTypeState.asReadonly();
97
- navType = this.navTypeState.asReadonly();
98
- navTypeMode = this.navTypeModeState.asReadonly();
99
- /** Shell mode the nav-type constraints are resolved against. */
100
- shellMode = this.shell.mode;
101
- constructor() {
102
- // Keep external shell-mode changes coherent too: desktop+horizontal owns
103
- // exactly `desktop`, while that nav type cannot survive another shell mode.
104
- effect(() => this.enforceConstraints(this.layoutTypeState(), this.shell.mode()));
105
- }
106
- setSurface(surface) {
107
- this.layout.setSurface(surface);
108
- }
109
- setAppearance(appearance) {
110
- this.layout.setAppearance(appearance);
111
- }
112
- setWidth(width) {
113
- this.layout.setWidth(width);
114
- }
115
- setLayoutType(type) {
116
- this.layoutTypeState.set(type);
117
- this.storage.write(LAYOUT_TYPE_STORAGE_KEY, type);
118
- this.enforceConstraints(type, this.shell.mode());
119
- }
120
- setNavType(type) {
121
- if (!allowedNavTypes$1(this.layoutTypeState(), this.shell.mode()).includes(type)) {
122
- return;
123
- }
124
- this.navTypeState.set(type);
125
- this.storage.write(NAV_TYPE_STORAGE_KEY, type);
126
- this.enforceNavTypeMode();
127
- }
128
- setNavTypeMode(mode) {
129
- if (!allowedNavTypeModes(this.navTypeState()).includes(mode)) {
130
- return;
131
- }
132
- this.navTypeModeState.set(mode);
133
- this.storage.write(NAV_TYPE_MODE_STORAGE_KEY, mode);
134
- }
135
- /**
136
- * Auto-correct the lower-priority axes a layout type invalidates, so the
137
- * rendered shell never lands in an inconsistent state (e.g. `vertical` +
138
- * `navbar`). Idempotent — only writes when a value is actually out of range.
139
- */
140
- enforceConstraints(type, shellMode) {
141
- const navs = allowedNavTypes$1(type, shellMode);
142
- if (navs.length && !navs.includes(this.navTypeState())) {
143
- this.setNavType(navs[0]);
144
- }
145
- this.enforceNavTypeMode();
146
- if (type === 'fluid' && this.width() !== 'fluid') {
147
- this.setWidth('fluid');
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
- return [{ provide: THEME_SETTINGS_ADAPTER, useExisting: ThemeSettingsDefaultAdapter }];
131
+ return [{
132
+ provide: THEME_SETTINGS_ADAPTER,
133
+ useExisting: ThemeSettingsDefaultAdapter
134
+ }];
191
135
  }
192
-
193
- /**
194
- * The one rule the settings sections share.
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
- const current = adapter?.navType();
212
- const allowed = allowedNavTypes(adapter, shellMode);
213
- if (current && allowed.length && !allowed.includes(current)) {
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
- * Option tables and swatch palettes for `ThemeSettings`.
220
- *
221
- * Pure data, extracted from the component so the drawer stays inside the
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
- { value: 'light', label: 'Light', icon: 'light_mode' },
230
- { value: 'dark', label: 'Dark', icon: 'dark_mode' },
231
- { value: 'system', label: 'System', icon: 'desktop_windows' },
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
- { value: 'web', label: 'Web', icon: 'public' },
239
- { value: 'desktop', label: 'Desktop', icon: 'desktop_windows' },
240
- { value: 'tablet', label: 'Tablet', icon: 'tablet' },
241
- { value: 'mobile', label: 'Mobile', icon: 'smartphone' },
242
- ];
243
- /**
244
- * Where the shell's own chrome takes its colors from. `sync` follows the theme
245
- * axes above; `default` paints the active device's native titlebar instead.
246
- */
247
- const SHELL_COLOR_OPTIONS = [
248
- { value: 'sync', label: 'Sync', icon: 'palette' },
249
- { value: 'default', label: 'Native', icon: 'desktop_mac' },
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
- * How the app sits in its window. `modern` insets it as a panel and fuses the
253
- * titlebar with the surround; only a desktop window has a frame to shape.
254
- */
255
- const SHELL_FRAME_OPTIONS = [
256
- { value: 'classic', label: 'Classic', icon: 'crop_din' },
257
- { value: 'modern', label: 'Modern', icon: 'fullscreen_exit' },
258
- ];
259
- /**
260
- * Host devices, keyed so the drawer can offer only the ones the active shell mode
261
- * can actually run on (`SHELL_MODE_DEVICES`) — with `web` that is a single entry,
262
- * so a flat 7-option control would be mostly disabled noise.
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
- browser: { value: 'browser', label: 'Browser', icon: 'language' },
266
- macos: { value: 'macos', label: 'macOS', icon: 'laptop_mac' },
267
- windows: { value: 'windows', label: 'Windows', icon: 'laptop_windows' },
268
- linux: { value: 'linux', label: 'Linux', icon: 'terminal' },
269
- ipad: { value: 'ipad', label: 'iPad', icon: 'tablet_mac' },
270
- android: { value: 'android', label: 'Android', icon: 'android' },
271
- ios: { value: 'ios', label: 'iOS', icon: 'phone_iphone' },
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
- { value: 'none', label: 'None', icon: 'crop_square' },
276
- { value: 'xs', label: 'Xs', icon: 'rounded_corner' },
277
- { value: 'sm', label: 'Sm', icon: 'rounded_corner' },
278
- { value: 'md', label: 'Md', icon: 'rounded_corner' },
279
- { value: 'xl', label: 'Xl', icon: 'rounded_corner' },
280
- { value: 'full', label: 'Full', icon: 'circle' },
281
- ];
282
- const SPACE_OPTIONS = [
283
- { value: 'compact', label: 'Compact', icon: 'density_small' },
284
- { value: 'normal', label: 'Normal', icon: 'density_medium' },
285
- ];
286
- const APPEARANCE_OPTIONS = [
287
- { value: 'flat', label: 'Flat', icon: 'web_asset' },
288
- { value: 'border-rail', label: 'Border rail', icon: 'border_outer' },
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
- { value: 'flat', label: 'Flat', icon: 'format_color_reset' },
292
- { value: 'grid', label: 'Grid', icon: 'grid_4x4' },
293
- { value: 'grid-line', label: 'Grid line', icon: 'grid_view' },
294
- { value: 'honeycomb', label: 'Honeycomb', icon: 'hexagon' },
295
- { value: 'matrix', label: 'Matrix', icon: 'data_object' },
296
- { value: 'circuit', label: 'Circuit', icon: 'memory' },
297
- { value: 'line-vertical', label: 'Vertical lines', icon: 'view_column' },
298
- { value: 'line-horizontal', label: 'Horizontal lines', icon: 'view_agenda' },
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
- { value: 'vertical', label: 'Vertical', icon: 'view_sidebar' },
302
- { value: 'horizontal', label: 'Horizontal', icon: 'view_stream' },
303
- { value: 'empty', label: 'Empty', icon: 'crop_free' },
304
- { value: 'fluid', label: 'Fluid', icon: 'fit_screen' },
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
- { value: 'full', label: 'Full', icon: 'width_full' },
308
- { value: 'wide', label: 'Wide', icon: 'width_wide' },
309
- { value: 'container', label: 'Container', icon: 'width_normal' },
310
- { value: 'fluid', label: 'Fluid', icon: 'aspect_ratio' },
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
- { value: 'sidebar', label: 'Sidebar', icon: 'left_panel_open' },
314
- { value: 'dockbar', label: 'Dockbar', icon: 'dock_to_left' },
315
- { value: 'navbar', label: 'Navbar', icon: 'menu' },
316
- { value: 'flyout', label: 'Flyout', icon: 'open_in_new' },
317
- { value: 'desktop', label: 'Desktop', icon: 'desktop_windows' },
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
- base: 'hsl(240 6% 10%)',
321
- red: 'hsl(0 72% 48%)',
322
- orange: 'hsl(24 95% 48%)',
323
- amber: 'hsl(38 92% 48%)',
324
- yellow: 'hsl(48 96% 48%)',
325
- lime: 'hsl(84 78% 44%)',
326
- green: 'hsl(142 69% 40%)',
327
- emerald: 'hsl(160 78% 38%)',
328
- teal: 'hsl(173 75% 38%)',
329
- cyan: 'hsl(191 85% 40%)',
330
- sky: 'hsl(199 89% 46%)',
331
- blue: 'hsl(221 83% 53%)',
332
- indigo: 'hsl(239 78% 60%)',
333
- violet: 'hsl(258 86% 62%)',
334
- purple: 'hsl(271 81% 56%)',
335
- fuchsia: 'hsl(292 80% 56%)',
336
- pink: 'hsl(330 78% 54%)',
337
- rose: 'hsl(349 84% 52%)',
338
- brand: 'hsl(var(--brand))',
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
- base: 'hsl(220 9% 46%)',
342
- slate: 'hsl(215 16% 47%)',
343
- gray: 'hsl(220 9% 46%)',
344
- zinc: 'hsl(240 5% 46%)',
345
- neutral: 'hsl(0 0% 46%)',
346
- stone: 'hsl(30 6% 46%)',
347
- mauve: 'hsl(280 6% 47%)',
348
- olive: 'hsl(80 8% 42%)',
349
- mist: 'hsl(200 14% 50%)',
350
- taupe: 'hsl(28 10% 46%)',
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
- * The Layout section of `ThemeSettings`: appearance, surface, layout type, width.
355
- * Internal, see the Theme section for why.
356
- *
357
- * The adapter is injected NON-optionally: the parent only renders this section
358
- * when an adapter is present, which is what lets a theme-only consumer use
359
- * `ThemeSettings` with just the Theme and Shell sections.
360
- */
361
- class ThemeSettingsLayoutSectionComponent {
362
- shell = inject(ShellService);
363
- settings = inject(THEME_SETTINGS_ADAPTER);
364
- shellMode = this.shell.mode;
365
- /** Every mode but `web` owns its surface, which is what locks the width axis. */
366
- widthLocked = computed(() => this.shellMode() !== 'web', /* @ts-ignore */
367
- ...(ngDevMode ? [{ debugName: "widthLocked" }] : /* istanbul ignore next */ []));
368
- appearanceOptions = APPEARANCE_OPTIONS;
369
- surfaceOptions = SURFACE_OPTIONS;
370
- layoutTypeOptions = LAYOUT_TYPE_OPTIONS;
371
- widthOptions = computed(() => WIDTH_OPTIONS.map((option) => ({
372
- ...option,
373
- disabled:
374
- // The shell mode lock leaves exactly one legal width; `fluid` additionally
375
- // needs the fluid layout type to mean anything.
376
- (this.widthLocked() && option.value !== LAYOUT_LOCKED_WIDTH) ||
377
- (option.value === 'fluid' && this.settings.layoutType() !== 'fluid'),
378
- })), /* @ts-ignore */
379
- ...(ngDevMode ? [{ debugName: "widthOptions" }] : /* istanbul ignore next */ []));
380
- layoutGroupId = injectUniqueId('theme-settings-layout');
381
- appearanceLabelId = injectUniqueId('theme-settings-appearance');
382
- surfaceLabelId = injectUniqueId('theme-settings-surface');
383
- layoutTypeLabelId = injectUniqueId('theme-settings-layout-type');
384
- widthLabelId = injectUniqueId('theme-settings-width');
385
- setAppearance(value) {
386
- if (value === 'flat' || value === 'border-rail')
387
- this.settings.setAppearance(value);
388
- }
389
- setSurface(value) {
390
- if (SURFACE_OPTIONS.some((option) => option.value === value))
391
- this.settings.setSurface(value);
392
- }
393
- setLayoutType(value) {
394
- if (LAYOUT_TYPE_OPTIONS.some((option) => option.value === value)) {
395
- this.settings.setLayoutType(value);
396
- normalizeNavType(this.settings, this.shellMode());
397
- }
398
- }
399
- setWidth(value) {
400
- // Refuse the change rather than record a preference the lock would hide.
401
- if (this.widthLocked())
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
- `, isInline: true, dependencies: [{ kind: "component", type: SegmentedControlComponent, selector: "SegmentedControl", inputs: ["options", "value", "appearance", "space", "disabled", "aria-label", "aria-labelledby", "aria-describedby", "class"], outputs: ["valueChange"] }] });
467
- }
468
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ThemeSettingsLayoutSectionComponent, decorators: [{
469
- type: Component,
470
- args: [{
471
- selector: 'ThemeSettingsLayoutSection',
472
- imports: [SegmentedControlComponent],
473
- host: { class: 'contents' },
474
- template: `
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
- * The Navigation section of `ThemeSettings`: navigation type and its mode.
539
- * Internal, see the Theme section for why.
540
- */
541
- class ThemeSettingsNavigationSectionComponent {
542
- shell = inject(ShellService);
543
- settings = inject(THEME_SETTINGS_ADAPTER);
544
- navTypeOptions = computed(() => NAV_TYPE_OPTIONS.map((option) => ({
545
- ...option,
546
- disabled: !allowedNavTypes(this.settings, this.shell.mode()).includes(option.value),
547
- })), /* @ts-ignore */
548
- ...(ngDevMode ? [{ debugName: "navTypeOptions" }] : /* istanbul ignore next */ []));
549
- // Mirrors `allowedNavTypeModes` in the default adapter, which decides which of
550
- // these the adapter will actually accept; here they also carry their labels,
551
- // and dockbar names its default "Sticky".
552
- navTypeModeOptions = computed(() => {
553
- switch (this.settings.navType()) {
554
- case 'sidebar':
555
- return [
556
- { value: 'default', label: 'Default', icon: 'view_sidebar' },
557
- { value: 'collapsed', label: 'Collapsed', icon: 'first_page' },
558
- ];
559
- case 'dockbar':
560
- return [
561
- { value: 'default', label: 'Sticky', icon: 'dock_to_left' },
562
- { value: 'drawer', label: 'Drawer', icon: 'side_navigation' },
563
- ];
564
- default:
565
- return [{ value: 'default', label: 'Default', icon: 'tune' }];
566
- }
567
- }, /* @ts-ignore */
568
- ...(ngDevMode ? [{ debugName: "navTypeModeOptions" }] : /* istanbul ignore next */ []));
569
- navigationGroupId = injectUniqueId('theme-settings-navigation');
570
- navTypeLabelId = injectUniqueId('theme-settings-nav-type');
571
- navTypeModeLabelId = injectUniqueId('theme-settings-nav-type-mode');
572
- setNavType(value) {
573
- if (value &&
574
- allowedNavTypes(this.settings, this.shell.mode()).includes(value)) {
575
- this.settings.setNavType(value);
576
- }
577
- }
578
- setNavTypeMode(value) {
579
- if (value === 'default' || value === 'collapsed' || value === 'drawer')
580
- this.settings.setNavTypeMode(value);
581
- }
582
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ThemeSettingsNavigationSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
583
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: ThemeSettingsNavigationSectionComponent, isStandalone: true, selector: "ThemeSettingsNavigationSection", host: { classAttribute: "contents" }, ngImport: i0, template: `
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
- `, isInline: true, dependencies: [{ kind: "component", type: SegmentedControlComponent, selector: "SegmentedControl", inputs: ["options", "value", "appearance", "space", "disabled", "aria-label", "aria-labelledby", "aria-describedby", "class"], outputs: ["valueChange"] }] });
613
- }
614
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ThemeSettingsNavigationSectionComponent, decorators: [{
615
- type: Component,
616
- args: [{
617
- selector: 'ThemeSettingsNavigationSection',
618
- imports: [SegmentedControlComponent],
619
- host: { class: 'contents' },
620
- template: `
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
- * The Shell section of `ThemeSettings`: delivery mode, device, frame, chrome
655
- * colour. Internal, see the Theme section for why.
656
- *
657
- * It injects the adapter optionally because a theme-only consumer has none, and
658
- * it only needs it to run the shared navigation-type correction after a mode
659
- * change.
660
- */
661
- class ThemeSettingsShellSectionComponent {
662
- shell = inject(ShellService);
663
- settings = inject(THEME_SETTINGS_ADAPTER, { optional: true });
664
- shellMode = this.shell.mode;
665
- shellColor = this.shell.color;
666
- shellFrame = this.shell.frame;
667
- /** Only a desktop window has a frame to shape, so `modern` is offered only there. */
668
- shellFrameOptions = computed(() => SHELL_FRAME_OPTIONS.map((option) => ({
669
- ...option,
670
- disabled: option.value === 'modern' && this.shellMode() !== 'desktop',
671
- })), /* @ts-ignore */
672
- ...(ngDevMode ? [{ debugName: "shellFrameOptions" }] : /* istanbul ignore next */ []));
673
- /**
674
- * The device actually in effect: `ShellService.device()` is a preference that may
675
- * belong to another form factor (it deliberately survives a temporary mode change),
676
- * so the control shows the value `<Shell>` would render for the active mode.
677
- */
678
- shellDevice = computed(() => resolveShellDeviceForMode(this.shellMode(), this.shell.device()), /* @ts-ignore */
679
- ...(ngDevMode ? [{ debugName: "shellDevice" }] : /* istanbul ignore next */ []));
680
- shellDeviceOptions = computed(() => shellDevicesForMode(this.shellMode()).map((device) => SHELL_DEVICE_OPTIONS[device]), /* @ts-ignore */
681
- ...(ngDevMode ? [{ debugName: "shellDeviceOptions" }] : /* istanbul ignore next */ []));
682
- shellModeOptions = SHELL_MODE_OPTIONS;
683
- shellColorOptions = SHELL_COLOR_OPTIONS;
684
- shellGroupId = injectUniqueId('theme-settings-shell');
685
- shellModeLabelId = injectUniqueId('theme-settings-shell-mode');
686
- shellDeviceLabelId = injectUniqueId('theme-settings-shell-device');
687
- shellColorLabelId = injectUniqueId('theme-settings-shell-color');
688
- shellFrameLabelId = injectUniqueId('theme-settings-shell-frame');
689
- setShellMode(value) {
690
- if (SHELL_MODES.includes(value)) {
691
- this.shell.setMode(value);
692
- normalizeNavType(this.settings, this.shellMode());
693
- }
694
- }
695
- setShellDevice(value) {
696
- // Guard on the active mode, not just the union: a device from another form
697
- // factor would be corrected away on render anyway.
698
- if (value && isShellDeviceForMode(this.shellMode(), value)) {
699
- this.shell.setDevice(value);
700
- }
701
- }
702
- setShellFrame(value) {
703
- // Refuse `modern` off desktop rather than store a preference the shell would
704
- // coerce away on render.
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
- `, isInline: true, dependencies: [{ kind: "component", type: SegmentedControlComponent, selector: "SegmentedControl", inputs: ["options", "value", "appearance", "space", "disabled", "aria-label", "aria-labelledby", "aria-describedby", "class"], outputs: ["valueChange"] }] });
788
- }
789
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ThemeSettingsShellSectionComponent, decorators: [{
790
- type: Component,
791
- args: [{
792
- selector: 'ThemeSettingsShellSection',
793
- imports: [SegmentedControlComponent],
794
- host: { class: 'contents' },
795
- template: `
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
- const match = /^(\d+(?:\.\d+)?)\s+(\d+(?:\.\d+)?)%\s+(\d+(?:\.\d+)?)%$/.exec(color);
883
- const [hue, saturation, lightness] = match
884
- ? [Number(match[1]), Number(match[2]), Number(match[3])]
885
- : DEFAULT_BRAND_HSL;
886
- const chroma = (1 - Math.abs(2 * (lightness / 100) - 1)) * (saturation / 100);
887
- const segment = hue / 60;
888
- const x = chroma * (1 - Math.abs((segment % 2) - 1));
889
- const matchLightness = lightness / 100 - chroma / 2;
890
- const [red, green, blue] = segment < 1
891
- ? [chroma, x, 0]
892
- : segment < 2
893
- ? [x, chroma, 0]
894
- : segment < 3
895
- ? [0, chroma, x]
896
- : segment < 4
897
- ? [0, x, chroma]
898
- : segment < 5
899
- ? [x, 0, chroma]
900
- : [chroma, 0, x];
901
- const channel = (value) => Math.round((value + matchLightness) * 255)
902
- .toString(16)
903
- .padStart(2, '0');
904
- return `#${channel(red)}${channel(green)}${channel(blue)}`;
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
- const match = /^#([0-9a-f]{6})$/i.exec(color);
908
- if (!match)
909
- return null;
910
- const hex = match[1];
911
- const [red, green, blue] = [0, 2, 4].map((index) => Number.parseInt(hex.slice(index, index + 2), 16) / 255);
912
- const max = Math.max(red, green, blue);
913
- const min = Math.min(red, green, blue);
914
- const delta = max - min;
915
- const lightness = (max + min) / 2;
916
- let hue = 0;
917
- if (delta !== 0)
918
- hue =
919
- max === red
920
- ? 60 * (((green - blue) / delta) % 6)
921
- : max === green
922
- ? 60 * ((blue - red) / delta + 2)
923
- : 60 * ((red - green) / delta + 4);
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
- const match = /^#([0-9a-f]{6})$/i.exec(color);
931
- if (!match)
932
- return '0 0% 100%';
933
- const channels = [0, 2, 4].map((index) => Number.parseInt(match[1].slice(index, index + 2), 16));
934
- const linear = (channel) => {
935
- const value = channel / 255;
936
- return value <= 0.04045 ? value / 12.92 : ((value + 0.055) / 1.055) ** 2.4;
937
- };
938
- const luminance = linear(channels[0]) * 0.2126 + linear(channels[1]) * 0.7152 + linear(channels[2]) * 0.0722;
939
- return luminance > 0.179 ? '0 0% 0%' : '0 0% 100%';
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
- * The Theme section of `ThemeSettings`: mode, brand, accent, neutral, space,
944
- * radius.
945
- *
946
- * Internal. Not exported from the entry point: it exists so `ThemeSettings`
947
- * stays under the 700-line source guard and so each axis group can be read on
948
- * its own. Every dependency arrives by injection, so the parent composes it with
949
- * no inputs and no outputs.
950
- *
951
- * `class: 'contents'` keeps the host out of the layout: the parent's flex column
952
- * spaces the `<section>` inside, and a custom element defaults to `display:
953
- * inline`, which would break that spacing.
954
- */
955
- class ThemeSettingsThemeSectionComponent {
956
- themeMode = inject(ThemeModeService);
957
- themeColor = inject(ThemeColorService);
958
- themeBrand = inject(ThemeBrandService);
959
- themeRadius = inject(ThemeRadiusService);
960
- themeSpace = inject(ThemeSpaceService);
961
- mode = this.themeMode.mode;
962
- resolvedMode = this.themeMode.resolvedMode;
963
- color = this.themeColor.color;
964
- neutralColor = this.themeColor.neutral;
965
- brand = this.themeBrand.brand;
966
- brandHex = computed(() => hslToHex(this.brand()?.color ?? DEFAULT_BRAND_COLOR), /* @ts-ignore */
967
- ...(ngDevMode ? [{ debugName: "brandHex" }] : /* istanbul ignore next */ []));
968
- radius = this.themeRadius.radius;
969
- space = this.themeSpace.space;
970
- accents = THEME_COLORS;
971
- neutrals = THEME_NEUTRALS;
972
- accentSwatch = ACCENT_SWATCH;
973
- neutralSwatch = NEUTRAL_SWATCH;
974
- modeOptions = MODE_OPTIONS;
975
- radiusOptions = RADIUS_OPTIONS;
976
- spaceOptions = SPACE_OPTIONS;
977
- themeGroupId = injectUniqueId('theme-settings-theme');
978
- modeLabelId = injectUniqueId('theme-settings-mode');
979
- brandLabelId = injectUniqueId('theme-settings-brand');
980
- accentLabelId = injectUniqueId('theme-settings-accent');
981
- neutralLabelId = injectUniqueId('theme-settings-neutral');
982
- spaceLabelId = injectUniqueId('theme-settings-space');
983
- radiusLabelId = injectUniqueId('theme-settings-radius');
984
- swatchClasses(active) {
985
- 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
986
- ? 'ring-2 ring-ring ring-offset-2 ring-offset-background shadow-sm'
987
- : 'hover:scale-105');
988
- }
989
- setMode(value) {
990
- if (isThemeMode(value))
991
- this.themeMode.setMode(value);
992
- }
993
- setColor(value) {
994
- this.themeColor.setColor(value);
995
- }
996
- setNeutral(value) {
997
- this.themeColor.setNeutral(value);
998
- }
999
- setRadius(value) {
1000
- if (isThemeRadius(value))
1001
- this.themeRadius.setRadius(value);
1002
- }
1003
- setSpace(value) {
1004
- if (isThemeSpace(value))
1005
- this.themeSpace.setSpace(value);
1006
- }
1007
- setBrandFromPicker(event) {
1008
- if (!(event.target instanceof HTMLInputElement))
1009
- return;
1010
- const color = event.target.value;
1011
- const hsl = hexToHsl(color);
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
- `, isInline: true, dependencies: [{ kind: "component", type: SegmentedControlComponent, selector: "SegmentedControl", inputs: ["options", "value", "appearance", "space", "disabled", "aria-label", "aria-labelledby", "aria-describedby", "class"], outputs: ["valueChange"] }] });
1113
- }
1114
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ThemeSettingsThemeSectionComponent, decorators: [{
1115
- type: Component,
1116
- args: [{
1117
- selector: 'ThemeSettingsThemeSection',
1118
- imports: [SegmentedControlComponent],
1119
- host: { class: 'contents' },
1120
- template: `
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
- /** A navigation-aligned, right-side inspector for runtime theme and shell settings. */
1219
- class ThemeSettingsComponent {
1220
- /**
1221
- * Present only when the app provided an adapter. It is a render gate here: the
1222
- * Layout and Navigation sections inject the token non-optionally, so a
1223
- * theme-only consumer simply gets the Theme and Shell sections.
1224
- */
1225
- settings = inject(THEME_SETTINGS_ADAPTER, { optional: true });
1226
- open = model(false, /* @ts-ignore */
1227
- ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
1228
- trigger = input('button', /* @ts-ignore */
1229
- ...(ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []));
1230
- triggerLabel = input('Theme settings', /* @ts-ignore */
1231
- ...(ngDevMode ? [{ debugName: "triggerLabel" }] : /* istanbul ignore next */ []));
1232
- triggerIconOnly = input(false, { ...(ngDevMode ? { debugName: "triggerIconOnly" } : /* istanbul ignore next */ {}), alias: 'trigger-icon-only' });
1233
- showTrigger = input(true, { ...(ngDevMode ? { debugName: "showTrigger" } : /* istanbul ignore next */ {}), alias: 'show-trigger' });
1234
- side = input('right', /* @ts-ignore */
1235
- ...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
1236
- class = input('', { ...(ngDevMode ? { debugName: "class" } : /* istanbul ignore next */ {}), alias: 'class' });
1237
- 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'
1238
- ? this.triggerIconOnly()
1239
- ? 'size-11 p-0 text-primary underline-offset-4 hover:underline'
1240
- : 'min-h-11 px-1 text-primary underline-offset-4 hover:underline'
1241
- : this.triggerIconOnly()
1242
- ? 'size-11 justify-center p-0 text-muted-foreground hover:bg-accent hover:text-foreground'
1243
- : 'min-h-11 justify-center px-3 text-muted-foreground hover:bg-accent hover:text-accent-foreground', this.class()), /* @ts-ignore */
1244
- ...(ngDevMode ? [{ debugName: "triggerClasses" }] : /* istanbul ignore next */ []));
1245
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ThemeSettingsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1246
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: ThemeSettingsComponent, isStandalone: true, selector: "ThemeSettings", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "trigger", isSignal: true, isRequired: false, transformFunction: null }, triggerLabel: { classPropertyName: "triggerLabel", publicName: "triggerLabel", isSignal: true, isRequired: false, transformFunction: null }, triggerIconOnly: { classPropertyName: "triggerIconOnly", publicName: "trigger-icon-only", isSignal: true, isRequired: false, transformFunction: null }, showTrigger: { classPropertyName: "showTrigger", publicName: "show-trigger", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { classAttribute: "contents" }, ngImport: i0, template: `
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
- `, isInline: true, dependencies: [{ kind: "directive", type: DrawerCloseDirective, selector: "button[SheetClose], a[SheetClose], button[DrawerClose], a[DrawerClose]" }, { kind: "component", type: DrawerComponent, selector: "Sheet, Drawer", inputs: ["open", "side", "variant", "closeOnEscape", "closeOnBackdropClick", "backdrop", "showCloseButton", "closeButtonLabel", "restoreFocus", "aria-labelledby", "aria-describedby", "role", "class"], outputs: ["openChange", "openedChange"] }, { kind: "component", type: DrawerContentComponent, selector: "SheetContent, DrawerContent", inputs: ["class"] }, { kind: "component", type: DrawerHeaderComponent, selector: "SheetHeader, DrawerHeader", inputs: ["class"] }, { kind: "component", type: DrawerTitleComponent, selector: "SheetTitle, DrawerTitle, h2[SheetTitle], h2[DrawerTitle]", inputs: ["id", "class"] }, { kind: "component", type: IconComponent, selector: "Icon", inputs: ["name", "class", "size", "fill", "weight", "grade", "opticalSize"] }, { kind: "component", type: ThemeSettingsLayoutSectionComponent, selector: "ThemeSettingsLayoutSection" }, { kind: "component", type: ThemeSettingsNavigationSectionComponent, selector: "ThemeSettingsNavigationSection" }, { kind: "component", type: ThemeSettingsShellSectionComponent, selector: "ThemeSettingsShellSection" }, { kind: "component", type: ThemeSettingsThemeSectionComponent, selector: "ThemeSettingsThemeSection" }] });
1306
- }
1307
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ThemeSettingsComponent, decorators: [{
1308
- type: Component,
1309
- args: [{
1310
- selector: 'ThemeSettings',
1311
- imports: [
1312
- DrawerCloseDirective,
1313
- DrawerComponent,
1314
- DrawerContentComponent,
1315
- DrawerHeaderComponent,
1316
- DrawerTitleComponent,
1317
- IconComponent,
1318
- ThemeSettingsLayoutSectionComponent,
1319
- ThemeSettingsNavigationSectionComponent,
1320
- ThemeSettingsShellSectionComponent,
1321
- ThemeSettingsThemeSectionComponent,
1322
- ],
1323
- host: { class: 'contents' },
1324
- template: `
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
- }], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], trigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "trigger", required: false }] }], triggerLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerLabel", required: false }] }], triggerIconOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "trigger-icon-only", required: false }] }], showTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "show-trigger", required: false }] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
1386
-
1387
- /**
1388
- * Generated bundle index. Do not edit.
1389
- */
1390
-
1391
- export { NAV_TYPE_MODE_STORAGE_KEY, NAV_TYPE_STORAGE_KEY, THEME_SETTINGS_ADAPTER, ThemeSettingsComponent, ThemeSettingsDefaultAdapter, allowedNavTypeModes, allowedNavTypes$1 as allowedNavTypes, isWidthEnabled, provideThemeSettingsAdapter };
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 };