@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
@@ -5,12 +5,13 @@ import { BrnSwitchThumb, BrnSwitch } from '@spartan-ng/brain/switch';
5
5
  import { hlm } from '@egose/shadcn-theme-ng/utils';
6
6
 
7
7
  class HlmSwitchThumb {
8
- userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
9
- _computedClass = computed(() => hlm('bg-background dark:group-data-[state=unchecked]:bg-foreground dark:group-data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=unchecked]:translate-x-0 group-data-[state=checked]:translate-x-[calc(100%-2px)]', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
10
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HlmSwitchThumb, deps: [], target: i0.ɵɵFactoryTarget.Directive });
11
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.15", type: HlmSwitchThumb, isStandalone: true, selector: "brn-switch-thumb[hlm],[hlmSwitchThumb]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
8
+ userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
9
+ _computedClass = computed(() => hlm('bg-background dark:group-data-[state=unchecked]:bg-foreground dark:group-data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=unchecked]:translate-x-0 group-data-[state=checked]:translate-x-[calc(100%-2px)]', this.userClass()), /* @ts-ignore */
10
+ ...(ngDevMode ? [{ debugName: "_computedClass" }] : /* istanbul ignore next */ []));
11
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSwitchThumb, deps: [], target: i0.ɵɵFactoryTarget.Directive });
12
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: HlmSwitchThumb, isStandalone: true, selector: "brn-switch-thumb[hlm],[hlmSwitchThumb]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
12
13
  }
