@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,367 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, Directive, inject, effect, booleanAttribute, computed, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
3
+ import * as i1 from '@spartan-ng/brain/field';
4
+ import { BrnField, BrnFieldA11yService } from '@spartan-ng/brain/field';
5
+ import { classes } from '@egose/shadcn-theme-ng/utils';
6
+ import { cva } from 'class-variance-authority';
7
+ import * as i1$1 from '@egose/shadcn-theme-ng/label';
8
+ import { HlmLabel } from '@egose/shadcn-theme-ng/label';
9
+ import { HlmSeparator } from '@egose/shadcn-theme-ng/separator';
10
+
11
+ const fieldVariants = cva('data-[matches-spartan-invalid=true]:text-destructive gap-3 group/field flex w-full', {
12
+ variants: {
13
+ orientation: {
14
+ vertical: 'flex-col *:w-full [&>.sr-only]:w-auto',
15
+ horizontal: [
16
+ 'flex-row items-center',
17
+ '*:data-[slot=field-label]:flex-auto',
18
+ 'has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',
19
+ ],
20
+ responsive: [
21
+ 'flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto [&>.sr-only]:w-auto',
22
+ '@md/field-group:*:data-[slot=field-label]:flex-auto',
23
+ '@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',
24
+ ],
25
+ },
26
+ },
27
+ defaultVariants: {
28
+ orientation: 'vertical',
29
+ },
30
+ });
31
+ class HlmField {
32
+ orientation = input('vertical', /* @ts-ignore */
33
+ ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
34
+ constructor() {
35
+ classes(() => fieldVariants({ orientation: this.orientation() }));
36
+ }
37
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmField, deps: [], target: i0.ɵɵFactoryTarget.Directive });
38
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: HlmField, isStandalone: true, selector: "[hlmField],hlm-field", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group", "data-slot": "field" }, properties: { "attr.data-orientation": "orientation()" } }, hostDirectives: [{ directive: i1.BrnField, inputs: ["data-invalid", "data-invalid", "forceInvalid", "forceInvalid"] }], ngImport: i0 });
39
+ }
40
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmField, decorators: [{
41
+ type: Directive,
42
+ args: [{
43
+ selector: '[hlmField],hlm-field',
44
+ hostDirectives: [{ directive: BrnField, inputs: ['data-invalid', 'forceInvalid'] }],
45
+ host: {
46
+ role: 'group',
47
+ 'data-slot': 'field',
48
+ '[attr.data-orientation]': 'orientation()',
49
+ },
50
+ }]
51
+ }], ctorParameters: () => [], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }] } });
52
+
53
+ class HlmFieldContent {
54
+ constructor() {
55
+ classes(() => 'gap-1 group/field-content flex flex-1 flex-col leading-snug');
56
+ }
57
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
58
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmFieldContent, isStandalone: true, selector: "[hlmFieldContent],hlm-field-content", host: { attributes: { "data-slot": "field-content" } }, ngImport: i0 });
59
+ }
60
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldContent, decorators: [{
61
+ type: Directive,
62
+ args: [{
63
+ selector: '[hlmFieldContent],hlm-field-content',
64
+ host: { 'data-slot': 'field-content' },
65
+ }]
66
+ }], ctorParameters: () => [] });
67
+
68
+ class HlmFieldDescription {
69
+ static _id = 0;
70
+ _a11y = inject(BrnFieldA11yService, { optional: true, host: true });
71
+ id = input(`hlm-field-description-${HlmFieldDescription._id++}`, /* @ts-ignore */
72
+ ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
73
+ _registeredId;
74
+ _cleanup = this._a11y
75
+ ? effect(() => {
76
+ const a11y = this._a11y;
77
+ if (!a11y)
78
+ return;
79
+ const id = this.id();
80
+ if (this._registeredId && this._registeredId !== id) {
81
+ a11y.unregisterDescription(this._registeredId);
82
+ }
83
+ if (this._registeredId !== id) {
84
+ a11y.registerDescription(id);
85
+ this._registeredId = id;
86
+ }
87
+ })
88
+ : null;
89
+ constructor() {
90
+ classes(() => [
91
+ 'text-muted-foreground text-start text-sm [[data-variant=legend]+&]:-mt-1.5 leading-normal font-normal group-has-data-horizontal/field:text-balance',
92
+ 'last:mt-0 nth-last-2:-mt-1',
93
+ '[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',
94
+ ]);
95
+ }
96
+ ngOnDestroy() {
97
+ this._cleanup?.destroy();
98
+ if (this._registeredId) {
99
+ this._a11y?.unregisterDescription(this._registeredId);
100
+ }
101
+ }
102
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
103
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: HlmFieldDescription, isStandalone: true, selector: "[hlmFieldDescription],hlm-field-description", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "field-description" }, properties: { "attr.id": "id()" } }, ngImport: i0 });
104
+ }
105
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldDescription, decorators: [{
106
+ type: Directive,
107
+ args: [{
108
+ selector: '[hlmFieldDescription],hlm-field-description',
109
+ host: {
110
+ 'data-slot': 'field-description',
111
+ '[attr.id]': 'id()',
112
+ },
113
+ }]
114
+ }], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }] } });
115
+
116
+ class HlmFieldError {
117
+ static _id = 0;
118
+ _field = inject(BrnField, { optional: true });
119
+ _a11y = inject(BrnFieldA11yService, { optional: true, host: true });
120
+ _registeredId;
121
+ _hasParentField = !!this._field;
122
+ /** The unique ID for the field error. If none is supplied, it will be auto-generated. */
123
+ id = input(`hlm-field-error-${HlmFieldError._id++}`, /* @ts-ignore */
124
+ ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
125
+ /**
126
+ * The name of the specific validator error key to match (e.g. 'required').
127
+ * When omitted, the error is shown if any validation error is present.
128
+ */
129
+ validator = input(/* @ts-ignore */
130
+ ...(ngDevMode ? [undefined, { debugName: "validator" }] : /* istanbul ignore next */ []));
131
+ /** Forces the error message to be visible regardless of the control's validation state. */
132
+ forceShow = input(false, { ...(ngDevMode ? { debugName: "forceShow" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
133
+ _display = computed(() => !this._hasParentField || this.forceShow() || this._hasError(), /* @ts-ignore */
134
+ ...(ngDevMode ? [{ debugName: "_display" }] : /* istanbul ignore next */ []));
135
+ _hasError = computed(() => {
136
+ const errors = this._field?.errors();
137
+ if (!errors)
138
+ return false;
139
+ const validator = this.validator();
140
+ const spartanInvalid = this._field?.controlState()?.spartanInvalid;
141
+ if (!spartanInvalid)
142
+ return false;
143
+ return validator ? validator in errors : Object.keys(errors).length > 0;
144
+ }, /* @ts-ignore */
145
+ ...(ngDevMode ? [{ debugName: "_hasError" }] : /* istanbul ignore next */ []));
146
+ _cleanup = this._a11y
147
+ ? effect(() => {
148
+ const a11y = this._a11y;
149
+ if (!a11y)
150
+ return;
151
+ const id = this.id();
152
+ const hasError = this._hasError();
153
+ if (this._registeredId && (this._registeredId !== id || !hasError)) {
154
+ a11y.unregisterError(this._registeredId);
155
+ this._registeredId = undefined;
156
+ }
157
+ if (hasError && this._registeredId !== id) {
158
+ a11y.registerError(id);
159
+ this._registeredId = id;
160
+ }
161
+ })
162
+ : null;
163
+ constructor() {
164
+ classes(() => 'text-destructive text-sm font-normal');
165
+ }
166
+ ngOnDestroy() {
167
+ this._cleanup?.destroy();
168
+ if (this._registeredId) {
169
+ this._a11y?.unregisterError(this._registeredId);
170
+ }
171
+ }
172
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldError, deps: [], target: i0.ɵɵFactoryTarget.Component });
173
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: HlmFieldError, isStandalone: true, selector: "hlm-field-error", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, validator: { classPropertyName: "validator", publicName: "validator", isSignal: true, isRequired: false, transformFunction: null }, forceShow: { classPropertyName: "forceShow", publicName: "forceShow", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "alert", "data-slot": "field-error" }, properties: { "attr.id": "id()", "hidden": "!_display()" } }, ngImport: i0, template: `
174
+ @if (_display()) {
175
+ <ng-content />
176
+ }
177
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
178
+ }
179
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldError, decorators: [{
180
+ type: Component,
181
+ args: [{
182
+ selector: 'hlm-field-error',
183
+ changeDetection: ChangeDetectionStrategy.OnPush,
184
+ host: {
185
+ role: 'alert',
186
+ 'data-slot': 'field-error',
187
+ '[attr.id]': 'id()',
188
+ '[hidden]': '!_display()',
189
+ },
190
+ template: `
191
+ @if (_display()) {
192
+ <ng-content />
193
+ }
194
+ `,
195
+ }]
196
+ }], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], validator: [{ type: i0.Input, args: [{ isSignal: true, alias: "validator", required: false }] }], forceShow: [{ type: i0.Input, args: [{ isSignal: true, alias: "forceShow", required: false }] }] } });
197
+
198
+ class HlmFieldGroup {
199
+ constructor() {
200
+ classes(() => 'gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4 group/field-group @container/field-group flex w-full flex-col');
201
+ }
202
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
203
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmFieldGroup, isStandalone: true, selector: "[hlmFieldGroup],hlm-field-group", host: { attributes: { "data-slot": "field-group" } }, ngImport: i0 });
204
+ }
205
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldGroup, decorators: [{
206
+ type: Directive,
207
+ args: [{
208
+ selector: '[hlmFieldGroup],hlm-field-group',
209
+ host: { 'data-slot': 'field-group' },
210
+ }]
211
+ }], ctorParameters: () => [] });
212
+
213
+ class HlmFieldLabel {
214
+ constructor() {
215
+ classes(() => [
216
+ 'has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-3 group/field-label peer/field-label flex w-fit',
217
+ 'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col',
218
+ ]);
219
+ }
220
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
221
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmFieldLabel, isStandalone: true, selector: "[hlmFieldLabel],hlm-field-label", host: { attributes: { "data-slot": "field-label" } }, hostDirectives: [{ directive: i1$1.HlmLabel }], ngImport: i0 });
222
+ }
223
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldLabel, decorators: [{
224
+ type: Directive,
225
+ args: [{
226
+ selector: '[hlmFieldLabel],hlm-field-label',
227
+ hostDirectives: [HlmLabel],
228
+ host: { 'data-slot': 'field-label' },
229
+ }]
230
+ }], ctorParameters: () => [] });
231
+
232
+ class HlmFieldLegend {
233
+ variant = input('legend', /* @ts-ignore */
234
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
235
+ constructor() {
236
+ classes(() => 'mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base');
237
+ }
238
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldLegend, deps: [], target: i0.ɵɵFactoryTarget.Directive });
239
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: HlmFieldLegend, isStandalone: true, selector: "legend[hlmFieldLegend]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "field-legend" }, properties: { "attr.data-variant": "variant()" } }, ngImport: i0 });
240
+ }
241
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldLegend, decorators: [{
242
+ type: Directive,
243
+ args: [{
244
+ selector: 'legend[hlmFieldLegend]',
245
+ host: {
246
+ 'data-slot': 'field-legend',
247
+ '[attr.data-variant]': 'variant()',
248
+ },
249
+ }]
250
+ }], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] } });
251
+
252
+ class HlmFieldSeparator {
253
+ constructor() {
254
+ classes(() => '-my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2 relative');
255
+ }
256
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldSeparator, deps: [], target: i0.ɵɵFactoryTarget.Component });
257
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.7", type: HlmFieldSeparator, isStandalone: true, selector: "hlm-field-separator", host: { attributes: { "data-slot": "field-separator" } }, ngImport: i0, template: `
258
+ <hlm-separator class="absolute inset-0 top-1/2" />
259
+ <span
260
+ data-slot="field-separator-content"
261
+ class="text-muted-foreground px-2 bg-background relative mx-auto block w-fit"
262
+ >
263
+ <ng-content />
264
+ </span>
265
+ `, isInline: true, dependencies: [{ kind: "directive", type: HlmSeparator, selector: "[hlmSeparator],hlm-separator" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
266
+ }
267
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldSeparator, decorators: [{
268
+ type: Component,
269
+ args: [{
270
+ selector: 'hlm-field-separator',
271
+ imports: [HlmSeparator],
272
+ changeDetection: ChangeDetectionStrategy.OnPush,
273
+ host: { 'data-slot': 'field-separator' },
274
+ template: `
275
+ <hlm-separator class="absolute inset-0 top-1/2" />
276
+ <span
277
+ data-slot="field-separator-content"
278
+ class="text-muted-foreground px-2 bg-background relative mx-auto block w-fit"
279
+ >
280
+ <ng-content />
281
+ </span>
282
+ `,
283
+ }]
284
+ }], ctorParameters: () => [] });
285
+
286
+ class HlmFieldSet {
287
+ constructor() {
288
+ classes(() => 'gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col');
289
+ }
290
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldSet, deps: [], target: i0.ɵɵFactoryTarget.Directive });
291
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmFieldSet, isStandalone: true, selector: "fieldset[hlmFieldSet]", host: { attributes: { "data-slot": "field-set" } }, ngImport: i0 });
292
+ }
293
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldSet, decorators: [{
294
+ type: Directive,
295
+ args: [{
296
+ selector: 'fieldset[hlmFieldSet]',
297
+ host: { 'data-slot': 'field-set' },
298
+ }]
299
+ }], ctorParameters: () => [] });
300
+
301
+ class HlmFieldTitle {
302
+ constructor() {
303
+ classes(() => 'gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50 flex w-fit items-center');
304
+ }
305
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
306
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmFieldTitle, isStandalone: true, selector: "[hlmFieldTitle],hlm-field-title", host: { attributes: { "data-slot": "field-label" } }, ngImport: i0 });
307
+ }
308
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldTitle, decorators: [{
309
+ type: Directive,
310
+ args: [{
311
+ selector: '[hlmFieldTitle],hlm-field-title',
312
+ host: { 'data-slot': 'field-label' },
313
+ }]
314
+ }], ctorParameters: () => [] });
315
+
316
+ /*
317
+ * Public API Surface of field
318
+ */
319
+ const HlmFieldImports = [
320
+ HlmField,
321
+ HlmFieldContent,
322
+ HlmFieldDescription,
323
+ HlmFieldError,
324
+ HlmFieldGroup,
325
+ HlmFieldLabel,
326
+ HlmFieldLegend,
327
+ HlmFieldSeparator,
328
+ HlmFieldSet,
329
+ HlmFieldTitle,
330
+ ];
331
+ class HlmFieldModule {
332
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
333
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldModule, imports: [HlmField,
334
+ HlmFieldContent,
335
+ HlmFieldDescription,
336
+ HlmFieldError,
337
+ HlmFieldGroup,
338
+ HlmFieldLabel,
339
+ HlmFieldLegend,
340
+ HlmFieldSeparator,
341
+ HlmFieldSet,
342
+ HlmFieldTitle], exports: [HlmField,
343
+ HlmFieldContent,
344
+ HlmFieldDescription,
345
+ HlmFieldError,
346
+ HlmFieldGroup,
347
+ HlmFieldLabel,
348
+ HlmFieldLegend,
349
+ HlmFieldSeparator,
350
+ HlmFieldSet,
351
+ HlmFieldTitle] });
352
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldModule });
353
+ }
354
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldModule, decorators: [{
355
+ type: NgModule,
356
+ args: [{
357
+ imports: [...HlmFieldImports],
358
+ exports: [...HlmFieldImports],
359
+ }]
360
+ }] });
361
+
362
+ /**
363
+ * Generated bundle index. Do not edit.
364
+ */
365
+
366
+ export { HlmField, HlmFieldContent, HlmFieldDescription, HlmFieldError, HlmFieldGroup, HlmFieldImports, HlmFieldLabel, HlmFieldLegend, HlmFieldModule, HlmFieldSeparator, HlmFieldSet, HlmFieldTitle };
367
+ //# sourceMappingURL=field.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field.mjs","sources":["../../../projects/field/src/lib/hlm-field.ts","../../../projects/field/src/lib/hlm-field-content.ts","../../../projects/field/src/lib/hlm-field-description.ts","../../../projects/field/src/lib/hlm-field-error.ts","../../../projects/field/src/lib/hlm-field-group.ts","../../../projects/field/src/lib/hlm-field-label.ts","../../../projects/field/src/lib/hlm-field-legend.ts","../../../projects/field/src/lib/hlm-field-separator.ts","../../../projects/field/src/lib/hlm-field-set.ts","../../../projects/field/src/lib/hlm-field-title.ts","../../../projects/field/src/public-api.ts","../../../projects/field/src/field.ts"],"sourcesContent":["import { Directive, input } from '@angular/core';\nimport { BrnField } from '@spartan-ng/brain/field';\nimport { classes } from '@egose/shadcn-theme-ng/utils';\nimport { cva, VariantProps } from 'class-variance-authority';\n\nconst fieldVariants = cva('data-[matches-spartan-invalid=true]:text-destructive gap-3 group/field flex w-full', {\n variants: {\n orientation: {\n vertical: 'flex-col *:w-full [&>.sr-only]:w-auto',\n horizontal: [\n 'flex-row items-center',\n '*:data-[slot=field-label]:flex-auto',\n 'has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n responsive: [\n 'flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto [&>.sr-only]:w-auto',\n '@md/field-group:*:data-[slot=field-label]:flex-auto',\n '@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n },\n },\n defaultVariants: {\n orientation: 'vertical',\n },\n});\n\nexport type FieldVariants = VariantProps<typeof fieldVariants>;\n\n@Directive({\n selector: '[hlmField],hlm-field',\n hostDirectives: [{ directive: BrnField, inputs: ['data-invalid', 'forceInvalid'] }],\n host: {\n role: 'group',\n 'data-slot': 'field',\n '[attr.data-orientation]': 'orientation()',\n },\n})\nexport class HlmField {\n public readonly orientation = input<FieldVariants['orientation']>('vertical');\n\n constructor() {\n classes(() => fieldVariants({ orientation: this.orientation() }));\n }\n}\n","import { Directive } from '@angular/core';\nimport { classes } from '@egose/shadcn-theme-ng/utils';\n\n@Directive({\n selector: '[hlmFieldContent],hlm-field-content',\n host: { 'data-slot': 'field-content' },\n})\nexport class HlmFieldContent {\n constructor() {\n classes(() => 'gap-1 group/field-content flex flex-1 flex-col leading-snug');\n }\n}\n","import { Directive, effect, EffectRef, inject, input, OnDestroy } from '@angular/core';\nimport { BrnFieldA11yService } from '@spartan-ng/brain/field';\nimport { classes } from '@egose/shadcn-theme-ng/utils';\n\n@Directive({\n selector: '[hlmFieldDescription],hlm-field-description',\n host: {\n 'data-slot': 'field-description',\n '[attr.id]': 'id()',\n },\n})\nexport class HlmFieldDescription implements OnDestroy {\n private static _id = 0;\n\n private readonly _a11y = inject(BrnFieldA11yService, { optional: true, host: true });\n\n public readonly id = input<string>(`hlm-field-description-${HlmFieldDescription._id++}`);\n\n private _registeredId?: string;\n\n private readonly _cleanup: EffectRef | null = this._a11y\n ? effect(() => {\n const a11y = this._a11y;\n if (!a11y) return;\n\n const id = this.id();\n if (this._registeredId && this._registeredId !== id) {\n a11y.unregisterDescription(this._registeredId);\n }\n\n if (this._registeredId !== id) {\n a11y.registerDescription(id);\n this._registeredId = id;\n }\n })\n : null;\n\n constructor() {\n classes(() => [\n 'text-muted-foreground text-start text-sm [[data-variant=legend]+&]:-mt-1.5 leading-normal font-normal group-has-data-horizontal/field:text-balance',\n 'last:mt-0 nth-last-2:-mt-1',\n '[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',\n ]);\n }\n\n ngOnDestroy() {\n this._cleanup?.destroy();\n\n if (this._registeredId) {\n this._a11y?.unregisterDescription(this._registeredId);\n }\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n EffectRef,\n inject,\n input,\n OnDestroy,\n} from '@angular/core';\nimport { BrnField, BrnFieldA11yService } from '@spartan-ng/brain/field';\nimport { classes } from '@egose/shadcn-theme-ng/utils';\n\n@Component({\n selector: 'hlm-field-error',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n role: 'alert',\n 'data-slot': 'field-error',\n '[attr.id]': 'id()',\n '[hidden]': '!_display()',\n },\n template: `\n @if (_display()) {\n <ng-content />\n }\n `,\n})\nexport class HlmFieldError implements OnDestroy {\n private static _id = 0;\n\n private readonly _field = inject(BrnField, { optional: true });\n private readonly _a11y = inject(BrnFieldA11yService, { optional: true, host: true });\n\n private _registeredId?: string | undefined;\n\n private readonly _hasParentField = !!this._field;\n\n /** The unique ID for the field error. If none is supplied, it will be auto-generated. */\n public readonly id = input<string>(`hlm-field-error-${HlmFieldError._id++}`);\n\n /**\n * The name of the specific validator error key to match (e.g. 'required').\n * When omitted, the error is shown if any validation error is present.\n */\n public readonly validator = input<string>();\n\n /** Forces the error message to be visible regardless of the control's validation state. */\n public readonly forceShow = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n protected readonly _display = computed(() => !this._hasParentField || this.forceShow() || this._hasError());\n\n protected readonly _hasError = computed(() => {\n const errors = this._field?.errors();\n if (!errors) return false;\n\n const validator = this.validator();\n const spartanInvalid = this._field?.controlState()?.spartanInvalid;\n\n if (!spartanInvalid) return false;\n\n return validator ? validator in errors : Object.keys(errors).length > 0;\n });\n\n private readonly _cleanup: EffectRef | null = this._a11y\n ? effect(() => {\n const a11y = this._a11y;\n if (!a11y) return;\n\n const id = this.id();\n const hasError = this._hasError();\n\n if (this._registeredId && (this._registeredId !== id || !hasError)) {\n a11y.unregisterError(this._registeredId);\n this._registeredId = undefined;\n }\n\n if (hasError && this._registeredId !== id) {\n a11y.registerError(id);\n this._registeredId = id;\n }\n })\n : null;\n\n constructor() {\n classes(() => 'text-destructive text-sm font-normal');\n }\n\n ngOnDestroy() {\n this._cleanup?.destroy();\n\n if (this._registeredId) {\n this._a11y?.unregisterError(this._registeredId);\n }\n }\n}\n","import { Directive } from '@angular/core';\nimport { classes } from '@egose/shadcn-theme-ng/utils';\n\n@Directive({\n selector: '[hlmFieldGroup],hlm-field-group',\n host: { 'data-slot': 'field-group' },\n})\nexport class HlmFieldGroup {\n constructor() {\n classes(\n () =>\n 'gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4 group/field-group @container/field-group flex w-full flex-col',\n );\n }\n}\n","import { Directive } from '@angular/core';\nimport { HlmLabel } from '@egose/shadcn-theme-ng/label';\nimport { classes } from '@egose/shadcn-theme-ng/utils';\n\n@Directive({\n selector: '[hlmFieldLabel],hlm-field-label',\n hostDirectives: [HlmLabel],\n host: { 'data-slot': 'field-label' },\n})\nexport class HlmFieldLabel {\n constructor() {\n classes(() => [\n 'has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-3 group/field-label peer/field-label flex w-fit',\n 'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col',\n ]);\n }\n}\n","import { Directive, input } from '@angular/core';\nimport { classes } from '@egose/shadcn-theme-ng/utils';\n\n@Directive({\n selector: 'legend[hlmFieldLegend]',\n host: {\n 'data-slot': 'field-legend',\n '[attr.data-variant]': 'variant()',\n },\n})\nexport class HlmFieldLegend {\n public readonly variant = input<'label' | 'legend'>('legend');\n\n constructor() {\n classes(() => 'mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base');\n }\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { HlmSeparator } from '@egose/shadcn-theme-ng/separator';\nimport { classes } from '@egose/shadcn-theme-ng/utils';\n\n@Component({\n selector: 'hlm-field-separator',\n imports: [HlmSeparator],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { 'data-slot': 'field-separator' },\n template: `\n <hlm-separator class=\"absolute inset-0 top-1/2\" />\n <span\n data-slot=\"field-separator-content\"\n class=\"text-muted-foreground px-2 bg-background relative mx-auto block w-fit\"\n >\n <ng-content />\n </span>\n `,\n})\nexport class HlmFieldSeparator {\n constructor() {\n classes(() => '-my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2 relative');\n }\n}\n","import { Directive } from '@angular/core';\nimport { classes } from '@egose/shadcn-theme-ng/utils';\n\n@Directive({\n selector: 'fieldset[hlmFieldSet]',\n host: { 'data-slot': 'field-set' },\n})\nexport class HlmFieldSet {\n constructor() {\n classes(() => 'gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col');\n }\n}\n","import { Directive } from '@angular/core';\nimport { classes } from '@egose/shadcn-theme-ng/utils';\n\n@Directive({\n selector: '[hlmFieldTitle],hlm-field-title',\n host: { 'data-slot': 'field-label' },\n})\nexport class HlmFieldTitle {\n constructor() {\n classes(\n () =>\n 'gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50 flex w-fit items-center',\n );\n }\n}\n","/*\n * Public API Surface of field\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmField } from './lib/hlm-field';\nimport { HlmFieldContent } from './lib/hlm-field-content';\nimport { HlmFieldDescription } from './lib/hlm-field-description';\nimport { HlmFieldError } from './lib/hlm-field-error';\nimport { HlmFieldGroup } from './lib/hlm-field-group';\nimport { HlmFieldLabel } from './lib/hlm-field-label';\nimport { HlmFieldLegend } from './lib/hlm-field-legend';\nimport { HlmFieldSeparator } from './lib/hlm-field-separator';\nimport { HlmFieldSet } from './lib/hlm-field-set';\nimport { HlmFieldTitle } from './lib/hlm-field-title';\n\nexport * from './lib/hlm-field';\nexport * from './lib/hlm-field-content';\nexport * from './lib/hlm-field-description';\nexport * from './lib/hlm-field-error';\nexport * from './lib/hlm-field-group';\nexport * from './lib/hlm-field-label';\nexport * from './lib/hlm-field-legend';\nexport * from './lib/hlm-field-separator';\nexport * from './lib/hlm-field-set';\nexport * from './lib/hlm-field-title';\n\nexport const HlmFieldImports = [\n HlmField,\n HlmFieldContent,\n HlmFieldDescription,\n HlmFieldError,\n HlmFieldGroup,\n HlmFieldLabel,\n HlmFieldLegend,\n HlmFieldSeparator,\n HlmFieldSet,\n HlmFieldTitle,\n] as const;\n\n@NgModule({\n imports: [...HlmFieldImports],\n exports: [...HlmFieldImports],\n})\nexport class HlmFieldModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;AAKA,MAAM,aAAa,GAAG,GAAG,CAAC,oFAAoF,EAAE;AAC9G,IAAA,QAAQ,EAAE;AACR,QAAA,WAAW,EAAE;AACX,YAAA,QAAQ,EAAE,uCAAuC;AACjD,YAAA,UAAU,EAAE;gBACV,uBAAuB;gBACvB,qCAAqC;gBACrC,sHAAsH;AACvH,aAAA;AACD,YAAA,UAAU,EAAE;gBACV,sHAAsH;gBACtH,qDAAqD;gBACrD,sJAAsJ;AACvJ,aAAA;AACF,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,WAAW,EAAE,UAAU;AACxB,KAAA;AACF,CAAA,CAAC;MAaW,QAAQ,CAAA;IACH,WAAW,GAAG,KAAK,CAA+B,UAAU;oFAAC;AAE7E,IAAA,WAAA,GAAA;AACE,QAAA,OAAO,CAAC,MAAM,aAAa,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IACnE;uGALW,QAAQ,EAAA,IAAA,EAA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C,oBAAA,IAAI,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE;AACrC,iBAAA;;;ACND;;AAEG;AA0BI,MAAM,eAAe,GAAG;IAC7B,QAAQ;IACR,eAAe;IACf,mBAAmB;IACnB,aAAa;IACb,aAAa;IACb,aAAa;IACb,cAAc;IACd,iBAAiB;IACjB,WAAW;IACX,aAAa;;MAOF,cAAc,CAAA;uGAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAhBzB,QAAQ;YACR,eAAe;YACf,mBAAmB;YACnB,aAAa;YACb,aAAa;YACb,aAAa;YACb,cAAc;YACd,iBAAiB;YACjB,WAAW;AACX,YAAA,aAAa,aATb,QAAQ;YACR,eAAe;YACf,mBAAmB;YACnB,aAAa;YACb,aAAa;YACb,aAAa;YACb,cAAc;YACd,iBAAiB;YACjB,WAAW;YACX,aAAa,CAAA,EAAA,CAAA;wGAOF,cAAc,EAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,eAAe,CAAC;AAC7B,oBAAA,OAAO,EAAE,CAAC,GAAG,eAAe,CAAC;AAC9B,iBAAA;;;AC5CD;;AAEG;;;;"}
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "field",
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/field.mjs",
14
+ "typings": "types/field.d.ts",
15
+ "exports": {
16
+ "./package.json": {
17
+ "default": "./package.json"
18
+ },
19
+ ".": {
20
+ "types": "./types/field.d.ts",
21
+ "default": "./fesm2022/field.mjs"
22
+ }
23
+ },
24
+ "type": "module"
25
+ }
@@ -0,0 +1,107 @@
1
+ import * as i0 from '@angular/core';
2
+ import { OnDestroy } from '@angular/core';
3
+ import * as class_variance_authority_types from 'class-variance-authority/types';
4
+ import { VariantProps } from 'class-variance-authority';
5
+ import * as i1 from '@spartan-ng/brain/field';
6
+ import { BooleanInput } from '@angular/cdk/coercion';
7
+ import * as i1$1 from '@egose/shadcn-theme-ng/label';
8
+
9
+ declare const fieldVariants: (props?: ({
10
+ orientation?: "vertical" | "horizontal" | "responsive" | null | undefined;
11
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
12
+ type FieldVariants = VariantProps<typeof fieldVariants>;
13
+ declare class HlmField {
14
+ readonly orientation: i0.InputSignal<"vertical" | "horizontal" | "responsive" | null | undefined>;
15
+ constructor();
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmField, never>;
17
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmField, "[hlmField],hlm-field", never, { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.BrnField; inputs: { "data-invalid": "data-invalid"; "forceInvalid": "forceInvalid"; }; outputs: {}; }]>;
18
+ }
19
+
20
+ declare class HlmFieldContent {
21
+ constructor();
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmFieldContent, never>;
23
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmFieldContent, "[hlmFieldContent],hlm-field-content", never, {}, {}, never, never, true, never>;
24
+ }
25
+
26
+ declare class HlmFieldDescription implements OnDestroy {
27
+ private static _id;
28
+ private readonly _a11y;
29
+ readonly id: i0.InputSignal<string>;
30
+ private _registeredId?;
31
+ private readonly _cleanup;
32
+ constructor();
33
+ ngOnDestroy(): void;
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmFieldDescription, never>;
35
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmFieldDescription, "[hlmFieldDescription],hlm-field-description", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
36
+ }
37
+
38
+ declare class HlmFieldError implements OnDestroy {
39
+ private static _id;
40
+ private readonly _field;
41
+ private readonly _a11y;
42
+ private _registeredId?;
43
+ private readonly _hasParentField;
44
+ /** The unique ID for the field error. If none is supplied, it will be auto-generated. */
45
+ readonly id: i0.InputSignal<string>;
46
+ /**
47
+ * The name of the specific validator error key to match (e.g. 'required').
48
+ * When omitted, the error is shown if any validation error is present.
49
+ */
50
+ readonly validator: i0.InputSignal<string | undefined>;
51
+ /** Forces the error message to be visible regardless of the control's validation state. */
52
+ readonly forceShow: i0.InputSignalWithTransform<boolean, BooleanInput>;
53
+ protected readonly _display: i0.Signal<boolean>;
54
+ protected readonly _hasError: i0.Signal<boolean>;
55
+ private readonly _cleanup;
56
+ constructor();
57
+ ngOnDestroy(): void;
58
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmFieldError, never>;
59
+ static ɵcmp: i0.ɵɵComponentDeclaration<HlmFieldError, "hlm-field-error", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "validator": { "alias": "validator"; "required": false; "isSignal": true; }; "forceShow": { "alias": "forceShow"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
60
+ }
61
+
62
+ declare class HlmFieldGroup {
63
+ constructor();
64
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmFieldGroup, never>;
65
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmFieldGroup, "[hlmFieldGroup],hlm-field-group", never, {}, {}, never, never, true, never>;
66
+ }
67
+
68
+ declare class HlmFieldLabel {
69
+ constructor();
70
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmFieldLabel, never>;
71
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmFieldLabel, "[hlmFieldLabel],hlm-field-label", never, {}, {}, never, never, true, [{ directive: typeof i1$1.HlmLabel; inputs: {}; outputs: {}; }]>;
72
+ }
73
+
74
+ declare class HlmFieldLegend {
75
+ readonly variant: i0.InputSignal<"label" | "legend">;
76
+ constructor();
77
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmFieldLegend, never>;
78
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmFieldLegend, "legend[hlmFieldLegend]", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
79
+ }
80
+
81
+ declare class HlmFieldSeparator {
82
+ constructor();
83
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmFieldSeparator, never>;
84
+ static ɵcmp: i0.ɵɵComponentDeclaration<HlmFieldSeparator, "hlm-field-separator", never, {}, {}, never, ["*"], true, never>;
85
+ }
86
+
87
+ declare class HlmFieldSet {
88
+ constructor();
89
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmFieldSet, never>;
90
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmFieldSet, "fieldset[hlmFieldSet]", never, {}, {}, never, never, true, never>;
91
+ }
92
+
93
+ declare class HlmFieldTitle {
94
+ constructor();
95
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmFieldTitle, never>;
96
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmFieldTitle, "[hlmFieldTitle],hlm-field-title", never, {}, {}, never, never, true, never>;
97
+ }
98
+
99
+ declare const HlmFieldImports: readonly [typeof HlmField, typeof HlmFieldContent, typeof HlmFieldDescription, typeof HlmFieldError, typeof HlmFieldGroup, typeof HlmFieldLabel, typeof HlmFieldLegend, typeof HlmFieldSeparator, typeof HlmFieldSet, typeof HlmFieldTitle];
100
+ declare class HlmFieldModule {
101
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmFieldModule, never>;
102
+ static ɵmod: i0.ɵɵNgModuleDeclaration<HlmFieldModule, never, [typeof HlmField, typeof HlmFieldContent, typeof HlmFieldDescription, typeof HlmFieldError, typeof HlmFieldGroup, typeof HlmFieldLabel, typeof HlmFieldLegend, typeof HlmFieldSeparator, typeof HlmFieldSet, typeof HlmFieldTitle], [typeof HlmField, typeof HlmFieldContent, typeof HlmFieldDescription, typeof HlmFieldError, typeof HlmFieldGroup, typeof HlmFieldLabel, typeof HlmFieldLegend, typeof HlmFieldSeparator, typeof HlmFieldSet, typeof HlmFieldTitle]>;
103
+ static ɵinj: i0.ɵɵInjectorDeclaration<HlmFieldModule>;
104
+ }
105
+
106
+ export { HlmField, HlmFieldContent, HlmFieldDescription, HlmFieldError, HlmFieldGroup, HlmFieldImports, HlmFieldLabel, HlmFieldLegend, HlmFieldModule, HlmFieldSeparator, HlmFieldSet, HlmFieldTitle };
107
+ export type { FieldVariants };
@@ -0,0 +1,64 @@
1
+ # FormCheckbox
2
+
3
+ This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.3.0.
4
+
5
+ ## Code scaffolding
6
+
7
+ Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
8
+
9
+ ```bash
10
+ ng generate component component-name
11
+ ```
12
+
13
+ For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
14
+
15
+ ```bash
16
+ ng generate --help
17
+ ```
18
+
19
+ ## Building
20
+
21
+ To build the library, run:
22
+
23
+ ```bash
24
+ ng build form-checkbox
25
+ ```
26
+
27
+ This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
28
+
29
+ ### Publishing the Library
30
+
31
+ Once the project is built, you can publish your library by following these steps:
32
+
33
+ 1. Navigate to the `dist` directory:
34
+
35
+ ```bash
36
+ cd dist/form-checkbox
37
+ ```
38
+
39
+ 2. Run the `npm publish` command to publish your library to the npm registry:
40
+ ```bash
41
+ npm publish
42
+ ```
43
+
44
+ ## Running unit tests
45
+
46
+ To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
47
+
48
+ ```bash
49
+ ng test
50
+ ```
51
+
52
+ ## Running end-to-end tests
53
+
54
+ For end-to-end (e2e) testing, run:
55
+
56
+ ```bash
57
+ ng e2e
58
+ ```
59
+
60
+ Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
61
+
62
+ ## Additional Resources
63
+
64
+ For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.