@zentauri-ui/zentauri-components 1.4.51 → 1.4.62

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 (314) hide show
  1. package/README.md +63 -1
  2. package/cli/registry.json +2 -1
  3. package/dist/{chunk-UXGHUBNJ.mjs → chunk-2PJF7DLJ.mjs} +3 -3
  4. package/dist/{chunk-UXGHUBNJ.mjs.map → chunk-2PJF7DLJ.mjs.map} +1 -1
  5. package/dist/{chunk-WDCIZHXY.mjs → chunk-45FCOQ63.mjs} +5 -3
  6. package/dist/chunk-45FCOQ63.mjs.map +1 -0
  7. package/dist/{chunk-RDSPHBHK.mjs → chunk-4ANBTJ5G.mjs} +49 -6
  8. package/dist/chunk-4ANBTJ5G.mjs.map +1 -0
  9. package/dist/chunk-4E66ICIR.mjs +158 -0
  10. package/dist/chunk-4E66ICIR.mjs.map +1 -0
  11. package/dist/{chunk-XLAFQ24R.js → chunk-4U6FOCFK.js} +22 -14
  12. package/dist/chunk-4U6FOCFK.js.map +1 -0
  13. package/dist/{chunk-XWM2S6VV.mjs → chunk-EQSSYK27.mjs} +12 -10
  14. package/dist/chunk-EQSSYK27.mjs.map +1 -0
  15. package/dist/{chunk-5QB2KNZQ.js → chunk-FGGYDAX3.js} +5 -3
  16. package/dist/chunk-FGGYDAX3.js.map +1 -0
  17. package/dist/{chunk-7HL3A4YF.mjs → chunk-IK75NHRX.mjs} +63 -14
  18. package/dist/chunk-IK75NHRX.mjs.map +1 -0
  19. package/dist/{chunk-BORK3BJO.mjs → chunk-J56L4ZQ3.mjs} +10 -10
  20. package/dist/{chunk-BORK3BJO.mjs.map → chunk-J56L4ZQ3.mjs.map} +1 -1
  21. package/dist/{chunk-PGH27VTL.mjs → chunk-JF3FKUUP.mjs} +21 -13
  22. package/dist/chunk-JF3FKUUP.mjs.map +1 -0
  23. package/dist/{chunk-WZKGRU3U.js → chunk-MQZB5EPD.js} +92 -27
  24. package/dist/chunk-MQZB5EPD.js.map +1 -0
  25. package/dist/{chunk-N4NO3SYL.js → chunk-NX3IHMT7.js} +22 -14
  26. package/dist/chunk-NX3IHMT7.js.map +1 -0
  27. package/dist/{chunk-BVXTOEBI.mjs → chunk-OG2WM5YK.mjs} +45 -17
  28. package/dist/chunk-OG2WM5YK.mjs.map +1 -0
  29. package/dist/{chunk-IXDJ3IPG.mjs → chunk-OXS6UJUG.mjs} +21 -13
  30. package/dist/chunk-OXS6UJUG.mjs.map +1 -0
  31. package/dist/{chunk-PCK6LX3K.js → chunk-PFOV3U7W.js} +3 -3
  32. package/dist/{chunk-PCK6LX3K.js.map → chunk-PFOV3U7W.js.map} +1 -1
  33. package/dist/{chunk-2PQEXQVR.js → chunk-THCNTPPL.js} +62 -13
  34. package/dist/chunk-THCNTPPL.js.map +1 -0
  35. package/dist/chunk-UP6S75V5.js +160 -0
  36. package/dist/chunk-UP6S75V5.js.map +1 -0
  37. package/dist/{chunk-P5HUBXUX.js → chunk-V2IWLR4O.js} +48 -5
  38. package/dist/chunk-V2IWLR4O.js.map +1 -0
  39. package/dist/{chunk-3OR47XMY.js → chunk-VSKL5LOB.js} +45 -17
  40. package/dist/chunk-VSKL5LOB.js.map +1 -0
  41. package/dist/{chunk-E3DZNJAD.js → chunk-Y4EDWZKH.js} +12 -10
  42. package/dist/chunk-Y4EDWZKH.js.map +1 -0
  43. package/dist/{chunk-YNCD6TKE.mjs → chunk-Y4IFVO46.mjs} +93 -28
  44. package/dist/chunk-Y4IFVO46.mjs.map +1 -0
  45. package/dist/{chunk-BITDSQMR.js → chunk-ZNDHS5OK.js} +10 -10
  46. package/dist/{chunk-BITDSQMR.js.map → chunk-ZNDHS5OK.js.map} +1 -1
  47. package/dist/hooks/useFocusManagement/useFocusManagement.d.ts +5 -14
  48. package/dist/hooks/useFocusManagement/useFocusManagement.d.ts.map +1 -1
  49. package/dist/hooks/useFocusManagement.js +2 -2
  50. package/dist/hooks/useFocusManagement.mjs +1 -1
  51. package/dist/ui/badge/animated.js +2 -2
  52. package/dist/ui/badge/animated.mjs +1 -1
  53. package/dist/ui/badge/badge-base.d.ts +1 -1
  54. package/dist/ui/badge/badge-base.d.ts.map +1 -1
  55. package/dist/ui/badge/types.d.ts +1 -0
  56. package/dist/ui/badge/types.d.ts.map +1 -1
  57. package/dist/ui/badge/variants.d.ts +7 -7
  58. package/dist/ui/badge.js +4 -4
  59. package/dist/ui/badge.mjs +2 -2
  60. package/dist/ui/buttons/animated.js +3 -3
  61. package/dist/ui/buttons/animated.mjs +1 -1
  62. package/dist/ui/buttons.js +4 -4
  63. package/dist/ui/buttons.mjs +2 -2
  64. package/dist/ui/drawer/animated/drawer-content-animated.d.ts.map +1 -1
  65. package/dist/ui/drawer/animated.js +17 -18
  66. package/dist/ui/drawer/animated.js.map +1 -1
  67. package/dist/ui/drawer/animated.mjs +8 -9
  68. package/dist/ui/drawer/animated.mjs.map +1 -1
  69. package/dist/ui/drawer/drawer-base.d.ts +1 -1
  70. package/dist/ui/drawer/drawer-base.d.ts.map +1 -1
  71. package/dist/ui/drawer/types.d.ts +1 -0
  72. package/dist/ui/drawer/types.d.ts.map +1 -1
  73. package/dist/ui/drawer.js +12 -12
  74. package/dist/ui/drawer.mjs +2 -2
  75. package/dist/ui/dropdown/dropdown.d.ts +1 -1
  76. package/dist/ui/dropdown/dropdown.d.ts.map +1 -1
  77. package/dist/ui/dropdown/types.d.ts +1 -0
  78. package/dist/ui/dropdown/types.d.ts.map +1 -1
  79. package/dist/ui/dropdown/variants.d.ts +1 -1
  80. package/dist/ui/dropdown.js +25 -7
  81. package/dist/ui/dropdown.js.map +1 -1
  82. package/dist/ui/dropdown.mjs +26 -8
  83. package/dist/ui/dropdown.mjs.map +1 -1
  84. package/dist/ui/empty-state/animated.js +2 -2
  85. package/dist/ui/empty-state/animated.mjs +1 -1
  86. package/dist/ui/empty-state/empty-state-base.d.ts.map +1 -1
  87. package/dist/ui/empty-state/types.d.ts +1 -0
  88. package/dist/ui/empty-state/types.d.ts.map +1 -1
  89. package/dist/ui/empty-state.js +10 -10
  90. package/dist/ui/empty-state.mjs +2 -2
  91. package/dist/ui/file-upload/file-upload.d.ts.map +1 -1
  92. package/dist/ui/file-upload.js +1 -3
  93. package/dist/ui/file-upload.js.map +1 -1
  94. package/dist/ui/file-upload.mjs +1 -3
  95. package/dist/ui/file-upload.mjs.map +1 -1
  96. package/dist/ui/inputs/input-base.d.ts.map +1 -1
  97. package/dist/ui/inputs/types.d.ts +3 -1
  98. package/dist/ui/inputs/types.d.ts.map +1 -1
  99. package/dist/ui/inputs.js +46 -2
  100. package/dist/ui/inputs.js.map +1 -1
  101. package/dist/ui/inputs.mjs +46 -2
  102. package/dist/ui/inputs.mjs.map +1 -1
  103. package/dist/ui/modal/animated/modal-content-animated.d.ts.map +1 -1
  104. package/dist/ui/modal/animated.js +10 -11
  105. package/dist/ui/modal/animated.js.map +1 -1
  106. package/dist/ui/modal/animated.mjs +7 -8
  107. package/dist/ui/modal/animated.mjs.map +1 -1
  108. package/dist/ui/modal/modal-base.d.ts +4 -2
  109. package/dist/ui/modal/modal-base.d.ts.map +1 -1
  110. package/dist/ui/modal.js +13 -13
  111. package/dist/ui/modal.mjs +3 -3
  112. package/dist/ui/pagination.js +6 -6
  113. package/dist/ui/pagination.js.map +1 -1
  114. package/dist/ui/pagination.mjs +3 -3
  115. package/dist/ui/pagination.mjs.map +1 -1
  116. package/dist/ui/progress/animated/progress-animated.d.ts.map +1 -1
  117. package/dist/ui/progress/animated.js +49 -11
  118. package/dist/ui/progress/animated.js.map +1 -1
  119. package/dist/ui/progress/animated.mjs +44 -6
  120. package/dist/ui/progress/animated.mjs.map +1 -1
  121. package/dist/ui/progress/progress-base.d.ts.map +1 -1
  122. package/dist/ui/progress/types.d.ts +3 -0
  123. package/dist/ui/progress/types.d.ts.map +1 -1
  124. package/dist/ui/progress.js +9 -9
  125. package/dist/ui/progress.mjs +2 -2
  126. package/dist/ui/search/search-bar.d.ts +1 -1
  127. package/dist/ui/search/search-bar.d.ts.map +1 -1
  128. package/dist/ui/search/search-suggestion-list.d.ts.map +1 -1
  129. package/dist/ui/search.js +12 -6
  130. package/dist/ui/search.js.map +1 -1
  131. package/dist/ui/search.mjs +12 -6
  132. package/dist/ui/search.mjs.map +1 -1
  133. package/dist/ui/select/select.d.ts +1 -1
  134. package/dist/ui/select/select.d.ts.map +1 -1
  135. package/dist/ui/select/types.d.ts +1 -0
  136. package/dist/ui/select/types.d.ts.map +1 -1
  137. package/dist/ui/select/variants.d.ts +1 -1
  138. package/dist/ui/select/variants.d.ts.map +1 -1
  139. package/dist/ui/select.js +121 -39
  140. package/dist/ui/select.js.map +1 -1
  141. package/dist/ui/select.mjs +122 -40
  142. package/dist/ui/select.mjs.map +1 -1
  143. package/dist/ui/skeleton/variants.d.ts +1 -1
  144. package/dist/ui/slider/slider.d.ts.map +1 -1
  145. package/dist/ui/slider/types.d.ts +8 -2
  146. package/dist/ui/slider/types.d.ts.map +1 -1
  147. package/dist/ui/slider.js +43 -7
  148. package/dist/ui/slider.js.map +1 -1
  149. package/dist/ui/slider.mjs +43 -7
  150. package/dist/ui/slider.mjs.map +1 -1
  151. package/dist/ui/spinner/animated/spinner.d.ts.map +1 -1
  152. package/dist/ui/spinner/animated.js +62 -50
  153. package/dist/ui/spinner/animated.js.map +1 -1
  154. package/dist/ui/spinner/animated.mjs +63 -51
  155. package/dist/ui/spinner/animated.mjs.map +1 -1
  156. package/dist/ui/stepper/stepper.d.ts +2 -7
  157. package/dist/ui/stepper/stepper.d.ts.map +1 -1
  158. package/dist/ui/stepper/types.d.ts +3 -3
  159. package/dist/ui/stepper/types.d.ts.map +1 -1
  160. package/dist/ui/stepper/variants.d.ts +1 -1
  161. package/dist/ui/stepper.js +7 -5
  162. package/dist/ui/stepper.js.map +1 -1
  163. package/dist/ui/stepper.mjs +7 -5
  164. package/dist/ui/stepper.mjs.map +1 -1
  165. package/dist/ui/table/animated.js +8 -8
  166. package/dist/ui/table/animated.mjs +2 -2
  167. package/dist/ui/table/table-base.d.ts +1 -1
  168. package/dist/ui/table/table-base.d.ts.map +1 -1
  169. package/dist/ui/table/types.d.ts +5 -1
  170. package/dist/ui/table/types.d.ts.map +1 -1
  171. package/dist/ui/table.js +14 -14
  172. package/dist/ui/table.mjs +1 -1
  173. package/dist/ui/tabs/animated.js +2 -2
  174. package/dist/ui/tabs/animated.mjs +1 -1
  175. package/dist/ui/tabs/tabs-base.d.ts.map +1 -1
  176. package/dist/ui/tabs/types.d.ts +2 -1
  177. package/dist/ui/tabs/types.d.ts.map +1 -1
  178. package/dist/ui/tabs.js +9 -9
  179. package/dist/ui/tabs.mjs +1 -1
  180. package/dist/ui/toast/animated.js +7 -7
  181. package/dist/ui/toast/animated.mjs +1 -1
  182. package/dist/ui/toast.js +12 -12
  183. package/dist/ui/toast.mjs +1 -1
  184. package/dist/ui/toggle/toggle-base.d.ts.map +1 -1
  185. package/dist/ui/toggle.js +28 -3
  186. package/dist/ui/toggle.js.map +1 -1
  187. package/dist/ui/toggle.mjs +29 -4
  188. package/dist/ui/toggle.mjs.map +1 -1
  189. package/dist/ui/tooltip/animated.js +3 -3
  190. package/dist/ui/tooltip/animated.mjs +1 -1
  191. package/dist/ui/tooltip/tooltip-base.d.ts.map +1 -1
  192. package/dist/ui/tooltip/types.d.ts +1 -0
  193. package/dist/ui/tooltip/types.d.ts.map +1 -1
  194. package/dist/ui/tooltip.js +7 -7
  195. package/dist/ui/tooltip.mjs +1 -1
  196. package/dist/ui/typography/blockquote-base.d.ts +6 -0
  197. package/dist/ui/typography/blockquote-base.d.ts.map +1 -0
  198. package/dist/ui/typography/blockquote.d.ts +6 -0
  199. package/dist/ui/typography/blockquote.d.ts.map +1 -0
  200. package/dist/ui/typography/code-block-base.d.ts +6 -0
  201. package/dist/ui/typography/code-block-base.d.ts.map +1 -0
  202. package/dist/ui/typography/code-block.d.ts +6 -0
  203. package/dist/ui/typography/code-block.d.ts.map +1 -0
  204. package/dist/ui/typography/heading-base.d.ts +6 -0
  205. package/dist/ui/typography/heading-base.d.ts.map +1 -0
  206. package/dist/ui/typography/heading.d.ts +6 -0
  207. package/dist/ui/typography/heading.d.ts.map +1 -0
  208. package/dist/ui/typography/index.d.ts +9 -0
  209. package/dist/ui/typography/index.d.ts.map +1 -0
  210. package/dist/ui/typography/inline-code-base.d.ts +6 -0
  211. package/dist/ui/typography/inline-code-base.d.ts.map +1 -0
  212. package/dist/ui/typography/inline-code.d.ts +6 -0
  213. package/dist/ui/typography/inline-code.d.ts.map +1 -0
  214. package/dist/ui/typography/list-base.d.ts +10 -0
  215. package/dist/ui/typography/list-base.d.ts.map +1 -0
  216. package/dist/ui/typography/list.d.ts +12 -0
  217. package/dist/ui/typography/list.d.ts.map +1 -0
  218. package/dist/ui/typography/text-base.d.ts +6 -0
  219. package/dist/ui/typography/text-base.d.ts.map +1 -0
  220. package/dist/ui/typography/text.d.ts +6 -0
  221. package/dist/ui/typography/text.d.ts.map +1 -0
  222. package/dist/ui/typography/types.d.ts +56 -0
  223. package/dist/ui/typography/types.d.ts.map +1 -0
  224. package/dist/ui/typography/variants.d.ts +16 -0
  225. package/dist/ui/typography/variants.d.ts.map +1 -0
  226. package/dist/ui/typography.js +334 -0
  227. package/dist/ui/typography.js.map +1 -0
  228. package/dist/ui/typography.mjs +321 -0
  229. package/dist/ui/typography.mjs.map +1 -0
  230. package/package.json +1 -1
  231. package/src/hooks/useFocusManagement/useFocusManagement.test.tsx +8 -0
  232. package/src/hooks/useFocusManagement/useFocusManagement.ts +162 -33
  233. package/src/ui/badge/badge-base.tsx +4 -1
  234. package/src/ui/badge/types.ts +1 -0
  235. package/src/ui/badge/variants.ts +7 -7
  236. package/src/ui/buttons/button.test.tsx +1 -1
  237. package/src/ui/buttons/variants.ts +8 -8
  238. package/src/ui/drawer/animated/drawer-content-animated.tsx +4 -5
  239. package/src/ui/drawer/drawer-base.tsx +16 -8
  240. package/src/ui/drawer/types.ts +1 -0
  241. package/src/ui/dropdown/dropdown.test.tsx +1 -3
  242. package/src/ui/dropdown/dropdown.tsx +23 -5
  243. package/src/ui/dropdown/types.ts +1 -0
  244. package/src/ui/dropdown/variants.ts +2 -2
  245. package/src/ui/empty-state/empty-state-base.tsx +9 -1
  246. package/src/ui/empty-state/types.ts +1 -0
  247. package/src/ui/file-upload/file-upload.tsx +0 -2
  248. package/src/ui/inputs/input-base.tsx +60 -6
  249. package/src/ui/inputs/types.ts +3 -1
  250. package/src/ui/modal/animated/modal-content-animated.tsx +4 -5
  251. package/src/ui/modal/modal-base.tsx +19 -9
  252. package/src/ui/modal/modal.test.tsx +38 -0
  253. package/src/ui/pagination/pagination.tsx +2 -2
  254. package/src/ui/progress/animated/progress-animated.tsx +42 -3
  255. package/src/ui/progress/progress-base.tsx +59 -3
  256. package/src/ui/progress/types.ts +3 -0
  257. package/src/ui/search/search-bar.tsx +6 -1
  258. package/src/ui/search/search-suggestion-list.tsx +14 -6
  259. package/src/ui/select/select.tsx +97 -6
  260. package/src/ui/select/types.ts +1 -0
  261. package/src/ui/select/variants.ts +5 -3
  262. package/src/ui/slider/slider.test.tsx +25 -1
  263. package/src/ui/slider/slider.tsx +45 -4
  264. package/src/ui/slider/types.ts +8 -2
  265. package/src/ui/spinner/animated/spinner.tsx +4 -0
  266. package/src/ui/stepper/stepper.test.tsx +6 -7
  267. package/src/ui/stepper/stepper.tsx +11 -10
  268. package/src/ui/stepper/types.ts +7 -3
  269. package/src/ui/table/table-base.tsx +32 -6
  270. package/src/ui/table/types.ts +8 -1
  271. package/src/ui/tabs/tabs-base.tsx +71 -10
  272. package/src/ui/tabs/types.ts +2 -1
  273. package/src/ui/tabs/variants.ts +1 -1
  274. package/src/ui/toast/toast-base.tsx +1 -1
  275. package/src/ui/toggle/toggle-base.tsx +37 -4
  276. package/src/ui/tooltip/tooltip-base.tsx +119 -22
  277. package/src/ui/tooltip/types.ts +1 -0
  278. package/src/ui/tooltip/variants.ts +2 -2
  279. package/src/ui/typography/blockquote-base.tsx +39 -0
  280. package/src/ui/typography/blockquote.tsx +8 -0
  281. package/src/ui/typography/code-block-base.tsx +37 -0
  282. package/src/ui/typography/code-block.tsx +8 -0
  283. package/src/ui/typography/heading-base.tsx +59 -0
  284. package/src/ui/typography/heading.tsx +8 -0
  285. package/src/ui/typography/index.ts +28 -0
  286. package/src/ui/typography/inline-code-base.tsx +27 -0
  287. package/src/ui/typography/inline-code.tsx +8 -0
  288. package/src/ui/typography/list-base.tsx +88 -0
  289. package/src/ui/typography/list.tsx +15 -0
  290. package/src/ui/typography/text-base.tsx +43 -0
  291. package/src/ui/typography/text.tsx +8 -0
  292. package/src/ui/typography/types.ts +90 -0
  293. package/src/ui/typography/typography.test.tsx +80 -0
  294. package/src/ui/typography/variants.ts +72 -0
  295. package/dist/chunk-2PQEXQVR.js.map +0 -1
  296. package/dist/chunk-3OR47XMY.js.map +0 -1
  297. package/dist/chunk-5QB2KNZQ.js.map +0 -1
  298. package/dist/chunk-7HL3A4YF.mjs.map +0 -1
  299. package/dist/chunk-BVXTOEBI.mjs.map +0 -1
  300. package/dist/chunk-E3DZNJAD.js.map +0 -1
  301. package/dist/chunk-IXDJ3IPG.mjs.map +0 -1
  302. package/dist/chunk-N4NO3SYL.js.map +0 -1
  303. package/dist/chunk-P5HUBXUX.js.map +0 -1
  304. package/dist/chunk-PGH27VTL.mjs.map +0 -1
  305. package/dist/chunk-RDSPHBHK.mjs.map +0 -1
  306. package/dist/chunk-WDCIZHXY.mjs.map +0 -1
  307. package/dist/chunk-WL5I7RVS.mjs +0 -54
  308. package/dist/chunk-WL5I7RVS.mjs.map +0 -1
  309. package/dist/chunk-WZKGRU3U.js.map +0 -1
  310. package/dist/chunk-XLAFQ24R.js.map +0 -1
  311. package/dist/chunk-XWM2S6VV.mjs.map +0 -1
  312. package/dist/chunk-YNCD6TKE.mjs.map +0 -1
  313. package/dist/chunk-YPLVTUYL.js +0 -56
  314. package/dist/chunk-YPLVTUYL.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/ui/typography/variants.ts","../../src/ui/typography/heading-base.tsx","../../src/ui/typography/heading.tsx","../../src/ui/typography/text-base.tsx","../../src/ui/typography/text.tsx","../../src/ui/typography/list-base.tsx","../../src/ui/typography/list.tsx","../../src/ui/typography/blockquote-base.tsx","../../src/ui/typography/blockquote.tsx","../../src/ui/typography/inline-code-base.tsx","../../src/ui/typography/inline-code.tsx","../../src/ui/typography/code-block-base.tsx","../../src/ui/typography/code-block.tsx"],"names":["jsx","tone","className","children","ref","ordered","marker","rest"],"mappings":";;;;AAGO,IAAM,sBAAA,GAAyB,IAAI,EAAA,EAAI;AAAA,EAC5C,QAAA,EAAU;AAAA,IACR,IAAA,EAAM;AAAA,MACJ,OAAA,EAAS,+BAAA;AAAA,MACT,KAAA,EAAO,gCAAA;AAAA,MACP,OAAA,EAAS,kCAAA;AAAA,MACT,SAAA,EAAW,gCAAA;AAAA,MACX,MAAA,EAAQ,sCAAA;AAAA,MACR,WAAA,EAAa,kCAAA;AAAA,MACb,IAAA,EAAM,gCAAA;AAAA,MACN,OAAA,EAAS,wCAAA;AAAA,MACT,OAAA,EAAS,oCAAA;AAAA,MACT,KAAA,EAAO,gCAAA;AAAA,MACP,sBAAA,EAAwB,0EAAA;AAAA,MACxB,sBAAA,EAAwB,0EAAA;AAAA,MACxB,oBAAA,EAAsB,wEAAA;AAAA,MACtB,qBAAA,EAAuB,yEAAA;AAAA,MACvB,sBAAA,EAAwB,0EAAA;AAAA,MACxB,mBAAA,EAAqB,uEAAA;AAAA,MACrB,sBAAA,EAAwB,0EAAA;AAAA,MACxB,oBAAA,EAAsB;AAAA;AACxB,GACF;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,IAAA,EAAM;AAAA;AAEV,CAAC;AAEM,IAAM,oBAAA,GAAuB,IAAI,aAAA,EAAe;AAAA,EACrD,QAAA,EAAU;AAAA,IACR,KAAA,EAAO;AAAA,MACL,CAAA,EAAG,+CAAA;AAAA,MACH,CAAA,EAAG,uCAAA;AAAA,MACH,CAAA,EAAG,u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ned with slate/cyan/violet accents used across the kit (dark-first). */\nexport const typographyToneVariants = cva(\"\", {\n variants: {\n tone: {\n default: \"text-slate-50 border-white/15\",\n muted: \"text-slate-400 border-white/15\",\n primary: \"text-cyan-300 border-cyan-300/40\",\n secondary: \"text-slate-300 border-white/15\",\n accent: \"text-violet-300 border-violet-300/40\",\n destructive: \"text-rose-400 border-rose-300/40\",\n info: \"text-sky-300 border-sky-300/40\",\n success: \"text-emerald-300 border-emerald-300/40\",\n warning: \"text-amber-300 border-amber-300/40\",\n error: \"text-red-300 border-red-300/40\",\n \"gradient-pink-violet\": \"bg-linear-to-r from-pink-400 to-violet-400 bg-clip-text text-transparent\",\n \"gradient-cyan-violet\": \"bg-linear-to-r from-cyan-400 to-violet-400 bg-clip-text text-transparent\",\n \"gradient-cyan-blue\": \"bg-linear-to-r from-cyan-400 to-blue-400 bg-clip-text text-transparent\",\n \"gradient-cyan-green\": \"bg-linear-to-r from-cyan-400 to-green-400 bg-clip-text text-transparent\",\n \"gradient-cyan-orange\": \"bg-linear-to-r from-cyan-400 to-orange-400 bg-clip-text text-transparent\",\n \"gradient-cyan-red\": \"bg-linear-to-r from-cyan-400 to-red-400 bg-clip-text text-transparent\",\n \"gradient-cyan-purple\": \"bg-linear-to-r from-cyan-400 to-purple-400 bg-clip-text text-transparent\",\n \"gradient-cyan-pink\": \"bg-linear-to-r from-cyan-400 to-pink-400 bg-clip-text text-transparent\",\n },\n },\n defaultVariants: {\n tone: \"default\",\n },\n});\n\nexport const headingLevelVariants = cva(\"scroll-m-20\", {\n variants: {\n level: {\n 1: \"text-4xl font-bold tracking-tight md:text-5xl\",\n 2: \"text-3xl font-semibold tracking-tight\",\n 3: \"text-2xl font-semibold tracking-tight\",\n 4: \"text-xl font-semibold tracking-tight\",\n 5: \"text-lg font-medium\",\n 6: \"text-base font-medium\",\n },\n },\n});\n\nexport const textSizeVariants = cva(\"\", {\n variants: {\n size: {\n sm: \"text-sm leading-relaxed\",\n base: \"text-base leading-relaxed\",\n lg: \"text-lg leading-relaxed\",\n },\n },\n defaultVariants: {\n size: \"base\",\n },\n});\n\n/** Marker style for unordered lists; ignored when `ordered` is true (decimal numbering). */\nexport const unorderedListMarkerVariants = cva(\"space-y-2 pl-5\", {\n variants: {\n marker: {\n disc: \"list-disc\",\n circle: \"[list-style-type:circle]\",\n none: \"list-none pl-0\",\n },\n },\n defaultVariants: {\n marker: \"disc\",\n },\n});\n\nexport const orderedListVariants = cva(\"list-decimal space-y-2 pl-5\");\n","import { forwardRef } from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nimport type { HeadingProps } from \"./types\";\nimport {\n headingLevelVariants,\n typographyToneVariants,\n} from \"./variants\";\n\nconst HEADING_TAGS = {\n 1: \"h1\",\n 2: \"h2\",\n 3: \"h3\",\n 4: \"h4\",\n 5: \"h5\",\n 6: \"h6\",\n} as const;\n\nexport const HeadingBase = (props: HeadingProps) => {\n const {\n level,\n displayLevel,\n tone,\n bold,\n italic,\n underline,\n strikethrough,\n ref,\n className,\n children,\n ...rest\n } = props;\n\n const Tag = HEADING_TAGS[level];\n const scale = displayLevel ?? level;\n\n return (\n <Tag\n ref={ref}\n data-slot=\"typography-heading\"\n data-level={level}\n className={cn(\n typographyToneVariants({ tone }),\n headingLevelVariants({ level: scale }),\n bold && \"font-bold\",\n italic && \"italic\",\n underline && \"underline underline-offset-4\",\n strikethrough && \"line-through\",\n className,\n )}\n {...rest}\n >\n {children}\n </Tag>\n );\n};\n\nHeadingBase.displayName = \"Heading\";\n","import { HeadingBase } from \"./heading-base\";\nimport type { HeadingProps } from \"./types\";\n\nexport const Heading = (props: HeadingProps) => {\n return <HeadingBase {...props} />;\n};\n\nHeading.displayName = \"Heading\";\n","import { cn } from \"../../lib/utils\";\n\nimport type { TextProps } from \"./types\";\nimport { textSizeVariants, typographyToneVariants } from \"./variants\";\n\nexport const TextBase = (props: TextProps) => {\n const {\n as = \"p\",\n size = \"base\",\n tone,\n bold,\n italic,\n underline,\n strikethrough,\n highlight,\n className,\n children,\n ...rest\n } = props;\n\n const Component = as;\n\n return (\n <Component\n data-slot=\"typography-text\"\n className={cn(\n typographyToneVariants({ tone }),\n textSizeVariants({ size }),\n bold && \"font-semibold\",\n italic && \"italic\",\n underline && \"underline underline-offset-2\",\n strikethrough && \"line-through\",\n highlight && \"rounded bg-amber-400/15 px-0.5\",\n className,\n )}\n {...rest}\n >\n {children}\n </Component>\n );\n};\n\nTextBase.displayName = \"Text\";\n","import { TextBase } from \"./text-base\";\nimport type { TextProps } from \"./types\";\n\nexport const Text = (props: TextProps) => {\n return <TextBase {...props} />;\n};\n\nText.displayName = \"Text\";\n","import { cn } from \"../../lib/utils\";\n\nimport type { ListProps, ListItemProps } from \"./types\";\nimport {\n orderedListVariants,\n typographyToneVariants,\n unorderedListMarkerVariants,\n} from \"./variants\";\n\nexport function ListBase(props: ListProps) {\n if (\"ordered\" in props && props.ordered === true) {\n const {\n tone,\n className,\n children,\n ref,\n ordered,\n marker,\n ...rest\n } = props;\n\n void ordered;\n void marker;\n\n return (\n <ol\n ref={ref}\n data-slot=\"typography-list\"\n data-list-type=\"ordered\"\n className={cn(\n typographyToneVariants({ tone }),\n orderedListVariants(),\n className,\n )}\n {...rest}\n >\n {children}\n </ol>\n );\n }\n\n const {\n marker = \"disc\",\n tone,\n className,\n children,\n ref,\n ordered,\n ...rest\n } = props;\n\n void ordered;\n\n return (\n <ul\n ref={ref}\n data-slot=\"typography-list\"\n data-list-type=\"unordered\"\n className={cn(\n typographyToneVariants({ tone }),\n unorderedListMarkerVariants({ marker }),\n className,\n )}\n {...rest}\n >\n {children}\n </ul>\n );\n}\n\nListBase.displayName = \"List\";\n\nexport function ListItemBase(props: ListItemProps) {\n const { className, children, ref, ...rest } = props;\n\n return (\n <li\n ref={ref}\n data-slot=\"typography-list-item\"\n className={cn(\"leading-relaxed\", className)}\n {...rest}\n >\n {children}\n </li>\n );\n}\n\nListItemBase.displayName = \"ListItem\";\n","import type { ListProps } from \"./types\";\n\nimport { ListBase, ListItemBase } from \"./list-base\";\n\nexport const ListItem = ListItemBase;\n\nfunction ListRoot(props: ListProps) {\n return <ListBase {...props} />;\n}\n\nexport const List = Object.assign(ListRoot, {\n Item: ListItem,\n});\n\nListRoot.displayName = \"List\";\n","import { forwardRef } from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nimport type { BlockquoteProps } from \"./types\";\nimport { typographyToneVariants } from \"./variants\";\n\nexport const BlockquoteBase = (props: BlockquoteProps) => {\n const {\n tone,\n attribution,\n className,\n children,\n ref,\n ...rest\n } = props;\n\n return (\n <blockquote\n ref={ref}\n data-slot=\"typography-blockquote\"\n className={cn(\n typographyToneVariants({ tone }),\n \"border-l-4 py-1 pl-4 italic\",\n className,\n )}\n {...rest}\n >\n <div className=\"space-y-2 leading-relaxed\">{children}</div>\n {attribution ? (\n <footer className=\"mt-3 text-sm not-italic\">\n <cite>{attribution}</cite>\n </footer>\n ) : null}\n </blockquote>\n );\n};\n\nBlockquoteBase.displayName = \"Blockquote\";\n","import { BlockquoteBase } from \"./blockquote-base\";\nimport type { BlockquoteProps } from \"./types\";\n\nexport const Blockquote = (props: BlockquoteProps) => {\n return <BlockquoteBase {...props} />;\n};\n\nBlockquote.displayName = \"Blockquote\";\n","import { forwardRef } from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nimport type { InlineCodeProps } from \"./types\";\nimport { typographyToneVariants } from \"./variants\";\n\nexport const InlineCodeBase = (props: InlineCodeProps) => {\n const { tone, className, children, ref, ...rest } = props;\n\n return (\n <code\n ref={ref}\n data-slot=\"typography-inline-code\"\n className={cn(\n typographyToneVariants({ tone }),\n \"rounded-md border border-white/10 bg-white/6 px-1.5 py-0.5 font-mono text-[0.925em] font-normal\",\n className,\n )}\n {...rest}\n >\n {children}\n </code>\n );\n};\n\nInlineCodeBase.displayName = \"InlineCode\";\n","import { InlineCodeBase } from \"./inline-code-base\";\nimport type { InlineCodeProps } from \"./types\";\n\nexport const InlineCode = (props: InlineCodeProps) => {\n return <InlineCodeBase {...props} />;\n};\n\nInlineCode.displayName = \"InlineCode\";\n","import { forwardRef } from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nimport type { CodeBlockProps } from \"./types\";\nimport { typographyToneVariants } from \"./variants\";\n\nexport const CodeBlockBase = (props: CodeBlockProps) => {\n const {\n tone,\n language,\n className,\n children,\n ref,\n ...rest\n } = props;\n\n const ariaLabel = language ? `Code sample (${language})` : \"Code sample\";\n\n return (\n <pre\n ref={ref}\n data-slot=\"typography-code-block\"\n aria-label={ariaLabel}\n className={cn(\n typographyToneVariants({ tone }),\n \"overflow-x-auto rounded-xl border border-white/10 bg-slate-950/80 p-4 text-sm leading-relaxed shadow-inner shadow-slate-950/40\",\n className,\n )}\n {...rest}\n >\n <code className=\"font-mono text-[0.95em] whitespace-pre-wrap wrap-break-word\">{children}</code>\n </pre>\n );\n};\n\nCodeBlockBase.displayName = \"CodeBlock\";\n","import { CodeBlockBase } from \"./code-block-base\";\nimport type { CodeBlockProps } from \"./types\";\n\nexport const CodeBlock = (props: CodeBlockProps) => {\n return <CodeBlockBase {...props} />;\n};\n\nCodeBlock.displayName = \"CodeBlock\";\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zentauri-ui/zentauri-components",
3
- "version": "1.4.51",
3
+ "version": "1.4.62",
4
4
  "description": "React + Tailwind UI kit with ESM/CJS builds, per-entry exports, and a zentauri-components / zentauri-ui CLI to vendor UI or hook source into your app",
5
5
  "license": "MIT",
6
6
  "files": ["dist", "src/ui", "src/lib", "src/hooks", "cli"],
@@ -42,4 +42,12 @@ describe("useFocusManagement", () => {
42
42
  fireEvent.keyDown(window, { key: "Escape" });
43
43
  expect(screen.queryByTestId("dialog")).not.toBeInTheDocument();
44
44
  });
45
+
46
+ it("should return focus inside the overlay when focus moves outside without Tab", () => {
47
+ render(<Modal initialOpen />);
48
+ const outsideButton = screen.getByTestId("after");
49
+ outsideButton.focus();
50
+ expect(outsideButton).not.toHaveFocus();
51
+ expect(screen.getByRole("button", { name: "first" })).toHaveFocus();
52
+ });
45
53
  });
