@egose/shadcn-theme-ng 0.0.27 → 0.0.28

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 (334) hide show
  1. package/accordion/README.md +64 -0
  2. package/accordion/fesm2022/accordion.mjs +160 -0
  3. package/accordion/fesm2022/accordion.mjs.map +1 -0
  4. package/accordion/package.json +25 -0
  5. package/accordion/types/accordion.d.ts +49 -0
  6. package/alert/fesm2022/alert.mjs +29 -24
  7. package/alert/fesm2022/alert.mjs.map +1 -1
  8. package/alert/package.json +25 -0
  9. package/alert-dialog/README.md +11 -0
  10. package/alert-dialog/fesm2022/alert-dialog.mjs +287 -0
  11. package/alert-dialog/fesm2022/alert-dialog.mjs.map +1 -0
  12. package/alert-dialog/package.json +25 -0
  13. package/alert-dialog/types/alert-dialog.d.ts +90 -0
  14. package/aspect-ratio/README.md +11 -0
  15. package/aspect-ratio/fesm2022/aspect-ratio.mjs +62 -0
  16. package/aspect-ratio/fesm2022/aspect-ratio.mjs.map +1 -0
  17. package/aspect-ratio/package.json +25 -0
  18. package/aspect-ratio/types/aspect-ratio.d.ts +21 -0
  19. package/autocomplete/README.md +64 -0
  20. package/autocomplete/fesm2022/autocomplete.mjs +409 -0
  21. package/autocomplete/fesm2022/autocomplete.mjs.map +1 -0
  22. package/autocomplete/package.json +24 -0
  23. package/autocomplete/types/autocomplete.d.ts +96 -0
  24. package/avatar/README.md +11 -0
  25. package/avatar/fesm2022/avatar.mjs +178 -0
  26. package/avatar/fesm2022/avatar.mjs.map +1 -0
  27. package/avatar/package.json +25 -0
  28. package/avatar/types/avatar.d.ts +50 -0
  29. package/badge/fesm2022/badge.mjs +15 -9
  30. package/badge/fesm2022/badge.mjs.map +1 -1
  31. package/badge/package.json +25 -0
  32. package/basic-alert/fesm2022/basic-alert.mjs +11 -7
  33. package/basic-alert/fesm2022/basic-alert.mjs.map +1 -1
  34. package/basic-alert/package.json +24 -0
  35. package/breadcrumb/README.md +11 -0
  36. package/breadcrumb/fesm2022/breadcrumb.mjs +224 -0
  37. package/breadcrumb/fesm2022/breadcrumb.mjs.map +1 -0
  38. package/breadcrumb/package.json +25 -0
  39. package/breadcrumb/types/breadcrumb.d.ts +57 -0
  40. package/button/fesm2022/button.mjs +99 -25
  41. package/button/fesm2022/button.mjs.map +1 -1
  42. package/button/package.json +25 -0
  43. package/button/{index.d.ts → types/button.d.ts} +30 -9
  44. package/button-group/README.md +11 -0
  45. package/button-group/fesm2022/button-group.mjs +102 -0
  46. package/button-group/fesm2022/button-group.mjs.map +1 -0
  47. package/button-group/package.json +25 -0
  48. package/button-group/types/button-group.d.ts +30 -0
  49. package/calendar/fesm2022/calendar.mjs +868 -546
  50. package/calendar/fesm2022/calendar.mjs.map +1 -1
  51. package/calendar/package.json +24 -0
  52. package/calendar/types/calendar.d.ts +94 -0
  53. package/card/README.md +11 -0
  54. package/card/fesm2022/card.mjs +169 -0
  55. package/card/fesm2022/card.mjs.map +1 -0
  56. package/card/package.json +25 -0
  57. package/card/types/card.d.ts +54 -0
  58. package/carousel/README.md +11 -0
  59. package/carousel/fesm2022/carousel.mjs +309 -0
  60. package/carousel/fesm2022/carousel.mjs.map +1 -0
  61. package/carousel/package.json +25 -0
  62. package/carousel/types/carousel.d.ts +84 -0
  63. package/checkbox/README.md +64 -0
  64. package/checkbox/fesm2022/checkbox.mjs +151 -0
  65. package/checkbox/fesm2022/checkbox.mjs.map +1 -0
  66. package/checkbox/package.json +24 -0
  67. package/checkbox/types/checkbox.d.ts +55 -0
  68. package/collapsible/README.md +11 -0
  69. package/collapsible/fesm2022/collapsible.mjs +77 -0
  70. package/collapsible/fesm2022/collapsible.mjs.map +1 -0
  71. package/collapsible/package.json +25 -0
  72. package/collapsible/types/collapsible.d.ts +27 -0
  73. package/combobox/README.md +11 -0
  74. package/combobox/fesm2022/combobox.mjs +683 -0
  75. package/combobox/fesm2022/combobox.mjs.map +1 -0
  76. package/combobox/package.json +25 -0
  77. package/combobox/types/combobox.d.ts +151 -0
  78. package/command/README.md +11 -0
  79. package/command/fesm2022/command.mjs +361 -0
  80. package/command/fesm2022/command.mjs.map +1 -0
  81. package/command/package.json +25 -0
  82. package/command/types/command.d.ts +89 -0
  83. package/confirmation-dialog/README.md +64 -0
  84. package/confirmation-dialog/fesm2022/confirmation-dialog.mjs +104 -0
  85. package/confirmation-dialog/fesm2022/confirmation-dialog.mjs.map +1 -0
  86. package/confirmation-dialog/package.json +24 -0
  87. package/confirmation-dialog/types/confirmation-dialog.d.ts +24 -0
  88. package/context-menu/README.md +11 -0
  89. package/context-menu/fesm2022/context-menu.mjs +89 -0
  90. package/context-menu/fesm2022/context-menu.mjs.map +1 -0
  91. package/context-menu/package.json +25 -0
  92. package/context-menu/types/context-menu.d.ts +34 -0
  93. package/date-picker/fesm2022/date-picker.mjs +1262 -307
  94. package/date-picker/fesm2022/date-picker.mjs.map +1 -1
  95. package/date-picker/package.json +24 -0
  96. package/date-picker/types/date-picker.d.ts +551 -0
  97. package/dialog/README.md +64 -0
  98. package/dialog/fesm2022/dialog.mjs +307 -0
  99. package/dialog/fesm2022/dialog.mjs.map +1 -0
  100. package/dialog/package.json +24 -0
  101. package/dialog/types/dialog.d.ts +95 -0
  102. package/drawer/README.md +11 -0
  103. package/drawer/fesm2022/drawer.mjs +271 -0
  104. package/drawer/fesm2022/drawer.mjs.map +1 -0
  105. package/drawer/package.json +25 -0
  106. package/drawer/types/drawer.d.ts +76 -0
  107. package/dropdown-menu/README.md +11 -0
  108. package/dropdown-menu/fesm2022/dropdown-menu.mjs +542 -0
  109. package/dropdown-menu/fesm2022/dropdown-menu.mjs.map +1 -0
  110. package/dropdown-menu/package.json +25 -0
  111. package/dropdown-menu/types/dropdown-menu.d.ts +176 -0
  112. package/empty/README.md +11 -0
  113. package/empty/fesm2022/empty.mjs +151 -0
  114. package/empty/fesm2022/empty.mjs.map +1 -0
  115. package/empty/package.json +25 -0
  116. package/empty/types/empty.d.ts +54 -0
  117. package/field/README.md +11 -0
  118. package/field/fesm2022/field.mjs +367 -0
  119. package/field/fesm2022/field.mjs.map +1 -0
  120. package/field/package.json +25 -0
  121. package/field/types/field.d.ts +107 -0
  122. package/form-checkbox/README.md +64 -0
  123. package/form-checkbox/fesm2022/form-checkbox.mjs +154 -0
  124. package/form-checkbox/fesm2022/form-checkbox.mjs.map +1 -0
  125. package/form-checkbox/package.json +24 -0
  126. package/form-checkbox/types/form-checkbox.d.ts +27 -0
  127. package/form-date-picker/fesm2022/form-date-picker.mjs +57 -50
  128. package/form-date-picker/fesm2022/form-date-picker.mjs.map +1 -1
  129. package/form-date-picker/package.json +24 -0
  130. package/form-field/fesm2022/form-field.mjs +37 -25
  131. package/form-field/fesm2022/form-field.mjs.map +1 -1
  132. package/form-field/package.json +25 -0
  133. package/form-field/{index.d.ts → types/form-field.d.ts} +4 -3
  134. package/form-field-simple/fesm2022/form-field-simple.mjs +14 -9
  135. package/form-field-simple/fesm2022/form-field-simple.mjs.map +1 -1
  136. package/form-field-simple/package.json +24 -0
  137. package/form-searchable-multiselect/README.md +64 -0
  138. package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +158 -0
  139. package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs.map +1 -0
  140. package/form-searchable-multiselect/package.json +24 -0
  141. package/form-searchable-multiselect/types/form-searchable-multiselect.d.ts +30 -0
  142. package/form-select/fesm2022/form-select.mjs +131 -70
  143. package/form-select/fesm2022/form-select.mjs.map +1 -1
  144. package/form-select/package.json +24 -0
  145. package/form-text-input/fesm2022/form-text-input.mjs +66 -37
  146. package/form-text-input/fesm2022/form-text-input.mjs.map +1 -1
  147. package/form-text-input/package.json +24 -0
  148. package/form-textarea/fesm2022/form-textarea.mjs +53 -29
  149. package/form-textarea/fesm2022/form-textarea.mjs.map +1 -1
  150. package/form-textarea/package.json +24 -0
  151. package/hover-card/README.md +11 -0
  152. package/hover-card/fesm2022/hover-card.mjs +123 -0
  153. package/hover-card/fesm2022/hover-card.mjs.map +1 -0
  154. package/hover-card/package.json +25 -0
  155. package/hover-card/types/hover-card.d.ts +36 -0
  156. package/icon/fesm2022/icon.mjs +11 -9
  157. package/icon/fesm2022/icon.mjs.map +1 -1
  158. package/icon/package.json +25 -0
  159. package/input/fesm2022/input.mjs +21 -71
  160. package/input/fesm2022/input.mjs.map +1 -1
  161. package/input/package.json +25 -0
  162. package/input/types/input.d.ts +18 -0
  163. package/input-group/README.md +11 -0
  164. package/input-group/fesm2022/input-group.mjs +199 -0
  165. package/input-group/fesm2022/input-group.mjs.map +1 -0
  166. package/input-group/package.json +25 -0
  167. package/input-group/types/input-group.d.ts +52 -0
  168. package/input-otp/README.md +11 -0
  169. package/input-otp/fesm2022/input-otp.mjs +141 -0
  170. package/input-otp/fesm2022/input-otp.mjs.map +1 -0
  171. package/input-otp/package.json +25 -0
  172. package/input-otp/types/input-otp.d.ts +43 -0
  173. package/item/README.md +11 -0
  174. package/item/fesm2022/item.mjs +278 -0
  175. package/item/fesm2022/item.mjs.map +1 -0
  176. package/item/package.json +25 -0
  177. package/item/types/item.d.ts +101 -0
  178. package/kbd/README.md +11 -0
  179. package/kbd/fesm2022/kbd.mjs +61 -0
  180. package/kbd/fesm2022/kbd.mjs.map +1 -0
  181. package/kbd/package.json +25 -0
  182. package/kbd/types/kbd.d.ts +22 -0
  183. package/label/fesm2022/label.mjs +10 -9
  184. package/label/fesm2022/label.mjs.map +1 -1
  185. package/label/package.json +25 -0
  186. package/layout-simple/README.md +64 -0
  187. package/layout-simple/fesm2022/layout-simple.mjs +719 -0
  188. package/layout-simple/fesm2022/layout-simple.mjs.map +1 -0
  189. package/layout-simple/package.json +24 -0
  190. package/layout-simple/types/layout-simple.d.ts +153 -0
  191. package/menubar/README.md +11 -0
  192. package/menubar/fesm2022/menubar.mjs +108 -0
  193. package/menubar/fesm2022/menubar.mjs.map +1 -0
  194. package/menubar/package.json +25 -0
  195. package/menubar/types/menubar.d.ts +40 -0
  196. package/native-select/README.md +11 -0
  197. package/native-select/fesm2022/native-select.mjs +207 -0
  198. package/native-select/fesm2022/native-select.mjs.map +1 -0
  199. package/native-select/package.json +25 -0
  200. package/native-select/types/native-select.d.ts +70 -0
  201. package/navigation-menu/README.md +11 -0
  202. package/navigation-menu/fesm2022/navigation-menu.mjs +206 -0
  203. package/navigation-menu/fesm2022/navigation-menu.mjs.map +1 -0
  204. package/navigation-menu/package.json +25 -0
  205. package/navigation-menu/types/navigation-menu.d.ts +54 -0
  206. package/package.json +239 -47
  207. package/pagination/README.md +11 -0
  208. package/pagination/fesm2022/pagination.mjs +808 -0
  209. package/pagination/fesm2022/pagination.mjs.map +1 -0
  210. package/pagination/package.json +25 -0
  211. package/pagination/types/pagination.d.ts +192 -0
  212. package/popover/fesm2022/popover.mjs +123 -29
  213. package/popover/fesm2022/popover.mjs.map +1 -1
  214. package/popover/package.json +24 -0
  215. package/popover/types/popover.d.ts +54 -0
  216. package/progress/README.md +11 -0
  217. package/progress/fesm2022/progress.mjs +77 -0
  218. package/progress/fesm2022/progress.mjs.map +1 -0
  219. package/progress/package.json +25 -0
  220. package/progress/types/progress.d.ts +27 -0
  221. package/radio-group/README.md +64 -0
  222. package/radio-group/fesm2022/radio-group.mjs +204 -0
  223. package/radio-group/fesm2022/radio-group.mjs.map +1 -0
  224. package/radio-group/package.json +25 -0
  225. package/radio-group/types/radio-group.d.ts +71 -0
  226. package/resizable/README.md +11 -0
  227. package/resizable/fesm2022/resizable.mjs +111 -0
  228. package/resizable/fesm2022/resizable.mjs.map +1 -0
  229. package/resizable/package.json +25 -0
  230. package/resizable/types/resizable.d.ts +32 -0
  231. package/scroll-area/README.md +11 -0
  232. package/scroll-area/fesm2022/scroll-area.mjs +51 -0
  233. package/scroll-area/fesm2022/scroll-area.mjs.map +1 -0
  234. package/scroll-area/package.json +25 -0
  235. package/scroll-area/types/scroll-area.d.ts +16 -0
  236. package/searchable-multiselect/README.md +64 -0
  237. package/searchable-multiselect/fesm2022/searchable-multiselect.mjs +225 -0
  238. package/searchable-multiselect/fesm2022/searchable-multiselect.mjs.map +1 -0
  239. package/searchable-multiselect/package.json +24 -0
  240. package/searchable-multiselect/types/searchable-multiselect.d.ts +39 -0
  241. package/select/fesm2022/select.mjs +373 -191
  242. package/select/fesm2022/select.mjs.map +1 -1
  243. package/select/package.json +25 -0
  244. package/select/types/select.d.ts +119 -0
  245. package/separator/fesm2022/separator.mjs +16 -14
  246. package/separator/fesm2022/separator.mjs.map +1 -1
  247. package/separator/package.json +24 -0
  248. package/separator/{index.d.ts → types/separator.d.ts} +4 -5
  249. package/sheet/fesm2022/sheet.mjs +49 -42
  250. package/sheet/fesm2022/sheet.mjs.map +1 -1
  251. package/sheet/package.json +24 -0
  252. package/sidebar/README.md +11 -0
  253. package/sidebar/fesm2022/sidebar.mjs +948 -0
  254. package/sidebar/fesm2022/sidebar.mjs.map +1 -0
  255. package/sidebar/package.json +25 -0
  256. package/sidebar/types/sidebar.d.ts +237 -0
  257. package/skeleton/README.md +11 -0
  258. package/skeleton/fesm2022/skeleton.mjs +44 -0
  259. package/skeleton/fesm2022/skeleton.mjs.map +1 -0
  260. package/skeleton/package.json +25 -0
  261. package/skeleton/types/skeleton.d.ts +16 -0
  262. package/slider/README.md +11 -0
  263. package/slider/fesm2022/slider.mjs +144 -0
  264. package/slider/fesm2022/slider.mjs.map +1 -0
  265. package/slider/package.json +25 -0
  266. package/slider/types/slider.d.ts +19 -0
  267. package/sonner/fesm2022/sonner.mjs +29 -34
  268. package/sonner/fesm2022/sonner.mjs.map +1 -1
  269. package/sonner/package.json +25 -0
  270. package/spinner/fesm2022/spinner.mjs +17 -13
  271. package/spinner/fesm2022/spinner.mjs.map +1 -1
  272. package/spinner/package.json +25 -0
  273. package/switch/fesm2022/switch.mjs +27 -24
  274. package/switch/fesm2022/switch.mjs.map +1 -1
  275. package/switch/package.json +25 -0
  276. package/table/README.md +11 -0
  277. package/table/fesm2022/table.mjs +211 -0
  278. package/table/fesm2022/table.mjs.map +1 -0
  279. package/table/package.json +25 -0
  280. package/table/types/table.d.ts +87 -0
  281. package/tabs/README.md +64 -0
  282. package/tabs/fesm2022/tabs.mjs +286 -0
  283. package/tabs/fesm2022/tabs.mjs.map +1 -0
  284. package/tabs/package.json +25 -0
  285. package/tabs/types/tabs.d.ts +71 -0
  286. package/textarea/README.md +11 -0
  287. package/textarea/fesm2022/textarea.mjs +47 -0
  288. package/textarea/fesm2022/textarea.mjs.map +1 -0
  289. package/textarea/package.json +25 -0
  290. package/textarea/types/textarea.d.ts +18 -0
  291. package/toggle/README.md +11 -0
  292. package/toggle/fesm2022/toggle.mjs +78 -0
  293. package/toggle/fesm2022/toggle.mjs.map +1 -0
  294. package/toggle/package.json +25 -0
  295. package/toggle/types/toggle.d.ts +27 -0
  296. package/toggle-group/README.md +11 -0
  297. package/toggle-group/fesm2022/toggle-group.mjs +117 -0
  298. package/toggle-group/fesm2022/toggle-group.mjs.map +1 -0
  299. package/toggle-group/package.json +25 -0
  300. package/toggle-group/types/toggle-group.d.ts +39 -0
  301. package/tooltip/README.md +64 -0
  302. package/tooltip/fesm2022/tooltip.mjs +72 -0
  303. package/tooltip/fesm2022/tooltip.mjs.map +1 -0
  304. package/tooltip/package.json +25 -0
  305. package/tooltip/types/tooltip.d.ts +22 -0
  306. package/typography/README.md +11 -0
  307. package/typography/fesm2022/typography.mjs +242 -0
  308. package/typography/fesm2022/typography.mjs.map +1 -0
  309. package/typography/package.json +25 -0
  310. package/typography/types/typography.d.ts +94 -0
  311. package/utils/fesm2022/utils.mjs +184 -1
  312. package/utils/fesm2022/utils.mjs.map +1 -1
  313. package/utils/package.json +25 -0
  314. package/utils/types/utils.d.ts +13 -0
  315. package/calendar/index.d.ts +0 -111
  316. package/date-picker/index.d.ts +0 -227
  317. package/input/index.d.ts +0 -41
  318. package/popover/index.d.ts +0 -30
  319. package/select/index.d.ts +0 -92
  320. package/utils/index.d.ts +0 -5
  321. /package/alert/{index.d.ts → types/alert.d.ts} +0 -0
  322. /package/badge/{index.d.ts → types/badge.d.ts} +0 -0
  323. /package/basic-alert/{index.d.ts → types/basic-alert.d.ts} +0 -0
  324. /package/form-date-picker/{index.d.ts → types/form-date-picker.d.ts} +0 -0
  325. /package/form-field-simple/{index.d.ts → types/form-field-simple.d.ts} +0 -0
  326. /package/form-select/{index.d.ts → types/form-select.d.ts} +0 -0
  327. /package/form-text-input/{index.d.ts → types/form-text-input.d.ts} +0 -0
  328. /package/form-textarea/{index.d.ts → types/form-textarea.d.ts} +0 -0
  329. /package/icon/{index.d.ts → types/icon.d.ts} +0 -0
  330. /package/label/{index.d.ts → types/label.d.ts} +0 -0
  331. /package/sheet/{index.d.ts → types/sheet.d.ts} +0 -0
  332. /package/sonner/{index.d.ts → types/sonner.d.ts} +0 -0
  333. /package/spinner/{index.d.ts → types/spinner.d.ts} +0 -0
  334. /package/switch/{index.d.ts → types/switch.d.ts} +0 -0
