@egose/shadcn-theme-ng 0.0.26 → 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 (333) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +107 -2
  3. package/accordion/fesm2022/accordion.mjs +42 -37
  4. package/accordion/fesm2022/accordion.mjs.map +1 -1
  5. package/accordion/package.json +25 -0
  6. package/accordion/{index.d.ts → types/accordion.d.ts} +1 -1
  7. package/alert/fesm2022/alert.mjs +32 -27
  8. package/alert/fesm2022/alert.mjs.map +1 -1
  9. package/alert/package.json +25 -0
  10. package/alert-dialog/README.md +11 -0
  11. package/alert-dialog/fesm2022/alert-dialog.mjs +287 -0
  12. package/alert-dialog/fesm2022/alert-dialog.mjs.map +1 -0
  13. package/alert-dialog/package.json +25 -0
  14. package/alert-dialog/types/alert-dialog.d.ts +90 -0
  15. package/aspect-ratio/README.md +11 -0
  16. package/aspect-ratio/fesm2022/aspect-ratio.mjs +62 -0
  17. package/aspect-ratio/fesm2022/aspect-ratio.mjs.map +1 -0
  18. package/aspect-ratio/package.json +25 -0
  19. package/aspect-ratio/types/aspect-ratio.d.ts +21 -0
  20. package/autocomplete/fesm2022/autocomplete.mjs +323 -457
  21. package/autocomplete/fesm2022/autocomplete.mjs.map +1 -1
  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 +16 -10
  30. package/badge/fesm2022/badge.mjs.map +1 -1
  31. package/badge/package.json +25 -0
  32. package/basic-alert/fesm2022/basic-alert.mjs +12 -8
  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 +100 -26
  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/fesm2022/checkbox.mjs +25 -20
  64. package/checkbox/fesm2022/checkbox.mjs.map +1 -1
  65. package/checkbox/package.json +24 -0
  66. package/collapsible/README.md +11 -0
  67. package/collapsible/fesm2022/collapsible.mjs +77 -0
  68. package/collapsible/fesm2022/collapsible.mjs.map +1 -0
  69. package/collapsible/package.json +25 -0
  70. package/collapsible/types/collapsible.d.ts +27 -0
  71. package/combobox/README.md +11 -0
  72. package/combobox/fesm2022/combobox.mjs +683 -0
  73. package/combobox/fesm2022/combobox.mjs.map +1 -0
  74. package/combobox/package.json +25 -0
  75. package/combobox/types/combobox.d.ts +151 -0
  76. package/command/README.md +11 -0
  77. package/command/fesm2022/command.mjs +361 -0
  78. package/command/fesm2022/command.mjs.map +1 -0
  79. package/command/package.json +25 -0
  80. package/command/types/command.d.ts +89 -0
  81. package/confirmation-dialog/fesm2022/confirmation-dialog.mjs +19 -8
  82. package/confirmation-dialog/fesm2022/confirmation-dialog.mjs.map +1 -1
  83. package/confirmation-dialog/package.json +24 -0
  84. package/context-menu/README.md +11 -0
  85. package/context-menu/fesm2022/context-menu.mjs +89 -0
  86. package/context-menu/fesm2022/context-menu.mjs.map +1 -0
  87. package/context-menu/package.json +25 -0
  88. package/context-menu/types/context-menu.d.ts +34 -0
  89. package/date-picker/fesm2022/date-picker.mjs +1262 -307
  90. package/date-picker/fesm2022/date-picker.mjs.map +1 -1
  91. package/date-picker/package.json +24 -0
  92. package/date-picker/types/date-picker.d.ts +551 -0
  93. package/dialog/fesm2022/dialog.mjs +137 -108
  94. package/dialog/fesm2022/dialog.mjs.map +1 -1
  95. package/dialog/package.json +24 -0
  96. package/dialog/types/dialog.d.ts +95 -0
  97. package/drawer/README.md +11 -0
  98. package/drawer/fesm2022/drawer.mjs +271 -0
  99. package/drawer/fesm2022/drawer.mjs.map +1 -0
  100. package/drawer/package.json +25 -0
  101. package/drawer/types/drawer.d.ts +76 -0
  102. package/dropdown-menu/README.md +11 -0
  103. package/dropdown-menu/fesm2022/dropdown-menu.mjs +542 -0
  104. package/dropdown-menu/fesm2022/dropdown-menu.mjs.map +1 -0
  105. package/dropdown-menu/package.json +25 -0
  106. package/dropdown-menu/types/dropdown-menu.d.ts +176 -0
  107. package/empty/README.md +11 -0
  108. package/empty/fesm2022/empty.mjs +151 -0
  109. package/empty/fesm2022/empty.mjs.map +1 -0
  110. package/empty/package.json +25 -0
  111. package/empty/types/empty.d.ts +54 -0
  112. package/field/README.md +11 -0
  113. package/field/fesm2022/field.mjs +367 -0
  114. package/field/fesm2022/field.mjs.map +1 -0
  115. package/field/package.json +25 -0
  116. package/field/types/field.d.ts +107 -0
  117. package/form-checkbox/fesm2022/form-checkbox.mjs +39 -22
  118. package/form-checkbox/fesm2022/form-checkbox.mjs.map +1 -1
  119. package/form-checkbox/package.json +24 -0
  120. package/form-date-picker/fesm2022/form-date-picker.mjs +58 -51
  121. package/form-date-picker/fesm2022/form-date-picker.mjs.map +1 -1
  122. package/form-date-picker/package.json +24 -0
  123. package/form-field/fesm2022/form-field.mjs +39 -27
  124. package/form-field/fesm2022/form-field.mjs.map +1 -1
  125. package/form-field/package.json +25 -0
  126. package/form-field/{index.d.ts → types/form-field.d.ts} +4 -3
  127. package/form-field-simple/fesm2022/form-field-simple.mjs +15 -10
  128. package/form-field-simple/fesm2022/form-field-simple.mjs.map +1 -1
  129. package/form-field-simple/package.json +24 -0
  130. package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +44 -25
  131. package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs.map +1 -1
  132. package/form-searchable-multiselect/package.json +24 -0
  133. package/form-select/fesm2022/form-select.mjs +132 -71
  134. package/form-select/fesm2022/form-select.mjs.map +1 -1
  135. package/form-select/package.json +24 -0
  136. package/form-text-input/fesm2022/form-text-input.mjs +68 -39
  137. package/form-text-input/fesm2022/form-text-input.mjs.map +1 -1
  138. package/form-text-input/package.json +24 -0
  139. package/form-textarea/fesm2022/form-textarea.mjs +54 -30
  140. package/form-textarea/fesm2022/form-textarea.mjs.map +1 -1
  141. package/form-textarea/package.json +24 -0
  142. package/hover-card/README.md +11 -0
  143. package/hover-card/fesm2022/hover-card.mjs +123 -0
  144. package/hover-card/fesm2022/hover-card.mjs.map +1 -0
  145. package/hover-card/package.json +25 -0
  146. package/hover-card/types/hover-card.d.ts +36 -0
  147. package/icon/fesm2022/icon.mjs +12 -10
  148. package/icon/fesm2022/icon.mjs.map +1 -1
  149. package/icon/package.json +25 -0
  150. package/input/fesm2022/input.mjs +20 -70
  151. package/input/fesm2022/input.mjs.map +1 -1
  152. package/input/package.json +25 -0
  153. package/input/types/input.d.ts +18 -0
  154. package/input-group/README.md +11 -0
  155. package/input-group/fesm2022/input-group.mjs +199 -0
  156. package/input-group/fesm2022/input-group.mjs.map +1 -0
  157. package/input-group/package.json +25 -0
  158. package/input-group/types/input-group.d.ts +52 -0
  159. package/input-otp/README.md +11 -0
  160. package/input-otp/fesm2022/input-otp.mjs +141 -0
  161. package/input-otp/fesm2022/input-otp.mjs.map +1 -0
  162. package/input-otp/package.json +25 -0
  163. package/input-otp/types/input-otp.d.ts +43 -0
  164. package/item/README.md +11 -0
  165. package/item/fesm2022/item.mjs +278 -0
  166. package/item/fesm2022/item.mjs.map +1 -0
  167. package/item/package.json +25 -0
  168. package/item/types/item.d.ts +101 -0
  169. package/kbd/README.md +11 -0
  170. package/kbd/fesm2022/kbd.mjs +61 -0
  171. package/kbd/fesm2022/kbd.mjs.map +1 -0
  172. package/kbd/package.json +25 -0
  173. package/kbd/types/kbd.d.ts +22 -0
  174. package/label/fesm2022/label.mjs +11 -10
  175. package/label/fesm2022/label.mjs.map +1 -1
  176. package/label/package.json +25 -0
  177. package/layout-simple/fesm2022/layout-simple.mjs +438 -325
  178. package/layout-simple/fesm2022/layout-simple.mjs.map +1 -1
  179. package/layout-simple/package.json +24 -0
  180. package/layout-simple/{index.d.ts → types/layout-simple.d.ts} +28 -17
  181. package/menubar/README.md +11 -0
  182. package/menubar/fesm2022/menubar.mjs +108 -0
  183. package/menubar/fesm2022/menubar.mjs.map +1 -0
  184. package/menubar/package.json +25 -0
  185. package/menubar/types/menubar.d.ts +40 -0
  186. package/native-select/README.md +11 -0
  187. package/native-select/fesm2022/native-select.mjs +207 -0
  188. package/native-select/fesm2022/native-select.mjs.map +1 -0
  189. package/native-select/package.json +25 -0
  190. package/native-select/types/native-select.d.ts +70 -0
  191. package/navigation-menu/README.md +11 -0
  192. package/navigation-menu/fesm2022/navigation-menu.mjs +206 -0
  193. package/navigation-menu/fesm2022/navigation-menu.mjs.map +1 -0
  194. package/navigation-menu/package.json +25 -0
  195. package/navigation-menu/types/navigation-menu.d.ts +54 -0
  196. package/package.json +223 -81
  197. package/pagination/README.md +11 -0
  198. package/pagination/fesm2022/pagination.mjs +808 -0
  199. package/pagination/fesm2022/pagination.mjs.map +1 -0
  200. package/pagination/package.json +25 -0
  201. package/pagination/types/pagination.d.ts +192 -0
  202. package/popover/fesm2022/popover.mjs +121 -27
  203. package/popover/fesm2022/popover.mjs.map +1 -1
  204. package/popover/package.json +24 -0
  205. package/popover/types/popover.d.ts +54 -0
  206. package/progress/README.md +11 -0
  207. package/progress/fesm2022/progress.mjs +77 -0
  208. package/progress/fesm2022/progress.mjs.map +1 -0
  209. package/progress/package.json +25 -0
  210. package/progress/types/progress.d.ts +27 -0
  211. package/radio-group/fesm2022/radio-group.mjs +96 -62
  212. package/radio-group/fesm2022/radio-group.mjs.map +1 -1
  213. package/radio-group/package.json +25 -0
  214. package/radio-group/{index.d.ts → types/radio-group.d.ts} +22 -14
  215. package/resizable/README.md +11 -0
  216. package/resizable/fesm2022/resizable.mjs +111 -0
  217. package/resizable/fesm2022/resizable.mjs.map +1 -0
  218. package/resizable/package.json +25 -0
  219. package/resizable/types/resizable.d.ts +32 -0
  220. package/scroll-area/README.md +11 -0
  221. package/scroll-area/fesm2022/scroll-area.mjs +51 -0
  222. package/scroll-area/fesm2022/scroll-area.mjs.map +1 -0
  223. package/scroll-area/package.json +25 -0
  224. package/scroll-area/types/scroll-area.d.ts +16 -0
  225. package/searchable-multiselect/fesm2022/searchable-multiselect.mjs +92 -88
  226. package/searchable-multiselect/fesm2022/searchable-multiselect.mjs.map +1 -1
  227. package/searchable-multiselect/package.json +24 -0
  228. package/searchable-multiselect/{index.d.ts → types/searchable-multiselect.d.ts} +13 -24
  229. package/select/fesm2022/select.mjs +371 -189
  230. package/select/fesm2022/select.mjs.map +1 -1
  231. package/select/package.json +25 -0
  232. package/select/types/select.d.ts +119 -0
  233. package/separator/fesm2022/separator.mjs +16 -14
  234. package/separator/fesm2022/separator.mjs.map +1 -1
  235. package/separator/package.json +24 -0
  236. package/separator/{index.d.ts → types/separator.d.ts} +4 -5
  237. package/sheet/fesm2022/sheet.mjs +57 -51
  238. package/sheet/fesm2022/sheet.mjs.map +1 -1
  239. package/sheet/package.json +24 -0
  240. package/sidebar/README.md +11 -0
  241. package/sidebar/fesm2022/sidebar.mjs +948 -0
  242. package/sidebar/fesm2022/sidebar.mjs.map +1 -0
  243. package/sidebar/package.json +25 -0
  244. package/sidebar/types/sidebar.d.ts +237 -0
  245. package/skeleton/README.md +11 -0
  246. package/skeleton/fesm2022/skeleton.mjs +44 -0
  247. package/skeleton/fesm2022/skeleton.mjs.map +1 -0
  248. package/skeleton/package.json +25 -0
  249. package/skeleton/types/skeleton.d.ts +16 -0
  250. package/slider/README.md +11 -0
  251. package/slider/fesm2022/slider.mjs +144 -0
  252. package/slider/fesm2022/slider.mjs.map +1 -0
  253. package/slider/package.json +25 -0
  254. package/slider/types/slider.d.ts +19 -0
  255. package/sonner/fesm2022/sonner.mjs +30 -35
  256. package/sonner/fesm2022/sonner.mjs.map +1 -1
  257. package/sonner/package.json +25 -0
  258. package/spinner/fesm2022/spinner.mjs +18 -14
  259. package/spinner/fesm2022/spinner.mjs.map +1 -1
  260. package/spinner/package.json +25 -0
  261. package/switch/fesm2022/switch.mjs +29 -26
  262. package/switch/fesm2022/switch.mjs.map +1 -1
  263. package/switch/package.json +25 -0
  264. package/table/README.md +11 -0
  265. package/table/fesm2022/table.mjs +211 -0
  266. package/table/fesm2022/table.mjs.map +1 -0
  267. package/table/package.json +25 -0
  268. package/table/types/table.d.ts +87 -0
  269. package/tabs/fesm2022/tabs.mjs +131 -103
  270. package/tabs/fesm2022/tabs.mjs.map +1 -1
  271. package/tabs/package.json +25 -0
  272. package/tabs/types/tabs.d.ts +71 -0
  273. package/textarea/README.md +11 -0
  274. package/textarea/fesm2022/textarea.mjs +47 -0
  275. package/textarea/fesm2022/textarea.mjs.map +1 -0
  276. package/textarea/package.json +25 -0
  277. package/textarea/types/textarea.d.ts +18 -0
  278. package/toggle/README.md +11 -0
  279. package/toggle/fesm2022/toggle.mjs +78 -0
  280. package/toggle/fesm2022/toggle.mjs.map +1 -0
  281. package/toggle/package.json +25 -0
  282. package/toggle/types/toggle.d.ts +27 -0
  283. package/toggle-group/README.md +11 -0
  284. package/toggle-group/fesm2022/toggle-group.mjs +117 -0
  285. package/toggle-group/fesm2022/toggle-group.mjs.map +1 -0
  286. package/toggle-group/package.json +25 -0
  287. package/toggle-group/types/toggle-group.d.ts +39 -0
  288. package/tooltip/fesm2022/tooltip.mjs +33 -54
  289. package/tooltip/fesm2022/tooltip.mjs.map +1 -1
  290. package/tooltip/package.json +25 -0
  291. package/tooltip/types/tooltip.d.ts +22 -0
  292. package/typography/README.md +11 -0
  293. package/typography/fesm2022/typography.mjs +242 -0
  294. package/typography/fesm2022/typography.mjs.map +1 -0
  295. package/typography/package.json +25 -0
  296. package/typography/types/typography.d.ts +94 -0
  297. package/utils/fesm2022/utils.mjs +184 -1
  298. package/utils/fesm2022/utils.mjs.map +1 -1
  299. package/utils/package.json +25 -0
  300. package/utils/types/utils.d.ts +13 -0
  301. package/autocomplete/index.d.ts +0 -162
  302. package/calendar/index.d.ts +0 -111
  303. package/date-picker/index.d.ts +0 -227
  304. package/dialog/index.d.ts +0 -89
  305. package/exports.json +0 -1
  306. package/input/index.d.ts +0 -41
  307. package/menu/README.md +0 -64
  308. package/menu/fesm2022/menu.mjs +0 -449
  309. package/menu/fesm2022/menu.mjs.map +0 -1
  310. package/menu/index.d.ts +0 -137
  311. package/popover/index.d.ts +0 -30
  312. package/select/index.d.ts +0 -92
  313. package/tabs/index.d.ts +0 -71
  314. package/tooltip/index.d.ts +0 -21
  315. package/utils/index.d.ts +0 -5
  316. /package/alert/{index.d.ts → types/alert.d.ts} +0 -0
  317. /package/badge/{index.d.ts → types/badge.d.ts} +0 -0
  318. /package/basic-alert/{index.d.ts → types/basic-alert.d.ts} +0 -0
  319. /package/checkbox/{index.d.ts → types/checkbox.d.ts} +0 -0
  320. /package/confirmation-dialog/{index.d.ts → types/confirmation-dialog.d.ts} +0 -0
  321. /package/form-checkbox/{index.d.ts → types/form-checkbox.d.ts} +0 -0
  322. /package/form-date-picker/{index.d.ts → types/form-date-picker.d.ts} +0 -0
  323. /package/form-field-simple/{index.d.ts → types/form-field-simple.d.ts} +0 -0
  324. /package/form-searchable-multiselect/{index.d.ts → types/form-searchable-multiselect.d.ts} +0 -0
  325. /package/form-select/{index.d.ts → types/form-select.d.ts} +0 -0
  326. /package/form-text-input/{index.d.ts → types/form-text-input.d.ts} +0 -0
  327. /package/form-textarea/{index.d.ts → types/form-textarea.d.ts} +0 -0
  328. /package/icon/{index.d.ts → types/icon.d.ts} +0 -0
  329. /package/label/{index.d.ts → types/label.d.ts} +0 -0
  330. /package/sheet/{index.d.ts → types/sheet.d.ts} +0 -0
  331. /package/sonner/{index.d.ts → types/sonner.d.ts} +0 -0
  332. /package/spinner/{index.d.ts → types/spinner.d.ts} +0 -0
  333. /package/switch/{index.d.ts → types/switch.d.ts} +0 -0
