@egose/shadcn-theme-ng 0.0.28 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/README.md +130 -13
  2. package/accordion/README.md +376 -34
  3. package/accordion/fesm2022/accordion.mjs +27 -39
  4. package/alert/README.md +343 -34
  5. package/alert/fesm2022/alert.mjs +47 -47
  6. package/alert-dialog/README.md +471 -5
  7. package/alert-dialog/fesm2022/alert-dialog.mjs +47 -47
  8. package/aspect-ratio/README.md +272 -5
  9. package/aspect-ratio/fesm2022/aspect-ratio.mjs +9 -9
  10. package/autocomplete/README.md +473 -34
  11. package/autocomplete/fesm2022/autocomplete.mjs +53 -71
  12. package/avatar/README.md +357 -5
  13. package/avatar/fesm2022/avatar.mjs +32 -32
  14. package/badge/README.md +289 -34
  15. package/badge/fesm2022/badge.mjs +57 -57
  16. package/basic-alert/README.md +324 -34
  17. package/basic-alert/fesm2022/basic-alert.mjs +6 -18
  18. package/breadcrumb/README.md +406 -5
  19. package/breadcrumb/fesm2022/breadcrumb.mjs +33 -39
  20. package/button/README.md +453 -34
  21. package/button/fesm2022/button.mjs +147 -219
  22. package/button/types/button.d.ts +7 -10
  23. package/button-group/README.md +318 -5
  24. package/button-group/fesm2022/button-group.mjs +20 -20
  25. package/calendar/README.md +328 -34
  26. package/calendar/fesm2022/calendar.mjs +29 -743
  27. package/card/README.md +331 -5
  28. package/card/fesm2022/card.mjs +33 -33
  29. package/carousel/README.md +333 -5
  30. package/carousel/fesm2022/carousel.mjs +39 -78
  31. package/checkbox/README.md +291 -34
  32. package/checkbox/fesm2022/checkbox.mjs +20 -58
  33. package/checkbox/types/checkbox.d.ts +5 -4
  34. package/collapsible/README.md +332 -5
  35. package/collapsible/fesm2022/collapsible.mjs +15 -15
  36. package/combobox/README.md +507 -5
  37. package/combobox/fesm2022/combobox.mjs +91 -224
  38. package/command/README.md +435 -5
  39. package/command/fesm2022/command.mjs +49 -109
  40. package/confirmation-dialog/README.md +272 -34
  41. package/confirmation-dialog/fesm2022/confirmation-dialog.mjs +15 -40
  42. package/confirmation-dialog/types/confirmation-dialog.d.ts +8 -4
  43. package/context-menu/README.md +366 -5
  44. package/context-menu/fesm2022/context-menu.mjs +9 -9
  45. package/date-picker/README.md +436 -34
  46. package/date-picker/fesm2022/date-picker.mjs +64 -267
  47. package/date-picker/types/date-picker.d.ts +7 -3
  48. package/dialog/README.md +419 -34
  49. package/dialog/fesm2022/dialog.mjs +45 -71
  50. package/drawer/README.md +395 -5
  51. package/drawer/fesm2022/drawer.mjs +44 -54
  52. package/dropdown-menu/README.md +417 -5
  53. package/dropdown-menu/fesm2022/dropdown-menu.mjs +82 -70
  54. package/dropdown-menu/types/dropdown-menu.d.ts +4 -0
  55. package/empty/README.md +329 -5
  56. package/empty/fesm2022/empty.mjs +30 -30
  57. package/field/README.md +385 -5
  58. package/field/fesm2022/field.mjs +56 -72
  59. package/form-checkbox/README.md +283 -34
  60. package/form-checkbox/fesm2022/form-checkbox.mjs +25 -85
  61. package/form-checkbox/types/form-checkbox.d.ts +7 -1
  62. package/form-date-picker/README.md +293 -34
  63. package/form-date-picker/fesm2022/form-date-picker.mjs +31 -84
  64. package/form-date-picker/types/form-date-picker.d.ts +7 -1
  65. package/form-field/README.md +327 -34
  66. package/form-field/fesm2022/form-field.mjs +33 -19
  67. package/form-field/types/form-field.d.ts +28 -20
  68. package/form-field-simple/README.md +311 -34
  69. package/form-field-simple/fesm2022/form-field-simple.mjs +4 -4
  70. package/form-searchable-multiselect/README.md +332 -34
  71. package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +31 -91
  72. package/form-searchable-multiselect/types/form-searchable-multiselect.d.ts +7 -1
  73. package/form-select/README.md +321 -34
  74. package/form-select/fesm2022/form-select.mjs +32 -149
  75. package/form-select/types/form-select.d.ts +7 -1
  76. package/form-text-input/README.md +342 -34
  77. package/form-text-input/fesm2022/form-text-input.mjs +35 -149
  78. package/form-text-input/types/form-text-input.d.ts +9 -12
  79. package/form-textarea/README.md +318 -34
  80. package/form-textarea/fesm2022/form-textarea.mjs +34 -109
  81. package/form-textarea/types/form-textarea.d.ts +8 -1
  82. package/hover-card/README.md +256 -5
  83. package/hover-card/fesm2022/hover-card.mjs +19 -19
  84. package/icon/README.md +210 -34
  85. package/icon/fesm2022/icon.mjs +8 -8
  86. package/input/README.md +240 -34
  87. package/input/fesm2022/input.mjs +17 -12
  88. package/input/types/input.d.ts +2 -1
  89. package/input-group/README.md +335 -5
  90. package/input-group/fesm2022/input-group.mjs +34 -34
  91. package/input-otp/README.md +375 -5
  92. package/input-otp/fesm2022/input-otp.mjs +26 -26
  93. package/item/README.md +385 -5
  94. package/item/fesm2022/item.mjs +53 -53
  95. package/kbd/README.md +291 -5
  96. package/kbd/fesm2022/kbd.mjs +12 -12
  97. package/label/README.md +243 -34
  98. package/label/fesm2022/label.mjs +10 -10
  99. package/label/types/label.d.ts +1 -1
  100. package/layout-simple/README.md +174 -44
  101. package/layout-simple/fesm2022/layout-simple.mjs +508 -603
  102. package/layout-simple/types/layout-simple.d.ts +179 -128
  103. package/menu/README.md +418 -0
  104. package/menu/fesm2022/menu.mjs +455 -0
  105. package/menu/package.json +24 -0
  106. package/menu/types/menu.d.ts +137 -0
  107. package/menubar/README.md +343 -5
  108. package/menubar/fesm2022/menubar.mjs +13 -13
  109. package/native-select/README.md +323 -5
  110. package/native-select/fesm2022/native-select.mjs +19 -19
  111. package/navigation-menu/README.md +369 -5
  112. package/navigation-menu/fesm2022/navigation-menu.mjs +35 -47
  113. package/package.json +183 -154
  114. package/pagination/README.md +388 -5
  115. package/pagination/fesm2022/pagination.mjs +45 -331
  116. package/popover/README.md +302 -34
  117. package/popover/fesm2022/popover.mjs +30 -30
  118. package/progress/README.md +311 -5
  119. package/progress/fesm2022/progress.mjs +13 -13
  120. package/radio-group/README.md +335 -34
  121. package/radio-group/fesm2022/radio-group.mjs +26 -19
  122. package/radio-group/types/radio-group.d.ts +1 -1
  123. package/resizable/README.md +269 -5
  124. package/resizable/fesm2022/resizable.mjs +18 -26
  125. package/scroll-area/README.md +233 -5
  126. package/scroll-area/fesm2022/scroll-area.mjs +9 -9
  127. package/searchable-multiselect/README.md +294 -34
  128. package/searchable-multiselect/fesm2022/searchable-multiselect.mjs +28 -117
  129. package/searchable-multiselect/types/searchable-multiselect.d.ts +8 -2
  130. package/select/README.md +408 -34
  131. package/select/fesm2022/select.mjs +71 -111
  132. package/select/types/select.d.ts +3 -1
  133. package/separator/README.md +193 -34
  134. package/separator/fesm2022/separator.mjs +9 -9
  135. package/separator/types/separator.d.ts +1 -1
  136. package/sheet/README.md +282 -34
  137. package/sheet/fesm2022/sheet.mjs +41 -53
  138. package/sidebar/README.md +457 -5
  139. package/sidebar/fesm2022/sidebar.mjs +125 -227
  140. package/skeleton/README.md +217 -5
  141. package/skeleton/fesm2022/skeleton.mjs +9 -9
  142. package/slider/README.md +273 -5
  143. package/slider/fesm2022/slider.mjs +10 -80
  144. package/sonner/README.md +317 -34
  145. package/sonner/fesm2022/sonner.mjs +13 -13
  146. package/spinner/README.md +255 -34
  147. package/spinner/fesm2022/spinner.mjs +11 -11
  148. package/switch/README.md +281 -34
  149. package/switch/fesm2022/switch.mjs +13 -15
  150. package/table/README.md +423 -5
  151. package/table/fesm2022/table.mjs +41 -41
  152. package/tabs/README.md +382 -34
  153. package/tabs/fesm2022/tabs.mjs +35 -111
  154. package/textarea/README.md +282 -5
  155. package/textarea/fesm2022/textarea.mjs +9 -9
  156. package/toggle/README.md +270 -5
  157. package/toggle/fesm2022/toggle.mjs +13 -13
  158. package/toggle-group/README.md +340 -5
  159. package/toggle-group/fesm2022/toggle-group.mjs +13 -13
  160. package/toggle-group/types/toggle-group.d.ts +13 -7
  161. package/tooltip/README.md +240 -34
  162. package/tooltip/fesm2022/tooltip.mjs +14 -14
  163. package/typography/README.md +271 -5
  164. package/typography/fesm2022/typography.mjs +53 -53
  165. package/typography/types/typography.d.ts +19 -19
  166. package/utils/README.md +274 -34
  167. package/utils/fesm2022/utils.mjs +68 -44
  168. package/accordion/fesm2022/accordion.mjs.map +0 -1
  169. package/alert/fesm2022/alert.mjs.map +0 -1
  170. package/alert-dialog/fesm2022/alert-dialog.mjs.map +0 -1
  171. package/aspect-ratio/fesm2022/aspect-ratio.mjs.map +0 -1
  172. package/autocomplete/fesm2022/autocomplete.mjs.map +0 -1
  173. package/avatar/fesm2022/avatar.mjs.map +0 -1
  174. package/badge/fesm2022/badge.mjs.map +0 -1
  175. package/basic-alert/fesm2022/basic-alert.mjs.map +0 -1
  176. package/breadcrumb/fesm2022/breadcrumb.mjs.map +0 -1
  177. package/button/fesm2022/button.mjs.map +0 -1
  178. package/button-group/fesm2022/button-group.mjs.map +0 -1
  179. package/calendar/fesm2022/calendar.mjs.map +0 -1
  180. package/card/fesm2022/card.mjs.map +0 -1
  181. package/carousel/fesm2022/carousel.mjs.map +0 -1
  182. package/checkbox/fesm2022/checkbox.mjs.map +0 -1
  183. package/collapsible/fesm2022/collapsible.mjs.map +0 -1
  184. package/combobox/fesm2022/combobox.mjs.map +0 -1
  185. package/command/fesm2022/command.mjs.map +0 -1
  186. package/confirmation-dialog/fesm2022/confirmation-dialog.mjs.map +0 -1
  187. package/context-menu/fesm2022/context-menu.mjs.map +0 -1
  188. package/date-picker/fesm2022/date-picker.mjs.map +0 -1
  189. package/dialog/fesm2022/dialog.mjs.map +0 -1
  190. package/drawer/fesm2022/drawer.mjs.map +0 -1
  191. package/dropdown-menu/fesm2022/dropdown-menu.mjs.map +0 -1
  192. package/empty/fesm2022/empty.mjs.map +0 -1
  193. package/field/fesm2022/field.mjs.map +0 -1
  194. package/form-checkbox/fesm2022/form-checkbox.mjs.map +0 -1
  195. package/form-date-picker/fesm2022/form-date-picker.mjs.map +0 -1
  196. package/form-field/fesm2022/form-field.mjs.map +0 -1
  197. package/form-field-simple/fesm2022/form-field-simple.mjs.map +0 -1
  198. package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs.map +0 -1
  199. package/form-select/fesm2022/form-select.mjs.map +0 -1
  200. package/form-text-input/fesm2022/form-text-input.mjs.map +0 -1
  201. package/form-textarea/fesm2022/form-textarea.mjs.map +0 -1
  202. package/hover-card/fesm2022/hover-card.mjs.map +0 -1
  203. package/icon/fesm2022/icon.mjs.map +0 -1
  204. package/input/fesm2022/input.mjs.map +0 -1
  205. package/input-group/fesm2022/input-group.mjs.map +0 -1
  206. package/input-otp/fesm2022/input-otp.mjs.map +0 -1
  207. package/item/fesm2022/item.mjs.map +0 -1
  208. package/kbd/fesm2022/kbd.mjs.map +0 -1
  209. package/label/fesm2022/label.mjs.map +0 -1
  210. package/layout-simple/fesm2022/layout-simple.mjs.map +0 -1
  211. package/menubar/fesm2022/menubar.mjs.map +0 -1
  212. package/native-select/fesm2022/native-select.mjs.map +0 -1
  213. package/navigation-menu/fesm2022/navigation-menu.mjs.map +0 -1
  214. package/pagination/fesm2022/pagination.mjs.map +0 -1
  215. package/popover/fesm2022/popover.mjs.map +0 -1
  216. package/progress/fesm2022/progress.mjs.map +0 -1
  217. package/radio-group/fesm2022/radio-group.mjs.map +0 -1
  218. package/resizable/fesm2022/resizable.mjs.map +0 -1
  219. package/scroll-area/fesm2022/scroll-area.mjs.map +0 -1
  220. package/searchable-multiselect/fesm2022/searchable-multiselect.mjs.map +0 -1
  221. package/select/fesm2022/select.mjs.map +0 -1
  222. package/separator/fesm2022/separator.mjs.map +0 -1
  223. package/sheet/fesm2022/sheet.mjs.map +0 -1
  224. package/sidebar/fesm2022/sidebar.mjs.map +0 -1
  225. package/skeleton/fesm2022/skeleton.mjs.map +0 -1
  226. package/slider/fesm2022/slider.mjs.map +0 -1
  227. package/sonner/fesm2022/sonner.mjs.map +0 -1
  228. package/spinner/fesm2022/spinner.mjs.map +0 -1
  229. package/switch/fesm2022/switch.mjs.map +0 -1
  230. package/table/fesm2022/table.mjs.map +0 -1
  231. package/tabs/fesm2022/tabs.mjs.map +0 -1
  232. package/textarea/fesm2022/textarea.mjs.map +0 -1
  233. package/toggle/fesm2022/toggle.mjs.map +0 -1
  234. package/toggle-group/fesm2022/toggle-group.mjs.map +0 -1
  235. package/tooltip/fesm2022/tooltip.mjs.map +0 -1
  236. package/typography/fesm2022/typography.mjs.map +0 -1
  237. package/utils/fesm2022/utils.mjs.map +0 -1
