@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
@@ -1,91 +1,41 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, linkedSignal, computed, inject, Injector, effect, untracked, forwardRef, Directive, NgModule } from '@angular/core';
3
- import { NgControl, NgForm, FormGroupDirective } from '@angular/forms';
4
- import { BrnFormFieldControl } from '@spartan-ng/brain/form-field';
5
- import { ErrorStateMatcher, ErrorStateTracker } from '@spartan-ng/brain/forms';
6
- import { hlm } from '@egose/shadcn-theme-ng/utils';
7
- import { cva } from 'class-variance-authority';
2
+ import { Directive, NgModule } from '@angular/core';
3
+ import * as i2 from '@spartan-ng/brain/field';
4
+ import { BrnFieldControlDescribedBy } from '@spartan-ng/brain/field';
5
+ import * as i1 from '@spartan-ng/brain/input';
6
+ import { BrnInput } from '@spartan-ng/brain/input';
7
+ import { classes } from '@egose/shadcn-theme-ng/utils';
8
8
 
9
- const inputVariants = cva('file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/10 border-input shadow-xs focus-visible:border-ring focus-visible:ring-ring/50 flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base outline-none transition-[color,box-shadow] file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', {
10
- variants: {
11
- error: {
12
- auto: '[&.ng-invalid.ng-touched]:text-destructive/20 dark:[&.ng-invalid.ng-touched]:text-destructive/40 [&.ng-invalid.ng-touched]:border-destructive [&.ng-invalid.ng-touched]:focus-visible:ring-destructive',
13
- true: 'text-destructive/90 dark:text-destructive/60 border-destructive focus-visible:ring-destructive',
14
- },
15
- },
16
- defaultVariants: {
17
- error: 'auto',
18
- },
19
- });
20
9
  class HlmInput {
21
- error = input('auto', ...(ngDevMode ? [{ debugName: "error" }] : []));
22
- _state = linkedSignal(() => ({ error: this.error() }), ...(ngDevMode ? [{ debugName: "_state" }] : []));
23
- userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
24
- _computedClass = computed(() => hlm(inputVariants({ error: this._state().error }), this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
25
- _injector = inject(Injector);
26
- ngControl = this._injector.get(NgControl, null);
27
- _errorStateTracker;
28
- _defaultErrorStateMatcher = inject(ErrorStateMatcher);
29
- _parentForm = inject(NgForm, { optional: true });
30
- _parentFormGroup = inject(FormGroupDirective, { optional: true });
31
- errorState = computed(() => this._errorStateTracker.errorState(), ...(ngDevMode ? [{ debugName: "errorState" }] : []));
32
10
  constructor() {
33
- this._errorStateTracker = new ErrorStateTracker(this._defaultErrorStateMatcher, this.ngControl, this._parentFormGroup, this._parentForm);
34
- effect(() => {
35
- const error = this._errorStateTracker.errorState();
36
- untracked(() => {
37
- if (this.ngControl) {
38
- const shouldShowError = error && this.ngControl.invalid && (this.ngControl.touched || this.ngControl.dirty);
39
- this._errorStateTracker.errorState.set(shouldShowError ? true : false);
40
- this.setError(shouldShowError ? true : 'auto');
41
- }
42
- });
43
- });
11
+ classes(() => 'dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 data-[matches-spartan-invalid=true]:ring-destructive/20 dark:data-[matches-spartan-invalid=true]:ring-destructive/40 data-[matches-spartan-invalid=true]:border-destructive dark:data-[matches-spartan-invalid=true]:border-destructive/50 h-9 rounded-md border bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] file:h-7 file:text-sm file:font-medium focus-visible:ring-3 data-[matches-spartan-invalid=true]:ring-3 md:text-sm file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50');
44
12
  }
45
- ngDoCheck() {
46
- this._errorStateTracker.updateErrorState();
47
- }
48
- setError(error) {
49
- this._state.set({ error });
50
- }
51
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HlmInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });
52
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.15", type: HlmInput, isStandalone: true, selector: "[hlmInput]", inputs: { error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, providers: [
53
- {
54
- provide: BrnFormFieldControl,
55
- useExisting: forwardRef(() => HlmInput),
56
- },
57
- ], ngImport: i0 });
13
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });
14
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmInput, isStandalone: true, selector: "[hlmInput]", host: { attributes: { "data-slot": "input" } }, hostDirectives: [{ directive: i1.BrnInput, inputs: ["id", "id", "forceInvalid", "forceInvalid"] }, { directive: i2.BrnFieldControlDescribedBy }], ngImport: i0 });
58
15
  }
59
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HlmInput, decorators: [{
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmInput, decorators: [{
60
17
  type: Directive,
61
18
  args: [{
62
19
  selector: '[hlmInput]',
63
- host: {
64
- '[class]': '_computedClass()',
65
- },
66
- providers: [
67
- {
68
- provide: BrnFormFieldControl,
69
- useExisting: forwardRef(() => HlmInput),
70
- },
71
- ],
20
+ hostDirectives: [{ directive: BrnInput, inputs: ['id', 'forceInvalid'] }, BrnFieldControlDescribedBy],
21
+ host: { 'data-slot': 'input' },
72
22
  }]
73
- }], ctorParameters: () => [], propDecorators: { error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
23
+ }], ctorParameters: () => [] });
74
24
 