@@ -0,0 +1,54 @@
1
+ import * as i0 from '@angular/core';
2
+ import * as i1 from '@spartan-ng/brain/popover';
3
+
4
+ declare class HlmPopover {
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmPopover, never>;
6
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmPopover, "[hlmPopover],hlm-popover", never, {}, {}, never, never, true, [{ directive: typeof i1.BrnPopover; inputs: { "align": "align"; "attachTo": "attachTo"; "autoFocus": "autoFocus"; "closeOnOutsidePointerEvents": "closeOnOutsidePointerEvents"; "offsetX": "offsetX"; "sideOffset": "sideOffset"; "state": "state"; }; outputs: { "stateChanged": "stateChanged"; "closed": "closed"; }; }]>;
7
+ }
8
+
9
+ declare class HlmPopoverContent {
10
+ private readonly _stateProvider;
11
+ state: i0.Signal<"closed" | "open">;
12
+ private readonly _renderer;
13
+ private readonly _element;
14
+ constructor();
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmPopoverContent, never>;
16
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmPopoverContent, "[hlmPopoverContent],hlm-popover-content", never, {}, {}, never, never, true, never>;
17
+ }
18
+
19
+ declare class HlmPopoverDescription {
20
+ constructor();
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmPopoverDescription, never>;
22
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmPopoverDescription, "[hlmPopoverDescription]", never, {}, {}, never, never, true, never>;
23
+ }
24
+
25
+ declare class HlmPopoverHeader {
26
+ constructor();
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmPopoverHeader, never>;
28
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmPopoverHeader, "[hlmPopoverHeader],hlm-popover-header", never, {}, {}, never, never, true, never>;
29
+ }
30
+
31
+ declare class HlmPopoverPortal {
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmPopoverPortal, never>;
33
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmPopoverPortal, "[hlmPopoverPortal]", never, {}, {}, never, never, true, [{ directive: typeof i1.BrnPopoverContent; inputs: { "context": "context"; "class": "class"; }; outputs: {}; }]>;
34
+ }
35
+
36
+ declare class HlmPopoverTitle {
37
+ constructor();
38
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmPopoverTitle, never>;
39
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmPopoverTitle, "[hlmPopoverTitle]", never, {}, {}, never, never, true, never>;
40
+ }
41
+
42
+ declare class HlmPopoverTrigger {
43
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmPopoverTrigger, never>;
44
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmPopoverTrigger, "button[hlmPopoverTrigger],button[hlmPopoverTriggerFor]", never, {}, {}, never, never, true, [{ directive: typeof i1.BrnPopoverTrigger; inputs: { "id": "id"; "brnPopoverTriggerFor": "hlmPopoverTriggerFor"; "type": "type"; }; outputs: {}; }]>;
45
+ }
46
+
47
+ declare const HlmPopoverImports: readonly [typeof HlmPopover, typeof HlmPopoverContent, typeof HlmPopoverDescription, typeof HlmPopoverHeader, typeof HlmPopoverPortal, typeof HlmPopoverTitle, typeof HlmPopoverTrigger];
48
+ declare class HlmPopoverModule {
49
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmPopoverModule, never>;
50
+ static ɵmod: i0.ɵɵNgModuleDeclaration<HlmPopoverModule, never, [typeof HlmPopover, typeof HlmPopoverContent, typeof HlmPopoverDescription, typeof HlmPopoverHeader, typeof HlmPopoverPortal, typeof HlmPopoverTitle, typeof HlmPopoverTrigger], [typeof HlmPopover, typeof HlmPopoverContent, typeof HlmPopoverDescription, typeof HlmPopoverHeader, typeof HlmPopoverPortal, typeof HlmPopoverTitle, typeof HlmPopoverTrigger]>;
51
+ static ɵinj: i0.ɵɵInjectorDeclaration<HlmPopoverModule>;
52
+ }
53
+
54
+ export { HlmPopover, HlmPopoverContent, HlmPopoverDescription, HlmPopoverHeader, HlmPopoverImports, HlmPopoverModule, HlmPopoverPortal, HlmPopoverTitle, HlmPopoverTrigger };
@@ -0,0 +1,11 @@
1
+ # Progress
2
+
3
+ This project was generated using [Angular CLI](https://github.com/angular/angular-cli).
4
+
5
+ ## Building
6
+
7
+ To build the library, run:
8
+
9
+ ```bash
10
+ ng build progress
11
+ ```
@@ -0,0 +1,77 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Directive, inject, computed, NgModule } from '@angular/core';
3
+ import * as i1 from '@spartan-ng/brain/progress';
4
+ import { BrnProgress, injectBrnProgress, BrnProgressIndicator } from '@spartan-ng/brain/progress';
5
+ import { classes } from '@egose/shadcn-theme-ng/utils';
6
+ import { Directionality } from '@angular/cdk/bidi';
7
+
8
+ class HlmProgress {
9
+ constructor() {
10
+ classes(() => 'bg-muted h-1.5 rounded-full relative inline-flex w-full overflow-hidden');
11
+ }
12
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmProgress, deps: [], target: i0.ɵɵFactoryTarget.Directive });
13
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmProgress, isStandalone: true, selector: "hlm-progress,[hlmProgress]", host: { attributes: { "data-slot": "progress" } }, hostDirectives: [{ directive: i1.BrnProgress, inputs: ["value", "value", "max", "max", "getValueLabel", "getValueLabel"] }], ngImport: i0 });
14
+ }
15
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmProgress, decorators: [{
16
+ type: Directive,
17
+ args: [{
18
+ selector: 'hlm-progress,[hlmProgress]',
19
+ hostDirectives: [{ directive: BrnProgress, inputs: ['value', 'max', 'getValueLabel'] }],
20
+ host: { 'data-slot': 'progress' },
21
+ }]
22
+ }], ctorParameters: () => [] });
23
+
24
+ class HlmProgressIndicator {
25
+ _progress = injectBrnProgress();
26
+ _dir = inject(Directionality);
27
+ // Offset the indicator by the unfilled remainder. In RTL the bar fills from the inline-start
28
+ // (visually the right), so translate the opposite way to keep the fill on the correct side.
29
+ _transform = computed(() => {
30
+ const offset = 100 - (this._progress.value() ?? 100);
31
+ return `translateX(${this._dir.valueSignal() === 'rtl' ? '' : '-'}${offset}%)`;
32
+ }, /* @ts-ignore */
33
+ ...(ngDevMode ? [{ debugName: "_transform" }] : /* istanbul ignore next */ []));
34
+ _indeterminate = computed(() => this._progress.value() === null || this._progress.value() === undefined, /* @ts-ignore */
35
+ ...(ngDevMode ? [{ debugName: "_indeterminate" }] : /* istanbul ignore next */ []));
36
+ constructor() {
37
+ classes(() => 'bg-primary h-full w-full flex-1 transition-all');
38
+ }
39
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmProgressIndicator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
40
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmProgressIndicator, isStandalone: true, selector: "[hlmProgressIndicator],hlm-progress-indicator", host: { attributes: { "data-slot": "progress-indicator" }, properties: { "class.animate-indeterminate": "_indeterminate()", "style.transform": "_transform()" } }, hostDirectives: [{ directive: i1.BrnProgressIndicator }], ngImport: i0 });
41
+ }
42
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmProgressIndicator, decorators: [{
43
+ type: Directive,
44
+ args: [{
45
+ selector: '[hlmProgressIndicator],hlm-progress-indicator',
46
+ hostDirectives: [BrnProgressIndicator],
47
+ host: {
48
+ 'data-slot': 'progress-indicator',
49
+ '[class.animate-indeterminate]': '_indeterminate()',
50
+ '[style.transform]': '_transform()',
51
+ },
52
+ }]
53
+ }], ctorParameters: () => [] });
54
+
55
+ /*
56
+ * Public API Surface of progress
57
+ */
58
+ const HlmProgressImports = [HlmProgress, HlmProgressIndicator];
59
+ class HlmProgressModule {
60
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmProgressModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
61
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.7", ngImport: i0, type: HlmProgressModule, imports: [HlmProgress, HlmProgressIndicator], exports: [HlmProgress, HlmProgressIndicator] });
62
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmProgressModule });
63
+ }
64
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmProgressModule, decorators: [{
65
+ type: NgModule,
66
+ args: [{
67
+ imports: [...HlmProgressImports],
68
+ exports: [...HlmProgressImports],
69
+ }]
70
+ }] });
71
+
72
+ /**
73
+ * Generated bundle index. Do not edit.
74
+ */
75
+
76
+ export { HlmProgress, HlmProgressImports, HlmProgressIndicator, HlmProgressModule };
77
+ //# sourceMappingURL=progress.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progress.mjs","sources":["../../../projects/progress/src/lib/hlm-progress.ts","../../../projects/progress/src/lib/hlm-progress-indicator.ts","../../../projects/progress/src/public-api.ts","../../../projects/progress/src/progress.ts"],"sourcesContent":["import { Directive } from '@angular/core';\nimport { BrnProgress } from '@spartan-ng/brain/progress';\nimport { classes } from '@egose/shadcn-theme-ng/utils';\n\n@Directive({\n selector: 'hlm-progress,[hlmProgress]',\n hostDirectives: [{ directive: BrnProgress, inputs: ['value', 'max', 'getValueLabel'] }],\n host: { 'data-slot': 'progress' },\n})\nexport class HlmProgress {\n constructor() {\n classes(() => 'bg-muted h-1.5 rounded-full relative inline-flex w-full overflow-hidden');\n }\n}\n","import { Directionality } from '@angular/cdk/bidi';\nimport { Directive, computed, inject } from '@angular/core';\nimport { BrnProgressIndicator, injectBrnProgress } from '@spartan-ng/brain/progress';\nimport { classes } from '@egose/shadcn-theme-ng/utils';\n\n@Directive({\n selector: '[hlmProgressIndicator],hlm-progress-indicator',\n hostDirectives: [BrnProgressIndicator],\n host: {\n 'data-slot': 'progress-indicator',\n '[class.animate-indeterminate]': '_indeterminate()',\n '[style.transform]': '_transform()',\n },\n})\nexport class HlmProgressIndicator {\n private readonly _progress = injectBrnProgress();\n private readonly _dir = inject(Directionality);\n // Offset the indicator by the unfilled remainder. In RTL the bar fills from the inline-start\n // (visually the right), so translate the opposite way to keep the fill on the correct side.\n protected readonly _transform = computed(() => {\n const offset = 100 - (this._progress.value() ?? 100);\n return `translateX(${this._dir.valueSignal() === 'rtl' ? '' : '-'}${offset}%)`;\n });\n protected readonly _indeterminate = computed(\n () => this._progress.value() === null || this._progress.value() === undefined,\n );\n\n constructor() {\n classes(() => 'bg-primary h-full w-full flex-1 transition-all');\n }\n}\n","/*\n * Public API Surface of progress\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmProgress } from './lib/hlm-progress';\nimport { HlmProgressIndicator } from './lib/hlm-progress-indicator';\n\nexport * from './lib/hlm-progress';\nexport * from './lib/hlm-progress-indicator';\n\nexport const HlmProgressImports = [HlmProgress, HlmProgressIndicator] as const;\n\n@NgModule({\n imports: [...HlmProgressImports],\n exports: [...HlmProgressImports],\n})\nexport class HlmProgressModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MASa,WAAW,CAAA;AACtB,IAAA,WAAA,GAAA;AACE,QAAA,OAAO,CAAC,MAAM,yEAAyE,CAAC;IAC1F;uGAHW,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAX,WAAW,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,4BAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,WAAA,EAAA,UAAA,EAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,OAAA,EAAA,KAAA,EAAA,KAAA,EAAA,eAAA,EAAA,eAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBALvB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,4BAA4B;AACtC,oBAAA,cAAc,EAAE,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,eAAe,CAAC,EAAE,CAAC;AACvF,oBAAA,IAAI,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE;AAClC,iBAAA;;;MCMY,oBAAoB,CAAA;IACd,SAAS,GAAG,iBAAiB,EAAE;AAC/B,IAAA,IAAI,GAAG,MAAM,CAAC,cAAc,CAAC;;;AAG3B,IAAA,UAAU,GAAG,QAAQ,CAAC,MAAK;AAC5C,QAAA,MAAM,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IA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AAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YANK,WAAW,EAAE,oBAAoB,CAAA,EAAA,OAAA,EAAA,CAAjC,WAAW,EAAE,oBAAoB,CAAA,EAAA,CAAA;wGAMvD,iBAAiB,EAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC;AAChC,oBAAA,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC;AACjC,iBAAA;;;ACjBD;;AAEG;;;;"}
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "progress",
3
+ "version": "0.0.1",
4
+ "peerDependencies": {
5
+ "@angular/common": "^22.0.0",
6
+ "@angular/core": "^22.0.0",
7
+ "@spartan-ng/brain": "^1.1.1"
8
+ },
9
+ "dependencies": {
10
+ "tslib": "^2.3.0"
11
+ },
12
+ "sideEffects": false,
13
+ "module": "fesm2022/progress.mjs",
14
+ "typings": "types/progress.d.ts",
15
+ "exports": {
16
+ "./package.json": {
17
+ "default": "./package.json"
18
+ },
19
+ ".": {
20
+ "types": "./types/progress.d.ts",
21
+ "default": "./fesm2022/progress.mjs"
22
+ }
23
+ },
24
+ "type": "module"
25
+ }
@@ -0,0 +1,27 @@
1
+ import * as i0 from '@angular/core';
2
+ import * as i1 from '@spartan-ng/brain/progress';
3
+
4
+ declare class HlmProgress {
5
+ constructor();
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmProgress, never>;
7
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmProgress, "hlm-progress,[hlmProgress]", never, {}, {}, never, never, true, [{ directive: typeof i1.BrnProgress; inputs: { "value": "value"; "max": "max"; "getValueLabel": "getValueLabel"; }; outputs: {}; }]>;
8
+ }
9
+
10
+ declare class HlmProgressIndicator {
11
+ private readonly _progress;
12
+ private readonly _dir;
13
+ protected readonly _transform: i0.Signal<string>;
14
+ protected readonly _indeterminate: i0.Signal<boolean>;
15
+ constructor();
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmProgressIndicator, never>;
17
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmProgressIndicator, "[hlmProgressIndicator],hlm-progress-indicator", never, {}, {}, never, never, true, [{ directive: typeof i1.BrnProgressIndicator; inputs: {}; outputs: {}; }]>;
18
+ }
19
+
20
+ declare const HlmProgressImports: readonly [typeof HlmProgress, typeof HlmProgressIndicator];
21
+ declare class HlmProgressModule {
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmProgressModule, never>;
23
+ static ɵmod: i0.ɵɵNgModuleDeclaration<HlmProgressModule, never, [typeof HlmProgress, typeof HlmProgressIndicator], [typeof HlmProgress, typeof HlmProgressIndicator]>;
24
+ static ɵinj: i0.ɵɵInjectorDeclaration<HlmProgressModule>;
25
+ }
26
+
27
+ export { HlmProgress, HlmProgressImports, HlmProgressIndicator, HlmProgressModule };
@@ -1,40 +1,49 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, Renderer2, ElementRef, PLATFORM_ID, input, computed, booleanAttribute, signal, output, effect, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
3
- import { DOCUMENT, isPlatformBrowser } from '@angular/common';
2
+ import { inject, DOCUMENT, Renderer2, ElementRef, PLATFORM_ID, computed, input, booleanAttribute, output, effect, ChangeDetectionStrategy, Component, Directive, NgModule } from '@angular/core';
3
+ import { isPlatformBrowser } from '@angular/common';
4
4
  import * as i1 from '@spartan-ng/brain/radio-group';