@@ -1,39 +1,61 @@
1
1
  "use client";
2
2
 
3
3
  import type { RefObject } from "react";
4
- import { useEffect } from "react";
4
+ import { useEffect, useLayoutEffect, useRef } from "react";
5
5
  import { useBodyScrollLock } from "../useBodyScrollLock";
6
6
 
7
7
  const FOCUSABLE_SELECTOR =
8
- 'a[href], button:not([disabled]), textarea, input, select, [tabindex]:not([tabindex="-1"])';
8
+ [
9
+ 'a[href]',
10
+ 'button:not([disabled])',
11
+ 'textarea:not([disabled])',
12
+ 'input:not([disabled])',
13
+ 'select:not([disabled])',
14
+ '[tabindex]:not([tabindex="-1"])',
15
+ ].join(", ");
16
+
17
+ function getFocusableElements(
18
+ root: HTMLElement,
19
+ focusableSelector: string,
20
+ ): HTMLElement[] {
21
+ return Array.from(
22
+ root.querySelectorAll<HTMLElement>(focusableSelector),
23
+ ).filter((element) => {
24
+ if (element.getAttribute("aria-hidden") === "true") {
25
+ return false;
26
+ }
27
+ if (typeof window === "undefined") {
28
+ return true;
29
+ }
30
+ const style = getComputedStyle(element);
31
+ if (style.visibility === "hidden" || style.display === "none") {
32
+ return false;
33
+ }
34
+ return true;
35
+ });
36
+ }
9
37
 