75
25
  /*
76
26
  * Public API Surface of input
77
27
  */
78
- const HlmInputImpots = [HlmInput];
28
+ const HlmInputImports = [HlmInput];
79
29
  class HlmInputModule {
80
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HlmInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
81
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: HlmInputModule, imports: [HlmInput], exports: [HlmInput] });
82
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HlmInputModule });
30
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
31
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.7", ngImport: i0, type: HlmInputModule, imports: [HlmInput], exports: [HlmInput] });
32
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmInputModule });
83
33
  }
84
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HlmInputModule, decorators: [{
34
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmInputModule, decorators: [{
85
35
  type: NgModule,
86
36
  args: [{
87
- imports: [...HlmInputImpots],
88
- exports: [...HlmInputImpots],
37
+ imports: [...HlmInputImports],
38
+ exports: [...HlmInputImports],
89
39
  }]
90
40
  }] });
91
41
 
@@ -93,5 +43,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
93
43
  * Generated bundle index. Do not edit.
94
44
  */
95
45
 
96
- export { HlmInput, HlmInputImpots, HlmInputModule, inputVariants };
46
+ export { HlmInput, HlmInputImports, HlmInputModule };
97
47
  //# sourceMappingURL=input.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.mjs","sources":["../../../projects/input/src/lib/input.ts","../../../projects/input/src/public-api.ts","../../../projects/input/src/input.ts"],"sourcesContent":["import {\n computed,\n Directive,\n type DoCheck,\n effect,\n forwardRef,\n inject,\n Injector,\n input,\n linkedSignal,\n untracked,\n} from '@angular/core';\nimport { FormGroupDirective, NgControl, NgForm } from '@angular/forms';\nimport { BrnFormFieldControl } from '@spartan-ng/brain/form-field';\nimport { ErrorStateMatcher, ErrorStateTracker } from '@spartan-ng/brain/forms';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport { cva, VariantProps } from 'class-variance-authority';\nimport type { ClassValue } from 'clsx';\n\nexport const inputVariants = cva(\n 'tw:file:text-foreground tw:placeholder:text-muted-foreground tw:selection:bg-primary tw:selection:text-primary-foreground tw:dark:bg-input/10 tw:border-input tw:shadow-xs tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:flex tw:h-9 tw:w-full tw:min-w-0 tw:rounded-md tw:border tw:bg-transparent tw:px-3 tw:py-1 tw:text-base tw:outline-none tw:transition-[color,box-shadow] tw:file:inline-flex tw:file:h-7 tw:file:border-0 tw:file:bg-transparent tw:file:text-sm tw:file:font-medium tw:focus-visible:ring-[3px] tw:disabled:pointer-events-none tw:disabled:cursor-not-allowed tw:disabled:opacity-50 md:text-sm',\n {\n variants: {\n error: {\n auto: 'tw:[&.ng-invalid.ng-touched]:text-destructive/20 tw:dark:[&.ng-invalid.ng-touched]:text-destructive/40 tw:[&.ng-invalid.ng-touched]:border-destructive tw:[&.ng-invalid.ng-touched]:focus-visible:ring-destructive',\n true: 'tw:text-destructive/90 dark:text-destructive/60 tw:border-destructive tw:focus-visible:ring-destructive',\n },\n },\n defaultVariants: {\n error: 'auto',\n },\n },\n);\ntype InputVariants = VariantProps<typeof inputVariants>;\n\n@Directive({\n selector: '[hlmInput]',\n host: {\n '[class]': '_computedClass()',\n },\n providers: [\n {\n provide: BrnFormFieldControl,\n useExisting: forwardRef(() => HlmInput),\n },\n ],\n})\nexport class HlmInput implements BrnFormFieldControl, DoCheck {\n public readonly error = input<InputVariants['error']>('auto');\n\n protected readonly _state = linkedSignal(() => ({ error: this.error() }));\n\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm(inputVariants({ error: this._state().error }), this.userClass()),\n );\n\n private readonly _injector = inject(Injector);\n\n public readonly ngControl: NgControl | null = this._injector.get(NgControl, null);\n\n private readonly _errorStateTracker: ErrorStateTracker;\n\n private readonly _defaultErrorStateMatcher = inject(ErrorStateMatcher);\n private readonly _parentForm = inject(NgForm, { optional: true });\n private readonly _parentFormGroup = inject(FormGroupDirective, { optional: true });\n\n public readonly errorState = computed(() => this._errorStateTracker.errorState());\n\n constructor() {\n this._errorStateTracker = new ErrorStateTracker(\n this._defaultErrorStateMatcher,\n this.ngControl,\n this._parentFormGroup,\n this._parentForm,\n );\n\n effect(() => {\n const error = this._errorStateTracker.errorState();\n untracked(() => {\n if (this.ngControl) {\n const shouldShowError = error && this.ngControl.invalid && (this.ngControl.touched || this.ngControl.dirty);\n this._errorStateTracker.errorState.set(shouldShowError ? true : false);\n this.setError(shouldShowError ? true : 'auto');\n }\n });\n });\n }\n\n ngDoCheck() {\n this._errorStateTracker.updateErrorState();\n }\n\n setError(error: InputVariants['error']) {\n this._state.set({ error });\n }\n}\n","/*\n * Public API Surface of input\n */\n\nimport { NgModule } from '@angular/core';\nimport { HlmInput } from './lib/input';\n\nexport * from './lib/input';\n\nexport const HlmInputImpots = [HlmInput] as const;\n\n@NgModule({\n imports: [...HlmInputImpots],\n exports: [...HlmInputImpots],\n})\nexport class HlmInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAmBO,MAAM,aAAa,GAAG,GAAG,CAC9B,4mBAA4mB,EAC5mB;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,oNAAoN;AAC1N,YAAA,IAAI,EAAE,yGAAyG;AAChH,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,KAAK,EAAE,MAAM;AACd,KAAA;AACF,CAAA;MAgBU,QAAQ,CAAA;AACH,IAAA,KAAK,GAAG,KAAK,CAAyB,MAAM,iDAAC;AAE1C,IAAA,MAAM,GAAG,YAAY,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,kDAAC;AAEzD,IAAA,SAAS,GAAG,KAAK,CAAa,EAAE,6CAAI,KAAK,EAAE,OAAO,EAAA,CAAA,GAAA,CAAhB,EAAE,KAAK,EAAE,OAAO,EAAE,GAAC;AAClD,IAAA,cAAc,GAAG,QAAQ,CAAC,MAC3C,GAAG,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,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AAkB;AAC9B,qBAAA;AACD,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,mBAAmB;AAC5B,4BAAA,WAAW,EAAE,UAAU,CAAC,cAAc,CAAC;AACxC,yBAAA;AACF,qBAAA;AACF,iBAAA;;;AC9CD;;AAEG;AAOI,MAAM,cAAc,GAAG,CAAC,QAAQ;MAM1B,cAAc,CAAA;wGAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;yGAAd,cAAc,EAAA,OAAA,EAAA,CANI,QAAQ,CAAA,EAAA,OAAA,EAAA,CAAR,QAAQ,CAAA,EAAA,CAAA;yGAM1B,cAAc,EAAA,CAAA;;4FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,cAAc,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,cAAc,CAAC;AAC7B,iBAAA;;;ACdD;;AAEG;;;;"}