@@ -0,0 +1,948 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, inject, PLATFORM_ID, REQUEST, DOCUMENT, signal, computed, DestroyRef, afterNextRender, Injectable, input, effect, ChangeDetectionStrategy, Component, Directive, booleanAttribute, NgModule } from '@angular/core';
3
+ import { isPlatformServer, NgTemplateOutlet } from '@angular/common';
4
+ import * as i1 from '@egose/shadcn-theme-ng/sheet';
5
+ import { HlmSheetImports } from '@egose/shadcn-theme-ng/sheet';
6
+ import { hlm, classes } from '@egose/shadcn-theme-ng/utils';
7
+ import * as i1$1 from '@egose/shadcn-theme-ng/input';
8
+ import { HlmInput } from '@egose/shadcn-theme-ng/input';
9
+ import * as i1$2 from '@spartan-ng/brain/tooltip';
10
+ import { BrnTooltip, provideBrnTooltipDefaultOptions } from '@spartan-ng/brain/tooltip';
11
+ import { tooltipPositionVariants, DEFAULT_TOOLTIP_SVG_CLASS, DEFAULT_TOOLTIP_CONTENT_CLASSES } from '@egose/shadcn-theme-ng/tooltip';
12
+ import { cva } from 'class-variance-authority';
13
+ import * as i1$3 from '@egose/shadcn-theme-ng/skeleton';
14
+ import { HlmSkeletonImports } from '@egose/shadcn-theme-ng/skeleton';
15
+ import * as i1$4 from '@egose/shadcn-theme-ng/separator';
16
+ import { HlmSeparator } from '@egose/shadcn-theme-ng/separator';
17
+ import { NgIcon, provideIcons } from '@ng-icons/core';
18
+ import { lucidePanelLeft } from '@ng-icons/lucide';
19
+ import * as i1$5 from '@egose/shadcn-theme-ng/button';
20
+ import { provideBrnButtonConfig, HlmBtn } from '@egose/shadcn-theme-ng/button';
21
+
22
+ const defaultConfig = {
23
+ sidebarWidth: '16rem',
24
+ sidebarWidthMobile: '18rem',
25
+ sidebarWidthIcon: '3rem',
26
+ sidebarCookieName: 'sidebar_state',
27
+ sidebarCookieMaxAge: 60 * 60 * 24 * 7, // 7 days in seconds
28
+ sidebarKeyboardShortcut: 'b',
29
+ mobileBreakpoint: '768px',
30
+ closeMobileSidebarOnMenuButtonClick: false,
31
+ };
32
+ const HlmSidebarConfigToken = new InjectionToken('HlmSidebarConfig');
33
+ function provideHlmSidebarConfig(config) {
34
+ return { provide: HlmSidebarConfigToken, useValue: { ...defaultConfig, ...config } };
35
+ }
36
+ function injectHlmSidebarConfig() {
37
+ return inject(HlmSidebarConfigToken, { optional: true }) ?? defaultConfig;
38
+ }
39
+
40
+ class HlmSidebarService {
41
+ _platformId = inject(PLATFORM_ID);
42
+ _request = inject(REQUEST, { optional: true });
43
+ _config = injectHlmSidebarConfig();
44
+ _document = inject(DOCUMENT);
45
+ _window = this._document.defaultView;
46
+ _open = signal(true, /* @ts-ignore */
47
+ ...(ngDevMode ? [{ debugName: "_open" }] : /* istanbul ignore next */ []));
48
+ _openMobile = signal(false, /* @ts-ignore */
49
+ ...(ngDevMode ? [{ debugName: "_openMobile" }] : /* istanbul ignore next */ []));
50
+ _isMobile = signal(false, /* @ts-ignore */
51
+ ...(ngDevMode ? [{ debugName: "_isMobile" }] : /* istanbul ignore next */ []));
52
+ _variant = signal('sidebar', /* @ts-ignore */
53
+ ...(ngDevMode ? [{ debugName: "_variant" }] : /* istanbul ignore next */ []));
54
+ _mediaQuery = null;
55
+ open = this._open.asReadonly();
56
+ openMobile = this._openMobile.asReadonly();
57
+ isMobile = this._isMobile.asReadonly();
58
+ variant = this._variant.asReadonly();
59
+ state = computed(() => (this._open() ? 'expanded' : 'collapsed'), /* @ts-ignore */
60
+ ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
61
+ constructor() {
62
+ const destroyRef = inject(DestroyRef);
63
+ this.restoreStateFromCookie();
64
+ afterNextRender(() => {
65
+ if (!this._window || typeof this._window.matchMedia !== 'function')
66
+ return;
67
+ // Initialize MediaQueryList
68
+ this._mediaQuery = this._window.matchMedia(`(max-width: ${this._config.mobileBreakpoint})`);
69
+ this._isMobile.set(this._mediaQuery.matches);
70
+ // Add media query listener
71
+ const mediaQueryHandler = (e) => {
72
+ this._isMobile.set(e.matches);
73
+ // If switching from mobile to desktop, close mobile sidebar
74
+ if (!e.matches)
75
+ this._openMobile.set(false);
76
+ };
77
+ this._mediaQuery.addEventListener('change', mediaQueryHandler);
78
+ // Add keyboard shortcut listener
79
+ const keydownHandler = (event) => {
80
+ if (event.key === this._config.sidebarKeyboardShortcut && (event.ctrlKey || event.metaKey)) {
81
+ event.preventDefault();
82
+ this.toggleSidebar();
83
+ }
84
+ };
85
+ this._window.addEventListener('keydown', keydownHandler);
86
+ // Add resize listener with debounce
87
+ let resizeTimeout;
88
+ const resizeHandler = () => {
89
+ if (!this._window)
90
+ return;
91
+ if (resizeTimeout)
92
+ this._window.clearTimeout(resizeTimeout);
93
+ resizeTimeout = this._window.setTimeout(() => {
94
+ if (this._mediaQuery)
95
+ this._isMobile.set(this._mediaQuery.matches);
96
+ }, 100);
97
+ };
98
+ this._window.addEventListener('resize', resizeHandler);
99
+ // Cleanup listeners on destroy
100
+ destroyRef.onDestroy(() => {
101
+ if (!this._window)
102
+ return;
103
+ if (this._mediaQuery)
104
+ this._mediaQuery.removeEventListener('change', mediaQueryHandler);
105
+ this._window.removeEventListener('keydown', keydownHandler);
106
+ this._window.removeEventListener('resize', resizeHandler);
107
+ if (resizeTimeout)
108
+ this._window.clearTimeout(resizeTimeout);
109
+ });
110
+ });
111
+ }
112
+ setOpen(open) {
113
+ this._open.set(open);
114
+ this._document.cookie = `${this._config.sidebarCookieName}=${open}; path=/; max-age=${this._config.sidebarCookieMaxAge}`;
115
+ }
116
+ setOpenMobile(open) {
117
+ if (this._isMobile()) {
118
+ this._openMobile.set(open);
119
+ }
120
+ }
121
+ setVariant(variant) {
122
+ this._variant.set(variant);
123
+ }
124
+ toggleSidebar() {
125
+ if (this._isMobile()) {
126
+ this._openMobile.update((value) => !value);
127
+ }
128
+ else {
129
+ this.setOpen(!this._open());
130
+ }
131
+ }
132
+ restoreStateFromCookie() {
133
+ const cookieString = isPlatformServer(this._platformId)
134
+ ? this._request?.headers.get('cookie')
135
+ : this._document.cookie;
136
+ if (!cookieString)
137
+ return;
138
+ const prefix = `${this._config.sidebarCookieName}=`;
139
+ const cookieValue = cookieString
140
+ .split(';')
141
+ .map((c) => c.trim())
142
+ .find((c) => c.startsWith(prefix))
143
+ ?.slice(prefix.length);
144
+ if (cookieValue !== undefined) {
145
+ this._open.set(cookieValue === 'true');
146
+ }
147
+ }
148
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
149
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarService, providedIn: 'root' });
150
+ }
151
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarService, decorators: [{
152
+ type: Injectable,
153
+ args: [{ providedIn: 'root' }]
154
+ }], ctorParameters: () => [] });
155
+
156
+ class HlmSidebar {
157
+ _sidebarService = inject(HlmSidebarService);
158
+ _config = injectHlmSidebarConfig();
159
+ sidebarWidthMobile = input(this._config.sidebarWidthMobile, /* @ts-ignore */
160
+ ...(ngDevMode ? [{ debugName: "sidebarWidthMobile" }] : /* istanbul ignore next */ []));
161
+ side = input('left', /* @ts-ignore */
162
+ ...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
163
+ variant = input(this._sidebarService.variant(), /* @ts-ignore */
164
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
165
+ collapsible = input('offcanvas', /* @ts-ignore */
166
+ ...(ngDevMode ? [{ debugName: "collapsible" }] : /* istanbul ignore next */ []));
167
+ _sidebarGapComputedClass = computed(() => hlm('transition-[width] duration-200 ease-linear relative w-(--sidebar-width) bg-transparent', 'group-data-[collapsible=offcanvas]:w-0', 'group-data-[side=right]:rotate-180', this.variant() === 'floating' || this.variant() === 'inset'
168
+ ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]'
169
+ : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)'), /* @ts-ignore */
170
+ ...(ngDevMode ? [{ debugName: "_sidebarGapComputedClass" }] : /* istanbul ignore next */ []));
171
+ sidebarContainerClass = input('', /* @ts-ignore */
172
+ ...(ngDevMode ? [{ debugName: "sidebarContainerClass" }] : /* istanbul ignore next */ []));
173
+ _sidebarContainerComputedClass = computed(() => hlm('fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex', this.variant() === 'floating' || this.variant() === 'inset'
174
+ ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]'
175
+ : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l', this.sidebarContainerClass()), /* @ts-ignore */
176
+ ...(ngDevMode ? [{ debugName: "_sidebarContainerComputedClass" }] : /* istanbul ignore next */ []));
177
+ _dataSlot = computed(() => {
178
+ return !this._sidebarService.isMobile() ? 'sidebar' : undefined;
179
+ }, /* @ts-ignore */
180
+ ...(ngDevMode ? [{ debugName: "_dataSlot" }] : /* istanbul ignore next */ []));
181
+ _collapsibleAndNonMobile = computed(() => {
182
+ return this.collapsible() !== 'none' && !this._sidebarService.isMobile();
183
+ }, /* @ts-ignore */
184
+ ...(ngDevMode ? [{ debugName: "_collapsibleAndNonMobile" }] : /* istanbul ignore next */ []));
185
+ _dataState = computed(() => {
186
+ return this._collapsibleAndNonMobile() ? this._sidebarService.state() : undefined;
187
+ }, /* @ts-ignore */
188
+ ...(ngDevMode ? [{ debugName: "_dataState" }] : /* istanbul ignore next */ []));
189
+ _dataCollapsible = computed(() => {
190
+ if (this._collapsibleAndNonMobile()) {
191
+ return this._sidebarService.state() === 'collapsed' ? this.collapsible() : '';
192
+ }
193
+ return undefined;
194
+ }, /* @ts-ignore */
195
+ ...(ngDevMode ? [{ debugName: "_dataCollapsible" }] : /* istanbul ignore next */ []));
196
+ _dataVariant = computed(() => {
197
+ return this._collapsibleAndNonMobile() ? this.variant() : undefined;
198
+ }, /* @ts-ignore */
199
+ ...(ngDevMode ? [{ debugName: "_dataVariant" }] : /* istanbul ignore next */ []));
200
+ _dataSide = computed(() => {
201
+ return this._collapsibleAndNonMobile() ? this.side() : undefined;
202
+ }, /* @ts-ignore */
203
+ ...(ngDevMode ? [{ debugName: "_dataSide" }] : /* istanbul ignore next */ []));
204
+ constructor() {
205
+ // Sync variant input with service
206
+ effect(() => {
207
+ this._sidebarService.setVariant(this.variant());
208
+ });
209
+ classes(() => {
210
+ if (this.collapsible() === 'none') {
211
+ return hlm('bg-sidebar text-sidebar-foreground flex h-svh w-(--sidebar-width) flex-col');
212
+ }
213
+ else if (this._sidebarService.isMobile()) {
214
+ return '';
215
+ }
216
+ else {
217
+ return hlm('group peer text-sidebar-foreground hidden md:block');
218
+ }
219
+ });
220
+ }
221
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebar, deps: [], target: i0.ɵɵFactoryTarget.Component });
222
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: HlmSidebar, isStandalone: true, selector: "hlm-sidebar", inputs: { sidebarWidthMobile: { classPropertyName: "sidebarWidthMobile", publicName: "sidebarWidthMobile", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, sidebarContainerClass: { classPropertyName: "sidebarContainerClass", publicName: "sidebarContainerClass", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-slot": "_dataSlot()", "attr.data-state": "_dataState()", "attr.data-collapsible": "_dataCollapsible()", "attr.data-variant": "_dataVariant()", "attr.data-side": "_dataSide()" } }, ngImport: i0, template: `
223
+ <ng-template #contentContainer>
224
+ <ng-content />
225
+ </ng-template>
226
+
227
+ @if (collapsible() === 'none') {
228
+ <ng-container *ngTemplateOutlet="contentContainer"></ng-container>
229
+ } @else if (_sidebarService.isMobile()) {
230
+ <hlm-sheet
231
+ [side]="side()"
232
+ [state]="_sidebarService.openMobile() ? 'open' : 'closed'"
233
+ (stateChanged)="_sidebarService.setOpenMobile($event === 'open')"
234
+ >
235
+ <hlm-sheet-content
236
+ *hlmSheetPortal="let ctx"
237
+ data-slot="sidebar"
238
+ data-sidebar="sidebar"
239
+ data-mobile="true"
240
+ class="bg-sidebar text-sidebar-foreground h-svh w-(--sidebar-width) p-0 [&>button]:hidden"
241
+ [style.--sidebar-width]="sidebarWidthMobile()"
242
+ >
243
+ <div class="flex h-full w-full flex-col">
244
+ <ng-container *ngTemplateOutlet="contentContainer" />
245
+ </div>
246
+ </hlm-sheet-content>
247
+ </hlm-sheet>
248
+ } @else {
249
+ <!-- Sidebar gap on desktop -->
250
+ <div data-slot="sidebar-gap" [class]="_sidebarGapComputedClass()"></div>
251
+ <div data-slot="sidebar-container" [attr.data-side]="_dataSide()" [class]="_sidebarContainerComputedClass()">
252
+ <div
253
+ data-sidebar="sidebar"
254
+ data-slot="sidebar-inner"
255
+ class="bg-sidebar group-data-[variant=floating]:ring-sidebar-border group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 flex size-full flex-col"
256
+ >
257
+ <ng-container *ngTemplateOutlet="contentContainer" />
258
+ </div>
259
+ </div>
260
+ }
261
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i1.HlmSheet, selector: "hlm-sheet", exportAs: ["hlmSheet"] }, { kind: "component", type: i1.HlmSheetContent, selector: "hlm-sheet-content", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
262
+ }
263
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebar, decorators: [{
264
+ type: Component,
265
+ args: [{
266
+ selector: 'hlm-sidebar',
267
+ imports: [NgTemplateOutlet, HlmSheetImports],
268
+ changeDetection: ChangeDetectionStrategy.OnPush,
269
+ host: {
270
+ '[attr.data-slot]': '_dataSlot()',
271
+ '[attr.data-state]': '_dataState()',
272
+ '[attr.data-collapsible]': '_dataCollapsible()',
273
+ '[attr.data-variant]': '_dataVariant()',
274
+ '[attr.data-side]': '_dataSide()',
275
+ },
276
+ template: `
277
+ <ng-template #contentContainer>
278
+ <ng-content />
279
+ </ng-template>
280
+
281
+ @if (collapsible() === 'none') {
282
+ <ng-container *ngTemplateOutlet="contentContainer"></ng-container>
283
+ } @else if (_sidebarService.isMobile()) {
284
+ <hlm-sheet
285
+ [side]="side()"
286
+ [state]="_sidebarService.openMobile() ? 'open' : 'closed'"
287
+ (stateChanged)="_sidebarService.setOpenMobile($event === 'open')"
288
+ >
289
+ <hlm-sheet-content
290
+ *hlmSheetPortal="let ctx"
291
+ data-slot="sidebar"
292
+ data-sidebar="sidebar"
293
+ data-mobile="true"
294
+ class="bg-sidebar text-sidebar-foreground h-svh w-(--sidebar-width) p-0 [&>button]:hidden"
295
+ [style.--sidebar-width]="sidebarWidthMobile()"
296
+ >
297
+ <div class="flex h-full w-full flex-col">
298
+ <ng-container *ngTemplateOutlet="contentContainer" />
299
+ </div>
300
+ </hlm-sheet-content>
301
+ </hlm-sheet>
302
+ } @else {
303
+ <!-- Sidebar gap on desktop -->
304
+ <div data-slot="sidebar-gap" [class]="_sidebarGapComputedClass()"></div>
305
+ <div data-slot="sidebar-container" [attr.data-side]="_dataSide()" [class]="_sidebarContainerComputedClass()">
306
+ <div
307
+ data-sidebar="sidebar"
308
+ data-slot="sidebar-inner"
309
+ class="bg-sidebar group-data-[variant=floating]:ring-sidebar-border group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 flex size-full flex-col"
310
+ >
311
+ <ng-container *ngTemplateOutlet="contentContainer" />
312
+ </div>
313
+ </div>
314
+ }
315
+ `,
316
+ }]
317
+ }], ctorParameters: () => [], propDecorators: { sidebarWidthMobile: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidebarWidthMobile", required: false }] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], sidebarContainerClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidebarContainerClass", required: false }] }] } });
318
+
319
+ class HlmSidebarContent {
320
+ constructor() {
321
+ classes(() => 'no-scrollbar gap-2 flex min-h-0 flex-1 flex-col overflow-auto group-data-[collapsible=icon]:overflow-hidden');
322
+ }
323
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
324
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmSidebarContent, isStandalone: true, selector: "[hlmSidebarContent],hlm-sidebar-content", host: { attributes: { "data-slot": "sidebar-content", "data-sidebar": "content" } }, ngImport: i0 });
325
+ }
326
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarContent, decorators: [{
327
+ type: Directive,
328
+ args: [{
329
+ selector: '[hlmSidebarContent],hlm-sidebar-content',
330
+ host: {
331
+ 'data-slot': 'sidebar-content',
332
+ 'data-sidebar': 'content',
333
+ },
334
+ }]
335
+ }], ctorParameters: () => [] });
336
+
337
+ class HlmSidebarFooter {
338
+ constructor() {
339
+ classes(() => 'gap-2 p-2 flex flex-col');
340
+ }
341
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive });
342
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmSidebarFooter, isStandalone: true, selector: "[hlmSidebarFooter],hlm-sidebar-footer", host: { attributes: { "data-slot": "sidebar-footer", "data-sidebar": "footer" } }, ngImport: i0 });
343
+ }
344
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarFooter, decorators: [{
345
+ type: Directive,
346
+ args: [{
347
+ selector: '[hlmSidebarFooter],hlm-sidebar-footer',
348
+ host: {
349
+ 'data-slot': 'sidebar-footer',
350
+ 'data-sidebar': 'footer',
351
+ },
352
+ }]
353
+ }], ctorParameters: () => [] });
354
+
355
+ class HlmSidebarGroup {
356
+ constructor() {
357
+ classes(() => 'p-2 relative flex w-full min-w-0 flex-col');
358
+ }
359
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
360
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmSidebarGroup, isStandalone: true, selector: "[hlmSidebarGroup],hlm-sidebar-group", host: { attributes: { "data-slot": "sidebar-group", "data-sidebar": "group" } }, ngImport: i0 });
361
+ }
362
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarGroup, decorators: [{
363
+ type: Directive,
364
+ args: [{
365
+ selector: '[hlmSidebarGroup],hlm-sidebar-group',
366
+ host: {
367
+ 'data-slot': 'sidebar-group',
368
+ 'data-sidebar': 'group',
369
+ },
370
+ }]
371
+ }], ctorParameters: () => [] });
372
+
373
+ class HlmSidebarGroupAction {
374
+ constructor() {
375
+ classes(() => 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute end-3 top-3.5 w-5 rounded-md p-0 focus-visible:ring-2 [&>ng-icon]:text-[length:--spacing(4)] flex aspect-square items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>ng-icon]:shrink-0');
376
+ }
377
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarGroupAction, deps: [], target: i0.ɵɵFactoryTarget.Directive });
378
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmSidebarGroupAction, isStandalone: true, selector: "button[hlmSidebarGroupAction]", host: { attributes: { "data-slot": "sidebar-group-action", "data-sidebar": "group-action" } }, ngImport: i0 });
379
+ }
380
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarGroupAction, decorators: [{
381
+ type: Directive,
382
+ args: [{
383
+ selector: 'button[hlmSidebarGroupAction]',
384
+ host: {
385
+ 'data-slot': 'sidebar-group-action',
386
+ 'data-sidebar': 'group-action',
387
+ },
388
+ }]
389
+ }], ctorParameters: () => [] });
390
+
391
+ class HlmSidebarGroupContent {
392
+ constructor() {
393
+ classes(() => 'text-sm w-full');
394
+ }
395
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarGroupContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
396
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmSidebarGroupContent, isStandalone: true, selector: "div[hlmSidebarGroupContent]", host: { attributes: { "data-slot": "sidebar-group-content", "data-sidebar": "group-content" } }, ngImport: i0 });
397
+ }
398
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarGroupContent, decorators: [{
399
+ type: Directive,
400
+ args: [{
401
+ selector: 'div[hlmSidebarGroupContent]',
402
+ host: {
403
+ 'data-slot': 'sidebar-group-content',
404
+ 'data-sidebar': 'group-content',
405
+ },
406
+ }]
407
+ }], ctorParameters: () => [] });
408
+
409
+ class HlmSidebarGroupLabel {
410
+ constructor() {
411
+ classes(() => 'text-sidebar-foreground/70 ring-sidebar-ring h-8 rounded-md px-2 text-xs font-medium transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>ng-icon]:text-[length:--spacing(4)] flex shrink-0 items-center outline-hidden [&>ng-icon]:shrink-0');
412
+ }
413
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarGroupLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
414
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmSidebarGroupLabel, isStandalone: true, selector: "div[hlmSidebarGroupLabel], button[hlmSidebarGroupLabel]", host: { attributes: { "data-slot": "sidebar-group-label", "data-sidebar": "group-label" } }, ngImport: i0 });
415
+ }
416
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarGroupLabel, decorators: [{
417
+ type: Directive,
418
+ args: [{
419
+ selector: 'div[hlmSidebarGroupLabel], button[hlmSidebarGroupLabel]',
420
+ host: {
421
+ 'data-slot': 'sidebar-group-label',
422
+ 'data-sidebar': 'group-label',
423
+ },
424
+ }]
425
+ }], ctorParameters: () => [] });
426
+
427
+ class HlmSidebarHeader {
428
+ constructor() {
429
+ classes(() => 'gap-2 p-2 flex flex-col');
430
+ }
431
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarHeader, deps: [], target: i0.ɵɵFactoryTarget.Directive });
432
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmSidebarHeader, isStandalone: true, selector: "[hlmSidebarHeader],hlm-sidebar-header", host: { attributes: { "data-slot": "sidebar-header", "data-sidebar": "header" } }, ngImport: i0 });
433
+ }
434
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarHeader, decorators: [{
435
+ type: Directive,
436
+ args: [{
437
+ selector: '[hlmSidebarHeader],hlm-sidebar-header',
438
+ host: {
439
+ 'data-slot': 'sidebar-header',
440
+ 'data-sidebar': 'header',
441
+ },
442
+ }]
443
+ }], ctorParameters: () => [] });
444
+
445
+ class HlmSidebarInput {
446
+ constructor() {
447
+ classes(() => 'bg-background h-8 w-full shadow-none');
448
+ }
449
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });
450
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmSidebarInput, isStandalone: true, selector: "input[hlmSidebarInput]", host: { attributes: { "data-slot": "sidebar-input", "data-sidebar": "input" } }, hostDirectives: [{ directive: i1$1.HlmInput }], ngImport: i0 });
451
+ }
452
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarInput, decorators: [{
453
+ type: Directive,
454
+ args: [{
455
+ selector: 'input[hlmSidebarInput]',
456
+ hostDirectives: [HlmInput],
457
+ host: {
458
+ 'data-slot': 'sidebar-input',
459
+ 'data-sidebar': 'input',
460
+ },
461
+ }]
462
+ }], ctorParameters: () => [] });
463
+
464
+ class HlmSidebarInset {
465
+ constructor() {
466
+ classes(() => 'bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ms-2 relative flex w-full flex-1 flex-col');
467
+ }
468
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarInset, deps: [], target: i0.ɵɵFactoryTarget.Directive });
469
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmSidebarInset, isStandalone: true, selector: "main[hlmSidebarInset]", host: { attributes: { "data-slot": "sidebar-inset" } }, ngImport: i0 });
470
+ }
471
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarInset, decorators: [{
472
+ type: Directive,
473
+ args: [{
474
+ selector: 'main[hlmSidebarInset]',
475
+ host: { 'data-slot': 'sidebar-inset' },
476
+ }]
477
+ }], ctorParameters: () => [] });
478
+
479
+ class HlmSidebarMenu {
480
+ constructor() {
481
+ classes(() => 'gap-1 flex w-full min-w-0 flex-col');
482
+ }
483
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarMenu, deps: [], target: i0.ɵɵFactoryTarget.Directive });
484
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmSidebarMenu, isStandalone: true, selector: "ul[hlmSidebarMenu]", host: { attributes: { "data-slot": "sidebar-menu", "data-sidebar": "menu" } }, ngImport: i0 });
485
+ }
486
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarMenu, decorators: [{
487
+ type: Directive,
488
+ args: [{
489
+ selector: 'ul[hlmSidebarMenu]',
490
+ host: {
491
+ 'data-slot': 'sidebar-menu',
492
+ 'data-sidebar': 'menu',
493
+ },
494
+ }]
495
+ }], ctorParameters: () => [] });
496
+
497
+ class HlmSidebarMenuAction {
498
+ showOnHover = input(false, { ...(ngDevMode ? { debugName: "showOnHover" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
499
+ constructor() {
500
+ classes(() => [
501
+ 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute end-1 top-1.5 aspect-square w-5 rounded-md p-0 peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 focus-visible:ring-2 [&>ng-icon]:text-[length:--spacing(4)] flex items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>ng-icon]:shrink-0',
502
+ this.showOnHover() &&
503
+ 'peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 aria-expanded:opacity-100 md:opacity-0',
504
+ ]);
505
+ }
506
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarMenuAction, deps: [], target: i0.ɵɵFactoryTarget.Directive });
507
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: HlmSidebarMenuAction, isStandalone: true, selector: "button[hlmSidebarMenuAction]", inputs: { showOnHover: { classPropertyName: "showOnHover", publicName: "showOnHover", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "sidebar-menu-action", "data-sidebar": "menu-action" } }, ngImport: i0 });
508
+ }
509
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarMenuAction, decorators: [{
510
+ type: Directive,
511
+ args: [{
512
+ selector: 'button[hlmSidebarMenuAction]',
513
+ host: {
514
+ 'data-slot': 'sidebar-menu-action',
515
+ 'data-sidebar': 'menu-action',
516
+ },
517
+ }]
518
+ }], ctorParameters: () => [], propDecorators: { showOnHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "showOnHover", required: false }] }] } });
519
+
520
+ class HlmSidebarMenuBadge {
521
+ constructor() {
522
+ classes(() => 'text-sidebar-foreground peer-hover/menu-button:text-sidebar-accent-foreground peer-data-active/menu-button:text-sidebar-accent-foreground pointer-events-none absolute end-1 h-5 min-w-5 rounded-md px-1 text-xs font-medium peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 flex items-center justify-center tabular-nums select-none group-data-[collapsible=icon]:hidden');
523
+ }
524
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarMenuBadge, deps: [], target: i0.ɵɵFactoryTarget.Directive });
525
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmSidebarMenuBadge, isStandalone: true, selector: "[hlmSidebarMenuBadge],hlm-sidebar-menu-badge", host: { attributes: { "data-slot": "sidebar-menu-badge", "data-sidebar": "menu-badge" } }, ngImport: i0 });
526
+ }
527
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarMenuBadge, decorators: [{
528
+ type: Directive,
529
+ args: [{
530
+ selector: '[hlmSidebarMenuBadge],hlm-sidebar-menu-badge',
531
+ host: {
532
+ 'data-slot': 'sidebar-menu-badge',
533
+ 'data-sidebar': 'menu-badge',
534
+ },
535
+ }]
536
+ }], ctorParameters: () => [] });
537
+
538
+ const sidebarMenuButtonVariants = cva('ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-start text-sm transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pe-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button group/menu-button flex w-full items-center overflow-hidden outline-hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_ng-icon]:shrink-0 [&_ng-icon]:text-[length:--spacing(4)] [&>span:last-child]:truncate', {
539
+ variants: {
540
+ variant: {
541
+ default: 'hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
542
+ outline: 'bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_var(--sidebar-border)] hover:shadow-[0_0_0_1px_var(--sidebar-accent)]',
543
+ },
544
+ size: {
545
+ default: 'h-8 text-sm',
546
+ sm: 'h-7 text-xs',
547
+ lg: 'h-12 text-sm group-data-[collapsible=icon]:p-0!',
548
+ },
549
+ },
550
+ defaultVariants: {
551
+ variant: 'default',
552
+ size: 'default',
553
+ },
554
+ });
555
+ class HlmSidebarMenuButton {
556
+ _config = injectHlmSidebarConfig();
557
+ _sidebarService = inject(HlmSidebarService);
558
+ _brnTooltip = inject(BrnTooltip);
559
+ variant = input('default', /* @ts-ignore */
560
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
561
+ size = input('default', /* @ts-ignore */
562
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
563
+ isActive = input(false, { ...(ngDevMode ? { debugName: "isActive" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
564
+ closeMobileSidebarOnClick = input(this._config.closeMobileSidebarOnMenuButtonClick, { ...(ngDevMode ? { debugName: "closeMobileSidebarOnClick" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
565
+ _isTooltipHidden = computed(() => this._sidebarService.state() !== 'collapsed' || this._sidebarService.isMobile(), /* @ts-ignore */
566
+ ...(ngDevMode ? [{ debugName: "_isTooltipHidden" }] : /* istanbul ignore next */ []));
567
+ constructor() {
568
+ classes(() => sidebarMenuButtonVariants({ variant: this.variant(), size: this.size() }));
569
+ effect(() => this._brnTooltip.mutableTooltipDisabled.set(this._isTooltipHidden()));
570
+ }
571
+ onClick() {
572
+ if (this.closeMobileSidebarOnClick()) {
573
+ this._sidebarService.setOpenMobile(false);
574
+ }
575
+ }
576
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarMenuButton, deps: [], target: i0.ɵɵFactoryTarget.Directive });
577
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: HlmSidebarMenuButton, isStandalone: true, selector: "button[hlmSidebarMenuButton], a[hlmSidebarMenuButton]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, isActive: { classPropertyName: "isActive", publicName: "isActive", isSignal: true, isRequired: false, transformFunction: null }, closeMobileSidebarOnClick: { classPropertyName: "closeMobileSidebarOnClick", publicName: "closeMobileSidebarOnClick", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "sidebar-menu-button", "data-sidebar": "menu-button" }, listeners: { "click": "onClick()" }, properties: { "attr.data-size": "size()", "attr.data-active": "isActive()" } }, providers: [
578
+ provideBrnTooltipDefaultOptions({
579
+ showDelay: 150,
580
+ hideDelay: 0,
581
+ tooltipContentClasses: DEFAULT_TOOLTIP_CONTENT_CLASSES,
582
+ svgClasses: DEFAULT_TOOLTIP_SVG_CLASS,
583
+ arrowClasses: (position) => hlm(tooltipPositionVariants({ position })),
584
+ position: 'right',
585
+ }),
586
+ ], hostDirectives: [{ directive: i1$2.BrnTooltip, inputs: ["brnTooltip", "tooltip"] }], ngImport: i0 });
587
+ }
588
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarMenuButton, decorators: [{
589
+ type: Directive,
590
+ args: [{
591
+ selector: 'button[hlmSidebarMenuButton], a[hlmSidebarMenuButton]',
592
+ providers: [
593
+ provideBrnTooltipDefaultOptions({
594
+ showDelay: 150,
595
+ hideDelay: 0,
596
+ tooltipContentClasses: DEFAULT_TOOLTIP_CONTENT_CLASSES,
597
+ svgClasses: DEFAULT_TOOLTIP_SVG_CLASS,
598
+ arrowClasses: (position) => hlm(tooltipPositionVariants({ position })),
599
+ position: 'right',
600
+ }),
601
+ ],
602
+ hostDirectives: [
603
+ {
604
+ directive: BrnTooltip,
605
+ inputs: ['brnTooltip: tooltip'],
606
+ },
607
+ ],
608
+ host: {
609
+ 'data-slot': 'sidebar-menu-button',
610
+ 'data-sidebar': 'menu-button',
611
+ '[attr.data-size]': 'size()',
612
+ '[attr.data-active]': 'isActive()',
613
+ '(click)': 'onClick()',
614
+ },
615
+ }]
616
+ }], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], isActive: [{ type: i0.Input, args: [{ isSignal: true, alias: "isActive", required: false }] }], closeMobileSidebarOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeMobileSidebarOnClick", required: false }] }] } });
617
+
618
+ class HlmSidebarMenuItem {
619
+ constructor() {
620
+ classes(() => 'group/menu-item relative');
621
+ }
622
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarMenuItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
623
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmSidebarMenuItem, isStandalone: true, selector: "li[hlmSidebarMenuItem]", host: { attributes: { "data-slot": "sidebar-menu-item", "data-sidebar": "menu-item" } }, ngImport: i0 });
624
+ }
625
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarMenuItem, decorators: [{
626
+ type: Directive,
627
+ args: [{
628
+ selector: 'li[hlmSidebarMenuItem]',
629
+ host: {
630
+ 'data-slot': 'sidebar-menu-item',
631
+ 'data-sidebar': 'menu-item',
632
+ },
633
+ }]
634
+ }], ctorParameters: () => [] });
635
+
636
+ class HlmSidebarMenuSkeleton {
637
+ showIcon = input(false, { ...(ngDevMode ? { debugName: "showIcon" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
638
+ _width = `${Math.floor(Math.random() * 40) + 50}%`;
639
+ constructor() {
640
+ classes(() => 'h-8 gap-2 rounded-md px-2 flex items-center');
641
+ }
642
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarMenuSkeleton, deps: [], target: i0.ɵɵFactoryTarget.Component });
643
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: HlmSidebarMenuSkeleton, isStandalone: true, selector: "hlm-sidebar-menu-skeleton,div[hlmSidebarMenuSkeleton]", inputs: { showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "sidebar-menu-skeleton", "data-sidebar": "menu-skeleton" } }, ngImport: i0, template: `
644
+ @if (showIcon()) {
645
+ <hlm-skeleton data-sidebar="menu-skeleton-icon" class="size-4 rounded-md" />
646
+ } @else {
647
+ <hlm-skeleton
648
+ data-sidebar="menu-skeleton-text"
649
+ class="h-4 max-w-(--skeleton-width) flex-1"
650
+ [style.--skeleton-width]="_width"
651
+ />
652
+ }
653
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1$3.HlmSkeleton, selector: "[hlmSkeleton],hlm-skeleton" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
654
+ }
655
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarMenuSkeleton, decorators: [{
656
+ type: Component,
657
+ args: [{
658
+ selector: 'hlm-sidebar-menu-skeleton,div[hlmSidebarMenuSkeleton]',
659
+ imports: [HlmSkeletonImports],
660
+ changeDetection: ChangeDetectionStrategy.OnPush,
661
+ host: {
662
+ 'data-slot': 'sidebar-menu-skeleton',
663
+ 'data-sidebar': 'menu-skeleton',
664
+ },
665
+ template: `
666
+ @if (showIcon()) {
667
+ <hlm-skeleton data-sidebar="menu-skeleton-icon" class="size-4 rounded-md" />
668
+ } @else {
669
+ <hlm-skeleton
670
+ data-sidebar="menu-skeleton-text"
671
+ class="h-4 max-w-(--skeleton-width) flex-1"
672
+ [style.--skeleton-width]="_width"
673
+ />
674
+ }
675
+ `,
676
+ }]
677
+ }], ctorParameters: () => [], propDecorators: { showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }] } });
678
+
679
+ class HlmSidebarMenuSub {
680
+ constructor() {
681
+ classes(() => 'border-sidebar-border mx-3.5 translate-x-px gap-1 border-s px-2.5 py-0.5 group-data-[collapsible=icon]:hidden rtl:-translate-x-px flex min-w-0 flex-col');
682
+ }
683
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarMenuSub, deps: [], target: i0.ɵɵFactoryTarget.Directive });
684
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmSidebarMenuSub, isStandalone: true, selector: "ul[hlmSidebarMenuSub]", host: { attributes: { "data-slot": "sidebar-menu-sub", "data-sidebar": "menu-sub" } }, ngImport: i0 });
685
+ }
686
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarMenuSub, decorators: [{
687
+ type: Directive,
688
+ args: [{
689
+ selector: 'ul[hlmSidebarMenuSub]',
690
+ host: {
691
+ 'data-slot': 'sidebar-menu-sub',
692
+ 'data-sidebar': 'menu-sub',
693
+ },
694
+ }]
695
+ }], ctorParameters: () => [] });
696
+
697
+ class HlmSidebarMenuSubButton {
698
+ _sidebarService = inject(HlmSidebarService);
699
+ _config = injectHlmSidebarConfig();
700
+ closeMobileSidebarOnClick = input(this._config.closeMobileSidebarOnMenuButtonClick, { ...(ngDevMode ? { debugName: "closeMobileSidebarOnClick" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
701
+ size = input('md', /* @ts-ignore */
702
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
703
+ isActive = input(false, { ...(ngDevMode ? { debugName: "isActive" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
704
+ constructor() {
705
+ classes(() => 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground h-7 gap-2 rounded-md px-2 focus-visible:ring-2 data-[size=md]:text-sm data-[size=sm]:text-xs [&>ng-icon]:text-[length:--spacing(4)] flex min-w-0 -translate-x-px items-center overflow-hidden outline-hidden group-data-[collapsible=icon]:hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>ng-icon]:shrink-0 [&>span:last-child]:truncate');
706
+ }
707
+ onClick() {
708
+ if (this.closeMobileSidebarOnClick()) {
709
+ this._sidebarService.setOpenMobile(false);
710
+ }
711
+ }
712
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarMenuSubButton, deps: [], target: i0.ɵɵFactoryTarget.Directive });
713
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: HlmSidebarMenuSubButton, isStandalone: true, selector: "a[hlmSidebarMenuSubButton], button[hlmSidebarMenuSubButton]", inputs: { closeMobileSidebarOnClick: { classPropertyName: "closeMobileSidebarOnClick", publicName: "closeMobileSidebarOnClick", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, isActive: { classPropertyName: "isActive", publicName: "isActive", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "sidebar-menu-sub-button", "data-sidebar": "menu-sub-button" }, listeners: { "click": "onClick()" }, properties: { "attr.data-active": "isActive()", "attr.data-size": "size()" } }, ngImport: i0 });
714
+ }
715
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarMenuSubButton, decorators: [{
716
+ type: Directive,
717
+ args: [{
718
+ selector: 'a[hlmSidebarMenuSubButton], button[hlmSidebarMenuSubButton]',
719
+ host: {
720
+ 'data-slot': 'sidebar-menu-sub-button',
721
+ 'data-sidebar': 'menu-sub-button',
722
+ '[attr.data-active]': 'isActive()',
723
+ '[attr.data-size]': 'size()',
724
+ '(click)': 'onClick()',
725
+ },
726
+ }]
727
+ }], ctorParameters: () => [], propDecorators: { closeMobileSidebarOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeMobileSidebarOnClick", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], isActive: [{ type: i0.Input, args: [{ isSignal: true, alias: "isActive", required: false }] }] } });
728
+
729
+ class HlmSidebarMenuSubItem {
730
+ constructor() {
731
+ classes(() => 'group/menu-sub-item relative');
732
+ }
733
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarMenuSubItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
734
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmSidebarMenuSubItem, isStandalone: true, selector: "li[hlmSidebarMenuSubItem]", host: { attributes: { "data-slot": "sidebar-menu-sub-item", "data-sidebar": "menu-sub-item" } }, ngImport: i0 });
735
+ }
736
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarMenuSubItem, decorators: [{
737
+ type: Directive,
738
+ args: [{
739
+ selector: 'li[hlmSidebarMenuSubItem]',
740
+ host: {
741
+ 'data-slot': 'sidebar-menu-sub-item',
742
+ 'data-sidebar': 'menu-sub-item',
743
+ },
744
+ }]
745
+ }], ctorParameters: () => [] });
746
+
747
+ class HlmSidebarRail {
748
+ _sidebarService = inject(HlmSidebarService);
749
+ ariaLabel = input('Toggle Sidebar', { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
750
+ constructor() {
751
+ classes(() => [
752
+ 'hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2',
753
+ 'in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize',
754
+ '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize',
755
+ 'hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full',
756
+ '[[data-side=left][data-collapsible=offcanvas]_&]:-right-2',
757
+ '[[data-side=right][data-collapsible=offcanvas]_&]:-left-2',
758
+ ]);
759
+ }
760
+ onClick() {
761
+ this._sidebarService.toggleSidebar();
762
+ }
763
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarRail, deps: [], target: i0.ɵɵFactoryTarget.Directive });
764
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: HlmSidebarRail, isStandalone: true, selector: "button[hlmSidebarRail]", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-sidebar": "rail", "data-slot": "sidebar-rail", "tabindex": "-1" }, listeners: { "click": "onClick()" }, properties: { "attr.aria-label": "ariaLabel()" } }, ngImport: i0 });
765
+ }
766
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarRail, decorators: [{
767
+ type: Directive,
768
+ args: [{
769
+ selector: 'button[hlmSidebarRail]',
770
+ host: {
771
+ 'data-sidebar': 'rail',
772
+ 'data-slot': 'sidebar-rail',
773
+ '[attr.aria-label]': 'ariaLabel()',
774
+ tabindex: '-1',
775
+ '(click)': 'onClick()',
776
+ },
777
+ }]
778
+ }], ctorParameters: () => [], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }] } });
779
+
780
+ class HlmSidebarSeparator {
781
+ constructor() {
782
+ classes(() => 'bg-sidebar-border mx-2 w-auto');
783
+ }
784
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarSeparator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
785
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmSidebarSeparator, isStandalone: true, selector: "[hlmSidebarSeparator],hlm-sidebar-separator", host: { attributes: { "data-slot": "sidebar-separator", "data-sidebar": "separator" } }, hostDirectives: [{ directive: i1$4.HlmSeparator }], ngImport: i0 });
786
+ }
787
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarSeparator, decorators: [{
788
+ type: Directive,
789
+ args: [{
790
+ selector: '[hlmSidebarSeparator],hlm-sidebar-separator',
791
+ hostDirectives: [HlmSeparator],
792
+ host: {
793
+ 'data-slot': 'sidebar-separator',
794
+ 'data-sidebar': 'separator',
795
+ },
796
+ }]
797
+ }], ctorParameters: () => [] });
798
+
799
+ class HlmSidebarTrigger {
800
+ _sidebarService = inject(HlmSidebarService);
801
+ srOnlyText = input('Toggle Sidebar', /* @ts-ignore */
802
+ ...(ngDevMode ? [{ debugName: "srOnlyText" }] : /* istanbul ignore next */ []));
803
+ _onClick() {
804
+ this._sidebarService.toggleSidebar();
805
+ }
806
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarTrigger, deps: [], target: i0.ɵɵFactoryTarget.Component });
807
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.7", type: HlmSidebarTrigger, isStandalone: true, selector: "button[hlmSidebarTrigger]", inputs: { srOnlyText: { classPropertyName: "srOnlyText", publicName: "srOnlyText", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "sidebar-trigger", "data-sidebar": "trigger" }, listeners: { "click": "_onClick()" } }, providers: [provideIcons({ lucidePanelLeft }), provideBrnButtonConfig({ variant: 'ghost', size: 'icon-sm' })], hostDirectives: [{ directive: i1$5.HlmBtn, inputs: ["variant", "variant", "size", "size"] }], ngImport: i0, template: `
808
+ <ng-icon name="lucidePanelLeft" />
809
+ <span class="sr-only">{{ srOnlyText() }}</span>
810
+ `, isInline: true, dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
811
+ }
812
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarTrigger, decorators: [{
813
+ type: Component,
814
+ args: [{
815
+ // eslint-disable-next-line @angular-eslint/component-selector
816
+ selector: 'button[hlmSidebarTrigger]',
817
+ imports: [NgIcon],
818
+ providers: [provideIcons({ lucidePanelLeft }), provideBrnButtonConfig({ variant: 'ghost', size: 'icon-sm' })],
819
+ changeDetection: ChangeDetectionStrategy.OnPush,
820
+ hostDirectives: [{ directive: HlmBtn, inputs: ['variant', 'size'] }],
821
+ host: {
822
+ 'data-slot': 'sidebar-trigger',
823
+ 'data-sidebar': 'trigger',
824
+ '(click)': '_onClick()',
825
+ },
826
+ template: `
827
+ <ng-icon name="lucidePanelLeft" />
828
+ <span class="sr-only">{{ srOnlyText() }}</span>
829
+ `,
830
+ }]
831
+ }], propDecorators: { srOnlyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "srOnlyText", required: false }] }] } });
832
+
833
+ class HlmSidebarWrapper {
834
+ _config = injectHlmSidebarConfig();
835
+ sidebarWidth = input(this._config.sidebarWidth, /* @ts-ignore */
836
+ ...(ngDevMode ? [{ debugName: "sidebarWidth" }] : /* istanbul ignore next */ []));
837
+ sidebarWidthIcon = input(this._config.sidebarWidthIcon, /* @ts-ignore */
838
+ ...(ngDevMode ? [{ debugName: "sidebarWidthIcon" }] : /* istanbul ignore next */ []));
839
+ constructor() {
840
+ classes(() => 'group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full');
841
+ }
842
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarWrapper, deps: [], target: i0.ɵɵFactoryTarget.Directive });
843
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: HlmSidebarWrapper, isStandalone: true, selector: "[hlmSidebarWrapper],hlm-sidebar-wrapper", inputs: { sidebarWidth: { classPropertyName: "sidebarWidth", publicName: "sidebarWidth", isSignal: true, isRequired: false, transformFunction: null }, sidebarWidthIcon: { classPropertyName: "sidebarWidthIcon", publicName: "sidebarWidthIcon", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "sidebar-wrapper" }, properties: { "style.--sidebar-width": "sidebarWidth()", "style.--sidebar-width-icon": "sidebarWidthIcon()" } }, ngImport: i0 });
844
+ }
845
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarWrapper, decorators: [{
846
+ type: Directive,
847
+ args: [{
848
+ selector: '[hlmSidebarWrapper],hlm-sidebar-wrapper',
849
+ host: {
850
+ 'data-slot': 'sidebar-wrapper',
851
+ '[style.--sidebar-width]': 'sidebarWidth()',
852
+ '[style.--sidebar-width-icon]': 'sidebarWidthIcon()',
853
+ },
854
+ }]
855
+ }], ctorParameters: () => [], propDecorators: { sidebarWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidebarWidth", required: false }] }], sidebarWidthIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidebarWidthIcon", required: false }] }] } });
856
+
857
+ /*
858
+ * Public API Surface of sidebar
859
+ */
860
+ const HlmSidebarImports = [
861
+ HlmSidebar,
862
+ HlmSidebarContent,
863
+ HlmSidebarFooter,
864
+ HlmSidebarGroup,
865
+ HlmSidebarGroupAction,
866
+ HlmSidebarGroupContent,
867
+ HlmSidebarGroupLabel,
868
+ HlmSidebarHeader,
869
+ HlmSidebarInput,
870
+ HlmSidebarInset,
871
+ HlmSidebarMenu,
872
+ HlmSidebarMenuSkeleton,
873
+ HlmSidebarMenuAction,
874
+ HlmSidebarMenuBadge,
875
+ HlmSidebarMenuButton,
876
+ HlmSidebarMenuItem,
877
+ HlmSidebarMenuSub,
878
+ HlmSidebarMenuSubButton,
879
+ HlmSidebarRail,
880
+ HlmSidebarSeparator,
881
+ HlmSidebarTrigger,
882
+ HlmSidebarWrapper,
883
+ HlmSidebarMenuSubItem,
884
+ ];
885
+ class HlmSidebarModule {
886
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
887
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarModule, imports: [HlmSidebar,
888
+ HlmSidebarContent,
889
+ HlmSidebarFooter,
890
+ HlmSidebarGroup,
891
+ HlmSidebarGroupAction,
892
+ HlmSidebarGroupContent,
893
+ HlmSidebarGroupLabel,
894
+ HlmSidebarHeader,
895
+ HlmSidebarInput,
896
+ HlmSidebarInset,
897
+ HlmSidebarMenu,
898
+ HlmSidebarMenuSkeleton,
899
+ HlmSidebarMenuAction,
900
+ HlmSidebarMenuBadge,
901
+ HlmSidebarMenuButton,
902
+ HlmSidebarMenuItem,
903
+ HlmSidebarMenuSub,
904
+ HlmSidebarMenuSubButton,
905
+ HlmSidebarRail,
906
+ HlmSidebarSeparator,
907
+ HlmSidebarTrigger,
908
+ HlmSidebarWrapper,
909
+ HlmSidebarMenuSubItem], exports: [HlmSidebar,
910
+ HlmSidebarContent,
911
+ HlmSidebarFooter,
912
+ HlmSidebarGroup,
913
+ HlmSidebarGroupAction,
914
+ HlmSidebarGroupContent,
915
+ HlmSidebarGroupLabel,
916
+ HlmSidebarHeader,
917
+ HlmSidebarInput,
918
+ HlmSidebarInset,
919
+ HlmSidebarMenu,
920
+ HlmSidebarMenuSkeleton,
921
+ HlmSidebarMenuAction,
922
+ HlmSidebarMenuBadge,
923
+ HlmSidebarMenuButton,
924
+ HlmSidebarMenuItem,
925
+ HlmSidebarMenuSub,
926
+ HlmSidebarMenuSubButton,
927
+ HlmSidebarRail,
928
+ HlmSidebarSeparator,
929
+ HlmSidebarTrigger,
930
+ HlmSidebarWrapper,
931
+ HlmSidebarMenuSubItem] });
932
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarModule, imports: [HlmSidebar,
933
+ HlmSidebarTrigger] });
934
+ }
935
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSidebarModule, decorators: [{
936
+ type: NgModule,
937
+ args: [{
938
+ imports: [...HlmSidebarImports],
939
+ exports: [...HlmSidebarImports],
940
+ }]
941
+ }] });
942
+
943
+ /**
944
+ * Generated bundle index. Do not edit.
945
+ */
946
+
947
+ export { HlmSidebar, HlmSidebarContent, HlmSidebarFooter, HlmSidebarGroup, HlmSidebarGroupAction, HlmSidebarGroupContent, HlmSidebarGroupLabel, HlmSidebarHeader, HlmSidebarImports, HlmSidebarInput, HlmSidebarInset, HlmSidebarMenu, HlmSidebarMenuAction, HlmSidebarMenuBadge, HlmSidebarMenuButton, HlmSidebarMenuItem, HlmSidebarMenuSkeleton, HlmSidebarMenuSub, HlmSidebarMenuSubButton, HlmSidebarMenuSubItem, HlmSidebarModule, HlmSidebarRail, HlmSidebarSeparator, HlmSidebarService, HlmSidebarTrigger, HlmSidebarWrapper, injectHlmSidebarConfig, provideHlmSidebarConfig };
948
+ //# sourceMappingURL=sidebar.mjs.map