@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
@@ -0,0 +1,254 @@
1
+ # Attachment
2
+
3
+ A file or image attachment card — a faithful port of [shadcn/ui's base
4
+ Attachment](https://ui.shadcn.com/docs/components/base/attachment). No
5
+ primitive to lean on — the upload state machine is hand-written, plain
6
+ data-attribute-driven CSS. Use it for files and images in chat composers,
7
+ message threads, and upload lists.
8
+
9
+ ## Utility dependencies
10
+
11
+ Attachment uses two utility classes shipped in this package's global
12
+ stylesheet: `import '@gears-frontx/ui-kit/utilities.css';` once at the app
13
+ entry, alongside `theme.css`.
14
+
15
+ - **`shimmer`** — `AttachmentTitle` adds it automatically while the
16
+ ancestor `Attachment`'s `state` is `'uploading'` or `'processing'`. This
17
+ is read from React context, not a prop: unlike upstream's pure-CSS
18
+ ancestor selector, attaching an unrelated *global* class conditionally
19
+ needs JavaScript, so `Attachment` provides its `state` via context and
20
+ `AttachmentTitle` consumes it internally — the consumer never re-passes
21
+ `state` to `AttachmentTitle` itself, matching upstream's prop-free API
22
+ exactly.
23
+ - **`scroll-fade-x`** and **`no-scrollbar`** — applied directly by
24
+ `AttachmentGroup` to its own scroll track, for the edge fade and hidden
25
+ scrollbar on its horizontally scrolling row.
26
+
27
+ Both utilities are inert if `utilities.css` isn't imported — import it
28
+ once alongside `theme.css` for these effects to render.
29
+
30
+ ## When to use
31
+
32
+ - A file or image attachment in a chat composer, message thread, or upload
33
+ list, with optional actions and upload state.
34
+
35
+ ## When not to use
36
+
37
+ - The visible bubble/surface of a text message — use [`Bubble`](bubble.md).
38
+ - A generic card — use `Card` (no upload-state axis, no media/actions
39
+ parts).
40
+
41
+ ## Composition
42
+
43
+ ```text
44
+ Attachment
45
+ ├── AttachmentMedia
46
+ ├── AttachmentContent
47
+ │ ├── AttachmentTitle
48
+ │ └── AttachmentDescription
49
+ ├── AttachmentActions
50
+ │ └── AttachmentAction
51
+ └── AttachmentTrigger
52
+ ```
53
+
54
+ ```text
55
+ AttachmentGroup
56
+ ├── Attachment
57
+ └── Attachment
58
+ ```
59
+
60
+ ## Variants
61
+
62
+ ### Attachment
63
+
64
+ | `state` | Description |
65
+ | ------------- | --------------------------------------------------------------------- |
66
+ | `idle` | Not yet started — dashed border, awaiting a drop or selection. |
67
+ | `uploading` | In progress — `AttachmentTitle` shimmers. |
68
+ | `processing` | Post-upload processing — `AttachmentTitle` shimmers. |
69
+ | `error` | Failed — destructive-tinted border, media, and description. |
70
+ | `done` | Complete (default) — the plain resting state. |
71
+
72
+ | `size` | Description |
73
+ | ----------- | ------------------------------------------------ |
74
+ | `default` | The standard attachment size. |
75
+ | `sm` | A smaller, denser attachment. |
76
+ | `xs` | The smallest attachment, tighter radius/icons. |
77
+
78
+ | `orientation` | Description |
79
+ | -------------- | ----------------------------------------- |
80
+ | `horizontal` | Media beside the content (default). |
81
+ | `vertical` | Media above the content, image-card style. |
82
+
83
+ ### AttachmentMedia
84
+
85
+ | `variant` | Description |
86
+ | --------- | ------------------------------------------- |
87
+ | `icon` | Holds a decorative file-type icon (default). |
88
+ | `image` | Holds an `<img>` preview. |
89
+
90
+ ## Props
91
+
92
+ ### Attachment
93
+
94
+ | Prop | Type | Default | Description |
95
+ | ------------- | -------------------------------------------------------------- | -------------- | ---------------------------------------------------- |
96
+ | `state` | `'idle' \| 'uploading' \| 'processing' \| 'error' \| 'done'` | `'done'` | The upload state. Drives styling and the shimmer. |
97
+ | `size` | `'default' \| 'sm' \| 'xs'` | `'default'` | The attachment size. |
98
+ | `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | Lay the media beside or above the content. |
99
+ | `className` | `string` | — | Merged after the variant classes. |
100
+
101
+ All other props are native `<div>` props and are forwarded as-is.
102
+
103
+ ### AttachmentMedia
104
+
105
+ | Prop | Type | Default | Description |
106
+ | ----------- | ------------------- | -------- | --------------------------------------- |
107
+ | `variant` | `'icon' \| 'image'` | `'icon'` | Whether the media holds an icon or an `<img>`. |
108
+ | `className` | `string` | — | Merged after the variant class. |
109
+
110
+ ### AttachmentTitle / AttachmentDescription / AttachmentContent / AttachmentActions
111
+
112
+ Each accepts only `className` (merged after its base class) plus native
113
+ props for its element (`<span>` for Title/Description, `<div>` for
114
+ Content/Actions) — no `state` prop of their own; see "Utility
115
+ dependencies" above for how `AttachmentTitle` still reacts to the
116
+ ancestor's upload state.
117
+
118
+ ### AttachmentAction
119
+
120
+ | Prop | Type | Default | Description |
121
+ | ---------- | --------------------------------------- | -------- | ------------------------------------------ |
122
+ | `size` | Kit `Button`'s `size` (`'default' \| 'sm' \| 'lg'`) | `'sm'` | The button size — see the drift note below. |
123
+ | `...props` | `ComponentProps<typeof Button>` | — | Props spread to the underlying kit `Button`. |
124
+
125
+ **Drift from upstream:** shadcn's `AttachmentAction` defaults to
126
+ `size="icon-xs"` — a dedicated micro icon-only step this kit's `Button`
127
+ does not have.
128
+ `size="sm"` is the smallest step available; icon-only squaring already
129
+ works at any size via `Button`'s own `[data-icon-only]` rule, so the
130
+ visual result is a slightly larger action button (32px) than upstream's
131
+ (24px), not a broken one.
132
+
133
+ ### AttachmentTrigger
134
+
135
+ | Prop | Type | Default | Description |
136
+ | ---------- | ---------------------------------- | ------- | ------------------------------------------------- |
137
+ | `render` | `ReactElement` — replaces the root `button` | — | Render as a different element, such as a link. |
138
+ | `...props` | native `<button>` props | — | Forwarded as-is. |
139
+
140
+ ### AttachmentGroup
141
+
142
+ Accepts only `className` (merged after the layout class, alongside the
143
+ `scroll-fade-x`/`no-scrollbar` utility classes) plus native `<div>` props.
144
+
145
+ `attachmentVariants`/`attachmentMediaVariants` (the underlying `cva`
146
+ recipes) are also exported.
147
+
148
+ ## Examples
149
+
150
+ ```tsx
151
+ import {
152
+ Attachment,
153
+ AttachmentAction,
154
+ AttachmentActions,
155
+ AttachmentContent,
156
+ AttachmentDescription,
157
+ AttachmentMedia,
158
+ AttachmentTitle,
159
+ } from '@gears-frontx/ui-kit';
160
+
161
+ <Attachment>
162
+ <AttachmentMedia>
163
+ <FileTextIcon />
164
+ </AttachmentMedia>
165
+ <AttachmentContent>
166
+ <AttachmentTitle>sales-dashboard.pdf</AttachmentTitle>
167
+ <AttachmentDescription>PDF · 2.4 MB</AttachmentDescription>
168
+ </AttachmentContent>
169
+ <AttachmentActions>
170
+ <AttachmentAction aria-label="Remove sales-dashboard.pdf">
171
+ <XIcon />
172
+ </AttachmentAction>
173
+ </AttachmentActions>
174
+ </Attachment>;
175
+ ```
176
+
177
+ ### Image
178
+
179
+ ```tsx
180
+ <Attachment orientation="vertical">
181
+ <AttachmentMedia variant="image">
182
+ <img src="/preview.png" alt="" />
183
+ </AttachmentMedia>
184
+ <AttachmentContent>
185
+ <AttachmentTitle>workspace.png</AttachmentTitle>
186
+ <AttachmentDescription>PNG · 1.1 MB</AttachmentDescription>
187
+ </AttachmentContent>
188
+ </Attachment>
189
+ ```
190
+
191
+ ### Upload states
192
+
193
+ ```tsx
194
+ <Attachment state="uploading">
195
+ <AttachmentMedia>
196
+ <FileIcon />
197
+ </AttachmentMedia>
198
+ <AttachmentContent>
199
+ <AttachmentTitle>large-export.csv</AttachmentTitle>
200
+ <AttachmentDescription>Uploading…</AttachmentDescription>
201
+ </AttachmentContent>
202
+ </Attachment>
203
+ ```
204
+
205
+ ### Group
206
+
207
+ ```tsx
208
+ <AttachmentGroup>
209
+ <Attachment size="sm">{/* … */}</Attachment>
210
+ <Attachment size="sm">{/* … */}</Attachment>
211
+ </AttachmentGroup>
212
+ ```
213
+
214
+ ### Trigger
215
+
216
+ ```tsx
217
+ <Dialog>
218
+ <Attachment>
219
+ {/* media, content, actions */}
220
+ <DialogTrigger render={<AttachmentTrigger aria-label="Preview research-summary.pdf" />} />
221
+ </Attachment>
222
+ <DialogContent>{/* … */}</DialogContent>
223
+ </Dialog>
224
+ ```
225
+
226
+ ## Accessibility
227
+
228
+ `AttachmentAction` renders a `Button`, and `AttachmentTrigger` renders a
229
+ real `<button>` (or your element via `render`).
230
+
231
+ - **Label icon-only actions.** `AttachmentAction` is usually icon-only —
232
+ give each one an `aria-label` describing the action and its target.
233
+ - **Label the trigger.** `AttachmentTrigger` covers the card with no text
234
+ of its own — give it an `aria-label` for what activating it does. It
235
+ sits behind the actions in the stacking order, so an `AttachmentAction`
236
+ and the `AttachmentTrigger` never trap each other — both remain
237
+ separately focusable and clickable.
238
+ - **Keyboard scrolling.** `AttachmentGroup` scrolls horizontally. When its
239
+ attachments are interactive (a trigger or actions), keyboard users reach
240
+ off-screen items by tabbing to them. For a row of presentational
241
+ attachments, make the group itself focusable and scrollable by adding
242
+ `tabIndex={0}`, `role="group"`, and an `aria-label`.
243
+ - **Meaning beyond color.** The `error` state uses a destructive color —
244
+ keep the failure reason in `AttachmentDescription` so the state is not
245
+ conveyed by color alone.
246
+
247
+ ## Anti-patterns
248
+
249
+ - Do not rely on `error` styling alone to communicate failure — pair it
250
+ with text in `AttachmentDescription`.
251
+ - Do not nest another full `Attachment` inside `AttachmentActions` — that
252
+ slot is for action buttons, not attachments.
253
+ - Do not forget `utilities.css` — without it, `AttachmentTitle`'s shimmer
254
+ and `AttachmentGroup`'s edge fade/hidden scrollbar silently do nothing.
@@ -0,0 +1,185 @@
1
+ # Avatar
2
+
3
+ A user's profile picture, with a fallback for when it hasn't loaded (or
4
+ doesn't exist). Wraps the Base UI Avatar primitive for the image/fallback
5
+ timing; the badge and group parts have no Base UI primitive underneath —
6
+ they're plain markup positioned via CSS.
7
+
8
+ Composition: `Avatar` (root, sizes itself and clips its content to a
9
+ circle) → `AvatarImage` (shown once loaded) + `AvatarFallback` (shown
10
+ until then, or on error) + optional `AvatarBadge` (a status dot in the
11
+ corner). `AvatarGroup` wraps several `Avatar`s (and optionally one
12
+ `AvatarGroupCount`) to overlap them into a stack.
13
+
14
+ ## When to use
15
+
16
+ - A user or account's profile picture next to their name, in a comment,
17
+ a list row, or a header.
18
+ - A stack of participants (a thread, a call, a shared document) via
19
+ `AvatarGroup` + `AvatarGroupCount` for "+N more".
20
+
21
+ ## When not to use
22
+
23
+ - A generic icon with no identity behind it — a plain icon/button doesn't
24
+ need the image-loading/fallback machinery this component provides.
25
+
26
+ ## Props
27
+
28
+ `Avatar` (root):
29
+
30
+ | Prop | Type | Default |
31
+ |------|------|---------|
32
+ | `size` | `sm` \| `default` \| `lg` | `default` |
33
+ | `className` | `string` — merged after the kit class | — |
34
+
35
+ All other props are native `<span>` props, forwarded to Base UI's
36
+ `Avatar.Root`.
37
+
38
+ `AvatarImage`: all native `<img>` props plus `onLoadingStatusChange`
39
+ (fires with `'idle' | 'loading' | 'loaded' | 'error'`). Renders nothing
40
+ until the image has loaded — `AvatarFallback` is what's visible until
41
+ then.
42
+
43
+ `AvatarFallback`:
44
+
45
+ | Prop | Type | Default |
46
+ |------|------|---------|
47
+ | `tone` | `neutral` \| `accent` \| `info` \| `success` \| `warning` \| `danger` | `neutral` |
48
+ | `variant` | `solid` \| `soft` | `soft` |
49
+ | `delay` | `number` — ms to wait before showing the fallback | — |
50
+ | `className` | `string` — merged after the kit class | — |
51
+
52
+ `tone` × `variant` is the fill matrix: `solid` paints the tone at full
53
+ strength with an on-primary label, `soft` puts the tone's own label color
54
+ on its soft surface. The `neutral`/`soft` default is the plain
55
+ muted-on-muted fill, so a fallback given neither prop looks exactly as it
56
+ did before these axes existed.
57
+
58
+ **`tone` is identity styling, not status.** Derive it from *who* the
59
+ avatar stands for — a stable hash of a user id, a team's assigned color —
60
+ so the same person keeps the same circle everywhere. It must not encode a
61
+ live state (online, invited, suspended); that is `AvatarBadge`'s job.
62
+
63
+ `delay` is useful to skip a flash of fallback for fast-loading images —
64
+ omitted means "show immediately". The fallback renders whenever the image
65
+ hasn't finished loading (`idle`/`loading`/`error`), regardless of whether
66
+ an `AvatarImage` is even present.
67
+
68
+ `AvatarBadge`: all native `<span>` props. Positioned absolutely against
69
+ the `Avatar` root's bottom-right corner — mount it as a **direct child of
70
+ `Avatar`**, alongside `AvatarImage`/`AvatarFallback`; its own dot size
71
+ scales with the ancestor `Avatar`'s `size` (hidden entirely at `size="sm"`,
72
+ matching upstream — a status dot has no room to read at the smallest
73
+ size).
74
+
75
+ `AvatarGroup`: all native `<div>` props. Overlaps its children by half a
76
+ step and gives each one a 2px ring in the page background color, so the
77
+ circles read as separate discs where they overlap. The ring is drawn
78
+ outside each member's circle, so it cuts cleanly through the member behind
79
+ it whatever that member is filled with — a photo, a plain fallback, or any
80
+ `tone`/`variant` fill. Members paint in DOM order, so the last one in the
81
+ markup sits on top of the stack.
82
+
83
+ `AvatarGroupCount`:
84
+
85
+ | Prop | Type | Default |
86
+ |------|------|---------|
87
+ | `tone` | `neutral` \| `accent` \| `info` \| `success` \| `warning` \| `danger` | `neutral` |
88
+ | `variant` | `solid` \| `soft` | `soft` |
89
+ | `className` | `string` — merged after the kit class | — |
90
+
91
+ Plus all native `<div>` props. It takes the same fill matrix as
92
+ `AvatarFallback` so a "+3" chip can match the toned members it caps off.
93
+ It takes no `size` prop — it sizes itself off its sibling `Avatar`s' `size`
94
+ inside the same `AvatarGroup` (via a CSS `:has()` selector), because size
95
+ is a property of the group while tone is a choice about this one chip.
96
+
97
+ ## Examples
98
+
99
+ ```tsx
100
+ import { Avatar, AvatarFallback, AvatarImage } from '@gears-frontx/ui-kit';
101
+
102
+ <Avatar>
103
+ <AvatarImage src="/jane.jpg" alt="Jane Doe" />
104
+ <AvatarFallback>JD</AvatarFallback>
105
+ </Avatar>;
106
+
107
+ // Small, with a status badge
108
+ <Avatar size="sm">
109
+ <AvatarImage src="/jane.jpg" alt="Jane Doe" />
110
+ <AvatarFallback>JD</AvatarFallback>
111
+ </Avatar>;
112
+
113
+ <Avatar size="lg">
114
+ <AvatarImage src="/jane.jpg" alt="Jane Doe" />
115
+ <AvatarFallback>JD</AvatarFallback>
116
+ <AvatarBadge />
117
+ </Avatar>;
118
+ ```
119
+
120
+ ```tsx
121
+ // Identity fills: a colored circle per person, tone picked from the user id
122
+ <Avatar>
123
+ <AvatarFallback tone="accent" variant="solid">
124
+ ML
125
+ </AvatarFallback>
126
+ </Avatar>;
127
+
128
+ <Avatar>
129
+ <AvatarFallback tone="success" variant="soft">
130
+ JB
131
+ </AvatarFallback>
132
+ </Avatar>;
133
+ ```
134
+
135
+ ```tsx
136
+ import { Avatar, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage } from '@gears-frontx/ui-kit';
137
+
138
+ <AvatarGroup>
139
+ <Avatar>
140
+ <AvatarImage src="/jane.jpg" alt="Jane Doe" />
141
+ <AvatarFallback>JD</AvatarFallback>
142
+ </Avatar>
143
+ <Avatar>
144
+ <AvatarImage src="/sam.jpg" alt="Sam Lee" />
145
+ <AvatarFallback>SL</AvatarFallback>
146
+ </Avatar>
147
+ <AvatarGroupCount>+3</AvatarGroupCount>
148
+ </AvatarGroup>;
149
+
150
+ // Toned members; the count chip can carry a fill of its own
151
+ <AvatarGroup>
152
+ <Avatar>
153
+ <AvatarFallback tone="accent" variant="solid">
154
+ ML
155
+ </AvatarFallback>
156
+ </Avatar>
157
+ <Avatar>
158
+ <AvatarFallback tone="success" variant="solid">
159
+ JB
160
+ </AvatarFallback>
161
+ </Avatar>
162
+ <AvatarGroupCount tone="accent" variant="soft">
163
+ +3
164
+ </AvatarGroupCount>
165
+ </AvatarGroup>;
166
+ ```
167
+
168
+ ## Anti-patterns
169
+
170
+ - Do not mount `AvatarBadge` outside of an `Avatar` — its absolute
171
+ positioning is anchored to the root's own `position: relative`, and
172
+ its size reads the ancestor `Avatar`'s size class.
173
+ - Do not expect `AvatarFallback` to hide once `AvatarImage` starts
174
+ loading — it stays visible until the image finishes loading
175
+ successfully (or indefinitely on error/no `src`), by design (see
176
+ upstream's own doc comment: "the image to be displayed" is a distinct
177
+ concern from "what shows while it isn't").
178
+ - Do not give `AvatarGroupCount` a `size` prop expecting it to control its
179
+ own dimensions — it has none; it sizes itself from its sibling
180
+ `Avatar`s' `size` within the same `AvatarGroup`.
181
+ - Do not drive `AvatarFallback`'s `tone` from a status (`danger` for a
182
+ suspended account, `success` for an online one) — a person's circle would
183
+ change color as their state changes, breaking the recognition the fill
184
+ exists to provide. Use `AvatarBadge` for state and keep `tone` tied to
185
+ identity.
@@ -1,96 +1,108 @@
1
1
  # Badge
2
2
 
3
- A status label: an intent-colored caption with an optional status dot or
4
- icon, as a soft pill or a bare label. Badge has no Base UI primitive — it's a
5
- styled `span`, plus a `render` prop (via Base UI's `useRender`/`mergeProps`
6
- utilities) for the one case that needs it: rendering as a link.
7
-
8
- Badge speaks **semantic intent only** (per the Studio design): you say what
9
- kind of state you're marking (`success`, `warning`, `info`, `danger`,
10
- `muted`), never how to paint it. The prop is the kit-wide `variant` — like
11
- every other component — but its values are states, not paint jobs: there is
12
- no `primary`/`outline`/`ghost` here, and picking `warning` because you want
13
- orange is a misuse, not a style choice.
3
+ A compact inline label — a faithful port of [shadcn/ui's base
4
+ Badge](https://ui.shadcn.com/docs/components/base/badge). Badge has no
5
+ Base UI primitive — it's a styled `span`, plus a `render` prop (via Base
6
+ UI's `useRender`/`mergeProps` utilities) for the one case that needs it:
7
+ rendering as a link.
8
+
9
+ Badge's variant axis is **paint only**, in two groups on one axis:
10
+
11
+ - **Upstream paint** — `default`, `secondary`, `destructive`, `outline`,
12
+ `ghost`, `link`: the same six names and the same meaning as
13
+ [Button](button.md)'s.
14
+ - **Tone** — `success`, `warning`, `danger`, `info`, `accent`: a soft
15
+ tinted fill with the tone's own color as the label, matching the Studio
16
+ design's Badge row. Its sixth specimen, Neutral, is `secondary` — that
17
+ variant already paints the drawn pair exactly, so there is no separate
18
+ `neutral` name.
19
+
20
+ Note that `destructive` and `danger` are both present on purpose: solid
21
+ red with a white label, and a soft red fill with a red label — two
22
+ emphasis levels of the same red.
23
+
24
+ A tone is still paint, not state: it colors a label, it does not track
25
+ one. Badge's five tones (`success`, `warning`, `danger`, `info`, `accent`)
26
+ are the semantic-ish colors available — pick the one that best matches the
27
+ status, but keep the label text itself explicit; color alone is not a
28
+ substitute for a state machine.
29
+
30
+ > **Accessibility caveat on tones.** At Badge's 12px/500 label, WCAG 1.4.3
31
+ > asks 4.5:1. Four of the drawn tone pairs currently fall short — light
32
+ > `success` 3.43:1, `warning` 2.90:1, `danger` 4.28:1, `info` 3.73:1, and
33
+ > dark `danger` 3.80:1 — because the shortfall is in the theme's status
34
+ > token pairs, not in this component. Until those pairs are re-pinned, do
35
+ > not let a tone's color be the only thing carrying the meaning: keep the
36
+ > label text itself explicit. `accent` and `secondary` clear AA in both
37
+ > themes, as do `success`, `warning` and `info` in dark.
14
38
 
15
39
  ## When to use
16
40
 
17
- - A status attached to an entity in a list, table cell, or page header:
18
- `running` → `success`, `failed` → `danger`, `pending` → `warning`,
19
- `beta`/`new` → `info`, anything neutral (`draft`, `archived`, a count,
20
- a category) → `muted`.
21
- - `shape="pill"` (default) on busy surfaces where the label needs its own
22
- soft fill; `shape="plain"` inline with text or in dense tables where a
23
- fill would be noise. Add `dot` when the state deserves a colored marker,
24
- or pass `icon` for a more specific one — neither renders by default.
25
- - A clickable status filter — pass `render={<a href="..." />}`. The pill's
26
- fill deepens on hover and the plain shape underlines, but only when actually
27
- rendered as a link; a plain badge stays visually inert and never looks
28
- clickable when it isn't. The kit's focus ring appears automatically once
29
- the anchor receives keyboard focus. Give it discernible text — a badge
30
- with no accessible name is unusable via keyboard or screen reader.
41
+ - A short, static inline label: a count, a category tag, a plan name, a
42
+ version number.
43
+ - A status label that benefits from color (running/failed/pending/beta) —
44
+ pick the tone variant (`success`/`warning`/`danger`/`info`/`accent`)
45
+ that matches the meaning, and still spell the status out in the label
46
+ text; a tone is paint, not a live indicator.
47
+ - A clickable tag — pass `render={<a href="..." />}`. The kit's focus
48
+ ring appears once the anchor receives keyboard focus, and hover
49
+ feedback (background/underline) only applies once actually rendered as
50
+ a link. Give it discernible text — a badge with no accessible name is
51
+ unusable via keyboard or screen reader.
31
52
 
32
53
  ## When not to use
33
54
 
34
55
  - A clickable action with its own visual weight — use `button`.
35
56
  - Long or wrapping text — Badge is single-line (`white-space: nowrap`) and
36
57
  clips overflow.
37
- - Prose-colored emphasis or arbitrary brand colors — intents are the whole
38
- vocabulary; recoloring a badge via CSS breaks the semantic contract.
39
58
 
40
59
  ## Props (kit level)
41
60
 
42
61
  | Prop | Type | Default |
43
62
  |------|------|---------|
44
- | `variant` | `success` \| `warning` \| `info` \| `danger` \| `muted` | `muted` |
45
- | `shape` | `pill` \| `plain` | `pill` |
46
- | `dot` | `boolean` — show the status dot in the variant's accent color; ignored when `icon` is set | `false` |
47
- | `icon` | `ReactNode` — leading icon, decorative (`aria-hidden`), 12px, accent-colored; replaces the dot | — |
63
+ | `variant` | `default` \| `secondary` \| `destructive` \| `outline` \| `ghost` \| `link` \| `success` \| `warning` \| `danger` \| `info` \| `accent` | `default` |
48
64
  | `render` | `ReactElement` — replaces the root `span`, e.g. with an `<a>` | — |
49
- | `className` | `string` — merged after the variant/shape classes | — |
65
+ | `className` | `string` — merged after the variant class | — |
50
66
 
51
67
  All other props are native `<span>` props (or the target element's props
52
68
  when using `render`) and are forwarded as-is, including `aria-invalid`
53
69
  (shows a destructive-tinted border and ring, independent of `variant`).
54
70
 
71
+ `badgeVariants` (the underlying `cva` recipe) is also exported, for a
72
+ consumer that needs the class string without the component — e.g. styling
73
+ a link that must stay a real `<a>` outside of `render`.
74
+
55
75
  ## Examples
56
76
 
57
77
  ```tsx
58
78
  import { Badge } from '@gears-frontx/ui-kit';
59
79
 
60
- // Status labels (pill is the default shape)
61
- <Badge variant="success">Running</Badge>
62
- <Badge variant="danger">Failed</Badge>
63
- <Badge variant="warning">Degraded</Badge>
64
- <Badge variant="info">Beta</Badge>
65
- <Badge>Draft</Badge> // muted is the default variant
66
-
67
- // Status dot is opt-in
68
- <Badge variant="success" dot>Running</Badge>
69
-
70
- // Bare label for dense/inline placements (dot optional there too)
71
- <Badge variant="success" shape="plain" dot>Online</Badge>
72
-
73
- // A custom marker instead of the dot
74
- <Badge variant="info" icon={<BetaIcon />}>Beta</Badge>
80
+ // Upstream paint
81
+ <Badge>default</Badge>
82
+ <Badge variant="secondary">secondary</Badge>
83
+ <Badge variant="destructive">destructive</Badge>
84
+ <Badge variant="outline">outline</Badge>
85
+ <Badge variant="ghost">ghost</Badge>
86
+ <Badge variant="link">link</Badge>
87
+
88
+ // Tone — soft fill, tone-colored label ("secondary" is this row's Neutral)
89
+ <Badge variant="success">success</Badge>
90
+ <Badge variant="warning">warning</Badge>
91
+ <Badge variant="danger">danger</Badge>
92
+ <Badge variant="info">info</Badge>
93
+ <Badge variant="accent">accent</Badge>
75
94
 
76
95
  // A badge that is actually a link — hover feedback only applies here
77
- <Badge variant="info" render={<a href="/filters/open" />}>
78
- 3 open
96
+ <Badge variant="outline" render={<a href="/plans/pro" />}>
97
+ Pro plan
79
98
  </Badge>
80
99
  ```
81
100
 
82
101
  ## Anti-patterns
83
102
 
84
- - Do not pick a variant for its color ("warning looks nice and orange") —
85
- intents are semantics; if no state maps, use `muted`.
86
- - Do not recolor a badge via `className`/`style` — the intent palette and
87
- its contrast math live in the kit; brand changes belong in theme tokens.
88
- - Do not expect hover feedback from a plain (non-`render`) badge — it only
89
- appears when the badge actually renders as a link via `render`.
103
+ - Do not let a tone carry meaning on its own — a tone paints, it does not
104
+ announce. Always spell out the meaning in the label text itself.
90
105
  - Do not nest interactive controls inside a Badge — it is a label, not a
91
106
  container.
92
- - Do not pass both `icon` and `dot` expecting both to render — `icon`
93
- replaces the dot by design.
94
- - Do not drop an icon into Badge's children (`<Badge><Icon />label</Badge>`)
95
- — the kit no longer sizes a bare svg child; use the `icon` prop, which is
96
- sized and accent-colored automatically.
107
+ - Do not expect hover feedback from a plain (non-`render`) badge — it only
108
+ appears when the badge actually renders as a link via `render`.