@@ -8,19 +8,19 @@ import * as i1$1 from '@egose/shadcn-theme-ng/label';
8
8
  import { HlmLabel } from '@egose/shadcn-theme-ng/label';
9
9
  import { HlmSeparator } from '@egose/shadcn-theme-ng/separator';
10
10
 
11
- const fieldVariants = cva('data-[matches-spartan-invalid=true]:text-destructive gap-3 group/field flex w-full', {
11
+ const fieldVariants = cva("data-[matches-spartan-invalid=true]:text-destructive gap-3 group/field flex w-full", {
12
12
  variants: {
13
13
  orientation: {
14
- vertical: 'flex-col *:w-full [&>.sr-only]:w-auto',
14
+ vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
15
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',
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
19
  ],
20
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',
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
24
  ],
25
25
  },
26
26
  },
@@ -34,10 +34,10 @@ class HlmField {
34
34
  constructor() {
35
35
  classes(() => fieldVariants({ orientation: this.orientation() }));
36
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 });
37
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmField, deps: [], target: i0.ɵɵFactoryTarget.Directive });
38
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", 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
39
  }
40
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmField, decorators: [{
40
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmField, decorators: [{
41
41
  type: Directive,
42
42
  args: [{
43
43
  selector: '[hlmField],hlm-field',
@@ -52,12 +52,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
52
52
 
53
53
  class HlmFieldContent {
54
54
  constructor() {
55
- classes(() => 'gap-1 group/field-content flex flex-1 flex-col leading-snug');
55
+ classes(() => "gap-1 group/field-content flex flex-1 flex-col leading-snug");
56
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 });
57
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmFieldContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
58
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmFieldContent, isStandalone: true, selector: "[hlmFieldContent],hlm-field-content", host: { attributes: { "data-slot": "field-content" } }, ngImport: i0 });
59
59
  }
60
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldContent, decorators: [{
60
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmFieldContent, decorators: [{
61
61
  type: Directive,
62
62
  args: [{
63
63
  selector: '[hlmFieldContent],hlm-field-content',
@@ -88,9 +88,9 @@ class HlmFieldDescription {
88
88
  : null;
89
89
  constructor() {
90
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',
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
94
  ]);
95
95
  }
96
96
  ngOnDestroy() {
@@ -99,10 +99,10 @@ class HlmFieldDescription {
99
99
  this._a11y?.unregisterDescription(this._registeredId);
100
100
  }
101
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 });
102
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmFieldDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
103
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", 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
104
  }
105
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldDescription, decorators: [{
105
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmFieldDescription, decorators: [{
106
106
  type: Directive,
107
107
  args: [{
108
108
  selector: '[hlmFieldDescription],hlm-field-description',
@@ -161,7 +161,7 @@ class HlmFieldError {
161
161
  })
162
162
  : null;
163
163
  constructor() {
164
- classes(() => 'text-destructive text-sm font-normal');
164
+ classes(() => "text-destructive text-sm font-normal");
165
165
  }
166
166
  ngOnDestroy() {
167
167
  this._cleanup?.destroy();
@@ -169,14 +169,14 @@ class HlmFieldError {
169
169
  this._a11y?.unregisterError(this._registeredId);
170
170
  }
171
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: `
172
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmFieldError, deps: [], target: i0.ɵɵFactoryTarget.Component });
173
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", 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
174
  @if (_display()) {
175
175
  <ng-content />
176
176
  }
177
177
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
178
178
  }
179
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldError, decorators: [{
179
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmFieldError, decorators: [{
180
180
  type: Component,
181
181
  args: [{
182
182
  selector: 'hlm-field-error',
@@ -197,12 +197,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
197
197
 
198
198
  class HlmFieldGroup {
199
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');
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
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 });
202
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmFieldGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
203
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmFieldGroup, isStandalone: true, selector: "[hlmFieldGroup],hlm-field-group", host: { attributes: { "data-slot": "field-group" } }, ngImport: i0 });
204
204
  }
205
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldGroup, decorators: [{
205
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmFieldGroup, decorators: [{
206
206
  type: Directive,
207
207
  args: [{
208
208
  selector: '[hlmFieldGroup],hlm-field-group',
@@ -213,14 +213,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
213
213
  class HlmFieldLabel {
214
214
  constructor() {
215
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',
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
218
  ]);
219
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 });
220
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmFieldLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
221
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmFieldLabel, isStandalone: true, selector: "[hlmFieldLabel],hlm-field-label", host: { attributes: { "data-slot": "field-label" } }, hostDirectives: [{ directive: i1$1.HlmLabel }], ngImport: i0 });
222
222
  }
223
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldLabel, decorators: [{
223
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmFieldLabel, decorators: [{
224
224
  type: Directive,
225
225
  args: [{
226
226
  selector: '[hlmFieldLabel],hlm-field-label',
@@ -233,12 +233,12 @@ class HlmFieldLegend {
233
233
  variant = input('legend', /* @ts-ignore */
234
234
  ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
235
235
  constructor() {
236
- classes(() => 'mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base');
236
+ classes(() => "mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base");
237
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 });
238
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmFieldLegend, deps: [], target: i0.ɵɵFactoryTarget.Directive });
239
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", 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
240
  }
241
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldLegend, decorators: [{
241
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmFieldLegend, decorators: [{
242
242
  type: Directive,
243
243
  args: [{
244
244
  selector: 'legend[hlmFieldLegend]',
@@ -251,46 +251,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
251
251
 
252
252
  class HlmFieldSeparator {
253
253
  constructor() {
254
- classes(() => '-my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2 relative');
254
+ classes(() => "-my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2 relative");
255
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 });
256
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmFieldSeparator, deps: [], target: i0.ɵɵFactoryTarget.Component });
257
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.3", type: HlmFieldSeparator, isStandalone: true, selector: "hlm-field-separator", host: { attributes: { "data-slot": "field-separator" } }, ngImport: i0, 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 ", isInline: true, dependencies: [{ kind: "directive", type: HlmSeparator, selector: "[hlmSeparator],hlm-separator" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
266
258
  }
267
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldSeparator, decorators: [{
259
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmFieldSeparator, decorators: [{
268
260
  type: Component,
269
261
  args: [{
270
262
  selector: 'hlm-field-separator',
271
263
  imports: [HlmSeparator],
272
264
  changeDetection: ChangeDetectionStrategy.OnPush,
273
265
  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
- `,
266
+ 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 ",
283
267
  }]
284
268
  }], ctorParameters: () => [] });
285
269
 
286
270
  class HlmFieldSet {
287
271
  constructor() {
288
- classes(() => 'gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col');
272
+ classes(() => "gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col");
289
273
  }
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 });
274
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmFieldSet, deps: [], target: i0.ɵɵFactoryTarget.Directive });
275
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmFieldSet, isStandalone: true, selector: "fieldset[hlmFieldSet]", host: { attributes: { "data-slot": "field-set" } }, ngImport: i0 });
292
276
  }