5
- import { BrnRadio, BrnRadioGroup } from '@spartan-ng/brain/radio-group';
6
- import { hlm } from '@egose/shadcn-theme-ng/utils';
5
+ import { BrnRadioGroup, BrnRadio } from '@spartan-ng/brain/radio-group';
6
+ import { hlm, classes } from '@egose/shadcn-theme-ng/utils';
7
+ import * as i2 from '@spartan-ng/brain/field';
8
+ import { BrnFieldControlDescribedBy } from '@spartan-ng/brain/field';
7
9
 
8
10
  class HlmRadio {
9
11
  _document = inject(DOCUMENT);
10
12
  _renderer = inject(Renderer2);
11
13
  _elementRef = inject(ElementRef);
12
14
  _isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
13
- userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
14
- _computedClass = computed(() => hlm('group flex items-center gap-x-3', this.userClass(), this._state().disabled() ? 'cursor-not-allowed opacity-50' : ''), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
15
+ _radioGroup = inject(BrnRadioGroup, { optional: true });
16
+ _ariaInvalid = computed(() => this._radioGroup?.controlState?.()?.invalid, /* @ts-ignore */
17
+ ...(ngDevMode ? [{ debugName: "_ariaInvalid" }] : /* istanbul ignore next */ []));
18
+ _touched = computed(() => this._radioGroup?.controlState?.()?.touched, /* @ts-ignore */
19
+ ...(ngDevMode ? [{ debugName: "_touched" }] : /* istanbul ignore next */ []));
20
+ _dirty = computed(() => this._radioGroup?.controlState?.()?.dirty, /* @ts-ignore */
21
+ ...(ngDevMode ? [{ debugName: "_dirty" }] : /* istanbul ignore next */ []));
22
+ _groupSpartanInvalid = computed(() => this._radioGroup?.controlState?.()?.spartanInvalid, /* @ts-ignore */
23
+ ...(ngDevMode ? [{ debugName: "_groupSpartanInvalid" }] : /* istanbul ignore next */ []));
24
+ _errorStateClass = computed(() => (this._groupSpartanInvalid() ? 'text-destructive' : ''), /* @ts-ignore */
25
+ ...(ngDevMode ? [{ debugName: "_errorStateClass" }] : /* istanbul ignore next */ []));
26
+ userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
27
+ _computedClass = computed(() => hlm('group relative flex items-center gap-x-3', 'data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50', this.userClass(), this._errorStateClass()), /* @ts-ignore */
28
+ ...(ngDevMode ? [{ debugName: "_computedClass" }] : /* istanbul ignore next */ []));
15
29
  /** Used to set the id on the underlying brn element. */
16
- id = input(undefined, ...(ngDevMode ? [{ debugName: "id" }] : []));
30
+ inputId = input(undefined, /* @ts-ignore */
31
+ ...(ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []));
17
32
  /** Used to set the aria-label attribute on the underlying brn element. */
18
- ariaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabel", alias: 'aria-label' }] : [{ alias: 'aria-label' }]));
33
+ ariaLabel = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
19
34
  /** Used to set the aria-labelledby attribute on the underlying brn element. */
20
- ariaLabelledby = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabelledby", alias: 'aria-labelledby' }] : [{ alias: 'aria-labelledby' }]));
35
+ ariaLabelledby = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
21
36
  /** Used to set the aria-describedby attribute on the underlying brn element. */
22
- ariaDescribedby = input(undefined, ...(ngDevMode ? [{ debugName: "ariaDescribedby", alias: 'aria-describedby' }] : [{ alias: 'aria-describedby' }]));
37
+ ariaDescribedby = input(undefined, { ...(ngDevMode ? { debugName: "ariaDescribedby" } : /* istanbul ignore next */ {}), alias: 'aria-describedby' });
23
38
  /**
24
39
  * The value this radio button represents.
25
40
  */
26
- value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
41
+ value = input.required(/* @ts-ignore */
42
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
27
43
  /** Whether the checkbox is required. */
28
- required = input(false, ...(ngDevMode ? [{ debugName: "required", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
44
+ required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
29
45
  /** Whether the checkbox is disabled. */
30
- disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
31
- _state = computed(() => {
32
- const id = this.id();
33
- return {
34
- disabled: signal(this.disabled()),
35
- id: id ? id : null,
36
- };
37
- }, ...(ngDevMode ? [{ debugName: "_state" }] : []));
46
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
38
47
  /**
39
48
  * Event emitted when the checked state of this radio button changes.
40
49
  */
@@ -42,24 +51,29 @@ class HlmRadio {
42
51
  change = output();
43
52
  constructor() {
44
53
  effect(() => {
45
- const state = this._state();
46
- const isDisabled = state.disabled();
54
+ const isDisabled = this.disabled();
47
55
  if (!this._elementRef.nativeElement || !this._isBrowser)
48
56
  return;
49
- const labelElement = this._elementRef.nativeElement.closest('label') ?? this._document.querySelector(`label[for="${state.id}"]`);
57
+ const labelElement = this._elementRef.nativeElement.closest('label') ??
58
+ this._document.querySelector(`label[for="${this.inputId()}"]`);
50
59
  if (!labelElement)
51
60
  return;
52
61
  this._renderer.setAttribute(labelElement, 'data-disabled', isDisabled ? 'true' : 'false');
53
62
  });
54
63
  }
55
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmRadio, deps: [], target: i0.ɵɵFactoryTarget.Component });
56
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmRadio, isStandalone: true, selector: "hlm-radio", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { change: "change" }, host: { properties: { "attr.id": "null", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null", "attr.data-disabled": "_state().disabled() ? \"\" : null" } }, ngImport: i0, template: `
64
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmRadio, deps: [], target: i0.ɵɵFactoryTarget.Component });
65
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.7", type: HlmRadio, isStandalone: true, selector: "hlm-radio", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { change: "change" }, host: { attributes: { "data-slot": "radio-group-item" }, properties: { "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null", "attr.data-disabled": "disabled() ? \"\" : null" } }, ngImport: i0, template: `
57
66
  <brn-radio
58
- [id]="id()"
67
+ [id]="inputId()"
59
68
  [class]="_computedClass()"
60
69
  [value]="value()"
61
70
  [required]="required()"
62
71
  [disabled]="disabled()"
72
+ [attr.aria-invalid]="_ariaInvalid() ? 'true' : null"
73
+ [attr.data-invalid]="_ariaInvalid() ? 'true' : null"
74
+ [attr.data-dirty]="_dirty() ? 'true' : null"
75
+ [attr.data-touched]="_touched() ? 'true' : null"
76
+ [attr.data-matches-spartan-invalid]="_groupSpartanInvalid() ? 'true' : null"
63
77
  [aria-label]="ariaLabel()"
64
78
  [aria-labelledby]="ariaLabelledby()"
65
79
  [aria-describedby]="ariaDescribedby()"
@@ -68,20 +82,33 @@ class HlmRadio {
68
82
  <ng-content select="[target],[indicator],hlm-radio-indicator" indicator />
69
83
  <ng-content />
70
84
  </brn-radio>
71
- `, isInline: true, dependencies: [{ kind: "component", type: BrnRadio, selector: "brn-radio", inputs: ["disabled", "id", "aria-label", "aria-labelledby", "aria-describedby", "value", "required"], outputs: ["change"], exportAs: ["brnRadio"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
85
+ `, isInline: true, dependencies: [{ kind: "component", type: BrnRadio, selector: "brn-radio", inputs: ["disabled", "id", "aria-label", "aria-labelledby", "aria-describedby", "value", "inputStyles", "required"], outputs: ["change"], exportAs: ["brnRadio"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
72
86
  }
73
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmRadio, decorators: [{
87
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmRadio, decorators: [{
74
88
  type: Component,
75
89
  args: [{
76
90
  selector: 'hlm-radio',
77
91
  imports: [BrnRadio],
92
+ changeDetection: ChangeDetectionStrategy.OnPush,
93
+ host: {
94
+ '[attr.aria-label]': 'null',
95
+ '[attr.aria-labelledby]': 'null',
96
+ '[attr.aria-describedby]': 'null',
97
+ '[attr.data-disabled]': 'disabled() ? "" : null',
98
+ 'data-slot': 'radio-group-item',
99
+ },
78
100
  template: `
79
101
  <brn-radio
80
- [id]="id()"
102
+ [id]="inputId()"
81
103
  [class]="_computedClass()"
82
104
  [value]="value()"
83
105
  [required]="required()"
84
106
  [disabled]="disabled()"
107
+ [attr.aria-invalid]="_ariaInvalid() ? 'true' : null"
108
+ [attr.data-invalid]="_ariaInvalid() ? 'true' : null"
109
+ [attr.data-dirty]="_dirty() ? 'true' : null"
110
+ [attr.data-touched]="_touched() ? 'true' : null"
111
+ [attr.data-matches-spartan-invalid]="_groupSpartanInvalid() ? 'true' : null"
85
112
  [aria-label]="ariaLabel()"
86
113
  [aria-labelledby]="ariaLabelledby()"
87
114
  [aria-describedby]="ariaDescribedby()"
@@ -91,70 +118,77 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
91
118
  <ng-content />
92
119
  </brn-radio>
93
120
  `,
94
- changeDetection: ChangeDetectionStrategy.OnPush,
95
- host: {
96
- '[attr.id]': 'null',
97
- '[attr.aria-label]': 'null',
98
- '[attr.aria-labelledby]': 'null',
99
- '[attr.aria-describedby]': 'null',
100
- '[attr.data-disabled]': '_state().disabled() ? "" : null',
101
- },
102
121
  }]
103
- }], ctorParameters: () => [] });
122
+ }], ctorParameters: () => [], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], change: [{ type: i0.Output, args: ["change"] }] } });
104
123
 
105
124
  class HlmRadioGroup {
106
- userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
107
- _computedClass = computed(() => hlm('grid gap-3', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
108
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmRadioGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
109
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmRadioGroup, isStandalone: true, selector: "hlm-radio-group", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnRadioGroup, inputs: ["name", "name", "value", "value", "disabled", "disabled", "required", "required", "direction", "direction"], outputs: ["valueChange", "valueChange"] }], ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
125
+ userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
126
+ _brnRadioGroup = inject(BrnRadioGroup);
127
+ _ariaInvalid = computed(() => this._brnRadioGroup.controlState?.()?.invalid, /* @ts-ignore */
128
+ ...(ngDevMode ? [{ debugName: "_ariaInvalid" }] : /* istanbul ignore next */ []));
129
+ _touched = computed(() => this._brnRadioGroup.controlState?.()?.touched, /* @ts-ignore */
130
+ ...(ngDevMode ? [{ debugName: "_touched" }] : /* istanbul ignore next */ []));
131
+ _dirty = computed(() => this._brnRadioGroup.controlState?.()?.dirty, /* @ts-ignore */
132
+ ...(ngDevMode ? [{ debugName: "_dirty" }] : /* istanbul ignore next */ []));
133
+ _errorState = computed(() => this._brnRadioGroup.controlState?.()?.spartanInvalid, /* @ts-ignore */
134
+ ...(ngDevMode ? [{ debugName: "_errorState" }] : /* istanbul ignore next */ []));
135
+ constructor() {
136
+ classes(() => ['grid gap-3', this.userClass(), this._errorState() ? 'data-[invalid=true]:text-destructive' : '']);
137
+ }
138
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmRadioGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
139
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: HlmRadioGroup, isStandalone: true, selector: "[hlmRadioGroup],hlm-radio-group", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "radio-group" }, properties: { "attr.aria-invalid": "_ariaInvalid() ? \"true\" : null", "attr.data-invalid": "_ariaInvalid() ? \"true\" : null", "attr.data-dirty": "_dirty() ? \"true\" : null", "attr.data-touched": "_touched() ? \"true\" : null" } }, hostDirectives: [{ directive: i1.BrnRadioGroup, inputs: ["name", "name", "value", "value", "disabled", "disabled", "required", "required"], outputs: ["valueChange", "valueChange"] }, { directive: i2.BrnFieldControlDescribedBy }], ngImport: i0 });
110
140
  }
