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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (493) hide show
  1. package/README.md +28 -6
  2. package/dist/accordion.d.ts +1 -0
  3. package/dist/accordion.js +35 -0
  4. package/dist/accordion.js.map +1 -0
  5. package/dist/alert-dialog.d.ts +1 -0
  6. package/dist/alert-dialog.js +97 -0
  7. package/dist/alert-dialog.js.map +1 -0
  8. package/dist/alert.d.ts +1 -0
  9. package/dist/alert.js +39 -0
  10. package/dist/alert.js.map +1 -0
  11. package/dist/aspect-ratio.d.ts +1 -0
  12. package/dist/aspect-ratio.js +19 -0
  13. package/dist/aspect-ratio.js.map +1 -0
  14. package/dist/attachment.d.ts +1 -0
  15. package/dist/attachment.js +133 -0
  16. package/dist/attachment.js.map +1 -0
  17. package/dist/avatar.d.ts +1 -0
  18. package/dist/avatar.js +87 -0
  19. package/dist/avatar.js.map +1 -0
  20. package/dist/badge.js +32 -46
  21. package/dist/badge.js.map +1 -1
  22. package/dist/breadcrumb.d.ts +1 -0
  23. package/dist/breadcrumb.js +81 -0
  24. package/dist/breadcrumb.js.map +1 -0
  25. package/dist/bubble.d.ts +1 -0
  26. package/dist/bubble.js +94 -0
  27. package/dist/bubble.js.map +1 -0
  28. package/dist/button-group.d.ts +1 -0
  29. package/dist/button-group.js +61 -0
  30. package/dist/button-group.js.map +1 -0
  31. package/dist/button.js +30 -29
  32. package/dist/button.js.map +1 -1
  33. package/dist/calendar.d.ts +1 -0
  34. package/dist/calendar.js +134 -0
  35. package/dist/calendar.js.map +1 -0
  36. package/dist/card.js +24 -24
  37. package/dist/carousel.d.ts +1 -0
  38. package/dist/carousel.js +163 -0
  39. package/dist/carousel.js.map +1 -0
  40. package/dist/chart.d.ts +1 -0
  41. package/dist/chart.js +202 -0
  42. package/dist/chart.js.map +1 -0
  43. package/dist/checkbox.js +14 -39
  44. package/dist/checkbox.js.map +1 -1
  45. package/dist/chunks/accordion.X_AK08Iv.css +1 -0
  46. package/dist/chunks/alert-dialog.B50f-Gsz.css +1 -0
  47. package/dist/chunks/alert.BJLRcB65.css +1 -0
  48. package/dist/chunks/aspect-ratio.DJbPE7BX.css +1 -0
  49. package/dist/chunks/attachment.rknKEWlr.css +1 -0
  50. package/dist/chunks/avatar.CsQmQnay.css +1 -0
  51. package/dist/chunks/badge.DR0epAiZ.css +1 -0
  52. package/dist/chunks/breadcrumb.QKz32ceR.css +1 -0
  53. package/dist/chunks/bubble.BKcAopT7.css +1 -0
  54. package/dist/chunks/button-group.D0Ir-jbL.css +1 -0
  55. package/dist/chunks/button.D69BdJF1.css +1 -0
  56. package/dist/chunks/calendar.Cnbv4EzY.css +1 -0
  57. package/dist/chunks/card.D3Ct_dza.css +1 -0
  58. package/dist/chunks/carousel.CjaKGN_D.css +1 -0
  59. package/dist/chunks/chart.CeyctrXQ.css +1 -0
  60. package/dist/chunks/checkbox.CZfE_PkU.css +1 -0
  61. package/dist/chunks/collapsible.BQ-sU5sQ.css +1 -0
  62. package/dist/chunks/combobox.CtYpZAKB.css +1 -0
  63. package/dist/chunks/command.Km60IuqD.css +1 -0
  64. package/dist/chunks/context-menu.Bjib7_AL.css +1 -0
  65. package/dist/chunks/data-table.DECm3qI-.css +1 -0
  66. package/dist/chunks/date-picker.BcRqyOg8.css +1 -0
  67. package/dist/chunks/dialog.BxcZ12Gb.css +1 -0
  68. package/dist/chunks/drawer.BkS_qEHj.css +1 -0
  69. package/dist/chunks/dropdown-menu.CDaeWYDT.css +1 -0
  70. package/dist/chunks/empty.B334jSES.css +1 -0
  71. package/dist/chunks/field.yTrg1G90.css +1 -0
  72. package/dist/chunks/hover-card.DmwvigMp.css +1 -0
  73. package/dist/chunks/input-group.CFIUP-Oh.css +1 -0
  74. package/dist/chunks/input-otp.XSpqyVij.css +1 -0
  75. package/dist/chunks/input.DvA_mTq8.css +1 -0
  76. package/dist/chunks/item.CLg1KaYF.css +1 -0
  77. package/dist/chunks/kbd.DZuUVB_m.css +1 -0
  78. package/dist/chunks/marker.DDxI_rZn.css +1 -0
  79. package/dist/chunks/menubar.CxRNI9o4.css +1 -0
  80. package/dist/chunks/message-scroller.CbLooS7Q.css +1 -0
  81. package/dist/chunks/message.BhD5JDJK.css +1 -0
  82. package/dist/chunks/native-select.BdYLTCZv.css +1 -0
  83. package/dist/chunks/navigation-menu.C2JGHAKD.css +1 -0
  84. package/dist/chunks/pagination.DUiQuWla.css +1 -0
  85. package/dist/chunks/popover.fOvPrnsr.css +1 -0
  86. package/dist/chunks/progress.Bp13t8iw.css +1 -0
  87. package/dist/chunks/questionnaire.DYnuWKAQ.css +1 -0
  88. package/dist/chunks/radio-group.CV3MBCsI.css +1 -0
  89. package/dist/chunks/resizable.B71V-1lR.css +1 -0
  90. package/dist/chunks/scroll-area.C4kWMAsU.css +1 -0
  91. package/dist/chunks/select.iEwV-sfJ.css +1 -0
  92. package/dist/chunks/sheet.DALPg9vf.css +1 -0
  93. package/dist/chunks/sidebar.CGTQhfWG.css +1 -0
  94. package/dist/chunks/slider.B5nouD7J.css +1 -0
  95. package/dist/chunks/spinner.UKK4f1tu.css +1 -0
  96. package/dist/chunks/switch.CIW9Jr1x.css +1 -0
  97. package/dist/chunks/table.CFAJfhd-.css +1 -0
  98. package/dist/chunks/tabs.C4jGj2Vg.css +1 -0
  99. package/dist/chunks/textarea.ORRSI69B.css +1 -0
  100. package/dist/chunks/toggle-group.Bd0cCCnV.css +1 -0
  101. package/dist/chunks/toggle.B9tvfl1n.css +1 -0
  102. package/dist/collapsible.d.ts +1 -0
  103. package/dist/collapsible.js +22 -0
  104. package/dist/collapsible.js.map +1 -0
  105. package/dist/combobox.d.ts +1 -0
  106. package/dist/combobox.js +159 -0
  107. package/dist/combobox.js.map +1 -0
  108. package/dist/command.d.ts +1 -0
  109. package/dist/command.js +75 -0
  110. package/dist/command.js.map +1 -0
  111. package/dist/components/accordion/accordion.d.ts +24 -0
  112. package/dist/components/accordion/accordion.d.ts.map +1 -0
  113. package/dist/components/accordion/public.d.ts +2 -0
  114. package/dist/components/accordion/public.d.ts.map +1 -0
  115. package/dist/components/alert/alert.d.ts +21 -0
  116. package/dist/components/alert/alert.d.ts.map +1 -0
  117. package/dist/components/alert/public.d.ts +2 -0
  118. package/dist/components/alert/public.d.ts.map +1 -0
  119. package/dist/components/alert-dialog/alert-dialog.d.ts +95 -0
  120. package/dist/components/alert-dialog/alert-dialog.d.ts.map +1 -0
  121. package/dist/components/alert-dialog/public.d.ts +2 -0
  122. package/dist/components/alert-dialog/public.d.ts.map +1 -0
  123. package/dist/components/aspect-ratio/aspect-ratio.d.ts +8 -0
  124. package/dist/components/aspect-ratio/aspect-ratio.d.ts.map +1 -0
  125. package/dist/components/aspect-ratio/public.d.ts +2 -0
  126. package/dist/components/aspect-ratio/public.d.ts.map +1 -0
  127. package/dist/components/attachment/attachment.d.ts +71 -0
  128. package/dist/components/attachment/attachment.d.ts.map +1 -0
  129. package/dist/components/attachment/public.d.ts +2 -0
  130. package/dist/components/attachment/public.d.ts.map +1 -0
  131. package/dist/components/avatar/avatar.d.ts +40 -0
  132. package/dist/components/avatar/avatar.d.ts.map +1 -0
  133. package/dist/components/avatar/public.d.ts +2 -0
  134. package/dist/components/avatar/public.d.ts.map +1 -0
  135. package/dist/components/badge/badge.d.ts +3 -16
  136. package/dist/components/badge/badge.d.ts.map +1 -1
  137. package/dist/components/badge/public.d.ts +1 -1
  138. package/dist/components/badge/public.d.ts.map +1 -1
  139. package/dist/components/breadcrumb/breadcrumb.d.ts +19 -0
  140. package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -0
  141. package/dist/components/breadcrumb/public.d.ts +2 -0
  142. package/dist/components/breadcrumb/public.d.ts.map +1 -0
  143. package/dist/components/bubble/bubble.d.ts +35 -0
  144. package/dist/components/bubble/bubble.d.ts.map +1 -0
  145. package/dist/components/bubble/public.d.ts +2 -0
  146. package/dist/components/bubble/public.d.ts.map +1 -0
  147. package/dist/components/button/button.d.ts +1 -2
  148. package/dist/components/button/button.d.ts.map +1 -1
  149. package/dist/components/button/public.d.ts +1 -1
  150. package/dist/components/button/public.d.ts.map +1 -1
  151. package/dist/components/button-group/button-group.d.ts +17 -0
  152. package/dist/components/button-group/button-group.d.ts.map +1 -0
  153. package/dist/components/button-group/public.d.ts +2 -0
  154. package/dist/components/button-group/public.d.ts.map +1 -0
  155. package/dist/components/calendar/calendar.d.ts +29 -0
  156. package/dist/components/calendar/calendar.d.ts.map +1 -0
  157. package/dist/components/calendar/public.d.ts +2 -0
  158. package/dist/components/calendar/public.d.ts.map +1 -0
  159. package/dist/components/carousel/carousel.d.ts +43 -0
  160. package/dist/components/carousel/carousel.d.ts.map +1 -0
  161. package/dist/components/carousel/public.d.ts +2 -0
  162. package/dist/components/carousel/public.d.ts.map +1 -0
  163. package/dist/components/chart/chart.d.ts +48 -0
  164. package/dist/components/chart/chart.d.ts.map +1 -0
  165. package/dist/components/chart/public.d.ts +2 -0
  166. package/dist/components/chart/public.d.ts.map +1 -0
  167. package/dist/components/checkbox/checkbox.d.ts.map +1 -1
  168. package/dist/components/collapsible/collapsible.d.ts +14 -0
  169. package/dist/components/collapsible/collapsible.d.ts.map +1 -0
  170. package/dist/components/collapsible/public.d.ts +2 -0
  171. package/dist/components/collapsible/public.d.ts.map +1 -0
  172. package/dist/components/combobox/combobox.d.ts +128 -0
  173. package/dist/components/combobox/combobox.d.ts.map +1 -0
  174. package/dist/components/combobox/public.d.ts +2 -0
  175. package/dist/components/combobox/public.d.ts.map +1 -0
  176. package/dist/components/command/command.d.ts +44 -0
  177. package/dist/components/command/command.d.ts.map +1 -0
  178. package/dist/components/command/public.d.ts +2 -0
  179. package/dist/components/command/public.d.ts.map +1 -0
  180. package/dist/components/context-menu/context-menu.d.ts +82 -0
  181. package/dist/components/context-menu/context-menu.d.ts.map +1 -0
  182. package/dist/components/context-menu/public.d.ts +2 -0
  183. package/dist/components/context-menu/public.d.ts.map +1 -0
  184. package/dist/components/data-table/data-table.d.ts +81 -0
  185. package/dist/components/data-table/data-table.d.ts.map +1 -0
  186. package/dist/components/data-table/public.d.ts +2 -0
  187. package/dist/components/data-table/public.d.ts.map +1 -0
  188. package/dist/components/date-picker/date-picker.d.ts +76 -0
  189. package/dist/components/date-picker/date-picker.d.ts.map +1 -0
  190. package/dist/components/date-picker/public.d.ts +2 -0
  191. package/dist/components/date-picker/public.d.ts.map +1 -0
  192. package/dist/components/dialog/dialog.d.ts +12 -3
  193. package/dist/components/dialog/dialog.d.ts.map +1 -1
  194. package/dist/components/direction/direction.d.ts +2 -0
  195. package/dist/components/direction/direction.d.ts.map +1 -0
  196. package/dist/components/direction/public.d.ts +2 -0
  197. package/dist/components/direction/public.d.ts.map +1 -0
  198. package/dist/components/drawer/drawer.d.ts +83 -0
  199. package/dist/components/drawer/drawer.d.ts.map +1 -0
  200. package/dist/components/drawer/public.d.ts +2 -0
  201. package/dist/components/drawer/public.d.ts.map +1 -0
  202. package/dist/components/dropdown-menu/dropdown-menu.d.ts +1 -4
  203. package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +1 -1
  204. package/dist/components/empty/empty.d.ts +23 -0
  205. package/dist/components/empty/empty.d.ts.map +1 -0
  206. package/dist/components/empty/public.d.ts +2 -0
  207. package/dist/components/empty/public.d.ts.map +1 -0
  208. package/dist/components/field/field.d.ts +33 -12
  209. package/dist/components/field/field.d.ts.map +1 -1
  210. package/dist/components/field/public.d.ts +1 -1
  211. package/dist/components/field/public.d.ts.map +1 -1
  212. package/dist/components/hover-card/hover-card.d.ts +33 -0
  213. package/dist/components/hover-card/hover-card.d.ts.map +1 -0
  214. package/dist/components/hover-card/public.d.ts +2 -0
  215. package/dist/components/hover-card/public.d.ts.map +1 -0
  216. package/dist/components/input-group/input-group.d.ts +38 -0
  217. package/dist/components/input-group/input-group.d.ts.map +1 -0
  218. package/dist/components/input-group/public.d.ts +2 -0
  219. package/dist/components/input-group/public.d.ts.map +1 -0
  220. package/dist/components/input-otp/input-otp.d.ts +17 -0
  221. package/dist/components/input-otp/input-otp.d.ts.map +1 -0
  222. package/dist/components/input-otp/public.d.ts +2 -0
  223. package/dist/components/input-otp/public.d.ts.map +1 -0
  224. package/dist/components/item/item.d.ts +47 -0
  225. package/dist/components/item/item.d.ts.map +1 -0
  226. package/dist/components/item/public.d.ts +2 -0
  227. package/dist/components/item/public.d.ts.map +1 -0
  228. package/dist/components/kbd/kbd.d.ts +8 -0
  229. package/dist/components/kbd/kbd.d.ts.map +1 -0
  230. package/dist/components/kbd/public.d.ts +2 -0
  231. package/dist/components/kbd/public.d.ts.map +1 -0
  232. package/dist/components/marker/marker.d.ts +19 -0
  233. package/dist/components/marker/marker.d.ts.map +1 -0
  234. package/dist/components/marker/public.d.ts +2 -0
  235. package/dist/components/marker/public.d.ts.map +1 -0
  236. package/dist/components/menubar/menubar.d.ts +57 -0
  237. package/dist/components/menubar/menubar.d.ts.map +1 -0
  238. package/dist/components/menubar/public.d.ts +2 -0
  239. package/dist/components/menubar/public.d.ts.map +1 -0
  240. package/dist/components/message/message.d.ts +35 -0
  241. package/dist/components/message/message.d.ts.map +1 -0
  242. package/dist/components/message/public.d.ts +2 -0
  243. package/dist/components/message/public.d.ts.map +1 -0
  244. package/dist/components/message-scroller/message-scroller.d.ts +75 -0
  245. package/dist/components/message-scroller/message-scroller.d.ts.map +1 -0
  246. package/dist/components/message-scroller/public.d.ts +2 -0
  247. package/dist/components/message-scroller/public.d.ts.map +1 -0
  248. package/dist/components/native-select/native-select.d.ts +14 -0
  249. package/dist/components/native-select/native-select.d.ts.map +1 -0
  250. package/dist/components/native-select/public.d.ts +2 -0
  251. package/dist/components/native-select/public.d.ts.map +1 -0
  252. package/dist/components/navigation-menu/navigation-menu.d.ts +83 -0
  253. package/dist/components/navigation-menu/navigation-menu.d.ts.map +1 -0
  254. package/dist/components/navigation-menu/public.d.ts +2 -0
  255. package/dist/components/navigation-menu/public.d.ts.map +1 -0
  256. package/dist/components/pagination/pagination.d.ts +37 -0
  257. package/dist/components/pagination/pagination.d.ts.map +1 -0
  258. package/dist/components/pagination/public.d.ts +2 -0
  259. package/dist/components/pagination/public.d.ts.map +1 -0
  260. package/dist/components/popover/popover.d.ts +32 -0
  261. package/dist/components/popover/popover.d.ts.map +1 -0
  262. package/dist/components/popover/public.d.ts +2 -0
  263. package/dist/components/popover/public.d.ts.map +1 -0
  264. package/dist/components/progress/progress.d.ts +22 -0
  265. package/dist/components/progress/progress.d.ts.map +1 -0
  266. package/dist/components/progress/public.d.ts +2 -0
  267. package/dist/components/progress/public.d.ts.map +1 -0
  268. package/dist/components/questionnaire/public.d.ts +2 -0
  269. package/dist/components/questionnaire/public.d.ts.map +1 -0
  270. package/dist/components/questionnaire/questionnaire.d.ts +192 -0
  271. package/dist/components/questionnaire/questionnaire.d.ts.map +1 -0
  272. package/dist/components/resizable/public.d.ts +2 -0
  273. package/dist/components/resizable/public.d.ts.map +1 -0
  274. package/dist/components/resizable/resizable.d.ts +12 -0
  275. package/dist/components/resizable/resizable.d.ts.map +1 -0
  276. package/dist/components/scroll-area/public.d.ts +2 -0
  277. package/dist/components/scroll-area/public.d.ts.map +1 -0
  278. package/dist/components/scroll-area/scroll-area.d.ts +10 -0
  279. package/dist/components/scroll-area/scroll-area.d.ts.map +1 -0
  280. package/dist/components/select/select.d.ts +3 -5
  281. package/dist/components/select/select.d.ts.map +1 -1
  282. package/dist/components/sheet/public.d.ts +2 -0
  283. package/dist/components/sheet/public.d.ts.map +1 -0
  284. package/dist/components/sheet/sheet.d.ts +56 -0
  285. package/dist/components/sheet/sheet.d.ts.map +1 -0
  286. package/dist/components/sidebar/public.d.ts +2 -0
  287. package/dist/components/sidebar/public.d.ts.map +1 -0
  288. package/dist/components/sidebar/sidebar.d.ts +167 -0
  289. package/dist/components/sidebar/sidebar.d.ts.map +1 -0
  290. package/dist/components/sidebar/use-mobile.d.ts +18 -0
  291. package/dist/components/sidebar/use-mobile.d.ts.map +1 -0
  292. package/dist/components/slider/public.d.ts +2 -0
  293. package/dist/components/slider/public.d.ts.map +1 -0
  294. package/dist/components/slider/slider.d.ts +6 -0
  295. package/dist/components/slider/slider.d.ts.map +1 -0
  296. package/dist/components/spinner/public.d.ts +2 -0
  297. package/dist/components/spinner/public.d.ts.map +1 -0
  298. package/dist/components/spinner/spinner.d.ts +4 -0
  299. package/dist/components/spinner/spinner.d.ts.map +1 -0
  300. package/dist/components/textarea/textarea.d.ts +1 -1
  301. package/dist/components/textarea/textarea.d.ts.map +1 -1
  302. package/dist/components/toast/toast.d.ts.map +1 -1
  303. package/dist/components/toggle/public.d.ts +2 -0
  304. package/dist/components/toggle/public.d.ts.map +1 -0
  305. package/dist/components/toggle/toggle.d.ts +11 -0
  306. package/dist/components/toggle/toggle.d.ts.map +1 -0
  307. package/dist/components/toggle-group/public.d.ts +2 -0
  308. package/dist/components/toggle-group/public.d.ts.map +1 -0
  309. package/dist/components/toggle-group/toggle-group.d.ts +13 -0
  310. package/dist/components/toggle-group/toggle-group.d.ts.map +1 -0
  311. package/dist/components/tooltip/tooltip.d.ts +1 -4
  312. package/dist/components/tooltip/tooltip.d.ts.map +1 -1
  313. package/dist/context-menu.d.ts +1 -0
  314. package/dist/context-menu.js +201 -0
  315. package/dist/context-menu.js.map +1 -0
  316. package/dist/data-table.d.ts +1 -0
  317. package/dist/data-table.js +162 -0
  318. package/dist/data-table.js.map +1 -0
  319. package/dist/date-picker.d.ts +1 -0
  320. package/dist/date-picker.js +175 -0
  321. package/dist/date-picker.js.map +1 -0
  322. package/dist/dialog.js +40 -55
  323. package/dist/dialog.js.map +1 -1
  324. package/dist/direction.d.ts +1 -0
  325. package/dist/direction.js +6 -0
  326. package/dist/direction.js.map +1 -0
  327. package/dist/docs/accordion.md +86 -0
  328. package/dist/docs/alert-dialog.md +151 -0
  329. package/dist/docs/alert.md +74 -0
  330. package/dist/docs/aspect-ratio.md +65 -0
  331. package/dist/docs/attachment.md +254 -0
  332. package/dist/docs/avatar.md +185 -0
  333. package/dist/docs/badge.md +72 -60
  334. package/dist/docs/breadcrumb.md +86 -0
  335. package/dist/docs/bubble.md +233 -0
  336. package/dist/docs/button-group.md +107 -0
  337. package/dist/docs/calendar.md +114 -0
  338. package/dist/docs/card.md +15 -7
  339. package/dist/docs/carousel.md +152 -0
  340. package/dist/docs/chart.md +182 -0
  341. package/dist/docs/collapsible.md +80 -0
  342. package/dist/docs/combobox.md +192 -0
  343. package/dist/docs/command.md +171 -0
  344. package/dist/docs/context-menu.md +173 -0
  345. package/dist/docs/data-table.md +183 -0
  346. package/dist/docs/date-picker.md +137 -0
  347. package/dist/docs/dialog.md +33 -0
  348. package/dist/docs/direction.md +51 -0
  349. package/dist/docs/drawer.md +242 -0
  350. package/dist/docs/empty.md +80 -0
  351. package/dist/docs/field.md +105 -38
  352. package/dist/docs/hover-card.md +81 -0
  353. package/dist/docs/input-group.md +158 -0
  354. package/dist/docs/input-otp.md +116 -0
  355. package/dist/docs/input.md +31 -20
  356. package/dist/docs/item.md +106 -0
  357. package/dist/docs/kbd.md +53 -0
  358. package/dist/docs/marker.md +178 -0
  359. package/dist/docs/menubar.md +108 -0
  360. package/dist/docs/message-scroller.md +221 -0
  361. package/dist/docs/message.md +183 -0
  362. package/dist/docs/native-select.md +93 -0
  363. package/dist/docs/navigation-menu.md +176 -0
  364. package/dist/docs/pagination.md +96 -0
  365. package/dist/docs/popover.md +87 -0
  366. package/dist/docs/progress.md +58 -0
  367. package/dist/docs/questionnaire.md +311 -0
  368. package/dist/docs/resizable.md +95 -0
  369. package/dist/docs/scroll-area.md +93 -0
  370. package/dist/docs/sheet.md +168 -0
  371. package/dist/docs/sidebar.md +309 -0
  372. package/dist/docs/slider.md +66 -0
  373. package/dist/docs/spinner.md +55 -0
  374. package/dist/docs/table.md +85 -20
  375. package/dist/docs/textarea.md +19 -2
  376. package/dist/docs/toggle-group.md +77 -0
  377. package/dist/docs/toggle.md +58 -0
  378. package/dist/docs/typeset.md +75 -0
  379. package/dist/drawer.d.ts +1 -0
  380. package/dist/drawer.js +120 -0
  381. package/dist/drawer.js.map +1 -0
  382. package/dist/dropdown-menu.js +98 -130
  383. package/dist/dropdown-menu.js.map +1 -1
  384. package/dist/empty.d.ts +1 -0
  385. package/dist/empty.js +50 -0
  386. package/dist/empty.js.map +1 -0
  387. package/dist/field.js +105 -20
  388. package/dist/field.js.map +1 -1
  389. package/dist/hover-card.d.ts +1 -0
  390. package/dist/hover-card.js +44 -0
  391. package/dist/hover-card.js.map +1 -0
  392. package/dist/index.d.ts +44 -0
  393. package/dist/index.d.ts.map +1 -1
  394. package/dist/index.js +431 -93
  395. package/dist/index.js.map +1 -1
  396. package/dist/input-group.d.ts +1 -0
  397. package/dist/input-group.js +91 -0
  398. package/dist/input-group.js.map +1 -0
  399. package/dist/input-otp.d.ts +1 -0
  400. package/dist/input-otp.js +28 -0
  401. package/dist/input-otp.js.map +1 -0
  402. package/dist/input.js +17 -17
  403. package/dist/item.d.ts +1 -0
  404. package/dist/item.js +107 -0
  405. package/dist/item.js.map +1 -0
  406. package/dist/kbd.d.ts +1 -0
  407. package/dist/kbd.js +17 -0
  408. package/dist/kbd.js.map +1 -0
  409. package/dist/marker.d.ts +1 -0
  410. package/dist/marker.js +52 -0
  411. package/dist/marker.js.map +1 -0
  412. package/dist/menubar.d.ts +1 -0
  413. package/dist/menubar.js +50 -0
  414. package/dist/menubar.js.map +1 -0
  415. package/dist/message-scroller.d.ts +1 -0
  416. package/dist/message-scroller.js +69 -0
  417. package/dist/message-scroller.js.map +1 -0
  418. package/dist/message.d.ts +1 -0
  419. package/dist/message.js +37 -0
  420. package/dist/message.js.map +1 -0
  421. package/dist/native-select.d.ts +1 -0
  422. package/dist/native-select.js +42 -0
  423. package/dist/native-select.js.map +1 -0
  424. package/dist/navigation-menu.d.ts +1 -0
  425. package/dist/navigation-menu.js +97 -0
  426. package/dist/navigation-menu.js.map +1 -0
  427. package/dist/pagination.d.ts +1 -0
  428. package/dist/pagination.js +104 -0
  429. package/dist/pagination.js.map +1 -0
  430. package/dist/popover.d.ts +1 -0
  431. package/dist/popover.js +59 -0
  432. package/dist/popover.js.map +1 -0
  433. package/dist/progress.d.ts +1 -0
  434. package/dist/progress.js +36 -0
  435. package/dist/progress.js.map +1 -0
  436. package/dist/questionnaire.d.ts +1 -0
  437. package/dist/questionnaire.js +209 -0
  438. package/dist/questionnaire.js.map +1 -0
  439. package/dist/radio-group.js +7 -7
  440. package/dist/resizable.d.ts +1 -0
  441. package/dist/resizable.js +24 -0
  442. package/dist/resizable.js.map +1 -0
  443. package/dist/scroll-area.d.ts +1 -0
  444. package/dist/scroll-area.js +32 -0
  445. package/dist/scroll-area.js.map +1 -0
  446. package/dist/select.js +83 -107
  447. package/dist/select.js.map +1 -1
  448. package/dist/sheet.d.ts +1 -0
  449. package/dist/sheet.js +94 -0
  450. package/dist/sheet.js.map +1 -0
  451. package/dist/sidebar.d.ts +1 -0
  452. package/dist/sidebar.js +386 -0
  453. package/dist/sidebar.js.map +1 -0
  454. package/dist/slider.d.ts +1 -0
  455. package/dist/slider.js +40 -0
  456. package/dist/slider.js.map +1 -0
  457. package/dist/spinner.d.ts +1 -0
  458. package/dist/spinner.js +21 -0
  459. package/dist/spinner.js.map +1 -0
  460. package/dist/switch.js +11 -11
  461. package/dist/table.js +34 -35
  462. package/dist/table.js.map +1 -1
  463. package/dist/tabs.js +17 -17
  464. package/dist/textarea.js +14 -7
  465. package/dist/textarea.js.map +1 -1
  466. package/dist/theme.css +35 -20
  467. package/dist/toast.js +54 -164
  468. package/dist/toast.js.map +1 -1
  469. package/dist/toggle-group.d.ts +1 -0
  470. package/dist/toggle-group.js +46 -0
  471. package/dist/toggle-group.js.map +1 -0
  472. package/dist/toggle.d.ts +1 -0
  473. package/dist/toggle.js +39 -0
  474. package/dist/toggle.js.map +1 -0
  475. package/dist/tooltip.js.map +1 -1
  476. package/dist/typeset.css +532 -0
  477. package/dist/utilities.css +583 -0
  478. package/llms.txt +268 -24
  479. package/package.json +15 -3
  480. package/dist/chunks/badge.BcdxDzJ7.css +0 -1
  481. package/dist/chunks/button.DNo8DTR3.css +0 -1
  482. package/dist/chunks/card.B0AcyAT1.css +0 -1
  483. package/dist/chunks/checkbox.D3kdAalh.css +0 -1
  484. package/dist/chunks/dialog.D6LS2vnG.css +0 -1
  485. package/dist/chunks/dropdown-menu.DmDZc5gB.css +0 -1
  486. package/dist/chunks/field.BNZx8HfN.css +0 -1
  487. package/dist/chunks/input.C8RDCC-a.css +0 -1
  488. package/dist/chunks/radio-group.zAFY9yCF.css +0 -1
  489. package/dist/chunks/select.Dt0diN4P.css +0 -1
  490. package/dist/chunks/switch.CsaIRnCA.css +0 -1
  491. package/dist/chunks/table.BuWHXL6e.css +0 -1
  492. package/dist/chunks/tabs.KEksCAxN.css +0 -1
  493. package/dist/chunks/textarea.N3iiWUuz.css +0 -1
