@gv-tech/ui-web 2.22.2 → 2.23.1

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 (468) hide show
  1. package/dist/accordion-Dd8Hrexd.mjs +244 -0
  2. package/dist/accordion-DdSOiVyo.js +1 -0
  3. package/dist/accordion.cjs +1 -1
  4. package/dist/accordion.d.ts +5 -7
  5. package/dist/accordion.d.ts.map +1 -1
  6. package/dist/accordion.mjs +1 -2
  7. package/dist/alert-dialog-B7zX3gJX.js +7 -0
  8. package/dist/alert-dialog-BQoG5g_w.mjs +213 -0
  9. package/dist/alert-dialog.cjs +1 -1
  10. package/dist/alert-dialog.d.ts +17 -21
  11. package/dist/alert-dialog.d.ts.map +1 -1
  12. package/dist/alert-dialog.mjs +2 -4
  13. package/dist/alert.cjs +1 -1
  14. package/dist/alert.d.ts +8 -8
  15. package/dist/alert.d.ts.map +1 -1
  16. package/dist/alert.mjs +37 -29
  17. package/dist/{aspect-ratio-CFWobEnT.mjs → aspect-ratio-DnChDaBi.mjs} +10 -4
  18. package/dist/{aspect-ratio-D9dApiWv.js → aspect-ratio-QD1ZXP2B.js} +1 -1
  19. package/dist/aspect-ratio.cjs +1 -1
  20. package/dist/aspect-ratio.d.ts +2 -4
  21. package/dist/aspect-ratio.d.ts.map +1 -1
  22. package/dist/aspect-ratio.mjs +1 -1
  23. package/dist/avatar-C4onD8-4.mjs +127 -0
  24. package/dist/avatar-ki_M47qG.js +1 -0
  25. package/dist/avatar.cjs +1 -1
  26. package/dist/avatar.d.ts +10 -7
  27. package/dist/avatar.d.ts.map +1 -1
  28. package/dist/avatar.mjs +2 -3
  29. package/dist/badge.cjs +1 -1
  30. package/dist/badge.d.ts +4 -5
  31. package/dist/badge.d.ts.map +1 -1
  32. package/dist/badge.mjs +17 -13
  33. package/dist/breadcrumb.cjs +1 -1
  34. package/dist/breadcrumb.d.ts +9 -17
  35. package/dist/breadcrumb.d.ts.map +1 -1
  36. package/dist/breadcrumb.mjs +67 -58
  37. package/dist/button-group.cjs +1 -0
  38. package/dist/button-group.d.ts +11 -0
  39. package/dist/button-group.d.ts.map +1 -0
  40. package/dist/button-group.mjs +39 -0
  41. package/dist/button.cjs +1 -1
  42. package/dist/button.d.ts +3 -5
  43. package/dist/button.d.ts.map +1 -1
  44. package/dist/button.mjs +33 -26
  45. package/dist/calendar-D9sapvfY.js +1 -0
  46. package/dist/{calendar-DtFx4qdT.mjs → calendar-Dg6VGycy.mjs} +631 -625
  47. package/dist/calendar.cjs +1 -1
  48. package/dist/calendar.d.ts +5 -5
  49. package/dist/calendar.d.ts.map +1 -1
  50. package/dist/calendar.mjs +1 -2
  51. package/dist/card.cjs +1 -1
  52. package/dist/card.d.ts +10 -10
  53. package/dist/card.d.ts.map +1 -1
  54. package/dist/card.mjs +53 -40
  55. package/dist/carousel-6oFHLN7R.js +1 -0
  56. package/dist/{carousel-PQJ97GjQ.mjs → carousel-DbDoNdqJ.mjs} +54 -59
  57. package/dist/carousel.cjs +1 -1
  58. package/dist/carousel.d.ts +18 -13
  59. package/dist/carousel.d.ts.map +1 -1
  60. package/dist/carousel.mjs +2 -4
  61. package/dist/chart.cjs +3 -3
  62. package/dist/chart.d.ts +35 -7
  63. package/dist/chart.d.ts.map +1 -1
  64. package/dist/chart.mjs +64 -71
  65. package/dist/checkbox-BLgY82mB.js +1 -0
  66. package/dist/{checkbox-BOmSuATv.mjs → checkbox-Bts_zfqd.mjs} +32 -29
  67. package/dist/checkbox.cjs +1 -1
  68. package/dist/checkbox.d.ts +2 -5
  69. package/dist/checkbox.d.ts.map +1 -1
  70. package/dist/checkbox.mjs +1 -2
  71. package/dist/collapsible.cjs +1 -1
  72. package/dist/collapsible.d.ts +4 -6
  73. package/dist/collapsible.d.ts.map +1 -1
  74. package/dist/collapsible.mjs +21 -3
  75. package/dist/combobox-6qNx9Wbb.js +4 -0
  76. package/dist/combobox-yDMqxM_J.mjs +5522 -0
  77. package/dist/combobox.cjs +1 -0
  78. package/dist/combobox.d.ts +21 -0
  79. package/dist/combobox.d.ts.map +1 -0
  80. package/dist/combobox.mjs +4 -0
  81. package/dist/command-C6wJ5giF.mjs +576 -0
  82. package/dist/command-DCrPL1iW.js +1 -0
  83. package/dist/command.cjs +1 -1
  84. package/dist/command.d.ts +16 -80
  85. package/dist/command.d.ts.map +1 -1
  86. package/dist/command.mjs +1 -2
  87. package/dist/context-menu-CydUpD4W.mjs +349 -0
  88. package/dist/context-menu-DQ7XuuG5.js +1 -0
  89. package/dist/context-menu.cjs +1 -1
  90. package/dist/context-menu.d.ts +29 -21
  91. package/dist/context-menu.d.ts.map +1 -1
  92. package/dist/context-menu.mjs +1 -2
  93. package/dist/dialog.cjs +1 -1
  94. package/dist/dialog.d.ts +15 -17
  95. package/dist/dialog.d.ts.map +1 -1
  96. package/dist/dialog.mjs +89 -43
  97. package/dist/direction.cjs +1 -0
  98. package/dist/direction.d.ts +7 -0
  99. package/dist/direction.d.ts.map +1 -0
  100. package/dist/direction.mjs +15 -0
  101. package/dist/dist-1C8JOpVg.js +1 -0
  102. package/dist/{dist-CTaBktQl.mjs → dist-B1OcuinL.mjs} +93 -92
  103. package/dist/dist-BGZDG175.mjs +199 -0
  104. package/dist/dist-BPBwSSyk.mjs +8 -0
  105. package/dist/{dist-BTlmz3JV.js → dist-BPX1UGAz2.js} +1 -1
  106. package/dist/dist-BRsDdVlJ.js +1 -0
  107. package/dist/{dist-_LAgxsbh.mjs → dist-BWwCr-xN.mjs} +10 -9
  108. package/dist/dist-BYdcKuDi.mjs +16 -0
  109. package/dist/{dist-DCKyUINZ.mjs → dist-BlB11V_z.mjs} +1 -1
  110. package/dist/dist-CCXBcfM3.js +1 -0
  111. package/dist/{dist--EFQaGUD.mjs → dist-CDU9vno-.mjs} +4 -4
  112. package/dist/dist-CJolxugc.js +1 -0
  113. package/dist/dist-CQhWBhaI.mjs +91 -0
  114. package/dist/dist-CRLbUj9C.js +1 -0
  115. package/dist/dist-CWElW7UD.js +1 -0
  116. package/dist/{dist-NIAlh3KC.js → dist-CXbzwSnE.js} +1 -1
  117. package/dist/{dist-C5EZ0AD6.mjs → dist-CYj6O95k.mjs} +42 -41
  118. package/dist/{dist-Bjlzl0jN.mjs → dist-Cacc4QIh.mjs} +13 -10
  119. package/dist/dist-ChuP-5Gb.js +1 -0
  120. package/dist/dist-CiM892Rg.js +1 -0
  121. package/dist/{dist-Doq7FY_P.js → dist-CuMQq0hV.js} +1 -1
  122. package/dist/dist-DMnXk8Uo.js +1 -0
  123. package/dist/{dist-CRmJFaEL.mjs → dist-DPBTfUqI.mjs} +18 -17
  124. package/dist/dist-DR0lXVFG.js +1 -0
  125. package/dist/dist-Da7BU5sd.js +5 -0
  126. package/dist/{dist-D_tuvB-W.mjs → dist-Dz3LbuDd.mjs} +8 -9
  127. package/dist/{dist-9gQKRtL7.mjs → dist-GhACpuJb2.mjs} +1 -1
  128. package/dist/dist-o4zlRoDG.js +1 -0
  129. package/dist/{dist-DdVp13bp.mjs → dist-rGeQfsgN.mjs} +1 -1
  130. package/dist/{dist-BQOrag93.mjs → dist-tvb2Wafb.mjs} +22 -21
  131. package/dist/drawer.cjs +1 -1
  132. package/dist/drawer.d.ts +10 -21
  133. package/dist/drawer.d.ts.map +1 -1
  134. package/dist/drawer.mjs +74 -45
  135. package/dist/dropdown-menu-BoJvZ3Fj.js +1 -0
  136. package/dist/dropdown-menu-CriaO1_i.mjs +347 -0
  137. package/dist/dropdown-menu.cjs +1 -1
  138. package/dist/dropdown-menu.d.ts +27 -21
  139. package/dist/dropdown-menu.d.ts.map +1 -1
  140. package/dist/dropdown-menu.mjs +1 -1
  141. package/dist/empty.cjs +1 -0
  142. package/dist/empty.d.ts +13 -0
  143. package/dist/empty.d.ts.map +1 -0
  144. package/dist/empty.mjs +60 -0
  145. package/dist/{es2015-DkZq_IIO.mjs → es2015-BhmbVcui.mjs} +2 -2
  146. package/dist/{es2015-Ca60p53M.js → es2015-D22cM8Q_.js} +1 -1
  147. package/dist/field.cjs +1 -0
  148. package/dist/field.d.ts +18 -0
  149. package/dist/field.d.ts.map +1 -0
  150. package/dist/field.mjs +109 -0
  151. package/dist/floating-ui.react-dom-DgS_bqyY.mjs +1089 -0
  152. package/dist/floating-ui.react-dom-DpCJEf_x.js +1 -0
  153. package/dist/form.cjs +1 -1
  154. package/dist/form.mjs +8 -8
  155. package/dist/hooks/use-mobile.d.ts +2 -0
  156. package/dist/hooks/use-mobile.d.ts.map +1 -0
  157. package/dist/hooks/use-theme.d.ts +16 -0
  158. package/dist/hooks/use-theme.d.ts.map +1 -1
  159. package/dist/{hover-card-BOk3-K0k.mjs → hover-card-CJ-ibpbC.mjs} +53 -33
  160. package/dist/hover-card-CK5SjVLL.js +1 -0
  161. package/dist/hover-card.cjs +1 -1
  162. package/dist/hover-card.d.ts +4 -6
  163. package/dist/hover-card.d.ts.map +1 -1
  164. package/dist/hover-card.mjs +1 -2
  165. package/dist/index.cjs +1 -1
  166. package/dist/index.d.ts +14 -43
  167. package/dist/index.d.ts.map +1 -1
  168. package/dist/index.mjs +66 -54
  169. package/dist/input-group.cjs +1 -0
  170. package/dist/input-group.d.ts +18 -0
  171. package/dist/input-group.d.ts.map +1 -0
  172. package/dist/input-group.mjs +78 -0
  173. package/dist/input-otp-BH_9dVhh.mjs +391 -0
  174. package/dist/input-otp-BibboKMt.js +20 -0
  175. package/dist/input-otp.cjs +1 -0
  176. package/dist/input-otp.d.ts +9 -0
  177. package/dist/input-otp.d.ts.map +1 -0
  178. package/dist/input-otp.mjs +4 -0
  179. package/dist/input.cjs +1 -1
  180. package/dist/input.d.ts +1 -4
  181. package/dist/input.d.ts.map +1 -1
  182. package/dist/input.mjs +11 -11
  183. package/dist/item.cjs +1 -0
  184. package/dist/item.d.ts +25 -0
  185. package/dist/item.d.ts.map +1 -0
  186. package/dist/item.mjs +118 -0
  187. package/dist/kbd.cjs +1 -0
  188. package/dist/kbd.d.ts +5 -0
  189. package/dist/kbd.d.ts.map +1 -0
  190. package/dist/kbd.mjs +20 -0
  191. package/dist/label-BXMSoyyu.js +1 -0
  192. package/dist/label-C8GNfPU0.mjs +25 -0
  193. package/dist/label.cjs +1 -1
  194. package/dist/label.d.ts +2 -5
  195. package/dist/label.d.ts.map +1 -1
  196. package/dist/label.mjs +1 -2
  197. package/dist/menubar-BcyqIJgy.mjs +441 -0
  198. package/dist/menubar-DPxokWFI.js +1 -0
  199. package/dist/menubar.cjs +1 -1
  200. package/dist/menubar.d.ts +25 -19
  201. package/dist/menubar.d.ts.map +1 -1
  202. package/dist/menubar.mjs +1 -1
  203. package/dist/native-select.cjs +1 -0
  204. package/dist/native-select.d.ts +8 -0
  205. package/dist/native-select.d.ts.map +1 -0
  206. package/dist/native-select.mjs +39 -0
  207. package/dist/navigation-menu-2yE2MUu-.js +1 -0
  208. package/dist/navigation-menu-N8gkxEXE.mjs +628 -0
  209. package/dist/navigation-menu.cjs +1 -1
  210. package/dist/navigation-menu.d.ts +11 -11
  211. package/dist/navigation-menu.d.ts.map +1 -1
  212. package/dist/navigation-menu.mjs +1 -2
  213. package/dist/pagination.cjs +1 -1
  214. package/dist/pagination.d.ts +13 -26
  215. package/dist/pagination.d.ts.map +1 -1
  216. package/dist/pagination.mjs +76 -59
  217. package/dist/popover-D1AO-E8p.js +1 -0
  218. package/dist/popover-wQACF3ut.mjs +245 -0
  219. package/dist/popover.cjs +1 -1
  220. package/dist/popover.d.ts +9 -8
  221. package/dist/popover.d.ts.map +1 -1
  222. package/dist/popover.mjs +2 -3
  223. package/dist/{progress-30ehxjKg.mjs → progress-DPWSEWa5.mjs} +19 -14
  224. package/dist/{progress-BqWHea4f.js → progress-ShXZwOfj.js} +2 -2
  225. package/dist/progress.cjs +1 -1
  226. package/dist/progress.d.ts +2 -4
  227. package/dist/progress.d.ts.map +1 -1
  228. package/dist/progress.mjs +1 -1
  229. package/dist/radio-group-CQbZCQmj.mjs +199 -0
  230. package/dist/radio-group-DAEi5vW_.js +1 -0
  231. package/dist/radio-group.cjs +1 -1
  232. package/dist/radio-group.d.ts +3 -8
  233. package/dist/radio-group.d.ts.map +1 -1
  234. package/dist/radio-group.mjs +1 -2
  235. package/dist/resizable-Cv-mKMKP.js +1 -0
  236. package/dist/{resizable-DhOcAmNX.mjs → resizable-DJSE3e5L.mjs} +310 -282
  237. package/dist/resizable.cjs +1 -1
  238. package/dist/resizable.d.ts +6 -7
  239. package/dist/resizable.d.ts.map +1 -1
  240. package/dist/resizable.mjs +1 -1
  241. package/dist/{scroll-area-DJcPs0_v.mjs → scroll-area-8QcqkHnC.mjs} +69 -58
  242. package/dist/scroll-area-Cqqinhxf.js +1 -0
  243. package/dist/scroll-area.cjs +1 -1
  244. package/dist/scroll-area.d.ts +3 -5
  245. package/dist/scroll-area.d.ts.map +1 -1
  246. package/dist/scroll-area.mjs +1 -2
  247. package/dist/search.cjs +1 -1
  248. package/dist/search.d.ts +1 -1
  249. package/dist/search.d.ts.map +1 -1
  250. package/dist/search.mjs +15 -14
  251. package/dist/select-DdUveoSA.js +1 -0
  252. package/dist/{select-D4bxRFq5.mjs → select-yoeH35x2.mjs} +279 -245
  253. package/dist/select.cjs +1 -1
  254. package/dist/select.d.ts +13 -13
  255. package/dist/select.d.ts.map +1 -1
  256. package/dist/select.mjs +1 -1
  257. package/dist/{separator-DZACUutC.mjs → separator-BU1ea5gl.mjs} +14 -10
  258. package/dist/separator-DBjErwHf.js +1 -0
  259. package/dist/separator.cjs +1 -1
  260. package/dist/separator.d.ts +2 -4
  261. package/dist/separator.d.ts.map +1 -1
  262. package/dist/separator.mjs +1 -2
  263. package/dist/sheet.cjs +1 -1
  264. package/dist/sheet.d.ts +13 -26
  265. package/dist/sheet.d.ts.map +1 -1
  266. package/dist/sheet.mjs +84 -54
  267. package/dist/shim-B5sEfNEJ.js +1 -0
  268. package/dist/shim-DX33EwUw.mjs +91 -0
  269. package/dist/sidebar-B-sWccYh.mjs +355 -0
  270. package/dist/sidebar-DIW-1cin.js +1 -0
  271. package/dist/sidebar.cjs +1 -0
  272. package/dist/sidebar.d.ts +45 -0
  273. package/dist/sidebar.d.ts.map +1 -0
  274. package/dist/sidebar.mjs +5 -0
  275. package/dist/skeleton.cjs +1 -1
  276. package/dist/skeleton.d.ts +1 -4
  277. package/dist/skeleton.d.ts.map +1 -1
  278. package/dist/skeleton.mjs +2 -3
  279. package/dist/{slider-DTdrUy_s.mjs → slider-CCPXejUF.mjs} +81 -59
  280. package/dist/slider-w05gD_Ix.js +1 -0
  281. package/dist/slider.cjs +1 -1
  282. package/dist/slider.d.ts +2 -4
  283. package/dist/slider.d.ts.map +1 -1
  284. package/dist/slider.mjs +1 -1
  285. package/dist/sonner.cjs +1 -1
  286. package/dist/sonner.d.ts +1 -5
  287. package/dist/sonner.d.ts.map +1 -1
  288. package/dist/sonner.mjs +23 -16
  289. package/dist/spinner.cjs +1 -0
  290. package/dist/spinner.d.ts +4 -0
  291. package/dist/spinner.d.ts.map +1 -0
  292. package/dist/spinner.mjs +15 -0
  293. package/dist/support-fab.cjs +1 -1
  294. package/dist/support-fab.mjs +1 -1
  295. package/dist/switch-CDBqsWQa.mjs +112 -0
  296. package/dist/switch-X2WBJsUu.js +1 -0
  297. package/dist/switch.cjs +1 -1
  298. package/dist/switch.d.ts +4 -4
  299. package/dist/switch.d.ts.map +1 -1
  300. package/dist/switch.mjs +1 -1
  301. package/dist/table.cjs +1 -1
  302. package/dist/table.d.ts +8 -10
  303. package/dist/table.d.ts.map +1 -1
  304. package/dist/table.mjs +62 -54
  305. package/dist/tabs-DzvgrVzk.js +1 -0
  306. package/dist/tabs-KDeHjVQU.mjs +160 -0
  307. package/dist/tabs.cjs +1 -1
  308. package/dist/tabs.d.ts +10 -8
  309. package/dist/tabs.d.ts.map +1 -1
  310. package/dist/tabs.mjs +2 -2
  311. package/dist/text.d.ts +1 -1
  312. package/dist/textarea.cjs +1 -1
  313. package/dist/textarea.d.ts +1 -4
  314. package/dist/textarea.d.ts.map +1 -1
  315. package/dist/textarea.mjs +10 -10
  316. package/dist/{theme-toggle-Dtze9fyN.js → theme-toggle-C2Y4bIM3.js} +1 -1
  317. package/dist/{theme-toggle-DAHBgdy0.mjs → theme-toggle-clE-HpSS.mjs} +9 -9
  318. package/dist/theme-toggle.cjs +1 -1
  319. package/dist/theme-toggle.mjs +1 -2
  320. package/dist/toast-1keyrzem.js +1 -0
  321. package/dist/{toast-G9LdgDDE.mjs → toast-DVI6jPq5.mjs} +102 -101
  322. package/dist/toast.cjs +1 -1
  323. package/dist/toast.d.ts.map +1 -1
  324. package/dist/toast.mjs +1 -1
  325. package/dist/{toaster-WQJjavlc.mjs → toaster-Czhz-ktg.mjs} +1 -1
  326. package/dist/{toaster-CKD4CKAZ.js → toaster-DfDb2-aI.js} +1 -1
  327. package/dist/toaster.cjs +1 -1
  328. package/dist/toaster.mjs +1 -1
  329. package/dist/toggle-BGkq5XDM.js +1 -0
  330. package/dist/toggle-BfIIdlA6.mjs +58 -0
  331. package/dist/toggle-group-CbqgoPFU.mjs +167 -0
  332. package/dist/toggle-group-D7hR4BT2.js +1 -0
  333. package/dist/toggle-group.cjs +1 -1
  334. package/dist/toggle-group.d.ts +7 -9
  335. package/dist/toggle-group.d.ts.map +1 -1
  336. package/dist/toggle-group.mjs +1 -1
  337. package/dist/toggle.cjs +1 -1
  338. package/dist/toggle.d.ts +6 -5
  339. package/dist/toggle.d.ts.map +1 -1
  340. package/dist/toggle.mjs +2 -19
  341. package/dist/tooltip-CAIbshMk.js +1 -0
  342. package/dist/{tooltip-BHEcM7lO.mjs → tooltip-D_o8Z-Ya.mjs} +106 -90
  343. package/dist/tooltip.cjs +1 -1
  344. package/dist/tooltip.d.ts +5 -10
  345. package/dist/tooltip.d.ts.map +1 -1
  346. package/dist/tooltip.mjs +1 -1
  347. package/package.json +8 -6
  348. package/src/accordion.tsx +58 -51
  349. package/src/alert-dialog.tsx +140 -93
  350. package/src/alert.tsx +44 -33
  351. package/src/aspect-ratio.tsx +10 -4
  352. package/src/avatar.tsx +92 -37
  353. package/src/badge.tsx +24 -14
  354. package/src/breadcrumb.tsx +73 -85
  355. package/src/button-group.tsx +78 -0
  356. package/src/button.tsx +46 -24
  357. package/src/calendar.tsx +52 -40
  358. package/src/card.tsx +67 -42
  359. package/src/carousel.tsx +164 -174
  360. package/src/chart.tsx +206 -232
  361. package/src/checkbox.tsx +17 -17
  362. package/src/collapsible.tsx +16 -10
  363. package/src/combobox.tsx +282 -0
  364. package/src/command.tsx +123 -120
  365. package/src/context-menu.tsx +206 -179
  366. package/src/dialog.tsx +111 -65
  367. package/src/direction.tsx +18 -0
  368. package/src/drawer.tsx +75 -78
  369. package/src/dropdown-menu.tsx +211 -180
  370. package/src/empty.tsx +83 -0
  371. package/src/field.tsx +217 -0
  372. package/src/hooks/use-mobile.ts +19 -0
  373. package/src/hover-card.tsx +33 -27
  374. package/src/index.ts +108 -154
  375. package/src/input-group.tsx +143 -0
  376. package/src/input-otp.tsx +81 -0
  377. package/src/input.tsx +8 -8
  378. package/src/item.tsx +185 -0
  379. package/src/kbd.tsx +21 -0
  380. package/src/label.tsx +17 -14
  381. package/src/menubar.tsx +211 -199
  382. package/src/native-select.tsx +54 -0
  383. package/src/navigation-menu.tsx +115 -110
  384. package/src/pagination.tsx +65 -80
  385. package/src/popover.tsx +53 -41
  386. package/src/progress.tsx +22 -20
  387. package/src/radio-group.tsx +22 -34
  388. package/src/resizable.tsx +34 -49
  389. package/src/scroll-area.tsx +43 -35
  390. package/src/search.tsx +12 -9
  391. package/src/select.tsx +138 -133
  392. package/src/separator.tsx +25 -18
  393. package/src/sheet.tsx +97 -127
  394. package/src/sidebar.tsx +660 -0
  395. package/src/skeleton.tsx +7 -6
  396. package/src/slider.tsx +51 -19
  397. package/src/sonner.tsx +22 -12
  398. package/src/spinner.tsx +10 -0
  399. package/src/support-fab.tsx +1 -1
  400. package/src/switch.tsx +28 -21
  401. package/src/table.tsx +61 -87
  402. package/src/tabs.tsx +75 -56
  403. package/src/textarea.tsx +8 -10
  404. package/src/toast.tsx +5 -0
  405. package/src/toggle-group.tsx +76 -40
  406. package/src/toggle.tsx +35 -15
  407. package/src/tooltip.tsx +41 -43
  408. package/dist/accordion-BTF24dQU.js +0 -1
  409. package/dist/accordion-DHTV2Am8.mjs +0 -221
  410. package/dist/alert-dialog-Bwn2-Uyf.mjs +0 -164
  411. package/dist/alert-dialog-DBMX5E0-.js +0 -7
  412. package/dist/avatar-BI7s8omb.js +0 -1
  413. package/dist/avatar-hzlewncL.mjs +0 -185
  414. package/dist/calendar-ykdYhTj9.js +0 -1
  415. package/dist/carousel-DSmAn1nc.js +0 -1
  416. package/dist/checkbox-dK6DJKeV.js +0 -1
  417. package/dist/command-CDSbHz4C.js +0 -1
  418. package/dist/command-j0rZqZ7B.mjs +0 -531
  419. package/dist/context-menu-BWgLbKLP.js +0 -1
  420. package/dist/context-menu-CWSzssAO.mjs +0 -292
  421. package/dist/dist-B28N93_W.js +0 -1
  422. package/dist/dist-B43Kk7ii.js +0 -1
  423. package/dist/dist-BTPL2C0R.js +0 -1
  424. package/dist/dist-BjEG16aJ.mjs +0 -111
  425. package/dist/dist-BlKAvKHD.js +0 -1
  426. package/dist/dist-C3Z3atn0.mjs +0 -10
  427. package/dist/dist-C4q8IPk4.mjs +0 -28
  428. package/dist/dist-CPglx4om.js +0 -1
  429. package/dist/dist-CV2U2xFR.js +0 -1
  430. package/dist/dist-Cv9YaN1n.mjs +0 -61
  431. package/dist/dist-DAe-fOIM.mjs +0 -25
  432. package/dist/dist-DQAJMTj0.js +0 -1
  433. package/dist/dist-DaCPM8ia.js +0 -1
  434. package/dist/dist-DasmYflz.js +0 -1
  435. package/dist/dist-DneYUKe0.js +0 -1
  436. package/dist/dist-Du2jbEkG.mjs +0 -1282
  437. package/dist/dist-Dw6-GQAn.js +0 -1
  438. package/dist/dist-DwGlbIjj.js +0 -5
  439. package/dist/dist-Dzjlf9ug.js +0 -1
  440. package/dist/dist-GaBUW_Tu.js +0 -1
  441. package/dist/dropdown-menu-Bz5LlLjl.js +0 -1
  442. package/dist/dropdown-menu-Cp1qpOLk.mjs +0 -288
  443. package/dist/hover-card-CyKIuXGH.js +0 -1
  444. package/dist/label-DGuuPl_e.mjs +0 -22
  445. package/dist/label-gVkdll-j.js +0 -1
  446. package/dist/menubar-DNrIQhY5.mjs +0 -410
  447. package/dist/menubar-DkjAo6qJ.js +0 -1
  448. package/dist/navigation-menu-1cmCEi0j.mjs +0 -602
  449. package/dist/navigation-menu-qPt8hpr5.js +0 -1
  450. package/dist/popover-CbM1tqdC.mjs +0 -201
  451. package/dist/popover-DGTgqdKX.js +0 -1
  452. package/dist/radio-group-BGThTiQM.mjs +0 -193
  453. package/dist/radio-group-ClFpAswm.js +0 -1
  454. package/dist/resizable-D09wr7tV.js +0 -1
  455. package/dist/scroll-area-W_aOLOdE.js +0 -1
  456. package/dist/select-BQtkQBiD.js +0 -1
  457. package/dist/separator-BmkhoDge.js +0 -1
  458. package/dist/slider-Bkluwc3b.js +0 -1
  459. package/dist/switch-DENAxyga.js +0 -1
  460. package/dist/switch-DbsdyQVg.mjs +0 -103
  461. package/dist/tabs-C9sMowgZ.mjs +0 -136
  462. package/dist/tabs-DeK-zpy4.js +0 -1
  463. package/dist/toast-BtXY2QTe.js +0 -1
  464. package/dist/toggle-group-B0H9TwdD.mjs +0 -155
  465. package/dist/toggle-group-CAyztsIl.js +0 -1
  466. package/dist/tooltip-CKcMl7tK.js +0 -1
  467. /package/dist/{dist-C_45sBzc.js → dist-C_45sBzc2.js} +0 -0
  468. /package/dist/{dist-DGzGsPqo.mjs → dist-DGzGsPqo2.mjs} +0 -0