111
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmRadioGroup, decorators: [{
112
- type: Component,
141
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmRadioGroup, decorators: [{
142
+ type: Directive,
113
143
  args: [{
114
- selector: 'hlm-radio-group',
144
+ selector: '[hlmRadioGroup],hlm-radio-group',
115
145
  hostDirectives: [
116
146
  {
117
147
  directive: BrnRadioGroup,
118
- inputs: ['name', 'value', 'disabled', 'required', 'direction'],
148
+ inputs: ['name', 'value', 'disabled', 'required'],
119
149
  outputs: ['valueChange'],
120
150
  },
151
+ BrnFieldControlDescribedBy,
121
152
  ],
122
153
  host: {
123
- '[class]': '_computedClass()',
154
+ 'data-slot': 'radio-group',
155
+ '[attr.aria-invalid]': '_ariaInvalid() ? "true" : null',
156
+ '[attr.data-invalid]': '_ariaInvalid() ? "true" : null',
157
+ '[attr.data-dirty]': '_dirty() ? "true" : null',
158
+ '[attr.data-touched]': '_touched() ? "true" : null',
124
159
  },
125
- template: '<ng-content />',
126
- changeDetection: ChangeDetectionStrategy.OnPush,
127
160
  }]
128
- }] });
161
+ }], ctorParameters: () => [], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
129
162
 