@@ -0,0 +1,309 @@
1
+ # Sidebar
2
+
3
+ A composable application-shell sidebar: an expand/collapse state machine
4
+ (`SidebarProvider` + `useSidebar`) plus ~20 layout parts composed under it.
5
+ Persists its desktop open state in a cookie, toggles on Cmd/Ctrl+B, and
6
+ switches to a slide-in `Sheet` on mobile automatically. Built entirely from
7
+ other kit parts — `Sheet`, `Button`, `Input`, `Separator`, `Skeleton`,
8
+ `Tooltip` — plus an internal `useIsMobile` hook (not exported; if a
9
+ consumer needs the same breakpoint elsewhere, write their own).
10
+
11
+ ## When to use
12
+
13
+ - A persistent app-shell navigation panel: sections, nav links, a search
14
+ field, a user menu in the footer — the layout shadcn's own dashboard
15
+ blocks are built around.
16
+
17
+ ## When not to use
18
+
19
+ - A transient, dismiss-on-action panel (filters, a form, item details) —
20
+ use `Sheet` or `Drawer` directly; Sidebar's whole design is a
21
+ persistent, cookie-remembered part of the shell, not a one-off overlay.
22
+ - A dropdown-style nav menu — use `NavigationMenu` or `DropdownMenu`.
23
+
24
+ ## Setup
25
+
26
+ Wrap the whole shell in `SidebarProvider`, with `Sidebar` and
27
+ `SidebarInset` as siblings inside it — NOT `Sidebar` wrapping
28
+ `SidebarInset`:
29
+
30
+ ```tsx
31
+ import {
32
+ Sidebar,
33
+ SidebarContent,
34
+ SidebarFooter,
35
+ SidebarGroup,
36
+ SidebarGroupContent,
37
+ SidebarGroupLabel,
38
+ SidebarHeader,
39
+ SidebarInset,
40
+ SidebarMenu,
41
+ SidebarMenuButton,
42
+ SidebarMenuItem,
43
+ SidebarProvider,
44
+ SidebarTrigger,
45
+ } from '@gears-frontx/ui-kit';
46
+
47
+ function AppShell() {
48
+ return (
49
+ <SidebarProvider>
50
+ <Sidebar>
51
+ <SidebarHeader>Acme Inc</SidebarHeader>
52
+ <SidebarContent>
53
+ <SidebarGroup>
54
+ <SidebarGroupLabel>Platform</SidebarGroupLabel>
55
+ <SidebarGroupContent>
56
+ <SidebarMenu>
57
+ <SidebarMenuItem>
58
+ <SidebarMenuButton isActive>
59
+ <HomeIcon />
60
+ <span>Home</span>
61
+ </SidebarMenuButton>
62
+ </SidebarMenuItem>
63
+ </SidebarMenu>
64
+ </SidebarGroupContent>
65
+ </SidebarGroup>
66
+ </SidebarContent>
67
+ <SidebarFooter>v1.0</SidebarFooter>
68
+ </Sidebar>
69
+ <SidebarInset>
70
+ <SidebarTrigger />
71
+ {/* page content */}
72
+ </SidebarInset>
73
+ </SidebarProvider>
74
+ );
75
+ }
76
+ ```
77
+
78
+ `SidebarMenuButton`/`SidebarMenuSubButton` expect children shaped as
79
+ `<Icon /><span>Label</span>` — the trailing `<span>` is what truncates
80
+ with an ellipsis. An icon-only button (no label span) works too; a bare
81
+ text node does not truncate.
82
+
83
+ Collapsed to the icon rail the row becomes a 32px square with room for
84
+ exactly one 16px icon, so **every child after the first is hidden**. That
85
+ covers the richer shape upstream uses for header/footer rows — leading
86
+ mark, a text block, a trailing chevron — not just `<Icon /><span>`. Two
87
+ consequences worth knowing:
88
+
89
+ - Put the icon **first**. A row whose first child is the label keeps the
90
+ label in the rail and drops the icon.
91
+ - Do not set `display` in an **inline style** on a direct child of
92
+ `SidebarMenuButton`. Inline styles outrank the rule that hides it, so
93
+ the child stays in the 32px square and pushes the icon out of the box.
94
+ Style a nested wrapper instead, or use a class.
95
+
96
+ ### Layout: the panel is `position: fixed`
97
+
98
+ The desktop panel is fixed (upstream's own choice) so it stays pinned
99
+ while `SidebarInset` scrolls the page. That resolves against the
100
+ **viewport**, so a Sidebar placed inside a bounded box — a preview frame,
101
+ a split pane, a dashboard card — escapes that box unless an ancestor
102
+ establishes a containing block for fixed descendants:
103
+
104
+ ```tsx
105
+ <div style={{ contain: 'layout paint', height: '30rem' }}>
106
+ <SidebarProvider style={{ minHeight: '100%' }}>…</SidebarProvider>
107
+ </div>
108
+ ```
109
+
110
+ `transform` or `filter` on the ancestor work equally well. Nothing is
111
+ needed for the normal case, where the shell IS the page.
112
+
113
+ ## Props
114
+
115
+ ### SidebarProvider
116
+
117
+ | Prop | Type | Default |
118
+ |------|------|---------|
119
+ | `defaultOpen` | `boolean` — starting state AND an opt-out of the cookie | persisted cookie, else `true` |
120
+ | `open` | `boolean` — controlled desktop open state | — |
121
+ | `onOpenChange` | `(open: boolean) => void` | — |
122
+
123
+ Omit `defaultOpen` and the provider restores whatever was last persisted
124
+ (`sidebar_state`, 7 days). Pass it and it wins outright, cookie ignored.
125
+ That opt-out matters because the cookie is a single key for the whole
126
+ document: two providers on one page would otherwise read the same key and
127
+ move together, and `defaultOpen={false}` would silently do nothing as soon
128
+ as anything had ever been toggled.
129
+
130
+ `SidebarProvider` also wraps its subtree in a `TooltipProvider` with
131
+ `delay={0}` (upstream does the same). Collapsed to the icon rail the
132
+ tooltip IS the row's only label, so a hover delay would leave the nav
133
+ unreadable for its duration. Nesting inside your own `TooltipProvider` is
134
+ fine — Base UI scopes them.
135
+
136
+ ### Sidebar
137
+
138
+ | Prop | Type | Default |
139
+ |------|------|---------|
140
+ | `side` | `left` \| `right` | `left` |
141
+ | `variant` | `sidebar` \| `floating` \| `inset` | `sidebar` |
142
+ | `collapsible` | `offcanvas` \| `icon` \| `none` | `offcanvas` |
143
+
144
+ `variant="inset"` also affects `SidebarInset`'s own rendering (it grows a
145
+ margin/radius/shadow to read as a floating card) — see `useSidebar`'s
146
+ `state` for driving conditional UI elsewhere in the shell.
147
+
148
+ ### SidebarTrigger
149
+
150
+ | Prop | Type | Default |
151
+ |------|------|---------|
152
+ | `label` | `string` — accessible name for the icon-only button | `'Toggle Sidebar'` |
153
+
154
+ All other props are `Button` props (this IS a `Button`, `variant="ghost"
155
+ size="sm"`, with a fixed icon slot).
156
+
157
+ ### SidebarMenuButton
158
+
159
+ | Prop | Type | Default |
160
+ |------|------|---------|
161
+ | `variant` | `default` \| `outline` | `default` |
162
+ | `size` | `default` \| `sm` \| `lg` | `default` |
163
+ | `isActive` | `boolean` — accent fill, reflected as `data-active` | `false` |
164
+ | `tooltip` | `string \| TooltipContentProps` — see below | — |
165
+ | `render` | `ReactElement` — polymorphism, e.g. render as a link | — |
166
+
167
+ `tooltip` only ever shows while the sidebar is desktop-collapsed to its
168
+ icon rail (`useSidebar().state === 'collapsed'` and not mobile) — pass it
169
+ on every icon-only nav item so the label is still reachable when
170
+ collapsed; it is simply never mounted otherwise, expanded or on mobile,
171
+ where the label is already visible next to the icon.
172
+
173
+ ### SidebarMenuSubButton
174
+
175
+ | Prop | Type | Default |
176
+ |------|------|---------|
177
+ | `size` | `sm` \| `md` | `md` |
178
+ | `isActive` | `boolean` | `false` |
179
+ | `render` | `ReactElement` | — |
180
+
181
+ ### SidebarMenuAction
182
+
183
+ | Prop | Type | Default |
184
+ |------|------|---------|
185
+ | `showOnHover` | `boolean` — paint only on item hover/focus-within (or `aria-expanded`) instead of always-visible | `false` |
186
+
187
+ ### SidebarMenuSkeleton
188
+
189
+ | Prop | Type | Default |
190
+ |------|------|---------|
191
+ | `showIcon` | `boolean` | `false` |
192
+
193
+ Every other exported part (`SidebarContent`, `SidebarGroup`,
194
+ `SidebarGroupContent`, `SidebarGroupAction`, `SidebarGroupLabel`,
195
+ `SidebarHeader`, `SidebarFooter`, `SidebarInput`, `SidebarInset`,
196
+ `SidebarMenu`, `SidebarMenuItem`, `SidebarMenuBadge`, `SidebarMenuSub`,
197
+ `SidebarMenuSubItem`, `SidebarRail`, `SidebarSeparator`) takes only its
198
+ native element's own props plus `className`; `SidebarGroupLabel` and
199
+ `SidebarGroupAction` additionally take `render` for polymorphism (same
200
+ `useRender`/`mergeProps` idiom as `Badge`).
201
+
202
+ ## `useSidebar()`
203
+
204
+ ```ts
205
+ const { state, open, setOpen, openMobile, setOpenMobile, isMobile, toggleSidebar } = useSidebar();
206
+ ```
207
+
208
+ `state` is `'expanded' | 'collapsed'`, derived from `open`. Throws outside
209
+ a `SidebarProvider` — there is no sensible default a bare consumer of the
210
+ hook could fall back to.
211
+
212
+ ## Custom width
213
+
214
+ Override `--sidebar-width` / `--sidebar-width-icon` via `style` on
215
+ `SidebarProvider` — every desktop/mobile size below reads from these two,
216
+ inherited down to `Sidebar`/`SidebarInset` the same way `Card` shares
217
+ `--card-spacing` with its own parts:
218
+
219
+ ```tsx
220
+ <SidebarProvider style={{ '--sidebar-width': '20rem' }}>
221
+ ```
222
+
223
+ ## Not reproduced from upstream
224
+
225
+ Row geometry is upstream's, not invented: the metrics come from
226
+ `apps/v4/registry/new-york-v4/ui/sidebar.tsx`, which carries the real
227
+ Tailwind utility strings, re-expressed on the kit's token scales
228
+ (`p-2` → `--space-2`, `h-8` → `--control-height-sm`, `w-5` → `--space-5`,
229
+ `size-4` → `--icon-size-sm`). Rows are 28/32/48px for `sm`/`default`/`lg`,
230
+ sub-rows 28px at both sizes, badges and actions 20px squares centred on
231
+ their row. The type ramp is the kit's, so body text is 15px where
232
+ upstream's `text-sm` is 14px.
233
+
234
+ - **Cookie read happens after mount, not during render.** Upstream's own
235
+ model reads the `sidebar_state` cookie in a Next.js Server Component and
236
+ hands the result down as `defaultOpen`, so the very first HTML byte
237
+ already reflects the persisted state. This kit owns no server-rendering
238
+ step of its own, so `SidebarProvider` reads `document.cookie` itself —
239
+ in an effect, not in the state initializer, so the first render is
240
+ identical on both sides of hydration (a server render has no cookie to
241
+ read and would always emit the expanded default). The cost is one frame
242
+ of expanded sidebar before a persisted collapsed state applies; an app
243
+ that owns a server render buys that frame back by reading the cookie
244
+ there and passing `defaultOpen`, which is upstream's model exactly. The
245
+ write path (toggling persists a 7-day cookie) is unchanged.
246
+ - **Skeleton row widths come from `useId`, not `Math.random()`.**
247
+ Upstream rolls each `SidebarMenuSkeleton` row's width randomly in a lazy
248
+ state initializer, which renders a different number on the server than
249
+ on the client. The rows still vary — the width is hashed from the row's
250
+ own `useId`, which React keeps stable across hydration and distinct
251
+ between siblings.
252
+ - **`SidebarMenuButton`'s tooltip mounts conditionally instead of using a
253
+ `hidden` attribute.** Upstream always mounts `TooltipContent` and flips
254
+ a `hidden` attribute on it depending on collapse state — correct only if
255
+ something declares `[hidden] { display: none }` for that popup, and this
256
+ kit's own `tooltip.module.css` (an existing component directory this
257
+ port must not edit) declares no such rule, so the popup's own
258
+ `display: inline-flex` would out-cascade the UA's `[hidden]` default.
259
+ This port instead only renders the `<Tooltip>` wrapper at all when the
260
+ sidebar is desktop-collapsed — same visible result, no reliance on a
261
+ rule that doesn't exist.
262
+ - **`SidebarInput` is hidden in the icon rail.** Upstream leaves it
263
+ alone, and its own dashboard blocks sidestep the result by hiding the
264
+ whole search group at the composition level — something a kit part
265
+ cannot ask of every consumer. There is nothing useful a text field can
266
+ do at 48px minus padding, so it goes when the labels go.
267
+ - **Every child after the first is hidden in the icon rail**, and the row
268
+ centers what remains. Upstream sets no `justify-content` and relies on
269
+ `overflow: hidden` clipping whatever does not fit, which is correct only
270
+ when the leading child happens to fill the 32px square exactly — with a
271
+ 16px icon its `size="lg"` rows sit visibly left of centre, and with
272
+ centring added the un-hidden siblings push the icon out of the box
273
+ entirely. See the shape note under **Setup**.
274
+ - **The trailing 32px of a row with a badge or action is reserved.**
275
+ Upstream reserves it for an action only
276
+ (`group-has-data-[sidebar=menu-action]:pr-8`); a badge gets the same
277
+ footprint here, since a long label sliding under a count reads exactly
278
+ as badly as one sliding under a menu button.
279
+ - **No RTL icon flip on `SidebarTrigger`.** Upstream mirrors its trigger
280
+ icon horizontally under a dir="rtl" ancestor. This kit has no bundled
281
+ RTL-detection utility that a self-contained Sidebar could depend on
282
+ without adding a new cross-component coupling (a separate `direction`
283
+ component exists in the kit, but wiring it in is a decision for that
284
+ component's own consumers, not implicit here) — left unflipped.
285
+ - **`useIsMobile` starts `false`, not upstream's tri-state
286
+ `undefined`.** See `use-mobile.ts`'s own comment: collapsing the "not
287
+ measured yet" state into "assume desktop" removes a null-check every
288
+ caller of the hook would otherwise carry, at the cost of the same
289
+ one-frame flash-of-desktop-layout upstream's own `hidden md:block` CSS
290
+ already exists to paper over (kept here too, on `.root`).
291
+
292
+ ## Anti-patterns
293
+
294
+ - Do not nest `SidebarInset` inside `Sidebar` — they are siblings under
295
+ `SidebarProvider`; `SidebarInset` is the MAIN content area, not part of
296
+ the sidebar panel.
297
+ - Do not read/write the `sidebar_state` cookie directly — go through
298
+ `SidebarProvider`'s `open`/`onOpenChange` if external state needs to
299
+ observe or drive it; the cookie write is an implementation detail of
300
+ `setOpen`, not a public contract.
301
+ - Do not put a bare text node in `SidebarMenuButton` — wrap it in `<span>`
302
+ so it gets truncation.
303
+ - Do not put the label before the icon, and do not set `display` inline on
304
+ a direct child — both break the icon rail (see **Setup**).
305
+ - Do not place a Sidebar inside a bounded box without giving that box
306
+ `contain: layout paint` (or a `transform`) — the fixed panel will escape
307
+ it and pin itself to the viewport.
308
+ - Do not call `useSidebar()` outside a `SidebarProvider` — it throws by
309
+ design; there is no sensible default state.
@@ -0,0 +1,66 @@
1
+ # Slider
2
+
3
+ A draggable control for picking a number (or a range) from a bounded
4
+ scale. Wraps the Base UI Slider primitive (Root/Control/Track/Indicator/
5
+ Thumb): pointer drag, click-on-track, and arrow-key/Page-key input, one
6
+ `Thumb` per value for range sliders.
7
+
8
+ ## When to use
9
+
10
+ - A single numeric value from a continuous or stepped range: volume,
11
+ zoom, a price ceiling.
12
+ - A range of two values: a min/max price filter.
13
+
14
+ ## When not to use
15
+
16
+ - A small, fixed set of discrete options — use `toggle-group` or
17
+ `radio-group`.
18
+ - Precise numeric entry — pair with (or use instead) a numeric `input`.
19
+
20
+ ## Props (kit level)
21
+
22
+ | Prop | Type | Default |
23
+ |------|------|---------|
24
+ | `value` / `defaultValue` | controlled / uncontrolled — a number, or a `[min, max]` array for a range | — |
25
+ | `onValueChange` | `(value, eventDetails) => void`, fires while dragging | — |
26
+ | `onValueCommitted` | `(value, eventDetails) => void`, fires once the interaction ends | — |
27
+ | `min` / `max` | bounds of the scale | `0` / `100` |
28
+ | `step` | granularity the thumb snaps to | `1` |
29
+ | `orientation` | `horizontal` \| `vertical` | `horizontal` |
30
+ | `disabled` | `boolean` | `false` |
31
+ | `className` | `string` — merged after the kit class | — |
32
+
33
+ Other props follow Base UI Slider.Root (`name`, `form`, `largeStep`,
34
+ `minStepsBetweenValues`, `thumbCollisionBehavior`, ...). The number of
35
+ rendered thumbs is derived from `value`/`defaultValue`'s length — a
36
+ `[10, 20]` default renders two thumbs automatically. Anything else is one
37
+ thumb, including a slider given neither prop: Base UI initializes that one
38
+ to the scalar `min`, so a second thumb would have no value behind it.
39
+
40
+ ## Examples
41
+
42
+ ```tsx
43
+ import { Slider } from '@gears-frontx/ui-kit';
44
+
45
+ // Single value
46
+ <Slider defaultValue={50} aria-label="Volume" />
47
+
48
+ // Range (two thumbs, derived from the array)
49
+ <Slider defaultValue={[20, 80]} aria-label="Price range" />
50
+
51
+ // Stepped, controlled
52
+ <Slider value={zoom} onValueChange={setZoom} min={50} max={200} step={10} aria-label="Zoom" />
53
+
54
+ // Vertical
55
+ <Slider orientation="vertical" defaultValue={30} aria-label="Brightness" />
56
+
57
+ // Disabled
58
+ <Slider defaultValue={40} disabled aria-label="Locked" />
59
+ ```
60
+
61
+ ## Anti-patterns
62
+
63
+ - Do not render one without a visible label or `aria-label` — the thumb
64
+ is a native range input under the hood and needs an accessible name.
65
+ - Do not use `onValueChange` for a network call on every pixel of drag —
66
+ use `onValueCommitted` for anything that shouldn't fire continuously.
@@ -0,0 +1,55 @@
1
+ # Spinner
2
+
3
+ A spinning loading indicator — lucide's `loader-circle` icon rotating
4
+ continuously via CSS. No Base UI primitive and no variant axis: a single
5
+ visual, sized like the kit's other small icons.
6
+
7
+ ## When to use
8
+
9
+ - A standalone loading indicator next to text ("Saving...") or inside a
10
+ container that has no button of its own to carry `loading`.
11
+ - Building a custom loading affordance where `Button`'s own built-in
12
+ `loading` prop (see `button.md`) doesn't apply — e.g. a loading state
13
+ inside a `Card` or a table cell.
14
+
15
+ ## When not to use
16
+
17
+ - Inside a `Button` — use `Button`'s `loading` prop instead; it already
18
+ centers a spinner, sets `aria-busy`, and keeps the button's label in the
19
+ accessibility tree. Reaching for this component there duplicates that
20
+ wiring by hand.
21
+
22
+ ## Props (kit level)
23
+
24
+ `Spinner` takes no kit-specific props — every prop is the underlying
25
+ native `<svg>` element's props, forwarded as-is. Two attributes carry a
26
+ default that a consumer can still override by passing their own:
27
+
28
+ | Attribute | Default | Override for |
29
+ |-----------|---------|--------------|
30
+ | `role` | `status` | A different live-region role, if the surrounding markup already announces the loading state. |
31
+ | `aria-label` | `Loading` (upstream's own hardcoded string) | A localized or more specific label ("Saving changes"). |
32
+
33
+ ## Examples
34
+
35
+ ```tsx
36
+ import { Spinner } from '@gears-frontx/ui-kit';
37
+
38
+ // Standalone, with its default "Loading" label
39
+ <Spinner />
40
+
41
+ // Inline next to text, with a specific label
42
+ <p style={{ display: 'flex', alignItems: 'center', gap: 'var(--space-2)' }}>
43
+ <Spinner aria-label="Saving changes" />
44
+ Saving changes...
45
+ </p>
46
+ ```
47
+
48
+ ## Anti-patterns
49
+
50
+ - Do not use this inside `Button` — use `loading` there (see `button.md`);
51
+ `Button`'s own spinner is a separate, simpler CSS-only implementation
52
+ already wired to `aria-busy`.
53
+ - Do not drop the `aria-label` via an empty override (`aria-label=""`) —
54
+ a spinner with no accessible name announces nothing to assistive tech;
55
+ either keep the default or supply a real label.
@@ -90,6 +90,67 @@ scroll wrapper" above) — it does not stand between the table and its
90
90
  implicit roles, since a plain ancestor `div` has no effect on a
91
91
  descendant's own role.
92
92
 
93
+ ## Metrics and type
94
+
95
+ Taken from the Studio Data Table frame:
96
+
97
+ | Part | Drawn | Shipped |
98
+ | --- | --- | --- |
99
+ | Header bar height | 36px | `--control-height-md` |
100
+ | Header label | JetBrains Mono 10/14, uppercase | the Mono role whole (`--font-mono`, `--text-mono-*`) + `text-transform: uppercase`, in `--subtle-foreground` |
101
+ | Cell block padding | 12px | `--space-3` |
102
+ | Cell inline padding | 16px | `--space-4` |
103
+ | Row height (one line of text) | 40px | falls out of the padding (16 + 12 + 12); `--control-height-lg` is also pinned as a floor on `.tableCell` so an empty or sub-line cell cannot collapse the row — `height` on a table cell is a floor, not a cap |
104
+ | Row height (row holding a 32px control) | 56px | falls out of the same padding (32 + 12 + 12) |
105
+ | Row rule | 1px | `--border-width` `--border` |
106
+
107
+ The header is the one place the table leaves Inter: its column labels are
108
+ mono by design, and that carries through to a header rendered as a button
109
+ (`DataTableSortButton` inherits it rather than imposing Button's own type).
110
+
111
+ Re-measured 2026-08-20 against the frame's node geometry rather than against
112
+ its rendered rows. Two earlier readings took the artifacts-root /
113
+ artifacts-folder row (node 40001712:10911) at face value — 56px tall, one
114
+ line of text, therefore 56px is the single-line row height — and pinned a
115
+ 56px floor on the cell to reproduce it. Walking that row's children shows
116
+ 56 is not a type measurement: the row holds a 32px Row-actions button at
117
+ y=12 and a 28px readiness ring at y=14, so its height is
118
+ `--control-height-sm` plus 12px of air a side. The 16px text line is the
119
+ shortest thing in the box.
120
+
121
+ The frame states its real block padding in the variants whose rows are
122
+ type-driven, where no control sets the height, and every one lands on 8–12px:
123
+ projects (40001450:5771) draws a 58px row with its text block at y=10..46;
124
+ activity (40001454:5364) a 64px row at y=8..51; findings (40001453:6215) a
125
+ 72px row at y=10..56. `--space-3` is that padding on the token scale, and it
126
+ reproduces the whole frame from one value instead of from a pinned number:
127
+ one Meta line gives 16 + 24 = 40px, a 32px control gives 32 + 24 = 56px
128
+ (artifacts-root exactly), two Meta lines give 32 + 24 = 56px against the
129
+ projects/activity rows' 58/64.
130
+
131
+ So the 56px row now falls out of the drawn control rather than being
132
+ asserted. That is also what fixes the case the pinned floor hid: at
133
+ `--space-4` the kit's own row-actions rows measured 65px against the frame's
134
+ 56 (32 + 16 + 16, plus the rule), and because a floor only ever grows a row
135
+ it could not pull that overshoot back — the error stayed invisible while
136
+ text-only rows sat at a coincidentally correct 56. 40px is kept as a floor
137
+ because it is the type-driven height anyway, and it is `--control-height-lg`,
138
+ which is also the height the frame draws every column resize handle at across
139
+ all six variants (e.g. 40001452:6069, 40001450:5916) and the height of the
140
+ projects header band.
141
+
142
+ Cell type needs no reconciliation either: the frame sets every cell in
143
+ Studio/Type/UI Secondary, which is Inter 12/16 — `--text-meta-*` exactly. An
144
+ earlier note here recorded the drawn line as a hand-set 17 normalized up to
145
+ the ramp's 16; the design context reports 16 outright.
146
+
147
+ `density="compact"` drops the header to `--control-height-sm` and the cells'
148
+ block padding to `--space-2`, taking a type-driven row to 32px. `height`
149
+ resets to `auto` in the compact override — the default density's 40px floor
150
+ would otherwise hold every compact row at the default height, since a floor
151
+ only ever grows a row, never shrinks one. The frame draws no compact
152
+ specimen, so that step is proportional rather than measured.
153
+
93
154
  ## Column widths
94
155
 
95
156
  There's no `width` prop — size a column the same way the upstream source's
@@ -105,30 +166,34 @@ wider than 100.
105
166
 
106
167
  `TableRow` reads plain `data-*` attributes for its state, forwarded like any
107
168
  other prop rather than driven by a kit-specific prop. Your own logic sets
108
- the attribute; the kit only paints it. Every row renders as the Studio Data
109
- Table's carded, ringed row unconditionally — the card shape (rounded
110
- corners, 1px ring, raised fill) is the primitive itself, not a composition
111
- layered on top of these hooks; the hooks below only change the ring's
112
- color/width or lift the fill, they don't turn carding on:
113
-
114
- - `data-state="selected"` — a 2px `--primary` ring on a `--card-hover`
115
- fill, for a row the user has selected (e.g. via a leading checkbox
116
- column).
117
- - `data-state="stale"` — a 1px `--warning` ring, for a row whose data
169
+ the attribute; the kit only paints it.
170
+
171
+ A row is flat: transparent at rest, packed against its neighbours, with a
172
+ single full-bleed 1px `--border` rule under it and no corner radius, ring,
173
+ or fill of its own. Every state below is expressed as a full-bleed tint on
174
+ that shape — the drawn state language of the Studio Data Table:
175
+
176
+ - `data-state="selected"` — a `--selection-subtle` tint, for a row the
177
+ user has selected (e.g. via a leading checkbox column).
178
+ - `data-state="stale"` — a `--warning-soft` tint, for a row whose data
118
179
  needs attention (out-of-date sync, pending action).
119
- - `data-state="restricted"` — a 1px `--danger` ring, for a row the
180
+ - `data-state="restricted"` — a `--danger-soft` tint, for a row the
120
181
  viewer lacks access to.
121
182
  - Hover, and any row containing a descendant that is *currently*
122
183
  `aria-expanded="true"` (e.g. a row-level disclosure toggle, only while
123
- open — a collapsed toggle does not match) — the fill lifts to
124
- `--card-hover`, an opaque surface one step up from the row's resting
125
- `--surface-elevated` (not a translucent tint). A `data-state` ring holds
126
- under hover; only the fill lifts.
127
-
128
- The rings follow the Studio Data Table's drawn state language (colored
129
- border, not a tinted surface); they are assembled from the row's cells,
130
- so they only close into a rectangle when the row's cells are direct
131
- children (`TableCell`/`TableHead` — the normal case).
184
+ open — a collapsed toggle does not match) — a `--muted` tint, one step
185
+ off both backdrops a table meets (`--surface` inside a card,
186
+ `--background` bare on the page). A `data-state` tint outranks hover, so
187
+ a selected row stays selected-colored under the pointer.
188
+
189
+ Because rows carry no fill at rest, the surface behind the table shows
190
+ through them — put a `Table` on a `Card`, on `DataTable`'s own card, or on
191
+ the page, and it takes that surface without any per-row override.
192
+
193
+ The rule under the last row of the table is dropped: below it sits either
194
+ the container's own bottom border or a footer bar's top border, and a
195
+ second line there would double it. A `<tfoot>` after the body still gets
196
+ its separator, since the body is then no longer the last section.
132
197
 
