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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (493) hide show
  1. package/README.md +28 -6
  2. package/dist/accordion.d.ts +1 -0
  3. package/dist/accordion.js +35 -0
  4. package/dist/accordion.js.map +1 -0
  5. package/dist/alert-dialog.d.ts +1 -0
  6. package/dist/alert-dialog.js +97 -0
  7. package/dist/alert-dialog.js.map +1 -0
  8. package/dist/alert.d.ts +1 -0
  9. package/dist/alert.js +39 -0
  10. package/dist/alert.js.map +1 -0
  11. package/dist/aspect-ratio.d.ts +1 -0
  12. package/dist/aspect-ratio.js +19 -0
  13. package/dist/aspect-ratio.js.map +1 -0
  14. package/dist/attachment.d.ts +1 -0
  15. package/dist/attachment.js +133 -0
  16. package/dist/attachment.js.map +1 -0
  17. package/dist/avatar.d.ts +1 -0
  18. package/dist/avatar.js +87 -0
  19. package/dist/avatar.js.map +1 -0
  20. package/dist/badge.js +32 -46
  21. package/dist/badge.js.map +1 -1
  22. package/dist/breadcrumb.d.ts +1 -0
  23. package/dist/breadcrumb.js +81 -0
  24. package/dist/breadcrumb.js.map +1 -0
  25. package/dist/bubble.d.ts +1 -0
  26. package/dist/bubble.js +94 -0
  27. package/dist/bubble.js.map +1 -0
  28. package/dist/button-group.d.ts +1 -0
  29. package/dist/button-group.js +61 -0
  30. package/dist/button-group.js.map +1 -0
  31. package/dist/button.js +30 -29
  32. package/dist/button.js.map +1 -1
  33. package/dist/calendar.d.ts +1 -0
  34. package/dist/calendar.js +134 -0
  35. package/dist/calendar.js.map +1 -0
  36. package/dist/card.js +24 -24
  37. package/dist/carousel.d.ts +1 -0
  38. package/dist/carousel.js +163 -0
  39. package/dist/carousel.js.map +1 -0
  40. package/dist/chart.d.ts +1 -0
  41. package/dist/chart.js +202 -0
  42. package/dist/chart.js.map +1 -0
  43. package/dist/checkbox.js +14 -39
  44. package/dist/checkbox.js.map +1 -1
  45. package/dist/chunks/accordion.X_AK08Iv.css +1 -0
  46. package/dist/chunks/alert-dialog.B50f-Gsz.css +1 -0
  47. package/dist/chunks/alert.BJLRcB65.css +1 -0
  48. package/dist/chunks/aspect-ratio.DJbPE7BX.css +1 -0
  49. package/dist/chunks/attachment.rknKEWlr.css +1 -0
  50. package/dist/chunks/avatar.CsQmQnay.css +1 -0
  51. package/dist/chunks/badge.DR0epAiZ.css +1 -0
  52. package/dist/chunks/breadcrumb.QKz32ceR.css +1 -0
  53. package/dist/chunks/bubble.BKcAopT7.css +1 -0
  54. package/dist/chunks/button-group.D0Ir-jbL.css +1 -0
  55. package/dist/chunks/button.D69BdJF1.css +1 -0
  56. package/dist/chunks/calendar.Cnbv4EzY.css +1 -0
  57. package/dist/chunks/card.D3Ct_dza.css +1 -0
  58. package/dist/chunks/carousel.CjaKGN_D.css +1 -0
  59. package/dist/chunks/chart.CeyctrXQ.css +1 -0
  60. package/dist/chunks/checkbox.CZfE_PkU.css +1 -0
  61. package/dist/chunks/collapsible.BQ-sU5sQ.css +1 -0
  62. package/dist/chunks/combobox.CtYpZAKB.css +1 -0
  63. package/dist/chunks/command.Km60IuqD.css +1 -0
  64. package/dist/chunks/context-menu.Bjib7_AL.css +1 -0
  65. package/dist/chunks/data-table.DECm3qI-.css +1 -0
  66. package/dist/chunks/date-picker.BcRqyOg8.css +1 -0
  67. package/dist/chunks/dialog.BxcZ12Gb.css +1 -0
  68. package/dist/chunks/drawer.BkS_qEHj.css +1 -0
  69. package/dist/chunks/dropdown-menu.CDaeWYDT.css +1 -0
  70. package/dist/chunks/empty.B334jSES.css +1 -0
  71. package/dist/chunks/field.yTrg1G90.css +1 -0
  72. package/dist/chunks/hover-card.DmwvigMp.css +1 -0
  73. package/dist/chunks/input-group.CFIUP-Oh.css +1 -0
  74. package/dist/chunks/input-otp.XSpqyVij.css +1 -0
  75. package/dist/chunks/input.DvA_mTq8.css +1 -0
  76. package/dist/chunks/item.CLg1KaYF.css +1 -0
  77. package/dist/chunks/kbd.DZuUVB_m.css +1 -0
  78. package/dist/chunks/marker.DDxI_rZn.css +1 -0
  79. package/dist/chunks/menubar.CxRNI9o4.css +1 -0
  80. package/dist/chunks/message-scroller.CbLooS7Q.css +1 -0
  81. package/dist/chunks/message.BhD5JDJK.css +1 -0
  82. package/dist/chunks/native-select.BdYLTCZv.css +1 -0
  83. package/dist/chunks/navigation-menu.C2JGHAKD.css +1 -0
  84. package/dist/chunks/pagination.DUiQuWla.css +1 -0
  85. package/dist/chunks/popover.fOvPrnsr.css +1 -0
  86. package/dist/chunks/progress.Bp13t8iw.css +1 -0
  87. package/dist/chunks/questionnaire.DYnuWKAQ.css +1 -0
  88. package/dist/chunks/radio-group.CV3MBCsI.css +1 -0
  89. package/dist/chunks/resizable.B71V-1lR.css +1 -0
  90. package/dist/chunks/scroll-area.C4kWMAsU.css +1 -0
  91. package/dist/chunks/select.iEwV-sfJ.css +1 -0
  92. package/dist/chunks/sheet.DALPg9vf.css +1 -0
  93. package/dist/chunks/sidebar.CGTQhfWG.css +1 -0
  94. package/dist/chunks/slider.B5nouD7J.css +1 -0
  95. package/dist/chunks/spinner.UKK4f1tu.css +1 -0
  96. package/dist/chunks/switch.CIW9Jr1x.css +1 -0
  97. package/dist/chunks/table.CFAJfhd-.css +1 -0
  98. package/dist/chunks/tabs.C4jGj2Vg.css +1 -0
  99. package/dist/chunks/textarea.ORRSI69B.css +1 -0
  100. package/dist/chunks/toggle-group.Bd0cCCnV.css +1 -0
  101. package/dist/chunks/toggle.B9tvfl1n.css +1 -0
  102. package/dist/collapsible.d.ts +1 -0
  103. package/dist/collapsible.js +22 -0
  104. package/dist/collapsible.js.map +1 -0
  105. package/dist/combobox.d.ts +1 -0
  106. package/dist/combobox.js +159 -0
  107. package/dist/combobox.js.map +1 -0
  108. package/dist/command.d.ts +1 -0
  109. package/dist/command.js +75 -0
  110. package/dist/command.js.map +1 -0
  111. package/dist/components/accordion/accordion.d.ts +24 -0
  112. package/dist/components/accordion/accordion.d.ts.map +1 -0
  113. package/dist/components/accordion/public.d.ts +2 -0
  114. package/dist/components/accordion/public.d.ts.map +1 -0
  115. package/dist/components/alert/alert.d.ts +21 -0
  116. package/dist/components/alert/alert.d.ts.map +1 -0
  117. package/dist/components/alert/public.d.ts +2 -0
  118. package/dist/components/alert/public.d.ts.map +1 -0
  119. package/dist/components/alert-dialog/alert-dialog.d.ts +95 -0
  120. package/dist/components/alert-dialog/alert-dialog.d.ts.map +1 -0
  121. package/dist/components/alert-dialog/public.d.ts +2 -0
  122. package/dist/components/alert-dialog/public.d.ts.map +1 -0
  123. package/dist/components/aspect-ratio/aspect-ratio.d.ts +8 -0
  124. package/dist/components/aspect-ratio/aspect-ratio.d.ts.map +1 -0
  125. package/dist/components/aspect-ratio/public.d.ts +2 -0
  126. package/dist/components/aspect-ratio/public.d.ts.map +1 -0
  127. package/dist/components/attachment/attachment.d.ts +71 -0
  128. package/dist/components/attachment/attachment.d.ts.map +1 -0
  129. package/dist/components/attachment/public.d.ts +2 -0
  130. package/dist/components/attachment/public.d.ts.map +1 -0
  131. package/dist/components/avatar/avatar.d.ts +40 -0
  132. package/dist/components/avatar/avatar.d.ts.map +1 -0
  133. package/dist/components/avatar/public.d.ts +2 -0
  134. package/dist/components/avatar/public.d.ts.map +1 -0
  135. package/dist/components/badge/badge.d.ts +3 -16
  136. package/dist/components/badge/badge.d.ts.map +1 -1
  137. package/dist/components/badge/public.d.ts +1 -1
  138. package/dist/components/badge/public.d.ts.map +1 -1
  139. package/dist/components/breadcrumb/breadcrumb.d.ts +19 -0
  140. package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -0
  141. package/dist/components/breadcrumb/public.d.ts +2 -0
  142. package/dist/components/breadcrumb/public.d.ts.map +1 -0
  143. package/dist/components/bubble/bubble.d.ts +35 -0
  144. package/dist/components/bubble/bubble.d.ts.map +1 -0
  145. package/dist/components/bubble/public.d.ts +2 -0
  146. package/dist/components/bubble/public.d.ts.map +1 -0
  147. package/dist/components/button/button.d.ts +1 -2
  148. package/dist/components/button/button.d.ts.map +1 -1
  149. package/dist/components/button/public.d.ts +1 -1
  150. package/dist/components/button/public.d.ts.map +1 -1
  151. package/dist/components/button-group/button-group.d.ts +17 -0
  152. package/dist/components/button-group/button-group.d.ts.map +1 -0
  153. package/dist/components/button-group/public.d.ts +2 -0
  154. package/dist/components/button-group/public.d.ts.map +1 -0
  155. package/dist/components/calendar/calendar.d.ts +29 -0
  156. package/dist/components/calendar/calendar.d.ts.map +1 -0
  157. package/dist/components/calendar/public.d.ts +2 -0
  158. package/dist/components/calendar/public.d.ts.map +1 -0
  159. package/dist/components/carousel/carousel.d.ts +43 -0
  160. package/dist/components/carousel/carousel.d.ts.map +1 -0
  161. package/dist/components/carousel/public.d.ts +2 -0
  162. package/dist/components/carousel/public.d.ts.map +1 -0
  163. package/dist/components/chart/chart.d.ts +48 -0
  164. package/dist/components/chart/chart.d.ts.map +1 -0
  165. package/dist/components/chart/public.d.ts +2 -0
  166. package/dist/components/chart/public.d.ts.map +1 -0
  167. package/dist/components/checkbox/checkbox.d.ts.map +1 -1
  168. package/dist/components/collapsible/collapsible.d.ts +14 -0
  169. package/dist/components/collapsible/collapsible.d.ts.map +1 -0
  170. package/dist/components/collapsible/public.d.ts +2 -0
  171. package/dist/components/collapsible/public.d.ts.map +1 -0
  172. package/dist/components/combobox/combobox.d.ts +128 -0
  173. package/dist/components/combobox/combobox.d.ts.map +1 -0
  174. package/dist/components/combobox/public.d.ts +2 -0
  175. package/dist/components/combobox/public.d.ts.map +1 -0
  176. package/dist/components/command/command.d.ts +44 -0
  177. package/dist/components/command/command.d.ts.map +1 -0
  178. package/dist/components/command/public.d.ts +2 -0
  179. package/dist/components/command/public.d.ts.map +1 -0
  180. package/dist/components/context-menu/context-menu.d.ts +82 -0
  181. package/dist/components/context-menu/context-menu.d.ts.map +1 -0
  182. package/dist/components/context-menu/public.d.ts +2 -0
  183. package/dist/components/context-menu/public.d.ts.map +1 -0
  184. package/dist/components/data-table/data-table.d.ts +81 -0
  185. package/dist/components/data-table/data-table.d.ts.map +1 -0
  186. package/dist/components/data-table/public.d.ts +2 -0
  187. package/dist/components/data-table/public.d.ts.map +1 -0
  188. package/dist/components/date-picker/date-picker.d.ts +76 -0
  189. package/dist/components/date-picker/date-picker.d.ts.map +1 -0
  190. package/dist/components/date-picker/public.d.ts +2 -0
  191. package/dist/components/date-picker/public.d.ts.map +1 -0
  192. package/dist/components/dialog/dialog.d.ts +12 -3
  193. package/dist/components/dialog/dialog.d.ts.map +1 -1
  194. package/dist/components/direction/direction.d.ts +2 -0
  195. package/dist/components/direction/direction.d.ts.map +1 -0
  196. package/dist/components/direction/public.d.ts +2 -0
  197. package/dist/components/direction/public.d.ts.map +1 -0
  198. package/dist/components/drawer/drawer.d.ts +83 -0
  199. package/dist/components/drawer/drawer.d.ts.map +1 -0
  200. package/dist/components/drawer/public.d.ts +2 -0
  201. package/dist/components/drawer/public.d.ts.map +1 -0
  202. package/dist/components/dropdown-menu/dropdown-menu.d.ts +1 -4
  203. package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +1 -1
  204. package/dist/components/empty/empty.d.ts +23 -0
  205. package/dist/components/empty/empty.d.ts.map +1 -0
  206. package/dist/components/empty/public.d.ts +2 -0
  207. package/dist/components/empty/public.d.ts.map +1 -0
  208. package/dist/components/field/field.d.ts +33 -12
  209. package/dist/components/field/field.d.ts.map +1 -1
  210. package/dist/components/field/public.d.ts +1 -1
  211. package/dist/components/field/public.d.ts.map +1 -1
  212. package/dist/components/hover-card/hover-card.d.ts +33 -0
  213. package/dist/components/hover-card/hover-card.d.ts.map +1 -0
  214. package/dist/components/hover-card/public.d.ts +2 -0
  215. package/dist/components/hover-card/public.d.ts.map +1 -0
  216. package/dist/components/input-group/input-group.d.ts +38 -0
  217. package/dist/components/input-group/input-group.d.ts.map +1 -0
  218. package/dist/components/input-group/public.d.ts +2 -0
  219. package/dist/components/input-group/public.d.ts.map +1 -0
  220. package/dist/components/input-otp/input-otp.d.ts +17 -0
  221. package/dist/components/input-otp/input-otp.d.ts.map +1 -0
  222. package/dist/components/input-otp/public.d.ts +2 -0
  223. package/dist/components/input-otp/public.d.ts.map +1 -0
  224. package/dist/components/item/item.d.ts +47 -0
  225. package/dist/components/item/item.d.ts.map +1 -0
  226. package/dist/components/item/public.d.ts +2 -0
  227. package/dist/components/item/public.d.ts.map +1 -0
  228. package/dist/components/kbd/kbd.d.ts +8 -0
  229. package/dist/components/kbd/kbd.d.ts.map +1 -0
  230. package/dist/components/kbd/public.d.ts +2 -0
  231. package/dist/components/kbd/public.d.ts.map +1 -0
  232. package/dist/components/marker/marker.d.ts +19 -0
  233. package/dist/components/marker/marker.d.ts.map +1 -0
  234. package/dist/components/marker/public.d.ts +2 -0
  235. package/dist/components/marker/public.d.ts.map +1 -0
  236. package/dist/components/menubar/menubar.d.ts +57 -0
  237. package/dist/components/menubar/menubar.d.ts.map +1 -0
  238. package/dist/components/menubar/public.d.ts +2 -0
  239. package/dist/components/menubar/public.d.ts.map +1 -0
  240. package/dist/components/message/message.d.ts +35 -0
  241. package/dist/components/message/message.d.ts.map +1 -0
  242. package/dist/components/message/public.d.ts +2 -0
  243. package/dist/components/message/public.d.ts.map +1 -0
  244. package/dist/components/message-scroller/message-scroller.d.ts +75 -0
  245. package/dist/components/message-scroller/message-scroller.d.ts.map +1 -0
  246. package/dist/components/message-scroller/public.d.ts +2 -0
  247. package/dist/components/message-scroller/public.d.ts.map +1 -0
  248. package/dist/components/native-select/native-select.d.ts +14 -0
  249. package/dist/components/native-select/native-select.d.ts.map +1 -0
  250. package/dist/components/native-select/public.d.ts +2 -0
  251. package/dist/components/native-select/public.d.ts.map +1 -0
  252. package/dist/components/navigation-menu/navigation-menu.d.ts +83 -0
  253. package/dist/components/navigation-menu/navigation-menu.d.ts.map +1 -0
  254. package/dist/components/navigation-menu/public.d.ts +2 -0
  255. package/dist/components/navigation-menu/public.d.ts.map +1 -0
  256. package/dist/components/pagination/pagination.d.ts +37 -0
  257. package/dist/components/pagination/pagination.d.ts.map +1 -0
  258. package/dist/components/pagination/public.d.ts +2 -0
  259. package/dist/components/pagination/public.d.ts.map +1 -0
  260. package/dist/components/popover/popover.d.ts +32 -0
  261. package/dist/components/popover/popover.d.ts.map +1 -0
  262. package/dist/components/popover/public.d.ts +2 -0
  263. package/dist/components/popover/public.d.ts.map +1 -0
  264. package/dist/components/progress/progress.d.ts +22 -0
  265. package/dist/components/progress/progress.d.ts.map +1 -0
  266. package/dist/components/progress/public.d.ts +2 -0
  267. package/dist/components/progress/public.d.ts.map +1 -0
  268. package/dist/components/questionnaire/public.d.ts +2 -0
  269. package/dist/components/questionnaire/public.d.ts.map +1 -0
  270. package/dist/components/questionnaire/questionnaire.d.ts +192 -0
  271. package/dist/components/questionnaire/questionnaire.d.ts.map +1 -0
  272. package/dist/components/resizable/public.d.ts +2 -0
  273. package/dist/components/resizable/public.d.ts.map +1 -0
  274. package/dist/components/resizable/resizable.d.ts +12 -0
  275. package/dist/components/resizable/resizable.d.ts.map +1 -0
  276. package/dist/components/scroll-area/public.d.ts +2 -0
  277. package/dist/components/scroll-area/public.d.ts.map +1 -0
  278. package/dist/components/scroll-area/scroll-area.d.ts +10 -0
  279. package/dist/components/scroll-area/scroll-area.d.ts.map +1 -0
  280. package/dist/components/select/select.d.ts +3 -5
  281. package/dist/components/select/select.d.ts.map +1 -1
  282. package/dist/components/sheet/public.d.ts +2 -0
  283. package/dist/components/sheet/public.d.ts.map +1 -0
  284. package/dist/components/sheet/sheet.d.ts +56 -0
  285. package/dist/components/sheet/sheet.d.ts.map +1 -0
  286. package/dist/components/sidebar/public.d.ts +2 -0
  287. package/dist/components/sidebar/public.d.ts.map +1 -0
  288. package/dist/components/sidebar/sidebar.d.ts +167 -0
  289. package/dist/components/sidebar/sidebar.d.ts.map +1 -0
  290. package/dist/components/sidebar/use-mobile.d.ts +18 -0
  291. package/dist/components/sidebar/use-mobile.d.ts.map +1 -0
  292. package/dist/components/slider/public.d.ts +2 -0
  293. package/dist/components/slider/public.d.ts.map +1 -0
  294. package/dist/components/slider/slider.d.ts +6 -0
  295. package/dist/components/slider/slider.d.ts.map +1 -0
  296. package/dist/components/spinner/public.d.ts +2 -0
  297. package/dist/components/spinner/public.d.ts.map +1 -0
  298. package/dist/components/spinner/spinner.d.ts +4 -0
  299. package/dist/components/spinner/spinner.d.ts.map +1 -0
  300. package/dist/components/textarea/textarea.d.ts +1 -1
  301. package/dist/components/textarea/textarea.d.ts.map +1 -1
  302. package/dist/components/toast/toast.d.ts.map +1 -1
  303. package/dist/components/toggle/public.d.ts +2 -0
  304. package/dist/components/toggle/public.d.ts.map +1 -0
  305. package/dist/components/toggle/toggle.d.ts +11 -0
  306. package/dist/components/toggle/toggle.d.ts.map +1 -0
  307. package/dist/components/toggle-group/public.d.ts +2 -0
  308. package/dist/components/toggle-group/public.d.ts.map +1 -0
  309. package/dist/components/toggle-group/toggle-group.d.ts +13 -0
  310. package/dist/components/toggle-group/toggle-group.d.ts.map +1 -0
  311. package/dist/components/tooltip/tooltip.d.ts +1 -4
  312. package/dist/components/tooltip/tooltip.d.ts.map +1 -1
  313. package/dist/context-menu.d.ts +1 -0
  314. package/dist/context-menu.js +201 -0
  315. package/dist/context-menu.js.map +1 -0
  316. package/dist/data-table.d.ts +1 -0
  317. package/dist/data-table.js +162 -0
  318. package/dist/data-table.js.map +1 -0
  319. package/dist/date-picker.d.ts +1 -0
  320. package/dist/date-picker.js +175 -0
  321. package/dist/date-picker.js.map +1 -0
  322. package/dist/dialog.js +40 -55
  323. package/dist/dialog.js.map +1 -1
  324. package/dist/direction.d.ts +1 -0
  325. package/dist/direction.js +6 -0
  326. package/dist/direction.js.map +1 -0
  327. package/dist/docs/accordion.md +86 -0
  328. package/dist/docs/alert-dialog.md +151 -0
  329. package/dist/docs/alert.md +74 -0
  330. package/dist/docs/aspect-ratio.md +65 -0
  331. package/dist/docs/attachment.md +254 -0
  332. package/dist/docs/avatar.md +185 -0
  333. package/dist/docs/badge.md +72 -60
  334. package/dist/docs/breadcrumb.md +86 -0
  335. package/dist/docs/bubble.md +233 -0
  336. package/dist/docs/button-group.md +107 -0
  337. package/dist/docs/calendar.md +114 -0
  338. package/dist/docs/card.md +15 -7
  339. package/dist/docs/carousel.md +152 -0
  340. package/dist/docs/chart.md +174 -0
  341. package/dist/docs/collapsible.md +80 -0
  342. package/dist/docs/combobox.md +192 -0
  343. package/dist/docs/command.md +171 -0
  344. package/dist/docs/context-menu.md +173 -0
  345. package/dist/docs/data-table.md +183 -0
  346. package/dist/docs/date-picker.md +137 -0
  347. package/dist/docs/dialog.md +33 -0
  348. package/dist/docs/direction.md +51 -0
  349. package/dist/docs/drawer.md +242 -0
  350. package/dist/docs/empty.md +80 -0
  351. package/dist/docs/field.md +105 -38
  352. package/dist/docs/hover-card.md +81 -0
  353. package/dist/docs/input-group.md +158 -0
  354. package/dist/docs/input-otp.md +116 -0
  355. package/dist/docs/input.md +31 -20
  356. package/dist/docs/item.md +106 -0
  357. package/dist/docs/kbd.md +53 -0
  358. package/dist/docs/marker.md +178 -0
  359. package/dist/docs/menubar.md +108 -0
  360. package/dist/docs/message-scroller.md +221 -0
  361. package/dist/docs/message.md +183 -0
  362. package/dist/docs/native-select.md +93 -0
  363. package/dist/docs/navigation-menu.md +176 -0
  364. package/dist/docs/pagination.md +96 -0
  365. package/dist/docs/popover.md +87 -0
  366. package/dist/docs/progress.md +58 -0
  367. package/dist/docs/questionnaire.md +311 -0
  368. package/dist/docs/resizable.md +95 -0
  369. package/dist/docs/scroll-area.md +93 -0
  370. package/dist/docs/sheet.md +168 -0
  371. package/dist/docs/sidebar.md +309 -0
  372. package/dist/docs/slider.md +66 -0
  373. package/dist/docs/spinner.md +55 -0
  374. package/dist/docs/table.md +85 -20
  375. package/dist/docs/textarea.md +19 -2
  376. package/dist/docs/toggle-group.md +77 -0
  377. package/dist/docs/toggle.md +58 -0
  378. package/dist/docs/typeset.md +75 -0
  379. package/dist/drawer.d.ts +1 -0
  380. package/dist/drawer.js +120 -0
  381. package/dist/drawer.js.map +1 -0
  382. package/dist/dropdown-menu.js +98 -130
  383. package/dist/dropdown-menu.js.map +1 -1
  384. package/dist/empty.d.ts +1 -0
  385. package/dist/empty.js +50 -0
  386. package/dist/empty.js.map +1 -0
  387. package/dist/field.js +105 -20
  388. package/dist/field.js.map +1 -1
  389. package/dist/hover-card.d.ts +1 -0
  390. package/dist/hover-card.js +44 -0
  391. package/dist/hover-card.js.map +1 -0
  392. package/dist/index.d.ts +44 -0
  393. package/dist/index.d.ts.map +1 -1
  394. package/dist/index.js +431 -93
  395. package/dist/index.js.map +1 -1
  396. package/dist/input-group.d.ts +1 -0
  397. package/dist/input-group.js +91 -0
  398. package/dist/input-group.js.map +1 -0
  399. package/dist/input-otp.d.ts +1 -0
  400. package/dist/input-otp.js +28 -0
  401. package/dist/input-otp.js.map +1 -0
  402. package/dist/input.js +17 -17
  403. package/dist/item.d.ts +1 -0
  404. package/dist/item.js +107 -0
  405. package/dist/item.js.map +1 -0
  406. package/dist/kbd.d.ts +1 -0
  407. package/dist/kbd.js +17 -0
  408. package/dist/kbd.js.map +1 -0
  409. package/dist/marker.d.ts +1 -0
  410. package/dist/marker.js +52 -0
  411. package/dist/marker.js.map +1 -0
  412. package/dist/menubar.d.ts +1 -0
  413. package/dist/menubar.js +50 -0
  414. package/dist/menubar.js.map +1 -0
  415. package/dist/message-scroller.d.ts +1 -0
  416. package/dist/message-scroller.js +69 -0
  417. package/dist/message-scroller.js.map +1 -0
  418. package/dist/message.d.ts +1 -0
  419. package/dist/message.js +37 -0
  420. package/dist/message.js.map +1 -0
  421. package/dist/native-select.d.ts +1 -0
  422. package/dist/native-select.js +42 -0
  423. package/dist/native-select.js.map +1 -0
  424. package/dist/navigation-menu.d.ts +1 -0
  425. package/dist/navigation-menu.js +97 -0
  426. package/dist/navigation-menu.js.map +1 -0
  427. package/dist/pagination.d.ts +1 -0
  428. package/dist/pagination.js +104 -0
  429. package/dist/pagination.js.map +1 -0
  430. package/dist/popover.d.ts +1 -0
  431. package/dist/popover.js +59 -0
  432. package/dist/popover.js.map +1 -0
  433. package/dist/progress.d.ts +1 -0
  434. package/dist/progress.js +36 -0
  435. package/dist/progress.js.map +1 -0
  436. package/dist/questionnaire.d.ts +1 -0
  437. package/dist/questionnaire.js +209 -0
  438. package/dist/questionnaire.js.map +1 -0
  439. package/dist/radio-group.js +7 -7
  440. package/dist/resizable.d.ts +1 -0
  441. package/dist/resizable.js +24 -0
  442. package/dist/resizable.js.map +1 -0
  443. package/dist/scroll-area.d.ts +1 -0
  444. package/dist/scroll-area.js +32 -0
  445. package/dist/scroll-area.js.map +1 -0
  446. package/dist/select.js +83 -107
  447. package/dist/select.js.map +1 -1
  448. package/dist/sheet.d.ts +1 -0
  449. package/dist/sheet.js +94 -0
  450. package/dist/sheet.js.map +1 -0
  451. package/dist/sidebar.d.ts +1 -0
  452. package/dist/sidebar.js +386 -0
  453. package/dist/sidebar.js.map +1 -0
  454. package/dist/slider.d.ts +1 -0
  455. package/dist/slider.js +40 -0
  456. package/dist/slider.js.map +1 -0
  457. package/dist/spinner.d.ts +1 -0
  458. package/dist/spinner.js +21 -0
  459. package/dist/spinner.js.map +1 -0
  460. package/dist/switch.js +11 -11
  461. package/dist/table.js +34 -35
  462. package/dist/table.js.map +1 -1
  463. package/dist/tabs.js +17 -17
  464. package/dist/textarea.js +14 -7
  465. package/dist/textarea.js.map +1 -1
  466. package/dist/theme.css +35 -20
  467. package/dist/toast.js +54 -164
  468. package/dist/toast.js.map +1 -1
  469. package/dist/toggle-group.d.ts +1 -0
  470. package/dist/toggle-group.js +46 -0
  471. package/dist/toggle-group.js.map +1 -0
  472. package/dist/toggle.d.ts +1 -0
  473. package/dist/toggle.js +39 -0
  474. package/dist/toggle.js.map +1 -0
  475. package/dist/tooltip.js.map +1 -1
  476. package/dist/typeset.css +532 -0
  477. package/dist/utilities.css +583 -0
  478. package/llms.txt +268 -24
  479. package/package.json +15 -3
  480. package/dist/chunks/badge.BcdxDzJ7.css +0 -1
  481. package/dist/chunks/button.DNo8DTR3.css +0 -1
  482. package/dist/chunks/card.B0AcyAT1.css +0 -1
  483. package/dist/chunks/checkbox.D3kdAalh.css +0 -1
  484. package/dist/chunks/dialog.D6LS2vnG.css +0 -1
  485. package/dist/chunks/dropdown-menu.DmDZc5gB.css +0 -1
  486. package/dist/chunks/field.BNZx8HfN.css +0 -1
  487. package/dist/chunks/input.C8RDCC-a.css +0 -1
  488. package/dist/chunks/radio-group.zAFY9yCF.css +0 -1
  489. package/dist/chunks/select.Dt0diN4P.css +0 -1
  490. package/dist/chunks/switch.CsaIRnCA.css +0 -1
  491. package/dist/chunks/table.BuWHXL6e.css +0 -1
  492. package/dist/chunks/tabs.KEksCAxN.css +0 -1
  493. package/dist/chunks/textarea.N3iiWUuz.css +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-picker.js","sources":["../src/components/date-picker/date-picker.tsx"],"sourcesContent":["import { cx } from 'class-variance-authority';\nimport { format, isValid, parse } from 'date-fns';\nimport type { Locale } from 'date-fns/locale';\nimport { CalendarIcon } from 'lucide-react';\nimport { useCallback, useState } from 'react';\nimport type { DateRange } from 'react-day-picker';\n\nimport { Button } from '../button/button';\nimport { Calendar, type CalendarProps } from '../calendar/calendar';\nimport { Input } from '../input/input';\nimport { Popover, PopoverContent, PopoverTrigger } from '../popover/popover';\n\nimport styles from './date-picker.module.css';\n\ninterface DatePickerBaseProps {\n /** Shown in the trigger/input when nothing is selected. */\n placeholder?: string;\n /** Forwarded to the popover's `Calendar` — see calendar.md's caption-layout axis. */\n captionLayout?: CalendarProps['captionLayout'];\n disabled?: CalendarProps['disabled'];\n /**\n * date-fns locale for the month grid AND for every date this component\n * writes or reads as text: the trigger label, the `input` variant's\n * formatted value, and the parse of what the user types there. Passing\n * it to `Calendar` alone would translate the grid while leaving the\n * field in English, so it is one prop covering both.\n * @default date-fns' own default (en-US)\n */\n locale?: Locale;\n className?: string;\n id?: string;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n /** Where to portal the calendar popup — see PopoverContent's own doc. */\n container?: Parameters<typeof PopoverContent>[0]['container'];\n /**\n * Accessible name for the `input` variant's trailing calendar button —\n * the one label this component renders that no consumer text supplies.\n * @default 'Open calendar'\n */\n openCalendarLabel?: string;\n 'aria-label'?: string;\n}\n\nexport interface DatePickerSingleProps extends DatePickerBaseProps {\n mode?: 'single';\n /**\n * `button` (default) renders a Button trigger showing the formatted date\n * — upstream's date-picker-demo/-basic/-dob recipes. `input` renders a\n * free-typed field with a calendar-icon button in its `end` slot —\n * upstream's date-picker-input recipe. `range` mode has no `input`\n * variant (see date-picker.md's Deviations).\n */\n variant?: 'button' | 'input';\n selected: Date | undefined;\n onSelect: (date: Date | undefined) => void;\n /** Close the popover once a day is picked. @default true */\n closeOnSelect?: boolean;\n}\n\nexport interface DatePickerRangeProps extends DatePickerBaseProps {\n mode: 'range';\n selected: DateRange | undefined;\n onSelect: (range: DateRange | undefined) => void;\n /** @default 2 */\n numberOfMonths?: number;\n /** Close the popover once a day is picked. @default false — a range needs two clicks. */\n closeOnSelect?: boolean;\n}\n\n/**\n * `mode` discriminates `selected`/`onSelect`'s type the same way\n * `Calendar`'s underlying `DayPicker` does — see calendar.tsx.\n */\nexport type DatePickerProps = DatePickerSingleProps | DatePickerRangeProps;\n\n/*\n * The `input` variant's one date format, used in both directions. Matches\n * upstream's date-picker-input recipe (long month name, day, year) and,\n * with the default locale, produces exactly the string its\n * `toLocaleDateString('en-US', { day: '2-digit', month: 'long', year:\n * 'numeric' })` produced — the difference is that date-fns can parse it\n * back, which is what makes a typed field safe to commit from.\n */\nconst INPUT_FORMAT = 'MMMM dd, yyyy';\n\n// A four-digit year is required before a typed date counts as complete.\n// date-fns reads \"June 7, 20\" (a year still being typed) as the year 20,\n// which is a valid Date and would otherwise commit.\nconst MIN_FULL_YEAR = 1000;\n\nfunction formatInputValue(date: Date | undefined, locale: Locale | undefined) {\n if (!date) {\n return '';\n }\n return format(date, INPUT_FORMAT, { locale });\n}\n\n/**\n * Parses a typed field value, returning a date ONLY for a complete one.\n *\n * The obvious `new Date(value)` is what this deliberately is not: it reads\n * a half-typed \"June 7\" as June 7th of the year 2001 (V8's own fallback\n * for a yearless date string), so every keystroke on the way to a real\n * date commits a different wrong year to `onSelect`. Requiring the whole\n * format means the field commits once, when the user has actually\n * finished typing a date, and stays quiet until then.\n */\nfunction parseTypedDate(value: string, locale: Locale | undefined): Date | undefined {\n const trimmed = value.trim();\n if (!trimmed) {\n return undefined;\n }\n const parsed = parse(trimmed, INPUT_FORMAT, new Date(), { locale });\n if (!isValid(parsed) || parsed.getFullYear() < MIN_FULL_YEAR) {\n return undefined;\n }\n return parsed;\n}\n\nfunction formatRangeLabel(range: DateRange | undefined, locale: Locale | undefined) {\n if (!range?.from) {\n return undefined;\n }\n const from = format(range.from, 'LLL dd, y', { locale });\n if (!range.to) {\n return from;\n }\n return `${from} - ${format(range.to, 'LLL dd, y', { locale })}`;\n}\n\n/**\n * Popover + Calendar + Button/Input composed into a real kit component.\n * Upstream ships this as a doc recipe (apps/v4/content/docs/components/\n * base/date-picker.mdx), not a registry item — \"there is no `DatePicker`\n * root component\" per that doc's own Composition section. This is the\n * kit's deviation: the recipe's prop surface (`selected`/`onSelect`,\n * `mode`, `captionLayout`) is kept, but wrapped as one component so a\n * consumer doesn't hand-assemble Popover/Calendar/Button per usage — see\n * date-picker.md's Deviations for the full rationale.\n */\nexport function DatePicker(props: DatePickerProps) {\n const {\n placeholder = 'Pick a date',\n captionLayout = 'label',\n disabled,\n locale,\n openCalendarLabel = 'Open calendar',\n className,\n id,\n open: openProp,\n defaultOpen,\n onOpenChange,\n container,\n } = props;\n const ariaLabel = props['aria-label'];\n\n const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen ?? false);\n const open = openProp ?? uncontrolledOpen;\n const setOpen = useCallback(\n (next: boolean) => {\n setUncontrolledOpen(next);\n onOpenChange?.(next);\n },\n [onOpenChange],\n );\n\n // Whichever endpoint the active mode anchors on: the day itself in\n // single mode, the range's start in range mode.\n const anchor = props.mode === 'range' ? props.selected?.from : props.selected;\n const singleSelected = props.mode === 'range' ? undefined : props.selected;\n\n // The visible month, and (for the `input` variant) the typed buffer.\n // The buffer is kept separate from `selected` because a value mid-typing\n // is not yet a date and must not clobber the last committed selection —\n // the same problem upstream's date-picker-input recipe solves the same\n // way with its own `value` state.\n const [month, setMonth] = useState<Date | undefined>(anchor);\n const [typedValue, setTypedValue] = useState(() => formatInputValue(singleSelected, locale));\n\n // Both follow `selected` when it changes from OUTSIDE this component —\n // a \"clear\" button elsewhere on the page, a form reset, a stored value\n // arriving late. Seeding them once at mount instead (what this used to\n // do for the month) left a picker whose selection had moved on opening\n // on the month it was first mounted with, which for a date arriving\n // after mount means \"today\" forever.\n //\n // Resynced during render (react.dev's \"adjusting state when a prop\n // changes\" pattern) rather than from a `useEffect`, so the change lands\n // in the same commit instead of one visibly-stale render later. Keyed on\n // the anchor's TIME, not its identity: a consumer that rebuilds its\n // `Date` on every render would otherwise reset the month the user just\n // navigated to, and the caveat \"pass a stable Date reference\" is a\n // sharper edge than this component needs to have.\n const anchorTime = anchor?.getTime();\n const [syncedTime, setSyncedTime] = useState(anchorTime);\n if (anchorTime !== syncedTime) {\n setSyncedTime(anchorTime);\n setMonth(anchor);\n setTypedValue(formatInputValue(singleSelected, locale));\n }\n\n if (props.mode === 'range') {\n const { selected, onSelect, numberOfMonths = 2, closeOnSelect = false } = props;\n const label = formatRangeLabel(selected, locale);\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger\n render={\n <Button\n variant=\"outline\"\n id={id}\n className={cx(styles.trigger, className)}\n data-empty={!selected?.from || undefined}\n aria-label={ariaLabel}\n // Button's own `icon` slot, not a raw child — see the single-mode\n // trigger below for why (same fix, same reason).\n icon={<CalendarIcon />}\n />\n }\n >\n {label ?? <span>{placeholder}</span>}\n </PopoverTrigger>\n <PopoverContent className={styles.content} align=\"start\" container={container}>\n <Calendar\n mode=\"range\"\n selected={selected}\n onSelect={(value) => {\n onSelect(value);\n if (closeOnSelect) {\n setOpen(false);\n }\n }}\n month={month}\n onMonthChange={setMonth}\n numberOfMonths={numberOfMonths}\n locale={locale}\n captionLayout={captionLayout}\n disabled={disabled}\n />\n </PopoverContent>\n </Popover>\n );\n }\n\n const { selected, onSelect, variant = 'button', closeOnSelect = true } = props;\n\n // Every path that commits a selection also moves `syncedTime` forward,\n // so the echo of that same value coming back through `selected` is not\n // mistaken for an outside change and does not re-run the resync above.\n // Without it, typing a complete date would reformat the field under the\n // caret (\"June 7, 2025\" snapping to \"June 07, 2025\" mid-keystroke).\n const handleCalendarSelect = (date: Date | undefined) => {\n onSelect(date);\n setMonth(date);\n setTypedValue(formatInputValue(date, locale));\n setSyncedTime(date?.getTime());\n if (closeOnSelect) {\n setOpen(false);\n }\n };\n\n if (variant === 'input') {\n return (\n <Input\n id={id}\n value={typedValue}\n placeholder={placeholder}\n className={className}\n aria-label={ariaLabel}\n onChange={(event) => {\n const { value } = event.target;\n setTypedValue(value);\n const parsed = parseTypedDate(value, locale);\n if (parsed) {\n onSelect(parsed);\n setMonth(parsed);\n setSyncedTime(parsed.getTime());\n } else if (!value.trim()) {\n // Emptying the field clears the selection; anything else is an\n // incomplete date, which commits nothing either way.\n onSelect(undefined);\n setSyncedTime(undefined);\n }\n }}\n onKeyDown={(event) => {\n // Matches upstream's date-picker-input recipe: ArrowDown opens\n // the calendar from the field without needing to reach for the\n // trailing button.\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n setOpen(true);\n }\n }}\n end={\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger\n render={\n <Button\n variant=\"ghost\"\n size=\"sm\"\n icon={<CalendarIcon />}\n aria-label={ariaLabel ?? openCalendarLabel}\n />\n }\n />\n <PopoverContent className={styles.content} align=\"end\" sideOffset={8} container={container}>\n <Calendar\n mode=\"single\"\n selected={selected}\n onSelect={handleCalendarSelect}\n month={month}\n onMonthChange={setMonth}\n locale={locale}\n captionLayout={captionLayout}\n disabled={disabled}\n />\n </PopoverContent>\n </Popover>\n }\n />\n );\n }\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger\n render={\n <Button\n variant=\"outline\"\n id={id}\n className={cx(styles.trigger, className)}\n data-empty={!selected || undefined}\n aria-label={ariaLabel}\n // Button's `icon` slot (never a raw child, per button.tsx's own\n // doc comment): a child mixed in with the label text lands in\n // Button's plain-block `.label` span instead of its flex\n // `.icon`+`.label` row, which silently drops the gap and\n // vertical centering Button would otherwise give it for free.\n icon={<CalendarIcon />}\n />\n }\n >\n {selected ? format(selected, 'PPP', { locale }) : <span>{placeholder}</span>}\n </PopoverTrigger>\n <PopoverContent className={styles.content} align=\"start\" container={container}>\n <Calendar\n mode=\"single\"\n selected={selected}\n onSelect={handleCalendarSelect}\n month={month}\n onMonthChange={setMonth}\n locale={locale}\n captionLayout={captionLayout}\n disabled={disabled}\n />\n </PopoverContent>\n </Popover>\n );\n}\n"],"names":["INPUT_FORMAT","MIN_FULL_YEAR","formatInputValue","date","locale","format","parseTypedDate","value","trimmed","parsed","parse","isValid","formatRangeLabel","range","from","DatePicker","props","placeholder","captionLayout","disabled","openCalendarLabel","className","id","openProp","defaultOpen","onOpenChange","container","ariaLabel","uncontrolledOpen","setUncontrolledOpen","useState","open","setOpen","useCallback","next","anchor","_a","singleSelected","month","setMonth","typedValue","setTypedValue","anchorTime","syncedTime","setSyncedTime","selected","onSelect","numberOfMonths","closeOnSelect","label","jsxs","Popover","jsx","PopoverTrigger","Button","cx","styles","CalendarIcon","PopoverContent","Calendar","variant","handleCalendarSelect","Input","event"],"mappings":";;;;;;;;;;;;GAqFMA,IAAe,iBAKfC,KAAgB;AAEtB,SAASC,EAAiBC,GAAwBC,GAA4B;AAC5E,SAAKD,IAGEE,EAAOF,GAAMH,GAAc,EAAE,QAAAI,GAAQ,IAFnC;AAGX;AAYA,SAASE,GAAeC,GAAeH,GAA8C;A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+1,69 @@
