@gears-frontx/ui-kit 0.3.0-alpha.3 → 0.4.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +174 -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,171 @@
1
+ # Command
2
+
3
+ A searchable, keyboard-navigable list of commands or options, built on
4
+ [`cmdk`](https://github.com/pacocoursey/cmdk) — the same primitive
5
+ upstream shadcn/ui uses (Base UI has no comparable "filterable list with
6
+ built-in fuzzy scoring" primitive, so this is a deliberate exception to the
7
+ kit's usual Base UI foundation). `CommandDialog` composes the kit's own
8
+ `Dialog` (`../dialog`) rather than cmdk's bundled Radix-based dialog, so a
9
+ command palette gets the same portal/focus-trap/Escape-dismissal/theming
10
+ behavior every other kit overlay gets.
11
+
12
+ ## Composition
13
+
14
+ ```text
15
+ Command
16
+ ├── CommandInput
17
+ └── CommandList
18
+ ├── CommandEmpty
19
+ ├── CommandGroup
20
+ │ └── CommandItem (+ optional CommandShortcut)
21
+ ├── CommandSeparator
22
+ └── CommandGroup
23
+ └── CommandItem
24
+ ```
25
+
26
+ `CommandDialog` wraps that same tree with `Dialog` → `DialogContent`:
27
+
28
+ ```text
29
+ CommandDialog
30
+ ├── DialogHeader (visually hidden — DialogTitle + DialogDescription)
31
+ └── DialogContent
32
+ └── Command
33
+ ├── CommandInput
34
+ └── CommandList
35
+ └── ...
36
+ ```
37
+
38
+ ## When to use
39
+
40
+ - A command palette (⌘K-style) or any searchable action/option list where
41
+ the user types to narrow down results.
42
+ - Filtering and keyboard navigation (arrow keys, Enter, Home/End) should
43
+ come for free rather than being hand-rolled.
44
+
45
+ ## When not to use
46
+
47
+ - A fixed, short list of mutually exclusive options with no need to
48
+ search — use `select` or `radio-group`.
49
+ - A menu of actions anchored to a trigger button — use `dropdown-menu`.
50
+
51
+ ## Props
52
+
53
+ `Command` — passes through every [cmdk `Command`
54
+ prop](https://github.com/pacocoursey/cmdk#command) (`label`, `filter`,
55
+ `shouldFilter`, `value` / `onValueChange`, `loop`, `vimBindings`, ...) plus
56
+ `className`.
57
+
58
+ `CommandDialog` (extends `Dialog`'s props minus `children`):
59
+
60
+ | Prop | Type | Default |
61
+ |------|------|---------|
62
+ | `title` | `ReactNode` — visually hidden, gives the dialog its accessible name | `'Command Palette'` |
63
+ | `description` | `ReactNode` — visually hidden | `'Search for a command to run...'` |
64
+ | `showCloseButton` | `boolean` — see below | `false` |
65
+ | `className` | `string` — merged onto the popup | — |
66
+
67
+ `showCloseButton` defaults to `false` here (unlike `DialogContent`, which
68
+ defaults it to `true`) — a command palette already dismisses on Escape or
69
+ an outside click, the palette's one-line header has no spare room for an
70
+ X button next to the search input, and the missing built-in escape hatch
71
+ DialogContent's own docs warn about is moot: `CommandDialog` never sets
72
+ `modal={false}`, and while modal a touch screen reader can still dismiss
73
+ via the platform's own "read next"/gesture dismissal rather than needing
74
+ an in-popup close control. Pass `showCloseButton` explicitly to override
75
+ either default.
76
+
77
+ `CommandInput` — forwards every [cmdk `Command.Input`
78
+ prop](https://github.com/pacocoursey/cmdk#commandinput) (`value` /
79
+ `onValueChange`, `disabled`, standard `<input>` attributes), plus
80
+ `wrapperClassName` for the icon+input row.
81
+
82
+ `CommandGroup` — `heading` (`ReactNode`), `value`, `forceMount`, plus every
83
+ other [cmdk `Command.Group`
84
+ prop](https://github.com/pacocoursey/cmdk#commandgroup).
85
+
86
+ `CommandItem` — `value`, `onSelect`, `disabled`, `keywords`, `forceMount`,
87
+ plus every other [cmdk `Command.Item`
88
+ prop](https://github.com/pacocoursey/cmdk#commanditem). Preferably pass a
89
+ stable `value`; without one cmdk infers it from `children`'s text content,
90
+ which breaks if that text changes between renders.
91
+
92
+ ## Examples
93
+
94
+ ```tsx
95
+ import {
96
+ Command,
97
+ CommandEmpty,
98
+ CommandGroup,
99
+ CommandInput,
100
+ CommandItem,
101
+ CommandList,
102
+ CommandSeparator,
103
+ CommandShortcut,
104
+ } from '@gears-frontx/ui-kit';
105
+
106
+ <Command className="max-w-sm">
107
+ <CommandInput placeholder="Type a command or search..." />
108
+ <CommandList>
109
+ <CommandEmpty>No results found.</CommandEmpty>
110
+ <CommandGroup heading="Suggestions">
111
+ <CommandItem value="calendar">Calendar</CommandItem>
112
+ <CommandItem value="search-emoji">Search Emoji</CommandItem>
113
+ <CommandItem value="calculator">
114
+ Calculator
115
+ <CommandShortcut>⌘K</CommandShortcut>
116
+ </CommandItem>
117
+ </CommandGroup>
118
+ <CommandSeparator />
119
+ <CommandGroup heading="Settings">
120
+ <CommandItem value="profile">Profile</CommandItem>
121
+ </CommandGroup>
122
+ </CommandList>
123
+ </Command>;
124
+ ```
125
+
126
+ A palette opened from a keyboard shortcut:
127
+
128
+ ```tsx
129
+ import { useEffect, useState } from 'react';
130
+ import { CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from '@gears-frontx/ui-kit';
131
+
132
+ function CommandPalette() {
133
+ const [open, setOpen] = useState(false);
134
+
135
+ useEffect(() => {
136
+ function onKeyDown(event: KeyboardEvent) {
137
+ if (event.key === 'k' && (event.metaKey || event.ctrlKey)) {
138
+ event.preventDefault();
139
+ setOpen((value) => !value);
140
+ }
141
+ }
142
+ document.addEventListener('keydown', onKeyDown);
143
+ return () => document.removeEventListener('keydown', onKeyDown);
144
+ }, []);
145
+
146
+ return (
147
+ <CommandDialog open={open} onOpenChange={setOpen}>
148
+ <CommandInput placeholder="Type a command or search..." />
149
+ <CommandList>
150
+ <CommandEmpty>No results found.</CommandEmpty>
151
+ <CommandGroup heading="Suggestions">
152
+ <CommandItem value="new-file" onSelect={() => setOpen(false)}>
153
+ New file
154
+ </CommandItem>
155
+ </CommandGroup>
156
+ </CommandList>
157
+ </CommandDialog>
158
+ );
159
+ }
160
+ ```
161
+
162
+ ## Anti-patterns
163
+
164
+ - Do not render `CommandInput`/`CommandList`/`CommandItem` outside a
165
+ `Command` ancestor (directly under `CommandDialog`'s `children`, say) —
166
+ they read cmdk's internal store off `Command`'s own React context; there
167
+ is no fallback, and cmdk's own bundled dialog wraps children in exactly
168
+ this same root for the same reason.
169
+ - Do not use `Command`/`CommandDialog` for a short, non-searchable list —
170
+ the filtering/keyboard-navigation machinery is overhead a plain
171
+ `dropdown-menu` or `select` doesn't need.
@@ -0,0 +1,173 @@
1
+ # ContextMenu
2
+
3
+ A menu of actions triggered by right-click (or long-press) at the pointer,
4
+ rather than a click on a trigger element. Wraps the Base UI Context Menu
5
+ primitives, which reuse the same underlying Menu parts as `DropdownMenu` —
6
+ the popup is portalled, keyboard navigation (arrow keys, typeahead, roving
7
+ focus), and Escape/outside-press dismissal come from Base UI.
8
+
9
+ Composition: `ContextMenu` (root, holds open state) → `ContextMenuTrigger`
10
+ (wraps the right-clickable area) → `ContextMenuContent` (portals
11
+ `ContextMenuGroup` / `ContextMenuItem` / `ContextMenuCheckboxItem` /
12
+ `ContextMenuRadioGroup` + `ContextMenuRadioItem` / `ContextMenuSeparator` /
13
+ `ContextMenuShortcut`). `ContextMenuLabel` requires a `ContextMenuGroup` or
14
+ `ContextMenuRadioGroup` ancestor — Base UI throws if it is used outside one
15
+ (it looks up the group it labels from context). Nest a submenu with
16
+ `ContextMenuSub` → `ContextMenuSubTrigger` → `ContextMenuSubContent`.
17
+
18
+ ## When to use
19
+
20
+ - Actions scoped to a specific element the user right-clicks (a table row,
21
+ a canvas object, a file in a list).
22
+ - Mutually exclusive or independent toggles that live inside the menu
23
+ (`ContextMenuRadioItem`, `ContextMenuCheckboxItem`).
24
+
25
+ ## When not to use
26
+
27
+ - An action anchored to a visible, clickable trigger (a "more" button, an
28
+ avatar) — use `dropdown-menu` instead; a context menu's only entry point
29
+ is right-click/long-press.
30
+ - Picking one value from a list bound to a form field — use `select`.
31
+ - A focused task or confirmation that should block the page — use
32
+ `dialog`.
33
+
34
+ ## Props (kit level)
35
+
36
+ `ContextMenu` (root): `open` / `defaultOpen`, `onOpenChange` — see Base UI
37
+ Context Menu Root. Unlike `DropdownMenu`'s root, `modal` / `openOnHover` /
38
+ `delay` / `closeDelay` are not accepted — a context menu is always modal
39
+ and has no hover-open concept, it only opens from the trigger's
40
+ `contextmenu` event.
41
+
42
+ `ContextMenuTrigger`: renders a `<div>` that listens for the native
43
+ `contextmenu` (right-click) event and opens the menu anchored at the
44
+ pointer position — it is not a clickable trigger like
45
+ `DropdownMenuTrigger`; wrap whatever content the menu should apply to (a
46
+ table row, a canvas, a whole page section). Its own class only applies
47
+ `user-select: none`, so a right-click doesn't also drag-select the wrapped
48
+ content.
49
+
50
+ `ContextMenuContent` / `ContextMenuSubContent`:
51
+
52
+ | Prop | Type | Default |
53
+ |------|------|---------|
54
+ | `side` | `top` \| `bottom` \| `left` \| `right` \| `inline-start` \| `inline-end` | `right` (Content and SubContent) |
55
+ | `align` | `start` \| `center` \| `end` | `start` |
56
+ | `sideOffset` / `alignOffset` | `number` | `0` / `4` (Content and SubContent) |
57
+ | `container` | DOM node to portal the popup into; `ContextMenuSubContent` inherits the nearest Content's unless given its own | `<body>` |
58
+ | `positionMethod` | `absolute` \| `fixed` — pass `fixed` when the trigger sits inside a `transform`/`filter` container (an animated panel), where absolute positioning resolves against the wrong box | `absolute` |
59
+ | `collisionBoundary` / `collisionPadding` | see Base UI Menu.Positioner — bound and pad the flip/shift collision logic | viewport / `5` |
60
+ | `className` | `string` — merged after the kit class | — |
61
+
62
+ `ContextMenuContent`'s popup does not size to a trigger width the way
63
+ `DropdownMenuContent` does (`--anchor-width`): the menu anchors to a
64
+ virtual point (the pointer), not a real trigger element, so there is no
65
+ trigger box to match — it uses a fixed `min-width: 9rem` instead.
66
+ `ContextMenuSubContent` sizes to its own content with a smaller
67
+ `min-width: 8rem`, since a submenu's anchor is its own (usually narrow)
68
+ `ContextMenuSubTrigger` item. Both are floors, not widths: pass a `width`
69
+ (via `className` or `style`) when a menu should hold one fixed size
70
+ regardless of its longest label — the shortcut column is pushed to the end
71
+ of the row, so a content-sized popup leaves no gap between a label and its
72
+ shortcut.
73
+
74
+ The popup portals to `<body>` by default, so if your theme lives on a
75
+ subtree (`data-theme` on a section instead of `<html>`), pass that section
76
+ as `container` or the popup renders with the root theme — same contract as
77
+ `Dialog`, `Select`, and `DropdownMenu`.
78
+
79
+ `ContextMenuItem`: `variant` — `default` | `destructive`, `disabled`,
80
+ `closeOnClick` (`true` by default — Base UI closes the menu on selection),
81
+ `inset` — indents the item's text to align with a sibling item's text past
82
+ its leading icon column, for a menu that mixes icon and non-icon rows.
83
+ `ContextMenuLabel` and `ContextMenuSubTrigger` accept the same `inset`.
84
+
85
+ `ContextMenuCheckboxItem`: `checked` / `defaultChecked`,
86
+ `onCheckedChange`, `inset`; `ContextMenuRadioGroup` + `ContextMenuRadioItem`:
87
+ `value` / `defaultValue`, `onValueChange` on the group, `value` and `inset`
88
+ on each item — both leave `closeOnClick` at Base UI's default of `false` so
89
+ the menu stays open after a toggle. A selected radio row is marked with the
90
+ same check glyph as a checked checkbox row, not a dot; the group is what
91
+ makes the selection exclusive.
92
+
93
+ ### Icons and shortcuts inside a row
94
+
95
+ An `<svg>` placed inside `ContextMenuItem`, `ContextMenuCheckboxItem`,
96
+ `ContextMenuRadioItem`, or `ContextMenuSubTrigger` is sized to
97
+ `--icon-size-sm` and stopped from shrinking, so icons line up across rows
98
+ whatever their labels are — you do not have to size the icon yourself, and
99
+ an icon with no `width`/`height` of its own will not blow the row open.
100
+ Override by out-specifying that rule or setting the size inline.
101
+
102
+ `ContextMenuShortcut` pushes itself to the end of the row and renders in
103
+ `--muted-foreground`, turning `--accent-foreground` while the row is
104
+ highlighted. It is legal on a checkbox or radio row as well as a plain one:
105
+ those rows already reserve end padding for their indicator, so the shortcut
106
+ lands clear of it.
107
+
108
+ ## Examples
109
+
110
+ ```tsx
111
+ import {
112
+ ContextMenu,
113
+ ContextMenuCheckboxItem,
114
+ ContextMenuContent,
115
+ ContextMenuGroup,
116
+ ContextMenuItem,
117
+ ContextMenuLabel,
118
+ ContextMenuRadioGroup,
119
+ ContextMenuRadioItem,
120
+ ContextMenuSeparator,
121
+ ContextMenuShortcut,
122
+ ContextMenuSub,
123
+ ContextMenuSubContent,
124
+ ContextMenuSubTrigger,
125
+ ContextMenuTrigger,
126
+ } from '@gears-frontx/ui-kit';
127
+
128
+ <ContextMenu>
129
+ <ContextMenuTrigger>Right-click this area</ContextMenuTrigger>
130
+ <ContextMenuContent>
131
+ <ContextMenuGroup>
132
+ <ContextMenuLabel>Account</ContextMenuLabel>
133
+ <ContextMenuItem>
134
+ Profile
135
+ <ContextMenuShortcut>⇧⌘P</ContextMenuShortcut>
136
+ </ContextMenuItem>
137
+ </ContextMenuGroup>
138
+ <ContextMenuSeparator />
139
+ <ContextMenuCheckboxItem checked={showBookmarks} onCheckedChange={setShowBookmarks}>
140
+ Show bookmarks
141
+ </ContextMenuCheckboxItem>
142
+ <ContextMenuSeparator />
143
+ <ContextMenuRadioGroup value={view} onValueChange={setView}>
144
+ <ContextMenuRadioItem value="list">List view</ContextMenuRadioItem>
145
+ <ContextMenuRadioItem value="grid">Grid view</ContextMenuRadioItem>
146
+ </ContextMenuRadioGroup>
147
+ <ContextMenuSeparator />
148
+ <ContextMenuSub>
149
+ <ContextMenuSubTrigger>More tools</ContextMenuSubTrigger>
150
+ <ContextMenuSubContent>
151
+ <ContextMenuItem>Extensions</ContextMenuItem>
152
+ </ContextMenuSubContent>
153
+ </ContextMenuSub>
154
+ <ContextMenuSeparator />
155
+ <ContextMenuItem variant="destructive" onClick={handleDelete}>
156
+ Delete
157
+ </ContextMenuItem>
158
+ </ContextMenuContent>
159
+ </ContextMenu>
160
+ ```
161
+
162
+ ## Anti-patterns
163
+
164
+ - Do not use `ContextMenu` as a substitute for a visible, discoverable
165
+ trigger — right-click/long-press has no visual affordance, so any action
166
+ a user needs to find without already knowing it exists belongs in
167
+ `DropdownMenu` instead.
168
+ - Do not put `ContextMenuCheckboxItem` / `ContextMenuRadioItem` directly
169
+ under `ContextMenuContent` when they represent a bound single-select
170
+ value elsewhere in the app — use `select` or `radio-group` for form
171
+ state instead.
172
+ - Do not nest more than one level of `ContextMenuSub` — deep submenu
173
+ chains are hard to navigate with a mouse or keyboard.
@@ -0,0 +1,183 @@
1
+ # DataTable
2
+
3
+ A sortable, paginated, optionally row-selectable table built on the kit's
4
+ own `Table` (`../table`) and [`@tanstack/react-table`](https://tanstack.com/table).
5
+
6
+ ## Deviation from upstream
7
+
8
+ Unlike every other port in this batch, upstream shadcn/ui ships **no**
9
+ `data-table.tsx` registry item — [the Data Table
10
+ doc](https://ui.shadcn.com/docs/components/base/data-table) is explicitly a
11
+ guide, not a component: "instead of a data-table component, I thought it
12
+ would be more helpful to provide a guide on how to build your own." This
13
+ port productizes that guide into a real, reusable `DataTable` component,
14
+ per this task's own brief — the recipe's shape stays recognizable
15
+ (`<DataTable columns={columns} data={data} />`, `ColumnDef`s built with a
16
+ column helper, `Table`/`TableHeader`/`TableBody`/... underneath), but three
17
+ pieces of hand-written boilerplate the guide repeats at every call site are
18
+ shipped as reusable exports instead:
19
+
20
+ - `dataTableFeatures` / `DataTableFeatures` — the guide's own "Set up Table
21
+ Features" step has the consumer write a `data-table-features.ts` module
22
+ once per app and share its `TFeatures` type across every column-def file.
23
+ The kit ships this once, and `dataTableColumnHelper()` is
24
+ `createColumnHelper<DataTableFeatures, TData>()` pre-bound to it.
25
+ - `dataTableSelectionColumn()` — the guide's "Row Selection" step
26
+ hand-writes a `select` display column with shadcn's `Checkbox` in its
27
+ `header`/`cell`. Same column def, built with the kit's `Checkbox`,
28
+ available as one call. Its checkboxes are icon-only, so their accessible
29
+ names are the whole label: override them with
30
+ `dataTableSelectionColumn({ selectAllLabel, selectRowLabel })` (default
31
+ `'Select all'` / `'Select row'`).
32
+ - `DataTableSortButton` — the guide's "Sorting" step hand-writes a ghost
33
+ `Button` + arrow icon toggling `column.toggleSorting` inline in a
34
+ column's `header`. Generalized into one reusable piece.
35
+
36
+ ## Chrome
37
+
38
+ `Table` stays primitive markup with no chrome of its own; `DataTable` is
39
+ where the Studio Data Table frame's card lives. One element wraps the whole
40
+ widget: a 1px `--border` on `--surface` at `--radius-lg`, with the table's
41
+ rows above and the pagination bar **inside** it — the frame draws that bar
42
+ within the same bordered container, separated from the last row by the same
43
+ rule that separates any two rows, not floating below the card as the
44
+ upstream recipe's utilities left it.
45
+
46
+ The card deliberately does **not** clip (`overflow` stays visible). Nothing
47
+ needs it — a row can never reach a rounded corner, since the header bar is
48
+ always above the body and the footer bar always below it — and clipping cost
49
+ the focus ring on the footer's own buttons.
50
+
51
+ `DataTableSortButton` gives up Button's own type role and inherits the
52
+ header cell's instead (mono, uppercase, `--subtle-foreground`), so a
53
+ sortable column reads identically to an unsortable one plus its direction
54
+ icon. Note that `text-transform` has to be inherited back explicitly there:
55
+ the UA stylesheet sets `text-transform: none` on every `<button>`, which
56
+ beats ordinary inheritance.
57
+
58
+ Scope is deliberately narrower than the full guide: **column defs,
59
+ sorting, row selection, and pagination** only — no column filtering, no
60
+ column-visibility toggling, no row actions dropdown, no virtualization, no
61
+ column resizing. Each of those is itself a whole guide section the upstream
62
+ doc treats as separable; nothing here stops a consumer building any of them
63
+ directly against the `table` instance TanStack Table itself exposes (this
64
+ component doesn't hide it — see "Escape hatch" below), but `DataTable`
65
+ doesn't wire them up automatically.
66
+
67
+ **TanStack Table v9 API note:** the pinned `@tanstack/react-table@9.1.2` is
68
+ a from-scratch rewrite of v8's `useReactTable` — tree-shakeable features
69
+ declared with `tableFeatures()`, `useTable()` instead of `useReactTable()`,
70
+ row models built with `create*RowModel()` instead of passed in as
71
+ `get*RowModel()` options. `DataTable` is built against this real v9 shape
72
+ (verified against the package's own shipped `.d.ts` files, not assumed from
73
+ v8 familiarity) — a `useLegacyTable` v8-compatibility hook also ships in
74
+ this version but is intentionally not used here, since `DataTable` is new
75
+ code, not a migration.
76
+
77
+ ## When to use
78
+
79
+ - Tabular data with more rows than fit comfortably on one screen, where
80
+ the user needs to sort a column, select rows for a bulk action, or page
81
+ through results.
82
+
83
+ ## When not to use
84
+
85
+ - A short, static list with no sorting/paging/selection need — use
86
+ `Table`'s parts directly (see `../table`).
87
+ - Anything needing filtering, column visibility toggling, grouping,
88
+ expansion, or virtualization — build directly against `useTable` (see
89
+ "Escape hatch" below); `DataTable` does not wire these up.
90
+
91
+ ## Props
92
+
93
+ | Prop | Type | Default |
94
+ |------|------|---------|
95
+ | `columns` | `ColumnDef<DataTableFeatures, TData>[]` | required |
96
+ | `data` | `TData[]` | required |
97
+ | `pageSize` | `number` — live, not just a starting value: change it and the table repaginates, keeping the current rows in view | `10` |
98
+ | `enableRowSelection` | `boolean` — see below | `false` |
99
+ | `emptyMessage` | `ReactNode` — content of the one row spanning every column when `data` is empty | `'No results.'` |
100
+ | `previousLabel` / `nextLabel` | `ReactNode` — the pagination buttons' labels | `'Previous'` / `'Next'` |
101
+ | `selectionSummary` | `(selected: number, total: number) => ReactNode` — the footer's selection sentence | `` `${selected} of ${total} row(s) selected.` `` |
102
+ | `className` | `string` — on the card (the outermost element) | — |
103
+
104
+ Every string this component renders on its own is one of the props above,
105
+ so a non-English table needs no fork: `previousLabel`/`nextLabel` and
106
+ `emptyMessage` are plain nodes, and `selectionSummary` is a function
107
+ because it counts things — a language with more than one plural form
108
+ cannot be served by substituting numbers into a fixed template. The
109
+ checkbox column's own two labels are `dataTableSelectionColumn`'s
110
+ arguments: `dataTableSelectionColumn({ selectAllLabel, selectRowLabel })`.
111
+
112
+ `enableRowSelection` gates two independent things: the table option that
113
+ lets rows actually be selected, and whether the footer's "N of M row(s)
114
+ selected." text renders at all. It does **not** inject a checkbox column —
115
+ include `dataTableSelectionColumn()` in `columns` yourself (see below).
116
+ This split matches the guide's own treatment of `state.rowSelection` and
117
+ the `select` column def as two separate steps a consumer can adopt
118
+ independently.
119
+
120
+ ## Building columns
121
+
122
+ ```tsx
123
+ import {
124
+ DataTable,
125
+ dataTableColumnHelper,
126
+ dataTableSelectionColumn,
127
+ DataTableSortButton,
128
+ } from '@gears-frontx/ui-kit';
129
+
130
+ type Payment = {
131
+ id: string;
132
+ amount: number;
133
+ status: 'pending' | 'processing' | 'success' | 'failed';
134
+ email: string;
135
+ };
136
+
137
+ const columnHelper = dataTableColumnHelper<Payment>();
138
+
139
+ // `.columns([...])`, not a bare array literal — its variadic tuple
140
+ // inference keeps each column's own TValue instead of widening the whole
141
+ // array to a shared supertype (see createColumnHelper's own doc comment).
142
+ const columns = columnHelper.columns([
143
+ dataTableSelectionColumn<Payment>(),
144
+ columnHelper.accessor('status', { header: 'Status' }),
145
+ columnHelper.accessor('email', {
146
+ header: ({ column }) => <DataTableSortButton column={column}>Email</DataTableSortButton>,
147
+ }),
148
+ columnHelper.accessor('amount', {
149
+ header: 'Amount',
150
+ cell: ({ getValue }) =>
151
+ new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(getValue()),
152
+ }),
153
+ ]);
154
+
155
+ function PaymentsTable({ data }: { data: Payment[] }) {
156
+ return <DataTable columns={columns} data={data} enableRowSelection />;
157
+ }
158
+ ```
159
+
160
+ A display column not built through `dataTableSelectionColumn()` (a "row
161
+ actions" dropdown menu, say) is still a plain `columnHelper.display({...})`
162
+ — the same shape the upstream guide's own "Row Actions" section shows,
163
+ composing `DropdownMenu` and reading `row.original` in the cell function.
164
+
165
+ ## Escape hatch
166
+
167
+ `DataTable` does not hide TanStack Table — every `ColumnDef` and the
168
+ `table` instance it builds from `columns`/`data` behave exactly as
169
+ `@tanstack/react-table`'s own docs describe. Anything the guide covers that
170
+ this component doesn't wire up (filtering, column visibility, row
171
+ actions, manual/server-side pagination) is a matter of building your own
172
+ component the same way `DataTable`'s own source does — reuse
173
+ `dataTableFeatures`/`dataTableColumnHelper` for a consistent `TFeatures`
174
+ type, or register a different `tableFeatures()` set entirely for a table
175
+ that needs filtering too.
176
+
177
+ ## Anti-patterns
178
+
179
+ - Do not pass a `columns` array whose defs mix `DataTableFeatures` with
180
+ another features object's column defs — every `ColumnDef` in one table
181
+ must share the same `TFeatures` type parameter.
182
+ - Do not rely on `enableRowSelection` alone to show checkboxes — it only
183
+ gates selectability and the footer count; the column itself is opt-in.
@@ -0,0 +1,137 @@
1
+ # DatePicker
2
+
3
+ A field that opens a `Calendar` in a `Popover` to pick a day or a range.
4
+
5
+ ## Upstream is a recipe, not a component — this is a deviation
6
+
7
+ shadcn/ui ships this as a documentation recipe
8
+ ([date-picker.mdx](https://ui.shadcn.com/docs/components/base/date-picker)),
9
+ not a registry item: "A date picker is built from `Popover` and `Calendar`
10
+ — there is no `DatePicker` root component." The doc shows five hand-rolled
11
+ variants (a plain trigger, a range trigger, a dropdown-caption date-of-birth
12
+ variant, a typed-input variant, a time variant) that a consumer copies and
13
+ adapts per use.
14
+
15
+ This port productizes the recipe into one real, importable component
16
+ instead: `DatePicker` keeps the recipe's own prop names (`selected`,
17
+ `onSelect`, `mode`, `captionLayout`) so the composition is recognizable to
18
+ anyone who has read the upstream doc, but a consumer imports it rather than
19
+ re-copying the Popover/Calendar/Button wiring for every date field in an
20
+ app. See "Deviations from upstream" below for what the productization
21
+ narrows or drops relative to the doc's five variants.
22
+
23
+ ## When to use
24
+
25
+ - A form field or filter where the value is a single day or a date range
26
+ and a grid picker is the intended input method, not free typing.
27
+ - Reach for `Calendar` directly instead when the calendar should sit inline
28
+ on the page (a dashboard's own date panel) rather than behind a trigger.
29
+
30
+ ## Props
31
+
32
+ `mode` discriminates `selected`/`onSelect`'s type, mirroring `Calendar`'s
33
+ own `DayPicker` underneath:
34
+
35
+ | Prop | Type | Default |
36
+ |------|------|---------|
37
+ | `mode` | `single` \| `range` | `single` |
38
+ | `selected` | `Date \| undefined` (single) or `DateRange \| undefined` (range) | — (required) |
39
+ | `onSelect` | `(value) => void`, typed to match `selected` | — (required) |
40
+ | `variant` | `button` \| `input` — **single mode only**, see below | `button` |
41
+ | `placeholder` | `string` | `'Pick a date'` |
42
+ | `captionLayout` | `label` \| `dropdown` \| `dropdown-months` \| `dropdown-years` — forwarded to `Calendar` | `label` |
43
+ | `numberOfMonths` | `number` — **range mode only** | `2` |
44
+ | `closeOnSelect` | `boolean` — close the popover once a day is picked | `true` (single) / `false` (range) |
45
+ | `disabled` | `Calendar`'s own `disabled` matcher | — |
46
+ | `locale` | date-fns `Locale` — the month grid, the trigger label, AND the `input` variant's formatting and parsing | date-fns' default (en-US) |
47
+ | `openCalendarLabel` | `string` — accessible name for the `input` variant's calendar button | `'Open calendar'` |
48
+ | `open` / `defaultOpen` / `onOpenChange` | `Popover`'s own open-state props | — |
49
+ | `container` | Portal container, forwarded to `PopoverContent` | — |
50
+ | `className` / `id` / `aria-label` | Forwarded to the trigger (`button` variant) or the field (`input` variant) | — |
51
+
52
+ `variant`'s two values map to two of upstream's five recipe flavors:
53
+
54
+ - `button` (default) — upstream's date-picker-demo/-basic/-dob recipes: a
55
+ `Button` trigger showing the formatted date (`date-fns`'s `PPP`/
56
+ `LLL dd, y` formats), or the placeholder in `--muted-foreground` when
57
+ empty.
58
+ - `input` — upstream's date-picker-input recipe: a free-typed `Input` with
59
+ a calendar-icon `Button` in its `end` slot (see input.md's slot docs).
60
+ The field accepts one format, the one it displays — a full
61
+ `"June 01, 2025"` (long month, day, four-digit year, in `locale`) — and
62
+ commits only when what is typed is a complete, real date in it. Nothing
63
+ reaches `onSelect` on the way there. `ArrowDown` opens the calendar
64
+ without reaching for the trailing button.
65
+
66
+ ## Definition of done
67
+
68
+ - **Single mode**: one day selected, trigger/field reflects it, `Calendar`
69
+ opens on the month containing the selection.
70
+ - **Range mode**: `numberOfMonths={2}` by default so both the start and end
71
+ month are visible without navigating; the trigger shows
72
+ `"{from} - {to}"` once both ends are picked, just the start date while
73
+ only `from` is set, and the placeholder while empty.
74
+ - **Dropdown caption**: `captionLayout="dropdown"` reproduces upstream's
75
+ date-of-birth recipe — pass it through untouched, `Calendar` does the
76
+ rest (see calendar.md).
77
+ - **Typed input**: the `input` variant's text buffer is independent of the
78
+ committed `selected` value, so typing is never reverted or reformatted
79
+ under the caret — but it resyncs automatically when `selected` changes
80
+ from OUTSIDE the field (an external reset, a value arriving late).
81
+ - **Visible month follows the selection.** Opening the popover lands on
82
+ the month of the current `selected` (the range's start, in range mode),
83
+ including a selection that arrived after mount; the user's own month
84
+ navigation then takes over until `selected` changes again.
85
+ - **Popover chrome**: the calendar sits in a padding-free popup (upstream's
86
+ `className="w-auto p-0"`) — `Calendar` supplies its own spacing, so
87
+ `Popover`'s own default padding would double up with it.
88
+
89
+ ## Examples
90
+
91
+ ```tsx
92
+ import { DatePicker } from '@gears-frontx/ui-kit';
93
+
94
+ // Single date, button trigger (the default)
95
+ const [date, setDate] = useState<Date>();
96
+ <DatePicker selected={date} onSelect={setDate} />
97
+
98
+ // Typed field with a calendar-icon affordance
99
+ <DatePicker variant="input" selected={date} onSelect={setDate} placeholder="June 01, 2025" />
100
+
101
+ // Date range, two months
102
+ const [range, setRange] = useState<DateRange>();
103
+ <DatePicker mode="range" selected={range} onSelect={setRange} />
104
+
105
+ // Date of birth: dropdown month/year navigation, closes on pick
106
+ <DatePicker
107
+ selected={date}
108
+ onSelect={setDate}
109
+ captionLayout="dropdown"
110
+ placeholder="Select date"
111
+ />
112
+ ```
113
+
114
+ ## Deviations from upstream
115
+
116
+ - **One component, not five copy-pasted recipes.** `mode` and `variant`
117
+ cover four of upstream's five flavors (demo/basic, range, dob, input);
118
+ the fifth (a natural-language `chrono-node` parser) is out of scope —
119
+ it is a third-party NLP dependency, and no other kit component pulls in
120
+ a parsing library for one input mode.
121
+ - **`variant="input"` is single-mode only** — no ranged free-typed field
122
+ is productized, since upstream's own recipe set has no such example to
123
+ port from (its input recipe is single-date).
124
+ - **The typed-input parse is strict where upstream's is not.** Upstream's
125
+ recipe reads the field with `new Date(string)`, which accepts far more
126
+ than the format it displays and invents the rest: a half-typed
127
+ `"June 7"` is a valid Date to V8 — June 7th of 2001 — so every prefix
128
+ on the way to a real date commits a different wrong year. This port
129
+ parses the display format with `date-fns` instead and commits nothing
130
+ until the whole of it is there, four-digit year included. Same accepted
131
+ format (`"June 01, 2025"`, now localized by `locale`), no guessing.
132
+ - **No `Field`/`FieldLabel` wrapper.** Upstream's basic/range/dob recipes
133
+ wrap the whole picker in a `Field` with a fixed width and a label; this
134
+ component is the picker alone; a consumer wires its own `Field`
135
+ composition around it exactly the way `Input`/`Select` expect, rather
136
+ than `DatePicker` hard-coding one label pattern (`Field`'s own port has
137
+ no automatic label wiring either — see field.md).