package/src/index.ts CHANGED
@@ -9,11 +9,9 @@ export { cn } from './lib/utils';
9
9
 
10
10
  // Accordion
11
11
  export { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from './accordion';
12
- export type { AccordionProps } from './accordion';
13
12
 
14
13
  // Alert
15
14
  export { Alert, AlertDescription, AlertTitle } from './alert';
16
- export type { AlertProps } from './alert';
17
15
 
18
16
  // Alert Dialog
19
17
  export {
@@ -29,19 +27,15 @@ export {
29
27
  AlertDialogTitle,
30
28
  AlertDialogTrigger,
31
29
  } from './alert-dialog';
32
- export type { AlertDialogProps } from './alert-dialog';
33
30
 
34
31
  // Aspect Ratio
35
32
  export { AspectRatio } from './aspect-ratio';
36
- export type { AspectRatioProps } from './aspect-ratio';
37
33
 
38
34
  // Avatar
39
35
  export { Avatar, AvatarFallback, AvatarImage } from './avatar';
40
- export type { AvatarProps } from './avatar';
41
36
 
42
37
  // Badge
43
38
  export { Badge, badgeVariants } from './badge';
44
- export type { BadgeProps } from './badge';
45
39
 
46
40
  // Breadcrumb
47
41
  export {
@@ -53,23 +47,19 @@ export {
53
47
  BreadcrumbPage,
54
48
  BreadcrumbSeparator,
55
49
  } from './breadcrumb';
56
- export type { BreadcrumbProps } from './breadcrumb';
57
50
 
58
51
  // Button
59
52
  export { Button, buttonVariants } from './button';
60
- export type { ButtonProps } from './button';
61
53
 
62
54
  // Calendar
63
55
  export { Calendar, CalendarDayButton } from './calendar';
64
- export type { CalendarProps } from './calendar';
65
56
 
66
57
  // Card
67
58
  export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from './card';
68
- export type { CardProps } from './card';
69
59
 
70
60
  // Carousel
71
61
  export { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from './carousel';
72
- export type { CarouselApi, CarouselProps } from './carousel';
62
+ export type { CarouselApi } from './carousel';
73
63
 
74
64
  // Chart
75
65
  export {
@@ -84,11 +74,9 @@ export type { ChartConfig } from './chart';
84
74
 
85
75
  // Checkbox
86
76
  export { Checkbox } from './checkbox';
87
- export type { CheckboxProps } from './checkbox';
88
77
 
89
78
  // Collapsible
90
79
  export { Collapsible, CollapsibleContent, CollapsibleTrigger } from './collapsible';
91
- export type { CollapsibleContentProps, CollapsibleProps, CollapsibleTriggerProps } from './collapsible';
92
80
 
93
81
  // Command
94
82
  export {
@@ -102,16 +90,6 @@ export {
102
90
  CommandSeparator,
103
91
  CommandShortcut,
104
92
  } from './command';
105
- export type {
106
- CommandEmptyProps,
107
- CommandGroupProps,
108
- CommandInputProps,
109
- CommandItemProps,
110
- CommandListProps,
111
- CommandProps,
112
- CommandSeparatorProps,
113
- CommandShortcutProps,
114
- } from './command';
115
93
 
116
94
  // Context Menu
117
95
  export {
@@ -131,22 +109,6 @@ export {
131
109
  ContextMenuSubTrigger,
132
110
  ContextMenuTrigger,
133
111
  } from './context-menu';
134
- export type {
135
- ContextMenuCheckboxItemProps,
136
- ContextMenuContentProps,
137
- ContextMenuGroupProps,
138
- ContextMenuItemProps,
139
- ContextMenuLabelProps,
140
- ContextMenuProps,
141
- ContextMenuRadioGroupProps,
142
- ContextMenuRadioItemProps,
143
- ContextMenuSeparatorProps,
144
- ContextMenuShortcutProps,
145
- ContextMenuSubContentProps,
146
- ContextMenuSubProps,
147
- ContextMenuSubTriggerProps,
148
- ContextMenuTriggerProps,
149
- } from './context-menu';
150
112
 
151
113
  // Dialog
152
114
  export {
@@ -175,16 +137,6 @@ export {
175
137
  DrawerTitle,
176
138
  DrawerTrigger,
177
139
  } from './drawer';
178
- export type {
179
- DrawerCloseProps,
180
- DrawerContentProps,
181
- DrawerDescriptionProps,
182
- DrawerFooterProps,
183
- DrawerHeaderProps,
184
- DrawerProps,
185
- DrawerTitleProps,
186
- DrawerTriggerProps,
187
- } from './drawer';
188
140
 
189
141
  // Dropdown Menu
190
142
  export {
@@ -204,38 +156,18 @@ export {
204
156
  DropdownMenuSubTrigger,
205
157
  DropdownMenuTrigger,
206
158
  } from './dropdown-menu';
207
- export type {
208
- DropdownMenuCheckboxItemProps,
209
- DropdownMenuContentProps,
210
- DropdownMenuGroupProps,
211
- DropdownMenuItemProps,
212
- DropdownMenuLabelProps,
213
- DropdownMenuProps,
214
- DropdownMenuRadioGroupProps,
215
- DropdownMenuRadioItemProps,
216
- DropdownMenuSeparatorProps,
217
- DropdownMenuShortcutProps,
218
- DropdownMenuSubContentProps,
219
- DropdownMenuSubProps,
220
- DropdownMenuSubTriggerProps,
221
- DropdownMenuTriggerProps,
222
- } from './dropdown-menu';
223
159
 
224
160
  // Form
225
161
  export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField } from './form';
226
- export type { FormControlProps, FormDescriptionProps, FormItemProps, FormLabelProps, FormMessageProps } from './form';
227
162
 
228
163
  // Hover Card
229
164
  export { HoverCard, HoverCardContent, HoverCardTrigger } from './hover-card';
230
- export type { HoverCardContentProps, HoverCardProps, HoverCardTriggerProps } from './hover-card';
231
165
 
232
166
  // Input
233
167
  export { Input } from './input';
234
- export type { InputProps } from './input';
235
168
 
236
169
  // Label
237
170
  export { Label } from './label';
238
- export type { LabelProps } from './label';
239
171
 
240
172
  // Menubar
241
173
  export {
@@ -256,21 +188,6 @@ export {
256
188
  MenubarSubTrigger,
257
189
  MenubarTrigger,
258
190
  } from './menubar';
259
- export type {
260
- MenubarCheckboxItemProps,
261
- MenubarContentProps,
262
- MenubarItemProps,
263
- MenubarLabelProps,
264
- MenubarMenuProps,
265
- MenubarProps,
266
- MenubarRadioItemProps,
267
- MenubarSeparatorProps,
268
- MenubarShortcutProps,
269
- MenubarSubContentProps,
270
- MenubarSubProps,
271
- MenubarSubTriggerProps,
272
- MenubarTriggerProps,
273
- } from './menubar';
274
191
 
275
192
  // Navigation Menu
276
193
  export {
@@ -284,16 +201,6 @@ export {
284
201
  NavigationMenuViewport,
285
202
  navigationMenuTriggerStyle,
286
203
  } from './navigation-menu';
287
- export type {
288
- NavigationMenuContentProps,
289
- NavigationMenuIndicatorProps,
290
- NavigationMenuItemProps,
291
- NavigationMenuLinkProps,
292
- NavigationMenuListProps,
293
- NavigationMenuProps,
294
- NavigationMenuTriggerProps,
295
- NavigationMenuViewportProps,
296
- } from './navigation-menu';
297
204
 
298
205
  // Pagination
299
206
  export {
@@ -305,35 +212,21 @@ export {
305
212
  PaginationNext,
306
213
  PaginationPrevious,
307
214
  } from './pagination';
308
- export type {
309
- PaginationContentProps,
310
- PaginationEllipsisProps,
311
- PaginationItemProps,
312
- PaginationLinkProps,
313
- PaginationNextProps,
314
- PaginationPreviousProps,
315
- PaginationProps,
316
- } from './pagination';
317
215
 
318
216
  // Popover
319
217
  export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from './popover';
320
- export type { PopoverAnchorProps, PopoverContentProps, PopoverProps, PopoverTriggerProps } from './popover';
321
218
 
322
219
  // Progress
323
220
  export { Progress } from './progress';
324
- export type { ProgressProps } from './progress';
325
221
 
326
222
  // Radio
327
223
  export { RadioGroup, RadioGroupItem } from './radio-group';
328
- export type { RadioGroupItemProps, RadioGroupProps } from './radio-group';
329
224
 
330
225
  // Resizable
331
226
  export { ResizableHandle, ResizablePanel, ResizablePanelGroup } from './resizable';
332
- export type { ResizableHandleProps, ResizablePanelGroupProps, ResizablePanelProps } from './resizable';
333
227
 
334
228
  // Scroll Area
335
229
  export { ScrollArea, ScrollBar } from './scroll-area';
336
- export type { ScrollAreaProps, ScrollBarProps } from './scroll-area';
337
230
 
338
231
  // Scroll To Top
339
232
  export { ScrollToTop } from './scroll-to-top';
@@ -360,22 +253,9 @@ export {
360
253
  SelectTrigger,
361
254
  SelectValue,
362
255
  } from './select';
363
- export type {
364
- SelectContentProps,
365
- SelectGroupProps,
366
- SelectItemProps,
367
- SelectLabelProps,
368
- SelectProps,
369
- SelectScrollDownButtonProps,
370
- SelectScrollUpButtonProps,
371
- SelectSeparatorProps,
372
- SelectTriggerProps,
373
- SelectValueProps,
374
- } from './select';
375
256
 
376
257
  // Separator
377
258
  export { Separator } from './separator';
378
- export type { SeparatorProps } from './separator';
379
259
 
380
260
  // Sheet
381
261
  export {
@@ -385,56 +265,27 @@ export {
385
265
  SheetDescription,
386
266
  SheetFooter,
387
267
  SheetHeader,
388
- SheetOverlay,
389
- SheetPortal,
390
268
  SheetTitle,
391
269
  SheetTrigger,
392
270
  } from './sheet';
393
- export type {
394
- SheetCloseProps,
395
- SheetContentProps,
396
- SheetDescriptionProps,
397
- SheetFooterProps,
398
- SheetHeaderProps,
399
- SheetOverlayProps,
400
- SheetPortalProps,
401
- SheetProps,
402
- SheetTitleProps,
403
- SheetTriggerProps,
404
- } from './sheet';
405
271
 
406
272
  // Skeleton
407
273
  export { Skeleton } from './skeleton';
408
- export type { SkeletonProps } from './skeleton';
409
274
 
410
275
  // Slider
411
276
  export { Slider } from './slider';
412
- export type { SliderProps } from './slider';
413
277
 
414
278
  // Sonner
415
279
  export { Toaster as SonnerToaster } from './sonner';
416
- export type { ToasterProps as SonnerProps } from './sonner';
417
280
 
418
281
  // Switch
419
282
  export { Switch } from './switch';
420
- export type { SwitchProps } from './switch';
421
283
 
422
284
  // Table
423
285
  export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from './table';
424
- export type {
425
- TableBodyProps,
426
- TableCaptionProps,
427
- TableCellProps,
428
- TableFooterProps,
429
- TableHeadProps,
430
- TableHeaderProps,
431
- TableProps,
432
- TableRowProps,
433
- } from './table';
434
286
 
435
287
  // Tabs
436
288
  export { Tabs, TabsContent, TabsList, TabsTrigger } from './tabs';
437
- export type { TabsContentProps, TabsListProps, TabsProps, TabsTriggerProps } from './tabs';
438
289
 
439
290
  // Text
440
291
  export { Text, textVariants } from './text';
@@ -442,19 +293,15 @@ export type { TextProps } from './text';
442
293
 
443
294
  // Textarea
444
295
  export { Textarea } from './textarea';
445
- export type { TextareaProps } from './textarea';
446
296
 
447
297
  // Toggle
448
298
  export { Toggle, toggleVariants } from './toggle';
449
- export type { ToggleProps } from './toggle';
450
299
 
451
300
  // Toggle Group
452
301
  export { ToggleGroup, ToggleGroupItem } from './toggle-group';
453
- export type { ToggleGroupItemProps, ToggleGroupProps } from './toggle-group';
454
302
 
455
303
  // Tooltip
456
304
  export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './tooltip';
457
- export type { TooltipContentProps, TooltipProps, TooltipProviderProps, TooltipTriggerProps } from './tooltip';
458
305
 
459
306
  // Toast
460
307
  export {
@@ -488,3 +335,110 @@ export { Toaster } from './toaster';
488
335
  // Table Of Contents
489
336
  export { TableOfContents } from './table-of-contents';
490
337
  export type { TableOfContentsProps } from './table-of-contents';
338
+
339
+ // Button Group
340
+ export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants } from './button-group';
341
+
342
+ // Direction
343
+ export { DirectionProvider, useDirection } from './direction';
344
+
345
+ // Empty
346
+ export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from './empty';
347
+
348
+ // Spinner
349
+ export { Spinner } from './spinner';
350
+
351
+ // Field
352
+ export {
353
+ Field,
354
+ FieldContent,
355
+ FieldDescription,
356
+ FieldError,
357
+ FieldGroup,
358
+ FieldLabel,
359
+ FieldLegend,
360
+ FieldSeparator,
361
+ FieldSet,
362
+ FieldTitle,
363
+ } from './field';
364
+
365
+ // Input Group
366
+ export {
367
+ InputGroup,
368
+ InputGroupAddon,
369
+ InputGroupButton,
370
+ InputGroupInput,
371
+ InputGroupText,
372
+ InputGroupTextarea,
373
+ } from './input-group';
374
+
375
+ // Native Select
376
+ export { NativeSelect, NativeSelectOptGroup, NativeSelectOption } from './native-select';
377
+
378
+ // Kbd
379
+ export { Kbd, KbdGroup } from './kbd';
380
+
381
+ // Item
382
+ export {
383
+ Item,
384
+ ItemActions,
385
+ ItemContent,
386
+ ItemDescription,
387
+ ItemFooter,
388
+ ItemGroup,
389
+ ItemHeader,
390
+ ItemMedia,
391
+ ItemSeparator,
392
+ ItemTitle,
393
+ } from './item';
394
+
395
+ // Combobox
396
+ export {
397
+ Combobox,
398
+ ComboboxChip,
399
+ ComboboxChips,
400
+ ComboboxChipsInput,
401
+ ComboboxCollection,
402
+ ComboboxContent,
403
+ ComboboxEmpty,
404
+ ComboboxGroup,
405
+ ComboboxInput,
406
+ ComboboxItem,
407
+ ComboboxLabel,
408
+ ComboboxList,
409
+ ComboboxSeparator,
410
+ ComboboxTrigger,
411
+ ComboboxValue,
412
+ useComboboxAnchor,
413
+ } from './combobox';
414
+
415
+ // Input OTP
416
+ export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from './input-otp';
417
+
418
+ // Sidebar
419
+ export {
420
+ Sidebar,
421
+ SidebarContent,
422
+ SidebarFooter,
423
+ SidebarGroup,
424
+ SidebarGroupAction,
425
+ SidebarGroupContent,
426
+ SidebarGroupLabel,
427
+ SidebarHeader,
428
+ SidebarInput,
429
+ SidebarInset,
430
+ SidebarMenu,
431
+ SidebarMenuAction,
432
+ SidebarMenuBadge,
433
+ SidebarMenuButton,
434
+ SidebarMenuItem,
435
+ SidebarMenuSkeleton,
436
+ SidebarMenuSub,
437
+ SidebarMenuSubButton,
438
+ SidebarMenuSubItem,
439
+ SidebarProvider,
440
+ SidebarRail,
441
+ SidebarSeparator,
442
+ SidebarTrigger,
443
+ useSidebar,
444
+ } from './sidebar';
@@ -0,0 +1,143 @@
1
+ import { cva, type VariantProps } from 'class-variance-authority';
2
+ import * as React from 'react';
3
+
4
+ import type {
5
+ InputGroupAddonBaseProps,
6
+ InputGroupBaseProps,
7
+ InputGroupButtonBaseProps,
8
+ InputGroupInputBaseProps,
9
+ InputGroupTextareaBaseProps,
10
+ InputGroupTextBaseProps,
11
+ } from '@gv-tech/ui-core';
12
+ import { Button } from './button';
13
+ import { Input } from './input';
14
+ import { cn } from './lib/utils';
15
+ import { Textarea } from './textarea';
16
+
17
+ function InputGroup({ className, ...props }: React.ComponentProps<'div'> & InputGroupBaseProps) {
18
+ return (
19
+ <div
20
+ data-slot="input-group"
21
+ role="group"
22
+ className={cn(
23
+ 'group/input-group border-input has-disabled:bg-input/50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 relative flex h-8 w-full min-w-0 items-center rounded-lg border transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot][aria-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-[>textarea]:h-auto 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',
24
+ className,
25
+ )}
26
+ {...props}
27
+ />
28
+ );
29
+ }
30
+
31
+ const inputGroupAddonVariants = cva(
32
+ 'flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*=size-])]:size-4',
33
+ {
34
+ variants: {
35
+ align: {
36
+ 'inline-start': 'order-first ps-2 has-[>button]:ms-[-0.3rem] has-[>kbd]:ms-[-0.15rem]',
37
+ 'inline-end': 'order-last pe-2 has-[>button]:me-[-0.3rem] has-[>kbd]:me-[-0.15rem]',
38
+ 'block-start':
39
+ 'order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2',
40
+ 'block-end': 'order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2',
41
+ },
42
+ },
43
+ defaultVariants: {
44
+ align: 'inline-start',
45
+ },
46
+ },
47
+ );
48
+
49
+ function InputGroupAddon({
50
+ className,
51
+ align = 'inline-start',
52
+ ...props
53
+ }: React.ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants> & InputGroupAddonBaseProps) {
54
+ return (
55
+ <div
56
+ role="group"
57
+ data-slot="input-group-addon"
58
+ data-align={align}
59
+ className={cn(inputGroupAddonVariants({ align }), className)}
60
+ onClick={(e) => {
61
+ if ((e.target as HTMLElement).closest('button')) {
62
+ return;
63
+ }
64
+ e.currentTarget.parentElement?.querySelector('input')?.focus();
65
+ }}
66
+ {...props}
67
+ />
68
+ );
69
+ }
70
+
71
+ const inputGroupButtonVariants = cva('flex items-center gap-2 text-sm shadow-none', {
72
+ variants: {
73
+ size: {
74
+ xs: 'h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*=size-])]:size-3.5',
75
+ sm: '',
76
+ 'icon-xs': 'size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0',
77
+ 'icon-sm': 'size-8 p-0 has-[>svg]:p-0',
78
+ },
79
+ },
80
+ defaultVariants: {
81
+ size: 'xs',
82
+ },
83
+ });
84
+
85
+ function InputGroupButton({
86
+ className,
87
+ type = 'button',
88
+ variant = 'ghost',
89
+ size = 'xs',
90
+ ...props
91
+ }: Omit<React.ComponentProps<typeof Button>, 'size'> &
92
+ VariantProps<typeof inputGroupButtonVariants> &
93
+ InputGroupButtonBaseProps) {
94
+ return (
95
+ <Button
96
+ type={type}
97
+ data-size={size}
98
+ variant={variant}
99
+ className={cn(inputGroupButtonVariants({ size }), className)}
100
+ {...props}
101
+ />
102
+ );
103
+ }
104
+
105
+ function InputGroupText({ className, ...props }: React.ComponentProps<'span'> & InputGroupTextBaseProps) {
106
+ return (
107
+ <span
108
+ className={cn(
109
+ 'text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*=size-])]:size-4',
110
+ className,
111
+ )}
112
+ {...props}
113
+ />
114
+ );
115
+ }
116
+
117
+ function InputGroupInput({ className, ...props }: React.ComponentProps<'input'> & InputGroupInputBaseProps) {
118
+ return (
119
+ <Input
120
+ data-slot="input-group-control"
121
+ className={cn(
122
+ 'flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent',
123
+ className,
124
+ )}
125
+ {...props}
126
+ />
127
+ );
128
+ }
129
+
130
+ function InputGroupTextarea({ className, ...props }: React.ComponentProps<'textarea'> & InputGroupTextareaBaseProps) {
131
+ return (
132
+ <Textarea
133
+ data-slot="input-group-control"
134
+ className={cn(
135
+ 'flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent',
136
+ className,
137
+ )}
138
+ {...props}
139
+ />
140
+ );
141
+ }
142
+
143
+ export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
@@ -0,0 +1,81 @@
1
+ 'use client';
2
+
3
+ import { OTPInput, OTPInputContext } from 'input-otp';
4
+ import * as React from 'react';
5
+
6
+ import type {
7
+ InputOTPBaseProps,
8
+ InputOTPGroupBaseProps,
9
+ InputOTPSeparatorBaseProps,
10
+ InputOTPSlotBaseProps,
11
+ } from '@gv-tech/ui-core';
12
+ import { MinusIcon } from 'lucide-react';
13
+ import { cn } from './lib/utils';
14
+
15
+ function InputOTP({
16
+ className,
17
+ containerClassName,
18
+ ...props
19
+ }: React.ComponentProps<typeof OTPInput> & InputOTPBaseProps) {
20
+ return (
21
+ <OTPInput
22
+ data-slot="input-otp"
23
+ containerClassName={cn('cn-input-otp flex items-center has-disabled:opacity-50', containerClassName)}
24
+ spellCheck={false}
25
+ className={cn('disabled:cursor-not-allowed', className)}
26
+ {...props}
27
+ />
28
+ );
29
+ }
30
+
31
+ function InputOTPGroup({ className, ...props }: React.ComponentProps<'div'> & InputOTPGroupBaseProps) {
32
+ return (
33
+ <div
34
+ data-slot="input-otp-group"
35
+ className={cn(
36
+ 'has-aria-invalid:border-destructive has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 flex items-center rounded-lg has-aria-invalid:ring-3',
37
+ className,
38
+ )}
39
+ {...props}
40
+ />
41
+ );
42
+ }
43
+
44
+ function InputOTPSlot({ index, className, ...props }: React.ComponentProps<'div'> & InputOTPSlotBaseProps) {
45
+ const inputOTPContext = React.useContext(OTPInputContext);
46
+ const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
47
+
48
+ return (
49
+ <div
50
+ data-slot="input-otp-slot"
51
+ data-active={isActive}
52
+ className={cn(
53
+ 'border-input aria-invalid:border-destructive data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40 relative flex size-8 items-center justify-center border-y border-e text-sm transition-all outline-none first:rounded-s-lg first:border-s last:rounded-e-lg data-[active=true]:z-10 data-[active=true]:ring-3',
54
+ className,
55
+ )}
56
+ {...props}
57
+ >
58
+ {char}
59
+ {hasFakeCaret && (
60
+ <div className="pointer-events-none absolute inset-0 flex items-center justify-center">
61
+ <div className="animate-caret-blink bg-foreground h-4 w-px duration-1000" />
62
+ </div>
63
+ )}
64
+ </div>
65
+ );
66
+ }
67
+
68
+ function InputOTPSeparator({ ...props }: React.ComponentProps<'div'> & InputOTPSeparatorBaseProps) {
69
+ return (
70
+ <div
71
+ data-slot="input-otp-separator"
72
+ className="flex items-center [&_svg:not([class*=size-])]:size-4"
73
+ role="separator"
74
+ {...props}
75
+ >
76
+ <MinusIcon />
77
+ </div>
78
+ );
79
+ }
80
+
81
+ export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
package/src/input.tsx CHANGED
@@ -1,24 +1,24 @@
1
- 'use client';
2
1
  import * as React from 'react';
3
2
 
4
- import type { InputBaseProps } from '@gv-tech/ui-core';
5
3
  import { cn } from './lib/utils';
6
4
 
7
- export interface InputProps extends React.ComponentProps<'input'>, InputBaseProps {}
5
+ import type { InputBaseProps } from '@gv-tech/ui-core';
8
6
 
9
- const Input = React.forwardRef<HTMLInputElement, InputProps>(({ className, type, ...props }, ref) => {
7
+ function Input({ className, type, ...props }: React.ComponentProps<'input'>) {
10
8
  return (
11
9
  <input
12
10
  type={type}
11
+ data-slot="input"
13
12
  className={cn(
14
- 'border-input file:text-foreground placeholder:text-muted-foreground focus-visible:ring-ring flex h-9 w-full rounded-md border bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
13
+ 'border-input file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 disabled:bg-input/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 h-8 w-full min-w-0 rounded-lg border bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-3 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 md:text-sm',
15
14
  className,
16
15
  )}
17
- ref={ref}
18
16
  {...props}
19
17
  />
20
18
  );
21
- });
22
- Input.displayName = 'Input';
19
+ }
23
20
 
24
21
  export { Input };
22
+
23
+ // Verify that the component satisfies the ui-core contract
24
+ const _verifyInputContract: InputBaseProps = {} as unknown as React.ComponentProps<typeof Input>;