@gears-frontx/ui-kit 0.3.0-alpha.2 → 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 +37 -0
  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 +33 -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 -129
  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 +55 -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 -18
  479. package/package.json +16 -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
@@ -111,6 +111,39 @@ long unbroken string, an image — either wrap in an element with
111
111
  unbreakable strings). Widening the dialog itself is a `className` width on
112
112
  `DialogContent`, not something to fix from the child.
113
113
 
114
+ ## Scrolling content
115
+
116
+ `DialogHeader` and `DialogFooter` are `position: sticky` (top / bottom)
117
+ with an opaque background matching the popup, by default. That covers two
118
+ shapes:
119
+
120
+ - A consumer-wrapped middle region (`overflow-y: auto` on a child div
121
+ between header and footer, as in the "Scrollable content" example) -
122
+ the popup itself never needs to scroll, so the sticky positioning is
123
+ inert and simply does nothing.
124
+ - Long content dropped in unwrapped (as in the "Sticky footer" example) -
125
+ `DialogContent`'s own `max-height` + `overflow-y: auto` becomes the
126
+ scroll container (see "Wide content" above for the matching horizontal
127
+ case), and header/footer stay pinned at the top/bottom of it, masking
128
+ whatever scrolls underneath. No inline `background` or `position` prop
129
+ needed on `DialogFooter` for this - it is the built-in behavior.
130
+
131
+ For the mask to be complete, `DialogContent` itself carries no padding:
132
+ the inset lives on its direct children instead (side inset on every child,
133
+ top inset on the first, bottom inset on the last), so header and footer
134
+ span the popup's full width and reach its top and bottom edges. A scroll
135
+ container's padding would not have worked - it does not clip content
136
+ (overflow clips at the padding box) and sticky offsets resolve against the
137
+ scrollport already inset by it, so scrolled text stayed visible in the
138
+ strips beside and beyond the pinned regions.
139
+
140
+ This matters when you style children of `DialogContent`: a `className`
141
+ that sets `padding` on `DialogHeader`, `DialogFooter`, or on a middle
142
+ region overrides that inset rather than adding to it (the kit rule is
143
+ deliberately held at single-class weight so your class can win), and a
144
+ full-width child such as a divider or a banner reaches the popup edges by
145
+ zeroing its own `padding-inline`.
146
+
114
147
  ## Anti-patterns
115
148
 
116
149
  - Do not nest interactive page content's focus expectations across the