1
- import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
- import { Dialog as r } from "@base-ui/react/dialog";
3
- import { cx as i } from "class-variance-authority";
1
+ import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
+ import { Dialog as n } from "@base-ui/react/dialog";
3
+ import { cx as s } from "class-variance-authority";
4
+ import { XIcon as _ } from "lucide-react";
4
5
  import { Button as d } from "./button.js";
5
- import './chunks/dialog.D6LS2vnG.css';const m = "_backdrop_u306m_6", _ = "_popup_u306m_22", g = "_closeButton_u306m_120", f = "_header_u306m_126", D = "_footer_u306m_132", h = "_title_u306m_146", k = "_description_u306m_154", v = "_svgIcon_u306m_161", n = {
6
- backdrop: m,
7
- popup: _,
8
- closeButton: g,
9
- header: f,
10
- footer: D,
11
- title: h,
12
- description: k,
13
- svgIcon: v
14
- };
15
- function N({ className: o }) {
16
- return /* @__PURE__ */ e(
17
- "svg",
18
- {
19
- className: i(n.svgIcon, o),
20
- viewBox: "0 0 24 24",
21
- fill: "none",
22
- stroke: "currentColor",
23
- strokeWidth: "2",
24
- strokeLinecap: "round",
25
- strokeLinejoin: "round",
26
- "aria-hidden": "true",
27
- children: /* @__PURE__ */ e("path", { d: "M18 6 6 18M6 6l12 12" })
28
- }
29
- );
30
- }
31
- const I = r.Root;
6
+ import './chunks/dialog.BxcZ12Gb.css';const g = "_backdrop_nfzyx_6", m = "_popup_nfzyx_22", x = "_closeButton_nfzyx_162", D = "_header_nfzyx_150", y = "_footer_nfzyx_150", z = "_title_nfzyx_272", N = "_description_nfzyx_280", h = "_svgIcon_nfzyx_287", r = {
7
+ backdrop: g,
8
+ popup: m,
9
+ closeButton: x,
10
+ header: D,
11
+ footer: y,
12
+ title: z,
13
+ description: N,
14
+ svgIcon: h
15
+ }, I = n.Root;
32
16
  function T({ className: o, ...t }) {
33
- return /* @__PURE__ */ e(r.Trigger, { className: o, ...t });
17
+ return /* @__PURE__ */ e(n.Trigger, { className: o, ...t });
34
18
  }
