@gears-frontx/ui-kit 0.3.0-alpha.3 → 0.4.0-alpha.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 (493) hide show
  1. package/README.md +28 -6
  2. package/dist/accordion.d.ts +1 -0
  3. package/dist/accordion.js +35 -0
  4. package/dist/accordion.js.map +1 -0
  5. package/dist/alert-dialog.d.ts +1 -0
  6. package/dist/alert-dialog.js +97 -0
  7. package/dist/alert-dialog.js.map +1 -0
  8. package/dist/alert.d.ts +1 -0
  9. package/dist/alert.js +39 -0
  10. package/dist/alert.js.map +1 -0
  11. package/dist/aspect-ratio.d.ts +1 -0
  12. package/dist/aspect-ratio.js +19 -0
  13. package/dist/aspect-ratio.js.map +1 -0
  14. package/dist/attachment.d.ts +1 -0
  15. package/dist/attachment.js +133 -0
  16. package/dist/attachment.js.map +1 -0
  17. package/dist/avatar.d.ts +1 -0
  18. package/dist/avatar.js +87 -0
  19. package/dist/avatar.js.map +1 -0
  20. package/dist/badge.js +32 -46
  21. package/dist/badge.js.map +1 -1
  22. package/dist/breadcrumb.d.ts +1 -0
  23. package/dist/breadcrumb.js +81 -0
  24. package/dist/breadcrumb.js.map +1 -0
  25. package/dist/bubble.d.ts +1 -0
  26. package/dist/bubble.js +94 -0
  27. package/dist/bubble.js.map +1 -0
  28. package/dist/button-group.d.ts +1 -0
  29. package/dist/button-group.js +61 -0
  30. package/dist/button-group.js.map +1 -0
  31. package/dist/button.js +30 -29
  32. package/dist/button.js.map +1 -1
  33. package/dist/calendar.d.ts +1 -0
  34. package/dist/calendar.js +134 -0
  35. package/dist/calendar.js.map +1 -0
  36. package/dist/card.js +24 -24
  37. package/dist/carousel.d.ts +1 -0
  38. package/dist/carousel.js +163 -0
  39. package/dist/carousel.js.map +1 -0
  40. package/dist/chart.d.ts +1 -0
  41. package/dist/chart.js +202 -0
  42. package/dist/chart.js.map +1 -0
  43. package/dist/checkbox.js +14 -39
  44. package/dist/checkbox.js.map +1 -1
  45. package/dist/chunks/accordion.X_AK08Iv.css +1 -0
  46. package/dist/chunks/alert-dialog.B50f-Gsz.css +1 -0
  47. package/dist/chunks/alert.BJLRcB65.css +1 -0
  48. package/dist/chunks/aspect-ratio.DJbPE7BX.css +1 -0
  49. package/dist/chunks/attachment.rknKEWlr.css +1 -0
  50. package/dist/chunks/avatar.CsQmQnay.css +1 -0
  51. package/dist/chunks/badge.DR0epAiZ.css +1 -0
  52. package/dist/chunks/breadcrumb.QKz32ceR.css +1 -0
  53. package/dist/chunks/bubble.BKcAopT7.css +1 -0
  54. package/dist/chunks/button-group.D0Ir-jbL.css +1 -0
  55. package/dist/chunks/button.D69BdJF1.css +1 -0
  56. package/dist/chunks/calendar.Cnbv4EzY.css +1 -0
  57. package/dist/chunks/card.D3Ct_dza.css +1 -0
  58. package/dist/chunks/carousel.CjaKGN_D.css +1 -0
  59. package/dist/chunks/chart.CeyctrXQ.css +1 -0
  60. package/dist/chunks/checkbox.CZfE_PkU.css +1 -0
  61. package/dist/chunks/collapsible.BQ-sU5sQ.css +1 -0
  62. package/dist/chunks/combobox.CtYpZAKB.css +1 -0
  63. package/dist/chunks/command.Km60IuqD.css +1 -0
  64. package/dist/chunks/context-menu.Bjib7_AL.css +1 -0
  65. package/dist/chunks/data-table.DECm3qI-.css +1 -0
  66. package/dist/chunks/date-picker.BcRqyOg8.css +1 -0
  67. package/dist/chunks/dialog.BxcZ12Gb.css +1 -0
  68. package/dist/chunks/drawer.BkS_qEHj.css +1 -0
  69. package/dist/chunks/dropdown-menu.CDaeWYDT.css +1 -0
  70. package/dist/chunks/empty.B334jSES.css +1 -0
  71. package/dist/chunks/field.yTrg1G90.css +1 -0
  72. package/dist/chunks/hover-card.DmwvigMp.css +1 -0
  73. package/dist/chunks/input-group.CFIUP-Oh.css +1 -0
  74. package/dist/chunks/input-otp.XSpqyVij.css +1 -0
  75. package/dist/chunks/input.DvA_mTq8.css +1 -0
  76. package/dist/chunks/item.CLg1KaYF.css +1 -0
  77. package/dist/chunks/kbd.DZuUVB_m.css +1 -0
  78. package/dist/chunks/marker.DDxI_rZn.css +1 -0
  79. package/dist/chunks/menubar.CxRNI9o4.css +1 -0
  80. package/dist/chunks/message-scroller.CbLooS7Q.css +1 -0
  81. package/dist/chunks/message.BhD5JDJK.css +1 -0
  82. package/dist/chunks/native-select.BdYLTCZv.css +1 -0
  83. package/dist/chunks/navigation-menu.C2JGHAKD.css +1 -0
  84. package/dist/chunks/pagination.DUiQuWla.css +1 -0
  85. package/dist/chunks/popover.fOvPrnsr.css +1 -0
  86. package/dist/chunks/progress.Bp13t8iw.css +1 -0
  87. package/dist/chunks/questionnaire.DYnuWKAQ.css +1 -0
  88. package/dist/chunks/radio-group.CV3MBCsI.css +1 -0
  89. package/dist/chunks/resizable.B71V-1lR.css +1 -0
  90. package/dist/chunks/scroll-area.C4kWMAsU.css +1 -0
  91. package/dist/chunks/select.iEwV-sfJ.css +1 -0
  92. package/dist/chunks/sheet.DALPg9vf.css +1 -0
  93. package/dist/chunks/sidebar.CGTQhfWG.css +1 -0
  94. package/dist/chunks/slider.B5nouD7J.css +1 -0
  95. package/dist/chunks/spinner.UKK4f1tu.css +1 -0
  96. package/dist/chunks/switch.CIW9Jr1x.css +1 -0
  97. package/dist/chunks/table.CFAJfhd-.css +1 -0
  98. package/dist/chunks/tabs.C4jGj2Vg.css +1 -0
  99. package/dist/chunks/textarea.ORRSI69B.css +1 -0
  100. package/dist/chunks/toggle-group.Bd0cCCnV.css +1 -0
  101. package/dist/chunks/toggle.B9tvfl1n.css +1 -0
  102. package/dist/collapsible.d.ts +1 -0
  103. package/dist/collapsible.js +22 -0
  104. package/dist/collapsible.js.map +1 -0
  105. package/dist/combobox.d.ts +1 -0
  106. package/dist/combobox.js +159 -0
  107. package/dist/combobox.js.map +1 -0
  108. package/dist/command.d.ts +1 -0
  109. package/dist/command.js +75 -0
  110. package/dist/command.js.map +1 -0
  111. package/dist/components/accordion/accordion.d.ts +24 -0
  112. package/dist/components/accordion/accordion.d.ts.map +1 -0
  113. package/dist/components/accordion/public.d.ts +2 -0
  114. package/dist/components/accordion/public.d.ts.map +1 -0
  115. package/dist/components/alert/alert.d.ts +21 -0
  116. package/dist/components/alert/alert.d.ts.map +1 -0
  117. package/dist/components/alert/public.d.ts +2 -0
  118. package/dist/components/alert/public.d.ts.map +1 -0
  119. package/dist/components/alert-dialog/alert-dialog.d.ts +95 -0
  120. package/dist/components/alert-dialog/alert-dialog.d.ts.map +1 -0
  121. package/dist/components/alert-dialog/public.d.ts +2 -0
  122. package/dist/components/alert-dialog/public.d.ts.map +1 -0
  123. package/dist/components/aspect-ratio/aspect-ratio.d.ts +8 -0
  124. package/dist/components/aspect-ratio/aspect-ratio.d.ts.map +1 -0
  125. package/dist/components/aspect-ratio/public.d.ts +2 -0
  126. package/dist/components/aspect-ratio/public.d.ts.map +1 -0
  127. package/dist/components/attachment/attachment.d.ts +71 -0
  128. package/dist/components/attachment/attachment.d.ts.map +1 -0
  129. package/dist/components/attachment/public.d.ts +2 -0
  130. package/dist/components/attachment/public.d.ts.map +1 -0
  131. package/dist/components/avatar/avatar.d.ts +40 -0
  132. package/dist/components/avatar/avatar.d.ts.map +1 -0
  133. package/dist/components/avatar/public.d.ts +2 -0
  134. package/dist/components/avatar/public.d.ts.map +1 -0
  135. package/dist/components/badge/badge.d.ts +3 -16
  136. package/dist/components/badge/badge.d.ts.map +1 -1
  137. package/dist/components/badge/public.d.ts +1 -1
  138. package/dist/components/badge/public.d.ts.map +1 -1
  139. package/dist/components/breadcrumb/breadcrumb.d.ts +19 -0
  140. package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -0
  141. package/dist/components/breadcrumb/public.d.ts +2 -0
  142. package/dist/components/breadcrumb/public.d.ts.map +1 -0
  143. package/dist/components/bubble/bubble.d.ts +35 -0
  144. package/dist/components/bubble/bubble.d.ts.map +1 -0
  145. package/dist/components/bubble/public.d.ts +2 -0
  146. package/dist/components/bubble/public.d.ts.map +1 -0
  147. package/dist/components/button/button.d.ts +1 -2
  148. package/dist/components/button/button.d.ts.map +1 -1
  149. package/dist/components/button/public.d.ts +1 -1
  150. package/dist/components/button/public.d.ts.map +1 -1
  151. package/dist/components/button-group/button-group.d.ts +17 -0
  152. package/dist/components/button-group/button-group.d.ts.map +1 -0
  153. package/dist/components/button-group/public.d.ts +2 -0
  154. package/dist/components/button-group/public.d.ts.map +1 -0
  155. package/dist/components/calendar/calendar.d.ts +29 -0
  156. package/dist/components/calendar/calendar.d.ts.map +1 -0
  157. package/dist/components/calendar/public.d.ts +2 -0
  158. package/dist/components/calendar/public.d.ts.map +1 -0
  159. package/dist/components/carousel/carousel.d.ts +43 -0
  160. package/dist/components/carousel/carousel.d.ts.map +1 -0
  161. package/dist/components/carousel/public.d.ts +2 -0
  162. package/dist/components/carousel/public.d.ts.map +1 -0
  163. package/dist/components/chart/chart.d.ts +48 -0
  164. package/dist/components/chart/chart.d.ts.map +1 -0
  165. package/dist/components/chart/public.d.ts +2 -0
  166. package/dist/components/chart/public.d.ts.map +1 -0
  167. package/dist/components/checkbox/checkbox.d.ts.map +1 -1
  168. package/dist/components/collapsible/collapsible.d.ts +14 -0
  169. package/dist/components/collapsible/collapsible.d.ts.map +1 -0
  170. package/dist/components/collapsible/public.d.ts +2 -0
  171. package/dist/components/collapsible/public.d.ts.map +1 -0
  172. package/dist/components/combobox/combobox.d.ts +128 -0
  173. package/dist/components/combobox/combobox.d.ts.map +1 -0
  174. package/dist/components/combobox/public.d.ts +2 -0
  175. package/dist/components/combobox/public.d.ts.map +1 -0
  176. package/dist/components/command/command.d.ts +44 -0
  177. package/dist/components/command/command.d.ts.map +1 -0
  178. package/dist/components/command/public.d.ts +2 -0
  179. package/dist/components/command/public.d.ts.map +1 -0
  180. package/dist/components/context-menu/context-menu.d.ts +82 -0
  181. package/dist/components/context-menu/context-menu.d.ts.map +1 -0
  182. package/dist/components/context-menu/public.d.ts +2 -0
  183. package/dist/components/context-menu/public.d.ts.map +1 -0
  184. package/dist/components/data-table/data-table.d.ts +81 -0
  185. package/dist/components/data-table/data-table.d.ts.map +1 -0
  186. package/dist/components/data-table/public.d.ts +2 -0
  187. package/dist/components/data-table/public.d.ts.map +1 -0
  188. package/dist/components/date-picker/date-picker.d.ts +76 -0
  189. package/dist/components/date-picker/date-picker.d.ts.map +1 -0
  190. package/dist/components/date-picker/public.d.ts +2 -0
  191. package/dist/components/date-picker/public.d.ts.map +1 -0
  192. package/dist/components/dialog/dialog.d.ts +12 -3
  193. package/dist/components/dialog/dialog.d.ts.map +1 -1
  194. package/dist/components/direction/direction.d.ts +2 -0
  195. package/dist/components/direction/direction.d.ts.map +1 -0
  196. package/dist/components/direction/public.d.ts +2 -0
  197. package/dist/components/direction/public.d.ts.map +1 -0
  198. package/dist/components/drawer/drawer.d.ts +83 -0
  199. package/dist/components/drawer/drawer.d.ts.map +1 -0
  200. package/dist/components/drawer/public.d.ts +2 -0
  201. package/dist/components/drawer/public.d.ts.map +1 -0
  202. package/dist/components/dropdown-menu/dropdown-menu.d.ts +1 -4
  203. package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +1 -1
  204. package/dist/components/empty/empty.d.ts +23 -0
  205. package/dist/components/empty/empty.d.ts.map +1 -0
  206. package/dist/components/empty/public.d.ts +2 -0
  207. package/dist/components/empty/public.d.ts.map +1 -0
  208. package/dist/components/field/field.d.ts +33 -12
  209. package/dist/components/field/field.d.ts.map +1 -1
  210. package/dist/components/field/public.d.ts +1 -1
  211. package/dist/components/field/public.d.ts.map +1 -1
  212. package/dist/components/hover-card/hover-card.d.ts +33 -0
  213. package/dist/components/hover-card/hover-card.d.ts.map +1 -0
  214. package/dist/components/hover-card/public.d.ts +2 -0
  215. package/dist/components/hover-card/public.d.ts.map +1 -0
  216. package/dist/components/input-group/input-group.d.ts +38 -0
  217. package/dist/components/input-group/input-group.d.ts.map +1 -0
  218. package/dist/components/input-group/public.d.ts +2 -0
  219. package/dist/components/input-group/public.d.ts.map +1 -0
  220. package/dist/components/input-otp/input-otp.d.ts +17 -0
  221. package/dist/components/input-otp/input-otp.d.ts.map +1 -0
  222. package/dist/components/input-otp/public.d.ts +2 -0
  223. package/dist/components/input-otp/public.d.ts.map +1 -0
  224. package/dist/components/item/item.d.ts +47 -0
  225. package/dist/components/item/item.d.ts.map +1 -0
  226. package/dist/components/item/public.d.ts +2 -0
  227. package/dist/components/item/public.d.ts.map +1 -0
  228. package/dist/components/kbd/kbd.d.ts +8 -0
  229. package/dist/components/kbd/kbd.d.ts.map +1 -0
  230. package/dist/components/kbd/public.d.ts +2 -0
  231. package/dist/components/kbd/public.d.ts.map +1 -0
  232. package/dist/components/marker/marker.d.ts +19 -0
  233. package/dist/components/marker/marker.d.ts.map +1 -0
  234. package/dist/components/marker/public.d.ts +2 -0
  235. package/dist/components/marker/public.d.ts.map +1 -0
  236. package/dist/components/menubar/menubar.d.ts +57 -0
  237. package/dist/components/menubar/menubar.d.ts.map +1 -0
  238. package/dist/components/menubar/public.d.ts +2 -0
  239. package/dist/components/menubar/public.d.ts.map +1 -0
  240. package/dist/components/message/message.d.ts +35 -0
  241. package/dist/components/message/message.d.ts.map +1 -0
  242. package/dist/components/message/public.d.ts +2 -0
  243. package/dist/components/message/public.d.ts.map +1 -0
  244. package/dist/components/message-scroller/message-scroller.d.ts +75 -0
  245. package/dist/components/message-scroller/message-scroller.d.ts.map +1 -0
  246. package/dist/components/message-scroller/public.d.ts +2 -0
  247. package/dist/components/message-scroller/public.d.ts.map +1 -0
  248. package/dist/components/native-select/native-select.d.ts +14 -0
  249. package/dist/components/native-select/native-select.d.ts.map +1 -0
  250. package/dist/components/native-select/public.d.ts +2 -0
  251. package/dist/components/native-select/public.d.ts.map +1 -0
  252. package/dist/components/navigation-menu/navigation-menu.d.ts +83 -0
  253. package/dist/components/navigation-menu/navigation-menu.d.ts.map +1 -0
  254. package/dist/components/navigation-menu/public.d.ts +2 -0
  255. package/dist/components/navigation-menu/public.d.ts.map +1 -0
  256. package/dist/components/pagination/pagination.d.ts +37 -0
  257. package/dist/components/pagination/pagination.d.ts.map +1 -0
  258. package/dist/components/pagination/public.d.ts +2 -0
  259. package/dist/components/pagination/public.d.ts.map +1 -0
  260. package/dist/components/popover/popover.d.ts +32 -0
  261. package/dist/components/popover/popover.d.ts.map +1 -0
  262. package/dist/components/popover/public.d.ts +2 -0
  263. package/dist/components/popover/public.d.ts.map +1 -0
  264. package/dist/components/progress/progress.d.ts +22 -0
  265. package/dist/components/progress/progress.d.ts.map +1 -0
  266. package/dist/components/progress/public.d.ts +2 -0
  267. package/dist/components/progress/public.d.ts.map +1 -0
  268. package/dist/components/questionnaire/public.d.ts +2 -0
  269. package/dist/components/questionnaire/public.d.ts.map +1 -0
  270. package/dist/components/questionnaire/questionnaire.d.ts +192 -0
  271. package/dist/components/questionnaire/questionnaire.d.ts.map +1 -0
  272. package/dist/components/resizable/public.d.ts +2 -0
  273. package/dist/components/resizable/public.d.ts.map +1 -0
  274. package/dist/components/resizable/resizable.d.ts +12 -0
  275. package/dist/components/resizable/resizable.d.ts.map +1 -0
  276. package/dist/components/scroll-area/public.d.ts +2 -0
  277. package/dist/components/scroll-area/public.d.ts.map +1 -0
  278. package/dist/components/scroll-area/scroll-area.d.ts +10 -0
  279. package/dist/components/scroll-area/scroll-area.d.ts.map +1 -0
  280. package/dist/components/select/select.d.ts +3 -5
  281. package/dist/components/select/select.d.ts.map +1 -1
  282. package/dist/components/sheet/public.d.ts +2 -0
  283. package/dist/components/sheet/public.d.ts.map +1 -0
  284. package/dist/components/sheet/sheet.d.ts +56 -0
  285. package/dist/components/sheet/sheet.d.ts.map +1 -0
  286. package/dist/components/sidebar/public.d.ts +2 -0
  287. package/dist/components/sidebar/public.d.ts.map +1 -0
  288. package/dist/components/sidebar/sidebar.d.ts +167 -0
  289. package/dist/components/sidebar/sidebar.d.ts.map +1 -0
  290. package/dist/components/sidebar/use-mobile.d.ts +18 -0
  291. package/dist/components/sidebar/use-mobile.d.ts.map +1 -0
  292. package/dist/components/slider/public.d.ts +2 -0
  293. package/dist/components/slider/public.d.ts.map +1 -0
  294. package/dist/components/slider/slider.d.ts +6 -0
  295. package/dist/components/slider/slider.d.ts.map +1 -0
  296. package/dist/components/spinner/public.d.ts +2 -0
  297. package/dist/components/spinner/public.d.ts.map +1 -0
  298. package/dist/components/spinner/spinner.d.ts +4 -0
  299. package/dist/components/spinner/spinner.d.ts.map +1 -0
  300. package/dist/components/textarea/textarea.d.ts +1 -1
  301. package/dist/components/textarea/textarea.d.ts.map +1 -1
  302. package/dist/components/toast/toast.d.ts.map +1 -1
  303. package/dist/components/toggle/public.d.ts +2 -0
  304. package/dist/components/toggle/public.d.ts.map +1 -0
  305. package/dist/components/toggle/toggle.d.ts +11 -0
  306. package/dist/components/toggle/toggle.d.ts.map +1 -0
  307. package/dist/components/toggle-group/public.d.ts +2 -0
  308. package/dist/components/toggle-group/public.d.ts.map +1 -0
  309. package/dist/components/toggle-group/toggle-group.d.ts +13 -0
  310. package/dist/components/toggle-group/toggle-group.d.ts.map +1 -0
  311. package/dist/components/tooltip/tooltip.d.ts +1 -4
  312. package/dist/components/tooltip/tooltip.d.ts.map +1 -1
  313. package/dist/context-menu.d.ts +1 -0
  314. package/dist/context-menu.js +201 -0
  315. package/dist/context-menu.js.map +1 -0
  316. package/dist/data-table.d.ts +1 -0
  317. package/dist/data-table.js +162 -0
  318. package/dist/data-table.js.map +1 -0
  319. package/dist/date-picker.d.ts +1 -0
  320. package/dist/date-picker.js +175 -0
  321. package/dist/date-picker.js.map +1 -0
  322. package/dist/dialog.js +40 -55
  323. package/dist/dialog.js.map +1 -1
  324. package/dist/direction.d.ts +1 -0
  325. package/dist/direction.js +6 -0
  326. package/dist/direction.js.map +1 -0
  327. package/dist/docs/accordion.md +86 -0
  328. package/dist/docs/alert-dialog.md +151 -0
  329. package/dist/docs/alert.md +74 -0
  330. package/dist/docs/aspect-ratio.md +65 -0
  331. package/dist/docs/attachment.md +254 -0
  332. package/dist/docs/avatar.md +185 -0
  333. package/dist/docs/badge.md +72 -60
  334. package/dist/docs/breadcrumb.md +86 -0
  335. package/dist/docs/bubble.md +233 -0
  336. package/dist/docs/button-group.md +107 -0
  337. package/dist/docs/calendar.md +114 -0
  338. package/dist/docs/card.md +15 -7
  339. package/dist/docs/carousel.md +152 -0
  340. package/dist/docs/chart.md +182 -0
  341. package/dist/docs/collapsible.md +80 -0
  342. package/dist/docs/combobox.md +192 -0
  343. package/dist/docs/command.md +171 -0
  344. package/dist/docs/context-menu.md +173 -0
  345. package/dist/docs/data-table.md +183 -0
  346. package/dist/docs/date-picker.md +137 -0
  347. package/dist/docs/dialog.md +33 -0
  348. package/dist/docs/direction.md +51 -0
  349. package/dist/docs/drawer.md +242 -0
  350. package/dist/docs/empty.md +80 -0
  351. package/dist/docs/field.md +105 -38
  352. package/dist/docs/hover-card.md +81 -0
  353. package/dist/docs/input-group.md +158 -0
  354. package/dist/docs/input-otp.md +116 -0
  355. package/dist/docs/input.md +31 -20
  356. package/dist/docs/item.md +106 -0
  357. package/dist/docs/kbd.md +53 -0
  358. package/dist/docs/marker.md +178 -0
  359. package/dist/docs/menubar.md +108 -0
  360. package/dist/docs/message-scroller.md +221 -0
  361. package/dist/docs/message.md +183 -0
  362. package/dist/docs/native-select.md +93 -0
  363. package/dist/docs/navigation-menu.md +176 -0
  364. package/dist/docs/pagination.md +96 -0
  365. package/dist/docs/popover.md +87 -0
  366. package/dist/docs/progress.md +58 -0
  367. package/dist/docs/questionnaire.md +311 -0
  368. package/dist/docs/resizable.md +95 -0
  369. package/dist/docs/scroll-area.md +93 -0
  370. package/dist/docs/sheet.md +168 -0
  371. package/dist/docs/sidebar.md +309 -0
  372. package/dist/docs/slider.md +66 -0
  373. package/dist/docs/spinner.md +55 -0
  374. package/dist/docs/table.md +85 -20
  375. package/dist/docs/textarea.md +19 -2
  376. package/dist/docs/toggle-group.md +77 -0
  377. package/dist/docs/toggle.md +58 -0
  378. package/dist/docs/typeset.md +75 -0
  379. package/dist/drawer.d.ts +1 -0
  380. package/dist/drawer.js +120 -0
  381. package/dist/drawer.js.map +1 -0
  382. package/dist/dropdown-menu.js +98 -130
  383. package/dist/dropdown-menu.js.map +1 -1
  384. package/dist/empty.d.ts +1 -0
  385. package/dist/empty.js +50 -0
  386. package/dist/empty.js.map +1 -0
  387. package/dist/field.js +105 -20
  388. package/dist/field.js.map +1 -1
  389. package/dist/hover-card.d.ts +1 -0
  390. package/dist/hover-card.js +44 -0
  391. package/dist/hover-card.js.map +1 -0
  392. package/dist/index.d.ts +44 -0
  393. package/dist/index.d.ts.map +1 -1
  394. package/dist/index.js +431 -93
  395. package/dist/index.js.map +1 -1
  396. package/dist/input-group.d.ts +1 -0
  397. package/dist/input-group.js +91 -0
  398. package/dist/input-group.js.map +1 -0
  399. package/dist/input-otp.d.ts +1 -0
  400. package/dist/input-otp.js +28 -0
  401. package/dist/input-otp.js.map +1 -0
  402. package/dist/input.js +17 -17
  403. package/dist/item.d.ts +1 -0
  404. package/dist/item.js +107 -0
  405. package/dist/item.js.map +1 -0
  406. package/dist/kbd.d.ts +1 -0
  407. package/dist/kbd.js +17 -0
  408. package/dist/kbd.js.map +1 -0
  409. package/dist/marker.d.ts +1 -0
  410. package/dist/marker.js +52 -0
  411. package/dist/marker.js.map +1 -0
  412. package/dist/menubar.d.ts +1 -0
  413. package/dist/menubar.js +50 -0
  414. package/dist/menubar.js.map +1 -0
  415. package/dist/message-scroller.d.ts +1 -0
  416. package/dist/message-scroller.js +69 -0
  417. package/dist/message-scroller.js.map +1 -0
  418. package/dist/message.d.ts +1 -0
  419. package/dist/message.js +37 -0
  420. package/dist/message.js.map +1 -0
  421. package/dist/native-select.d.ts +1 -0
  422. package/dist/native-select.js +42 -0
  423. package/dist/native-select.js.map +1 -0
  424. package/dist/navigation-menu.d.ts +1 -0
  425. package/dist/navigation-menu.js +97 -0
  426. package/dist/navigation-menu.js.map +1 -0
  427. package/dist/pagination.d.ts +1 -0
  428. package/dist/pagination.js +104 -0
  429. package/dist/pagination.js.map +1 -0
  430. package/dist/popover.d.ts +1 -0
  431. package/dist/popover.js +59 -0
  432. package/dist/popover.js.map +1 -0
  433. package/dist/progress.d.ts +1 -0
  434. package/dist/progress.js +36 -0
  435. package/dist/progress.js.map +1 -0
  436. package/dist/questionnaire.d.ts +1 -0
  437. package/dist/questionnaire.js +209 -0
  438. package/dist/questionnaire.js.map +1 -0
  439. package/dist/radio-group.js +7 -7
  440. package/dist/resizable.d.ts +1 -0
  441. package/dist/resizable.js +24 -0
  442. package/dist/resizable.js.map +1 -0
  443. package/dist/scroll-area.d.ts +1 -0
  444. package/dist/scroll-area.js +32 -0
  445. package/dist/scroll-area.js.map +1 -0
  446. package/dist/select.js +83 -107
  447. package/dist/select.js.map +1 -1
  448. package/dist/sheet.d.ts +1 -0
  449. package/dist/sheet.js +94 -0
  450. package/dist/sheet.js.map +1 -0
  451. package/dist/sidebar.d.ts +1 -0
  452. package/dist/sidebar.js +386 -0
  453. package/dist/sidebar.js.map +1 -0
  454. package/dist/slider.d.ts +1 -0
  455. package/dist/slider.js +40 -0
  456. package/dist/slider.js.map +1 -0
  457. package/dist/spinner.d.ts +1 -0
  458. package/dist/spinner.js +21 -0
  459. package/dist/spinner.js.map +1 -0
  460. package/dist/switch.js +11 -11
  461. package/dist/table.js +34 -35
  462. package/dist/table.js.map +1 -1
  463. package/dist/tabs.js +17 -17
  464. package/dist/textarea.js +14 -7
  465. package/dist/textarea.js.map +1 -1
  466. package/dist/theme.css +35 -20
  467. package/dist/toast.js +54 -164
  468. package/dist/toast.js.map +1 -1
  469. package/dist/toggle-group.d.ts +1 -0
  470. package/dist/toggle-group.js +46 -0
  471. package/dist/toggle-group.js.map +1 -0
  472. package/dist/toggle.d.ts +1 -0
  473. package/dist/toggle.js +39 -0
  474. package/dist/toggle.js.map +1 -0
  475. package/dist/tooltip.js.map +1 -1
  476. package/dist/typeset.css +532 -0
  477. package/dist/utilities.css +583 -0
  478. package/llms.txt +268 -24
  479. package/package.json +15 -3
  480. package/dist/chunks/badge.BcdxDzJ7.css +0 -1
  481. package/dist/chunks/button.DNo8DTR3.css +0 -1
  482. package/dist/chunks/card.B0AcyAT1.css +0 -1
  483. package/dist/chunks/checkbox.D3kdAalh.css +0 -1
  484. package/dist/chunks/dialog.D6LS2vnG.css +0 -1
  485. package/dist/chunks/dropdown-menu.DmDZc5gB.css +0 -1
  486. package/dist/chunks/field.BNZx8HfN.css +0 -1
  487. package/dist/chunks/input.C8RDCC-a.css +0 -1
  488. package/dist/chunks/radio-group.zAFY9yCF.css +0 -1
  489. package/dist/chunks/select.Dt0diN4P.css +0 -1
  490. package/dist/chunks/switch.CsaIRnCA.css +0 -1
  491. package/dist/chunks/table.BuWHXL6e.css +0 -1
  492. package/dist/chunks/tabs.KEksCAxN.css +0 -1
  493. package/dist/chunks/textarea.N3iiWUuz.css +0 -1