1
+ {"version":3,"file":"input.mjs","sources":["../../../projects/input/src/lib/hlm-input.ts","../../../projects/input/src/public-api.ts","../../../projects/input/src/input.ts"],"sourcesContent":["import { Directive } from '@angular/core';\nimport { BrnFieldControlDescribedBy } from '@spartan-ng/brain/field';\nimport { BrnInput } from '@spartan-ng/brain/input';\nimport { classes } from '@egose/shadcn-theme-ng/utils';\n\n@Directive({\n selector: '[hlmInput]',\n hostDirectives: [{ directive: BrnInput, inputs: ['id', 'forceInvalid'] }, BrnFieldControlDescribedBy],\n host: { 'data-slot': 'input' },\n})\nexport class HlmInput {\n constructor() {\n classes(\n () =>\n 'dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 data-[matches-spartan-invalid=true]:ring-destructive/20 dark:data-[matches-spartan-invalid=true]:ring-destructive/40 data-[matches-spartan-invalid=true]:border-destructive dark:data-[matches-spartan-invalid=true]:border-destructive/50 h-9 rounded-md border bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] file:h-7 file:text-sm file:font-medium focus-visible:ring-3 data-[matches-spartan-invalid=true]:ring-3 md:text-sm file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',\n );\n }\n}\n","/*\n * Public API Surface of input\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmInput } from './lib/hlm-input';\n\nexport * from './lib/hlm-input';\n\nexport const HlmInputImports = [HlmInput] as const;\n\n@NgModule({\n imports: [...HlmInputImports],\n exports: [...HlmInputImports],\n})\nexport class HlmInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAUa,QAAQ,CAAA;AACnB,IAAA,WAAA,GAAA;AACE,QAAA,OAAO,CACL,MACE,uuBAAuuB,CAC1uB;IACH;uGANW,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAR,QAAQ,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,WAAA,EAAA,OAAA,EAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,QAAA,EAAA,MAAA,EAAA,CAAA,IAAA,EAAA,IAAA,EAAA,cAAA,EAAA,cAAA,CAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,0BAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAR,QAAQ,EAAA,UAAA,EAAA,CAAA;kBALpB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,YAAY;AACtB,oBAAA,cAAc,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,cAAc,CAAC,EAAE,EAAE,0BAA0B,CAAC;AACrG,oBAAA,IAAI,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE;AAC/B,iBAAA;;;ACTD;;AAEG;AAQI,MAAM,eAAe,GAAG,CAAC,QAAQ;MAM3B,cAAc,CAAA;uGAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAd,cAAc,EAAA,OAAA,EAAA,CANK,QAAQ,CAAA,EAAA,OAAA,EAAA,CAAR,QAAQ,CAAA,EAAA,CAAA;wGAM3B,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;;;ACfD;;AAEG;;;;"}
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "input",
3
+ "version": "0.0.1",
4
+ "peerDependencies": {
5
+ "@angular/common": "^20.2.0 || ^22.0.0",
6
+ "@angular/core": "^20.2.0 || ^22.0.0",
7
+ "@spartan-ng/brain": "^0.0.1-alpha.512"
8
+ },
9
+ "dependencies": {
10
+ "tslib": "^2.3.0"
11
+ },
12
+ "sideEffects": false,
13
+ "module": "fesm2022/input.mjs",
14
+ "typings": "types/input.d.ts",
15
+ "exports": {
16
+ "./package.json": {
17
+ "default": "./package.json"
18
+ },
19
+ ".": {
20
+ "types": "./types/input.d.ts",
21
+ "default": "./fesm2022/input.mjs"
22
+ }
23
+ },
24
+ "type": "module"
25
+ }
@@ -0,0 +1,18 @@
1
+ import * as i0 from '@angular/core';
2
+ import * as i1 from '@spartan-ng/brain/input';
3
+ import * as i2 from '@spartan-ng/brain/field';
4
+
5
+ declare class HlmInput {
6
+ constructor();
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmInput, never>;
8
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmInput, "[hlmInput]", never, {}, {}, never, never, true, [{ directive: typeof i1.BrnInput; inputs: { "id": "id"; "forceInvalid": "forceInvalid"; }; outputs: {}; }, { directive: typeof i2.BrnFieldControlDescribedBy; inputs: {}; outputs: {}; }]>;
9
+ }
10
+
11
+ declare const HlmInputImports: readonly [typeof HlmInput];
12
+ declare class HlmInputModule {
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmInputModule, never>;
14
+ static ɵmod: i0.ɵɵNgModuleDeclaration<HlmInputModule, never, [typeof HlmInput], [typeof HlmInput]>;
15
+ static ɵinj: i0.ɵɵInjectorDeclaration<HlmInputModule>;
16
+ }
17
+
18
+ export { HlmInput, HlmInputImports, HlmInputModule };
@@ -0,0 +1,11 @@
1
+ # InputGroup
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 input-group
11
+ ```
@@ -0,0 +1,199 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Directive, input, NgModule } from '@angular/core';
3
+ import { classes } from '@egose/shadcn-theme-ng/utils';
4
+ import { cva } from 'class-variance-authority';
5
+ import * as i1 from '@egose/shadcn-theme-ng/button';
6
+ import { provideBrnButtonConfig, HlmBtn } from '@egose/shadcn-theme-ng/button';
7
+ import * as i1$1 from '@egose/shadcn-theme-ng/input';
8
+ import { HlmInput } from '@egose/shadcn-theme-ng/input';
9
+ import * as i1$2 from '@egose/shadcn-theme-ng/textarea';
10
+ import { HlmTextarea } from '@egose/shadcn-theme-ng/textarea';
11
+
12
+ class HlmInputGroup {
13
+ constructor() {
14
+ classes(() => 'border-input dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][data-matches-spartan-invalid=true]]:ring-destructive/20 has-[[data-slot][data-matches-spartan-invalid=true]]:border-destructive dark:has-[[data-slot][data-matches-spartan-invalid=true]]:ring-destructive/40 h-9 rounded-md border shadow-xs transition-[color,box-shadow] in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot][data-matches-spartan-invalid=true]]:ring-3 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pe-1.5 has-[>[data-align=inline-start]]:[&>input]:ps-1.5 group/input-group relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto');
15
+ }
16
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmInputGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
17
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmInputGroup, isStandalone: true, selector: "[hlmInputGroup],hlm-input-group", host: { attributes: { "data-slot": "input-group", "role": "group" } }, ngImport: i0 });
18
+ }
19
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmInputGroup, decorators: [{
20
+ type: Directive,
21
+ args: [{
22
+ selector: '[hlmInputGroup],hlm-input-group',
23
+ host: {
24
+ 'data-slot': 'input-group',
25
+ role: 'group',
26
+ },
27
+ }]
28
+ }], ctorParameters: () => [] });
29
+
30
+ const inputGroupAddonVariants$1 = cva("text-muted-foreground h-auto gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>ng-icon:not([class*='text-'])]:text-[length:--spacing(4)] flex cursor-text items-center justify-center select-none", {
31
+ variants: {
32
+ align: {
33
+ 'inline-start': 'ps-2 has-[>button]:-ms-1 has-[>kbd]:ms-[-0.15rem] order-first',
34
+ 'inline-end': 'pe-2 has-[>button]:-me-1 has-[>kbd]:me-[-0.15rem] order-last',
35
+ 'block-start': 'px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start',
36
+ 'block-end': 'px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start',
37
+ },
38
+ },
39
+ defaultVariants: {
40
+ align: 'inline-start',
41
+ },
42
+ });
43
+ class HlmInputGroupAddon {
44
+ align = input('inline-start', /* @ts-ignore */
45
+ ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
46
+ constructor() {
47
+ classes(() => inputGroupAddonVariants$1({ align: this.align() }));
48
+ }
49
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmInputGroupAddon, deps: [], target: i0.ɵɵFactoryTarget.Directive });
50
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: HlmInputGroupAddon, isStandalone: true, selector: "[hlmInputGroupAddon],hlm-input-group-addon", inputs: { align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group", "data-slot": "input-group-addon" }, properties: { "attr.data-align": "align()" } }, ngImport: i0 });
51
+ }
52
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmInputGroupAddon, decorators: [{
53
+ type: Directive,
54
+ args: [{
55
+ selector: '[hlmInputGroupAddon],hlm-input-group-addon',
56
+ host: {
57
+ role: 'group',
58
+ 'data-slot': 'input-group-addon',
59
+ '[attr.data-align]': 'align()',
60
+ },
61
+ }]
62
+ }], ctorParameters: () => [], propDecorators: { align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }] } });
63
+
64
+ const inputGroupAddonVariants = cva('gap-2 text-sm flex items-center shadow-none', {
65
+ variants: {
66
+ size: {
67
+ xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>ng-icon:not([class*='text-'])]:text-[length:--spacing(3.5)]",
68
+ sm: '',
69
+ 'icon-xs': 'size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>ng-icon]:p-0',
70
+ 'icon-sm': 'size-8 p-0 has-[>ng-icon]:p-0',
71
+ },
72
+ },
73
+ defaultVariants: {
74
+ size: 'xs',
75
+ },
76
+ });
77
+ class HlmInputGroupButton {
78
+ size = input('xs', /* @ts-ignore */
79
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
80
+ type = input('button', /* @ts-ignore */
81
+ ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
82
+ constructor() {
83
+ classes(() => inputGroupAddonVariants({ size: this.size() }));
84
+ }
85
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmInputGroupButton, deps: [], target: i0.ɵɵFactoryTarget.Directive });
86
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: HlmInputGroupButton, isStandalone: true, selector: "button[hlmInputGroupButton]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-size": "size()", "type": "type()" } }, providers: [
87
+ provideBrnButtonConfig({
88
+ variant: 'ghost',
89
+ }),
90
+ ], hostDirectives: [{ directive: i1.HlmBtn, inputs: ["variant", "variant"] }], ngImport: i0 });
91
+ }
92
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmInputGroupButton, decorators: [{
93
+ type: Directive,
94
+ args: [{
95
+ selector: 'button[hlmInputGroupButton]',
96
+ providers: [
97
+ provideBrnButtonConfig({
98
+ variant: 'ghost',
99
+ }),
100
+ ],
101
+ hostDirectives: [
102
+ {
103
+ directive: HlmBtn,
104
+ inputs: ['variant'],
105
+ },
106
+ ],
107
+ host: {
108
+ '[attr.data-size]': 'size()',
109
+ '[type]': 'type()',
110
+ },
111
+ }]
112
+ }], ctorParameters: () => [], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }] } });
113
+
114
+ class HlmInputGroupInput {
115
+ constructor() {
116
+ classes(() => `rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 data-[matches-spartan-invalid=true]:ring-0 dark:bg-transparent flex-1`);
117
+ }
118
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmInputGroupInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });
119
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmInputGroupInput, isStandalone: true, selector: "input[hlmInputGroupInput]", host: { attributes: { "data-slot": "input-group-control" } }, hostDirectives: [{ directive: i1$1.HlmInput }], ngImport: i0 });
120
+ }
121
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmInputGroupInput, decorators: [{
122
+ type: Directive,
123
+ args: [{
124
+ selector: 'input[hlmInputGroupInput]',
125
+ hostDirectives: [HlmInput],
126
+ host: { 'data-slot': 'input-group-control' },
127
+ }]
128
+ }], ctorParameters: () => [] });
129
+
130
+ class HlmInputGroupText {
131
+ constructor() {
132
+ classes(() => "text-muted-foreground gap-2 text-sm [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(4)] flex items-center [&_ng-icon]:pointer-events-none");
133
+ }
134
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmInputGroupText, deps: [], target: i0.ɵɵFactoryTarget.Directive });
135
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmInputGroupText, isStandalone: true, selector: "[hlmInputGroupText],hlm-input-group-text", ngImport: i0 });
136
+ }
137
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmInputGroupText, decorators: [{
138
+ type: Directive,
139
+ args: [{
140
+ selector: '[hlmInputGroupText],hlm-input-group-text',
141
+ }]
142
+ }], ctorParameters: () => [] });
143
+
144
+ class HlmInputGroupTextarea {
145
+ constructor() {
146
+ classes(() => 'rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 data-[matches-spartan-invalid=true]:ring-0 dark:bg-transparent flex-1 resize-none');
147
+ }
148
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmInputGroupTextarea, deps: [], target: i0.ɵɵFactoryTarget.Directive });
149
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmInputGroupTextarea, isStandalone: true, selector: "textarea[hlmInputGroupTextarea]", host: { attributes: { "data-slot": "input-group-control" } }, hostDirectives: [{ directive: i1$2.HlmTextarea }], ngImport: i0 });
150
+ }
151
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmInputGroupTextarea, decorators: [{
152
+ type: Directive,
153
+ args: [{
154
+ selector: 'textarea[hlmInputGroupTextarea]',
155
+ hostDirectives: [HlmTextarea],
156
+ host: { 'data-slot': 'input-group-control' },
157
+ }]
158
+ }], ctorParameters: () => [] });
159
+
160
+ /*
161
+ * Public API Surface of input-group
162
+ */
163
+ const HlmInputGroupImports = [
164
+ HlmInputGroup,
165
+ HlmInputGroupAddon,
166
+ HlmInputGroupButton,
167
+ HlmInputGroupInput,
168
+ HlmInputGroupText,
169
+ HlmInputGroupTextarea,
170
+ ];
171
+ class HlmInputGroupModule {
172
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmInputGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
173
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.7", ngImport: i0, type: HlmInputGroupModule, imports: [HlmInputGroup,
174
+ HlmInputGroupAddon,
175
+ HlmInputGroupButton,
176
+ HlmInputGroupInput,
177
+ HlmInputGroupText,
178
+ HlmInputGroupTextarea], exports: [HlmInputGroup,
179
+ HlmInputGroupAddon,
180
+ HlmInputGroupButton,
181
+ HlmInputGroupInput,
182
+ HlmInputGroupText,
183
+ HlmInputGroupTextarea] });
184
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmInputGroupModule });
185
+ }
186
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmInputGroupModule, decorators: [{
187
+ type: NgModule,
188
+ args: [{
189
+ imports: [...HlmInputGroupImports],
190
+ exports: [...HlmInputGroupImports],
191
+ }]
192
+ }] });
193
+
194
+ /**
195
+ * Generated bundle index. Do not edit.
196
+ */
197
+
198
+ export { HlmInputGroup, HlmInputGroupAddon, HlmInputGroupButton, HlmInputGroupImports, HlmInputGroupInput, HlmInputGroupModule, HlmInputGroupText, HlmInputGroupTextarea };
199
+ //# sourceMappingURL=input-group.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-group.mjs","sources":["../../../projects/input-group/src/lib/hlm-input-group.ts","../../../projects/input-group/src/lib/hlm-input-group-addon.ts","../../../projects/input-group/src/lib/hlm-input-group-button.ts","../../../projects/input-group/src/lib/hlm-input-group-input.ts","../../../projects/input-group/src/lib/hlm-input-group-text.ts","../../../projects/input-group/src/lib/hlm-input-group-textarea.ts","../../../projects/input-group/src/public-api.ts","../../../projects/input-group/src/input-group.ts"],"sourcesContent":["import { Directive } from '@angular/core';\nimport { classes } from '@egose/shadcn-theme-ng/utils';\n\n@Directive({\n selector: '[hlmInputGroup],hlm-input-group',\n host: {\n 'data-slot': 'input-group',\n role: 'group',\n },\n})\nexport class HlmInputGroup {\n constructor() {\n classes(\n () =>\n 'border-input dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][data-matches-spartan-invalid=true]]:ring-destructive/20 has-[[data-slot][data-matches-spartan-invalid=true]]:border-destructive dark:has-[[data-slot][data-matches-spartan-invalid=true]]:ring-destructive/40 h-9 rounded-md border shadow-xs transition-[color,box-shadow] in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot][data-matches-spartan-invalid=true]]:ring-3 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pe-1.5 has-[>[data-align=inline-start]]:[&>input]:ps-1.5 group/input-group relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto',\n );\n }\n}\n","import { Directive, input } from '@angular/core';\nimport { classes } from '@egose/shadcn-theme-ng/utils';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nconst inputGroupAddonVariants = cva(\n \"text-muted-foreground h-auto gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>ng-icon:not([class*='text-'])]:text-[length:--spacing(4)] flex cursor-text items-center justify-center select-none\",\n {\n variants: {\n align: {\n 'inline-start': 'ps-2 has-[>button]:-ms-1 has-[>kbd]:ms-[-0.15rem] order-first',\n 'inline-end': 'pe-2 has-[>button]:-me-1 has-[>kbd]:me-[-0.15rem] order-last',\n 'block-start':\n 'px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start',\n 'block-end': 'px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start',\n },\n },\n defaultVariants: {\n align: 'inline-start',\n },\n },\n);\n\ntype InputGroupAddonVariants = VariantProps<typeof inputGroupAddonVariants>;\n\n@Directive({\n selector: '[hlmInputGroupAddon],hlm-input-group-addon',\n host: {\n role: 'group',\n 'data-slot': 'input-group-addon',\n '[attr.data-align]': 'align()',\n },\n})\nexport class HlmInputGroupAddon {\n public readonly align = input<InputGroupAddonVariants['align']>('inline-start');\n\n constructor() {\n classes(() => inputGroupAddonVariants({ align: this.align() }));\n }\n}\n","import { Directive, input } from '@angular/core';\nimport { HlmBtn, provideBrnButtonConfig } from '@egose/shadcn-theme-ng/button';\nimport { classes } from '@egose/shadcn-theme-ng/utils';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nconst inputGroupAddonVariants = cva('gap-2 text-sm flex items-center shadow-none', {\n variants: {\n size: {\n xs: \"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>ng-icon:not([class*='text-'])]:text-[length:--spacing(3.5)]\",\n sm: '',\n 'icon-xs': 'size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>ng-icon]:p-0',\n 'icon-sm': 'size-8 p-0 has-[>ng-icon]:p-0',\n },\n },\n defaultVariants: {\n size: 'xs',\n },\n});\n\ntype InputGroupAddonVariants = VariantProps<typeof inputGroupAddonVariants>;\n\n@Directive({\n selector: 'button[hlmInputGroupButton]',\n providers: [\n provideBrnButtonConfig({\n variant: 'ghost',\n }),\n ],\n hostDirectives: [\n {\n directive: HlmBtn,\n inputs: ['variant'],\n },\n ],\n host: {\n '[attr.data-size]': 'size()',\n '[type]': 'type()',\n },\n})\nexport class HlmInputGroupButton {\n public readonly size = input<InputGroupAddonVariants['size']>('xs');\n public readonly type = input<'button' | 'submit' | 'reset'>('button');\n\n constructor() {\n classes(() => inputGroupAddonVariants({ size: this.size() }));\n }\n}\n","import { Directive } from '@angular/core';\nimport { HlmInput } from '@egose/shadcn-theme-ng/input';\nimport { classes } from '@egose/shadcn-theme-ng/utils';\n\n@Directive({\n selector: 'input[hlmInputGroupInput]',\n hostDirectives: [HlmInput],\n host: { 'data-slot': 'input-group-control' },\n})\nexport class HlmInputGroupInput {\n constructor() {\n classes(\n () =>\n `rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 data-[matches-spartan-invalid=true]:ring-0 dark:bg-transparent flex-1`,\n );\n }\n}\n","import { Directive } from '@angular/core';\nimport { classes } from '@egose/shadcn-theme-ng/utils';\n\n@Directive({\n selector: '[hlmInputGroupText],hlm-input-group-text',\n})\nexport class HlmInputGroupText {\n constructor() {\n classes(\n () =>\n \"text-muted-foreground gap-2 text-sm [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(4)] flex items-center [&_ng-icon]:pointer-events-none\",\n );\n }\n}\n","import { Directive } from '@angular/core';\nimport { HlmTextarea } from '@egose/shadcn-theme-ng/textarea';\nimport { classes } from '@egose/shadcn-theme-ng/utils';\n\n@Directive({\n selector: 'textarea[hlmInputGroupTextarea]',\n hostDirectives: [HlmTextarea],\n host: { 'data-slot': 'input-group-control' },\n})\nexport class HlmInputGroupTextarea {\n constructor() {\n classes(\n () =>\n 'rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 data-[matches-spartan-invalid=true]:ring-0 dark:bg-transparent flex-1 resize-none',\n );\n }\n}\n","/*\n * Public API Surface of input-group\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmInputGroup } from './lib/hlm-input-group';\nimport { HlmInputGroupAddon } from './lib/hlm-input-group-addon';\nimport { HlmInputGroupButton } from './lib/hlm-input-group-button';\nimport { HlmInputGroupInput } from './lib/hlm-input-group-input';\nimport { HlmInputGroupText } from './lib/hlm-input-group-text';\nimport { HlmInputGroupTextarea } from './lib/hlm-input-group-textarea';\n\nexport * from './lib/hlm-input-group';\nexport * from './lib/hlm-input-group-addon';\nexport * from './lib/hlm-input-group-button';\nexport * from './lib/hlm-input-group-input';\nexport * from './lib/hlm-input-group-text';\nexport * from './lib/hlm-input-group-textarea';\n\nexport const HlmInputGroupImports = [\n HlmInputGroup,\n HlmInputGroupAddon,\n HlmInputGroupButton,\n HlmInputGroupInput,\n HlmInputGroupText,\n HlmInputGroupTextarea,\n] as const;\n\n@NgModule({\n imports: [...HlmInputGroupImports],\n exports: [...HlmInputGroupImports],\n})\nexport class HlmInputGroupModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["inputGroupAddonVariants","i1"],"mappings":";;;;;;;;;;;MAUa,aAAa,CAAA;AACxB,IAAA,WAAA,GAAA;AACE,QAAA,OAAO,CACL,MACE,8lCAA8lC,CACjmC;IACH;uGANW,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAb,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iCAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,WAAA,EAAA,aAAA,EAAA,MAAA,EAAA,OAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBAPzB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iCAAiC;AAC3C,oBAAA,IAAI,EAAE;AACJ,wBAAA,WAAW,EAAE,aAAa;AAC1B,wBAAA,IAAI,EAAE,OAAO;AACd,qBAAA;AACF,iBAAA;;;ACLD,MAAMA,yBAAuB,GAAG,GAAG,CACjC,iRAAiR,EACjR;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,KAAK,EAAE;AACL,YA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W,CAAC;AAC7B,oBAAA,IAAI,EAAE,EAAE,WAAW,EAAE,qBAAqB,EAAE;AAC7C,iBAAA;;;ACRD;;AAEG;AAkBI,MAAM,oBAAoB,GAAG;IAClC,aAAa;IACb,kBAAkB;IAClB,mBAAmB;IACnB,kBAAkB;IAClB,iBAAiB;IACjB,qBAAqB;;MAOV,mBAAmB,CAAA;uGAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAZ9B,aAAa;YACb,kBAAkB;YAClB,mBAAmB;YACnB,kBAAkB;YAClB,iBAAiB;AACjB,YAAA,qBAAqB,aALrB,aAAa;YACb,kBAAkB;YAClB,mBAAmB;YACnB,kBAAkB;YAClB,iBAAiB;YACjB,qBAAqB,CAAA,EAAA,CAAA;wGAOV,mBAAmB,EAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC;AAClC,oBAAA,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC;AACnC,iBAAA;;;AChCD;;AAEG;;;;"}
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "input-group",
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/input-group.mjs",
14
+ "typings": "types/input-group.d.ts",
15
+ "exports": {
16
+ "./package.json": {
17
+ "default": "./package.json"
18
+ },
19
+ ".": {
20
+ "types": "./types/input-group.d.ts",
21
+ "default": "./fesm2022/input-group.mjs"
22
+ }
23
+ },
24
+ "type": "module"
25
+ }
@@ -0,0 +1,52 @@
1
+ import * as i0 from '@angular/core';
2
+ import * as i1 from '@egose/shadcn-theme-ng/button';
3
+ import * as i1$1 from '@egose/shadcn-theme-ng/input';
4
+ import * as i1$2 from '@egose/shadcn-theme-ng/textarea';
5
+
6
+ declare class HlmInputGroup {
7
+ constructor();
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmInputGroup, never>;
9
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmInputGroup, "[hlmInputGroup],hlm-input-group", never, {}, {}, never, never, true, never>;
10
+ }
11
+
12
+ declare class HlmInputGroupAddon {
13
+ readonly align: i0.InputSignal<"inline-start" | "inline-end" | "block-start" | "block-end" | null | undefined>;
14
+ constructor();
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmInputGroupAddon, never>;
16
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmInputGroupAddon, "[hlmInputGroupAddon],hlm-input-group-addon", never, { "align": { "alias": "align"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
17
+ }
18
+
19
+ declare class HlmInputGroupButton {
20
+ readonly size: i0.InputSignal<"xs" | "sm" | "icon-xs" | "icon-sm" | null | undefined>;
21
+ readonly type: i0.InputSignal<"button" | "submit" | "reset">;
22
+ constructor();
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmInputGroupButton, never>;
24
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmInputGroupButton, "button[hlmInputGroupButton]", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.HlmBtn; inputs: { "variant": "variant"; }; outputs: {}; }]>;
25
+ }
26
+
27
+ declare class HlmInputGroupInput {
28
+ constructor();
29
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmInputGroupInput, never>;
30
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmInputGroupInput, "input[hlmInputGroupInput]", never, {}, {}, never, never, true, [{ directive: typeof i1$1.HlmInput; inputs: {}; outputs: {}; }]>;
31
+ }
32
+
33
+ declare class HlmInputGroupText {
34
+ constructor();
35
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmInputGroupText, never>;
36
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmInputGroupText, "[hlmInputGroupText],hlm-input-group-text", never, {}, {}, never, never, true, never>;
37
+ }
38
+
39
+ declare class HlmInputGroupTextarea {
40
+ constructor();
41
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmInputGroupTextarea, never>;
42
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmInputGroupTextarea, "textarea[hlmInputGroupTextarea]", never, {}, {}, never, never, true, [{ directive: typeof i1$2.HlmTextarea; inputs: {}; outputs: {}; }]>;
43
+ }
44
+
45
+ declare const HlmInputGroupImports: readonly [typeof HlmInputGroup, typeof HlmInputGroupAddon, typeof HlmInputGroupButton, typeof HlmInputGroupInput, typeof HlmInputGroupText, typeof HlmInputGroupTextarea];
46
+ declare class HlmInputGroupModule {
47
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmInputGroupModule, never>;
48
+ static ɵmod: i0.ɵɵNgModuleDeclaration<HlmInputGroupModule, never, [typeof HlmInputGroup, typeof HlmInputGroupAddon, typeof HlmInputGroupButton, typeof HlmInputGroupInput, typeof HlmInputGroupText, typeof HlmInputGroupTextarea], [typeof HlmInputGroup, typeof HlmInputGroupAddon, typeof HlmInputGroupButton, typeof HlmInputGroupInput, typeof HlmInputGroupText, typeof HlmInputGroupTextarea]>;
49
+ static ɵinj: i0.ɵɵInjectorDeclaration<HlmInputGroupModule>;
50
+ }
51
+
52
+ export { HlmInputGroup, HlmInputGroupAddon, HlmInputGroupButton, HlmInputGroupImports, HlmInputGroupInput, HlmInputGroupModule, HlmInputGroupText, HlmInputGroupTextarea };
@@ -0,0 +1,11 @@
1
+ # InputOtp
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 input-otp
11
+ ```