130
163
  class HlmRadioIndicator {
131
- userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
132
- _computedClass = computed(() => hlm('border-input text-primary group-has-[:focus-visible]:border-ring group-has-[:focus-visible]:ring-ring/50 dark:bg-input/10 shadow-xs group-data=[disabled=true]:cursor-not-allowed group-data=[disabled=true]:opacity-50 relative flex aspect-square size-4 shrink-0 items-center justify-center rounded-full border outline-none transition-[color,box-shadow] group-has-[:focus-visible]:ring-[3px]', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
133
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmRadioIndicator, deps: [], target: i0.ɵɵFactoryTarget.Component });
134
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmRadioIndicator, isStandalone: true, selector: "hlm-radio-indicator", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0, template: ` <div class="group-data-[checked=true]:bg-primary size-2 rounded-full bg-transparent"></div> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
164
+ constructor() {
165
+ classes(() => 'border-input text-primary group-has-[:focus-visible]:border-ring group-has-[:focus-visible]:ring-ring/50 dark:bg-input/30 group-data=[disabled=true]:cursor-not-allowed group-data=[disabled=true]:opacity-50 relative flex aspect-square size-4 shrink-0 items-center justify-center rounded-full border shadow-xs transition-[color,box-shadow] outline-none group-has-[:focus-visible]:ring-[3px]');
166
+ }
167
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmRadioIndicator, deps: [], target: i0.ɵɵFactoryTarget.Component });
168
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.7", type: HlmRadioIndicator, isStandalone: true, selector: "hlm-radio-indicator", host: { attributes: { "data-slot": "radio-group-indicator" } }, ngImport: i0, template: ` <div class="group-data-[checked=true]:bg-primary size-2 rounded-full bg-transparent"></div> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
135
169
  }