133
198
  ## Props (kit level)
134
199
 
@@ -7,8 +7,9 @@ elsewhere it keeps the native resize handle.
7
7
  ## When to use
8
8
 
9
9
  - Multi-line free text: descriptions, comments, messages.
10
- - Inside a `Field` to get label association and validation display for
11
- free — it registers with the surrounding Field like `Input` does.
10
+ - Inside a `Field` — wire `id`/`aria-describedby` to the surrounding
11
+ `FieldLabel`/`FieldDescription`/`FieldError` by hand (see field.md);
12
+ Textarea has no primitive to auto-register with, unlike `Input`.
12
13
 
13
14
  ## When not to use
14
15
 
@@ -26,6 +27,15 @@ All other props are native `<textarea>` props (`value`, `onChange`,
26
27
  `placeholder`, `disabled`, `rows`, `aria-invalid`, ...) and are forwarded
27
28
  as-is. `aria-invalid` switches the border and ring to the destructive color.
28
29
 
30
+ `rows` also sets a starting-height floor via CSS (a `--rows` custom
31
+ property, the same private-per-instance idiom as AspectRatio's `--ratio`):
32
+ `field-sizing: content` below makes the box grow with its own content, but
33
+ per the CSS Sizing spec that mode drops the native `rows`/`cols` attribute's
34
+ sizing contribution outright rather than using it as a starting point, so
35
+ `rows` alone renders identically to the unset default in any browser that
36
+ supports `field-sizing` - measured, not assumed. The floor reconstructs
37
+ what the attribute would have done.
38
+
29
39
  ## Examples
30
40
 
31
41
  ```tsx
@@ -42,6 +52,13 @@ import { Textarea } from '@gears-frontx/ui-kit';
42
52
 
43
53
  // Invalid state
44
54
  <Textarea aria-invalid={true} defaultValue={tooLong} />
55
+
56
+ // Inside a Field — id/aria-describedby wired by hand (see field.md)
57
+ <Field>
58
+ <FieldLabel htmlFor="notes">Notes</FieldLabel>
59
+ <Textarea id="notes" aria-describedby="notes-desc" />
60
+ <FieldDescription id="notes-desc">Optional context.</FieldDescription>
61
+ </Field>
45
62
  ```
46
63
 
47
64
  ## Anti-patterns
@@ -0,0 +1,77 @@
1
+ # ToggleGroup
2
+
3
+ A set of related toggle buttons that share pressed state. Wraps the Base
4
+ UI ToggleGroup/Toggle primitives: single- or multiple-selection, arrow-key
5
+ navigation between items, state via `data-pressed` on each item.
6
+
7
+ ## When to use
8
+
9
+ - A small set of related options presented as buttons: text alignment
10
+ (left/center/right), view mode (list/grid), a multi-select filter row.
11
+
12
+ ## When not to use
13
+
14
+ - Mutually-exclusive options with more prose or more than ~6 choices —
15
+ use `radio-group`.
16
+ - A single independent on/off control — use `toggle`.
17
+
18
+ ## Props (kit level)
19
+
20
+ `ToggleGroup`:
21
+
22
+ | Prop | Type | Default |
23
+ |------|------|---------|
24
+ | `value` / `defaultValue` | controlled / uncontrolled array of pressed item values | — |
25
+ | `onValueChange` | `(values: string[], eventDetails) => void` | — |
26
+ | `multiple` | allow more than one item pressed at once | `false` |
27
+ | `orientation` | `horizontal` \| `vertical` | `horizontal` |
28
+ | `disabled` | disables every item in the group | `false` |
29
+ | `variant` | `default` \| `outline` — applied to every item unless an item overrides it | `default` |
30
+ | `size` | `default` \| `sm` \| `lg` — applied to every item unless an item overrides it | `default` |
31
+ | `className` | `string` — merged after the kit class | — |
32
+
33
+ `ToggleGroupItem`: `value` (required — identifies the item), `variant`,
34
+ `size` (fall back to the group's when the group sets one), `className`;
35
+ other props follow Base UI Toggle (`disabled`, ...).
36
+
37
+ ## Examples
38
+
39
+ ```tsx
40
+ import { ToggleGroup, ToggleGroupItem } from '@gears-frontx/ui-kit';
41
+
42
+ // Single selection (the default)
43
+ <ToggleGroup value={align} onValueChange={([v]) => setAlign(v)} aria-label="Text alignment">
44
+ <ToggleGroupItem value="left" aria-label="Align left"><AlignLeftIcon /></ToggleGroupItem>
45
+ <ToggleGroupItem value="center" aria-label="Align center"><AlignCenterIcon /></ToggleGroupItem>
46
+ <ToggleGroupItem value="right" aria-label="Align right"><AlignRightIcon /></ToggleGroupItem>
47
+ </ToggleGroup>
48
+
49
+ // Multiple selection
50
+ <ToggleGroup multiple defaultValue={['bold']} variant="outline" aria-label="Text formatting">
51
+ <ToggleGroupItem value="bold" aria-label="Bold"><BoldIcon /></ToggleGroupItem>
52
+ <ToggleGroupItem value="italic" aria-label="Italic"><ItalicIcon /></ToggleGroupItem>
53
+ </ToggleGroup>
54
+
55
+ // Vertical, large
56
+ <ToggleGroup orientation="vertical" size="lg" aria-label="View mode">
57
+ <ToggleGroupItem value="list" aria-label="List view"><ListIcon /></ToggleGroupItem>
58
+ <ToggleGroupItem value="grid" aria-label="Grid view"><GridIcon /></ToggleGroupItem>
59
+ </ToggleGroup>
60
+ ```
61
+
62
+ ## Anti-patterns
63
+
64
+ - Do not render a `ToggleGroupItem` outside a `ToggleGroup` — pressed
65
+ state, arrow-key navigation, and single/multiple selection all live on
66
+ the group; use standalone `Toggle` instead.
67
+ - Do not omit `aria-label`/`aria-labelledby` on the group — it groups
68
+ buttons, but the group itself still needs a name for assistive tech.
69
+
70
+ ## Deviation from upstream
71
+
72
+ Upstream's `spacing` prop (`0` collapses the group into a bordered
73
+ "segment" look with adjoining items sharing borders, via Tailwind
74
+ arbitrary sibling selectors) is not ported — it's a Tailwind-specific
75
+ mechanic with no direct CSS Modules equivalent, and it is opt-in even
76
+ upstream (the shipped default is a small gap between independently
77
+ bordered items, which is what this component always renders).