@@ -0,0 +1,51 @@
1
+ # Direction
2
+
3
+ A thin re-export of Base UI's `DirectionProvider` and `useDirection` — no
4
+ styling surface, no variants, no kit-authored logic. Renders no DOM element
5
+ of its own (a bare `React.Context.Provider`); it exists so RTL-aware Base UI
6
+ primitives (`Slider`, `Menu`, `Select`, `NavigationMenu`, ...) read a shared
7
+ reading direction instead of needing it passed to each one individually.
8
+
9
+ ## When to use
10
+
11
+ - Mount once near the root of an app (or a subtree) that renders in a
12
+ right-to-left language, wrapping every Base UI-backed control that should
13
+ follow it.
14
+ - Skip entirely for an LTR-only app — every kit component already defaults
15
+ to `ltr` behavior with no `DirectionProvider` mounted at all.
16
+
17
+ ## Props
18
+
19
+ | Prop | Type | Default |
20
+ |------|------|---------|
21
+ | `direction` | `'ltr'` \| `'rtl'` | `'ltr'` |
22
+ | `children` | `ReactNode` | — |
23
+
24
+ `useDirection()` reads the nearest ancestor `DirectionProvider`'s
25
+ `direction`, falling back to `'ltr'` with none mounted.
26
+
27
+ ## Examples
28
+
29
+ ```tsx
30
+ import { DirectionProvider, useDirection } from '@gears-frontx/ui-kit';
31
+
32
+ <DirectionProvider direction="rtl">
33
+ <App />
34
+ </DirectionProvider>;
35
+
36
+ // Inside a descendant, anywhere:
37
+ function App() {
38
+ const direction = useDirection();
39
+ return <div dir={direction}>...</div>;
40
+ }
41
+ ```
42
+
43
+ ## Anti-patterns
44
+
45
+ - Do not mount more than one `DirectionProvider` per direction change you
46
+ need — a single provider at the boundary where the direction actually
47
+ changes is enough; every Base UI primitive below it inherits the value.
48
+ - Do not expect this component to set the DOM `dir` attribute anywhere —
49
+ it only shares a value through context. Set `dir` on your own root
50
+ element (see the `useDirection` example above) if you need the browser's
51
+ own bidi algorithm applied too.
@@ -0,0 +1,242 @@
1
+ # Drawer
2
+
3
+ An edge-anchored panel that opens with — and can be dismissed by — a swipe
4
+ gesture, in addition to the usual trigger/Escape/outside-press paths. Wraps
5
+ Base UI's dedicated `@base-ui/react/drawer` primitive (upstream shadcn/ui
6
+ dropped the third-party `vaul` library for this component in favor of it).
7
+ Unlike `sheet` (built on the same Dialog primitive `dialog` is, with a
8
+ CSS-only slide transition and no gesture), Drawer's slide, the "peeking
9
+ stack" look for nested drawers, and swipe-release momentum are all driven
10
+ live by custom properties Base UI itself writes during the gesture — see
11
+ "Swipe mechanics" below.
12
+
13
+ Composition: `Drawer` (root, holds open state, translates the kit's `side`
14
+ prop to Base UI's own `swipeDirection`) → `DrawerTrigger` → `DrawerContent`
15
+ (portals `DrawerBackdrop` conditionally, `DrawerHeader` / `DrawerFooter` /
16
+ `DrawerTitle` / `DrawerDescription` / consumer content, and an optional
17
+ `DrawerSwipeHandle`) → optional `DrawerClose` for a consumer-composed close
18
+ action.
19
+
20
+ ## When to use
21
+
22
+ - A focused task, form, or detail view that benefits from a touch-native,
23
+ swipe-to-dismiss interaction — a mobile-style bottom sheet, a filter panel
24
+ a user can flick away.
25
+ - Content anchored to a screen edge where the drawer's own drag/release
26
+ physics (not just a CSS transition) are part of the intended feel.
27
+
28
+ ## When not to use
29
+
30
+ - The same edge-anchored panel shape without gesture dismissal — use
31
+ `sheet`, which is lighter (no swipe-tracking runtime cost) and shares the
32
+ identical `side` vocabulary and `Header`/`Footer`/`Title`/`Description`
33
+ composition.
34
+ - A centered, page-blocking confirmation or short prompt — use `dialog`.
35
+ - Menus of actions anchored to a trigger — use `dropdown-menu`.
36
+ - Single-line contextual hints — use `tooltip`.
37
+
38
+ ## Props (kit level)
39
+
40
+ `Drawer` (root): `open` / `defaultOpen`, `onOpenChange`, `modal` (`true`
41
+ default; `false`; `'trap-focus'`), `snapPoints` / `snapPoint` /
42
+ `defaultSnapPoint` / `onSnapPointChange` / `snapToSequentialPoints` — see
43
+ Base UI `Drawer.Root`. Plus:
44
+
45
+ | Prop | Type | Default |
46
+ |------|------|---------|
47
+ | `side` | `'top' \| 'right' \| 'bottom' \| 'left'` — which viewport edge the drawer opens from and swipes back out toward | `'bottom'` |
48
+ | `showSwipeHandle` | `boolean` — renders a small `aria-hidden` grab-handle bar at the panel's innermost edge | `false` |
49
+
50
+ `side` is this port's own renaming of Base UI's `swipeDirection` prop
51
+ (`'up' \| 'down' \| 'left' \| 'right'`, the direction a dismiss swipe
52
+ travels) to match `sheet`'s own edge-anchored vocabulary — a straight 1:1
53
+ map (`down`↔`bottom`, `up`↔`top`, left/right unchanged), not a new axis:
54
+ dismissing a bottom-anchored drawer is always a downward swipe, so naming
55
+ the prop after the edge reads more intuitively without losing any
56
+ distinction Base UI itself draws. `Drawer` does not accept `swipeDirection`
57
+ directly — pass `side` instead.
58
+
59
+ `DrawerContent`:
60
+
61
+ | Prop | Type | Default |
62
+ |------|------|---------|
63
+ | `container` | DOM node to portal the popup into | `<body>` |
64
+ | `initialFocus` / `finalFocus` | `boolean \| RefObject \| function` — see Base UI `Drawer.Popup` | default focus behavior |
65
+ | `className` | `string` — merged after the kit class | — |
66
+
67
+ `side` and `showSwipeHandle` are read from the ancestor `Drawer`, not passed
68
+ to `DrawerContent` directly — same context-based handoff upstream's own
69
+ fetched source uses (`Drawer`/`DrawerContent` are siblings in the JSX tree,
70
+ not parent/child, so this is how `DrawerContent` learns which edge without
71
+ prop-drilling through whatever markup sits between them).
72
+
73
+ **No `showCloseButton`/`closeLabel`/`showBackdrop` props** — a deliberate
74
+ divergence from `dialog`/`sheet`, not an oversight; see "Accessibility gap"
75
+ below.
76
+
77
+ `DrawerTrigger`, `DrawerClose`, and `DrawerPortal` are unstyled pass-throughs
78
+ — compose `DrawerTrigger`/`DrawerClose` with `Button` via their `render`
79
+ prop for a styled trigger or close action.
80
+
81
+ ## Swipe mechanics
82
+
83
+ The slide/dismiss animation is driven by custom properties Base UI's own
84
+ `Drawer.Viewport`/`Drawer.Popup` write directly onto the DOM during a live
85
+ gesture (`--drawer-swipe-movement-x`/`-y`, `--drawer-swipe-progress`,
86
+ `--drawer-swipe-strength`, `--nested-drawers`, plus the measured
87
+ `--drawer-height`/`--drawer-frontmost-height`/`--drawer-snap-point-offset`)
88
+ — all of these are listed in `tokens.test.ts`'s `BASE_UI_RUNTIME_VARS`
89
+ exemption list, which is what keeps them out of that file's
90
+ "theme-defined or same-part local variables only" guard.
91
+
92
+ The enter/exit slide itself is a plain CSS transition between the
93
+ `[data-starting-style]`/`[data-ending-style]` transform (`--closed-transform`,
94
+ the panel parked one full panel-length past its own edge) and the resting
95
+ transform on `.popup`. Measured on the demo at a 900x513 viewport, a bottom
96
+ drawer travels `y: 515 → 308` on open and `308 → 515` on close, a right one
97
+ `x: 902 → 516` and back — monotonic, with the backdrop's opacity crossing
98
+ `0 → 1` on the same curve. Nominal duration is upstream's own
99
+ `450ms cubic-bezier(0.22, 1, 0.36, 1)` for the enter and
100
+ `calc(--drawer-swipe-strength * 400ms)` for the exit; because that curve
101
+ front-loads the motion, ~90% of the travel lands inside the first ~180ms.
102
+
103
+ `--drawer-inset` is the consumer-facing hook for insetting the panel from
104
+ its edge, and **any override must carry a unit** — `1rem`, or `0px` for
105
+ none, never a bare `0`. It is substituted into `--closed-transform`'s
106
+ `calc()`, where a unitless number added to a length is a type error: the
107
+ custom property then becomes invalid at computed-value time, `transform`
108
+ falls back to `none`, and both the enter and the exit slide disappear while
109
+ the backdrop keeps fading — which reads as the animation running backwards
110
+ rather than as a missing animation. `drawer.test.tsx` guards the values this
111
+ file itself declares; an override is only reachable by this rule.
112
+
113
+ Direction-specific geometry (`bottom: 0` / `transform-origin` /
114
+ `--closed-transform` / the swipe-driven `--translate-x`/`-y` math) is keyed
115
+ to Base UI's own `data-swipe-direction` attribute, not to the kit's `side`
116
+ class — that attribute is what Base UI itself keeps in sync with live
117
+ `swipeDirection` state, so it's the only mechanism guaranteed correct if a
118
+ consumer changes `side` on an already-mounted `Drawer` without a remount.
119
+ The kit's own `.sideTop`/`.sideRight`/`.sideBottom`/`.sideLeft` classes (via
120
+ `side`, mirroring `sheet`'s identical convention) instead own only the
121
+ static, prop-time visual choice a runtime attribute doesn't need to encode:
122
+ which edge's border is re-enabled (the popup's own border starts at `0`
123
+ width on every side — the OUTER edge sits flush against the viewport
124
+ boundary, where a border would be invisible at best).
125
+
126
+ Under `prefers-reduced-motion: reduce`, the popup's `transform`/`height`/
127
+ `filter` transitions are suppressed and only `opacity` survives — same
128
+ split as `dialog`/`toast`. Unlike those two, Drawer's own opacity carries no
129
+ independent visual signal here (the only opacity value the upstream source
130
+ ever sets is an imperceptible `0.9999` Safari-repaint nudge during exit), so
131
+ in practice a reduced-motion user sees the panel snap directly between open
132
+ and closed with no visible animation — the WCAG 2.3.3-compliant outcome,
133
+ via the same code shape as every other kit popup rather than a special-cased
134
+ `transition: none`.
135
+
136
+ ## Body positioning
137
+
138
+ Base UI's Drawer primitive does not require any global `body`/`html` rule
139
+ to compute its own transforms correctly — this differs from some other
140
+ swipe-driven drawer libraries (vaul among them) that need a `body { position:
141
+ relative }`-style rule so their own translate math resolves against the
142
+ right containing block. Base UI's Drawer positions and transforms entirely
143
+ through `position: fixed` plus its own measured/written custom properties
144
+ (see "Swipe mechanics" above), independent of the page's own `body`
145
+ positioning — verified against the primitive's shipped source
146
+ (`node_modules/@base-ui/react/drawer/viewport/DrawerViewport.mjs` and
147
+ `popup/DrawerPopup.mjs`), which reads/writes only drawer-local refs and
148
+ custom properties, never anything computed from `document.body`'s box. No
149
+ global CSS is needed (and the kit's CSS Modules build could not add one
150
+ regardless) — a consumer moving from a vaul-based drawer that DID carry such
151
+ a global rule can drop it once every drawer on the page is this component.
152
+
153
+ ## Accessibility gap (raised, not silently patched)
154
+
155
+ `dialog` and `sheet` both render a built-in close (X) button by default,
156
+ because Base UI's own docs require a `*.Close` inside a modal `*.Popup` as
157
+ the one touch-screen-reader escape hatch out of a focus-trapped modal.
158
+ Drawer's popup uses the identical `FloatingFocusManager`-based modal trap
159
+ (`modal={modal !== false}`, verified in
160
+ `node_modules/@base-ui/react/drawer/popup/DrawerPopup.mjs`) — the same
161
+ underlying mechanism, so the same requirement plausibly applies. The
162
+ upstream shadcn source this port replicates, however, renders no such
163
+ button and exposes no `showCloseButton`/`closeLabel` prop at all; this port
164
+ stayed faithful to that exact shape rather than inventing a feature upstream
165
+ doesn't have. **Compose a `DrawerClose` inside `DrawerContent` yourself**
166
+ (a header or footer "Cancel"/"Done" button, as the example below does) until
167
+ this gap is resolved — one way or another — at the architecture level.
168
+
169
+ ## Examples
170
+
171
+ ```tsx
172
+ import {
173
+ Button,
174
+ Drawer,
175
+ DrawerClose,
176
+ DrawerContent,
177
+ DrawerDescription,
178
+ DrawerFooter,
179
+ DrawerHeader,
180
+ DrawerTitle,
181
+ DrawerTrigger,
182
+ } from '@gears-frontx/ui-kit';
183
+
184
+ <Drawer>
185
+ <DrawerTrigger render={<Button variant="outline" />}>Edit profile</DrawerTrigger>
186
+ <DrawerContent>
187
+ <DrawerHeader>
188
+ <DrawerTitle>Edit profile</DrawerTitle>
189
+ <DrawerDescription>Make changes to your profile here.</DrawerDescription>
190
+ </DrawerHeader>
191
+ <DrawerFooter>
192
+ <DrawerClose render={<Button variant="outline" />}>Cancel</DrawerClose>
193
+ <Button onClick={handleSave}>Save changes</Button>
194
+ </DrawerFooter>
195
+ </DrawerContent>
196
+ </Drawer>
197
+ ```
198
+
199
+ A side drawer with the grab handle shown:
200
+
201
+ ```tsx
202
+ <Drawer side="right" showSwipeHandle>
203
+ <DrawerTrigger render={<Button variant="outline" />}>Open</DrawerTrigger>
204
+ <DrawerContent>
205
+ <DrawerHeader>
206
+ <DrawerTitle>Filters</DrawerTitle>
207
+ </DrawerHeader>
208
+ </DrawerContent>
209
+ </Drawer>
210
+ ```
211
+
212
+ ## Side variants
213
+
214
+ `side` picks one of four edge anchors — same four values, same sizing
215
+ intent, as `sheet`'s own `side`:
216
+
217
+ - `top` — full width, height sized to content (capped at `calc(100dvh -
218
+ 6rem)`, scrollable past that), slides down from above.
219
+ - `right` — full height, 75% width capped at `24rem` from the 640px
220
+ breakpoint up, slides in from the right.
221
+ - `bottom` (default) — full width, height sized to content (capped and
222
+ scrollable, same as `top`), slides up from below.
223
+ - `left` — full height, 75% width capped at `24rem` from the 640px
224
+ breakpoint up, slides in from the left.
225
+
226
+ The popup is square (no `border-radius`) — the upstream base recipe class
227
+ supplying its actual visual chrome wasn't fetchable (see the CSS file's own
228
+ header comment), and `sheet.md` already established the kit's precedent for
229
+ that exact gap: stay unrounded rather than invent a value.
230
+
231
+ ## Anti-patterns
232
+
233
+ - Do not omit `DrawerTitle` — Base UI's accessibility tree needs it even if
234
+ visually hidden via `className`.
235
+ - Do not rely on `className`/CSS alone to change which edge the drawer
236
+ opens from — always set `side` on `Drawer` (the root); the swipe/dismiss
237
+ geometry is keyed to Base UI's own `data-swipe-direction` attribute, which
238
+ only `side` (via `swipeDirection`) actually drives.
239
+ - Do not use `Drawer` where `sheet`'s plain slide-in would do — the swipe
240
+ gesture and its runtime cost are the entire reason to reach for this
241
+ component over `sheet`; skip it for a panel nothing will ever drag.
242
+ - Do not use `Drawer` for a simple toast/notification — use `toast`.
@@ -0,0 +1,80 @@
1
+ # Empty
2
+
3
+ A placeholder for a list, table, or panel with nothing to show — "no
4
+ results", "no items yet", a first-run state. Empty has no Base UI
5
+ primitive: every part is a plain styled `div` with no interactive or
6
+ ARIA behavior of its own.
7
+
8
+ Composition: `Empty` (root) → `EmptyHeader` (→ `EmptyMedia`, `EmptyTitle`,
9
+ `EmptyDescription`) → `EmptyContent` (typically one or more actions).
10
+
11
+ ## When to use
12
+
13
+ - A table, list, or search result with zero rows.
14
+ - A first-run/onboarding panel before any data exists.
15
+
16
+ ## When not to use
17
+
18
+ - A loading state — use `Skeleton` or `Spinner` while data is in flight;
19
+ `Empty` is for the settled "there is genuinely nothing here" state.
20
+ - An error state with a retry action that isn't "no data" — a fetch
21
+ failure reads better as its own message than as `Empty`, though nothing
22
+ stops you from reusing the same parts for one.
23
+
24
+ ## Props (kit level)
25
+
26
+ `EmptyMedia`:
27
+
28
+ | Prop | Type | Default |
29
+ |------|------|---------|
30
+ | `variant` | `'default' \| 'icon'` — `icon` draws a muted rounded square behind the icon; `default` stays transparent | `'default'` |
31
+ | `className` | `string` — merged after the variant class | — |
32
+
33
+ `Empty`, `EmptyHeader`, `EmptyTitle`, `EmptyDescription`, and
34
+ `EmptyContent` take no kit-specific props — every prop is the underlying
35
+ native element's props (`EmptyDescription` renders a `<div>`, matching
36
+ upstream, despite its own props type naming `<p>` — see `empty.tsx`),
37
+ forwarded as-is.
38
+
39
+ ## Examples
40
+
41
+ ```tsx
42
+ import {
43
+ Button,
44
+ Empty,
45
+ EmptyContent,
46
+ EmptyDescription,
47
+ EmptyHeader,
48
+ EmptyMedia,
49
+ EmptyTitle,
50
+ } from '@gears-frontx/ui-kit';
51
+
52
+ <Empty>
53
+ <EmptyHeader>
54
+ <EmptyMedia variant="icon">
55
+ <SearchIcon />
56
+ </EmptyMedia>
57
+ <EmptyTitle>No results</EmptyTitle>
58
+ <EmptyDescription>Try a different search term or clear your filters.</EmptyDescription>
59
+ </EmptyHeader>
60
+ <EmptyContent>
61
+ <Button variant="outline" onClick={clearFilters}>Clear filters</Button>
62
+ </EmptyContent>
63
+ </Empty>
64
+
65
+ // A bare illustration, no icon chrome
66
+ <Empty>
67
+ <EmptyMedia>
68
+ <img src="/empty-inbox.svg" alt="" width={96} height={96} />
69
+ </EmptyMedia>
70
+ <EmptyTitle>Inbox zero</EmptyTitle>
71
+ </Empty>
72
+ ```
73
+
74
+ ## Anti-patterns
75
+
76
+ - Do not use `variant="icon"` for a full illustration/image — the muted
77
+ square is sized for a small glyph; drop to `variant="default"` (the
78
+ default) for anything larger, or omit `EmptyMedia` entirely.
79
+ - Do not put form controls needing `Field`'s label/error wiring inside
80
+ `EmptyContent` — it's for actions (buttons, links), not inputs.
@@ -1,68 +1,135 @@
1
1
  # Field