@@ -0,0 +1,152 @@
1
+ # Carousel
2
+
3
+ An embla-carousel-react wrapper — a scroll-snapping track of slides with
4
+ optional Previous/Next controls and keyboard navigation. No Base UI
5
+ primitive exists for this (confirmed against Base UI v1.7.0), so
6
+ `Carousel` owns the embla instance directly and
7
+ shares it with its parts through context.
8
+
9
+ ## When to use
10
+
11
+ - A horizontally (or vertically) scrolling set of cards, images, or panels
12
+ where only one (or a few) is visible at a time and the user steps through
13
+ them — a product gallery, a testimonial strip, an onboarding sequence.
14
+
15
+ ## When not to use
16
+
17
+ - A tabbed panel switcher with no scroll-snap feel — use `Tabs`.
18
+ - A plain overflowing row a user can free-scroll (no snapping, no
19
+ Previous/Next affordance needed) — a native `overflow-x: auto` container
20
+ is simpler and needs no dependency.
21
+
22
+ ## Parts
23
+
24
+ | Part | Renders | Notes |
25
+ |------|---------|-------|
26
+ | `Carousel` | `<div role="region">` | Owns the embla instance; provides context to every part below |
27
+ | `CarouselContent` | Two nested `<div>`s | Outer is embla's scroll viewport (`overflow: hidden`); inner is the flex track embla translates |
28
+ | `CarouselItem` | `<div role="group">` | One slide; `aria-roledescription="slide"` |
29
+ | `CarouselPrevious` | `Button` | Icon-only, `variant="outline"` `size="sm"` by default |
30
+ | `CarouselNext` | `Button` | Same as `CarouselPrevious`, mirrored |
31
+
32
+ ## Props (kit level)
33
+
34
+ `Carousel`:
35
+
36
+ | Prop | Type | Default |
37
+ |------|------|---------|
38
+ | `orientation` | `horizontal` \| `vertical` | `horizontal` |
39
+ | `opts` | embla `EmblaOptionsType` | — |
40
+ | `plugins` | embla `EmblaPluginType[]` | — |
41
+ | `setApi` | `(api: CarouselApi) => void` | — |
42
+ | `className` | `string` | — |
43
+
44
+ Every other part forwards its underlying element's native props, plus
45
+ `CarouselPrevious`/`CarouselNext` forward every `Button` prop except `icon`
46
+ (fixed to the chevron glyph — see below) — `variant`, `size`, `aria-label`,
47
+ `onClick`, `disabled`, etc. all pass through and override the computed
48
+ defaults.
49
+
50
+ `orientation` reaches every part through context, not a prop each part
51
+ takes individually — set it once on `Carousel` and `CarouselContent`,
52
+ `CarouselItem`, `CarouselPrevious`, and `CarouselNext` all read it off
53
+ `data-orientation`.
54
+
55
+ ### Spacing contract
56
+
57
+ `CarouselContent`'s viewport clips overflow (`overflow: hidden`), and
58
+ `CarouselItem` only pads its *leading* edge — the inter-item gap upstream's
59
+ `pl-4`/`-ml-4` (horizontal) or `pt-4`/`-mt-4` (vertical) pair produces. It
60
+ does not pad a slide's trailing or cross-axis edges. A bordered element
61
+ (a `Card`, an image, anything with a visible edge) placed directly inside
62
+ `CarouselItem` therefore fills the item flush to those un-padded sides,
63
+ which can coincide with the viewport's clipped bounds and cut the border
64
+ off there. Wrap such content in a padding div — `--space-1` matches
65
+ upstream's own `p-1` — the same way every example below does:
66
+
67
+ ```tsx
68
+ <CarouselItem>
69
+ <div style={{ padding: 'var(--space-1)' }}>
70
+ <Card>...</Card>
71
+ </div>
72
+ </CarouselItem>
73
+ ```
74
+
75
+ Content with no visible edge (plain text, an unbordered image) doesn't
76
+ need the wrapper.
77
+
78
+ `useCarousel()` is also exported: the same context hook every part above
79
+ uses internally, for building custom controls (a slide counter, dot
80
+ indicators) that need `canScrollPrev`/`canScrollNext`/`scrollPrev`/
81
+ `scrollNext`/the raw embla `api`. It throws outside a `<Carousel>`.
82
+
83
+ ## Examples
84
+
85
+ ```tsx
86
+ import {
87
+ Carousel,
88
+ CarouselContent,
89
+ CarouselItem,
90
+ CarouselNext,
91
+ CarouselPrevious,
92
+ } from '@gears-frontx/ui-kit';
93
+
94
+ // Horizontal (default), with nav buttons
95
+ <Carousel>
96
+ <CarouselContent>
97
+ <CarouselItem>Slide 1</CarouselItem>
98
+ <CarouselItem>Slide 2</CarouselItem>
99
+ <CarouselItem>Slide 3</CarouselItem>
100
+ </CarouselContent>
101
+ <CarouselPrevious />
102
+ <CarouselNext />
103
+ </Carousel>
104
+
105
+ // Vertical
106
+ <Carousel orientation="vertical" opts={{ align: 'start' }}>
107
+ <CarouselContent>
108
+ <CarouselItem>Slide 1</CarouselItem>
109
+ <CarouselItem>Slide 2</CarouselItem>
110
+ </CarouselContent>
111
+ <CarouselPrevious />
112
+ <CarouselNext />
113
+ </Carousel>
114
+
115
+ // Reading embla's own API for a custom slide counter
116
+ function CountedCarousel() {
117
+ const [api, setApi] = useState<CarouselApi>();
118
+ const [current, setCurrent] = useState(0);
119
+
120
+ useEffect(() => {
121
+ if (!api) return;
122
+ api.on('select', () => setCurrent(api.selectedScrollSnap()));
123
+ }, [api]);
124
+
125
+ return (
126
+ <Carousel setApi={setApi}>
127
+ <CarouselContent>{/* items */}</CarouselContent>
128
+ <p>Slide {current + 1}</p>
129
+ </Carousel>
130
+ );
131
+ }
132
+ ```
133
+
134
+ ## Anti-patterns
135
+
136
+ - Do not render `CarouselItem`, `CarouselContent`, `CarouselPrevious`, or
137
+ `CarouselNext` outside a `Carousel` — they call `useCarousel()`
138
+ internally and throw immediately (`useCarousel must be used within a
139
+ <Carousel />`) rather than silently rendering broken.
140
+ - Do not pass `icon` to `CarouselPrevious`/`CarouselNext` expecting to swap
141
+ the glyph — that prop is intentionally omitted from their type (the kit
142
+ inlines the chevron SVGs directly, same precedent as `Spinner`/
143
+ `Pagination`); style via `className` instead, or compose your own button
144
+ from `useCarousel()`'s `scrollPrev`/`scrollNext`/`canScrollPrev`/
145
+ `canScrollNext` if a different control entirely is needed.
146
+ - Keyboard navigation only wires `ArrowLeft`/`ArrowRight`, even in the
147
+ `vertical` orientation — this replicates upstream's own behavior exactly
148
+ (see carousel.tsx), it is not a kit-side bug to work around.
149
+ - Do not place a bordered element directly inside `CarouselItem` without
150
+ the padding wrapper from "Spacing contract" above — its trailing and
151
+ cross-axis edges have no padding of their own, so the border sits flush
152
+ against the viewport's clipped bounds and gets cut off there.
@@ -0,0 +1,182 @@
1
+ # Chart
2
+
3
+ A themeable wrapper around [Recharts](https://recharts.org), faithfully
4
+ porting [shadcn/ui's base Chart](https://ui.shadcn.com/docs/components/base/chart):
5
+ `ChartContainer` (Recharts `ResponsiveContainer` + per-instance color
6
+ injection), `ChartTooltip`/`ChartTooltipContent`, `ChartLegend`/
7
+ `ChartLegendContent`, and the `ChartConfig` type. Chart draws no chart type
8
+ itself — bars, lines, areas, pies, etc. are Recharts components a consumer
9
+ composes as `ChartContainer`'s children, same as upstream.
10
+
11
+ There is no variant or size axis — upstream ships none either. Every part
12
+ is a single visual treatment; all styling is either fixed (grid/flex
13
+ layout, spacing, text roles) or supplied per-instance by the consumer's own
14
+ `ChartConfig`.
15
+
16
+ ## Composition
17
+
18
+ ```tsx
19
+ <ChartContainer config={chartConfig}>
20
+ <BarChart data={data}>
21
+ <CartesianGrid vertical={false} />
22
+ <XAxis dataKey="month" />
23
+ <Bar dataKey="desktop" fill="var(--color-desktop)" radius={4} />
24
+ <ChartTooltip content={<ChartTooltipContent />} />
25
+ <ChartLegend content={<ChartLegendContent />} />
26
+ </BarChart>
27
+ </ChartContainer>
28
+ ```
29
+
30
+ `ChartContainer` provides the `ChartConfig` to `ChartTooltipContent`/
31
+ `ChartLegendContent` via context — both throw if rendered outside one.
32
+ `ChartTooltip`/`ChartLegend` are plain re-exports of Recharts'
33
+ `Tooltip`/`Legend`; pass the kit's `*Content` components as their
34
+ `content` prop for themed rendering, or omit `content` for Recharts'
35
+ own default.
36
+
37
+ ## Series colors: `ChartConfig`, not `--chart-*` tokens
38
+
39
+ ```ts
40
+ type ChartConfig = Record<
41
+ string,
42
+ { label?: ReactNode; icon?: ComponentType } & (
43
+ | { color?: string }
44
+ | { theme: { light: string; dark: string } }
45
+ )
46
+ >;
47
+ ```
48
+
49
+ Every series gets its color from `ChartConfig` — either a flat `color`
50
+ (one value for both themes) or a `theme` map with independent
51
+ `light`/`dark` values. `ChartContainer` reads this config and injects a
52
+ `--color-<key>` custom property per entry, scoped to that chart instance;
53
+ a series then paints itself with `fill="var(--color-<key>)"` /
54
+ `stroke="var(--color-<key>)"` on its own Recharts element:
55
+
56
+ ```ts
57
+ const chartConfig = {
58
+ desktop: { label: 'Desktop', color: 'var(--primary)' },
59
+ mobile: { label: 'Mobile', theme: { light: '#e11d48', dark: '#fb7185' } },
60
+ } satisfies ChartConfig;
61
+ ```
62
+
63
+ **This kit does not ship `--chart-1` through `--chart-5`.** Upstream's own
64
+ docs use those as example *values* for `ChartConfig`'s `color` field
65
+ (`color: "var(--chart-1)"`) — a convenience palette, not part of the
66
+ mechanism itself, which only ever reads whatever string `ChartConfig`
67
+ supplies. `theme.css` is frozen for this port and defines no such tokens,
68
+ so they are not available as a shorthand today. A consumer can reference
69
+ any existing kit token (`var(--primary)`, `var(--info)`, ...), a literal
70
+ color, or its own palette. **Open integrator decision:** if a fixed,
71
+ theme-aware chart palette (`--chart-1`..`--chart-5`) is wanted as a kit
72
+ default, it needs a `theme.css` addition — out of scope for this port.
73
+
74
+ ### Dark mode
75
+
76
+ `ChartConfig['theme']` keys are exactly `light`/`dark`, matching upstream.
77
+ What differs is the selector `ChartStyle` compiles them to: upstream emits
78
+ a single `.dark [data-chart=id] { ... }` block (a Tailwind dark-mode
79
+ class this kit doesn't have); this port emits the kit's own dual dark
80
+ mechanism instead — `[data-theme='dark'] [data-chart=id]` plus a
81
+ `prefers-color-scheme` fallback guarded by `:not([data-theme='light'])`,
82
+ mirroring `theme.css`'s own light/dark selectors. Nothing about the public
83
+ API changes — only the CSS text `ChartStyle` generates internally.
84
+
85
+ ## Props (kit level)
86
+
87
+ `ChartContainer`:
88
+
89
+ | Prop | Type | Default |
90
+ |------|------|---------|
91
+ | `config` | `ChartConfig` — **required** | — |
92
+ | `children` | Recharts chart element(s) — **required** | — |
93
+ | `id` | `string` — seeds the `data-chart` scoping id | generated |
94
+ | `initialDimension` | `{ width: number; height: number }` — size Recharts assumes before its first real measurement | `{ width: 320, height: 200 }` |
95
+ | `className` | `string` — merged after the kit class | — |
96
+
97
+ `ChartTooltipContent` (all optional): `indicator` (`'dot'` \| `'line'` \|
98
+ `'dashed'`, default `'dot'`), `hideLabel`, `hideIndicator`, `label`,
99
+ `labelFormatter`, `labelClassName`, `formatter`, `color` (overrides every
100
+ row's indicator color), `nameKey`, `labelKey`, plus Recharts' own
101
+ `Tooltip`/`DefaultTooltipContent` props (forwarded, not re-documented
102
+ here — see Recharts' docs).
103
+
104
+ `ChartLegendContent` (all optional): `hideIcon`, `nameKey`,
105
+ `verticalAlign` (`'top'` places the legend's padding above the chart
106
+ instead of below), plus Recharts' own `Legend` content props.
107
+
108
+ ## Porting notes
109
+
110
+ All twelve of the `[&_.recharts-*]` descendant rules upstream applies to
111
+ `ChartContainer`'s root are ported, including the five that retint
112
+ Recharts' own stock-coloured elements: `[stroke='#ccc']` (default
113
+ cartesian/polar grid lines and reference lines) picks up `--border`, and
114
+ `[stroke='#fff']` (default dot and sector outlines, drawn for a white
115
+ page) goes transparent. So a chart that leaves `CartesianGrid`/
116
+ `ReferenceLine` unstyled reads correctly in dark mode instead of showing
117
+ Recharts' light-page grey.
118
+
119
+ `id` is normalized to `[A-Za-z0-9_-]` before it reaches either the
120
+ `data-chart` attribute or the per-instance `<style>` block, and a
121
+ `ChartConfig` colour containing anything that could end a declaration or
122
+ the style element (`;`, `{}`, `<>`, `\`, a comment marker) is dropped
123
+ rather than injected. Both are consumer strings landing verbatim in a
124
+ stylesheet; keep ids and config keys to plain identifiers and colours to
125
+ plain colour syntax and neither rule is noticeable. If you render
126
+ `ChartStyle` yourself instead of using `ChartContainer`, put the same
127
+ normalized id on your own `data-chart` attribute or the selector will not
128
+ match it.
129
+
130
+ `ChartStyle` renders its per-instance CSS as the `<style>` element's JSX
131
+ children (`<style>{css}</style>`) rather than through
132
+ `dangerouslySetInnerHTML`, which is what upstream and most React chart
133
+ implementations use. Children get React's own server-side `</style`
134
+ escaping (so the string can't break out of the tag in SSR output) and are
135
+ rendered client-side as an inert Text node — a stronger guarantee than
136
+ `dangerouslySetInnerHTML` offers, for the same runtime-built string.
137
+
138
+ ## Examples
139
+
140
+ ```tsx
141
+ import {
142
+ ChartContainer,
143
+ ChartLegend,
144
+ ChartLegendContent,
145
+ ChartTooltip,
146
+ ChartTooltipContent,
147
+ type ChartConfig,
148
+ } from '@gears-frontx/ui-kit';
149
+ import { Bar, BarChart, CartesianGrid, XAxis } from 'recharts';
150
+
151
+ const chartConfig = {
152
+ desktop: { label: 'Desktop', color: 'var(--primary)' },
153
+ mobile: { label: 'Mobile', color: 'var(--info)' },
154
+ } satisfies ChartConfig;
155
+
156
+ const data = [
157
+ { month: 'Jan', desktop: 186, mobile: 80 },
158
+ { month: 'Feb', desktop: 305, mobile: 200 },
159
+ ];
160
+
161
+ <ChartContainer config={chartConfig}>
162
+ <BarChart data={data}>
163
+ <CartesianGrid vertical={false} />
164
+ <XAxis dataKey="month" tickLine={false} axisLine={false} />
165
+ <ChartTooltip content={<ChartTooltipContent />} />
166
+ <Bar dataKey="desktop" fill="var(--color-desktop)" radius={4} />
167
+ <Bar dataKey="mobile" fill="var(--color-mobile)" radius={4} />
168
+ <ChartLegend content={<ChartLegendContent />} />
169
+ </BarChart>
170
+ </ChartContainer>;
171
+ ```
172
+
173
+ ## Anti-patterns
174
+
175
+ - Do not render `ChartTooltipContent`/`ChartLegendContent` outside a
176
+ `ChartContainer` — both call a hook that throws without its context.
177
+ - Do not hardcode a series color inline on the Recharts element and skip
178
+ `ChartConfig` — the config is also what the tooltip/legend read back to
179
+ resolve each series' label and (for the legend's fallback swatch) color.
180
+ - Do not reach for `--chart-1`..`--chart-5` — they don't exist in this
181
+ kit; use `ChartConfig`'s `color`/`theme` with an existing token or a
182
+ literal value instead (see "Series colors" above).
@@ -0,0 +1,80 @@
1
+ # Collapsible
2
+
3
+ A single expandable/collapsible section. Wraps the Base UI Collapsible
4
+ primitives; open/close state, keyboard interaction, and the panel's
5
+ height-animation values come from Base UI. No variants — this is a
6
+ structural, single-purpose component.
7
+
8
+ Composition: `Collapsible` (root, holds open state) → `CollapsibleTrigger`
9
+ (a native `<button>`) → `CollapsibleContent` (the panel, unmounted while
10
+ closed unless `keepMounted` is set).
11
+
12
+ ## When to use
13
+
14
+ - A single section a user can show/hide on demand — "Show more", an
15
+ expandable filter panel, a details/summary-style block where you need
16
+ more control over styling or animation than the native `<details>`
17
+ element offers.
18
+
19
+ ## When not to use
20
+
21
+ - A list of many mutually-exclusive or independently-expandable sections
22
+ — use `Accordion`; this component is a single panel, not a group.
23
+ - A popup anchored to a trigger (menu, tooltip, popover) — `Collapsible`
24
+ reflows the document in place; it does not portal or position content
25
+ relative to the trigger.
26
+
27
+ ## Props (kit level)
28
+
29
+ `Collapsible` (root): `open` / `defaultOpen`, `onOpenChange`, `disabled` —
30
+ see Base UI `Collapsible.Root`.
31
+
32
+ `CollapsibleTrigger`: all native `<button>` props; disabled forwards to
33
+ the native `disabled` attribute (unlike `Button`'s own `loading`
34
+ handling, there is no `focusableWhenDisabled` override here).
35
+
36
+ `CollapsibleContent`: `keepMounted` (keep the panel in the DOM while
37
+ closed, default `false`), `hiddenUntilFound` (hide via `hidden="until-found"`
38
+ so the browser's built-in page search can still expand it — overrides
39
+ `keepMounted`), `className` — merged after the kit class.
40
+
41
+ ## Behavior
42
+
43
+ - The panel animates open/close by height, using Base UI's own measured
44
+ content height (`--collapsible-panel-height`) rather than a fixed
45
+ `max-height` — the transition always matches the content's real size,
46
+ however tall it is.
47
+ - By default the panel is removed from the DOM entirely while closed (not
48
+ just visually hidden) — pass `keepMounted` on `CollapsibleContent` to
49
+ keep it mounted (e.g. so its inputs retain focus/state across toggles).
50
+ - `disabled` on the root suppresses the trigger's interaction; the trigger
51
+ itself still renders (it isn't hidden), just inert.
52
+
53
+ ## Examples
54
+
55
+ ```tsx
56
+ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@gears-frontx/ui-kit';
57
+
58
+ <Collapsible>
59
+ <CollapsibleTrigger>What is included?</CollapsibleTrigger>
60
+ <CollapsibleContent>Everything in the Pro plan, plus priority support.</CollapsibleContent>
61
+ </Collapsible>;
62
+
63
+ // Starts open, and stays mounted (state-preserving) while collapsed
64
+ <Collapsible defaultOpen>
65
+ <CollapsibleTrigger>Advanced options</CollapsibleTrigger>
66
+ <CollapsibleContent keepMounted>
67
+ <input placeholder="Custom endpoint" />
68
+ </CollapsibleContent>
69
+ </Collapsible>;
70
+ ```
71
+
72
+ ## Anti-patterns
73
+
74
+ - Do not nest interactive controls the user needs while the panel is
75
+ closed inside `CollapsibleContent` without `keepMounted` — closed
76
+ content is removed from the DOM by default and cannot hold focus or
77
+ retain uncontrolled input state across a collapse.
78
+ - Do not reach for this component to build a menu or tooltip — it has no
79
+ portal, no positioning, and no dismiss-on-outside-press; see
80
+ `DropdownMenu`/`Tooltip`/`Dialog` for those patterns.
@@ -0,0 +1,192 @@
1
+ # Combobox
2
+
3
+ A filterable text field for picking from a list, wrapping Base UI's
4
+ dedicated `Combobox` primitive (not a Popover+search composition). The
5
+ input itself displays and edits the current value; the popup filters as
6
+ you type. Portalled, keyboard navigation, typeahead-by-typing, and form
7
+ submission (hidden native input on the root) come from Base UI.
8
+
9
+ Composition, single-select: `Combobox` (root, holds the value) →
10
+ `ComboboxInput` (the field itself; renders its own trailing trigger/clear
11
+ buttons) → `ComboboxContent` → `ComboboxEmpty` / `ComboboxList` /
12
+ `ComboboxItem` — `ComboboxGroup` / `ComboboxLabel` / `ComboboxSeparator`
13
+ for grouped lists. `ComboboxContent` does not wrap its children in a list
14
+ the way `SelectContent` does — place `ComboboxEmpty` and `ComboboxList` as
15
+ its direct children yourself, so an empty-results message can sit
16
+ alongside (not inside) the scrolling list.
17
+
18
+ Composition, multi-select: swap `ComboboxInput` for `ComboboxChips` (a
19
+ container of `ComboboxChip` pills plus a trailing `ComboboxChipsInput`),
20
+ and anchor the popup to the chips instead of a single-line field with
21
+ `useComboboxAnchor()`.
22
+
23
+ ## When to use
24
+
25
+ - A single value from a long or unbounded list, filterable by typing —
26
+ the list a `select` covers by scrolling doesn't fit a combobox until it
27
+ is long enough that typing beats scrolling.
28
+ - Multiple values from a list, shown as removable chips (`multiple`).
29
+
30
+ ## When not to use
31
+
32
+ - 2–6 always-visible options — use `radio-group`.
33
+ - A short, non-searchable list — use `select`; a combobox invites typing a
34
+ query that doesn't need to exist.
35
+
36
+ ## Props (kit level)
37
+
38
+ `Combobox` (root): `value` / `defaultValue`, `onValueChange`, `multiple`,
39
+ `name`, `disabled`, `required`, `autoHighlight` — see Base UI
40
+ `Combobox.Root`. Always pass `items` as well: without it, filtering and
41
+ the built-in label/value stringification (for `{ value, label }`-shaped
42
+ items) don't run.
43
+
44
+ `ComboboxInput`:
45
+
46
+ | Prop | Type | Default |
47
+ |------|------|---------|
48
+ | `showTrigger` | `boolean` — renders the trailing chevron button that opens the popup | `true` |
49
+ | `showClear` | `boolean` — renders a trailing clear button once a value is chosen. Base UI only mounts it while there's something to clear, and it visually replaces the trigger in the same corner rather than the two ever stacking | `false` |
50
+ | `toggleLabel` | `string` — accessible name for the chevron button | `'Toggle options'` |
51
+ | `clearLabel` | `string` — accessible name for the clear button | `'Clear value'` |
52
+ | `className` | `string` — merged after the kit class | — |
53
+
54
+ Both trailing buttons are icon-only, so those two labels ARE their
55
+ accessible names — override them for any language but English, the same
56
+ way `Dialog`'s `closeLabel` and `SidebarTrigger`'s `label` work.
57
+
58
+ `ComboboxContent` accepts positioning props (`side`, `sideOffset`,
59
+ `align`, `alignOffset`, `anchor`, plus the escape hatch for fields inside a
60
+ `transform`/`filter` container: `positionMethod="fixed"`,
61
+ `collisionBoundary`, `collisionPadding`) and `container` — the popup
62
+ portals to `<body>` by default, so if your theme lives on a subtree
63
+ (`data-theme` on a section instead of `<html>`), pass that section as
64
+ `container` or the popup renders with the root theme. `ComboboxItem` takes
65
+ `value` (required) and `disabled`. `aria-invalid` on `ComboboxInput` (or
66
+ `ComboboxChips`, for multi-select) switches its border and ring to the
67
+ destructive color.
68
+
69
+ `ComboboxChip` takes `showRemove` (`boolean`, default `true`) to omit the
70
+ remove button on a fixed/read-only chip, and `removeLabel` (`string`,
71
+ default `'Remove'`) for that button's accessible name — worth naming the
72
+ chip itself (`removeLabel={`Remove ${label}`}`) once a form carries
73
+ several.
74
+
75
+ ## Examples
76
+
77
+ Single-select, filterable, with groups:
78
+
79
+ ```tsx
80
+ import {
81
+ Combobox,
82
+ ComboboxContent,
83
+ ComboboxEmpty,
84
+ ComboboxGroup,
85
+ ComboboxInput,
86
+ ComboboxItem,
87
+ ComboboxLabel,
88
+ ComboboxList,
89
+ ComboboxSeparator,
90
+ } from '@gears-frontx/ui-kit';
91
+
92
+ const TIMEZONES = [
93
+ { value: 'europe', label: 'Europe', items: ['Frankfurt', 'Dublin'] },
94
+ { value: 'americas', label: 'Americas', items: ['Virginia', 'Oregon'] },
95
+ ];
96
+
97
+ <Combobox items={TIMEZONES}>
98
+ <ComboboxInput aria-label="Timezone" placeholder="Select a timezone" showClear />
99
+ <ComboboxContent>
100
+ <ComboboxEmpty>No timezones found.</ComboboxEmpty>
101
+ <ComboboxList>
102
+ {(group) => (
103
+ <ComboboxGroup key={group.value} items={group.items}>
104
+ <ComboboxLabel>{group.label}</ComboboxLabel>
105
+ {group.items.map((item) => (
106
+ <ComboboxItem key={item} value={item}>
107
+ {item}
108
+ </ComboboxItem>
109
+ ))}
110
+ </ComboboxGroup>
111
+ )}
112
+ </ComboboxList>
113
+ </ComboboxContent>
114
+ </Combobox>
115
+ ```
116
+
117
+ Multi-select, chips:
118
+
119
+ ```tsx
120
+ import {
121
+ Combobox,
122
+ ComboboxChip,
123
+ ComboboxChips,
124
+ ComboboxChipsInput,
125
+ ComboboxContent,
126
+ ComboboxEmpty,
127
+ ComboboxItem,
128
+ ComboboxList,
129
+ ComboboxValue,
130
+ useComboboxAnchor,
131
+ } from '@gears-frontx/ui-kit';
132
+
133
+ function FrameworkPicker() {
134
+ const anchor = useComboboxAnchor();
135
+ return (
136
+ <Combobox multiple items={FRAMEWORKS}>
137
+ <ComboboxChips ref={anchor}>
138
+ <ComboboxValue>
139
+ {(values: string[]) =>
140
+ values.map((value) => (
141
+ <ComboboxChip key={value}>{value}</ComboboxChip>
142
+ ))
143
+ }
144
+ </ComboboxValue>
145
+ <ComboboxChipsInput aria-label="Frameworks" placeholder="Add a framework" />
146
+ </ComboboxChips>
147
+ <ComboboxContent anchor={anchor}>
148
+ <ComboboxEmpty>No frameworks found.</ComboboxEmpty>
149
+ <ComboboxList>
150
+ {(item: string) => <ComboboxItem key={item} value={item}>{item}</ComboboxItem>}
151
+ </ComboboxList>
152
+ </ComboboxContent>
153
+ </Combobox>
154
+ );
155
+ }
156
+ ```
157
+
158
+ ## Not ported from upstream
159
+
160
+ Upstream's own `combobox.tsx` (the shadcn/ui base-variant registry file
161
+ this was ported from) surfaces only a subset of Base UI's Combobox
162
+ primitive. Skipped for the same reason upstream skips them — no kit API
163
+ exists beyond what upstream demonstrates:
164
+
165
+ - `Combobox.Row` / `virtualized` — virtualized/grid list rendering.
166
+ - `Combobox.Status` — a live-region announcer separate from `Empty`.
167
+ - `Combobox.Backdrop` / `Combobox.Arrow` / `Combobox.Icon` — upstream
168
+ renders no modal backdrop, no positioner arrow, and inlines its chevron
169
+ as a plain child rather than through the `Icon` part.
170
+ - `Combobox.InputGroup` (the Base UI part, distinct from the unrelated
171
+ shadcn `input-group` registry component upstream actually composes
172
+ with) — never referenced by upstream's own source.
173
+ - `useFilter` / `useFilteredItems` — upstream relies on `Combobox.Root`'s
174
+ built-in filtering (pass `items`); these hooks are for externally
175
+ controlled filtering, which upstream's example never does.
176
+ - A standalone `Clear` export — upstream defines `ComboboxClear` but does
177
+ not export it from its file; it only appears composed into its
178
+ `ComboboxInput` via `showClear`, which this kit mirrors exactly.
179
+
180
+ `ComboboxInput`'s field text also skips the literal-1rem/1.5rem small-screen
181
+ step `input.module.css`/`textarea.module.css` drop to below the desktop
182
+ breakpoint (an iOS Safari focus-zoom guard) — that pattern depends on a
183
+ `tokens.test.ts` `EXCEPTIONS` entry naming the file, and this port is out of
184
+ scope to add `combobox.module.css`'s own entry to that list. `.input` uses
185
+ the Studio/Label token metrics unconditionally instead, same as this kit's
186
+ button-based triggers (which never had the zoom problem to begin with).
187
+
188
+ ## Anti-patterns
189
+
190
+ - Do not use a combobox for navigation — that is a menu/link pattern.
191
+ - Do not omit `items` — without it, object-shaped values render as
192
+ `[object Object]` in the field instead of their label.