293
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldSet, decorators: [{
277
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmFieldSet, decorators: [{
294
278
  type: Directive,
295
279
  args: [{
296
280
  selector: 'fieldset[hlmFieldSet]',
@@ -300,12 +284,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
300
284
 
301
285
  class HlmFieldTitle {
302
286
  constructor() {
303
- classes(() => 'gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50 flex w-fit items-center');
287
+ classes(() => "gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50 flex w-fit items-center");
304
288
  }
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 });
289
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmFieldTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
290
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmFieldTitle, isStandalone: true, selector: "[hlmFieldTitle],hlm-field-title", host: { attributes: { "data-slot": "field-label" } }, ngImport: i0 });
307
291
  }
308
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldTitle, decorators: [{
292
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmFieldTitle, decorators: [{
309
293
  type: Directive,
310
294
  args: [{
311
295
  selector: '[hlmFieldTitle],hlm-field-title',
@@ -329,8 +313,8 @@ const HlmFieldImports = [
329
313
  HlmFieldTitle,
330
314
  ];
331
315
  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,
316
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
317
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: HlmFieldModule, imports: [HlmField,
334
318
  HlmFieldContent,
335
319
  HlmFieldDescription,
336
320
  HlmFieldError,
@@ -349,9 +333,9 @@ class HlmFieldModule {
349
333
  HlmFieldSeparator,
350
334
  HlmFieldSet,
351
335
  HlmFieldTitle] });
352
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldModule });
336
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmFieldModule });
353
337
  }
354
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmFieldModule, decorators: [{
338
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmFieldModule, decorators: [{
355
339
  type: NgModule,
356
340
  args: [{
357
341
  imports: [...HlmFieldImports],
@@ -364,4 +348,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
364
348
  */
365
349
 
366
350
  export { HlmField, HlmFieldContent, HlmFieldDescription, HlmFieldError, HlmFieldGroup, HlmFieldImports, HlmFieldLabel, HlmFieldLegend, HlmFieldModule, HlmFieldSeparator, HlmFieldSet, HlmFieldTitle };
367
- //# sourceMappingURL=field.mjs.map
351
+
@@ -1,64 +1,313 @@
1
- # FormCheckbox
1
+ # Form Checkbox (`@egose/shadcn-theme-ng/form-checkbox`)
2
2
 
3
- This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.3.0.
3
+ A ready-made reactive-form checkbox row: `hlm-checkbox` + label + required marker with automatic `hlm-error` / `hlm-hint` display, wrapped in `eg-form-field` error switching. Equivalent to shadcn/ui `Form` + `Checkbox` composition.
4
4
 
5
- ## Code scaffolding
5
+ The Angular implementation is a standalone `ControlValueAccessor`-compatible wrapper (not a brain
6
+ primitive itself): it renders `HlmCheckbox` bound with `formControlName`, `HlmLabel`, `EgFormField`
7
+ from `@egose/shadcn-theme-ng/form-field-simple`, and `HlmError` / `HlmHint` from
8
+ `@egose/shadcn-theme-ng/form-field`. It must live inside a `FormGroupDirective` (a
9
+ `[formGroup]` parent) and forwards `ControlContainer` to it. Ids are generated by
10
+ `HlmFormIdGenerator` unless overridden.
6
11
 
7
- Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
12
+ > **Ships as:** `@egose/shadcn-theme-ng/form-checkbox` and `@egose/shadcn-theme-ng-tw/form-checkbox`
13
+ > (the `tw:`-prefixed Tailwind variant). Both expose the identical TypeScript surface; only the
14
+ > emitted Tailwind class strings differ. See the [package README](../../README.md) for install
15
+ > steps, peer dependencies, and Tailwind setup. Do not publish this project directory independently.
16
+
17
+ ## Installation
8
18
 
9
19
  ```bash
10
- ng generate component component-name
20
+ # Plain Tailwind (no prefix)
21
+ npm install @egose/shadcn-theme-ng
22
+
23
+ # tw:-prefixed Tailwind variant
24
+ npm install @egose/shadcn-theme-ng-tw
11
25
  ```
12
26
 
13
- For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
27
+ Peer dependencies (Angular, `@spartan-ng/brain`, `@ng-icons/*`, `rxjs`, …) are documented in the
28
+ [package README](../../README.md#peer-dependencies). This subpath additionally relies at runtime on
29
+ `@egose/shadcn-theme-ng/checkbox`, `@egose/shadcn-theme-ng/label`,
30
+ `@egose/shadcn-theme-ng/form-field`, and `@egose/shadcn-theme-ng/form-field-simple`.
14
31
 
15
- ```bash
16
- ng generate --help
32
+ ## Imports
33
+
34
+ Exported from the subpath root (`projects/form-checkbox/src/public-api.ts`). Note: this subpath
35
+ exports a single standalone component — there is no `*Imports` array or `*Module`:
36
+
37
+ ```ts
38
+ import { EgFormCheckbox } from '@egose/shadcn-theme-ng/form-checkbox';
39
+ // tw variant: replace with '@egose/shadcn-theme-ng-tw/form-checkbox'
17
40
  ```
18
41
 
19
- ## Building
42
+ Standalone usage:
20
43
 
21
- To build the library, run:
44
+ ```ts
45
+ import { Component } from '@angular/core';
46
+ import { ReactiveFormsModule } from '@angular/forms';
47
+ import { EgFormCheckbox } from '@egose/shadcn-theme-ng/form-checkbox';
22
48
 
23
- ```bash
24
- ng build form-checkbox
49
+ @Component({
50
+ selector: 'app-demo',
51
+ standalone: true,
52
+ imports: [ReactiveFormsModule, EgFormCheckbox],
53
+ template: `...`,
54
+ })
55
+ export class DemoComponent {}
25
56
  ```
26
57
 
27
- This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
58
+ NgModule-based consumer: add `EgFormCheckbox` (and `ReactiveFormsModule`) to the module's `imports`
59
+ — it is a standalone component, not a module.
60
+
61
+ `ControlValueAccessor` behavior: `eg-form-checkbox` itself is not a `ControlValueAccessor`; the
62
+ inner `hlm-checkbox` is bound via `[formControlName]="controlName()"`, so the parent `FormGroup`
63
+ owns the value. `checked()` sets the initial checkbox input; the form control is the source of
64
+ truth afterwards.
28
65
 
29
- ### Publishing the Library
66
+ ## Anatomy / Structure
30
67
 
31
- Once the project is built, you can publish your library by following these steps:
68
+ ```html
69
+ <form [formGroup]="form">
70
+ <eg-form-checkbox
71
+ controlName="acceptTerms"
72
+ label="Accept terms and conditions"
73
+ [required]="true"
74
+ hint="You must accept to continue."
75
+ error="You must accept the terms."
76
+ />
77
+ </form>
78
+ ```
32
79
 
33
- 1. Navigate to the `dist` directory:
80
+ Selector (from source): `eg-form-checkbox` (standalone component).
34
81
 
35
- ```bash
36
- cd dist/form-checkbox
37
- ```
82
+ ## API reference
38
83
 
39
- 2. Run the `npm publish` command to publish your library to the npm registry:
40
- ```bash
41
- npm publish
42
- ```
84
+ ### `EgFormCheckbox` — `eg-form-checkbox`
43
85
 
44
- ## Running unit tests
86
+ | Input | Type | Default | Description |
87
+ | --------------- | --------------------- | ------- | ------------------------------------------------------------------------------------------- |
88
+ | `controlName` | `string` | `''` | `formControlName` key inside the parent `FormGroup`. **Required.** |
89
+ | `label` | `string` | `''` | Label text next to the checkbox. |
90
+ | `error` | `string \| undefined` | — | Error text shown when the control is invalid + touched/dirty (via `EgFormField` switching). |
91
+ | `hint` | `string \| undefined` | — | Hint text shown when there is no error to display. |
92
+ | `controlId` | `string \| undefined` | — | Explicit control id (first priority for `effectiveId`). |
93
+ | `id` | `string \| undefined` | — | Fallback id (second priority). |
94
+ | `name` | `string \| undefined` | — | Checkbox `name` attribute (defaults to `controlName`). |
95
+ | `checked` | `boolean` | `false` | Initial checked state passed to `hlm-checkbox`. |
96
+ | `required` | `boolean` | `false` | Shows a red `*` and sets checkbox `required`. |
97
+ | `disabled` | `boolean` | `false` | Locks interaction via checkbox `wrapperDisabled` (does not write to the form control). |
98
+ | `class` | `ClassValue` | `''` | Extra host classes. |
99
+ | `checkboxClass` | `string` | `''` | Extra classes for `hlm-checkbox`. |
100
+ | `labelClass` | `string` | `''` | Extra classes for the label. |
101
+ | `$errorClass` | `string` | `''` | Extra classes for `hlm-error`. (Note the `$` prefix — part of the real input name.) |
102
+ | `$hintClass` | `string` | `''` | Extra classes for `hlm-hint`. (Note the `$` prefix.) |
45
103
 
46
- To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
104
+ | Member | Description |
105
+ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
106
+ | `effectiveId` | `controlId() \|\| id() \|\| generated` — wired to checkbox `id` and label `for`. |
107
+ | `errorId` / `hintId` | `effectiveId + '-error' / '-hint'` for `aria-describedby`. |
108
+ | `describedBy()` | Returns `errorId` when `error()` is set and the control is invalid + dirty/touched, else `hintId` when `hint()` is set, else `null`. |
47
109
 
48
- ```bash
49
- ng test
110
+ Requires a `[formGroup]` ancestor: the component injects `FormGroupDirective` and provides
111
+ `ControlContainer → FormGroupDirective` so `formControlName` resolves.
112
+
113
+ ## Examples
114
+
115
+ ### 1. Basic required terms checkbox
116
+
117
+ ```ts
118
+ import { Component, inject } from '@angular/core';
119
+ import { FormBuilder, ReactiveFormsModule, Validators } from '@angular/forms';
120
+ import { EgFormCheckbox } from '@egose/shadcn-theme-ng/form-checkbox';
121
+
122
+ @Component({
123
+ selector: 'app-terms',
124
+ standalone: true,
125
+ imports: [ReactiveFormsModule, EgFormCheckbox],
126
+ template: `
127
+ <form [formGroup]="form" (ngSubmit)="submit()">
128
+ <eg-form-checkbox
129
+ controlName="accept"
130
+ label="Accept terms and conditions"
131
+ [required]="true"
132
+ error="You must accept the terms."
133
+ />
134
+ <button type="submit" [disabled]="form.invalid">Continue</button>
135
+ </form>
136
+ `,
137
+ })
138
+ export class TermsComponent {
139
+ private readonly fb = inject(FormBuilder);
140
+ readonly form = this.fb.group({ accept: [false, Validators.requiredTrue] });
141
+ submit() {
142
+ console.log(this.form.value);
143
+ }
144
+ }
50
145
  ```
51
146
 
52
- ## Running end-to-end tests
147
+ ### 2. Hint + validation error display
53
148
 
54
- For end-to-end (e2e) testing, run:
149
+ ```ts
150
+ import { Component, inject } from '@angular/core';
151
+ import { FormBuilder, ReactiveFormsModule, Validators } from '@angular/forms';
152
+ import { EgFormCheckbox } from '@egose/shadcn-theme-ng/form-checkbox';
55
153
 
56
- ```bash
57
- ng e2e
154
+ @Component({
155
+ selector: 'app-newsletter',
156
+ standalone: true,
157
+ imports: [ReactiveFormsModule, EgFormCheckbox],
158
+ template: `
159
+ <form [formGroup]="form">
160
+ <eg-form-checkbox
161
+ controlName="newsletter"
162
+ label="Email me news and offers"
163
+ hint="One email per month, unsubscribe anytime."
164
+ error="Please confirm your preference."
165
+ />
166
+ </form>
167
+ <p class="tw:text-sm">Value: {{ form.value.newsletter }}</p>
168
+ `,
169
+ })
170
+ export class NewsletterComponent {
171
+ private readonly fb = inject(FormBuilder);
172
+ readonly form = this.fb.group({ newsletter: [true, Validators.requiredTrue] });
173
+ }
174
+ ```
175
+
176
+ ### 3. Disabled / locked checkbox
177
+
178
+ ```ts
179
+ import { Component, inject } from '@angular/core';
180
+ import { FormBuilder, ReactiveFormsModule } from '@angular/forms';
181
+ import { EgFormCheckbox } from '@egose/shadcn-theme-ng/form-checkbox';
182
+
183
+ @Component({
184
+ selector: 'app-locked',
185
+ standalone: true,
186
+ imports: [ReactiveFormsModule, EgFormCheckbox],
187
+ template: `
188
+ <form [formGroup]="form">
189
+ <eg-form-checkbox
190
+ controlName="readonly"
191
+ label="Two-factor authentication (enforced)"
192
+ [checked]="true"
193
+ [disabled]="true"
194
+ hint="Managed by your organization."
195
+ />
196
+ </form>
197
+ `,
198
+ })
199
+ export class LockedComponent {
200
+ private readonly fb = inject(FormBuilder);
201
+ readonly form = this.fb.group({ readonly: [true] });
202
+ }
58
203
  ```
59
204
 
60
- Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
205
+ > `disabled` locks the UI via `wrapperDisabled` without disabling the form control itself, so the
206
+ > value still submits. To exclude the value, call `form.get('readonly')?.disable()` instead.
207
+
208
+ ### 4. Custom ids + styling hooks
209
+
210
+ ```ts
211
+ import { Component, inject } from '@angular/core';
212
+ import { FormBuilder, ReactiveFormsModule } from '@angular/forms';
213
+ import { EgFormCheckbox } from '@egose/shadcn-theme-ng/form-checkbox';
214
+
215
+ @Component({
216
+ selector: 'app-styled-check',
217
+ standalone: true,
218
+ imports: [ReactiveFormsModule, EgFormCheckbox],
219
+ template: `
220
+ <form [formGroup]="form">
221
+ <eg-form-checkbox
222
+ controlName="marketing"
223
+ controlId="marketing-opt-in"
224
+ label="Send me product updates"
225
+ checkboxClass="tw:border-primary"
226
+ labelClass="tw:font-medium"
227
+ class="tw:rounded-md tw:border tw:p-3"
228
+ />
229
+ </form>
230
+ `,
231
+ })
232
+ export class StyledCheckComponent {
233
+ private readonly fb = inject(FormBuilder);
234
+ readonly form = this.fb.group({ marketing: [false] });
235
+ }
236
+ ```
237
+
238
+ ### 5. Settings list (multiple checkboxes, one group)
239
+
240
+ ```ts
241
+ import { Component, inject } from '@angular/core';
242
+ import { FormBuilder, ReactiveFormsModule } from '@angular/forms';
243
+ import { EgFormCheckbox } from '@egose/shadcn-theme-ng/form-checkbox';
244
+
245
+ @Component({
246
+ selector: 'app-settings',
247
+ standalone: true,
248
+ imports: [ReactiveFormsModule, EgFormCheckbox],
249
+ template: `
250
+ <form [formGroup]="form" class="tw:grid tw:gap-3">
251
+ <eg-form-checkbox controlName="email" label="Email notifications" />
252
+ <eg-form-checkbox controlName="sms" label="SMS notifications" hint="Carrier rates may apply." />
253
+ <eg-form-checkbox controlName="push" label="Push notifications" />
254
+ </form>
255
+ <pre class="tw:text-xs">{{ form.value | json }}</pre>
256
+ `,
257
+ })
258
+ export class SettingsComponent {
259
+ private readonly fb = inject(FormBuilder);
260
+ readonly form = this.fb.group({ email: [true], sms: [false], push: [true] });
261
+ }
262
+ ```
263
+
264
+ ### 6. Submitted-state validation (mark all touched)
265
+
266
+ ```ts
267
+ import { Component, inject } from '@angular/core';
268
+ import { FormBuilder, ReactiveFormsModule, Validators } from '@angular/forms';
269
+ import { EgFormCheckbox } from '@egose/shadcn-theme-ng/form-checkbox';
270
+
271
+ @Component({
272
+ selector: 'app-submit-check',
273
+ standalone: true,
274
+ imports: [ReactiveFormsModule, EgFormCheckbox],
275
+ template: `
276
+ <form [formGroup]="form" (ngSubmit)="submit()">
277
+ <eg-form-checkbox
278
+ controlName="consent"
279
+ label="I consent to data processing"
280
+ [required]="true"
281
+ error="Consent is required to create your account."
282
+ />
283
+ <button type="submit">Create account</button>
284
+ </form>
285
+ `,
286
+ })
287
+ export class SubmitCheckComponent {
288
+ private readonly fb = inject(FormBuilder);
289
+ readonly form = this.fb.group({ consent: [false, Validators.requiredTrue] });
290
+ submit() {
291
+ this.form.markAllAsTouched();
292
+ if (this.form.valid) console.log('creating account…');
293
+ }
294
+ }
295
+ ```
296
+
297
+ ## Accessibility notes
298
+
299
+ - The checkbox `id` and label `for` are generated (`eg-form-checkbox-<app>-<n>`) unless `controlId`/`id` is given — labels are always programmatically associated.
300
+ - `aria-describedby` points at the error id only while the control is invalid + touched/dirty, otherwise at the hint id — screen readers hear the right message in each state.
301
+ - The required marker (`*`) is visual; the underlying `hlm-checkbox` also receives `required` so assistive tech announces it.
302
+ - Keep the component inside a `<form>` with a submit path; the row itself is a single tab stop (the checkbox).
303
+
304
+ ## Theming / CSS variables
305
+
306
+ No component-specific CSS variables. Style via `class`, `checkboxClass`, `labelClass`, `$errorClass`, `$hintClass` inputs and global tokens. The row layout (`flex items-center gap-1`) is fixed in the template.
61
307
 
62
- ## Additional Resources
308
+ ## Related subpaths
63
309
 
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.
310
+ - `@egose/shadcn-theme-ng/checkbox` — standalone `hlm-checkbox` when you need a custom layout.
311
+ - `@egose/shadcn-theme-ng/form-field-simple` — `eg-form-field` error/hint switching used internally.
312
+ - `@egose/shadcn-theme-ng/form-field` — `hlm-form-field` / `hlm-error` / `hlm-hint` primitives.
313
+ - `@egose/shadcn-theme-ng/label` — `HlmLabel` used for the row label.