2
2
 
3
- A labelled form field. Wraps the Base UI Field primitives: `Field` (root)
4
- associates its `FieldLabel`, `FieldDescription`, `FieldError`, and the
5
- control inside it automatically — ids, `htmlFor`, and `aria-describedby`
6
- are wired for you, and validation state flows to every part via
7
- `data-invalid`/`data-disabled`.
8
-
9
- Kit controls (`Input`, `Textarea`, and Base UI-based controls like
10
- `Checkbox`, `Switch`, `RadioGroup`, `Select`) register themselves with the
11
- surrounding Field — no extra props needed.
3
+ A primitive-free, 10-part form-layout system — a faithful port of
4
+ [shadcn/ui's base Field](https://ui.shadcn.com/docs/components/base/field).
5
+ Nothing here is a Base UI primitive and nothing wires ids, `htmlFor`, or
6
+ `aria-describedby` automatically — you connect `FieldLabel`'s `htmlFor` to
7
+ the control's `id`, and a description/error's `id` to the control's
8
+ `aria-describedby`, by hand. That is the trade-off of this port: it buys
9
+ upstream's richer layout vocabulary (orientation, grouping, legends,
10
+ separators) at the cost of any automatic wiring.
11
+
12
+ ## Parts
13
+
14
+ - **`Field`** — the field root (`role="group"`). `orientation`:
15
+ `vertical` (default, stacked), `horizontal` (label beside control), or
16
+ `responsive` (stacked until its `FieldGroup` ancestor has room, then
17
+ horizontal — see below).
18
+ - **`FieldLabel`** — the kit `Label`, styled for this composition. Wire
19
+ `htmlFor` to the control's `id` yourself.
20
+ - **`FieldDescription`** — helper text under/above the control. Wire its
21
+ `id` to the control's `aria-describedby` yourself.
22
+ - **`FieldError`** — validation message(s), `role="alert"`. Pass `children`
23
+ directly, or an `errors` array (`{ message }[]`, e.g. from a form
24
+ library) — deduped by message, rendered as plain text for one error or a
25
+ bulleted list for several. Renders nothing when there is no content.
26
+ - **`FieldContent`** — wraps a `FieldTitle` + `FieldDescription` pair
27
+ beside a control in `horizontal`/`responsive` orientation (e.g. a
28
+ Switch with its own title and description).
29
+ - **`FieldTitle`** — a label-weight caption for the `FieldContent` case
30
+ above (not a `<label>` — it doesn't associate with a control).
31
+ - **`FieldGroup`** — wraps one or more `Field`s; also the container-query
32
+ root a `responsive` `Field` measures against (its own inline size, not
33
+ the viewport).
34
+ - **`FieldSet`** / **`FieldLegend`** — a native `<fieldset>`/`<legend>`
35
+ pair for a titled group of fields (e.g. a radio set). `FieldLegend`'s
36
+ `variant` is `legend` (default, heading-weight) or `label` (reads as a
37
+ plain field label instead of a section title).
38
+ - **`FieldSeparator`** — a labelled divider between groups (e.g. "or
39
+ continue with"), built on the kit's own `Separator`.
40
+
41
+ `data-invalid`/`data-disabled` on `Field` are plain attributes you set —
42
+ this file derives no validation or disabled state of its own. Set them (or
43
+ `aria-invalid`/`disabled` directly on the control) based on whatever
44
+ validation your form actually runs.
12
45
 
13
46
  ## When to use
14
47
 
15
- - Every labelled control in a form. This is the default way to compose
16
- forms from the kit.
48
+ - Every labelled control in a form — this is the kit's only form-layout
49
+ system; wire ids by hand as shown below.
17
50
 
18
51
  ## When not to use
19
52
 
20
53
  - Purely decorative text next to a control that is not its label or
21
- description.
54
+ description — that's plain markup, not `FieldDescription`.
22
55
 
23
56
  ## Props (kit level)
24
57
 
25
- `Field` (root):
58
+ `Field`:
59
+
60
+ | Prop | Type | Default |
61
+ |------|------|---------|
62
+ | `orientation` | `vertical` \| `horizontal` \| `responsive` | `vertical` |
63
+ | `className` | `string` — merged after the orientation class | — |
64
+
65
+ `FieldLegend`:
66
+
67
+ | Prop | Type | Default |
68
+ |------|------|---------|
69
+ | `variant` | `legend` \| `label` | `legend` |
70
+
71
+ `FieldError`:
26
72
 
27
73
  | Prop | Type | Default |
28
74
  |------|------|---------|
29
- | `name` | field name, also used by form-level validation | — |
30
- | `disabled` | disables the control and dims the label | `false` |
31
- | `invalid` | force the invalid state (external validation libraries) | — |
32
- | `validate` | custom validation: `(value) => string \| string[] \| null` | — |
33
- | `className` | `string` — merged after the kit class | — |
75
+ | `errors` | `Array<{ message?: string } \| undefined>` — ignored when `children` is passed | — |
34
76
 
35
- `FieldError` accepts `match`: `true` to always show (external validation),
36
- or a native `ValidityState` key (`"valueMissing"`, `"typeMismatch"`, ...)
37
- to show only for that failure. Without `match` it shows whenever the field
38
- is invalid.
77
+ All other props on every part are the underlying native element's props
78
+ (`FieldSet` → `<fieldset>`, `FieldLegend` → `<legend>`, `FieldLabel` →
79
+ `Label`'s props, `FieldDescription` → `<p>`, `FieldError`/`FieldContent`/
80
+ `FieldGroup`/`FieldSeparator`/`FieldTitle` → `<div>`) and are forwarded
81
+ as-is.
39
82
 
40
83
  ## Examples
41
84
 
42
85
  ```tsx
43
86
  import { Field, FieldDescription, FieldError, FieldLabel, Input } from '@gears-frontx/ui-kit';
44
87
 
45
- // Label + description + native validation
46
- <Field name="email">
47
- <FieldLabel>Email</FieldLabel>
48
- <Input type="email" required placeholder="you@company.com" />
49
- <FieldDescription>We only use it for the invoice.</FieldDescription>
50
- <FieldError match="valueMissing">Email is required.</FieldError>
51
- <FieldError match="typeMismatch">That does not look like an email.</FieldError>
88
+ // Manual id/htmlFor/aria-describedby wiring — this port does none of it for you
89
+ <Field>
90
+ <FieldLabel htmlFor="email">Email</FieldLabel>
91
+ <Input id="email" type="email" required aria-describedby="email-desc" />
92
+ <FieldDescription id="email-desc">We only use it for the invoice.</FieldDescription>
52
93
  </Field>
53
94
 
54
- // External validation (e.g. server errors)
55
- <Field name="slug" invalid={Boolean(serverError)}>
56
- <FieldLabel>Slug</FieldLabel>
57
- <Input value={slug} onValueChange={setSlug} />
58
- <FieldError match={true}>{serverError}</FieldError>
95
+ // External validation
96
+ <Field data-invalid={Boolean(serverError)}>
97
+ <FieldLabel htmlFor="slug">Slug</FieldLabel>
98
+ <Input id="slug" value={slug} onValueChange={setSlug} aria-invalid={Boolean(serverError)} />
99
+ {serverError && <FieldError>{serverError}</FieldError>}
59
100
  </Field>
60
101
  ```
61
102
 
103
+ ```tsx
104
+ import {
105
+ Field,
106
+ FieldContent,
107
+ FieldGroup,
108
+ FieldLegend,
109
+ FieldSet,
110
+ FieldTitle,
111
+ Switch,
112
+ } from '@gears-frontx/ui-kit';
113
+
114
+ // Grouped, responsive fields — horizontal once the surrounding FieldGroup has room
115
+ <FieldGroup>
116
+ <FieldSet>
117
+ <FieldLegend variant="label">Notifications</FieldLegend>
118
+ <Field orientation="responsive">
119
+ <FieldContent>
120
+ <FieldTitle>Product updates</FieldTitle>
121
+ <FieldDescription>Release notes and roadmap changes.</FieldDescription>
122
+ </FieldContent>
123
+ <Switch />
124
+ </Field>
125
+ </FieldSet>
126
+ </FieldGroup>
127
+ ```
128
+
62
129
  ## Anti-patterns
63
130
 
64
- - Do not wire `htmlFor`/`id`/`aria-describedby` by hand inside a Field —
65
- the point of the composition is that it does this for you.
66
- - Do not put two controls in one Field — one field, one control.
131
+ - Do not expect `id`/`htmlFor`/`aria-describedby` to wire themselves — this
132
+ port deliberately does none of that; wire them by hand, every time.
133
+ - Do not put two controls in one `Field` — one field, one control.
67
134
  - Do not render validation text outside `FieldError` — screen readers
68
- lose the association.
135
+ lose the association if you don't also wire `aria-describedby` yourself.
@@ -0,0 +1,81 @@
1
+ # HoverCard
2
+
3
+ A portalled preview panel that opens when its trigger is hovered or
4
+ focused. Wraps Base UI's `PreviewCard` primitives (`@base-ui/react/preview-card`)
5
+ under the upstream `hover-card` name — the kit component name follows
6
+ shadcn/ui's registry, not the Base UI primitive it wraps. Positioning,
7
+ portalling, hover/focus interaction, and Escape/outside-press dismissal
8
+ come from Base UI.
9
+
10
+ Composition: `HoverCard` (root, holds open state) → `HoverCardTrigger`
11
+ (renders an `<a>`) → `HoverCardContent` (portals and positions a caret-less
12
+ card against the trigger).
13
+
14
+ ## When to use
15
+
16
+ - A preview of something the trigger links to — a user's profile behind
17
+ their `@handle`, a summary of a referenced document — where following the
18
+ link is the primary action and the card is a low-commitment preview of
19
+ it.
20
+
21
+ ## When not to use
22
+
23
+ - An icon-only control revealing supplementary text with no link of its
24
+ own — use `tooltip`.
25
+ - Content the user opens deliberately by clicking — use `popover`.
26
+ - A menu of actions — use `dropdown-menu`.
27
+
28
+ ## Props (kit level)
29
+
30
+ `HoverCard` (root): `open` / `defaultOpen`, `onOpenChange`,
31
+ `onOpenChangeComplete`, `handle` (for a trigger placed outside the root,
32
+ see Base UI's detached-trigger pattern) — see Base UI PreviewCard.Root.
33
+
34
+ `HoverCardTrigger`: `delay` (ms before opening on hover, Base UI default
35
+ `600`), `closeDelay` (ms before closing, default `300`). Renders a native
36
+ `<a>` — pass `href`, or `render` to compose your own link/router component.
37
+
38
+ `delay` is measured as hover intent — the timer runs from pointer movement
39
+ over the trigger, not from entry, so sweeping the cursor past the trigger
40
+ without pausing won't open it. (In tests, dispatch a `mousemove` after
41
+ `mouseenter` to arm it.)
42
+
43
+ `HoverCardContent`:
44
+
45
+ | Prop | Type | Default |
46
+ |------|------|---------|
47
+ | `side` | `top` \| `bottom` \| `left` \| `right` \| `inline-start` \| `inline-end` | `bottom` |
48
+ | `align` | `start` \| `center` \| `end` | `center` |
49
+ | `sideOffset` / `alignOffset` | `number` | `4` / `4` |
50
+ | `container` | DOM node to portal the popup into | `<body>` |
51
+ | `positionMethod` | `absolute` \| `fixed` — pass `fixed` when the trigger sits inside a `transform`/`filter` container | `absolute` |
52
+ | `collisionBoundary` / `collisionPadding` | see Base UI PreviewCard.Positioner — bound and pad the flip/shift collision logic | viewport / `5` |
53
+ | `className` | `string` — merged after the kit class | — |
54
+
55
+ The popup portals to `<body>` by default, so if your theme lives on a
56
+ subtree (`data-theme` on a section instead of `<html>`), pass that section
57
+ as `container` or the popup renders with the root theme — same contract as
58
+ `Dialog`/`Tooltip`/`Popover`/`DropdownMenu`.
59
+
60
+ ## Examples
61
+
62
+ ```tsx
63
+ import { HoverCard, HoverCardContent, HoverCardTrigger } from '@gears-frontx/ui-kit';
64
+
65
+ <HoverCard>
66
+ <HoverCardTrigger href="/users/shadcn">@shadcn</HoverCardTrigger>
67
+ <HoverCardContent>
68
+ The React Framework – created and maintained by @shadcn.
69
+ </HoverCardContent>
70
+ </HoverCard>;
71
+ ```
72
+
73
+ ## Anti-patterns
74
+
75
+ - Do not put content in a hover card that a touch or keyboard-only (non-
76
+ focus) user needs to complete a task — hover has no touch equivalent;
77
+ keep the trigger's own link/action meaningful on its own so those users
78
+ lose only the preview, not the functionality.
79
+ - Do not use `HoverCard` in place of `Tooltip` for a plain supplementary
80
+ label — a hover card's trigger is expected to be a link or reference, not
81
+ an arbitrary icon.