@edsis/angular 22.1.6 → 22.2.10

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