136
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmRadioIndicator, decorators: [{
170
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmRadioIndicator, decorators: [{
137
171
  type: Component,
138
172
  args: [{
139
173
  selector: 'hlm-radio-indicator',
174
+ changeDetection: ChangeDetectionStrategy.OnPush,
140
175
  host: {
141
- '[class]': '_computedClass()',
176
+ 'data-slot': 'radio-group-indicator',
142
177
  },
143
178
  template: ` <div class="group-data-[checked=true]:bg-primary size-2 rounded-full bg-transparent"></div> `,
144
- changeDetection: ChangeDetectionStrategy.OnPush,
145
179
  }]
146
- }] });
180
+ }], ctorParameters: () => [] });
147
181
 
148
182
  /*
149
183
  * Public API Surface of radio-group
150
184
  */
151
185
  const HlmRadioGroupImports = [HlmRadioGroup, HlmRadio, HlmRadioIndicator];
152
186
  class HlmRadioGroupModule {
153
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmRadioGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
154
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: HlmRadioGroupModule, imports: [HlmRadioGroup, HlmRadio, HlmRadioIndicator], exports: [HlmRadioGroup, HlmRadio, HlmRadioIndicator] });
155
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmRadioGroupModule, imports: [HlmRadio] });
187
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmRadioGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
188
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.7", ngImport: i0, type: HlmRadioGroupModule, imports: [HlmRadioGroup, HlmRadio, HlmRadioIndicator], exports: [HlmRadioGroup, HlmRadio, HlmRadioIndicator] });
189
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmRadioGroupModule, imports: [HlmRadio] });
156
190
  }