13
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HlmSwitchThumb, decorators: [{
14
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSwitchThumb, decorators: [{
14
15
  type: Directive,
15
16
  args: [{
16
17
  selector: 'brn-switch-thumb[hlm],[hlmSwitchThumb]',
@@ -26,25 +27,27 @@ const EG_SWITCH_VALUE_ACCESSOR = {
26
27
  multi: true,
27
28
  };
28
29
  class HlmSwitch {
29
- userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
30
- _computedClass = computed(() => hlm('data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 shadow-xs group inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent outline-none transition-all focus-visible:ring-[3px] data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
30
+ userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
31
+ _computedClass = computed(() => hlm('data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 shadow-xs group inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent outline-none transition-all focus-visible:ring-[3px] data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50', this.userClass()), /* @ts-ignore */
32
+ ...(ngDevMode ? [{ debugName: "_computedClass" }] : /* istanbul ignore next */ []));
31
33
  /** The checked state of the switch. */
32
- checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : []));
34
+ checked = model(false, /* @ts-ignore */
35
+ ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
33
36
  /** The disabled state of the switch. */
34
- disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{
35
- transform: booleanAttribute,
36
- }]));
37
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
37
38
  /** Used to set the id on the underlying brn element. */
38
- id = input(null, ...(ngDevMode ? [{ debugName: "id" }] : []));
39
+ id = input(null, /* @ts-ignore */
40
+ ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
39
41
  /** Used to set the aria-label attribute on the underlying brn element. */
40
- ariaLabel = input(null, ...(ngDevMode ? [{ debugName: "ariaLabel", alias: 'aria-label' }] : [{ alias: 'aria-label' }]));
42
+ ariaLabel = input(null, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
41
43
  /** Used to set the aria-labelledby attribute on the underlying brn element. */
42
- ariaLabelledby = input(null, ...(ngDevMode ? [{ debugName: "ariaLabelledby", alias: 'aria-labelledby' }] : [{ alias: 'aria-labelledby' }]));
44
+ ariaLabelledby = input(null, { ...(ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
43
45
  /** Used to set the aria-describedby attribute on the underlying brn element. */
44
- ariaDescribedby = input(null, ...(ngDevMode ? [{ debugName: "ariaDescribedby", alias: 'aria-describedby' }] : [{ alias: 'aria-describedby' }]));
46
+ ariaDescribedby = input(null, { ...(ngDevMode ? { debugName: "ariaDescribedby" } : /* istanbul ignore next */ {}), alias: 'aria-describedby' });
45
47
  /** Emits when the checked state of the switch changes. */
46
48
  changed = output();
47
- _disabled = linkedSignal(this.disabled, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
49
+ _disabled = linkedSignal(this.disabled, /* @ts-ignore */
50
+ ...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
48
51
  _onChange;
49
52
  _onTouched;
50
53
  handleChange(value) {
@@ -66,8 +69,8 @@ class HlmSwitch {
66
69
  setDisabledState(isDisabled) {
67
70
  this._disabled.set(isDisabled);
68
71
  }
69
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HlmSwitch, deps: [], target: i0.ɵɵFactoryTarget.Component });
70
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: HlmSwitch, isStandalone: true, selector: "hlm-switch", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", changed: "changed" }, host: { properties: { "attr.id": "null", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null" }, classAttribute: "contents" }, providers: [EG_SWITCH_VALUE_ACCESSOR], ngImport: i0, template: `
72
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSwitch, deps: [], target: i0.ɵɵFactoryTarget.Component });
73
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.7", type: HlmSwitch, isStandalone: true, selector: "hlm-switch", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", changed: "changed" }, host: { properties: { "attr.id": "null", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null" }, classAttribute: "contents" }, providers: [EG_SWITCH_VALUE_ACCESSOR], ngImport: i0, template: `
71
74
  <brn-switch
72
75
  [class]="_computedClass()"
73
76
  [checked]="checked()"
@@ -82,9 +85,9 @@ class HlmSwitch {
82
85
  >
83
86
  <brn-switch-thumb hlm />
84
87
  </brn-switch>
85
- `, isInline: true, dependencies: [{ kind: "component", type: BrnSwitchThumb, selector: "brn-switch-thumb" }, { kind: "component", type: BrnSwitch, selector: "brn-switch", inputs: ["checked", "id", "name", "class", "aria-label", "aria-labelledby", "aria-describedby", "required", "disabled", "tabIndex"], outputs: ["checkedChange", "touched"] }, { kind: "directive", type: HlmSwitchThumb, selector: "brn-switch-thumb[hlm],[hlmSwitchThumb]", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
88
+ `, isInline: true, dependencies: [{ kind: "component", type: BrnSwitchThumb, selector: "brn-switch-thumb" }, { kind: "component", type: BrnSwitch, selector: "brn-switch", inputs: ["checked", "id", "name", "class", "hostStyles", "size", "aria-label", "aria-labelledby", "aria-describedby", "required", "disabled", "tabIndex"], outputs: ["checkedChange", "touched"] }, { kind: "directive", type: HlmSwitchThumb, selector: "brn-switch-thumb[hlm],[hlmSwitchThumb]", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
86
89
  }
87
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HlmSwitch, decorators: [{
90
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSwitch, decorators: [{
88
91
  type: Component,
89
92
  args: [{
90
93
  selector: 'hlm-switch',
@@ -123,11 +126,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
123
126
  */
124
127
  const HlmSwitchImports = [HlmSwitch, HlmSwitchThumb];
125
128
  class HlmSwitchModule {
126
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HlmSwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
127
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: HlmSwitchModule, imports: [HlmSwitch, HlmSwitchThumb], exports: [HlmSwitch, HlmSwitchThumb] });
128
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HlmSwitchModule, imports: [HlmSwitch] });
129
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
130
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.7", ngImport: i0, type: HlmSwitchModule, imports: [HlmSwitch, HlmSwitchThumb], exports: [HlmSwitch, HlmSwitchThumb] });
131
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSwitchModule, imports: [HlmSwitch] });
129
132
  }
130
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HlmSwitchModule, decorators: [{
133
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSwitchModule, decorators: [{
131
134
  type: NgModule,
132
135
  args: [{
133
136
  imports: [...HlmSwitchImports],
@@ -1 +1 @@
1
- {"version":3,"file":"switch.mjs","sources":["../../../projects/switch/src/lib/switch-thumb.ts","../../../projects/switch/src/lib/switch.ts","../../../projects/switch/src/public-api.ts","../../../projects/switch/src/switch.ts"],"sourcesContent":["import { Directive, computed, input } from '@angular/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: 'brn-switch-thumb[hlm],[hlmSwitchThumb]',\n host: {\n '[class]': '_computedClass()',\n },\n})\nexport class HlmSwitchThumb {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:bg-background tw:dark:group-data-[state=unchecked]:bg-foreground tw:dark:group-data-[state=checked]:bg-primary-foreground tw:pointer-events-none tw:block tw:size-4 tw:rounded-full tw:ring-0 tw:transition-transform tw:data-[state=unchecked]:translate-x-0 tw:group-data-[state=checked]:translate-x-[calc(100%-2px)]',\n this.userClass(),\n ),\n );\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n Component,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n linkedSignal,\n model,\n output,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';\nimport { BrnSwitch, BrnSwitchThumb } from '@spartan-ng/brain/switch';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\nimport { HlmSwitchThumb } from './switch-thumb';\nexport const EG_SWITCH_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => HlmSwitch),\n multi: true,\n};\n\n@Component({\n selector: 'hlm-switch',\n imports: [BrnSwitchThumb, BrnSwitch, HlmSwitchThumb],\n host: {\n class: 'contents',\n '[attr.id]': 'null',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n },\n // @ts-ignore\n template: `\n <brn-switch\n [class]=\"_computedClass()\"\n [checked]=\"checked()\"\n @ts-ignore\n (changed)=\"handleChange($event)\"\n (touched)=\"_onTouched?.()\"\n [disabled]=\"_disabled()\"\n [id]=\"id()\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"ariaLabelledby()\"\n [aria-describedby]=\"ariaDescribedby()\"\n >\n <brn-switch-thumb hlm />\n </brn-switch>\n `,\n providers: [EG_SWITCH_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HlmSwitch implements ControlValueAccessor {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:data-[state=checked]:bg-primary tw:data-[state=unchecked]:bg-input tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:dark:data-[state=unchecked]:bg-input/80 tw:shadow-xs tw:group tw:inline-flex tw:h-[1.15rem] tw:w-8 tw:shrink-0 tw:items-center tw:rounded-full tw:border tw:border-transparent tw:outline-none tw:transition-all tw:focus-visible:ring-[3px] tw:data-[disabled=true]:cursor-not-allowed tw:data-[disabled=true]:opacity-50',\n this.userClass(),\n ),\n );\n\n /** The checked state of the switch. */\n public readonly checked = model<boolean>(false);\n\n /** The disabled state of the switch. */\n public readonly disabled = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute,\n });\n\n /** Used to set the id on the underlying brn element. */\n public readonly id = input<string | null>(null);\n\n /** Used to set the aria-label attribute on the underlying brn element. */\n public readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n /** Used to set the aria-labelledby attribute on the underlying brn element. */\n public readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n\n /** Used to set the aria-describedby attribute on the underlying brn element. */\n public readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\n\n /** Emits when the checked state of the switch changes. */\n public readonly changed = output<boolean>();\n\n protected readonly _disabled = linkedSignal(this.disabled);\n\n protected _onChange?: ChangeFn<boolean>;\n protected _onTouched?: TouchFn;\n\n protected handleChange(value: unknown): void {\n const checked = value as boolean;\n this.checked.set(checked);\n this._onChange?.(checked);\n this.changed.emit(checked);\n }\n\n /** CONROL VALUE ACCESSOR */\n\n writeValue(value: boolean): void {\n this.checked.set(Boolean(value));\n }\n\n registerOnChange(fn: ChangeFn<boolean>): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: TouchFn): void {\n this._onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this._disabled.set(isDisabled);\n }\n}\n","/*\n * Public API Surface of switch\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmSwitch } from './lib/switch';\nimport { HlmSwitchThumb } from './lib/switch-thumb';\n\nexport * from './lib/switch';\nexport * from './lib/switch-thumb';\n\nexport const HlmSwitchImports = [HlmSwitch, HlmSwitchThumb] as const;\n@NgModule({\n imports: [...HlmSwitchImports],\n exports: [...HlmSwitchImports],\n})\nexport class HlmSwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAUa,cAAc,CAAA;AACT,IAAA,SAAS,GAAG,KAAK,CAAa,EAAE,6CAAI,KAAK,EAAE,OAAO,EAAA,CAAA,GAAA,CAAhB,EAAE,KAAK,EAAE,OAAO,EAAE,GAAC;AAElD,IAAA,cAAc,GAAG,QAAQ,CAAC,MAC3C,GAAG,CACD,6TAA6T,EAC7T,IAAI,CAAC,SAAS,EAAE,CACjB,0DACF;wGARU,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wCAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,kBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,wCAAwC;AAClD,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,kBAAkB;AAC9B,qBAAA;AACF,iBAAA;;;ACSM,MAAM,wBAAwB,GAAG;AACtC,IAAA,OAAO,EAAE,iBAAiB;AAC1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eAAe,YALK,SAAS,EAAE,cAAc,CAAA,EAAA,OAAA,EAAA,CAAzB,SAAS,EAAE,cAAc,CAAA,EAAA,CAAA;AAK7C,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YALK,SAAS,CAAA,EAAA,CAAA;;4FAK7B,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,gBAAgB,CAAC;AAC9B,oBAAA,OAAO,EAAE,CAAC,GAAG,gBAAgB,CAAC;AAC/B,iBAAA;;;AChBD;;AAEG;;;;"}
1
+ {"version":3,"file":"switch.mjs","sources":["../../../projects/switch/src/lib/switch-thumb.ts","../../../projects/switch/src/lib/switch.ts","../../../projects/switch/src/public-api.ts","../../../projects/switch/src/switch.ts"],"sourcesContent":["import { Directive, computed, input } from '@angular/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: 'brn-switch-thumb[hlm],[hlmSwitchThumb]',\n host: {\n '[class]': '_computedClass()',\n },\n})\nexport class HlmSwitchThumb {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:bg-background tw:dark:group-data-[state=unchecked]:bg-foreground tw:dark:group-data-[state=checked]:bg-primary-foreground tw:pointer-events-none tw:block tw:size-4 tw:rounded-full tw:ring-0 tw:transition-transform tw:data-[state=unchecked]:translate-x-0 tw:group-data-[state=checked]:translate-x-[calc(100%-2px)]',\n this.userClass(),\n ),\n );\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n Component,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n linkedSignal,\n model,\n output,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';\nimport { BrnSwitch, BrnSwitchThumb } from '@spartan-ng/brain/switch';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\nimport { HlmSwitchThumb } from './switch-thumb';\nexport const EG_SWITCH_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => HlmSwitch),\n multi: true,\n};\n\n@Component({\n selector: 'hlm-switch',\n imports: [BrnSwitchThumb, BrnSwitch, HlmSwitchThumb],\n host: {\n class: 'contents',\n '[attr.id]': 'null',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n },\n // @ts-ignore\n template: `\n <brn-switch\n [class]=\"_computedClass()\"\n [checked]=\"checked()\"\n @ts-ignore\n (changed)=\"handleChange($event)\"\n (touched)=\"_onTouched?.()\"\n [disabled]=\"_disabled()\"\n [id]=\"id()\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"ariaLabelledby()\"\n [aria-describedby]=\"ariaDescribedby()\"\n >\n <brn-switch-thumb hlm />\n </brn-switch>\n `,\n providers: [EG_SWITCH_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HlmSwitch implements ControlValueAccessor {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:data-[state=checked]:bg-primary tw:data-[state=unchecked]:bg-input tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:dark:data-[state=unchecked]:bg-input/80 tw:shadow-xs tw:group tw:inline-flex tw:h-[1.15rem] tw:w-8 tw:shrink-0 tw:items-center tw:rounded-full tw:border tw:border-transparent tw:outline-none tw:transition-all tw:focus-visible:ring-[3px] tw:data-[disabled=true]:cursor-not-allowed tw:data-[disabled=true]:opacity-50',\n this.userClass(),\n ),\n );\n\n /** The checked state of the switch. */\n public readonly checked = model<boolean>(false);\n\n /** The disabled state of the switch. */\n public readonly disabled = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute,\n });\n\n /** Used to set the id on the underlying brn element. */\n public readonly id = input<string | null>(null);\n\n /** Used to set the aria-label attribute on the underlying brn element. */\n public readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n /** Used to set the aria-labelledby attribute on the underlying brn element. */\n public readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n\n /** Used to set the aria-describedby attribute on the underlying brn element. */\n public readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\n\n /** Emits when the checked state of the switch changes. */\n public readonly changed = output<boolean>();\n\n protected readonly _disabled = linkedSignal(this.disabled);\n\n protected _onChange?: ChangeFn<boolean>;\n protected _onTouched?: TouchFn;\n\n protected handleChange(value: unknown): void {\n const checked = value as boolean;\n this.checked.set(checked);\n this._onChange?.(checked);\n this.changed.emit(checked);\n }\n\n /** CONROL VALUE ACCESSOR */\n\n writeValue(value: boolean): void {\n this.checked.set(Boolean(value));\n }\n\n registerOnChange(fn: ChangeFn<boolean>): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: TouchFn): void {\n this._onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this._disabled.set(isDisabled);\n }\n}\n","/*\n * Public API Surface of switch\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmSwitch } from './lib/switch';\nimport { HlmSwitchThumb } from './lib/switch-thumb';\n\nexport * from './lib/switch';\nexport * from './lib/switch-thumb';\n\nexport const HlmSwitchImports = [HlmSwitch, HlmSwitchThumb] as const;\n@NgModule({\n imports: [...HlmSwitchImports],\n exports: [...HlmSwitchImports],\n})\nexport class HlmSwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAUa,cAAc,CAAA;IACT,SAAS,GAAG,KAAK,CAA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an-ng/brain": "^0.0.1-alpha.512"
8
+ },
9
+ "dependencies": {
10
+ "tslib": "^2.3.0"
11
+ },
12
+ "sideEffects": false,
13
+ "module": "fesm2022/switch.mjs",
14
+ "typings": "types/switch.d.ts",
15
+ "exports": {
16
+ "./package.json": {
17
+ "default": "./package.json"
18
+ },
19
+ ".": {
20
+ "types": "./types/switch.d.ts",
21
+ "default": "./fesm2022/switch.mjs"
22
+ }
23
+ },
24
+ "type": "module"
25
+ }
@@ -0,0 +1,11 @@
1
+ # Table
2
+
3
+ This project was generated using [Angular CLI](https://github.com/angular/angular-cli).
4
+
5
+ ## Building
6
+
7
+ To build the library, run:
8
+
9
+ ```bash
10
+ ng build table
11
+ ```
@@ -0,0 +1,211 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Directive, NgModule } from '@angular/core';
3
+ import { classes } from '@egose/shadcn-theme-ng/utils';
4
+
5
+ class HlmTableContainer {
6
+ constructor() {
7
+ classes(() => 'relative w-full overflow-x-auto');
8
+ }
9
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTableContainer, deps: [], target: i0.ɵɵFactoryTarget.Directive });
10
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmTableContainer, isStandalone: true, selector: "div[hlmTableContainer]", host: { attributes: { "data-slot": "table-container" } }, ngImport: i0 });
11
+ }
12
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTableContainer, decorators: [{
13
+ type: Directive,
14
+ args: [{
15
+ selector: 'div[hlmTableContainer]',
16
+ host: { 'data-slot': 'table-container' },
17
+ }]
18
+ }], ctorParameters: () => [] });
19
+ /**
20
+ * Directive to apply Shadcn-like styling to a <table> element.
21
+ */
22
+ class HlmTable {
23
+ constructor() {
24
+ classes(() => 'w-full caption-bottom text-sm');
25
+ }
26
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTable, deps: [], target: i0.ɵɵFactoryTarget.Directive });
27
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmTable, isStandalone: true, selector: "table[hlmTable]", host: { attributes: { "data-slot": "table" } }, ngImport: i0 });
28
+ }
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTable, decorators: [{
30
+ type: Directive,
31
+ args: [{
32
+ selector: 'table[hlmTable]',
33
+ host: { 'data-slot': 'table' },
34
+ }]
35
+ }], ctorParameters: () => [] });
36
+ /**
37
+ * Directive to apply Shadcn-like styling to a <thead> element
38
+ * within an HlmTable context.
39
+ */
40
+ class HlmTHead {
41
+ constructor() {
42
+ classes(() => '[&_tr]:border-b');
43
+ }
44
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTHead, deps: [], target: i0.ɵɵFactoryTarget.Directive });
45
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmTHead, isStandalone: true, selector: "thead[hlmTHead],thead[hlmTableHeader]", host: { attributes: { "data-slot": "table-header" } }, ngImport: i0 });
46
+ }
47
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTHead, decorators: [{
48
+ type: Directive,
49
+ args: [{
50
+ selector: 'thead[hlmTHead],thead[hlmTableHeader]',
51
+ host: { 'data-slot': 'table-header' },
52
+ }]
53
+ }], ctorParameters: () => [] });
54
+ /**
55
+ * Directive to apply Shadcn-like styling to a <tbody> element
56
+ * within an HlmTable context.
57
+ */
58
+ class HlmTBody {
59
+ constructor() {
60
+ classes(() => '[&_tr:last-child]:border-0');
61
+ }
62
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTBody, deps: [], target: i0.ɵɵFactoryTarget.Directive });
63
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmTBody, isStandalone: true, selector: "tbody[hlmTBody],tbody[hlmTableBody]", host: { attributes: { "data-slot": "table-body" } }, ngImport: i0 });
64
+ }
65
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTBody, decorators: [{
66
+ type: Directive,
67
+ args: [{
68
+ selector: 'tbody[hlmTBody],tbody[hlmTableBody]',
69
+ host: { 'data-slot': 'table-body' },
70
+ }]
71
+ }], ctorParameters: () => [] });
72
+ /**
73
+ * Directive to apply Shadcn-like styling to a <tfoot> element
74
+ * within an HlmTable context.
75
+ */
76
+ class HlmTFoot {
77
+ constructor() {
78
+ classes(() => 'bg-muted/50 border-t font-medium [&>tr]:last:border-b-0');
79
+ }
80
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTFoot, deps: [], target: i0.ɵɵFactoryTarget.Directive });
81
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmTFoot, isStandalone: true, selector: "tfoot[hlmTFoot],tfoot[hlmTableFooter]", host: { attributes: { "data-slot": "table-footer" } }, ngImport: i0 });
82
+ }
83
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTFoot, decorators: [{
84
+ type: Directive,
85
+ args: [{
86
+ selector: 'tfoot[hlmTFoot],tfoot[hlmTableFooter]',
87
+ host: { 'data-slot': 'table-footer' },
88
+ }]
89
+ }], ctorParameters: () => [] });
90
+ /**
91
+ * Directive to apply Shadcn-like styling to a <tr> element
92
+ * within an HlmTable context.
93
+ */
94
+ class HlmTr {
95
+ constructor() {
96
+ classes(() => 'hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors has-aria-expanded:bg-muted/50');
97
+ }
98
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTr, deps: [], target: i0.ɵɵFactoryTarget.Directive });
99
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmTr, isStandalone: true, selector: "tr[hlmTr],tr[hlmTableRow]", host: { attributes: { "data-slot": "table-row" } }, ngImport: i0 });
100
+ }
101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTr, decorators: [{
102
+ type: Directive,
103
+ args: [{
104
+ selector: 'tr[hlmTr],tr[hlmTableRow]',
105
+ host: { 'data-slot': 'table-row' },
106
+ }]
107
+ }], ctorParameters: () => [] });
108
+ /**
109
+ * Directive to apply Shadcn-like styling to a <th> element
110
+ * within an HlmTable context.
111
+ */
112
+ class HlmTh {
113
+ constructor() {
114
+ classes(() => 'text-foreground h-10 px-2 text-start align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pe-0');
115
+ }
116
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTh, deps: [], target: i0.ɵɵFactoryTarget.Directive });
117
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmTh, isStandalone: true, selector: "th[hlmTh],th[hlmTableHead]", host: { attributes: { "data-slot": "table-head" } }, ngImport: i0 });
118
+ }
119
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTh, decorators: [{
120
+ type: Directive,
121
+ args: [{
122
+ selector: 'th[hlmTh],th[hlmTableHead]',
123
+ host: { 'data-slot': 'table-head' },
124
+ }]
125
+ }], ctorParameters: () => [] });
126
+ /**
127
+ * Directive to apply Shadcn-like styling to a <td> element
128
+ * within an HlmTable context.
129
+ */
130
+ class HlmTd {
131
+ constructor() {
132
+ classes(() => 'p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pe-0');
133
+ }
134
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTd, deps: [], target: i0.ɵɵFactoryTarget.Directive });
135
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmTd, isStandalone: true, selector: "td[hlmTd],td[hlmTableCell]", host: { attributes: { "data-slot": "table-cell" } }, ngImport: i0 });
136
+ }
137
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTd, decorators: [{
138
+ type: Directive,
139
+ args: [{
140
+ selector: 'td[hlmTd],td[hlmTableCell]',
141
+ host: { 'data-slot': 'table-cell' },
142
+ }]
143
+ }], ctorParameters: () => [] });
144
+ /**
145
+ * Directive to apply Shadcn-like styling to a <caption> element
146
+ * within an HlmTable context.
147
+ */
148
+ class HlmCaption {
149
+ constructor() {
150
+ classes(() => 'text-muted-foreground mt-4 text-sm');
151
+ }
152
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCaption, deps: [], target: i0.ɵɵFactoryTarget.Directive });
153
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmCaption, isStandalone: true, selector: "caption[hlmCaption],caption[hlmTableCaption]", host: { attributes: { "data-slot": "table-caption" } }, ngImport: i0 });
154
+ }
155
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCaption, decorators: [{
156
+ type: Directive,
157
+ args: [{
158
+ selector: 'caption[hlmCaption],caption[hlmTableCaption]',
159
+ host: { 'data-slot': 'table-caption' },
160
+ }]
161
+ }], ctorParameters: () => [] });
162
+
163
+ /*
164
+ * Public API Surface of table
165
+ */
166
+ const HlmTableImports = [
167
+ HlmCaption,
168
+ HlmTableContainer,
169
+ HlmTable,
170
+ HlmTBody,
171
+ HlmTd,
172
+ HlmTFoot,
173
+ HlmTh,
174
+ HlmTHead,
175
+ HlmTr,
176
+ ];
177
+ class HlmTableModule {
178
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
179
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.7", ngImport: i0, type: HlmTableModule, imports: [HlmCaption,
180
+ HlmTableContainer,
181
+ HlmTable,
182
+ HlmTBody,
183
+ HlmTd,
184
+ HlmTFoot,
185
+ HlmTh,
186
+ HlmTHead,
187
+ HlmTr], exports: [HlmCaption,
188
+ HlmTableContainer,
189
+ HlmTable,
190
+ HlmTBody,
191
+ HlmTd,
192
+ HlmTFoot,
193
+ HlmTh,
194
+ HlmTHead,
195
+ HlmTr] });
196
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTableModule });
197
+ }
198
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTableModule, decorators: [{
199
+ type: NgModule,
200
+ args: [{
201
+ imports: [...HlmTableImports],
202
+ exports: [...HlmTableImports],
203
+ }]
204
+ }] });
205
+
206
+ /**
207
+ * Generated bundle index. Do not edit.
208
+ */
209
+
210
+ export { HlmCaption, HlmTBody, HlmTFoot, HlmTHead, HlmTable, HlmTableContainer, HlmTableImports, HlmTableModule, HlmTd, HlmTh, HlmTr };
211
+ //# sourceMappingURL=table.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table.mjs","sources":["../../../projects/table/src/lib/hlm-table.ts","../../../projects/table/src/public-api.ts","../../../projects/table/src/table.ts"],"sourcesContent":["import { Directive } from '@angular/core';\nimport { classes } from '@egose/shadcn-theme-ng/utils';\n\n@Directive({\n selector: 'div[hlmTableContainer]',\n host: { 'data-slot': 'table-container' },\n})\nexport class HlmTableContainer {\n constructor() {\n classes(() => 'relative w-full overflow-x-auto');\n }\n}\n\n/**\n * Directive to apply Shadcn-like styling to a <table> element.\n */\n@Directive({\n selector: 'table[hlmTable]',\n host: { 'data-slot': 'table' },\n})\nexport class HlmTable {\n constructor() {\n classes(() => 'w-full caption-bottom text-sm');\n }\n}\n\n/**\n * Directive to apply Shadcn-like styling to a <thead> element\n * within an HlmTable context.\n */\n@Directive({\n selector: 'thead[hlmTHead],thead[hlmTableHeader]',\n host: { 'data-slot': 'table-header' },\n})\nexport class HlmTHead {\n constructor() {\n classes(() => '[&_tr]:border-b');\n }\n}\n\n/**\n * Directive to apply Shadcn-like styling to a <tbody> element\n * within an HlmTable context.\n */\n@Directive({\n selector: 'tbody[hlmTBody],tbody[hlmTableBody]',\n host: { 'data-slot': 'table-body' },\n})\nexport class HlmTBody {\n constructor() {\n classes(() => '[&_tr:last-child]:border-0');\n }\n}\n\n/**\n * Directive to apply Shadcn-like styling to a <tfoot> element\n * within an HlmTable context.\n */\n@Directive({\n selector: 'tfoot[hlmTFoot],tfoot[hlmTableFooter]',\n host: { 'data-slot': 'table-footer' },\n})\nexport class HlmTFoot {\n constructor() {\n classes(() => 'bg-muted/50 border-t font-medium [&>tr]:last:border-b-0');\n }\n}\n\n/**\n * Directive to apply Shadcn-like styling to a <tr> element\n * within an HlmTable context.\n */\n@Directive({\n selector: 'tr[hlmTr],tr[hlmTableRow]',\n host: { 'data-slot': 'table-row' },\n})\nexport class HlmTr {\n constructor() {\n classes(\n () => 'hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors has-aria-expanded:bg-muted/50',\n );\n }\n}\n\n/**\n * Directive to apply Shadcn-like styling to a <th> element\n * within an HlmTable context.\n */\n@Directive({\n selector: 'th[hlmTh],th[hlmTableHead]',\n host: { 'data-slot': 'table-head' },\n})\nexport class HlmTh {\n constructor() {\n classes(\n () =>\n 'text-foreground h-10 px-2 text-start align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pe-0',\n );\n }\n}\n\n/**\n * Directive to apply Shadcn-like styling to a <td> element\n * within an HlmTable context.\n */\n@Directive({\n selector: 'td[hlmTd],td[hlmTableCell]',\n host: { 'data-slot': 'table-cell' },\n})\nexport class HlmTd {\n constructor() {\n classes(() => 'p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pe-0');\n }\n}\n\n/**\n * Directive to apply Shadcn-like styling to a <caption> element\n * within an HlmTable context.\n */\n@Directive({\n selector: 'caption[hlmCaption],caption[hlmTableCaption]',\n host: { 'data-slot': 'table-caption' },\n})\nexport class HlmCaption {\n constructor() {\n classes(() => 'text-muted-foreground mt-4 text-sm');\n }\n}\n","/*\n * Public API Surface of table\n */\n\nimport { NgModule } from '@angular/core';\n\nimport {\n HlmCaption,\n HlmTable,\n HlmTableContainer,\n HlmTBody,\n HlmTd,\n HlmTFoot,\n HlmTh,\n HlmTHead,\n HlmTr,\n} from './lib/hlm-table';\n\nexport * from './lib/hlm-table';\n\nexport const HlmTableImports = [\n HlmCaption,\n HlmTableContainer,\n HlmTable,\n HlmTBody,\n HlmTd,\n HlmTFoot,\n HlmTh,\n HlmTHead,\n HlmTr,\n] as const;\n\n@NgModule({\n imports: [...HlmTableImports],\n exports: [...HlmTableImports],\n})\nexport class HlmTableModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAOa,iBAAiB,CAAA;AAC5B,IAAA,WAAA,GAAA;AACE,QAAA,OAAO,CAAC,MAAM,iCAAiC,CAAC;IAClD;uGAHW,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,WAAA,EAAA,iBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAjB,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AA,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,YAfzB,UAAU;YACV,iBAAiB;YACjB,QAAQ;YACR,QAAQ;YACR,KAAK;YACL,QAAQ;YACR,KAAK;YACL,QAAQ;AACR,YAAA,KAAK,aARL,UAAU;YACV,iBAAiB;YACjB,QAAQ;YACR,QAAQ;YACR,KAAK;YACL,QAAQ;YACR,KAAK;YACL,QAAQ;YACR,KAAK,CAAA,EAAA,CAAA;wGAOM,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;;;ACnCD;;AAEG;;;;"}
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "table",
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/table.mjs",
14
+ "typings": "types/table.d.ts",
15
+ "exports": {
16
+ "./package.json": {
17
+ "default": "./package.json"
18
+ },
19
+ ".": {
20
+ "types": "./types/table.d.ts",
21
+ "default": "./fesm2022/table.mjs"
22
+ }
23
+ },
24
+ "type": "module"
25
+ }
@@ -0,0 +1,87 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ declare class HlmTableContainer {
4
+ constructor();
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmTableContainer, never>;
6
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmTableContainer, "div[hlmTableContainer]", never, {}, {}, never, never, true, never>;
7
+ }
8
+ /**
9
+ * Directive to apply Shadcn-like styling to a <table> element.
10
+ */
11
+ declare class HlmTable {
12
+ constructor();
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmTable, never>;
14
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmTable, "table[hlmTable]", never, {}, {}, never, never, true, never>;
15
+ }
16
+ /**
17
+ * Directive to apply Shadcn-like styling to a <thead> element
18
+ * within an HlmTable context.
19
+ */
20
+ declare class HlmTHead {
21
+ constructor();
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmTHead, never>;
23
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmTHead, "thead[hlmTHead],thead[hlmTableHeader]", never, {}, {}, never, never, true, never>;
24
+ }
25
+ /**
26
+ * Directive to apply Shadcn-like styling to a <tbody> element
27
+ * within an HlmTable context.
28
+ */
29
+ declare class HlmTBody {
30
+ constructor();
31
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmTBody, never>;
32
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmTBody, "tbody[hlmTBody],tbody[hlmTableBody]", never, {}, {}, never, never, true, never>;
33
+ }
34
+ /**
35
+ * Directive to apply Shadcn-like styling to a <tfoot> element
36
+ * within an HlmTable context.
37
+ */
38
+ declare class HlmTFoot {
39
+ constructor();
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmTFoot, never>;
41
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmTFoot, "tfoot[hlmTFoot],tfoot[hlmTableFooter]", never, {}, {}, never, never, true, never>;
42
+ }
43
+ /**
44
+ * Directive to apply Shadcn-like styling to a <tr> element
45
+ * within an HlmTable context.
46
+ */
47
+ declare class HlmTr {
48
+ constructor();
49
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmTr, never>;
50
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmTr, "tr[hlmTr],tr[hlmTableRow]", never, {}, {}, never, never, true, never>;
51
+ }
52
+ /**
53
+ * Directive to apply Shadcn-like styling to a <th> element
54
+ * within an HlmTable context.
55
+ */
56
+ declare class HlmTh {
57
+ constructor();
58
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmTh, never>;
59
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmTh, "th[hlmTh],th[hlmTableHead]", never, {}, {}, never, never, true, never>;
60
+ }
61
+ /**
62
+ * Directive to apply Shadcn-like styling to a <td> element
63
+ * within an HlmTable context.
64
+ */
65
+ declare class HlmTd {
66
+ constructor();
67
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmTd, never>;
68
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmTd, "td[hlmTd],td[hlmTableCell]", never, {}, {}, never, never, true, never>;
69
+ }
70
+ /**
71
+ * Directive to apply Shadcn-like styling to a <caption> element
72
+ * within an HlmTable context.
73
+ */
74
+ declare class HlmCaption {
75
+ constructor();
76
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmCaption, never>;
77
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmCaption, "caption[hlmCaption],caption[hlmTableCaption]", never, {}, {}, never, never, true, never>;
78
+ }
79
+
80
+ declare const HlmTableImports: readonly [typeof HlmCaption, typeof HlmTableContainer, typeof HlmTable, typeof HlmTBody, typeof HlmTd, typeof HlmTFoot, typeof HlmTh, typeof HlmTHead, typeof HlmTr];
81
+ declare class HlmTableModule {
82
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmTableModule, never>;
83
+ static ɵmod: i0.ɵɵNgModuleDeclaration<HlmTableModule, never, [typeof HlmCaption, typeof HlmTableContainer, typeof HlmTable, typeof HlmTBody, typeof HlmTd, typeof HlmTFoot, typeof HlmTh, typeof HlmTHead, typeof HlmTr], [typeof HlmCaption, typeof HlmTableContainer, typeof HlmTable, typeof HlmTBody, typeof HlmTd, typeof HlmTFoot, typeof HlmTh, typeof HlmTHead, typeof HlmTr]>;
84
+ static ɵinj: i0.ɵɵInjectorDeclaration<HlmTableModule>;
85
+ }
86
+
87
+ export { HlmCaption, HlmTBody, HlmTFoot, HlmTHead, HlmTable, HlmTableContainer, HlmTableImports, HlmTableModule, HlmTd, HlmTh, HlmTr };
package/tabs/README.md ADDED
@@ -0,0 +1,64 @@
1
+ # Tabs
2
+
3
+ This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.2.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 tabs
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/tabs
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.