35
19
  function j({ className: o, ...t }) {
36
- return /* @__PURE__ */ e(r.Close, { className: o, ...t });
20
+ return /* @__PURE__ */ e(n.Close, { className: o, ...t });
37
21
  }
38
- function L({
22
+ function P({
39
23
  className: o,
40
24
  children: t,
41
25
  container: c,
42
26
  showCloseButton: a = !0,
43
27
  showBackdrop: l = !0,
44
- closeLabel: u = "Close",
45
- ...p
28
+ closeLabel: p = "Close",
29
+ size: u = "default",
30
+ ...f
46
31
  }) {
47
- return /* @__PURE__ */ s(r.Portal, { container: c, children: [
48
- l && /* @__PURE__ */ e(r.Backdrop, { className: n.backdrop }),
49
- /* @__PURE__ */ s(r.Popup, { className: i(n.popup, o), ...p, children: [
32
+ return /* @__PURE__ */ i(n.Portal, { container: c, children: [
33
+ l && /* @__PURE__ */ e(n.Backdrop, { className: r.backdrop }),
34
+ /* @__PURE__ */ i(n.Popup, { "data-size": u, className: s(r.popup, o), ...f, children: [
50
35
  t,
51
36
  a && /* @__PURE__ */ e(
52
- r.Close,
37
+ n.Close,
53
38
  {
54
- "aria-label": u,
55
- className: n.closeButton,
56
- render: /* @__PURE__ */ e(d, { variant: "ghost", icon: /* @__PURE__ */ e(N, {}) })
39
+ "aria-label": p,
40
+ className: r.closeButton,
41
+ render: /* @__PURE__ */ e(d, { variant: "ghost", icon: /* @__PURE__ */ e(_, { className: r.svgIcon }) })
57
42
  }
58
43
  )
59
44
  ] })
60
45
  ] });
61
46
  }
62
- function M({ className: o, ...t }) {
63
- return /* @__PURE__ */ e("div", { className: i(n.header, o), ...t });
47
+ function F({ className: o, ...t }) {
48
+ return /* @__PURE__ */ e("div", { className: s(r.header, o), ...t });
64
49
  }
65
- function P({ className: o, ...t }) {
66
- return /* @__PURE__ */ e("div", { className: i(n.footer, o), ...t });
50
+ function H({ className: o, ...t }) {
51
+ return /* @__PURE__ */ e("div", { className: s(r.footer, o), ...t });
67
52
  }
68
- function w({ className: o, ...t }) {
69
- return /* @__PURE__ */ e(r.Title, { className: i(n.title, o), ...t });
53
+ function R({ className: o, ...t }) {
54
+ return /* @__PURE__ */ e(n.Title, { className: s(r.title, o), ...t });
70
55
  }
71
- function y({ className: o, ...t }) {
72
- return /* @__PURE__ */ e(r.Description, { className: i(n.description, o), ...t });
56
+ function X({ className: o, ...t }) {
57
+ return /* @__PURE__ */ e(n.Description, { className: s(r.description, o), ...t });
73
58
  }
74
59
  export {
75
60
  I as Dialog,
76
61
  j as DialogClose,
77
- L as DialogContent,
78
- y as DialogDescription,
79
- P as DialogFooter,
80
- M as DialogHeader,
81
- w as DialogTitle,
62
+ P as DialogContent,
63
+ X as DialogDescription,
64
+ H as DialogFooter,
65
+ F as DialogHeader,
66
+ R as DialogTitle,
82
67
  T as DialogTrigger
83
68
  };
84
69
  //# sourceMappingURL=dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.js","sources":["../src/components/dialog/dialog.tsx"],"sourcesContent":["import { Dialog as DialogPrimitive } from '@base-ui/react/dialog';\nimport { cx } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\n\nimport { Button } from '../button/button';\nimport styles from './dialog.module.css';\n\n/* Inline lucide path (ISC) — the kit carries no icon dependency. */\nfunction CloseIcon({ className }: { className?: string }) {\n return (\n <svg\n className={cx(styles.svgIcon, className)}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </svg>\n );\n}\n\nexport const Dialog = DialogPrimitive.Root;\n/**\n * The root is a Base UI pass-through, but its props type is still exported:\n * a consumer writing a typed wrapper imports it from this kit — Base UI is\n * this package's dependency, not necessarily theirs. Same idiom as\n * TooltipProviderProps.\n */\nexport type DialogProps = DialogPrimitive.Root.Props;\n\nexport interface DialogTriggerProps extends Omit<DialogPrimitive.Trigger.Props, 'className'> {\n className?: string;\n}\n\nexport function DialogTrigger({ className, ...props }: DialogTriggerProps) {\n return <DialogPrimitive.Trigger className={className} {...props} />;\n}\n\nexport interface DialogCloseProps extends Omit<DialogPrimitive.Close.Props, 'className'> {\n className?: string;\n}\n\nexport function DialogClose({ className, ...props }: DialogCloseProps) {\n return <DialogPrimitive.Close className={className} {...props} />;\n}\n\nexport interface DialogContentProps extends Omit<DialogPrimitive.Popup.Props, 'className'> {\n className?: string;\n /**\n * Where to portal the popup. Defaults to <body>. Pass a themed container\n * when the theme is scoped to a subtree (data-theme on a container that\n * isn't at document root) so the popup inherits its tokens and font.\n */\n container?: DialogPrimitive.Portal.Props['container'];\n /** Renders a top-right close (X) button inside the popup. @default true */\n showCloseButton?: boolean;\n /**\n * Accessible name for the built-in close (X) button — the popup's only\n * kit-authored text, so the one string a non-English app needs to\n * replace. Same contract as Toaster's closeLabel. @default 'Close'\n */\n closeLabel?: string;\n /**\n * Renders the dimming backdrop behind the popup. Pair with\n * `modal={false}` on the root for a genuinely non-modal dialog: without\n * this opt-out the backdrop still covers (and click-closes over) the\n * page even when the root no longer traps focus or locks scroll, so\n * `modal={false}` alone never yields a usable non-modal surface.\n * @default true\n */\n showBackdrop?: boolean;\n}\n\nexport function DialogContent({\n className,\n children,\n container,\n showCloseButton = true,\n showBackdrop = true,\n closeLabel = 'Close',\n ...props\n}: DialogContentProps) {\n return (\n <DialogPrimitive.Portal container={container}>\n {showBackdrop && <DialogPrimitive.Backdrop className={styles.backdrop} />}\n <DialogPrimitive.Popup className={cx(styles.popup, className)} {...props}>\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n aria-label={closeLabel}\n className={styles.closeButton}\n render={<Button variant=\"ghost\" icon={<CloseIcon />} />}\n />\n )}\n </DialogPrimitive.Popup>\n </DialogPrimitive.Portal>\n );\n}\n\nexport type DialogHeaderProps = ComponentProps<'div'>;\n\nexport function DialogHeader({ className, ...props }: DialogHeaderProps) {\n return <div className={cx(styles.header, className)} {...props} />;\n}\n\nexport type DialogFooterProps = ComponentProps<'div'>;\n\nexport function DialogFooter({ className, ...props }: DialogFooterProps) {\n return <div className={cx(styles.footer, className)} {...props} />;\n}\n\nexport interface DialogTitleProps extends Omit<DialogPrimitive.Title.Props, 'className'> {\n className?: string;\n}\n\nexport function DialogTitle({ className, ...props }: DialogTitleProps) {\n return <DialogPrimitive.Title className={cx(styles.title, className)} {...props} />;\n}\n\nexport interface DialogDescriptionProps\n extends Omit<DialogPrimitive.Description.Props, 'className'> {\n className?: string;\n}\n\nexport function DialogDescription({ className, ...props }: DialogDescriptionProps) {\n return <DialogPrimitive.Description className={cx(styles.description, className)} {...props} />;\n}\n"],"names":["CloseIcon","className","jsx","cx","styles","Dialog","DialogPrimitive","DialogTrigger","props","DialogClose","DialogContent","children","container","showCloseButton","showBackdrop","closeLabel","jsxs","Button","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":";;;;;;;;;;;;;;AAQA,SAASA,EAAU,EAAE,WAAAC,KAAqC;AACxD,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAGC,EAAO,SAASH,CAAS;AAAA,MACvC,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,QAAO;AAAA,MACP,aAAY;AAAA,MACZ,eAAc;AAAA,MACd,gBAAe;AAAA,MACf,eAAY;AAAA,MAEZ,UAAA,gBAAAC,EAAC,QAAA,EAAK,GAAE,uBAAA,CAAuB;AAAA,IAAA;AAAA,EAAA;AAGrC;AAEO,MAAMG,IAASC,EAAgB;AAa/B,SAASC,EAAc,EAAE,WAAAN,GAAW,GAAGO,KAA6B;AACzE,2BAAQF,EAAgB,SAAhB,EAAwB,WAAAL,GAAuB,GAAGO,GAAO;AACnE;AAMO,SAASC,EAAY,EAAE,WAAAR,GAAW,GAAGO,KAA2B;AACrE,2BAAQF,EAAgB,OAAhB,EAAsB,WAAAL,GAAuB,GAAGO,GAAO;AACjE;AA6BO,SAASE,EAAc;AAAA,EAC5B,WAAAT;AAAA,EACA,UAAAU;AAAA,EACA,WAAAC;AAAA,EACA,iBAAAC,IA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,"file":"dialog.js","sources":["../src/components/dialog/dialog.tsx"],"sourcesContent":["import { Dialog as DialogPrimitive } from '@base-ui/react/dialog';\nimport { cx } from 'class-variance-authority';\nimport { XIcon } from 'lucide-react';\nimport type { ComponentProps } from 'react';\n\nimport { Button } from '../button/button';\nimport styles from './dialog.module.css';\n\nexport const Dialog = DialogPrimitive.Root;\n/**\n * The root is a Base UI pass-through, but its props type is still exported:\n * a consumer writing a typed wrapper imports it from this kit — Base UI is\n * this package's dependency, not necessarily theirs. Every root-level\n * pass-through in the kit re-exports its props type for the same reason.\n */\nexport type DialogProps = DialogPrimitive.Root.Props;\n\nexport interface DialogTriggerProps extends Omit<DialogPrimitive.Trigger.Props, 'className'> {\n className?: string;\n}\n\nexport function DialogTrigger({ className, ...props }: DialogTriggerProps) {\n return <DialogPrimitive.Trigger className={className} {...props} />;\n}\n\nexport interface DialogCloseProps extends Omit<DialogPrimitive.Close.Props, 'className'> {\n className?: string;\n}\n\nexport function DialogClose({ className, ...props }: DialogCloseProps) {\n return <DialogPrimitive.Close className={className} {...props} />;\n}\n\nexport interface DialogContentProps extends Omit<DialogPrimitive.Popup.Props, 'className'> {\n className?: string;\n /**\n * Where to portal the popup. Defaults to <body>. Pass a themed container\n * when the theme is scoped to a subtree (data-theme on a container that\n * isn't at document root) so the popup inherits its tokens and font.\n */\n container?: DialogPrimitive.Portal.Props['container'];\n /** Renders a top-right close (X) button inside the popup. @default true */\n showCloseButton?: boolean;\n /**\n * Accessible name for the built-in close (X) button — the popup's only\n * kit-authored text, so the one string a non-English app needs to\n * replace. Same contract as Toaster's closeLabel. @default 'Close'\n */\n closeLabel?: string;\n /**\n * Renders the dimming backdrop behind the popup. Pair with\n * `modal={false}` on the root for a genuinely non-modal dialog: without\n * this opt-out the backdrop still covers (and click-closes over) the\n * page even when the root no longer traps focus or locks scroll, so\n * `modal={false}` alone never yields a usable non-modal surface.\n * @default true\n */\n showBackdrop?: boolean;\n /**\n * `lg` widens the popup's sm+ breakpoint cap from 28rem to 36rem, for\n * content that needs more room (a multi-field form, a taller textarea)\n * than the default width comfortably fits. Read by CSS off this popup's\n * `data-size` attribute — same `data-size` idiom as AlertDialogContent's\n * `size`.\n * @default 'default'\n */\n size?: 'default' | 'lg';\n}\n\nexport function DialogContent({\n className,\n children,\n container,\n showCloseButton = true,\n showBackdrop = true,\n closeLabel = 'Close',\n size = 'default',\n ...props\n}: DialogContentProps) {\n return (\n <DialogPrimitive.Portal container={container}>\n {showBackdrop && <DialogPrimitive.Backdrop className={styles.backdrop} />}\n <DialogPrimitive.Popup data-size={size} className={cx(styles.popup, className)} {...props}>\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n aria-label={closeLabel}\n className={styles.closeButton}\n render={<Button variant=\"ghost\" icon={<XIcon className={styles.svgIcon} />} />}\n />\n )}\n </DialogPrimitive.Popup>\n </DialogPrimitive.Portal>\n );\n}\n\nexport type DialogHeaderProps = ComponentProps<'div'>;\n\nexport function DialogHeader({ className, ...props }: DialogHeaderProps) {\n return <div className={cx(styles.header, className)} {...props} />;\n}\n\nexport type DialogFooterProps = ComponentProps<'div'>;\n\nexport function DialogFooter({ className, ...props }: DialogFooterProps) {\n return <div className={cx(styles.footer, className)} {...props} />;\n}\n\nexport interface DialogTitleProps extends Omit<DialogPrimitive.Title.Props, 'className'> {\n className?: string;\n}\n\nexport function DialogTitle({ className, ...props }: DialogTitleProps) {\n return <DialogPrimitive.Title className={cx(styles.title, className)} {...props} />;\n}\n\nexport interface DialogDescriptionProps\n extends Omit<DialogPrimitive.Description.Props, 'className'> {\n className?: string;\n}\n\nexport function DialogDescription({ className, ...props }: DialogDescriptionProps) {\n return <DialogPrimitive.Description className={cx(styles.description, className)} {...props} />;\n}\n"],"names":["Dialog","DialogPrimitive","DialogTrigger","className","props","DialogClose","DialogContent","children","container","showCloseButton","showBackdrop","closeLabel","size","jsxs","styles","cx","jsx","Button","XIcon","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":";;;;;;;;;;;;;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GC,KAA4B;AACvE,SAAO,gBAAAY,EAAC,SAAI,WAAWD,EAAGD,EAAO,QAAQX,CAAS,GAAI,GAAGC,GAAO;AAClE;AAMO,SAASiB,EAAY,EAAE,WAAAlB,GAAW,GAAGC,KAA2B;AACrE,SAAO,gBAAAY,EAACf,EAAgB,OAAhB,EAAsB,WAAWc,EAAGD,EAAO,OAAOX,CAAS,GAAI,GAAGC,EAAA,CAAO;AACnF;AAOO,SAASkB,EAAkB,EAAE,WAAAnB,GAAW,GAAGC,KAAiC;AACjF,SAAO,gBAAAY,EAACf,EAAgB,aAAhB,EAA4B,WAAWc,EAAGD,EAAO,aAAaX,CAAS,GAAI,GAAGC,EAAA,CAAO;AAC/F;"}
@@ -0,0 +1 @@
1
+ export * from './components/direction/public.js'
@@ -0,0 +1,6 @@
1
+ import { DirectionProvider as i, useDirection as o } from "@base-ui/react/direction-provider";
2
+ export {
3
+ i as DirectionProvider,
4
+ o as useDirection
5
+ };
6
+ //# sourceMappingURL=direction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"direction.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,86 @@
1
+ # Accordion
2
+
3
+ A vertically stacked set of headers that expand to reveal associated
4
+ content. Wraps the Base UI Accordion primitives; keyboard navigation
5
+ between triggers, ARIA expanded/controls wiring, and (by default)
6
+ single-item expansion come from Base UI.
7
+
8
+ Composition: `Accordion` (root, holds open state) → one or more
9
+ `AccordionItem` (each identified by `value`) → `AccordionTrigger` (renders
10
+ the header button plus a rotating chevron) → `AccordionContent` (the
11
+ height-animated panel).
12
+
13
+ ## When to use
14
+
15
+ - A list of independent sections (FAQ, settings groups) where showing all
16
+ of them at once would be too much, and the user opens what's relevant.
17
+
18
+ ## When not to use
19
+
20
+ - A single show/hide toggle for one piece of content — reach for a plain
21
+ conditional render, or `collapsible` once the kit ports it; an accordion
22
+ implies more than one section.
23
+ - Primary navigation — use `tabs`.
24
+
25
+ ## Props (kit level)
26
+
27
+ `Accordion` (root): `value` / `defaultValue` (array of open item values),
28
+ `onValueChange`, `multiple` (allow more than one item open at once,
29
+ `false` default — the default is single-expansion: opening one item closes
30
+ any other open item), `disabled`, `hiddenUntilFound` (lets the browser's
31
+ in-page search find and expand closed panels), `keepMounted` — see Base UI
32
+ Accordion.Root.
33
+
34
+ `AccordionItem`: `value` (unique identifier, required to control/default
35
+ which item is open), `disabled`.
36
+
37
+ `AccordionTrigger` and `AccordionContent` take no kit-level props beyond
38
+ `className` — they render the header/trigger button and the animated panel
39
+ respectively; `AccordionTrigger` always renders a chevron, matching
40
+ upstream (no prop to hide it).
41
+
42
+ ## Examples
43
+
44
+ ```tsx
45
+ import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@gears-frontx/ui-kit';
46
+
47
+ <Accordion>
48
+ <AccordionItem value="item-1">
49
+ <AccordionTrigger>Is it accessible?</AccordionTrigger>
50
+ <AccordionContent>Yes. It adheres to the WAI-ARIA design pattern.</AccordionContent>
51
+ </AccordionItem>
52
+ <AccordionItem value="item-2">
53
+ <AccordionTrigger>Is it styled?</AccordionTrigger>
54
+ <AccordionContent>Yes, with the kit's own tokens.</AccordionContent>
55
+ </AccordionItem>
56
+ </Accordion>;
57
+ ```
58
+
59
+ ## Panel height animation
60
+
61
+ `AccordionContent` animates open/close by transitioning `height` between
62
+ `0` and Base UI's own `--accordion-panel-height` custom property (a live,
63
+ `ResizeObserver`-backed measurement of the panel's content, written on the
64
+ `Accordion.Panel` element) — the standard technique for animating to an
65
+ otherwise-unknowable `auto` height. `prefers-reduced-motion: reduce` turns
66
+ the transition off; the panel still opens and closes, just without the
67
+ grow/shrink animation.
68
+
69
+ **Known gap:** `--accordion-panel-height` is not currently listed in
70
+ `src/tokens.test.ts`'s `BASE_UI_RUNTIME_VARS` exemption set, unlike the
71
+ positioner vars (`--anchor-width`, `--transform-origin`, ...) the kit's
72
+ other overlays already consume. It should be added there — the guard test
73
+ scans every component module for undeclared `var()` usage and this one is
74
+ a genuine Base UI runtime variable, not a themeable token, so it belongs in
75
+ the exemption list rather than theme.css.
76
+
77
+ ## Anti-patterns
78
+
79
+ - Do not put interactive form controls that must always be visible (a
80
+ required field the user might miss) inside a collapsed panel — a screen
81
+ reader user tabbing through the page won't discover it until they choose
82
+ to expand that section.
83
+ - Do not nest an `Accordion` inside another `Accordion`'s panel for a
84
+ "sub-section" effect without checking `value` uniqueness across both —
85
+ Base UI scopes keyboard navigation to the nearest `Accordion.Root`, but
86
+ `value`s are only unique within one root.
@@ -0,0 +1,151 @@
1
+ # AlertDialog
2
+
3
+ A modal overlay that interrupts the user with content they must explicitly
4
+ acknowledge — typically a destructive-action confirmation. Wraps the Base
5
+ UI AlertDialog primitives (which reuse Dialog's own Popup/Backdrop/Portal/
6
+ Title/Description under the hood); focus trapping, page-scroll locking, and
7
+ Escape dismissal come from Base UI. Unlike `Dialog`, an alert dialog does
8
+ **not** close on outside press — the whole point is that the user must
9
+ make an explicit choice via `AlertDialogAction` or `AlertDialogCancel`, not
10
+ dismiss it by clicking away.
11
+
12
+ Composition: `AlertDialog` (root, holds open state) → `AlertDialogTrigger`
13
+ → `AlertDialogContent` (portals `AlertDialogHeader` — optionally with
14
+ `AlertDialogMedia` — `AlertDialogTitle`, `AlertDialogDescription`, and
15
+ `AlertDialogFooter` with `AlertDialogCancel` / `AlertDialogAction`).
16
+
17
+ ## When to use
18
+
19
+ - A destructive or otherwise consequential action that needs an explicit
20
+ confirm/cancel choice before it proceeds (delete, discard unsaved
21
+ changes, an irreversible state change).
22
+
23
+ ## When not to use
24
+
25
+ - Content the user can dismiss by clicking away — use `dialog`.
26
+ - A passive notification — use `toast`.
27
+ - A menu of actions — use `dropdown-menu`.
28
+
29
+ ## Props (kit level)
30
+
31
+ `AlertDialog` (root): `open` / `defaultOpen`, `onOpenChange`,
32
+ `onOpenChangeComplete` — see Base UI AlertDialog.Root. Always modal; there
33
+ is no `modal={false}` escape hatch (unlike `Dialog`).
34
+
35
+ `AlertDialogContent`:
36
+
37
+ | Prop | Type | Default |
38
+ |------|------|---------|
39
+ | `size` | `'default' \| 'sm'` — `sm` narrows the max width and stacks `AlertDialogCancel`/`AlertDialogAction` into two equal columns instead of a row | `'default'` |
40
+ | `showBackdrop` | `boolean` — renders the dimming backdrop | `true` |
41
+ | `container` | DOM node to portal the popup into | `<body>` |
42
+ | `initialFocus` / `finalFocus` | `boolean \| RefObject \| function` — see Base UI Dialog.Popup | default focus behavior |
43
+ | `className` | `string` — merged after the kit class | — |
44
+
45
+ The popup portals to `<body>` by default, so if your theme lives on a
46
+ subtree (`data-theme` on a section instead of `<html>`), pass that section
47
+ as `container` or the popup renders with the root theme — same contract as
48
+ `Dialog`.
49
+
50
+ `AlertDialogAction` and `AlertDialogCancel` are both a Base UI
51
+ `AlertDialog.Close` rendered as a kit `Button` (any `variant`/`size`;
52
+ `default` for the action, `outline` for the cancel) — clicking either one
53
+ closes the dialog. Your own `onClick` still runs, and runs first, so the
54
+ usual "do the thing, then dismiss" flow needs no extra wiring.
55
+
56
+ `AlertDialogAction` additionally takes `Button`'s `loading` and `icon`,
57
+ which `AlertDialogCancel` does not: the confirming action is the one that
58
+ does work. An async confirm calls `event.preventBaseUIHandler()` in its
59
+ `onClick` to keep the dialog open, sets `loading`, and drives `open`
60
+ itself when the work resolves — a `loading` Button is disabled, so the
61
+ same action cannot be pressed twice while the request is in flight.
62
+
63
+ ```tsx
64
+ <AlertDialogAction
65
+ variant="destructive"
66
+ loading={deleting}
67
+ onClick={(event) => {
68
+ event.preventBaseUIHandler();
69
+ setDeleting(true);
70
+ void deleteAccount().finally(() => {
71
+ setDeleting(false);
72
+ setOpen(false);
73
+ });
74
+ }}
75
+ >
76
+ Delete
77
+ </AlertDialogAction>
78
+ ```
79
+
80
+ ## Examples
81
+
82
+ ```tsx
83
+ import {
84
+ AlertDialog,
85
+ AlertDialogAction,
86
+ AlertDialogCancel,
87
+ AlertDialogContent,
88
+ AlertDialogDescription,
89
+ AlertDialogFooter,
90
+ AlertDialogHeader,
91
+ AlertDialogTitle,
92
+ AlertDialogTrigger,
93
+ Button,
94
+ } from '@gears-frontx/ui-kit';
95
+
96
+ <AlertDialog>
97
+ <AlertDialogTrigger render={<Button variant="destructive">Delete account</Button>} />
98
+ <AlertDialogContent>
99
+ <AlertDialogHeader>
100
+ <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
101
+ <AlertDialogDescription>
102
+ This action cannot be undone. This will permanently delete your account.
103
+ </AlertDialogDescription>
104
+ </AlertDialogHeader>
105
+ <AlertDialogFooter>
106
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
107
+ <AlertDialogAction variant="destructive" onClick={handleDelete}>
108
+ Continue
109
+ </AlertDialogAction>
110
+ </AlertDialogFooter>
111
+ </AlertDialogContent>
112
+ </AlertDialog>;
113
+ ```
114
+
115
+ ## Scrolling content
116
+
117
+ `AlertDialogHeader` and `AlertDialogFooter` are `position: sticky` (top /
118
+ bottom) with an opaque background matching the popup, by default. That
119
+ covers two shapes:
120
+
121
+ - A consumer-wrapped middle region (`overflow-y: auto` on a child div
122
+ between header and footer) - the popup itself never needs to scroll, so
123
+ the sticky positioning is inert and simply does nothing.
124
+ - Long content dropped in unwrapped (as in the "Scrollable content"
125
+ example) - `AlertDialogContent`'s own `max-height` + `overflow-y: auto`
126
+ becomes the scroll container, and header/footer stay pinned at the
127
+ top/bottom of it, masking whatever scrolls underneath. No inline
128
+ `background` or `position` prop needed on `AlertDialogFooter` for this -
129
+ it is the built-in behavior, same contract as `Dialog`'s (see
130
+ `dialog.md`'s "Scrolling content").
131
+
132
+ For the mask to be complete, `AlertDialogContent` itself carries no
133
+ padding: the inset lives on its direct children instead (side inset on
134
+ every child, top inset on the first, bottom inset on the last), so header
135
+ and footer span the popup's full width and reach its top and bottom edges.
136
+ Padding on the scroll container would have left strips that no sticky
137
+ region can cover - see `dialog.md`'s "Scrolling content" for the
138
+ mechanism. Consequence when styling children: a `className` that sets
139
+ `padding` on a region overrides the inset (same single-class weight)
140
+ rather than adding to it, and a full-width child reaches the popup edges
141
+ by zeroing its `padding-inline`.
142
+
143
+ ## Anti-patterns
144
+
145
+ - Do not rely on outside click or a backdrop click to close an alert
146
+ dialog — Base UI deliberately does not wire that; the user must choose
147
+ `AlertDialogAction` or `AlertDialogCancel`.
148
+ - Do not omit `AlertDialogTitle` — Base UI's accessibility tree needs it
149
+ even if visually hidden via `className`.
150
+ - Do not use `AlertDialog` for a dismissible, non-blocking notice — use
151
+ `dialog` (with a close button or outside-press dismissal) or `toast`.
@@ -0,0 +1,74 @@
1
+ # Alert
2
+
3
+ A banner-style callout for a page-level message — status, a warning, or a
4
+ short instruction that sits in the flow of the page rather than
5
+ interrupting it (that's `dialog`'s job). Alert has no Base UI primitive:
6
+ every part is a plain styled `div`, and the root carries `role="alert"` so
7
+ assistive tech announces it when it mounts.
8
+
9
+ Composition: `Alert` (root) → `AlertTitle` (optional), `AlertDescription`
10
+ (optional), `AlertAction` (optional, top-right corner). A leading `<svg>`
11
+ as `Alert`'s first child switches the layout to two columns — icon on the
12
+ left spanning both rows, title/description on the right — detected
13
+ structurally, no prop to set.
14
+
15
+ ## When to use
16
+
17
+ - A status message tied to the current page/section (form-wide validation
18
+ summary, a one-time notice, a "here's what changed" banner).
19
+ - Pairing a short instruction with an optional action (`AlertAction`) the
20
+ user can take right there, without leaving the page.
21
+
22
+ ## When not to use
23
+
24
+ - A blocking message the user must dismiss before continuing — use
25
+ `dialog`.
26
+ - A transient, self-dismissing notification — use `toast`.
27
+ - A field-level validation message tied to one control — use `Field`'s
28
+ `FieldError`.
29
+
30
+ ## Props (kit level)
31
+
32
+ `Alert`:
33
+
34
+ | Prop | Type | Default |
35
+ |------|------|---------|
36
+ | `variant` | `'default' \| 'destructive'` | `'default'` |
37
+ | `className` | `string` — merged after the variant class | — |
38
+
39
+ `AlertTitle`, `AlertDescription`, and `AlertAction` take no kit-specific
40
+ props — every prop is the underlying `<div>`'s props, forwarded as-is.
41
+
42
+ ## Examples
43
+
44
+ ```tsx
45
+ import { Alert, AlertAction, AlertDescription, AlertTitle, Button } from '@gears-frontx/ui-kit';
46
+
47
+ // Plain status message
48
+ <Alert>
49
+ <AlertTitle>Update available</AlertTitle>
50
+ <AlertDescription>A new version is ready to install.</AlertDescription>
51
+ </Alert>
52
+
53
+ // With a leading icon (switches to the two-column layout) and an action
54
+ <Alert variant="destructive">
55
+ <WarningIcon />
56
+ <AlertTitle>Payment failed</AlertTitle>
57
+ <AlertDescription>We couldn't charge your card ending in 4242.</AlertDescription>
58
+ <AlertAction>
59
+ <Button size="sm" variant="outline">Retry</Button>
60
+ </AlertAction>
61
+ </Alert>
62
+ ```
63
+
64
+ ## Anti-patterns
65
+
66
+ - Do not put more than one leading icon — the two-column layout is
67
+ detected off `Alert`'s *first* direct `<svg>` child; a second one just
68
+ renders as a second grid item, not a second icon column.
69
+ - Do not rely on `AlertAction`'s corner position for anything but a single
70
+ compact action (a button, an icon button) — it reserves a fixed amount
71
+ of padding on the alert's right edge, not a layout that grows with wider
72
+ content.
73
+ - Do not use `Alert` for anything the user must acknowledge before
74
+ proceeding — it has no dismiss/focus-trap behavior; that's `dialog`.
@@ -0,0 +1,65 @@
1
+ # AspectRatio
2
+
3
+ Constrains a child (typically an image or embed) to a fixed width-to-height
4
+ ratio using plain CSS `aspect-ratio` — no Base UI primitive, no variants.
5
+ Translated from shadcn/ui's `AspectRatio` (MIT), which is itself just a
6
+ `<div>` with a `--ratio` custom property and `aspect-ratio: var(--ratio)`.
7
+
8
+ ## When to use
9
+
10
+ - Reserving layout space for an image, video, or map embed before it loads,
11
+ so the page doesn't jump once it does.
12
+ - A gallery or card grid where every tile must share one proportion
13
+ regardless of its content's native size.
14
+
15
+ ## When not to use
16
+
17
+ - Content with a natural, already-fixed size (e.g. a fixed-size icon) —
18
+ `aspect-ratio` on a box whose content doesn't stretch to fill it does
19
+ nothing useful.
20
+ - As a cropping tool — this component reserves the *box*; the child (an
21
+ `<img>` with `object-fit: cover`, for example) still decides how it fills
22
+ that box.
23
+
24
+ ## Props
25
+
26
+ | Prop | Type | Default |
27
+ |------|------|---------|
28
+ | `ratio` | `number` (width / height, e.g. `16 / 9`) | — (required) |
29
+ | `className` | `string` — merged after the kit class | — |
30
+
31
+ All other props are native `<div>` props and are forwarded as-is, including
32
+ `style` — a consumer's own inline `style` is merged with (not overwritten
33
+ by) the `--ratio` custom property this component sets.
34
+
35
+ ## Examples
36
+
37
+ ```tsx
38
+ import { AspectRatio } from '@gears-frontx/ui-kit';
39
+
40
+ <div style={{ width: '20rem' }}>
41
+ <AspectRatio ratio={16 / 9}>
42
+ <img
43
+ src="/photo.jpg"
44
+ alt="A description"
45
+ style={{ width: '100%', height: '100%', objectFit: 'cover' }}
46
+ />
47
+ </AspectRatio>
48
+ </div>;
49
+
50
+ // Square tiles in a grid
51
+ <AspectRatio ratio={1}>
52
+ <img src="/thumb.jpg" alt="" style={{ width: '100%', height: '100%', objectFit: 'cover' }} />
53
+ </AspectRatio>;
54
+ ```
55
+
56
+ ## Anti-patterns
57
+
58
+ - Do not rely on this component to crop or fit the child's content — it
59
+ only reserves the box's proportions; give the child its own
60
+ `object-fit`/`overflow` handling.
61
+ - Do not pass an inline `style` with its own `--ratio` key expecting the
62
+ `ratio` prop to still win — the two objects are merged with the
63
+ consumer's `style` spread last, so a `--ratio` key inside it silently
64
+ overrides the one this component derives from `ratio`. Use the `ratio`
65
+ prop for the ratio; reserve `style` for everything else.