10
38
  /**
11
- * Composes modal-like behavior for an open overlay: body scroll lock, Escape to close, and focus trapping.
12
- *
13
- * - Delegates scroll locking to {@link useBodyScrollLock} while `open` is true.
14
- * - Listens for `Escape` on `window` and calls `setOpen(false)`.
15
- * - When `open` becomes true, focuses the first visible focusable inside `contentRef`, or the container itself.
16
- * - Traps focus within `contentRef` via a capturing `focusin` listener on `document` that redirects focus back inside.
17
- * - On close/unmount of the open effect, restores focus to the element that was focused before the trap ran.
18
- *
19
- * @param params.open - Whether the overlay is visible.
20
- * @param params.setOpen - Setter used for Escape and cleanup paths.
21
- * @param params.contentRef - Root of the dialog/drawer content (must point at a focusable container or include focusables).
22
- * @param params.focusableSelector - Query selector for tabbable elements; defaults to a common interactive set.
39
+ * Composes modal-like behavior for an open overlay: body scroll lock, Escape to close, focus trapping with circular Tab cycling, and restoring focus after close.
23
40
  */
24
41
  export const useFocusManagement = ({
25
42
  open,
26
43
  setOpen,
27
44
  contentRef,
45
+ triggerRef,
28
46
  focusableSelector = FOCUSABLE_SELECTOR,
29
47
  }: {
30
48
  open: boolean;
31
49
  setOpen: (open: boolean) => void;
32
- contentRef: RefObject<HTMLDivElement | null>;
50
+ contentRef: RefObject<HTMLElement | null>;
51
+ /** Last modal trigger control; used when focus cannot be inferred at open time. */
52
+ triggerRef?: RefObject<HTMLElement | null>;
33
53
  focusableSelector?: string;
34
54
  }) => {
35
55
  useBodyScrollLock(open);
36
56
 
57
+ const previousFocusRef = useRef<HTMLElement | null>(null);
58
+
37
59
  useEffect(() => {
38
60
  if (!open) {
39
61
  return;
@@ -47,31 +69,138 @@ export const useFocusManagement = ({
47
69
  return () => window.removeEventListener("keydown", handleKeyDown);
48
70
  }, [open, setOpen]);
49
71
 
50
- useEffect(() => {
72
+ useLayoutEffect(() => {
51
73
  if (!open) {
52
74
  return;
53
75
  }
54
- const node = contentRef.current;
55
- if (!node) {
56
- return;
57
- }
58
- const focusables = Array.from(
59
- node.querySelectorAll<HTMLElement>(focusableSelector),
60
- ).filter((element) => element.offsetParent !== null || element === node);
61
- const target = focusables[0] ?? node;
62
- const previouslyFocused = document.activeElement as HTMLElement | null;
63
- target.focus();
76
+
77
+ let cancelled = false;
78
+ let rafId = 0;
79
+ let trapInstalled = false;
80
+
81
+ const detachTrap = () => {
82
+ if (!trapInstalled) {
83
+ return;
84
+ }
85
+ trapInstalled = false;
86
+ document.removeEventListener("focusin", handleFocusIn, true);
87
+ document.removeEventListener("keydown", handleTabKeyDown, true);
88
+ };
89
+
90
+ let trapRoot: HTMLElement | null = null;
64
91
 
65
92
  const handleFocusIn = (event: FocusEvent) => {
66
- if (!node.contains(event.target as Node)) {
67
- event.stopPropagation();
68
- target.focus();
93
+ const node = trapRoot;
94
+ if (!node) {
95
+ return;
96
+ }
97
+ const focused = event.target;
98
+ if (!(focused instanceof Node)) {
99
+ return;
69
100
  }
101
+ if (node.contains(focused)) {
102
+ return;
103
+ }
104
+ const list = getFocusableElements(node, focusableSelector);
105
+ const redirectTarget = list[0] ?? node;
106
+ redirectTarget.focus({ preventScroll: true });
70
107
  };
71
- document.addEventListener("focusin", handleFocusIn);
108
+
109
+ const handleTabKeyDown = (event: KeyboardEvent) => {
110
+ const node = trapRoot;
111
+ if (!node) {
112
+ return;
113
+ }
114
+ if (event.key !== "Tab") {
115
+ return;
116
+ }
117
+ const list = getFocusableElements(node, focusableSelector);
118
+ if (list.length === 0) {
119
+ event.preventDefault();
120
+ node.focus({ preventScroll: true });
121
+ return;
122
+ }
123
+ const first = list[0];
124
+ const last = list[list.length - 1];
125
+ if (!first || !last) {
126
+ return;
127
+ }
128
+ const activeElement = document.activeElement as HTMLElement | undefined;
129
+
130
+ if (!activeElement || !node.contains(activeElement)) {
131
+ event.preventDefault();
132
+ (event.shiftKey ? last : first).focus({ preventScroll: true });
133
+ return;
134
+ }
135
+
136
+ if (event.shiftKey && activeElement === first) {
137
+ event.preventDefault();
138
+ last.focus({ preventScroll: true });
139
+ return;
140
+ }
141
+ if (!event.shiftKey && activeElement === last) {
142
+ event.preventDefault();
143
+ first.focus({ preventScroll: true });
144
+ }
145
+ };
146
+
147
+ const installTrap = () => {
148
+ if (cancelled) {
149
+ return;
150
+ }
151
+ const node = contentRef.current;
152
+ if (!node) {
153
+ rafId = requestAnimationFrame(installTrap);
154
+ return;
155
+ }
156
+
157
+ trapRoot = node;
158
+
159
+ const active = document.activeElement;
160
+ if (
161
+ active instanceof HTMLElement &&
162
+ active !== document.body &&
163
+ !node.contains(active)
164
+ ) {
165
+ previousFocusRef.current = active;
166
+ } else {
167
+ previousFocusRef.current = triggerRef?.current ?? null;
168
+ }
169
+
170
+ const focusables = getFocusableElements(node, focusableSelector);
171
+ const initialFocus = focusables[0] ?? node;
172
+ initialFocus.focus({ preventScroll: true });
173
+
174
+ document.addEventListener("focusin", handleFocusIn, true);
175
+ document.addEventListener("keydown", handleTabKeyDown, true);
176
+ trapInstalled = true;
177
+ };
178
+
179
+ installTrap();
180
+
72
181
  return () => {
73
- document.removeEventListener("focusin", handleFocusIn);
74
- previouslyFocused?.focus?.();
182
+ cancelled = true;
183
+ cancelAnimationFrame(rafId);
184
+ detachTrap();
185
+ trapRoot = null;
186
+
187
+ const fallbackTrigger =
188
+ triggerRef?.current &&
189
+ document.body.contains(triggerRef.current) &&
190
+ typeof triggerRef.current.focus === "function"
191
+ ? triggerRef.current
192
+ : null;
193
+
194
+ const toRestore = previousFocusRef.current ?? fallbackTrigger;
195
+ previousFocusRef.current = null;
196
+
197
+ if (
198
+ toRestore &&
199
+ typeof toRestore.focus === "function" &&
200
+ document.body.contains(toRestore)
201
+ ) {
202
+ toRestore.focus({ preventScroll: true });
203
+ }
75
204
  };
76
- }, [contentRef, open]);
205
+ }, [open, contentRef, triggerRef, focusableSelector]);
77
206
  };
@@ -13,6 +13,7 @@ export function BadgeBase({
13
13
  size,
14
14
  shape,
15
15
  closable = false,
16
+ liveRegion = false,
16
17
  onClose,
17
18
  closeLabel = "Remove",
18
19
  children,
@@ -24,11 +25,13 @@ export function BadgeBase({
24
25
  const isDot = shape === "dot";
25
26
  const resolvedAriaLabel =
26
27
  ariaLabel ?? (isDot ? "Status indicator" : undefined);
28
+ const landmarkRole =
29
+ liveRegion === true || isDot ? ("status" as const) : undefined;
27
30
 
28
31
  return (
29
32
  <Wrapper
30
33
  ref={ref}
31
- role="status"
34
+ role={landmarkRole}
32
35
  data-slot="badge"
33
36
  aria-label={resolvedAriaLabel}
34
37
  className={cn(badgeVariants({ appearance, size, shape }), className)}
@@ -15,6 +15,7 @@ export interface BadgeBaseProps extends ComponentPropsWithRef<"span"> {
15
15
  size?: BadgeVariantProps["size"];
16
16
  shape?: BadgeVariantProps["shape"];
17
17
  closable?: boolean;
18
+ liveRegion?: boolean;
18
19
  onClose?: MouseEventHandler<HTMLButtonElement>;
19
20
  closeLabel?: string;
20
21
  children?: ReactNode;
@@ -7,19 +7,19 @@ import { cva } from "class-variance-authority";
7
7
  export const buttonLikeSolidAppearances = {
8
8
  default: "bg-slate-50 text-slate-950 shadow-[0_1px_2px_rgba(15,23,42,0.12)]",
9
9
  secondary: "bg-slate-800 text-slate-50",
10
- destructive: "bg-rose-600 text-white",
10
+ destructive: "bg-rose-700 text-white",
11
11
  outline: "border border-white/10 bg-white/5 text-slate-50",
12
12
  ghost: "bg-transparent text-slate-200",
13
13
  glass: "border border-white/15 bg-white/10 text-white backdrop-blur-md",
14
- emerald: "bg-emerald-600 text-white",
14
+ emerald: "bg-emerald-800 text-white",
15
15
  indigo: "bg-indigo-600 text-white",
16
16
  purple: "bg-purple-600 text-white",
17
17
  pink: "bg-pink-600 text-white",
18
- rose: "bg-rose-600 text-white",
19
- sky: "bg-sky-600 text-white",
20
- teal: "bg-teal-600 text-white",
21
- yellow: "bg-yellow-600 text-white",
22
- orange: "bg-orange-600 text-white",
18
+ rose: "bg-rose-700 text-white",
19
+ sky: "bg-sky-700 text-white",
20
+ teal: "bg-teal-700 text-white",
21
+ yellow: "bg-yellow-800 text-white",
22
+ orange: "bg-orange-800 text-white",
23
23
  "gradient-blue": "bg-gradient-to-r from-blue-600 to-purple-600 text-white",
24
24
  "gradient-green": "bg-gradient-to-r from-green-600 to-lime-600 text-white",
25
25
  "gradient-red": "bg-gradient-to-r from-red-600 to-pink-600 text-white",
@@ -129,7 +129,7 @@ describe("Button (component library)", () => {
129
129
  expect(
130
130
  root.className,
131
131
  "Destructive appearance must surface danger styling",
132
- ).toMatch(/bg-rose-600/);
132
+ ).toMatch(/bg-rose-700/);
133
133
  });
134
134
 
135
135
  it("should apply outline appearance when appearance='outline'", () => {
@@ -14,24 +14,24 @@ export const buttonVariants = cva(
14
14
  default:
15
15
  "bg-slate-50 text-slate-950 shadow-[0_1px_2px_rgba(15,23,42,0.12)] hover:bg-white",
16
16
  secondary: "bg-slate-800 text-slate-50 hover:bg-slate-700",
17
- destructive: "bg-rose-600 text-white hover:bg-rose-600",
17
+ destructive: "bg-rose-700 text-white hover:bg-rose-800",
18
18
  outline:
19
19
  "border border-white/10 bg-white/5 text-slate-50 hover:bg-white/10",
20
20
  ghost: "bg-transparent text-slate-200 hover:bg-white/5",
21
21
  link: "bg-transparent text-cyan-300 underline-offset-4 hover:underline",
22
22
  glass:
23
23
  "border border-white/15 bg-white/10 text-white backdrop-blur-md hover:bg-white/15",
24
- emerald: "bg-emerald-600 text-white hover:bg-emerald-600",
24
+ emerald: "bg-emerald-800 text-white hover:bg-emerald-900",
25
25
  indigo: "bg-indigo-600 text-white hover:bg-indigo-600",
26
26
  purple: "bg-purple-600 text-white hover:bg-purple-600",
27
27
  pink: "bg-pink-600 text-white hover:bg-pink-600",
28
28
  rose: "bg-rose-600 text-white hover:bg-rose-600",
29
- sky: "bg-sky-600 text-white hover:bg-sky-600",
30
- teal: "bg-teal-600 text-white hover:bg-teal-600",
31
- yellow: "bg-yellow-600 text-white hover:bg-yellow-600",
32
- orange: "bg-orange-600 text-white hover:bg-orange-600",
33
- gray: "bg-gray-600 text-white hover:bg-gray-600",
34
- amber: "bg-amber-600 text-white hover:bg-amber-600",
29
+ sky: "bg-sky-700 text-white hover:bg-sky-800",
30
+ teal: "bg-teal-700 text-white hover:bg-teal-800",
31
+ yellow: "bg-yellow-800 text-white hover:bg-yellow-900",
32
+ orange: "bg-orange-800 text-white hover:bg-orange-900",
33
+ gray: "bg-gray-700 text-white hover:bg-gray-800",
34
+ amber: "bg-amber-800 text-white hover:bg-amber-900",
35
35
  violet: "bg-violet-600 text-white hover:bg-violet-600",
36
36
  "gradient-blue":
37
37
  "bg-gradient-to-r from-blue-600 to-purple-600 text-white hover:from-blue-600 hover:to-purple-600",
@@ -26,7 +26,7 @@ export function DrawerContentAnimated({
26
26
  id,
27
27
  style,
28
28
  }: DrawerContentAnimatedProps) {
29
- const { open, setOpen, titleId, descriptionId, contentRef } =
29
+ const { open, setOpen, titleId, descriptionId, contentRef, triggerRef } =
30
30
  useDrawerContext("DrawerContent");
31
31
  const resolvedSide = side ?? "right";
32
32
  const reduceMotion = useReducedMotion();
@@ -39,6 +39,7 @@ export function DrawerContentAnimated({
39
39
  open,
40
40
  setOpen,
41
41
  contentRef,
42
+ triggerRef,
42
43
  });
43
44
 
44
45
  const portalTarget = typeof document !== "undefined" ? document.body : null;
@@ -50,10 +51,8 @@ export function DrawerContentAnimated({
50
51
  <AnimatePresence>
51
52
  {open ? (
52
53
  <div className="fixed inset-0 z-50" data-slot="drawer-portal">
53
- <motion.button
54
- type="button"
55
- aria-hidden
56
- tabIndex={-1}
54
+ <motion.div
55
+ role="presentation"
57
56
  data-slot="drawer-overlay"
58
57
  className={drawerOverlayVariants()}
59
58
  onClick={() => setOpen(false)}
@@ -62,6 +62,7 @@ export function Drawer({
62
62
  const titleId = `${baseId}-title`;
63
63
  const descriptionId = `${baseId}-description`;
64
64
  const contentRef = useRef<HTMLDivElement | null>(null);
65
+ const triggerRef = useRef<HTMLElement | null>(null);
65
66
 
66
67
  const ctx = useMemo(
67
68
  () => ({
@@ -70,6 +71,7 @@ export function Drawer({
70
71
  titleId,
71
72
  descriptionId,
72
73
  contentRef,
74
+ triggerRef,
73
75
  }),
74
76
  [descriptionId, resolvedOpen, setOpen, titleId],
75
77
  );
@@ -86,13 +88,20 @@ export function DrawerTrigger({
86
88
  children,
87
89
  appearance,
88
90
  onClick,
89
- ref,
91
+ ref: refProp,
90
92
  ...rest
91
93
  }: DrawerTriggerProps) {
92
- const { setOpen } = useDrawerContext("DrawerTrigger");
94
+ const { setOpen, triggerRef } = useDrawerContext("DrawerTrigger");
93
95
  return (
94
96
  <button
95
- ref={ref}
97
+ ref={(node) => {
98
+ triggerRef.current = node;
99
+ if (typeof refProp === "function") {
100
+ refProp(node);
101
+ } else if (refProp) {
102
+ (refProp as RefObject<HTMLButtonElement | null>).current = node;
103
+ }
104
+ }}
96
105
  type="button"
97
106
  data-slot="drawer-trigger"
98
107
  className={cn(drawerTriggerVariants({ appearance }), className)}
@@ -121,7 +130,7 @@ export function DrawerContent({
121
130
  id,
122
131
  style,
123
132
  }: DrawerContentProps) {
124
- const { open, setOpen, titleId, descriptionId, contentRef } =
133
+ const { open, setOpen, titleId, descriptionId, contentRef, triggerRef } =
125
134
  useDrawerContext("DrawerContent");
126
135
  const resolvedSide = side ?? "right";
127
136
 
@@ -129,6 +138,7 @@ export function DrawerContent({
129
138
  open,
130
139
  setOpen,
131
140
  contentRef,
141
+ triggerRef,
132
142
  });
133
143
 
134
144
  const portalTarget = typeof document !== "undefined" ? document.body : null;
@@ -139,10 +149,8 @@ export function DrawerContent({
139
149
  return createPortal(
140
150
  open ? (
141
151
  <div className="fixed inset-0 z-50" data-slot="drawer-portal">
142
- <button
143
- type="button"
144
- aria-hidden
145
- tabIndex={-1}
152
+ <div
153
+ role="presentation"
146
154
  data-slot="drawer-overlay"
147
155
  className={drawerOverlayVariants()}
148
156
  onClick={() => setOpen(false)}
@@ -36,4 +36,5 @@ export type DrawerCtx = {
36
36
  titleId: string;
37
37
  descriptionId: string;
38
38
  contentRef: RefObject<HTMLDivElement | null>;
39
+ triggerRef: RefObject<HTMLElement | null>;
39
40
  };
@@ -104,9 +104,7 @@ describe("Dropdown", () => {
104
104
  </DropdownContent>
105
105
  </Dropdown>,
106
106
  );
107
- const item = screen
108
- .getByText("Alpha")
109
- .closest('div[tabindex="0"]') as HTMLElement;
107
+ const item = screen.getByRole("menuitem", { name: "Alpha" });
110
108
  item.focus();
111
109
  fireEvent.keyDown(item, { key: "Enter" });
112
110
  expect(handleSelect).toHaveBeenCalledTimes(1);
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { createContext, useContext, useState, useRef, useEffect } from "react";
3
+ import { createContext, useContext, useState, useRef, useEffect, useId } from "react";
4
4
  import { FiCheck } from "react-icons/fi";
5
5
  import { cn } from "../../lib/utils";
6
6
  import type {
@@ -34,6 +34,7 @@ export const Dropdown = ({
34
34
  onOpenChange,
35
35
  multiSelect = false,
36
36
  }: DropdownProps) => {
37
+ const menuId = `${useId()}-menu`;
37
38
  const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);
38
39
  const [selectedValues, setSelectedValues] = useState<string[]>([]);
39
40
 
@@ -70,6 +71,7 @@ export const Dropdown = ({
70
71
  selectedValues,
71
72
  toggleSelect,
72
73
  multiSelect,
74
+ menuId,
73
75
  }}
74
76
  >
75
77
  <div className="relative inline-block">{children}</div>
@@ -85,15 +87,25 @@ export const DropdownTrigger = ({
85
87
  className,
86
88
  variant,
87
89
  size,
90
+ onClick,
88
91
  ...props
89
92
  }: DropdownTriggerProps) => {
90
- const { toggle } = useDropdown();
93
+ const { toggle, open, menuId } = useDropdown();
91
94
 
92
95
  return (
93
96
  <button
94
- onClick={toggle}
97
+ type="button"
98
+ aria-expanded={open}
99
+ aria-haspopup="menu"
100
+ aria-controls={menuId}
95
101
  className={cn(triggerVariants({ variant, size }), className)}
96
102
  {...props}
103
+ onClick={(event) => {
104
+ onClick?.(event);
105
+ if (!event.defaultPrevented) {
106
+ toggle();
107
+ }
108
+ }}
97
109
  >
98
110
  {children}
99
111
  </button>
@@ -111,7 +123,7 @@ export const DropdownContent = ({
111
123
  divider,
112
124
  ...props
113
125
  }: DropdownContentProps) => {
114
- const { open, setOpen } = useDropdown();
126
+ const { open, setOpen, menuId } = useDropdown();
115
127
  const ref = useRef<HTMLDivElement>(null);
116
128
 
117
129
  // click outside
@@ -122,6 +134,8 @@ export const DropdownContent = ({
122
134
  return (
123
135
  <div
124
136
  ref={ref}
137
+ id={menuId}
138
+ role="menu"
125
139
  className={cn(
126
140
  contentVariants({ placement, spacing }),
127
141
  className,
@@ -157,10 +171,14 @@ export const DropdownItem = ({
157
171
 
158
172
  return (
159
173
  <div
174
+ role="menuitem"
160
175
  tabIndex={0}
161
176
  onClick={handleClick}
162
177
  onKeyDown={(e) => {
163
- if (e.key === "Enter") handleClick();
178
+ if (e.key === "Enter" || e.key === " ") {
179
+ e.preventDefault();
180
+ handleClick();
181
+ }
164
182
  }}
165
183
  className={cn(itemVariants({ variant }), className)}
166
184
  {...props}
@@ -7,6 +7,7 @@ export type DropdownContextType = {
7
7
  selectedValues: string[];
8
8
  toggleSelect: (value: string) => void;
9
9
  multiSelect: boolean;
10
+ menuId: string;
10
11
  };
11
12
 
12
13
  type Variant =
@@ -1,7 +1,7 @@
1
1
  import { cva } from "class-variance-authority";
2
2
 
3
3
  export const triggerVariants = cva(
4
- "inline-flex items-center justify-between rounded-md font-medium transition focus:outline-none cursor-pointer",
4
+ "inline-flex items-center justify-between rounded-md font-medium transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-500/60 cursor-pointer",
5
5
  {
6
6
  variants: {
7
7
  variant: {
@@ -81,7 +81,7 @@ export const contentVariants = cva(
81
81
  );
82
82
 
83
83
  export const itemVariants = cva(
84
- "flex items-center justify-between px-3 py-2 text-sm cursor-pointer rounded-md transition-colors",
84
+ "flex items-center justify-between px-3 py-2 text-sm cursor-pointer rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-500/60",
85
85
  {
86
86
  variants: {
87
87
  variant: {
@@ -25,17 +25,25 @@ export function EmptyStateBase(props: EmptyStateProps) {
25
25
  align,
26
26
  children,
27
27
  ref,
28
+ liveRegion = false,
28
29
  as: Wrapper = "section",
29
30
  ...rest
30
31
  } = props;
31
32
  const ctx = useMemo(() => size ?? "md", [size]);
32
33
 
34
+ const liveAria =
35
+ typeof liveRegion === "string"
36
+ ? liveRegion
37
+ : liveRegion === true
38
+ ? "polite"
39
+ : undefined;
40
+
33
41
  return (
34
42
  <EmptyStateSizeContext.Provider value={ctx}>
35
43
  <Wrapper
36
44
  ref={ref}
37
45
  data-slot="empty-state"
38
- aria-live="polite"
46
+ aria-live={liveAria}
39
47
  className={cn(
40
48
  emptyStateVariants({ size, appearance, align }),
41
49
  className,