157
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmRadioGroupModule, decorators: [{
191
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmRadioGroupModule, decorators: [{
158
192
  type: NgModule,
159
193
  args: [{
160
194
  imports: [...HlmRadioGroupImports],
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.mjs","sources":["../../../projects/radio-group/src/lib/radio.ts","../../../projects/radio-group/src/lib/radio-group.ts","../../../projects/radio-group/src/lib/radio-indicator.ts","../../../projects/radio-group/src/public-api.ts","../../../projects/radio-group/src/radio-group.ts"],"sourcesContent":["import { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n output,\n PLATFORM_ID,\n Renderer2,\n signal,\n} from '@angular/core';\nimport { BrnRadio, BrnRadioChange } from '@spartan-ng/brain/radio-group';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport { ClassValue } from 'clsx';\n\n@Component({\n selector: 'hlm-radio',\n imports: [BrnRadio],\n template: `\n <brn-radio\n [id]=\"id()\"\n [class]=\"_computedClass()\"\n [value]=\"value()\"\n [required]=\"required()\"\n [disabled]=\"disabled()\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"ariaLabelledby()\"\n [aria-describedby]=\"ariaDescribedby()\"\n (change)=\"change.emit($event)\"\n >\n <ng-content select=\"[target],[indicator],hlm-radio-indicator\" indicator />\n <ng-content />\n </brn-radio>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.id]': 'null',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n '[attr.data-disabled]': '_state().disabled() ? \"\" : null',\n },\n})\nexport class HlmRadio<T = unknown> {\n private readonly _document = inject(DOCUMENT);\n private readonly _renderer = inject(Renderer2);\n private readonly _elementRef = inject(ElementRef);\n private readonly _isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:group tw:flex tw:items-center tw:gap-x-3',\n this.userClass(),\n this._state().disabled() ? 'tw:cursor-not-allowed tw:opacity-50' : '',\n ),\n );\n\n /** Used to set the id on the underlying brn element. */\n public readonly id = input<string | undefined>(undefined);\n\n /** Used to set the aria-label attribute on the underlying brn element. */\n public readonly ariaLabel = input<string | undefined>(undefined, { alias: 'aria-label' });\n\n /** Used to set the aria-labelledby attribute on the underlying brn element. */\n public readonly ariaLabelledby = input<string | undefined>(undefined, { alias: 'aria-labelledby' });\n\n /** Used to set the aria-describedby attribute on the underlying brn element. */\n public readonly ariaDescribedby = input<string | undefined>(undefined, { alias: 'aria-describedby' });\n\n /**\n * The value this radio button represents.\n */\n public readonly value = input.required<T>();\n\n /** Whether the checkbox is required. */\n public readonly required = input(false, { transform: booleanAttribute });\n\n /** Whether the checkbox is disabled. */\n public readonly disabled = input(false, { transform: booleanAttribute });\n\n protected readonly _state = computed(() => {\n const id = this.id();\n return {\n disabled: signal(this.disabled()),\n id: id ? id : null,\n };\n });\n /**\n * Event emitted when the checked state of this radio button changes.\n */\n // eslint-disable-next-line @angular-eslint/no-output-native\n public readonly change = output<BrnRadioChange<T>>();\n\n constructor() {\n effect(() => {\n const state = this._state();\n const isDisabled = state.disabled();\n\n if (!this._elementRef.nativeElement || !this._isBrowser) return;\n\n const labelElement =\n this._elementRef.nativeElement.closest('label') ?? this._document.querySelector(`label[for=\"${state.id}\"]`);\n\n if (!labelElement) return;\n this._renderer.setAttribute(labelElement, 'data-disabled', isDisabled ? 'true' : 'false');\n });\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { BrnRadioGroup } from '@spartan-ng/brain/radio-group';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Component({\n selector: 'hlm-radio-group',\n hostDirectives: [\n {\n directive: BrnRadioGroup,\n inputs: ['name', 'value', 'disabled', 'required', 'direction'],\n outputs: ['valueChange'],\n },\n ],\n host: {\n '[class]': '_computedClass()',\n },\n template: '<ng-content />',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HlmRadioGroup {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() => hlm('tw:grid tw:gap-3', this.userClass()));\n}\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Component({\n selector: 'hlm-radio-indicator',\n host: {\n '[class]': '_computedClass()',\n },\n template: ` <div class=\"tw:group-data-[checked=true]:bg-primary tw:size-2 tw:rounded-full tw:bg-transparent\"></div> `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HlmRadioIndicator {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:border-input tw:text-primary tw:group-has-[:focus-visible]:border-ring tw:group-has-[:focus-visible]:ring-ring/50 tw:dark:bg-input/10 tw:shadow-xs tw:group-data=[disabled=true]:cursor-not-allowed tw:group-data=[disabled=true]:opacity-50 tw:relative tw:flex tw:aspect-square tw:size-4 tw:shrink-0 tw:items-center tw:justify-center tw:rounded-full tw:border tw:outline-none tw:transition-[color,box-shadow] tw:group-has-[:focus-visible]:ring-[3px]',\n this.userClass(),\n ),\n );\n}\n","/*\n * Public API Surface of radio-group\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmRadio } from './lib/radio';\nimport { HlmRadioGroup } from './lib/radio-group';\nimport { HlmRadioIndicator } from './lib/radio-indicator';\n\nexport * from './lib/radio';\nexport * from './lib/radio-group';\nexport * from './lib/radio-indicator';\n\nexport const HlmRadioGroupImports = [HlmRadioGroup, HlmRadio, HlmRadioIndicator];\n\n@NgModule({\n imports: [...HlmRadioGroupImports],\n exports: [...HlmRadioGroupImports],\n})\nexport class HlmRadioGroupModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MA+Ca,QAAQ,CAAA;AACF,IAAA,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC5B,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AAC7B,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;IAChC,UAAU,GAAG,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AAEpD,IAAA,SAAS,GAAG,KAAK,CAAa,EAAE,6CAAI,KAAK,EAAE,OAAO,EAAA,CAAA,GAAA,CAAhB,EAAE,KAAK,EAAE,OAAO,EAAE,GAAC;AAClD,IAAA,cAAc,GAAG,QAAQ,CAAC,MAC3C,GAAG,CAC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,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAR7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,kBAAkB;AAC9B,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA,yGAAA,CAA2G;oBACrH,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;ACXD;;AAEG;AAYI,MAAM,oBAAoB,GAAG,CAAC,aAAa,EAAE,QAAQ,EAAE,iBAAiB;MAMlE,mBAAmB,CAAA;uGAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAnB,mBAAmB,EAAA,OAAA,EAAA,CANK,aAAa,EAAE,QAAQ,EAAE,iBAAiB,CAAA,EAAA,OAAA,EAAA,CAA1C,aAAa,EAAE,QAAQ,EAAE,iBAAiB,CAAA,EAAA,CAAA;AAMlE,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YANoB,QAAQ,CAAA,EAAA,CAAA;;2FAM/C,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC;AAClC,oBAAA,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC;AACnC,iBAAA;;;ACnBD;;AAEG;;;;"}
1
+ {"version":3,"file":"radio-group.mjs","sources":["../../../projects/radio-group/src/lib/hlm-radio.ts","../../../projects/radio-group/src/lib/hlm-radio-group.ts","../../../projects/radio-group/src/lib/hlm-radio-indicator.ts","../../../projects/radio-group/src/public-api.ts","../../../projects/radio-group/src/radio-group.ts"],"sourcesContent":["import { type BooleanInput } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n DOCUMENT,\n effect,\n ElementRef,\n inject,\n input,\n output,\n PLATFORM_ID,\n Renderer2,\n} from '@angular/core';\nimport { BrnRadio, BrnRadioGroup, type BrnRadioChange } from '@spartan-ng/brain/radio-group';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Component({\n selector: 'hlm-radio',\n imports: [BrnRadio],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n '[attr.data-disabled]': 'disabled() ? \"\" : null',\n 'data-slot': 'radio-group-item',\n },\n template: `\n <brn-radio\n [id]=\"inputId()\"\n [class]=\"_computedClass()\"\n [value]=\"value()\"\n [required]=\"required()\"\n [disabled]=\"disabled()\"\n [attr.aria-invalid]=\"_ariaInvalid() ? 'true' : null\"\n [attr.data-invalid]=\"_ariaInvalid() ? 'true' : null\"\n [attr.data-dirty]=\"_dirty() ? 'true' : null\"\n [attr.data-touched]=\"_touched() ? 'true' : null\"\n [attr.data-matches-spartan-invalid]=\"_groupSpartanInvalid() ? 'true' : null\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"ariaLabelledby()\"\n [aria-describedby]=\"ariaDescribedby()\"\n (change)=\"change.emit($event)\"\n >\n <ng-content select=\"[target],[indicator],hlm-radio-indicator\" indicator />\n <ng-content />\n </brn-radio>\n `,\n})\nexport class HlmRadio<T = unknown> {\n private readonly _document = inject(DOCUMENT);\n private readonly _renderer = inject(Renderer2);\n private readonly _elementRef = inject(ElementRef);\n private readonly _isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly _radioGroup = inject(BrnRadioGroup, { optional: true });\n\n protected readonly _ariaInvalid = computed(() => this._radioGroup?.controlState?.()?.invalid);\n\n protected readonly _touched = computed(() => this._radioGroup?.controlState?.()?.touched);\n protected readonly _dirty = computed(() => this._radioGroup?.controlState?.()?.dirty);\n protected readonly _groupSpartanInvalid = computed(() => this._radioGroup?.controlState?.()?.spartanInvalid);\n\n protected readonly _errorStateClass = computed(() => (this._groupSpartanInvalid() ? 'text-destructive' : ''));\n\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm(\n 'group relative flex items-center gap-x-3',\n 'data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50',\n this.userClass(),\n this._errorStateClass(),\n ),\n );\n\n /** Used to set the id on the underlying brn element. */\n public readonly inputId = input<string | undefined>(undefined);\n\n /** Used to set the aria-label attribute on the underlying brn element. */\n public readonly ariaLabel = input<string | undefined>(undefined, { alias: 'aria-label' });\n\n /** Used to set the aria-labelledby attribute on the underlying brn element. */\n public readonly ariaLabelledby = input<string | undefined>(undefined, { alias: 'aria-labelledby' });\n\n /** Used to set the aria-describedby attribute on the underlying brn element. */\n public readonly ariaDescribedby = input<string | undefined>(undefined, { alias: 'aria-describedby' });\n\n /**\n * The value this radio button represents.\n */\n public readonly value = input.required<T>();\n\n /** Whether the checkbox is required. */\n public readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** Whether the checkbox is disabled. */\n public readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Event emitted when the checked state of this radio button changes.\n */\n // eslint-disable-next-line @angular-eslint/no-output-native\n public readonly change = output<BrnRadioChange<T>>();\n\n constructor() {\n effect(() => {\n const isDisabled = this.disabled();\n\n if (!this._elementRef.nativeElement || !this._isBrowser) return;\n\n const labelElement =\n this._elementRef.nativeElement.closest('label') ??\n this._document.querySelector(`label[for=\"${this.inputId()}\"]`);\n\n if (!labelElement) return;\n this._renderer.setAttribute(labelElement, 'data-disabled', isDisabled ? 'true' : 'false');\n });\n }\n}\n","import { computed, Directive, inject, input } from '@angular/core';\nimport { BrnFieldControlDescribedBy } from '@spartan-ng/brain/field';\nimport { BrnRadioGroup } from '@spartan-ng/brain/radio-group';\nimport { classes } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: '[hlmRadioGroup],hlm-radio-group',\n hostDirectives: [\n {\n directive: BrnRadioGroup,\n inputs: ['name', 'value', 'disabled', 'required'],\n outputs: ['valueChange'],\n },\n BrnFieldControlDescribedBy,\n ],\n host: {\n 'data-slot': 'radio-group',\n '[attr.aria-invalid]': '_ariaInvalid() ? \"true\" : null',\n '[attr.data-invalid]': '_ariaInvalid() ? \"true\" : null',\n '[attr.data-dirty]': '_dirty() ? \"true\" : null',\n '[attr.data-touched]': '_touched() ? \"true\" : null',\n },\n})\nexport class HlmRadioGroup {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n private readonly _brnRadioGroup = inject(BrnRadioGroup);\n protected readonly _ariaInvalid = computed(() => this._brnRadioGroup.controlState?.()?.invalid);\n\n protected readonly _touched = computed(() => this._brnRadioGroup.controlState?.()?.touched);\n protected readonly _dirty = computed(() => this._brnRadioGroup.controlState?.()?.dirty);\n\n protected readonly _errorState = computed(() => this._brnRadioGroup.controlState?.()?.spartanInvalid);\n\n constructor() {\n classes(() => ['grid gap-3', this.userClass(), this._errorState() ? 'data-[invalid=true]:text-destructive' : '']);\n }\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { classes } from '@egose/shadcn-theme-ng/utils';\n\n@Component({\n selector: 'hlm-radio-indicator',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'data-slot': 'radio-group-indicator',\n },\n template: ` <div class=\"group-data-[checked=true]:bg-primary size-2 rounded-full bg-transparent\"></div> `,\n})\nexport class HlmRadioIndicator {\n constructor() {\n classes(\n () =>\n 'border-input text-primary group-has-[:focus-visible]:border-ring group-has-[:focus-visible]:ring-ring/50 dark:bg-input/30 group-data=[disabled=true]:cursor-not-allowed group-data=[disabled=true]:opacity-50 relative flex aspect-square size-4 shrink-0 items-center justify-center rounded-full border shadow-xs transition-[color,box-shadow] outline-none group-has-[:focus-visible]:ring-[3px]',\n );\n }\n}\n","/*\n * Public API Surface of radio-group\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmRadio } from './lib/hlm-radio';\nimport { HlmRadioGroup } from './lib/hlm-radio-group';\nimport { HlmRadioIndicator } from './lib/hlm-radio-indicator';\n\nexport * from './lib/hlm-radio';\nexport * from './lib/hlm-radio-group';\nexport * from './lib/hlm-radio-indicator';\n\nexport const HlmRadioGroupImports = [HlmRadioGroup, HlmRadio, HlmRadioIndicator] as const;\n\n@NgModule({\n imports: [...HlmRadioGroupImports],\n exports: [...HlmRadioGroupImports],\n})\nexport class HlmRadioGroupModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAqDa,QAAQ,CAAA;AACF,IAAA,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC5B,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AAC7B,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;IAChC,UAAU,GAAG,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IACnD,WAAW,GAAG,MAAM,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAErD,IAAA,YAAY,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,YAAY,IAAI,EAAE,OAAO;qFAAC;AAE1E,IAAA,QAAQ,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,YAAY,IAAI,EAAE,OAAO;iFAAC;AACtE,IAAA,MAAM,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,YAAY,IAAI,EAAE,KAAK;+EAAC;AAClE,IAAA,oBAAoB,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,WAAW,EA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,CAAA;AAMlE,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YANoB,QAAQ,CAAA,EAAA,CAAA;;2FAM/C,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC;AAClC,oBAAA,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC;AACnC,iBAAA;;;ACnBD;;AAEG;;;;"}
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "radio-group",
3
+ "version": "0.0.1",
4
+ "peerDependencies": {
5
+ "@angular/common": "^20.2.0 || ^22.0.0",
6
+ "@angular/core": "^20.2.0 || ^22.0.0",
7
+ "@spartan-ng/brain": "^0.0.1-alpha.512"
8
+ },
9
+ "dependencies": {
10
+ "tslib": "^2.3.0"
11
+ },
12
+ "sideEffects": false,
13
+ "module": "fesm2022/radio-group.mjs",
14
+ "typings": "types/radio-group.d.ts",
15
+ "exports": {
16
+ "./package.json": {
17
+ "default": "./package.json"
18
+ },
19
+ ".": {
20
+ "types": "./types/radio-group.d.ts",
21
+ "default": "./fesm2022/radio-group.mjs"
22
+ }
23
+ },
24
+ "type": "module"
25
+ }