@42-central/ui-react 0.20.0 → 0.20.2

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 (253) hide show
  1. package/dist/{chunk-P276SCCV.js → chunk-2BNIHOMT.js} +6 -6
  2. package/dist/{chunk-P276SCCV.js.map → chunk-2BNIHOMT.js.map} +1 -1
  3. package/dist/{chunk-PAFS7TED.js → chunk-2HIX6DKN.js} +3 -3
  4. package/dist/{chunk-PAFS7TED.js.map → chunk-2HIX6DKN.js.map} +1 -1
  5. package/dist/{chunk-Z5WYYDG2.js → chunk-2MXWEIMD.js} +7 -4
  6. package/dist/chunk-2MXWEIMD.js.map +1 -0
  7. package/dist/{chunk-VVM7JMZS.js → chunk-37VQGKD6.js} +8 -8
  8. package/dist/{chunk-VVM7JMZS.js.map → chunk-37VQGKD6.js.map} +1 -1
  9. package/dist/{chunk-7R4CDHBK.js → chunk-45QRQKRC.js} +4 -4
  10. package/dist/{chunk-7R4CDHBK.js.map → chunk-45QRQKRC.js.map} +1 -1
  11. package/dist/{chunk-FZNPJAGJ.js → chunk-45TG7H5Q.js} +5 -5
  12. package/dist/{chunk-FZNPJAGJ.js.map → chunk-45TG7H5Q.js.map} +1 -1
  13. package/dist/{chunk-MKJKCBRE.js → chunk-47LEAR6G.js} +6 -6
  14. package/dist/{chunk-MKJKCBRE.js.map → chunk-47LEAR6G.js.map} +1 -1
  15. package/dist/chunk-4ASNIDV7.js +17 -0
  16. package/dist/chunk-4ASNIDV7.js.map +1 -0
  17. package/dist/{chunk-WFHY6NRQ.js → chunk-5CNVVA7I.js} +11 -11
  18. package/dist/{chunk-WFHY6NRQ.js.map → chunk-5CNVVA7I.js.map} +1 -1
  19. package/dist/{chunk-2TM7UVM2.js → chunk-6M6YZ3PQ.js} +4 -4
  20. package/dist/{chunk-2TM7UVM2.js.map → chunk-6M6YZ3PQ.js.map} +1 -1
  21. package/dist/{chunk-4BGU2UQB.js → chunk-6VYGK3Q3.js} +6 -6
  22. package/dist/{chunk-4BGU2UQB.js.map → chunk-6VYGK3Q3.js.map} +1 -1
  23. package/dist/{chunk-ZFUTGBJC.js → chunk-6YNLRQ25.js} +3 -3
  24. package/dist/{chunk-ZFUTGBJC.js.map → chunk-6YNLRQ25.js.map} +1 -1
  25. package/dist/{chunk-6OV6EJQ2.js → chunk-7AQ4MN4M.js} +6 -6
  26. package/dist/{chunk-6OV6EJQ2.js.map → chunk-7AQ4MN4M.js.map} +1 -1
  27. package/dist/{chunk-5337N3FE.js → chunk-7BOSX65U.js} +3 -3
  28. package/dist/{chunk-5337N3FE.js.map → chunk-7BOSX65U.js.map} +1 -1
  29. package/dist/{chunk-THLMW5IU.js → chunk-7CNDZZZ6.js} +4 -4
  30. package/dist/{chunk-THLMW5IU.js.map → chunk-7CNDZZZ6.js.map} +1 -1
  31. package/dist/{chunk-LJ3GHC4V.js → chunk-BE2LWUHY.js} +5 -5
  32. package/dist/{chunk-LJ3GHC4V.js.map → chunk-BE2LWUHY.js.map} +1 -1
  33. package/dist/{chunk-2KN3MI7I.js → chunk-C4NFRSOR.js} +4 -4
  34. package/dist/{chunk-2KN3MI7I.js.map → chunk-C4NFRSOR.js.map} +1 -1
  35. package/dist/{chunk-3REFDGOM.js → chunk-C6NVU4F7.js} +3 -3
  36. package/dist/{chunk-3REFDGOM.js.map → chunk-C6NVU4F7.js.map} +1 -1
  37. package/dist/{chunk-LSIX2PVU.js → chunk-C74TV64U.js} +7 -7
  38. package/dist/{chunk-LSIX2PVU.js.map → chunk-C74TV64U.js.map} +1 -1
  39. package/dist/{chunk-HVOEVB4E.js → chunk-D2QIPQ74.js} +3 -3
  40. package/dist/{chunk-HVOEVB4E.js.map → chunk-D2QIPQ74.js.map} +1 -1
  41. package/dist/{chunk-4EU6FGGB.js → chunk-DA4QII2N.js} +4 -4
  42. package/dist/{chunk-4EU6FGGB.js.map → chunk-DA4QII2N.js.map} +1 -1
  43. package/dist/{chunk-LZWA7V62.js → chunk-DJLNGWMM.js} +5 -5
  44. package/dist/{chunk-LZWA7V62.js.map → chunk-DJLNGWMM.js.map} +1 -1
  45. package/dist/{chunk-HEQ2H6VO.js → chunk-DT6LKNZF.js} +4 -4
  46. package/dist/{chunk-HEQ2H6VO.js.map → chunk-DT6LKNZF.js.map} +1 -1
  47. package/dist/{chunk-BUFALAEK.js → chunk-E5H3YWZV.js} +4 -4
  48. package/dist/{chunk-BUFALAEK.js.map → chunk-E5H3YWZV.js.map} +1 -1
  49. package/dist/{chunk-H7INUXZD.js → chunk-F342ZT7O.js} +4 -4
  50. package/dist/{chunk-H7INUXZD.js.map → chunk-F342ZT7O.js.map} +1 -1
  51. package/dist/{chunk-KOT4PWGE.js → chunk-FDCPMUJK.js} +6 -6
  52. package/dist/{chunk-KOT4PWGE.js.map → chunk-FDCPMUJK.js.map} +1 -1
  53. package/dist/{chunk-VALQ2XVA.js → chunk-H3PYSAWN.js} +3 -3
  54. package/dist/{chunk-VALQ2XVA.js.map → chunk-H3PYSAWN.js.map} +1 -1
  55. package/dist/{chunk-WR444JRU.js → chunk-HQPU73WV.js} +7 -7
  56. package/dist/{chunk-WR444JRU.js.map → chunk-HQPU73WV.js.map} +1 -1
  57. package/dist/{chunk-Q5ZO2O25.js → chunk-HRNWWL3Y.js} +6 -6
  58. package/dist/{chunk-Q5ZO2O25.js.map → chunk-HRNWWL3Y.js.map} +1 -1
  59. package/dist/{chunk-HBFN5W7Q.js → chunk-JVG5ISPT.js} +4 -4
  60. package/dist/{chunk-HBFN5W7Q.js.map → chunk-JVG5ISPT.js.map} +1 -1
  61. package/dist/{chunk-JL4QMM46.js → chunk-LFQDB5OD.js} +5 -5
  62. package/dist/{chunk-JL4QMM46.js.map → chunk-LFQDB5OD.js.map} +1 -1
  63. package/dist/{chunk-U2PNMMDB.js → chunk-LKFHUDEW.js} +7 -7
  64. package/dist/{chunk-U2PNMMDB.js.map → chunk-LKFHUDEW.js.map} +1 -1
  65. package/dist/{chunk-2SVX3MQQ.js → chunk-MW42XVPD.js} +3 -3
  66. package/dist/{chunk-2SVX3MQQ.js.map → chunk-MW42XVPD.js.map} +1 -1
  67. package/dist/{chunk-S4TRYMCU.js → chunk-MXAACRWE.js} +6 -6
  68. package/dist/{chunk-S4TRYMCU.js.map → chunk-MXAACRWE.js.map} +1 -1
  69. package/dist/{chunk-ZN3WYGIQ.js → chunk-N66NC6QK.js} +121 -25
  70. package/dist/chunk-N66NC6QK.js.map +1 -0
  71. package/dist/{chunk-DUPE2CRU.js → chunk-NKOTA5TM.js} +3 -3
  72. package/dist/{chunk-DUPE2CRU.js.map → chunk-NKOTA5TM.js.map} +1 -1
  73. package/dist/{chunk-RGLNH7A5.js → chunk-NLOBBJAA.js} +3 -3
  74. package/dist/{chunk-RGLNH7A5.js.map → chunk-NLOBBJAA.js.map} +1 -1
  75. package/dist/{chunk-FXDLS23K.js → chunk-NS6RGPWR.js} +3 -3
  76. package/dist/{chunk-FXDLS23K.js.map → chunk-NS6RGPWR.js.map} +1 -1
  77. package/dist/{chunk-ZWOZL4XX.js → chunk-O5W3QWJ6.js} +5 -5
  78. package/dist/{chunk-ZWOZL4XX.js.map → chunk-O5W3QWJ6.js.map} +1 -1
  79. package/dist/{chunk-PD4FX34E.js → chunk-O7LS6OZR.js} +4 -4
  80. package/dist/{chunk-PD4FX34E.js.map → chunk-O7LS6OZR.js.map} +1 -1
  81. package/dist/{chunk-K6BHDFX3.js → chunk-QKSLDQM2.js} +3 -3
  82. package/dist/{chunk-K6BHDFX3.js.map → chunk-QKSLDQM2.js.map} +1 -1
  83. package/dist/{chunk-CDHIF2NV.js → chunk-QNKD2SQM.js} +8 -8
  84. package/dist/{chunk-CDHIF2NV.js.map → chunk-QNKD2SQM.js.map} +1 -1
  85. package/dist/{chunk-SE3CGQRO.js → chunk-RLOWPCGG.js} +3 -3
  86. package/dist/{chunk-SE3CGQRO.js.map → chunk-RLOWPCGG.js.map} +1 -1
  87. package/dist/{chunk-R57QP43T.js → chunk-SVKN5ZHX.js} +4 -4
  88. package/dist/{chunk-R57QP43T.js.map → chunk-SVKN5ZHX.js.map} +1 -1
  89. package/dist/{chunk-NJ4RO3CT.js → chunk-SWVUXEBT.js} +5 -5
  90. package/dist/{chunk-NJ4RO3CT.js.map → chunk-SWVUXEBT.js.map} +1 -1
  91. package/dist/{chunk-GGT4GJD6.js → chunk-TWNIAF7K.js} +3 -3
  92. package/dist/{chunk-GGT4GJD6.js.map → chunk-TWNIAF7K.js.map} +1 -1
  93. package/dist/{chunk-4TCTMRR5.js → chunk-UAYENYS2.js} +5 -5
  94. package/dist/{chunk-4TCTMRR5.js.map → chunk-UAYENYS2.js.map} +1 -1
  95. package/dist/{chunk-DHTSVJ4G.js → chunk-UCCJUFOG.js} +9 -9
  96. package/dist/{chunk-DHTSVJ4G.js.map → chunk-UCCJUFOG.js.map} +1 -1
  97. package/dist/{chunk-HDRC6ITF.js → chunk-UT3TOV2Q.js} +3 -3
  98. package/dist/{chunk-HDRC6ITF.js.map → chunk-UT3TOV2Q.js.map} +1 -1
  99. package/dist/{chunk-6KER77RS.js → chunk-UVQXRDRO.js} +7 -7
  100. package/dist/{chunk-6KER77RS.js.map → chunk-UVQXRDRO.js.map} +1 -1
  101. package/dist/{chunk-R52P43LZ.js → chunk-UXPINIDN.js} +3 -3
  102. package/dist/{chunk-R52P43LZ.js.map → chunk-UXPINIDN.js.map} +1 -1
  103. package/dist/chunk-V6PY7C6S.js +18 -0
  104. package/dist/chunk-V6PY7C6S.js.map +1 -0
  105. package/dist/{chunk-45DFYIK5.js → chunk-VD6PB3VA.js} +3 -3
  106. package/dist/{chunk-45DFYIK5.js.map → chunk-VD6PB3VA.js.map} +1 -1
  107. package/dist/{chunk-7AWOMWCQ.js → chunk-WXL5RP6P.js} +7 -7
  108. package/dist/{chunk-7AWOMWCQ.js.map → chunk-WXL5RP6P.js.map} +1 -1
  109. package/dist/{chunk-IMP5VHEN.js → chunk-XKDL4QS6.js} +3 -3
  110. package/dist/{chunk-IMP5VHEN.js.map → chunk-XKDL4QS6.js.map} +1 -1
  111. package/dist/{chunk-H26K66EU.js → chunk-Y57NW6G7.js} +3 -3
  112. package/dist/{chunk-H26K66EU.js.map → chunk-Y57NW6G7.js.map} +1 -1
  113. package/dist/{chunk-2OQP7UY4.js → chunk-YZJUPYPO.js} +5 -5
  114. package/dist/{chunk-2OQP7UY4.js.map → chunk-YZJUPYPO.js.map} +1 -1
  115. package/dist/{chunk-JYK6JVR3.js → chunk-Z4MBCKG5.js} +8 -8
  116. package/dist/{chunk-JYK6JVR3.js.map → chunk-Z4MBCKG5.js.map} +1 -1
  117. package/dist/components/accordion/index.js +5 -5
  118. package/dist/components/action-icon/index.js +4 -4
  119. package/dist/components/alert/index.js +6 -6
  120. package/dist/components/ambient-background/index.js +1 -1
  121. package/dist/components/app-shell/index.js +6 -6
  122. package/dist/components/aspect-ratio/index.js +1 -1
  123. package/dist/components/autocomplete/index.js +7 -6
  124. package/dist/components/autocomplete/index.js.map +1 -1
  125. package/dist/components/avatar/index.js +1 -1
  126. package/dist/components/badge/index.js +3 -3
  127. package/dist/components/breadcrumb/index.js +1 -1
  128. package/dist/components/button/index.js +4 -4
  129. package/dist/components/button-group/index.js +2 -2
  130. package/dist/components/button-multi-select/index.js +7 -7
  131. package/dist/components/button-select/index.js +7 -7
  132. package/dist/components/calendar/index.js +6 -6
  133. package/dist/components/camera/index.js +15 -14
  134. package/dist/components/card/card.d.ts.map +1 -1
  135. package/dist/components/card/index.js +2 -2
  136. package/dist/components/carousel/index.js +3 -3
  137. package/dist/components/chart/index.js +1 -1
  138. package/dist/components/checkbox/index.js +6 -6
  139. package/dist/components/choice-card-group/index.js +5 -5
  140. package/dist/components/circular-progress/index.js +1 -1
  141. package/dist/components/clipboard/index.js +6 -6
  142. package/dist/components/code/index.js +2 -2
  143. package/dist/components/code-block/chrome.js +7 -7
  144. package/dist/components/code-block/index.js +8 -8
  145. package/dist/components/code-block/static.js +4 -1
  146. package/dist/components/code-block/static.js.map +1 -1
  147. package/dist/components/collapse/index.js +2 -2
  148. package/dist/components/combobox/index.js +7 -6
  149. package/dist/components/combobox-list/index.js +9 -8
  150. package/dist/components/compare/index.js +2 -2
  151. package/dist/components/container/index.js +1 -1
  152. package/dist/components/data-table/index.js +33 -33
  153. package/dist/components/date-picker/index.js +16 -15
  154. package/dist/components/date-picker/index.js.map +1 -1
  155. package/dist/components/divider/index.js +2 -2
  156. package/dist/components/download-button/index.js +5 -5
  157. package/dist/components/drawer/index.js +6 -6
  158. package/dist/components/field/index.js +2 -2
  159. package/dist/components/figure/index.js +2 -2
  160. package/dist/components/file-item/index.js +8 -8
  161. package/dist/components/file-preview/index.js +6 -6
  162. package/dist/components/file-queue-summary/index.js +2 -2
  163. package/dist/components/file-trigger/index.js +5 -5
  164. package/dist/components/file-upload/index.js +10 -10
  165. package/dist/components/flex/index.js +2 -2
  166. package/dist/components/gallery/index.js +4 -4
  167. package/dist/components/grid/index.js +1 -1
  168. package/dist/components/hover-card/hover-card.d.ts +44 -26
  169. package/dist/components/hover-card/hover-card.d.ts.map +1 -1
  170. package/dist/components/hover-card/index.js +36 -54
  171. package/dist/components/hover-card/index.js.map +1 -1
  172. package/dist/components/image/index.js +2 -2
  173. package/dist/components/image-cropper/index.js +7 -7
  174. package/dist/components/indicator/index.js +1 -1
  175. package/dist/components/input/index.js +3 -3
  176. package/dist/components/kbd/index.js +3 -3
  177. package/dist/components/lightbox/index.js +9 -9
  178. package/dist/components/mark/index.js +2 -2
  179. package/dist/components/menu/index.js +5 -5
  180. package/dist/components/modal/index.js +6 -6
  181. package/dist/components/multi-combobox-list/index.js +11 -10
  182. package/dist/components/multi-select/index.js +10 -9
  183. package/dist/components/multi-select/index.js.map +1 -1
  184. package/dist/components/nav-link/index.js +5 -5
  185. package/dist/components/nav-link/tanstack.js +5 -5
  186. package/dist/components/notification/index.js +7 -7
  187. package/dist/components/number-input/index.js +7 -6
  188. package/dist/components/overlays/index.js +8 -8
  189. package/dist/components/password-input/index.js +4 -4
  190. package/dist/components/photo-capture/index.js +18 -17
  191. package/dist/components/photo-capture/index.js.map +1 -1
  192. package/dist/components/pill/index.js +3 -3
  193. package/dist/components/pills-input/index.js +6 -6
  194. package/dist/components/pin-input/index.js +3 -3
  195. package/dist/components/popover/index.d.ts +1 -1
  196. package/dist/components/popover/index.d.ts.map +1 -1
  197. package/dist/components/popover/index.js +3 -2
  198. package/dist/components/popover/popover.d.ts +44 -29
  199. package/dist/components/popover/popover.d.ts.map +1 -1
  200. package/dist/components/progress/index.js +2 -2
  201. package/dist/components/radio-group/index.js +4 -4
  202. package/dist/components/rating/index.js +3 -3
  203. package/dist/components/schedule/index.js +10 -10
  204. package/dist/components/segment-group/index.js +3 -3
  205. package/dist/components/select/index.js +8 -7
  206. package/dist/components/skeleton/index.js +2 -2
  207. package/dist/components/slider/index.js +4 -4
  208. package/dist/components/spinner/index.js +2 -2
  209. package/dist/components/spotlight/index.js +16 -15
  210. package/dist/components/spotlight/index.js.map +1 -1
  211. package/dist/components/switch/index.js +3 -3
  212. package/dist/components/table/index.js +3 -3
  213. package/dist/components/tabs/index.js +3 -3
  214. package/dist/components/tags-input/index.js +9 -8
  215. package/dist/components/tags-input/index.js.map +1 -1
  216. package/dist/components/text/index.js +2 -2
  217. package/dist/components/text-input/index.js +3 -3
  218. package/dist/components/textarea/index.js +3 -3
  219. package/dist/components/theme-icon/index.js +3 -3
  220. package/dist/components/time-input/index.js +9 -8
  221. package/dist/components/time-input/index.js.map +1 -1
  222. package/dist/components/timeline/index.js +1 -1
  223. package/dist/components/title/index.js +2 -2
  224. package/dist/components/tooltip/index.js +4 -4
  225. package/dist/components/tree-multi-select/index.js +11 -10
  226. package/dist/components/tree-multi-select/index.js.map +1 -1
  227. package/dist/components/tree-select/index.js +8 -7
  228. package/dist/components/tree-select/index.js.map +1 -1
  229. package/dist/index.js +2 -2
  230. package/dist/lib/cn.d.ts.map +1 -1
  231. package/dist/lib/cn.js +1 -1
  232. package/dist/lib/placement.d.ts +42 -1
  233. package/dist/lib/placement.d.ts.map +1 -1
  234. package/dist/lib/slide-on-switch.d.ts +69 -0
  235. package/dist/lib/slide-on-switch.d.ts.map +1 -0
  236. package/package.json +1 -1
  237. package/src/components/card/card.test.tsx +10 -0
  238. package/src/components/card/card.tsx +4 -1
  239. package/src/components/hover-card/hover-card.tsx +89 -167
  240. package/src/components/popover/index.ts +2 -0
  241. package/src/components/popover/popover.test.tsx +131 -0
  242. package/src/components/popover/popover.tsx +191 -53
  243. package/src/lib/cn.test.ts +9 -0
  244. package/src/lib/cn.ts +9 -1
  245. package/src/lib/placement.test.ts +37 -0
  246. package/src/lib/placement.ts +60 -1
  247. package/src/lib/slide-on-switch.ts +99 -0
  248. package/dist/chunk-G52U24GR.js +0 -10
  249. package/dist/chunk-G52U24GR.js.map +0 -1
  250. package/dist/chunk-QP4I37PA.js +0 -14
  251. package/dist/chunk-QP4I37PA.js.map +0 -1
  252. package/dist/chunk-Z5WYYDG2.js.map +0 -1
  253. package/dist/chunk-ZN3WYGIQ.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/progress/progress.tsx"],"names":["Ark"],"mappings":";;;;;;;AAsCA,IAAM,aAAA,GAAgB,GAAA;AAAA;AAAA;AAAA;AAAA,EAIpB,yEAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,IAAA,EAAM;AAAA,QACJ,EAAA,EAAI,OAAA;AAAA,QACJ,EAAA,EAAI,KAAA;AAAA,QACJ,EAAA,EAAI,OAAA;AAAA,QACJ,EAAA,EAAI,KAAA;AAAA,QACJ,EAAA,EAAI;AAAA;AACN,KACF;AAAA,IACA,eAAA,EAAiB,EAAE,IAAA,EAAM,IAAA;AAAK;AAElC,CAAA;AAEA,IAAM,aAAA,GAAgB,IAAI,qBAAA,EAAuB;AAAA,EAC/C,QAAA,EAAU;AAAA,IACR,OAAA,EAAS;AAAA,MACP,MAAA,EAAQ,gBAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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AA;AAAA,UACvD,GAAG,KAAA,CAAM;AAAA,YACR,aAAA,EAAe,MAAA;AAAA,YACf,YAAA,EAAc,KAAA;AAAA,YACd,iBAAA,EAAmB,UAAA;AAAA,YACnB,kBAAA,EAAoB,WAAA;AAAA,YACpB,gBAAA,EAAkB;AAAA,WACnB,CAAA;AAAA,UAED,QAAA,kBAAA,GAAA;AAAA,YAACA,UAAA,CAAI,KAAA;AAAA,YAAJ;AAAA,cAWC,OACE,UAAA,GACI;AAAA,gBACE,cAAA,EAAgB,yCAAA;AAAA,gBAChB,GAAI,QAAA,GAAW,iBAAA,CAAkB,QAAQ,CAAA,GAAI;AAAA,eAC/C,GACA,MAAA;AAAA,cAEN,SAAA,EAAW,EAAA;AAAA,gBACT,aAAA,CAAc,EAAE,OAAA,EAAS,CAAA;AAAA,gBACzB,UAAA,IAAc,QAAA,EAAU,GAAA,IAAO,kBAAA,CAAmB,SAAS,GAAG,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAK9D,iDAAA;AAAA,gBACA,0EAAA;AAAA,gBACA,UAAA,EAAY;AAAA;AACd;AAAA;AACF;AAAA;AACF;AAAA,GACF;AAEJ","file":"chunk-K6BHDFX3.js","sourcesContent":["\"use client\"\n\nimport { Progress as Ark } from \"@ark-ui/react/progress\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport type { ComponentPropsWithoutRef, CSSProperties, Ref } from \"react\"\nimport type { ForbidAsChild } from \"../../lib/as-child\"\nimport { cn } from \"../../lib/cn\"\nimport type { Color } from \"../../lib/colors\"\nimport {\n buildGradientVars,\n GRADIENT_DIR_CLASS,\n type GradientDir,\n type GradientProps,\n} from \"../../lib/gradient\"\nimport { props } from \"../../lib/props\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { WithTestId } from \"../../lib/test-id\"\n\n/**\n * Progress — linear progress bar on top of Ark UI's Progress state machine.\n * Ark owns `role=\"progressbar\"`, the ARIA value wiring, the percent math, and\n * the indeterminate flag; this wrapper supplies the styled Track + Range and a\n * flatter API.\n *\n * - `value` is a single number in `min..max`. Pass `null` for the\n * indeterminate state — Ark drops the inline width and we drive an animated\n * sweep purely in CSS. Leaving both `value` and `defaultValue` unset makes\n * the bar uncontrolled (Ark's own default).\n * - Two fill `variant`s: `filled` (solid accent, the default) and\n * `gradient` (a Tailwind linear gradient on the Range, mirroring `Badge`).\n *\n * Palette is delivered through the kit's `data-color` + slot-var system\n * (see `colors.ts` / `colors.css`). The root writes `data-color={color}` and\n * the Range references `--c-solid`, so adding a color in\n * `colors.css` works here for free — no progress edits needed. `gradient`\n * sidesteps the slot vars and paints its own stops on the Range instead.\n */\n\nconst progressTrack = cva(\n // `overflow-x-clip` clips the Range's rounded ends to the track's pill shape\n // (mirrors Slider's track); `relative` anchors the indeterminate sweep, whose\n // moving bar is positioned within the track's box.\n \"relative w-full overflow-x-clip rounded-full bg-black/3 dark:bg-white/4\",\n {\n variants: {\n size: {\n xs: \"h-0.5\",\n sm: \"h-1\",\n md: \"h-1.5\",\n lg: \"h-2\",\n xl: \"h-3\",\n },\n },\n defaultVariants: { size: \"md\" },\n },\n)\n\nconst progressRange = cva(\"h-full rounded-full\", {\n variants: {\n variant: {\n filled: \"bg-(--c-solid)\",\n // from-*/to-* are the CSS defaults for --tw-gradient-from/to and the\n // --tw-gradient-stops composition chain. A `gradient` prop only overrides\n // the individual vars it provides; the direction class is appended\n // dynamically (mirrors Badge's gradient variant).\n //\n // The gradient is stretched to the full track width and pinned to the\n // start (see the Range `style` below), so the Range reveals only its left\n // slice — the complete from→to shows only at 100%. `bg-no-repeat` keeps\n // the stretched image from tiling.\n gradient: \"bg-linear-to-r from-purple-300 to-pink-400 bg-no-repeat bg-left\",\n },\n },\n defaultVariants: { variant: \"filled\" },\n})\n\nexport type ProgressVariant = NonNullable<VariantProps<typeof progressRange>[\"variant\"]>\nexport type ProgressSize = Size\n\nexport type { GradientDir, GradientProps }\n\ntype ProgressClassNames = {\n root?: string\n track?: string\n range?: string\n}\n\ntype ArkRootProps = ComponentPropsWithoutRef<typeof Ark.Root>\n\nexport type ProgressProps = Omit<\n ArkRootProps,\n \"value\" | \"defaultValue\" | \"onValueChange\" | \"ref\" | \"className\" | \"asChild\"\n> &\n ForbidAsChild &\n VariantProps<typeof progressRange> &\n WithTestId & {\n /**\n * Controlled value in `min..max`. Pass `null` for the indeterminate state.\n * Leave unset (with no `defaultValue`) for an uncontrolled bar.\n */\n value?: number | null\n /** Uncontrolled initial value. Pass `null` to start indeterminate. */\n defaultValue?: number | null\n /** Fires on every value change. */\n onChange?: (value: number | null) => void\n size?: ProgressSize\n /** Accent palette. Ignored when `variant=\"gradient\"`. */\n color?: Color\n /**\n * Gradient config; only applied when `variant=\"gradient\"`. Mirrors Badge:\n * sets the individual `--tw-gradient-*` vars consumed by the gradient\n * utility chain. Unset fields fall back to the CVA defaults\n * (purple-300 → pink-400, to-r).\n */\n gradient?: GradientProps\n /** Lands on the Track — the `role=\"progressbar\"` element. */\n ref?: Ref<HTMLDivElement>\n /** Names the bar. Lands on the Track, the `role=\"progressbar\"` element, like the other\n * `aria-*` naming props below; without one, Ark names it by its value (\"40\"). */\n \"aria-label\"?: string\n /** Names the bar after a visible caption, by id. Wins over `aria-label`. */\n \"aria-labelledby\"?: string\n \"aria-describedby\"?: string\n /** Read instead of the number: \"Processing\", \"3 of 8 files\". */\n \"aria-valuetext\"?: string\n className?: string\n classNames?: ProgressClassNames\n style?: CSSProperties\n }\n\nexport const Progress = ({\n value,\n defaultValue,\n onChange,\n variant,\n size,\n color,\n gradient,\n min = 0,\n max = 100,\n ref,\n className,\n classNames,\n style,\n testId,\n asChild: _asChild,\n // The naming attributes describe the progressbar, which is the Track, not the root.\n \"aria-label\": label,\n \"aria-labelledby\": labelledBy,\n \"aria-describedby\": describedBy,\n \"aria-valuetext\": valueText,\n ...rest\n}: ProgressProps) => {\n const isGradient = variant === \"gradient\"\n\n return (\n <Ark.Root\n // `undefined` → uncontrolled (Ark's own default). `null` → indeterminate.\n // The two must NOT be coalesced, so each is forwarded verbatim.\n value={value}\n defaultValue={defaultValue}\n onValueChange={onChange ? ({ value: v }) => onChange(v) : undefined}\n min={min}\n max={max}\n data-color={!isGradient ? color : undefined}\n className={cn(\"group/progress w-full\", className, classNames?.root)}\n style={style}\n {...rest}\n >\n <Ark.Track\n ref={ref}\n className={cn(progressTrack({ size }), classNames?.track)}\n {...props({\n \"data-testid\": testId,\n \"aria-label\": label,\n \"aria-labelledby\": labelledBy,\n \"aria-describedby\": describedBy,\n \"aria-valuetext\": valueText,\n })}\n >\n <Ark.Range\n // Gradient styling lives on the Range (where the gradient renders),\n // not the root — Ark also sets `style.width` here, but the keys don't\n // overlap and Ark merges the two via mergeProps.\n // - backgroundSize stretches the gradient to the full track width:\n // the Range is `percent%` of the track, so `10000% / percent` of\n // the Range equals the track width (Ark exposes `--percent` on the\n // root; it cascades here). Pinned to the start by `bg-left`, the\n // Range reveals only its left slice — the full from→to shows at\n // 100%. Falls back to 100% when indeterminate (`--percent` unset).\n // - buildGradientVars sets the --tw-gradient-* vars from `gradient`.\n style={\n isGradient\n ? {\n backgroundSize: \"calc(10000% / var(--percent, 100)) 100%\",\n ...(gradient ? buildGradientVars(gradient) : null),\n }\n : undefined\n }\n className={cn(\n progressRange({ variant }),\n isGradient && gradient?.dir && GRADIENT_DIR_CLASS[gradient.dir],\n // Indeterminate: Ark omits the inline width, so the Range would\n // otherwise fill the track. Pin it to a fraction and animate a\n // clipped sweep. `group-data-[state=…]` reads the state Ark stamps\n // on the root.\n \"group-data-[state=indeterminate]/progress:w-2/5\",\n \"group-data-[state=indeterminate]/progress:animate-progress-indeterminate\",\n classNames?.range,\n )}\n />\n </Ark.Track>\n </Ark.Root>\n )\n}\n"]}
1
+ {"version":3,"sources":["../src/components/progress/progress.tsx"],"names":["Ark"],"mappings":";;;;;;;AAsCA,IAAM,aAAA,GAAgB,GAAA;AAAA;AAAA;AAAA;AAAA,EAIpB,yEAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAA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Props } from \"class-variance-authority\"\nimport type { ComponentPropsWithoutRef, CSSProperties, Ref } from \"react\"\nimport type { ForbidAsChild } from \"../../lib/as-child\"\nimport { cn } from \"../../lib/cn\"\nimport type { Color } from \"../../lib/colors\"\nimport {\n buildGradientVars,\n GRADIENT_DIR_CLASS,\n type GradientDir,\n type GradientProps,\n} from \"../../lib/gradient\"\nimport { props } from \"../../lib/props\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { WithTestId } from \"../../lib/test-id\"\n\n/**\n * Progress — linear progress bar on top of Ark UI's Progress state machine.\n * Ark owns `role=\"progressbar\"`, the ARIA value wiring, the percent math, and\n * the indeterminate flag; this wrapper supplies the styled Track + Range and a\n * flatter API.\n *\n * - `value` is a single number in `min..max`. Pass `null` for the\n * indeterminate state — Ark drops the inline width and we drive an animated\n * sweep purely in CSS. Leaving both `value` and `defaultValue` unset makes\n * the bar uncontrolled (Ark's own default).\n * - Two fill `variant`s: `filled` (solid accent, the default) and\n * `gradient` (a Tailwind linear gradient on the Range, mirroring `Badge`).\n *\n * Palette is delivered through the kit's `data-color` + slot-var system\n * (see `colors.ts` / `colors.css`). The root writes `data-color={color}` and\n * the Range references `--c-solid`, so adding a color in\n * `colors.css` works here for free — no progress edits needed. `gradient`\n * sidesteps the slot vars and paints its own stops on the Range instead.\n */\n\nconst progressTrack = cva(\n // `overflow-x-clip` clips the Range's rounded ends to the track's pill shape\n // (mirrors Slider's track); `relative` anchors the indeterminate sweep, whose\n // moving bar is positioned within the track's box.\n \"relative w-full overflow-x-clip rounded-full bg-black/3 dark:bg-white/4\",\n {\n variants: {\n size: {\n xs: \"h-0.5\",\n sm: \"h-1\",\n md: \"h-1.5\",\n lg: \"h-2\",\n xl: \"h-3\",\n },\n },\n defaultVariants: { size: \"md\" },\n },\n)\n\nconst progressRange = cva(\"h-full rounded-full\", {\n variants: {\n variant: {\n filled: \"bg-(--c-solid)\",\n // from-*/to-* are the CSS defaults for --tw-gradient-from/to and the\n // --tw-gradient-stops composition chain. A `gradient` prop only overrides\n // the individual vars it provides; the direction class is appended\n // dynamically (mirrors Badge's gradient variant).\n //\n // The gradient is stretched to the full track width and pinned to the\n // start (see the Range `style` below), so the Range reveals only its left\n // slice — the complete from→to shows only at 100%. `bg-no-repeat` keeps\n // the stretched image from tiling.\n gradient: \"bg-linear-to-r from-purple-300 to-pink-400 bg-no-repeat bg-left\",\n },\n },\n defaultVariants: { variant: \"filled\" },\n})\n\nexport type ProgressVariant = NonNullable<VariantProps<typeof progressRange>[\"variant\"]>\nexport type ProgressSize = Size\n\nexport type { GradientDir, GradientProps }\n\ntype ProgressClassNames = {\n root?: string\n track?: string\n range?: string\n}\n\ntype ArkRootProps = ComponentPropsWithoutRef<typeof Ark.Root>\n\nexport type ProgressProps = Omit<\n ArkRootProps,\n \"value\" | \"defaultValue\" | \"onValueChange\" | \"ref\" | \"className\" | \"asChild\"\n> &\n ForbidAsChild &\n VariantProps<typeof progressRange> &\n WithTestId & {\n /**\n * Controlled value in `min..max`. Pass `null` for the indeterminate state.\n * Leave unset (with no `defaultValue`) for an uncontrolled bar.\n */\n value?: number | null\n /** Uncontrolled initial value. Pass `null` to start indeterminate. */\n defaultValue?: number | null\n /** Fires on every value change. */\n onChange?: (value: number | null) => void\n size?: ProgressSize\n /** Accent palette. Ignored when `variant=\"gradient\"`. */\n color?: Color\n /**\n * Gradient config; only applied when `variant=\"gradient\"`. Mirrors Badge:\n * sets the individual `--tw-gradient-*` vars consumed by the gradient\n * utility chain. Unset fields fall back to the CVA defaults\n * (purple-300 → pink-400, to-r).\n */\n gradient?: GradientProps\n /** Lands on the Track — the `role=\"progressbar\"` element. */\n ref?: Ref<HTMLDivElement>\n /** Names the bar. Lands on the Track, the `role=\"progressbar\"` element, like the other\n * `aria-*` naming props below; without one, Ark names it by its value (\"40\"). */\n \"aria-label\"?: string\n /** Names the bar after a visible caption, by id. Wins over `aria-label`. */\n \"aria-labelledby\"?: string\n \"aria-describedby\"?: string\n /** Read instead of the number: \"Processing\", \"3 of 8 files\". */\n \"aria-valuetext\"?: string\n className?: string\n classNames?: ProgressClassNames\n style?: CSSProperties\n }\n\nexport const Progress = ({\n value,\n defaultValue,\n onChange,\n variant,\n size,\n color,\n gradient,\n min = 0,\n max = 100,\n ref,\n className,\n classNames,\n style,\n testId,\n asChild: _asChild,\n // The naming attributes describe the progressbar, which is the Track, not the root.\n \"aria-label\": label,\n \"aria-labelledby\": labelledBy,\n \"aria-describedby\": describedBy,\n \"aria-valuetext\": valueText,\n ...rest\n}: ProgressProps) => {\n const isGradient = variant === \"gradient\"\n\n return (\n <Ark.Root\n // `undefined` → uncontrolled (Ark's own default). `null` → indeterminate.\n // The two must NOT be coalesced, so each is forwarded verbatim.\n value={value}\n defaultValue={defaultValue}\n onValueChange={onChange ? ({ value: v }) => onChange(v) : undefined}\n min={min}\n max={max}\n data-color={!isGradient ? color : undefined}\n className={cn(\"group/progress w-full\", className, classNames?.root)}\n style={style}\n {...rest}\n >\n <Ark.Track\n ref={ref}\n className={cn(progressTrack({ size }), classNames?.track)}\n {...props({\n \"data-testid\": testId,\n \"aria-label\": label,\n \"aria-labelledby\": labelledBy,\n \"aria-describedby\": describedBy,\n \"aria-valuetext\": valueText,\n })}\n >\n <Ark.Range\n // Gradient styling lives on the Range (where the gradient renders),\n // not the root — Ark also sets `style.width` here, but the keys don't\n // overlap and Ark merges the two via mergeProps.\n // - backgroundSize stretches the gradient to the full track width:\n // the Range is `percent%` of the track, so `10000% / percent` of\n // the Range equals the track width (Ark exposes `--percent` on the\n // root; it cascades here). Pinned to the start by `bg-left`, the\n // Range reveals only its left slice — the full from→to shows at\n // 100%. Falls back to 100% when indeterminate (`--percent` unset).\n // - buildGradientVars sets the --tw-gradient-* vars from `gradient`.\n style={\n isGradient\n ? {\n backgroundSize: \"calc(10000% / var(--percent, 100)) 100%\",\n ...(gradient ? buildGradientVars(gradient) : null),\n }\n : undefined\n }\n className={cn(\n progressRange({ variant }),\n isGradient && gradient?.dir && GRADIENT_DIR_CLASS[gradient.dir],\n // Indeterminate: Ark omits the inline width, so the Range would\n // otherwise fill the track. Pin it to a fraction and animate a\n // clipped sweep. `group-data-[state=…]` reads the state Ark stamps\n // on the root.\n \"group-data-[state=indeterminate]/progress:w-2/5\",\n \"group-data-[state=indeterminate]/progress:animate-progress-indeterminate\",\n classNames?.range,\n )}\n />\n </Ark.Track>\n </Ark.Root>\n )\n}\n"]}
@@ -1,16 +1,16 @@
1
- import { Progress } from './chunk-K6BHDFX3.js';
1
+ import { Progress } from './chunk-QKSLDQM2.js';
2
2
  import { FILE_KIND_ICONS } from './chunk-SDVZFXQ2.js';
3
- import { Image } from './chunk-H26K66EU.js';
4
- import { Button } from './chunk-NJ4RO3CT.js';
3
+ import { Image } from './chunk-Y57NW6G7.js';
4
+ import { Button } from './chunk-SWVUXEBT.js';
5
5
  import { formatFileSize, useObjectUrl, fileKind } from './chunk-TCFB23JT.js';
6
6
  import { useLocale, useTimeZone } from './chunk-IPYHTCFL.js';
7
- import { CloseIcon } from './chunk-ZFUTGBJC.js';
7
+ import { CloseIcon } from './chunk-6YNLRQ25.js';
8
8
  import { mergeIcons, iconStroke } from './chunk-XXOR34T4.js';
9
9
  import { withAsChildContent, composeChildren } from './chunk-R5LYFTHA.js';
10
10
  import { props } from './chunk-WYCMIIRR.js';
11
- import { focusStyles } from './chunk-3REFDGOM.js';
11
+ import { focusStyles } from './chunk-C6NVU4F7.js';
12
12
  import { TYPOGRAPHY_SHADE_CLASSES, TEXT_COLOR_CLASSES } from './chunk-GIPQUKCN.js';
13
- import { cn } from './chunk-QP4I37PA.js';
13
+ import { cn } from './chunk-4ASNIDV7.js';
14
14
  import { ark } from '@ark-ui/react';
15
15
  import { CircleCheck, RotateCw } from 'lucide-react';
16
16
  import { createContext, Fragment as Fragment$1, useId, useState, useContext } from 'react';
@@ -336,5 +336,5 @@ var FileItem = Object.assign(FileItemComponent, {
336
336
  });
337
337
 
338
338
  export { FileItem, isInFlight };
339
- //# sourceMappingURL=chunk-CDHIF2NV.js.map
340
- //# sourceMappingURL=chunk-CDHIF2NV.js.map
339
+ //# sourceMappingURL=chunk-QNKD2SQM.js.map
340
+ //# sourceMappingURL=chunk-QNKD2SQM.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/file-item/file-item.tsx"],"names":["Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;AAmGA,IAAM,oBAAA,GAAuD;AAAA,EAC3D,MAAA,EAAQ,CAAC,IAAA,KAAS,CAAA,OAAA,EAAU,IAAI,CAAA,CAAA;AAAA,EAChC,MAAA,EAAQ,CAAC,IAAA,KAAS,CAAA,iBAAA,EAAoB,IAAI,CAAA,CAAA;AAAA,EAC1C,KAAA,EAAO,OAAA;AAAA,EACP,MAAA,EAAQ,QAAA;AAAA,EACR,UAAA,EAAY,kBAAA;AAAA,EACZ,IAAA,EAAM,UAAA;AAAA,EACN,MAAA,EAAQ,eAAA;AAAA,EACR,YAAA,EAAc,CAAC,MAAA,EAAQ,IAAA,KACrB,KAAA,CAAM,MAAM,CAAA,CACT,IAAA,CAAK,WAAA,EAAa,MAAM,CAAA,UAAA,EAAa,IAAI,CAAA,CAAE,CAAA,CAC3C,IAAA,CAAK,MAAA,EAAQ,MAAM,CAAA,EAAG,IAAI,CAAA,SAAA,CAAW,CAAA,CACrC,IAAA,CAAK,OAAA,EAAS,MAAM,CAAA,EAAG,IAAI,CAAA,iBAAA,CAAmB,CAAA,CAC9C,UAAA;AACP,CAAA;AAGA,IAAM,aAAA,GAAqD;AAAA,EACzD,GAAG,eAAA;AAAA,EACH,MAAA,sBAAS,SAAA,EAAA,EAAU,CAAA;AAAA,EACnB,uBAAO,GAAA,CAAC,QAAA,EAAA,EAAS,aAAA,EAAW,IAAA,EAAC,WAAW,UAAA,EAAY,CAAA;AAAA,EACpD,sBAAM,GAAA,CAAC,WAAA,EAAA,EAAY,aAAA,EAAW,IAAA,EAAC,WAAW,UAAA,EAAY;AACxD,CAAA;AAEA,IAAM,4BAAY,IAAI,GAAA,C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ChD,CAAA;AAAA,IACC,WAAW,IAAA,oBAAQ,GAAA,CAAC,WAAQ,SAAA,EAAW,UAAA,EAAY,SAAU,QAAA,EAAA,OAAA,EAAQ,CAAA;AAAA,IACrE,OAAA,IAAW,IAAA,CAAK,MAAA,KAAW,OAAA,oBAC1B,GAAA,CAAC,SAAM,OAAA,EAAS,OAAA,EAAS,SAAA,EAAW,UAAA,EAAY,KAAA,EAAO,CAAA;AAAA,IAExD,2BAAW,GAAA,CAAC,MAAA,EAAA,EAAO,SAAS,OAAA,EAAS,SAAA,EAAW,YAAY,MAAA,EAAQ;AAAA,GAAA,EACvE,CAAA;AAEF,EAAA;AAAA;AAAA;AAAA,wBAGG,IAAA,EAAA,EAAM,GAAG,MAAM,OAAA,EAAkB,SAAA,EAAW,GAAG,SAAA,EAAW,UAAA,EAAY,IAAI,CAAA,EACxE,oBACC,kBAAA,CAAmB,QAAA,EAAU,CAAC,GAAA,qBAC5B,IAAA,CAAAA,UAAA,EACG,QAAA,EAAA;AAAA,MAAA,GAAA;AAAA,MACA;AAAA,KAAA,EACH,CACD,CAAA,mBAED,IAAA,CAAAA,QAAAA,EAAA,EACG,QAAA,EAAA;AAAA,MAAA,GAAA;AAAA,MACA;AAAA,KAAA,EACH,CAAA,EAEJ;AAAA;AAEJ;AAOO,IAAM,QAAA,GAAW,MAAA,CAAO,MAAA,CAAO,iBAAA,EAAmB;AAAA,EACvD,IAAA;AAAA,EACA,OAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,QAAA,EAAU,WAAA;AAAA,EACV,OAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAC","file":"chunk-CDHIF2NV.js","sourcesContent":["\"use client\"\n\nimport { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { CircleCheck, RotateCw } from \"lucide-react\"\nimport {\n createContext,\n Fragment,\n type ReactNode,\n type Ref,\n useContext,\n useId,\n useState,\n} from \"react\"\nimport { match } from \"ts-pattern\"\nimport { composeChildren, type NoAsChild, withAsChildContent } from \"../../lib/as-child\"\nimport { cn } from \"../../lib/cn\"\nimport { FILE_KIND_ICONS } from \"../../lib/file-kind-icons\"\nimport { type FileKind, fileKind, formatFileSize } from \"../../lib/files\"\nimport { focusStyles } from \"../../lib/focus-styles\"\nimport { type IconMap, iconStroke, mergeIcons } from \"../../lib/icons\"\nimport { useLocale, useTimeZone } from \"../../lib/intl\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { TEXT_COLOR_CLASSES, TYPOGRAPHY_SHADE_CLASSES } from \"../../lib/typography-size\"\nimport { useObjectUrl } from \"../../lib/use-object-url\"\nimport { Button, type ButtonProps } from \"../button/button\"\nimport { Image } from \"../image/image\"\nimport { CloseIcon } from \"../popover/icons\"\nimport { Progress, type ProgressProps } from \"../progress/progress\"\n\n/**\n * FileItem — one file as a row: its icon or thumbnail, its name, a meta line\n * (size, date, upload status) and its actions.\n *\n * <FileItem file={pickedFile} onRemove={() => remove(pickedFile)} />\n * <FileItem file={{ name: \"contract.pdf\", size: 248_213, date: doc.signedAt }} actions={…} />\n *\n * The same row serves a `File` the visitor just picked and a document stored\n * on a server, described by `{ name, size?, type?, date?, src? }` (`src` is a\n * thumbnail or preview URL). `FileUpload` renders its list with it.\n *\n * Upload state comes in through `status` (`queued → uploading → processing →\n * done | error`) and `progress` (0–1), so a queue only has to feed them:\n * uploading shows a determinate bar named after the file, processing an\n * indeterminate one, an error its message and a Retry button. Screen readers\n * hear the start, the end and a failure through a polite status region,\n * never each progress tick. A row a queue drives (`itemProps`) stays quiet\n * instead (`announce={false}`), and `FileQueueSummary` speaks for the run.\n *\n * Sizes and dates follow the `IntlProvider` locale and time zone; every\n * string goes through `translations`, every icon through `icons`.\n */\n\nexport type FileItemStatus = \"idle\" | \"queued\" | \"uploading\" | \"processing\" | \"done\" | \"error\"\n\n/** A file that lives on a server: a stored document rather than a picked `File`. */\nexport type FileDescriptor = {\n name: string\n /** In bytes. */\n size?: number\n /** MIME type. Picks the icon, with the name's extension as the fallback. */\n type?: string\n /** When it was uploaded, signed, last changed: whatever the app's meta line means. A date-only\n * ISO string (`\"2026-10-01\"`) is UTC midnight, so it can read as the day before west of UTC;\n * pass a full timestamp or a `Date`. */\n date?: Date | string | number\n /** A thumbnail or preview URL, shown in place of the kind icon. */\n src?: string\n}\n\nexport type FileItemFile = File | FileDescriptor\n\nexport type FileItemIconSlot = FileKind | \"remove\" | \"retry\" | \"done\"\nexport type FileItemIcons = IconMap<FileItemIconSlot>\n\n/** The statuses the status region speaks up for. The others are steps in between. */\nexport type FileItemAnnouncedStatus = \"uploading\" | \"done\" | \"error\"\n\nexport type FileItemTranslations = {\n /** The remove button's accessible name. @default (name) => `Remove ${name}` */\n remove?: (name: string) => string\n /** The same button's name while the file is queued or in flight.\n * @default (name) => `Cancel upload of ${name}` */\n cancel?: (name: string) => string\n /** The retry button's text (it is described by the file name). @default \"Retry\" */\n retry?: string\n /** @default \"Queued\" */\n queued?: string\n /** The meta line and the indeterminate bar's value text. @default \"Processing…\" */\n processing?: string\n /** @default \"Uploaded\" */\n done?: string\n /** Shown for an error without an `error` message. @default \"Upload failed\" */\n failed?: string\n /** What the status region says on each announced transition. The `error` message, when\n * there is one, follows it. */\n announcement?: (status: FileItemAnnouncedStatus, name: string) => string\n}\n\nconst DEFAULT_TRANSLATIONS: Required<FileItemTranslations> = {\n remove: (name) => `Remove ${name}`,\n cancel: (name) => `Cancel upload of ${name}`,\n retry: \"Retry\",\n queued: \"Queued\",\n processing: \"Processing…\",\n done: \"Uploaded\",\n failed: \"Upload failed\",\n announcement: (status, name) =>\n match(status)\n .with(\"uploading\", () => `Uploading ${name}`)\n .with(\"done\", () => `${name} uploaded`)\n .with(\"error\", () => `${name} failed to upload`)\n .exhaustive(),\n}\n\n/** The default icons, one per kind plus the row's own buttons. */\nconst DEFAULT_ICONS: Record<FileItemIconSlot, ReactNode> = {\n ...FILE_KIND_ICONS,\n remove: <CloseIcon />,\n retry: <RotateCw aria-hidden className={iconStroke} />,\n done: <CircleCheck aria-hidden className={iconStroke} />,\n}\n\nconst ANNOUNCED = new Set<FileItemStatus>([\"uploading\", \"done\", \"error\"])\nconst isAnnounced = (status: FileItemStatus | undefined): status is FileItemAnnouncedStatus =>\n status !== undefined && ANNOUNCED.has(status)\n\n/** Statuses where the remove button stops the upload rather than dropping a finished file. */\nconst IN_FLIGHT = new Set<FileItemStatus>([\"queued\", \"uploading\", \"processing\"])\n\n/** Whether the × stops an upload (and calls `onCancel`) rather than dropping the file. For a\n * layout composed from the parts, which wires `Remove` itself. */\nexport const isInFlight = (status: FileItemStatus | undefined): boolean =>\n status !== undefined && IN_FLIGHT.has(status)\n\n// ---------------------------------------------------------------------------\n// Context\n// ---------------------------------------------------------------------------\n\ntype Shared = {\n name: string\n kind: FileKind\n size?: number\n date?: Date\n src?: string\n /** The picked file itself, for an object-URL thumbnail. */\n blob?: File\n status?: FileItemStatus\n progress?: number\n error?: ReactNode\n disabled: boolean\n thumbnails: boolean\n nameId: string\n locale: string\n timeZone: string\n t: Required<FileItemTranslations>\n icons: Record<FileItemIconSlot, ReactNode>\n}\n\nconst SharedContext = createContext<Shared | null>(null)\n\nconst useShared = () => {\n const shared = useContext(SharedContext)\n if (!shared) throw new Error(\"FileItem parts must be rendered within <FileItem.Root>.\")\n return shared\n}\n\n/** A `File` and a descriptor, read the same way. */\ntype FileFacts = Omit<FileDescriptor, \"date\"> & { date?: Date; blob?: File }\n\n/** An unparseable `date` is dropped rather than shown as \"Invalid Date\". */\nconst toDate = (value: FileDescriptor[\"date\"]): Date | undefined => {\n const date = value === undefined ? undefined : new Date(value)\n return date && !Number.isNaN(date.getTime()) ? date : undefined\n}\n\nconst readFile = (file: FileItemFile): FileFacts =>\n file instanceof File\n ? { name: file.name, size: file.size, type: file.type, blob: file }\n : { name: file.name, size: file.size, type: file.type, src: file.src, date: toDate(file.date) }\n\n// ---------------------------------------------------------------------------\n// Parts\n// ---------------------------------------------------------------------------\n\nexport type FileItemRootProps = HTMLArkProps<\"div\"> &\n WithTestId & {\n /** A picked `File`, or a stored document's `{ name, size?, type?, date?, src? }`. */\n file: FileItemFile\n /** Upload state. Pass it from the first render (`\"idle\"` or `\"queued\"`): the status\n * region exists only with a status, and announces changes, not its first value. */\n status?: FileItemStatus\n /** Upload progress from 0 to 1, read while `status` is `\"uploading\"`. Without it the bar\n * is indeterminate. */\n progress?: number\n /** Why the upload failed, shown and announced while `status` is `\"error\"`. */\n error?: ReactNode\n /** Keep a status region that announces this row's upload. Off for a row a queue drives:\n * `useFileQueue`'s `itemProps` pass `false`, and one `FileQueueSummary` speaks for every\n * row, so 400 rows don't announce 800 times. @default true */\n announce?: boolean\n /** Disables the row's own buttons (remove, retry). */\n disabled?: boolean\n /** Show image files and `src` as thumbnails. Off, every file shows its kind icon, and no\n * object URL is created. @default true */\n thumbnails?: boolean\n /** Replaces the default icons: one per `FileKind`, plus `remove`, `retry` and `done`. */\n icons?: FileItemIcons\n /** Overrides the row's strings. A partial override keeps the other defaults. */\n translations?: FileItemTranslations\n ref?: Ref<HTMLDivElement>\n }\n\nconst Root = ({\n file,\n status,\n progress,\n error,\n announce = true,\n disabled = false,\n thumbnails = true,\n icons,\n translations,\n asChild,\n children,\n className,\n testId,\n ...rest\n}: FileItemRootProps) => {\n const locale = useLocale()\n const timeZone = useTimeZone()\n const nameId = useId()\n const t = { ...DEFAULT_TRANSLATIONS, ...translations }\n const { type, ...facts } = readFile(file)\n const kind = fileKind(type, facts.name)\n\n // Only a change of status is announced, never the first one (a stored document mounting as\n // \"done\" is not news) and never a progress tick. State adjusted during render, React's own\n // pattern for \"remember the previous prop\", so the region's text lands in the same commit.\n const [seen, setSeen] = useState(status)\n const [announced, setAnnounced] = useState<FileItemAnnouncedStatus | null>(null)\n if (seen !== status) {\n setSeen(status)\n setAnnounced(isAnnounced(status) ? status : null)\n }\n\n const shared: Shared = {\n ...facts,\n kind,\n status,\n progress,\n error,\n disabled,\n thumbnails,\n nameId,\n locale,\n timeZone,\n t,\n icons: mergeIcons(DEFAULT_ICONS, icons),\n }\n\n const region = announce && status !== undefined && (\n // A sibling of the busy Body rather than inside it: assistive tech may hold back a live\n // region's changes while it sits in an `aria-busy` subtree.\n <span role=\"status\" className=\"sr-only\">\n {announced && t.announcement(announced, facts.name)}\n {announced === \"error\" && error != null && <> {error}</>}\n </span>\n )\n\n return (\n <SharedContext.Provider value={shared}>\n <ark.div\n data-kind={kind}\n {...props({ \"data-status\": status, \"data-testid\": testId })}\n asChild={asChild}\n className={cn(\n // `relative` contains the status region's sr-only box.\n \"relative flex items-center gap-1 rounded-input border p-2\",\n // The kit's hairline, the same as FileUpload's dropzone above its list.\n \"border-brand-900/20 dark:border-white/15\",\n // Figma's file-upload item: `Border/border-error-secondary`, Error/500 at 30%.\n \"data-[status=error]:border-red-500/30\",\n className,\n )}\n {...rest}\n >\n {composeChildren(asChild, children, (own) => (\n <>\n {own}\n {region}\n </>\n ))}\n </ark.div>\n </SharedContext.Provider>\n )\n}\n\nexport type FileItemPreviewProps = NoAsChild<HTMLArkProps<\"div\">> & WithTestId\n\n/** The kind icon, or the thumbnail: `src`, or an image `File` through an object URL. Lazy, and\n * decorative (the name sits next to it), so it is hidden from assistive tech. */\nconst Preview = ({ className, testId, asChild: _asChild, ...rest }: FileItemPreviewProps) => {\n const { kind, src, blob, thumbnails, icons } = useShared()\n const pictured = thumbnails && (src !== undefined || (blob !== undefined && kind === \"image\"))\n // `null` when no thumbnail is wanted, so a list with thumbnails off makes no object URLs.\n const objectUrl = useObjectUrl(pictured && src === undefined ? blob : null)\n return (\n <ark.div\n aria-hidden\n data-part=\"preview\"\n {...props({ \"data-testid\": testId })}\n className={cn(\"flex size-9 shrink-0 items-center justify-center [&>svg]:size-6\", className)}\n {...rest}\n >\n {pictured ? (\n <Image src={src ?? objectUrl} alt=\"\" fallback={icons[kind]} className=\"size-9\" />\n ) : (\n icons[kind]\n )}\n </ark.div>\n )\n}\n\nexport type FileItemBodyProps = HTMLArkProps<\"div\"> & WithTestId\n\n/** The name, meta and progress column. Busy while the file uploads or is processed. */\nconst Body = ({ className, testId, ...rest }: FileItemBodyProps) => {\n const { status } = useShared()\n return (\n <ark.div\n {...props({\n \"aria-busy\": status === \"uploading\" || status === \"processing\",\n \"data-testid\": testId,\n })}\n // `relative` anchors the progress bar, which sits in the row's bottom padding.\n className={cn(\"relative min-w-0 flex-1\", className)}\n {...rest}\n />\n )\n}\n\nexport type FileItemNameProps = HTMLArkProps<\"div\"> & WithTestId\n\n/** The file name, on one line. The full name stays in the text (truncation is CSS only) and in\n * a `title`. `asChild` turns it into your link: `<FileItem.Name asChild><a href={url}>{name}</a></…>`\n * (an empty link would fall back to the name, but linters rightly flag one). */\nconst Name = ({ asChild, children, className, testId, ...rest }: FileItemNameProps) => {\n const { name, nameId } = useShared()\n return (\n <ark.div\n title={name}\n {...props({ \"data-testid\": testId })}\n asChild={asChild}\n className={cn(\"block truncate text-sm\", className)}\n {...rest}\n // Last, so a composing part's own id (Ark's item name) can't detach the bar and buttons\n // that are named and described by it.\n id={nameId}\n >\n {composeChildren(asChild, children, (own) => own ?? name)}\n </ark.div>\n )\n}\n\nexport type FileItemMetaProps = NoAsChild<HTMLArkProps<\"div\">> & WithTestId\n\n/** The dot is hidden, the spaces aren't: screen readers get \"248 kB Queued\", not \"248 kBQueued\". */\nconst Separator = () => (\n <>\n {\" \"}\n <span aria-hidden>·</span>{\" \"}\n </>\n)\n\n/**\n * The size and date, then the status. `children` replace the size and date and keep the\n * status; an error replaces the whole line with its message.\n */\nconst Meta = ({ children, className, testId, asChild: _asChild, ...rest }: FileItemMetaProps) => {\n const { size, date, status, progress, error, locale, timeZone, t, icons } = useShared()\n const details =\n children === undefined\n ? [\n size === undefined ? null : formatFileSize(size, locale),\n date === undefined\n ? null\n : new Intl.DateTimeFormat(locale, { dateStyle: \"medium\", timeZone }).format(date),\n ]\n : [children]\n const state = match(status)\n .with(\"queued\", () => t.queued)\n .with(\"uploading\", () =>\n progress === undefined\n ? null\n : new Intl.NumberFormat(locale, { style: \"percent\", maximumFractionDigits: 0 }).format(\n Math.min(Math.max(progress, 0), 1),\n ),\n )\n .with(\"processing\", () => t.processing)\n .with(\"done\", () => (\n <span\n data-color=\"green\"\n className=\"inline-flex items-center gap-1 align-bottom text-(--c-text) [&_svg]:size-3.5\"\n >\n {icons.done}\n {t.done}\n </span>\n ))\n .otherwise(() => null)\n const segments = [...details, state].filter((segment) => segment != null && segment !== \"\")\n\n return (\n <ark.div\n data-part=\"meta\"\n {...props({ \"data-testid\": testId })}\n className={cn(\"truncate text-xs\", TYPOGRAPHY_SHADE_CLASSES.muted, className)}\n {...rest}\n >\n {status === \"error\" ? (\n <span className={TEXT_COLOR_CLASSES.error}>{error ?? t.failed}</span>\n ) : (\n segments.map((segment, index) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: a fixed sequence, rebuilt per render\n <Fragment key={index}>\n {index > 0 && <Separator />}\n <span>{segment}</span>\n </Fragment>\n ))\n )}\n </ark.div>\n )\n}\n\nexport type FileItemProgressProps = Omit<ProgressProps, \"value\" | \"defaultValue\" | \"onChange\">\n\n/** The upload bar: determinate while uploading with a `progress`, indeterminate otherwise and\n * while processing, absent in every other status. Named after the file. It sits under the\n * name and meta, out of flow, so the row doesn't change height. */\nconst ProgressBar = ({ className, ...rest }: FileItemProgressProps) => {\n const { status, progress, nameId, t } = useShared()\n if (status !== \"uploading\" && status !== \"processing\") return null\n const determinate = status === \"uploading\" && progress !== undefined\n return (\n <Progress\n size=\"xs\"\n value={determinate ? Math.min(Math.max(progress, 0), 1) * 100 : null}\n aria-labelledby={nameId}\n aria-valuetext={status === \"processing\" ? t.processing : undefined}\n // Out of flow, in the row's bottom padding under the text: a row keeps its height as its\n // upload starts and ends, so a list of uploads doesn't jump.\n className={cn(\"absolute inset-x-0 -bottom-1\", className)}\n {...rest}\n />\n )\n}\n\nexport type FileItemActionsProps = HTMLArkProps<\"div\"> & WithTestId\n\n/** Your buttons for the file: download, view, open in a tab. */\nconst Actions = ({ className, testId, ...rest }: FileItemActionsProps) => (\n <ark.div\n {...props({ \"data-testid\": testId })}\n className={cn(\"ms-1 flex shrink-0 items-center gap-2\", className)}\n {...rest}\n />\n)\n\nexport type FileItemRemoveProps = HTMLArkProps<\"button\"> & WithTestId\n\n/** The × button, named \"Remove {name}\", or \"Cancel upload of {name}\" while the file is queued\n * or in flight. Wire `onClick`; a composing trigger's own name (Ark's) wins over the default. */\nconst Remove = ({\n asChild,\n children,\n className,\n testId,\n disabled,\n ...rest\n}: FileItemRemoveProps) => {\n const { name, status, disabled: rowDisabled, t, icons } = useShared()\n const label = isInFlight(status) ? t.cancel(name) : t.remove(name)\n return (\n <ark.button\n type=\"button\"\n aria-label={label}\n disabled={disabled ?? rowDisabled}\n {...props({ \"data-testid\": testId })}\n asChild={asChild}\n className={cn(\n \"inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-sm me-1\",\n // The neutral washes rows and options use for hover (`popoverOption`, Table):\n // translucent, so the button reads on whatever the row sits on.\n TYPOGRAPHY_SHADE_CLASSES.muted,\n \"transition-colors hover:bg-black/5 hover:text-black dark:hover:bg-white/8 dark:hover:text-white\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n focusStyles(),\n \"[&_svg]:size-3.5\",\n className,\n )}\n {...rest}\n >\n {composeChildren(asChild, children, (own) => own ?? icons.remove)}\n </ark.button>\n )\n}\n\nexport type FileItemRetryProps = ButtonProps\n\n/** A small \"Retry\" button, described by the file name (\"Retry, cv.pdf\"). Wire `onClick`. */\nconst Retry = ({ children, disabled, ...rest }: FileItemRetryProps) => {\n const { nameId, disabled: rowDisabled, t, icons } = useShared()\n return (\n <Button\n type=\"button\"\n size=\"xs\"\n variant=\"subtle\"\n color=\"neutral\"\n startSlot={icons.retry}\n aria-describedby={nameId}\n disabled={disabled ?? rowDisabled}\n {...rest}\n >\n {children ?? t.retry}\n </Button>\n )\n}\n\n// ---------------------------------------------------------------------------\n// Convenience\n// ---------------------------------------------------------------------------\n\ntype FileItemClassNames = {\n root?: string\n preview?: string\n body?: string\n name?: string\n meta?: string\n progress?: string\n actions?: string\n retry?: string\n remove?: string\n}\n\nexport type FileItemProps = FileItemRootProps & {\n /** Replaces the size and date on the meta line; the status still follows. */\n meta?: ReactNode\n /** Your buttons (download, view…), before the retry and remove buttons. */\n actions?: ReactNode\n /** Renders the × button. While the file is queued or in flight it is named as a cancel, and\n * calls `onCancel` when there is one. */\n onRemove?: () => void\n /** What the × does while the file is queued or in flight: stop the upload. Falls back to\n * `onRemove`; on its own, the × shows only while there is an upload to stop. */\n onCancel?: () => void\n /** Renders a Retry button while `status` is `\"error\"`. */\n onRetry?: () => void\n classNames?: FileItemClassNames\n}\n\nfunction FileItemComponent({\n meta,\n actions,\n onRemove,\n onCancel,\n onRetry,\n classNames,\n className,\n asChild,\n children,\n ...root\n}: FileItemProps) {\n const dismiss = isInFlight(root.status) ? (onCancel ?? onRemove) : onRemove\n const row = (\n <>\n <Preview className={classNames?.preview} />\n <Body className={classNames?.body}>\n <Name className={classNames?.name} />\n <Meta className={classNames?.meta}>{meta}</Meta>\n <ProgressBar className={classNames?.progress} />\n </Body>\n {actions != null && <Actions className={classNames?.actions}>{actions}</Actions>}\n {onRetry && root.status === \"error\" && (\n <Retry onClick={onRetry} className={classNames?.retry} />\n )}\n {dismiss && <Remove onClick={dismiss} className={classNames?.remove} />}\n </>\n )\n return (\n // Under `asChild` the row becomes your element (an `<li>` in your list), with the row\n // folded in ahead of that element's own content.\n <Root {...root} asChild={asChild} className={cn(className, classNames?.root)}>\n {asChild ? (\n withAsChildContent(children, (own) => (\n <>\n {row}\n {own}\n </>\n ))\n ) : (\n <>\n {row}\n {children}\n </>\n )}\n </Root>\n )\n}\n\n/**\n * `FileItem` — the ready-made row, with the parts attached for your own layout:\n * `Root` (the file, status and context), `Preview`, `Body`, `Name`, `Meta`, `Progress`,\n * `Actions`, `Retry` and `Remove`.\n */\nexport const FileItem = Object.assign(FileItemComponent, {\n Root,\n Preview,\n Body,\n Name,\n Meta,\n Progress: ProgressBar,\n Actions,\n Retry,\n Remove,\n})\n"]}
1
+ {"version":3,"sources":["../src/components/file-item/file-item.tsx"],"names":["Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;AAmGA,IAAM,oBAAA,GAAuD;AAAA,EAC3D,MAAA,EAAQ,CAAC,IAAA,KAAS,CAAA,OAAA,EAAU,IAAI,CAAA,CAAA;AAAA,EAChC,MAAA,EAAQ,CAAC,IAAA,KAAS,CAAA,iBAAA,EAAoB,IAAI,CAAA,CAAA;AAAA,EAC1C,KAAA,EAAO,OAAA;AAAA,EACP,MAAA,EAAQ,QAAA;AAAA,EACR,UAAA,EAAY,kBAAA;AAAA,EACZ,IAAA,EAAM,UAAA;AAAA,EACN,MAAA,EAAQ,eAAA;AAAA,EACR,YAAA,EAAc,CAAC,MAAA,EAAQ,IAAA,KACrB,KAAA,CAAM,MAAM,CAAA,CACT,IAAA,CAAK,WAAA,EAAa,MAAM,CAAA,UAAA,EAAa,IAAI,CAAA,CAAE,CAAA,CAC3C,IAAA,CAAK,MAAA,EAAQ,MAAM,CAAA,EAAG,IAAI,CAAA,SAAA,CAAW,CAAA,CACrC,IAAA,CAAK,OAAA,EAAS,MAAM,CAAA,EAAG,IAAI,CAAA,iBAAA,CAAmB,CAAA,CAC9C,UAAA;AACP,CAAA;AAGA,IAAM,aAAA,GAAqD;AAAA,EACzD,GAAG,eAAA;AAAA,EACH,MAAA,sBAAS,SAAA,EAAA,EAAU,CAAA;AAAA,EACnB,uBAAO,GAAA,CAAC,QAAA,EAAA,EAAS,aAAA,EAAW,IAAA,EAAC,WAAW,UAAA,EAAY,CAAA;AAAA,EACpD,sBAAM,GAAA,CAAC,WAAA,EAAA,EAAY,aAAA,EAAW,IAAA,EAAC,WAAW,UAAA,EAAY;AACxD,CAAA;AAEA,IAAM,4BAAY,IAAI,GAAA,CAAoB,CAAC,WAAA,EAAa,MAAA,EAAQ,OAAO,CAAC,CAAA;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AQ,SAAA,EAAW,UAAA,EAAY,SAAU,QAAA,EAAA,OAAA,EAAQ,CAAA;AAAA,IACrE,OAAA,IAAW,IAAA,CAAK,MAAA,KAAW,OAAA,oBAC1B,GAAA,CAAC,SAAM,OAAA,EAAS,OAAA,EAAS,SAAA,EAAW,UAAA,EAAY,KAAA,EAAO,CAAA;AAAA,IAExD,2BAAW,GAAA,CAAC,MAAA,EAAA,EAAO,SAAS,OAAA,EAAS,SAAA,EAAW,YAAY,MAAA,EAAQ;AAAA,GAAA,EACvE,CAAA;AAEF,EAAA;AAAA;AAAA;AAAA,wBAGG,IAAA,EAAA,EAAM,GAAG,MAAM,OAAA,EAAkB,SAAA,EAAW,GAAG,SAAA,EAAW,UAAA,EAAY,IAAI,CAAA,EACxE,oBACC,kBAAA,CAAmB,QAAA,EAAU,CAAC,GAAA,qBAC5B,IAAA,CAAAA,UAAA,EACG,QAAA,EAAA;AAAA,MAAA,GAAA;AAAA,MACA;AAAA,KAAA,EACH,CACD,CAAA,mBAED,IAAA,CAAAA,QAAAA,EAAA,EACG,QAAA,EAAA;AAAA,MAAA,GAAA;AAAA,MACA;AAAA,KAAA,EACH,CAAA,EAEJ;AAAA;AAEJ;AAOO,IAAM,QAAA,GAAW,MAAA,CAAO,MAAA,CAAO,iBAAA,EAAmB;AAAA,EACvD,IAAA;AAAA,EACA,OAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,QAAA,EAAU,WAAA;AAAA,EACV,OAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAC","file":"chunk-QNKD2SQM.js","sourcesContent":["\"use client\"\n\nimport { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { CircleCheck, RotateCw } from \"lucide-react\"\nimport {\n createContext,\n Fragment,\n type ReactNode,\n type Ref,\n useContext,\n useId,\n useState,\n} from \"react\"\nimport { match } from \"ts-pattern\"\nimport { composeChildren, type NoAsChild, withAsChildContent } from \"../../lib/as-child\"\nimport { cn } from \"../../lib/cn\"\nimport { FILE_KIND_ICONS } from \"../../lib/file-kind-icons\"\nimport { type FileKind, fileKind, formatFileSize } from \"../../lib/files\"\nimport { focusStyles } from \"../../lib/focus-styles\"\nimport { type IconMap, iconStroke, mergeIcons } from \"../../lib/icons\"\nimport { useLocale, useTimeZone } from \"../../lib/intl\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { TEXT_COLOR_CLASSES, TYPOGRAPHY_SHADE_CLASSES } from \"../../lib/typography-size\"\nimport { useObjectUrl } from \"../../lib/use-object-url\"\nimport { Button, type ButtonProps } from \"../button/button\"\nimport { Image } from \"../image/image\"\nimport { CloseIcon } from \"../popover/icons\"\nimport { Progress, type ProgressProps } from \"../progress/progress\"\n\n/**\n * FileItem — one file as a row: its icon or thumbnail, its name, a meta line\n * (size, date, upload status) and its actions.\n *\n * <FileItem file={pickedFile} onRemove={() => remove(pickedFile)} />\n * <FileItem file={{ name: \"contract.pdf\", size: 248_213, date: doc.signedAt }} actions={…} />\n *\n * The same row serves a `File` the visitor just picked and a document stored\n * on a server, described by `{ name, size?, type?, date?, src? }` (`src` is a\n * thumbnail or preview URL). `FileUpload` renders its list with it.\n *\n * Upload state comes in through `status` (`queued → uploading → processing →\n * done | error`) and `progress` (0–1), so a queue only has to feed them:\n * uploading shows a determinate bar named after the file, processing an\n * indeterminate one, an error its message and a Retry button. Screen readers\n * hear the start, the end and a failure through a polite status region,\n * never each progress tick. A row a queue drives (`itemProps`) stays quiet\n * instead (`announce={false}`), and `FileQueueSummary` speaks for the run.\n *\n * Sizes and dates follow the `IntlProvider` locale and time zone; every\n * string goes through `translations`, every icon through `icons`.\n */\n\nexport type FileItemStatus = \"idle\" | \"queued\" | \"uploading\" | \"processing\" | \"done\" | \"error\"\n\n/** A file that lives on a server: a stored document rather than a picked `File`. */\nexport type FileDescriptor = {\n name: string\n /** In bytes. */\n size?: number\n /** MIME type. Picks the icon, with the name's extension as the fallback. */\n type?: string\n /** When it was uploaded, signed, last changed: whatever the app's meta line means. A date-only\n * ISO string (`\"2026-10-01\"`) is UTC midnight, so it can read as the day before west of UTC;\n * pass a full timestamp or a `Date`. */\n date?: Date | string | number\n /** A thumbnail or preview URL, shown in place of the kind icon. */\n src?: string\n}\n\nexport type FileItemFile = File | FileDescriptor\n\nexport type FileItemIconSlot = FileKind | \"remove\" | \"retry\" | \"done\"\nexport type FileItemIcons = IconMap<FileItemIconSlot>\n\n/** The statuses the status region speaks up for. The others are steps in between. */\nexport type FileItemAnnouncedStatus = \"uploading\" | \"done\" | \"error\"\n\nexport type FileItemTranslations = {\n /** The remove button's accessible name. @default (name) => `Remove ${name}` */\n remove?: (name: string) => string\n /** The same button's name while the file is queued or in flight.\n * @default (name) => `Cancel upload of ${name}` */\n cancel?: (name: string) => string\n /** The retry button's text (it is described by the file name). @default \"Retry\" */\n retry?: string\n /** @default \"Queued\" */\n queued?: string\n /** The meta line and the indeterminate bar's value text. @default \"Processing…\" */\n processing?: string\n /** @default \"Uploaded\" */\n done?: string\n /** Shown for an error without an `error` message. @default \"Upload failed\" */\n failed?: string\n /** What the status region says on each announced transition. The `error` message, when\n * there is one, follows it. */\n announcement?: (status: FileItemAnnouncedStatus, name: string) => string\n}\n\nconst DEFAULT_TRANSLATIONS: Required<FileItemTranslations> = {\n remove: (name) => `Remove ${name}`,\n cancel: (name) => `Cancel upload of ${name}`,\n retry: \"Retry\",\n queued: \"Queued\",\n processing: \"Processing…\",\n done: \"Uploaded\",\n failed: \"Upload failed\",\n announcement: (status, name) =>\n match(status)\n .with(\"uploading\", () => `Uploading ${name}`)\n .with(\"done\", () => `${name} uploaded`)\n .with(\"error\", () => `${name} failed to upload`)\n .exhaustive(),\n}\n\n/** The default icons, one per kind plus the row's own buttons. */\nconst DEFAULT_ICONS: Record<FileItemIconSlot, ReactNode> = {\n ...FILE_KIND_ICONS,\n remove: <CloseIcon />,\n retry: <RotateCw aria-hidden className={iconStroke} />,\n done: <CircleCheck aria-hidden className={iconStroke} />,\n}\n\nconst ANNOUNCED = new Set<FileItemStatus>([\"uploading\", \"done\", \"error\"])\nconst isAnnounced = (status: FileItemStatus | undefined): status is FileItemAnnouncedStatus =>\n status !== undefined && ANNOUNCED.has(status)\n\n/** Statuses where the remove button stops the upload rather than dropping a finished file. */\nconst IN_FLIGHT = new Set<FileItemStatus>([\"queued\", \"uploading\", \"processing\"])\n\n/** Whether the × stops an upload (and calls `onCancel`) rather than dropping the file. For a\n * layout composed from the parts, which wires `Remove` itself. */\nexport const isInFlight = (status: FileItemStatus | undefined): boolean =>\n status !== undefined && IN_FLIGHT.has(status)\n\n// ---------------------------------------------------------------------------\n// Context\n// ---------------------------------------------------------------------------\n\ntype Shared = {\n name: string\n kind: FileKind\n size?: number\n date?: Date\n src?: string\n /** The picked file itself, for an object-URL thumbnail. */\n blob?: File\n status?: FileItemStatus\n progress?: number\n error?: ReactNode\n disabled: boolean\n thumbnails: boolean\n nameId: string\n locale: string\n timeZone: string\n t: Required<FileItemTranslations>\n icons: Record<FileItemIconSlot, ReactNode>\n}\n\nconst SharedContext = createContext<Shared | null>(null)\n\nconst useShared = () => {\n const shared = useContext(SharedContext)\n if (!shared) throw new Error(\"FileItem parts must be rendered within <FileItem.Root>.\")\n return shared\n}\n\n/** A `File` and a descriptor, read the same way. */\ntype FileFacts = Omit<FileDescriptor, \"date\"> & { date?: Date; blob?: File }\n\n/** An unparseable `date` is dropped rather than shown as \"Invalid Date\". */\nconst toDate = (value: FileDescriptor[\"date\"]): Date | undefined => {\n const date = value === undefined ? undefined : new Date(value)\n return date && !Number.isNaN(date.getTime()) ? date : undefined\n}\n\nconst readFile = (file: FileItemFile): FileFacts =>\n file instanceof File\n ? { name: file.name, size: file.size, type: file.type, blob: file }\n : { name: file.name, size: file.size, type: file.type, src: file.src, date: toDate(file.date) }\n\n// ---------------------------------------------------------------------------\n// Parts\n// ---------------------------------------------------------------------------\n\nexport type FileItemRootProps = HTMLArkProps<\"div\"> &\n WithTestId & {\n /** A picked `File`, or a stored document's `{ name, size?, type?, date?, src? }`. */\n file: FileItemFile\n /** Upload state. Pass it from the first render (`\"idle\"` or `\"queued\"`): the status\n * region exists only with a status, and announces changes, not its first value. */\n status?: FileItemStatus\n /** Upload progress from 0 to 1, read while `status` is `\"uploading\"`. Without it the bar\n * is indeterminate. */\n progress?: number\n /** Why the upload failed, shown and announced while `status` is `\"error\"`. */\n error?: ReactNode\n /** Keep a status region that announces this row's upload. Off for a row a queue drives:\n * `useFileQueue`'s `itemProps` pass `false`, and one `FileQueueSummary` speaks for every\n * row, so 400 rows don't announce 800 times. @default true */\n announce?: boolean\n /** Disables the row's own buttons (remove, retry). */\n disabled?: boolean\n /** Show image files and `src` as thumbnails. Off, every file shows its kind icon, and no\n * object URL is created. @default true */\n thumbnails?: boolean\n /** Replaces the default icons: one per `FileKind`, plus `remove`, `retry` and `done`. */\n icons?: FileItemIcons\n /** Overrides the row's strings. A partial override keeps the other defaults. */\n translations?: FileItemTranslations\n ref?: Ref<HTMLDivElement>\n }\n\nconst Root = ({\n file,\n status,\n progress,\n error,\n announce = true,\n disabled = false,\n thumbnails = true,\n icons,\n translations,\n asChild,\n children,\n className,\n testId,\n ...rest\n}: FileItemRootProps) => {\n const locale = useLocale()\n const timeZone = useTimeZone()\n const nameId = useId()\n const t = { ...DEFAULT_TRANSLATIONS, ...translations }\n const { type, ...facts } = readFile(file)\n const kind = fileKind(type, facts.name)\n\n // Only a change of status is announced, never the first one (a stored document mounting as\n // \"done\" is not news) and never a progress tick. State adjusted during render, React's own\n // pattern for \"remember the previous prop\", so the region's text lands in the same commit.\n const [seen, setSeen] = useState(status)\n const [announced, setAnnounced] = useState<FileItemAnnouncedStatus | null>(null)\n if (seen !== status) {\n setSeen(status)\n setAnnounced(isAnnounced(status) ? status : null)\n }\n\n const shared: Shared = {\n ...facts,\n kind,\n status,\n progress,\n error,\n disabled,\n thumbnails,\n nameId,\n locale,\n timeZone,\n t,\n icons: mergeIcons(DEFAULT_ICONS, icons),\n }\n\n const region = announce && status !== undefined && (\n // A sibling of the busy Body rather than inside it: assistive tech may hold back a live\n // region's changes while it sits in an `aria-busy` subtree.\n <span role=\"status\" className=\"sr-only\">\n {announced && t.announcement(announced, facts.name)}\n {announced === \"error\" && error != null && <> {error}</>}\n </span>\n )\n\n return (\n <SharedContext.Provider value={shared}>\n <ark.div\n data-kind={kind}\n {...props({ \"data-status\": status, \"data-testid\": testId })}\n asChild={asChild}\n className={cn(\n // `relative` contains the status region's sr-only box.\n \"relative flex items-center gap-1 rounded-input border p-2\",\n // The kit's hairline, the same as FileUpload's dropzone above its list.\n \"border-brand-900/20 dark:border-white/15\",\n // Figma's file-upload item: `Border/border-error-secondary`, Error/500 at 30%.\n \"data-[status=error]:border-red-500/30\",\n className,\n )}\n {...rest}\n >\n {composeChildren(asChild, children, (own) => (\n <>\n {own}\n {region}\n </>\n ))}\n </ark.div>\n </SharedContext.Provider>\n )\n}\n\nexport type FileItemPreviewProps = NoAsChild<HTMLArkProps<\"div\">> & WithTestId\n\n/** The kind icon, or the thumbnail: `src`, or an image `File` through an object URL. Lazy, and\n * decorative (the name sits next to it), so it is hidden from assistive tech. */\nconst Preview = ({ className, testId, asChild: _asChild, ...rest }: FileItemPreviewProps) => {\n const { kind, src, blob, thumbnails, icons } = useShared()\n const pictured = thumbnails && (src !== undefined || (blob !== undefined && kind === \"image\"))\n // `null` when no thumbnail is wanted, so a list with thumbnails off makes no object URLs.\n const objectUrl = useObjectUrl(pictured && src === undefined ? blob : null)\n return (\n <ark.div\n aria-hidden\n data-part=\"preview\"\n {...props({ \"data-testid\": testId })}\n className={cn(\"flex size-9 shrink-0 items-center justify-center [&>svg]:size-6\", className)}\n {...rest}\n >\n {pictured ? (\n <Image src={src ?? objectUrl} alt=\"\" fallback={icons[kind]} className=\"size-9\" />\n ) : (\n icons[kind]\n )}\n </ark.div>\n )\n}\n\nexport type FileItemBodyProps = HTMLArkProps<\"div\"> & WithTestId\n\n/** The name, meta and progress column. Busy while the file uploads or is processed. */\nconst Body = ({ className, testId, ...rest }: FileItemBodyProps) => {\n const { status } = useShared()\n return (\n <ark.div\n {...props({\n \"aria-busy\": status === \"uploading\" || status === \"processing\",\n \"data-testid\": testId,\n })}\n // `relative` anchors the progress bar, which sits in the row's bottom padding.\n className={cn(\"relative min-w-0 flex-1\", className)}\n {...rest}\n />\n )\n}\n\nexport type FileItemNameProps = HTMLArkProps<\"div\"> & WithTestId\n\n/** The file name, on one line. The full name stays in the text (truncation is CSS only) and in\n * a `title`. `asChild` turns it into your link: `<FileItem.Name asChild><a href={url}>{name}</a></…>`\n * (an empty link would fall back to the name, but linters rightly flag one). */\nconst Name = ({ asChild, children, className, testId, ...rest }: FileItemNameProps) => {\n const { name, nameId } = useShared()\n return (\n <ark.div\n title={name}\n {...props({ \"data-testid\": testId })}\n asChild={asChild}\n className={cn(\"block truncate text-sm\", className)}\n {...rest}\n // Last, so a composing part's own id (Ark's item name) can't detach the bar and buttons\n // that are named and described by it.\n id={nameId}\n >\n {composeChildren(asChild, children, (own) => own ?? name)}\n </ark.div>\n )\n}\n\nexport type FileItemMetaProps = NoAsChild<HTMLArkProps<\"div\">> & WithTestId\n\n/** The dot is hidden, the spaces aren't: screen readers get \"248 kB Queued\", not \"248 kBQueued\". */\nconst Separator = () => (\n <>\n {\" \"}\n <span aria-hidden>·</span>{\" \"}\n </>\n)\n\n/**\n * The size and date, then the status. `children` replace the size and date and keep the\n * status; an error replaces the whole line with its message.\n */\nconst Meta = ({ children, className, testId, asChild: _asChild, ...rest }: FileItemMetaProps) => {\n const { size, date, status, progress, error, locale, timeZone, t, icons } = useShared()\n const details =\n children === undefined\n ? [\n size === undefined ? null : formatFileSize(size, locale),\n date === undefined\n ? null\n : new Intl.DateTimeFormat(locale, { dateStyle: \"medium\", timeZone }).format(date),\n ]\n : [children]\n const state = match(status)\n .with(\"queued\", () => t.queued)\n .with(\"uploading\", () =>\n progress === undefined\n ? null\n : new Intl.NumberFormat(locale, { style: \"percent\", maximumFractionDigits: 0 }).format(\n Math.min(Math.max(progress, 0), 1),\n ),\n )\n .with(\"processing\", () => t.processing)\n .with(\"done\", () => (\n <span\n data-color=\"green\"\n className=\"inline-flex items-center gap-1 align-bottom text-(--c-text) [&_svg]:size-3.5\"\n >\n {icons.done}\n {t.done}\n </span>\n ))\n .otherwise(() => null)\n const segments = [...details, state].filter((segment) => segment != null && segment !== \"\")\n\n return (\n <ark.div\n data-part=\"meta\"\n {...props({ \"data-testid\": testId })}\n className={cn(\"truncate text-xs\", TYPOGRAPHY_SHADE_CLASSES.muted, className)}\n {...rest}\n >\n {status === \"error\" ? (\n <span className={TEXT_COLOR_CLASSES.error}>{error ?? t.failed}</span>\n ) : (\n segments.map((segment, index) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: a fixed sequence, rebuilt per render\n <Fragment key={index}>\n {index > 0 && <Separator />}\n <span>{segment}</span>\n </Fragment>\n ))\n )}\n </ark.div>\n )\n}\n\nexport type FileItemProgressProps = Omit<ProgressProps, \"value\" | \"defaultValue\" | \"onChange\">\n\n/** The upload bar: determinate while uploading with a `progress`, indeterminate otherwise and\n * while processing, absent in every other status. Named after the file. It sits under the\n * name and meta, out of flow, so the row doesn't change height. */\nconst ProgressBar = ({ className, ...rest }: FileItemProgressProps) => {\n const { status, progress, nameId, t } = useShared()\n if (status !== \"uploading\" && status !== \"processing\") return null\n const determinate = status === \"uploading\" && progress !== undefined\n return (\n <Progress\n size=\"xs\"\n value={determinate ? Math.min(Math.max(progress, 0), 1) * 100 : null}\n aria-labelledby={nameId}\n aria-valuetext={status === \"processing\" ? t.processing : undefined}\n // Out of flow, in the row's bottom padding under the text: a row keeps its height as its\n // upload starts and ends, so a list of uploads doesn't jump.\n className={cn(\"absolute inset-x-0 -bottom-1\", className)}\n {...rest}\n />\n )\n}\n\nexport type FileItemActionsProps = HTMLArkProps<\"div\"> & WithTestId\n\n/** Your buttons for the file: download, view, open in a tab. */\nconst Actions = ({ className, testId, ...rest }: FileItemActionsProps) => (\n <ark.div\n {...props({ \"data-testid\": testId })}\n className={cn(\"ms-1 flex shrink-0 items-center gap-2\", className)}\n {...rest}\n />\n)\n\nexport type FileItemRemoveProps = HTMLArkProps<\"button\"> & WithTestId\n\n/** The × button, named \"Remove {name}\", or \"Cancel upload of {name}\" while the file is queued\n * or in flight. Wire `onClick`; a composing trigger's own name (Ark's) wins over the default. */\nconst Remove = ({\n asChild,\n children,\n className,\n testId,\n disabled,\n ...rest\n}: FileItemRemoveProps) => {\n const { name, status, disabled: rowDisabled, t, icons } = useShared()\n const label = isInFlight(status) ? t.cancel(name) : t.remove(name)\n return (\n <ark.button\n type=\"button\"\n aria-label={label}\n disabled={disabled ?? rowDisabled}\n {...props({ \"data-testid\": testId })}\n asChild={asChild}\n className={cn(\n \"inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-sm me-1\",\n // The neutral washes rows and options use for hover (`popoverOption`, Table):\n // translucent, so the button reads on whatever the row sits on.\n TYPOGRAPHY_SHADE_CLASSES.muted,\n \"transition-colors hover:bg-black/5 hover:text-black dark:hover:bg-white/8 dark:hover:text-white\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n focusStyles(),\n \"[&_svg]:size-3.5\",\n className,\n )}\n {...rest}\n >\n {composeChildren(asChild, children, (own) => own ?? icons.remove)}\n </ark.button>\n )\n}\n\nexport type FileItemRetryProps = ButtonProps\n\n/** A small \"Retry\" button, described by the file name (\"Retry, cv.pdf\"). Wire `onClick`. */\nconst Retry = ({ children, disabled, ...rest }: FileItemRetryProps) => {\n const { nameId, disabled: rowDisabled, t, icons } = useShared()\n return (\n <Button\n type=\"button\"\n size=\"xs\"\n variant=\"subtle\"\n color=\"neutral\"\n startSlot={icons.retry}\n aria-describedby={nameId}\n disabled={disabled ?? rowDisabled}\n {...rest}\n >\n {children ?? t.retry}\n </Button>\n )\n}\n\n// ---------------------------------------------------------------------------\n// Convenience\n// ---------------------------------------------------------------------------\n\ntype FileItemClassNames = {\n root?: string\n preview?: string\n body?: string\n name?: string\n meta?: string\n progress?: string\n actions?: string\n retry?: string\n remove?: string\n}\n\nexport type FileItemProps = FileItemRootProps & {\n /** Replaces the size and date on the meta line; the status still follows. */\n meta?: ReactNode\n /** Your buttons (download, view…), before the retry and remove buttons. */\n actions?: ReactNode\n /** Renders the × button. While the file is queued or in flight it is named as a cancel, and\n * calls `onCancel` when there is one. */\n onRemove?: () => void\n /** What the × does while the file is queued or in flight: stop the upload. Falls back to\n * `onRemove`; on its own, the × shows only while there is an upload to stop. */\n onCancel?: () => void\n /** Renders a Retry button while `status` is `\"error\"`. */\n onRetry?: () => void\n classNames?: FileItemClassNames\n}\n\nfunction FileItemComponent({\n meta,\n actions,\n onRemove,\n onCancel,\n onRetry,\n classNames,\n className,\n asChild,\n children,\n ...root\n}: FileItemProps) {\n const dismiss = isInFlight(root.status) ? (onCancel ?? onRemove) : onRemove\n const row = (\n <>\n <Preview className={classNames?.preview} />\n <Body className={classNames?.body}>\n <Name className={classNames?.name} />\n <Meta className={classNames?.meta}>{meta}</Meta>\n <ProgressBar className={classNames?.progress} />\n </Body>\n {actions != null && <Actions className={classNames?.actions}>{actions}</Actions>}\n {onRetry && root.status === \"error\" && (\n <Retry onClick={onRetry} className={classNames?.retry} />\n )}\n {dismiss && <Remove onClick={dismiss} className={classNames?.remove} />}\n </>\n )\n return (\n // Under `asChild` the row becomes your element (an `<li>` in your list), with the row\n // folded in ahead of that element's own content.\n <Root {...root} asChild={asChild} className={cn(className, classNames?.root)}>\n {asChild ? (\n withAsChildContent(children, (own) => (\n <>\n {row}\n {own}\n </>\n ))\n ) : (\n <>\n {row}\n {children}\n </>\n )}\n </Root>\n )\n}\n\n/**\n * `FileItem` — the ready-made row, with the parts attached for your own layout:\n * `Root` (the file, status and context), `Preview`, `Body`, `Name`, `Meta`, `Progress`,\n * `Actions`, `Retry` and `Remove`.\n */\nexport const FileItem = Object.assign(FileItemComponent, {\n Root,\n Preview,\n Body,\n Name,\n Meta,\n Progress: ProgressBar,\n Actions,\n Retry,\n Remove,\n})\n"]}
@@ -1,6 +1,6 @@
1
1
  import { props } from './chunk-WYCMIIRR.js';
2
2
  import { TYPOGRAPHY_SHADE_CLASSES } from './chunk-GIPQUKCN.js';
3
- import { cn } from './chunk-QP4I37PA.js';
3
+ import { cn } from './chunk-4ASNIDV7.js';
4
4
  import { ark } from '@ark-ui/react';
5
5
  import { cva } from 'class-variance-authority';
6
6
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -95,5 +95,5 @@ var Divider = ({
95
95
  };
96
96
 
97
97
  export { Divider };
98
- //# sourceMappingURL=chunk-SE3CGQRO.js.map
99
- //# sourceMappingURL=chunk-SE3CGQRO.js.map
98
+ //# sourceMappingURL=chunk-RLOWPCGG.js.map
99
+ //# sourceMappingURL=chunk-RLOWPCGG.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/divider/divider.tsx"],"names":[],"mappings":";;;;;;;AA8BA,IAAM,eAAA,GAAkB,GAAA,CAAI,CAAC,UAAU,CAAA,EAAG;AAAA,EACxC,QAAA,EAAU;AAAA;AAAA;AAAA,IAGR,WAAA,EAAa,EAAE,UAAA,EAAY,EAAA,EAAI,UAAU,EAAA,EAAG;AAAA,IAC5C,IAAA,EAAM,EAAE,EAAA,EAAI,EAAA,EAAI,EAAA,EAAI,EAAA,EAAI,EAAA,EAAI,EAAA,EAAI,EAAA,EAAI,EAAA,EAAI,EAAA,EAAI,EAAA,EAAG;AAAA;AAAA;AAAA;AAAA,IAI/C,OAAA,EAAS;AAAA,MACP,KAAA,EAAO,cAAA;AAAA,MACP,MAAA,EAAQ,eAAA;AAAA,MACR,MAAA,EAAQ;AAAA;AACV,GACF;AAAA,EACA,gBAAA,EAAkB;AAAA,IAChB,EAAE,WAAA,EAAa,YAAA,EAAc,IAAA,EAAM,IAAA,EAAM,OAAO,UAAA,EAAW;AAAA,IAC3D,EAAE,WAAA,EAAa,YAAA,EAAc,IAAA,EAAM,IAAA,EAAM,OAAO,YAAA,EAA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QAAQ;AAAA;AAAA;AACxE,OAAA,EACF;AAAA;AAAA,GAEJ;AAEJ","file":"chunk-SE3CGQRO.js","sourcesContent":["import { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport type { ReactNode } from \"react\"\nimport type { Align } from \"../../lib/align\"\nimport type { NoAsChild } from \"../../lib/as-child\"\nimport { cn } from \"../../lib/cn\"\nimport type { Color } from \"../../lib/colors\"\nimport { props } from \"../../lib/props\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { TYPOGRAPHY_SHADE_CLASSES } from \"../../lib/typography-size\"\n\n/**\n * `size` here only ever controls border thickness (1–5px, Mantine's own\n * xs..xl mapping) — unlike Timeline's density `size`, there's no parent/\n * child override relationship to defeat via a CSS custom property, so\n * thickness is a plain `(orientation × size)` compound lookup, the simpler\n * of the two mechanisms this kit uses for a sized dimension.\n *\n * Horizontal orientation's thickness sits on the block axis (`border-t`) —\n * RTL never touches top/bottom, so a physical property is fine, same split\n * `ButtonGroup` uses between its own horizontal/vertical orientations.\n * Vertical orientation's thickness sits on the inline axis, so it uses the\n * logical `border-s` (border-inline-start) instead, matching Timeline's own\n * vertical connecting line.\n *\n * Tailwind's default border-width scale has no 3px/5px step, hence the\n * arbitrary `[Npx]` values below — static literals (not interpolated) so\n * Tailwind v4's scanner keeps them.\n */\nconst dividerVariants = cva([\"shrink-0\"], {\n variants: {\n // No own classes — matched by `compoundVariants` only, the same\n // internal-only pattern `timelineBulletVariants`'s `ringed` axis uses.\n orientation: { horizontal: \"\", vertical: \"\" },\n size: { xs: \"\", sm: \"\", md: \"\", lg: \"\", xl: \"\" },\n // A different vocabulary than the kit's shape axis (filled/light/\n // outline/subtle/default) — same precedent as Timeline's own local\n // `TimelineLineVariant`.\n variant: {\n solid: \"border-solid\",\n dashed: \"border-dashed\",\n dotted: \"border-dotted\",\n },\n },\n compoundVariants: [\n { orientation: \"horizontal\", size: \"xs\", class: \"border-t\" },\n { orientation: \"horizontal\", size: \"sm\", class: \"border-t-2\" },\n { orientation: \"horizontal\", size: \"md\", class: \"border-t-[3px]\" },\n { orientation: \"horizontal\", size: \"lg\", class: \"border-t-4\" },\n { orientation: \"horizontal\", size: \"xl\", class: \"border-t-[5px]\" },\n { orientation: \"vertical\", size: \"xs\", class: \"border-s\" },\n { orientation: \"vertical\", size: \"sm\", class: \"border-s-2\" },\n { orientation: \"vertical\", size: \"md\", class: \"border-s-[3px]\" },\n { orientation: \"vertical\", size: \"lg\", class: \"border-s-4\" },\n { orientation: \"vertical\", size: \"xl\", class: \"border-s-[5px]\" },\n ],\n defaultVariants: { orientation: \"horizontal\", size: \"xs\", variant: \"solid\" },\n})\n\nexport type DividerOrientation = NonNullable<VariantProps<typeof dividerVariants>[\"orientation\"]>\nexport type DividerVariant = NonNullable<VariantProps<typeof dividerVariants>[\"variant\"]>\n/** Divider's thickness scale is the kit's canonical `Size` (xs–xl). */\nexport type DividerSize = Size\nexport type DividerLabelPosition = Align\n\nexport type DividerProps = NoAsChild<Omit<HTMLArkProps<\"div\">, \"children\">> &\n VariantProps<typeof dividerVariants> &\n WithTestId & {\n /**\n * Accent palette for the line. Re-exported as `Color` from `@42/ui-react`.\n * Unset renders a neutral hairline — it deliberately does not fall\n * through to `--c-solid` (that cascades to a bold black/white default at\n * `:root`, wrong for a hairline).\n */\n color?: Color\n /**\n * Content centered on the line (a word, an icon). Renders as three real\n * flex children — a leading line, the label, a trailing line — rather\n * than `::before`/`::after` pseudo-elements, matching Timeline's own line\n * convention. The label text is small (`text-xs`) in the muted text tier\n * (or the palette's `--c-text` when `color` is set): quiet enough to read\n * as part of the separator, but still at text contrast — the line's own\n * hairline colour is far too faint for words. The label is real content,\n * so `role=\"separator\"` moves onto the two line segments and the label\n * stays in the accessibility tree between them. Omit for a plain,\n * unlabeled line.\n */\n label?: ReactNode\n /**\n * Where `label` sits along the line. `\"start\"`/`\"end\"` follow flexbox's\n * own logical main-axis edges (matching `Drawer`'s `placement` prop), so\n * they flip correctly under `dir=\"rtl\"` with no extra CSS. Ignored when\n * `label` is unset. Both segments render equally (a centered label) by\n * default.\n */\n labelPosition?: DividerLabelPosition\n }\n\n/**\n * Divider — a thin separator line, horizontal or vertical, with an optional\n * centered/leading/trailing label. Pure React Server Component.\n *\n * A separator's children are presentational, so an unlabeled divider is the\n * `role=\"separator\"` element itself, but a labeled one is a plain wrapper whose\n * line segments each carry the role: the label text stays readable instead of\n * being swallowed by the separator.\n *\n * `orientation=\"vertical\"` relies entirely on `align-self: stretch` — like\n * Mantine's own Divider, it has no self-sizing, so it needs a flex/grid\n * parent that already provides a definite height, or it renders with zero\n * height.\n *\n * ```tsx\n * <Divider />\n * <Divider label=\"OR\" />\n * <Divider orientation=\"vertical\" />\n * ```\n */\nexport const Divider = ({\n className,\n orientation,\n size,\n variant,\n color,\n label,\n labelPosition,\n testId,\n asChild: _asChild,\n ...rest\n}: DividerProps) => {\n const isVertical = orientation === \"vertical\"\n const lineClass = cn(\n dividerVariants({ orientation, size, variant }),\n color ? \"border-(--c-solid)\" : \"border-brand-900/20 dark:border-white/15\",\n )\n const labelClass = cn(\n \"shrink-0 text-xs\",\n color ? \"text-(--c-text)\" : TYPOGRAPHY_SHADE_CLASSES.muted,\n )\n // A separator's children are presentational: on a labeled divider the role\n // moves onto the line segments, or the label would vanish from the AX tree.\n const separator = {\n role: \"separator\",\n ...props({ \"aria-orientation\": isVertical && \"vertical\" }),\n } as const\n\n return (\n <ark.div\n {...(label ? null : separator)}\n data-orientation={orientation ?? \"horizontal\"}\n data-color={color}\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\n label\n ? [\"flex items-center gap-2\", isVertical ? \"flex-col self-stretch\" : \"w-full\"]\n : [lineClass, isVertical ? \"self-stretch\" : \"w-full\"],\n className,\n )}\n >\n {label && (\n <>\n <span\n data-part=\"line\"\n {...separator}\n className={cn(lineClass, \"flex-1\", labelPosition === \"start\" && \"hidden\")}\n />\n <span data-part=\"label\" className={labelClass}>\n {label}\n </span>\n <span\n data-part=\"line\"\n {...separator}\n className={cn(lineClass, \"flex-1\", labelPosition === \"end\" && \"hidden\")}\n />\n </>\n )}\n </ark.div>\n )\n}\n"]}
1
+ {"version":3,"sources":["../src/components/divider/divider.tsx"],"names":[],"mappings":";;;;;;;AA8BA,IAAM,eAAA,GAAkB,GAAA,CAAI,CAAC,UAAU,CAAA,EAAG;AAAA,EACxC,QAAA,EAAU;AAAA;AAAA;AAAA,IAGR,WAAA,EAAa,EAAE,UAAA,EAAY,EAAA,EAAI,UAAU,EAAA,EAAG;AAAA,IAC5C,IAAA,EAAM,EAAE,EAAA,EAAI,EAAA,EAAI,EAAA,EAAI,EAAA,EAAI,EAAA,EAAI,EAAA,EAAI,EAAA,EAAI,EAAA,EAAI,EAAA,EAAI,EAAA,EAAG;AAAA;AAAA;AAAA;AAAA,IAI/C,OAAA,EAAS;AAAA,MACP,KAAA,EAAO,cAAA;AAAA,MACP,MAAA,EAAQ,eAAA;AAAA,MACR,MAAA,EAAQ;AAAA;AACV,GACF;AAAA,EACA,gBAAA,EAAkB;AAAA,IAChB,EAAE,WAAA,EAAa,YAAA,EAAc,IAAA,EAAM,IAAA,EAAM,OAAO,UAAA,EAAW;AAAA,IAC3D,EAAE,WAAA,EAAa,YAAA,EAAc,IAAA,EAAM,IAAA,EAAM,OAAO,YAAA,EAAa;AAAA,IAC7D,EAAE,WAAA,EAAa,YAAA,EAAc,IAAA,EAAM,IAAA,EAAM,OAAO,gBAAA,EAAiB;AAAA,IACjE,EAAE,WAAA,EAAa,YAAA,EAAc,IAAA,EAAM,IAAA,EAAM,OAAO,YAAA,EAAa;AAAA,IAC7D,EAAE,WAAA,EAAa,YAAA,EAAc,IAAA,EAAM,IAAA,EAAM,OAAO,gBAAA,EAAiB;AAAA,IACjE,EAAE,WAAA,EAAa,UAAA,EAAY,IAAA,EAAM,IAAA,EAAM,OAAO,UAAA,EAAW;AAAA,IACzD,EAAE,WAAA,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,IAAe,YAAA;AAAA,MACjC,YAAA,EAAY,KAAA;AAAA,MACX,GAAG,KAAA,CAAM,EAAE,aAAA,EAAe,QAAQ,CAAA;AAAA,MAClC,GAAG,IAAA;AAAA,MACJ,SAAA,EAAW,EAAA;AAAA,QACT,KAAA,GACI,CAAC,yBAAA,EAA2B,UAAA,GAAa,uBAAA,GAA0B,QAAQ,CAAA,GAC3E,CAAC,SAAA,EAAW,UAAA,GAAa,cAAA,GAAiB,QAAQ,CAAA;AAAA,QACtD;AAAA,OACF;AAAA,MAEC,mCACC,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,wBAAA,GAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,WAAA,EAAU,MAAA;AAAA,YACT,GAAG,SAAA;AAAA,YACJ,WAAW,EAAA,CAAG,SAAA,EAAW,QAAA,EAAU,aAAA,KAAkB,WAAW,QAAQ;AAAA;AAAA,SAC1E;AAAA,4BACC,MAAA,EAAA,EAAK,WAAA,EAAU,OAAA,EAAQ,SAAA,EAAW,YAChC,QAAA,EAAA,KAAA,EACH,CAAA;AAAA,wBACA,GAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,WAAA,EAAU,MAAA;AAAA,YACT,GAAG,SAAA;AAAA,YACJ,WAAW,EAAA,CAAG,SAAA,EAAW,QAAA,EAAU,aAAA,KAAkB,SAAS,QAAQ;AAAA;AAAA;AACxE,OAAA,EACF;AAAA;AAAA,GAEJ;AAEJ","file":"chunk-RLOWPCGG.js","sourcesContent":["import { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport type { ReactNode } from \"react\"\nimport type { Align } from \"../../lib/align\"\nimport type { NoAsChild } from \"../../lib/as-child\"\nimport { cn } from \"../../lib/cn\"\nimport type { Color } from \"../../lib/colors\"\nimport { props } from \"../../lib/props\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { TYPOGRAPHY_SHADE_CLASSES } from \"../../lib/typography-size\"\n\n/**\n * `size` here only ever controls border thickness (1–5px, Mantine's own\n * xs..xl mapping) — unlike Timeline's density `size`, there's no parent/\n * child override relationship to defeat via a CSS custom property, so\n * thickness is a plain `(orientation × size)` compound lookup, the simpler\n * of the two mechanisms this kit uses for a sized dimension.\n *\n * Horizontal orientation's thickness sits on the block axis (`border-t`) —\n * RTL never touches top/bottom, so a physical property is fine, same split\n * `ButtonGroup` uses between its own horizontal/vertical orientations.\n * Vertical orientation's thickness sits on the inline axis, so it uses the\n * logical `border-s` (border-inline-start) instead, matching Timeline's own\n * vertical connecting line.\n *\n * Tailwind's default border-width scale has no 3px/5px step, hence the\n * arbitrary `[Npx]` values below — static literals (not interpolated) so\n * Tailwind v4's scanner keeps them.\n */\nconst dividerVariants = cva([\"shrink-0\"], {\n variants: {\n // No own classes — matched by `compoundVariants` only, the same\n // internal-only pattern `timelineBulletVariants`'s `ringed` axis uses.\n orientation: { horizontal: \"\", vertical: \"\" },\n size: { xs: \"\", sm: \"\", md: \"\", lg: \"\", xl: \"\" },\n // A different vocabulary than the kit's shape axis (filled/light/\n // outline/subtle/default) — same precedent as Timeline's own local\n // `TimelineLineVariant`.\n variant: {\n solid: \"border-solid\",\n dashed: \"border-dashed\",\n dotted: \"border-dotted\",\n },\n },\n compoundVariants: [\n { orientation: \"horizontal\", size: \"xs\", class: \"border-t\" },\n { orientation: \"horizontal\", size: \"sm\", class: \"border-t-2\" },\n { orientation: \"horizontal\", size: \"md\", class: \"border-t-[3px]\" },\n { orientation: \"horizontal\", size: \"lg\", class: \"border-t-4\" },\n { orientation: \"horizontal\", size: \"xl\", class: \"border-t-[5px]\" },\n { orientation: \"vertical\", size: \"xs\", class: \"border-s\" },\n { orientation: \"vertical\", size: \"sm\", class: \"border-s-2\" },\n { orientation: \"vertical\", size: \"md\", class: \"border-s-[3px]\" },\n { orientation: \"vertical\", size: \"lg\", class: \"border-s-4\" },\n { orientation: \"vertical\", size: \"xl\", class: \"border-s-[5px]\" },\n ],\n defaultVariants: { orientation: \"horizontal\", size: \"xs\", variant: \"solid\" },\n})\n\nexport type DividerOrientation = NonNullable<VariantProps<typeof dividerVariants>[\"orientation\"]>\nexport type DividerVariant = NonNullable<VariantProps<typeof dividerVariants>[\"variant\"]>\n/** Divider's thickness scale is the kit's canonical `Size` (xs–xl). */\nexport type DividerSize = Size\nexport type DividerLabelPosition = Align\n\nexport type DividerProps = NoAsChild<Omit<HTMLArkProps<\"div\">, \"children\">> &\n VariantProps<typeof dividerVariants> &\n WithTestId & {\n /**\n * Accent palette for the line. Re-exported as `Color` from `@42/ui-react`.\n * Unset renders a neutral hairline — it deliberately does not fall\n * through to `--c-solid` (that cascades to a bold black/white default at\n * `:root`, wrong for a hairline).\n */\n color?: Color\n /**\n * Content centered on the line (a word, an icon). Renders as three real\n * flex children — a leading line, the label, a trailing line — rather\n * than `::before`/`::after` pseudo-elements, matching Timeline's own line\n * convention. The label text is small (`text-xs`) in the muted text tier\n * (or the palette's `--c-text` when `color` is set): quiet enough to read\n * as part of the separator, but still at text contrast — the line's own\n * hairline colour is far too faint for words. The label is real content,\n * so `role=\"separator\"` moves onto the two line segments and the label\n * stays in the accessibility tree between them. Omit for a plain,\n * unlabeled line.\n */\n label?: ReactNode\n /**\n * Where `label` sits along the line. `\"start\"`/`\"end\"` follow flexbox's\n * own logical main-axis edges (matching `Drawer`'s `placement` prop), so\n * they flip correctly under `dir=\"rtl\"` with no extra CSS. Ignored when\n * `label` is unset. Both segments render equally (a centered label) by\n * default.\n */\n labelPosition?: DividerLabelPosition\n }\n\n/**\n * Divider — a thin separator line, horizontal or vertical, with an optional\n * centered/leading/trailing label. Pure React Server Component.\n *\n * A separator's children are presentational, so an unlabeled divider is the\n * `role=\"separator\"` element itself, but a labeled one is a plain wrapper whose\n * line segments each carry the role: the label text stays readable instead of\n * being swallowed by the separator.\n *\n * `orientation=\"vertical\"` relies entirely on `align-self: stretch` — like\n * Mantine's own Divider, it has no self-sizing, so it needs a flex/grid\n * parent that already provides a definite height, or it renders with zero\n * height.\n *\n * ```tsx\n * <Divider />\n * <Divider label=\"OR\" />\n * <Divider orientation=\"vertical\" />\n * ```\n */\nexport const Divider = ({\n className,\n orientation,\n size,\n variant,\n color,\n label,\n labelPosition,\n testId,\n asChild: _asChild,\n ...rest\n}: DividerProps) => {\n const isVertical = orientation === \"vertical\"\n const lineClass = cn(\n dividerVariants({ orientation, size, variant }),\n color ? \"border-(--c-solid)\" : \"border-brand-900/20 dark:border-white/15\",\n )\n const labelClass = cn(\n \"shrink-0 text-xs\",\n color ? \"text-(--c-text)\" : TYPOGRAPHY_SHADE_CLASSES.muted,\n )\n // A separator's children are presentational: on a labeled divider the role\n // moves onto the line segments, or the label would vanish from the AX tree.\n const separator = {\n role: \"separator\",\n ...props({ \"aria-orientation\": isVertical && \"vertical\" }),\n } as const\n\n return (\n <ark.div\n {...(label ? null : separator)}\n data-orientation={orientation ?? \"horizontal\"}\n data-color={color}\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\n label\n ? [\"flex items-center gap-2\", isVertical ? \"flex-col self-stretch\" : \"w-full\"]\n : [lineClass, isVertical ? \"self-stretch\" : \"w-full\"],\n className,\n )}\n >\n {label && (\n <>\n <span\n data-part=\"line\"\n {...separator}\n className={cn(lineClass, \"flex-1\", labelPosition === \"start\" && \"hidden\")}\n />\n <span data-part=\"label\" className={labelClass}>\n {label}\n </span>\n <span\n data-part=\"line\"\n {...separator}\n className={cn(lineClass, \"flex-1\", labelPosition === \"end\" && \"hidden\")}\n />\n </>\n )}\n </ark.div>\n )\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import { props } from './chunk-WYCMIIRR.js';
2
- import { focusStyles } from './chunk-3REFDGOM.js';
2
+ import { focusStyles } from './chunk-C6NVU4F7.js';
3
3
  import { TEXT_COLOR_CLASSES } from './chunk-GIPQUKCN.js';
4
- import { cn } from './chunk-QP4I37PA.js';
4
+ import { cn } from './chunk-4ASNIDV7.js';
5
5
  import { ark } from '@ark-ui/react';
6
6
  import { cva } from 'class-variance-authority';
7
7
  import { jsx, jsxs } from 'react/jsx-runtime';
@@ -204,5 +204,5 @@ var Table = Object.assign(TableRoot, {
204
204
  });
205
205
 
206
206
  export { Table };
207
- //# sourceMappingURL=chunk-R57QP43T.js.map
208
- //# sourceMappingURL=chunk-R57QP43T.js.map
207
+ //# sourceMappingURL=chunk-SVKN5ZHX.js.map
208
+ //# sourceMappingURL=chunk-SVKN5ZHX.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/table/table.tsx"],"names":[],"mappings":";;;;;;;;AA+BA,IAAM,cAAA,GAAiB,EAAA;AAAA,EACrB,qDAAA;AAAA;AAAA;AAAA,EAGA;AACF,CAAA;AAcA,IAAM,aAAA,GAAgB,GAAA;AAAA,EACpB;AAAA;AAAA,IAEE,2CAAA;AAAA,IACA,oEAAA;AAAA;AAAA,IAEA,qBAAA;AAAA,IACA,uGAAA;AAAA;AAAA;AAAA;AAAA,IAIA,yDAAA;AAAA,IACA,0FAAA;AAAA;AAAA,IAEA,+EAAA;AAAA,IACA,6CAAA;AAAA,IACA,uIAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA;AAAA,GACF;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA;AAAA,MAER,IAAA,EAAM;AAAA,QACJ,EAAA,EAAI,yDAAA;AAAA,QACJ,EAAA,EAAI,iEAAA;AAAA,QACJ,EAAA,EAAI,6DAAA;AAAA,QACJ,EAAA,EAAI,2DAAA;AAAA,QACJ,EAAA,EAAI;AAAA,OACN;AAAA,MACA,OAAA,EAAS;AAAA,QACP,IAAA,EAAM,sFAAA;AAAA,QACN,KAAA,EAAO;AAAA;AACT,KACF;AAAA,IACA,eAAA,EAAiB,EAAE,IAAA,EAAM,IAAA,EAAM,SAAS,KAAA;AAAM;AAElD,CAAA;AAIA,IAAM,mBAAA,GACJ,4EAAA;AAGF,IAAM,mBAAA,GACJ,+EAAA;A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ACJ,SAAA,EAAW,SAAA,GAAY,EAAA,CAAG,SAAS,CAAA,GAAI;AAAA;AACzC,CAAA;AAKF,IAAM,YAAY,CAAC,EAAE,WAAW,MAAA,EAAQ,GAAG,MAAK,qBAC9C,GAAA;AAAA,EAAC,GAAA,CAAI,EAAA;AAAA,EAAJ;AAAA,IACE,GAAG,KAAA,CAAM,EAAE,aAAA,EAAe,QAAQ,CAAA;AAAA,IAClC,GAAG,IAAA;AAAA,IACJ,SAAA,EAAW,SAAA,GAAY,EAAA,CAAG,SAAS,CAAA,GAAI;AAAA;AACzC,CAAA;AAGK,IAAM,KAAA,GAAQ,MAAA,CAAO,MAAA,CAAO,SAAA,EAAW;AAAA,EAC5C,OAAA,EAAS,YAAA;AAAA,EACT,KAAA,EAAO,UAAA;AAAA,EACP,OAAA,EAAS,YAAA;AAAA,EACT,IAAA,EAAM,SAAA;AAAA,EACN,IAAA,EAAM,SAAA;AAAA,EACN,IAAA,EAAM,SAAA;AAAA,EACN,GAAA,EAAK,QAAA;AAAA,EACL,UAAA,EAAY,eAAA;AAAA,EACZ,IAAA,EAAM;AACR,CAAC","file":"chunk-R57QP43T.js","sourcesContent":["import { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../../lib/cn\"\nimport { focusStyles } from \"../../lib/focus-styles\"\nimport { props } from \"../../lib/props\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { TEXT_COLOR_CLASSES } from \"../../lib/typography-size\"\n\n/**\n * The outermost element: a bordered, rounded surface that `overflow-hidden`\n * clips. Clipping is what keeps the rounded corners intact once the inner\n * scroll region shows a scrollbar (a scrollbar on the *rounded* element would\n * otherwise square off its corners). `flex flex-col` lets an optional\n * `Table.Toolbar` stack above the scroll region.\n *\n * `contain-layout` stops a bug that only shows up when this sits inside an\n * ancestor chain with no *definite* height (e.g. a CSS Grid track sized off\n * `min-height`, not `height` — common when a page fills the viewport via a\n * grid). Without it, a browser can size that indefinite ancestor off this\n * box's unclipped descendants' natural size — the *actual* content behind\n * an internal `overflow-auto`/`max-h-*` scroll region, not its rendered,\n * already-clipped size — inflating the whole page's scroll height in\n * proportion to row count despite this box's own height staying correct.\n * `contain: layout` declares this subtree's size as fully self-contained, so\n * an indefinite ancestor sizes off its real (bounded) box instead. Doesn't\n * affect `stickyHeader`/`stickyFooter` (governed by the nearest *scrolling*\n * ancestor, not containing-block/layout-containment rules) or the absolute-\n * positioned `.table-fade-*` overlays (already resolve against\n * `.table-scroll-frame`'s own `position: relative` in theme.css).\n */\nconst tableContainer = cn(\n \"flex w-full flex-col overflow-hidden contain-layout\",\n // Brand-derived border, matching InputBase/Popover/Modal/Drawer's shell\n // (border-brand-900/20 dark:border-white/15) rather than a neutral gray.\n \"rounded-sm border border-brand-900/20 dark:border-white/15\",\n)\n\n/**\n * All table styling rides on the container as descendant-selector classes, so\n * the part components stay dumb and `size` / `striped` / sticky can live on\n * `<Table>` (the root) without React context — keeping the whole thing a pure\n * Server Component. Every variant value is a static class string so Tailwind\n * v4's scanner keeps it.\n *\n * The `<table>` uses `border-collapse: separate` (see `TableContent`): collapsed\n * borders detach from sticky `<thead>` / `<tfoot>` while scrolling, so the\n * header/footer separators are cell borders (`thead th` bottom, `tfoot td/th`\n * top) that stay put when pinned.\n */\nconst tableVariants = cva(\n [\n // Row separators — on cells, since separate-mode ignores <tr> borders.\n \"[&_tbody_tr:not(:last-child)_td]:border-b\",\n \"[&_tbody_td]:border-brand-900/20 dark:[&_tbody_td]:border-white/15\",\n // Cells\n \"[&_td]:align-middle\",\n \"[&_th]:text-start [&_th]:align-middle [&_th]:font-medium [&_th]:text-brand-950 dark:[&_th]:text-white\",\n // Header — subtle fill + a bottom separator that survives sticky. Same\n // brand-tinted fill Popover/Modal/Drawer use for their own surface, at\n // the same /90 light /85 dark opacity recipe.\n \"[&_thead]:bg-brand-50/90 dark:[&_thead]:bg-brand-950/85\",\n \"[&_thead_th]:border-b [&_thead_th]:border-brand-900/20 dark:[&_thead_th]:border-white/15\",\n // Footer — subtle fill + a top separator that survives sticky.\n \"[&_tfoot]:bg-brand-50/90 dark:[&_tfoot]:bg-brand-950/85 [&_tfoot]:font-medium\",\n \"[&_tfoot_th]:border-t [&_tfoot_td]:border-t\",\n \"[&_tfoot_th]:border-brand-900/20 [&_tfoot_td]:border-brand-900/20 dark:[&_tfoot_th]:border-white/15 dark:[&_tfoot_td]:border-white/15\",\n // Excludes a `data-placeholder` row (an empty/error/loading state, e.g.\n // `DataTable`'s) — it has no row to hover, so it shouldn't tint like one.\n // Black/white wash, same convention as Popover/Menu/TreeSelect's own row\n // highlight — background-dependent instead of a fixed per-theme gray.\n \"[&_tbody_tr:not([data-placeholder]):hover]:bg-black/5! dark:[&_tbody_tr:not([data-placeholder]):hover]:bg-white/8! [&_tbody_tr]:transition-colors\",\n ],\n {\n variants: {\n // Cell padding + text scale, keyed to the kit's canonical `Size` scale.\n size: {\n xs: \"text-xs [&_th]:px-2 [&_td]:px-2 [&_th]:py-1 [&_td]:py-1\",\n sm: \"text-sm [&_th]:px-2.5 [&_td]:px-2.5 [&_th]:py-1.5 [&_td]:py-1.5\",\n md: \"text-sm [&_th]:px-3 [&_td]:px-3 [&_th]:py-2.5 [&_td]:py-2.5\",\n lg: \"text-base [&_th]:px-4 [&_td]:px-4 [&_th]:py-3 [&_td]:py-3\",\n xl: \"text-base [&_th]:px-4 [&_td]:px-4 [&_th]:py-4 [&_td]:py-4\",\n },\n striped: {\n true: \"[&_tbody_tr:nth-child(even)]:bg-black/3 dark:[&_tbody_tr:nth-child(even)]:bg-white/4\",\n false: \"\",\n },\n },\n defaultVariants: { size: \"md\", striped: false },\n },\n)\n\n/** Pin the whole `<thead>` to the top of the scroll region; `backdrop-blur`\n * keeps scrolled body rows legible behind the translucent header fill. */\nconst stickyHeaderClasses =\n \"[&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10 [&_thead]:backdrop-blur-lg\"\n\n/** Pin the whole `<tfoot>` (e.g. a totals row) to the bottom of the scroll region. */\nconst stickyFooterClasses =\n \"[&_tfoot]:sticky [&_tfoot]:bottom-0 [&_tfoot]:z-10 [&_tfoot]:backdrop-blur-lg\"\n\n/** `Table`'s density scale — the kit's canonical `Size` (xs–xl). */\nexport type TableSize = Size\n\nexport type TableProps = HTMLArkProps<\"div\"> &\n VariantProps<typeof tableVariants> &\n WithTestId & {\n /** Pins the header row during vertical scroll. Needs a bounded height —\n * set `max-h-*` on `Table` or `Table.Content`. */\n stickyHeader?: boolean\n /** Pins a `Table.Foot` row (e.g. totals) to the bottom during vertical\n * scroll. Same bounded-height requirement as `stickyHeader`. */\n stickyFooter?: boolean\n }\n\n/**\n * Table — a dumb, styled semantic `<table>` inside a bordered, rounded surface.\n * Pure React Server Component (no `\"use client\"`): static markup, no state, so\n * it's safe in an RSC tree and usable for static / MDX tables. Composed from\n * namespaced parts: an optional non-table header (`Table.Toolbar` +\n * `Table.Title` for a title and actions), a `Table.Content` scroll region that\n * holds the `<table>`, and the semantic parts `Table.Head` / `Table.Body` /\n * `Table.Foot` / `Table.Row` / `Table.HeaderCell` / `Table.Cell`.\n *\n * Density (`size`), `striped`, and `stickyHeader` / `stickyFooter` ride on\n * `<Table>` and style the table via descendant selectors. To pin a header or\n * footer, give the scroll region a bounded height (`max-h-*` on `Table` or\n * `Table.Content`). The rounded border is `overflow-hidden`, so the corners\n * stay intact even once a scrollbar appears. There is no `variant`×`color`\n * axis — a table retints from `:root` slot vars via CSS.\n *\n * <Table striped size=\"sm\" stickyHeader className=\"max-h-80\">\n * <Table.Toolbar>\n * <Table.Title>Users</Table.Title>\n * <Button size=\"sm\">Add</Button>\n * </Table.Toolbar>\n * <Table.Content>\n * <Table.Head>\n * <Table.Row>\n * <Table.HeaderCell>Name</Table.HeaderCell>\n * <Table.HeaderCell className=\"text-right\">Age</Table.HeaderCell>\n * </Table.Row>\n * </Table.Head>\n * <Table.Body>\n * <Table.Row>\n * <Table.Cell>Ada</Table.Cell>\n * <Table.Cell className=\"text-right\">36</Table.Cell>\n * </Table.Row>\n * </Table.Body>\n * </Table.Content>\n * </Table>\n */\nconst TableRoot = ({\n className,\n size,\n striped,\n stickyHeader,\n stickyFooter,\n testId,\n ...rest\n}: TableProps) => (\n <ark.div\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\n tableContainer,\n tableVariants({ size, striped }),\n stickyHeader && stickyHeaderClasses,\n stickyFooter && stickyFooterClasses,\n className,\n )}\n />\n)\n\nexport type TableToolbarProps = HTMLArkProps<\"div\"> & WithTestId\n\n/** Non-`<table>` header bar: a title + actions row above the scroll region,\n * separated by a bottom border. `shrink-0` so it never collapses when the\n * content scrolls. */\nconst TableToolbar = ({ className, testId, ...rest }: TableToolbarProps) => (\n <ark.div\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\n \"flex shrink-0 items-center justify-between gap-2 border-b border-brand-900/20 px-3 ps-5 py-3 dark:border-white/15\",\n className,\n )}\n />\n)\n\nexport type TableTitleProps = HTMLArkProps<\"h3\"> & WithTestId\n\nconst TableTitle = ({ className, testId, ...rest }: TableTitleProps) => (\n <ark.h3\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\"font-semibold tracking-normal\", className)}\n />\n)\n\nexport type TableContentProps = HTMLArkProps<\"table\"> &\n WithTestId & {\n /** Style the inner `<table>` element; `className` targets the scroll region. */\n classNames?: { table?: string }\n }\n\n/** The scroll region + the `<table>`, framed so horizontal scroll affordances\n * (soft edge shadows on each side with more to scroll) can overlay it. `className`\n * bounds the scroll surface (`max-h-*` here bounds a sticky header/footer);\n * `classNames.table` styles the `<table>`. `border-separate` keeps sticky\n * header/footer borders. The `table-scroll-*` / `table-fade-*` classes are the\n * scroll-driven-animation affordance defined in theme.css. */\nconst TableContent = ({ className, classNames, testId, ...rest }: TableContentProps) => (\n <div className={cn(\"table-scroll-frame flex min-h-0 flex-1 flex-col\", className)}>\n <section\n // A scroller must be reachable by keyboard, or arrow keys can't scroll it\n // (axe `scrollable-region-focusable`). Always, not only once it overflows:\n // knowing that would take a layout read, and this part is a Server Component.\n // biome-ignore lint/a11y/noNoninteractiveTabindex: a scroll region must be reachable by keyboard\n tabIndex={0}\n // A `<section>` is a region landmark only once it has a name, and it takes the\n // table's own: name the table (`aria-labelledby` a `Table.Title`'s id) and the\n // region says the same thing. Unnamed, it stays a plain focusable scroller.\n {...props({ \"aria-labelledby\": rest[\"aria-labelledby\"], \"aria-label\": rest[\"aria-label\"] })}\n className=\"peer table-scroll-x min-h-0 w-full flex-1 overflow-auto focus-visible:outline-none\"\n >\n <ark.table\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\n \"w-full border-separate border-spacing-0 text-start\",\n TEXT_COLOR_CLASSES.primary,\n classNames?.table,\n )}\n />\n </section>\n {/* Horizontal scroll affordance — a soft shadow on each side that still has\n content to scroll to (pure CSS, hidden where unsupported). Pinned to the\n inline edges; a gradient has no logical direction, so `rtl:-scale-x-100`\n mirrors each shadow to fade inward from its own edge. The scroll-driven\n reveal needs no flip: its timeline's progress runs from the inline start\n in either direction. */}\n <div\n aria-hidden=\"true\"\n className=\"table-fade-start pointer-events-none absolute inset-y-0 start-0 w-6 rtl:-scale-x-100\"\n />\n <div\n aria-hidden=\"true\"\n className=\"table-fade-end pointer-events-none absolute inset-y-0 end-0 w-6 rtl:-scale-x-100\"\n />\n {/* The scroller's focus ring, on an overlay that doesn't scroll: a ring on the\n scroller itself is a box-shadow under its own content, hidden by the header\n and footer fills (and by the pinned rows, which are positioned). */}\n <div\n aria-hidden=\"true\"\n className={cn(\n \"pointer-events-none absolute inset-0 z-20\",\n focusStyles({ source: \"peer-focus-visible\", inset: true, offset: false }),\n )}\n />\n </div>\n)\n\nexport type TableHeadProps = HTMLArkProps<\"thead\"> & WithTestId\n\n// Parts are dumb: all styling is driven by the root's descendant selectors, so\n// they just forward a caller className (through `cn` when present).\nconst TableHead = ({ className, testId, ...rest }: TableHeadProps) => (\n <ark.thead\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={className ? cn(className) : undefined}\n />\n)\n\nexport type TableBodyProps = HTMLArkProps<\"tbody\"> & WithTestId\n\nconst TableBody = ({ className, testId, ...rest }: TableBodyProps) => (\n <ark.tbody\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={className ? cn(className) : undefined}\n />\n)\n\nexport type TableFootProps = HTMLArkProps<\"tfoot\"> & WithTestId\n\nconst TableFoot = ({ className, testId, ...rest }: TableFootProps) => (\n <ark.tfoot\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={className ? cn(className) : undefined}\n />\n)\n\nexport type TableRowProps = HTMLArkProps<\"tr\"> & WithTestId\n\nconst TableRow = ({ className, testId, ...rest }: TableRowProps) => (\n <ark.tr\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={className ? cn(className) : undefined}\n />\n)\n\nexport type TableHeaderCellProps = HTMLArkProps<\"th\"> & WithTestId\n\nconst TableHeaderCell = ({ className, scope = \"col\", testId, ...rest }: TableHeaderCellProps) => (\n <ark.th\n scope={scope}\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={className ? cn(className) : undefined}\n />\n)\n\nexport type TableCellProps = HTMLArkProps<\"td\"> & WithTestId\n\nconst TableCell = ({ className, testId, ...rest }: TableCellProps) => (\n <ark.td\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={className ? cn(className) : undefined}\n />\n)\n\nexport const Table = Object.assign(TableRoot, {\n Toolbar: TableToolbar,\n Title: TableTitle,\n Content: TableContent,\n Head: TableHead,\n Body: TableBody,\n Foot: TableFoot,\n Row: TableRow,\n HeaderCell: TableHeaderCell,\n Cell: TableCell,\n})\n"]}
1
+ {"version":3,"sources":["../src/components/table/table.tsx"],"names":[],"mappings":";;;;;;;;AA+BA,IAAM,cAAA,GAAiB,EAAA;AAAA,EACrB,qDAAA;AAAA;AAAA;AAAA,EAGA;AACF,CAAA;AAcA,IAAM,aAAA,GAAgB,GAAA;AAAA,EACpB;AAAA;AAAA,IAEE,2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,SAAA;AAAA,EACN,IAAA,EAAM,SAAA;AAAA,EACN,IAAA,EAAM,SAAA;AAAA,EACN,GAAA,EAAK,QAAA;AAAA,EACL,UAAA,EAAY,eAAA;AAAA,EACZ,IAAA,EAAM;AACR,CAAC","file":"chunk-SVKN5ZHX.js","sourcesContent":["import { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../../lib/cn\"\nimport { focusStyles } from \"../../lib/focus-styles\"\nimport { props } from \"../../lib/props\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { TEXT_COLOR_CLASSES } from \"../../lib/typography-size\"\n\n/**\n * The outermost element: a bordered, rounded surface that `overflow-hidden`\n * clips. Clipping is what keeps the rounded corners intact once the inner\n * scroll region shows a scrollbar (a scrollbar on the *rounded* element would\n * otherwise square off its corners). `flex flex-col` lets an optional\n * `Table.Toolbar` stack above the scroll region.\n *\n * `contain-layout` stops a bug that only shows up when this sits inside an\n * ancestor chain with no *definite* height (e.g. a CSS Grid track sized off\n * `min-height`, not `height` — common when a page fills the viewport via a\n * grid). Without it, a browser can size that indefinite ancestor off this\n * box's unclipped descendants' natural size — the *actual* content behind\n * an internal `overflow-auto`/`max-h-*` scroll region, not its rendered,\n * already-clipped size — inflating the whole page's scroll height in\n * proportion to row count despite this box's own height staying correct.\n * `contain: layout` declares this subtree's size as fully self-contained, so\n * an indefinite ancestor sizes off its real (bounded) box instead. Doesn't\n * affect `stickyHeader`/`stickyFooter` (governed by the nearest *scrolling*\n * ancestor, not containing-block/layout-containment rules) or the absolute-\n * positioned `.table-fade-*` overlays (already resolve against\n * `.table-scroll-frame`'s own `position: relative` in theme.css).\n */\nconst tableContainer = cn(\n \"flex w-full flex-col overflow-hidden contain-layout\",\n // Brand-derived border, matching InputBase/Popover/Modal/Drawer's shell\n // (border-brand-900/20 dark:border-white/15) rather than a neutral gray.\n \"rounded-sm border border-brand-900/20 dark:border-white/15\",\n)\n\n/**\n * All table styling rides on the container as descendant-selector classes, so\n * the part components stay dumb and `size` / `striped` / sticky can live on\n * `<Table>` (the root) without React context — keeping the whole thing a pure\n * Server Component. Every variant value is a static class string so Tailwind\n * v4's scanner keeps it.\n *\n * The `<table>` uses `border-collapse: separate` (see `TableContent`): collapsed\n * borders detach from sticky `<thead>` / `<tfoot>` while scrolling, so the\n * header/footer separators are cell borders (`thead th` bottom, `tfoot td/th`\n * top) that stay put when pinned.\n */\nconst tableVariants = cva(\n [\n // Row separators — on cells, since separate-mode ignores <tr> borders.\n \"[&_tbody_tr:not(:last-child)_td]:border-b\",\n \"[&_tbody_td]:border-brand-900/20 dark:[&_tbody_td]:border-white/15\",\n // Cells\n \"[&_td]:align-middle\",\n \"[&_th]:text-start [&_th]:align-middle [&_th]:font-medium [&_th]:text-brand-950 dark:[&_th]:text-white\",\n // Header — subtle fill + a bottom separator that survives sticky. Same\n // brand-tinted fill Popover/Modal/Drawer use for their own surface, at\n // the same /90 light /85 dark opacity recipe.\n \"[&_thead]:bg-brand-50/90 dark:[&_thead]:bg-brand-950/85\",\n \"[&_thead_th]:border-b [&_thead_th]:border-brand-900/20 dark:[&_thead_th]:border-white/15\",\n // Footer — subtle fill + a top separator that survives sticky.\n \"[&_tfoot]:bg-brand-50/90 dark:[&_tfoot]:bg-brand-950/85 [&_tfoot]:font-medium\",\n \"[&_tfoot_th]:border-t [&_tfoot_td]:border-t\",\n \"[&_tfoot_th]:border-brand-900/20 [&_tfoot_td]:border-brand-900/20 dark:[&_tfoot_th]:border-white/15 dark:[&_tfoot_td]:border-white/15\",\n // Excludes a `data-placeholder` row (an empty/error/loading state, e.g.\n // `DataTable`'s) — it has no row to hover, so it shouldn't tint like one.\n // Black/white wash, same convention as Popover/Menu/TreeSelect's own row\n // highlight — background-dependent instead of a fixed per-theme gray.\n \"[&_tbody_tr:not([data-placeholder]):hover]:bg-black/5! dark:[&_tbody_tr:not([data-placeholder]):hover]:bg-white/8! [&_tbody_tr]:transition-colors\",\n ],\n {\n variants: {\n // Cell padding + text scale, keyed to the kit's canonical `Size` scale.\n size: {\n xs: \"text-xs [&_th]:px-2 [&_td]:px-2 [&_th]:py-1 [&_td]:py-1\",\n sm: \"text-sm [&_th]:px-2.5 [&_td]:px-2.5 [&_th]:py-1.5 [&_td]:py-1.5\",\n md: \"text-sm [&_th]:px-3 [&_td]:px-3 [&_th]:py-2.5 [&_td]:py-2.5\",\n lg: \"text-base [&_th]:px-4 [&_td]:px-4 [&_th]:py-3 [&_td]:py-3\",\n xl: \"text-base [&_th]:px-4 [&_td]:px-4 [&_th]:py-4 [&_td]:py-4\",\n },\n striped: {\n true: \"[&_tbody_tr:nth-child(even)]:bg-black/3 dark:[&_tbody_tr:nth-child(even)]:bg-white/4\",\n false: \"\",\n },\n },\n defaultVariants: { size: \"md\", striped: false },\n },\n)\n\n/** Pin the whole `<thead>` to the top of the scroll region; `backdrop-blur`\n * keeps scrolled body rows legible behind the translucent header fill. */\nconst stickyHeaderClasses =\n \"[&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10 [&_thead]:backdrop-blur-lg\"\n\n/** Pin the whole `<tfoot>` (e.g. a totals row) to the bottom of the scroll region. */\nconst stickyFooterClasses =\n \"[&_tfoot]:sticky [&_tfoot]:bottom-0 [&_tfoot]:z-10 [&_tfoot]:backdrop-blur-lg\"\n\n/** `Table`'s density scale — the kit's canonical `Size` (xs–xl). */\nexport type TableSize = Size\n\nexport type TableProps = HTMLArkProps<\"div\"> &\n VariantProps<typeof tableVariants> &\n WithTestId & {\n /** Pins the header row during vertical scroll. Needs a bounded height —\n * set `max-h-*` on `Table` or `Table.Content`. */\n stickyHeader?: boolean\n /** Pins a `Table.Foot` row (e.g. totals) to the bottom during vertical\n * scroll. Same bounded-height requirement as `stickyHeader`. */\n stickyFooter?: boolean\n }\n\n/**\n * Table — a dumb, styled semantic `<table>` inside a bordered, rounded surface.\n * Pure React Server Component (no `\"use client\"`): static markup, no state, so\n * it's safe in an RSC tree and usable for static / MDX tables. Composed from\n * namespaced parts: an optional non-table header (`Table.Toolbar` +\n * `Table.Title` for a title and actions), a `Table.Content` scroll region that\n * holds the `<table>`, and the semantic parts `Table.Head` / `Table.Body` /\n * `Table.Foot` / `Table.Row` / `Table.HeaderCell` / `Table.Cell`.\n *\n * Density (`size`), `striped`, and `stickyHeader` / `stickyFooter` ride on\n * `<Table>` and style the table via descendant selectors. To pin a header or\n * footer, give the scroll region a bounded height (`max-h-*` on `Table` or\n * `Table.Content`). The rounded border is `overflow-hidden`, so the corners\n * stay intact even once a scrollbar appears. There is no `variant`×`color`\n * axis — a table retints from `:root` slot vars via CSS.\n *\n * <Table striped size=\"sm\" stickyHeader className=\"max-h-80\">\n * <Table.Toolbar>\n * <Table.Title>Users</Table.Title>\n * <Button size=\"sm\">Add</Button>\n * </Table.Toolbar>\n * <Table.Content>\n * <Table.Head>\n * <Table.Row>\n * <Table.HeaderCell>Name</Table.HeaderCell>\n * <Table.HeaderCell className=\"text-right\">Age</Table.HeaderCell>\n * </Table.Row>\n * </Table.Head>\n * <Table.Body>\n * <Table.Row>\n * <Table.Cell>Ada</Table.Cell>\n * <Table.Cell className=\"text-right\">36</Table.Cell>\n * </Table.Row>\n * </Table.Body>\n * </Table.Content>\n * </Table>\n */\nconst TableRoot = ({\n className,\n size,\n striped,\n stickyHeader,\n stickyFooter,\n testId,\n ...rest\n}: TableProps) => (\n <ark.div\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\n tableContainer,\n tableVariants({ size, striped }),\n stickyHeader && stickyHeaderClasses,\n stickyFooter && stickyFooterClasses,\n className,\n )}\n />\n)\n\nexport type TableToolbarProps = HTMLArkProps<\"div\"> & WithTestId\n\n/** Non-`<table>` header bar: a title + actions row above the scroll region,\n * separated by a bottom border. `shrink-0` so it never collapses when the\n * content scrolls. */\nconst TableToolbar = ({ className, testId, ...rest }: TableToolbarProps) => (\n <ark.div\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\n \"flex shrink-0 items-center justify-between gap-2 border-b border-brand-900/20 px-3 ps-5 py-3 dark:border-white/15\",\n className,\n )}\n />\n)\n\nexport type TableTitleProps = HTMLArkProps<\"h3\"> & WithTestId\n\nconst TableTitle = ({ className, testId, ...rest }: TableTitleProps) => (\n <ark.h3\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\"font-semibold tracking-normal\", className)}\n />\n)\n\nexport type TableContentProps = HTMLArkProps<\"table\"> &\n WithTestId & {\n /** Style the inner `<table>` element; `className` targets the scroll region. */\n classNames?: { table?: string }\n }\n\n/** The scroll region + the `<table>`, framed so horizontal scroll affordances\n * (soft edge shadows on each side with more to scroll) can overlay it. `className`\n * bounds the scroll surface (`max-h-*` here bounds a sticky header/footer);\n * `classNames.table` styles the `<table>`. `border-separate` keeps sticky\n * header/footer borders. The `table-scroll-*` / `table-fade-*` classes are the\n * scroll-driven-animation affordance defined in theme.css. */\nconst TableContent = ({ className, classNames, testId, ...rest }: TableContentProps) => (\n <div className={cn(\"table-scroll-frame flex min-h-0 flex-1 flex-col\", className)}>\n <section\n // A scroller must be reachable by keyboard, or arrow keys can't scroll it\n // (axe `scrollable-region-focusable`). Always, not only once it overflows:\n // knowing that would take a layout read, and this part is a Server Component.\n // biome-ignore lint/a11y/noNoninteractiveTabindex: a scroll region must be reachable by keyboard\n tabIndex={0}\n // A `<section>` is a region landmark only once it has a name, and it takes the\n // table's own: name the table (`aria-labelledby` a `Table.Title`'s id) and the\n // region says the same thing. Unnamed, it stays a plain focusable scroller.\n {...props({ \"aria-labelledby\": rest[\"aria-labelledby\"], \"aria-label\": rest[\"aria-label\"] })}\n className=\"peer table-scroll-x min-h-0 w-full flex-1 overflow-auto focus-visible:outline-none\"\n >\n <ark.table\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\n \"w-full border-separate border-spacing-0 text-start\",\n TEXT_COLOR_CLASSES.primary,\n classNames?.table,\n )}\n />\n </section>\n {/* Horizontal scroll affordance — a soft shadow on each side that still has\n content to scroll to (pure CSS, hidden where unsupported). Pinned to the\n inline edges; a gradient has no logical direction, so `rtl:-scale-x-100`\n mirrors each shadow to fade inward from its own edge. The scroll-driven\n reveal needs no flip: its timeline's progress runs from the inline start\n in either direction. */}\n <div\n aria-hidden=\"true\"\n className=\"table-fade-start pointer-events-none absolute inset-y-0 start-0 w-6 rtl:-scale-x-100\"\n />\n <div\n aria-hidden=\"true\"\n className=\"table-fade-end pointer-events-none absolute inset-y-0 end-0 w-6 rtl:-scale-x-100\"\n />\n {/* The scroller's focus ring, on an overlay that doesn't scroll: a ring on the\n scroller itself is a box-shadow under its own content, hidden by the header\n and footer fills (and by the pinned rows, which are positioned). */}\n <div\n aria-hidden=\"true\"\n className={cn(\n \"pointer-events-none absolute inset-0 z-20\",\n focusStyles({ source: \"peer-focus-visible\", inset: true, offset: false }),\n )}\n />\n </div>\n)\n\nexport type TableHeadProps = HTMLArkProps<\"thead\"> & WithTestId\n\n// Parts are dumb: all styling is driven by the root's descendant selectors, so\n// they just forward a caller className (through `cn` when present).\nconst TableHead = ({ className, testId, ...rest }: TableHeadProps) => (\n <ark.thead\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={className ? cn(className) : undefined}\n />\n)\n\nexport type TableBodyProps = HTMLArkProps<\"tbody\"> & WithTestId\n\nconst TableBody = ({ className, testId, ...rest }: TableBodyProps) => (\n <ark.tbody\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={className ? cn(className) : undefined}\n />\n)\n\nexport type TableFootProps = HTMLArkProps<\"tfoot\"> & WithTestId\n\nconst TableFoot = ({ className, testId, ...rest }: TableFootProps) => (\n <ark.tfoot\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={className ? cn(className) : undefined}\n />\n)\n\nexport type TableRowProps = HTMLArkProps<\"tr\"> & WithTestId\n\nconst TableRow = ({ className, testId, ...rest }: TableRowProps) => (\n <ark.tr\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={className ? cn(className) : undefined}\n />\n)\n\nexport type TableHeaderCellProps = HTMLArkProps<\"th\"> & WithTestId\n\nconst TableHeaderCell = ({ className, scope = \"col\", testId, ...rest }: TableHeaderCellProps) => (\n <ark.th\n scope={scope}\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={className ? cn(className) : undefined}\n />\n)\n\nexport type TableCellProps = HTMLArkProps<\"td\"> & WithTestId\n\nconst TableCell = ({ className, testId, ...rest }: TableCellProps) => (\n <ark.td\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={className ? cn(className) : undefined}\n />\n)\n\nexport const Table = Object.assign(TableRoot, {\n Toolbar: TableToolbar,\n Title: TableTitle,\n Content: TableContent,\n Head: TableHead,\n Body: TableBody,\n Foot: TableFoot,\n Row: TableRow,\n HeaderCell: TableHeaderCell,\n Cell: TableCell,\n})\n"]}
@@ -1,8 +1,8 @@
1
- import { Spinner } from './chunk-HVOEVB4E.js';
1
+ import { Spinner } from './chunk-D2QIPQ74.js';
2
2
  import { withAsChildContent } from './chunk-R5LYFTHA.js';
3
3
  import { props } from './chunk-WYCMIIRR.js';
4
- import { focusStyles } from './chunk-3REFDGOM.js';
5
- import { cn } from './chunk-QP4I37PA.js';
4
+ import { focusStyles } from './chunk-C6NVU4F7.js';
5
+ import { cn } from './chunk-4ASNIDV7.js';
6
6
  import { ark } from '@ark-ui/react';
7
7
  import { cva } from 'class-variance-authority';
8
8
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -172,5 +172,5 @@ var Button = ({
172
172
  };
173
173
 
174
174
  export { Button };
175
- //# sourceMappingURL=chunk-NJ4RO3CT.js.map
176
- //# sourceMappingURL=chunk-NJ4RO3CT.js.map
175
+ //# sourceMappingURL=chunk-SWVUXEBT.js.map
176
+ //# sourceMappingURL=chunk-SWVUXEBT.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/button/button.tsx"],"names":[],"mappings":";;;;;;;;;AAsEA,IAAM,cAAA,GAAiB,GAAA;AAAA,EACrB;AAAA,IACE,yCAAA;AAAA,I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B,GAAI;AAAA,OAC/C,GACA,QAAQ,QAAQ;AAAA;AAAA,GACtB;AAEJ","file":"chunk-NJ4RO3CT.js","sourcesContent":["\"use client\"\n\nimport { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport type { MouseEvent, ReactNode } from \"react\"\nimport { withAsChildContent } from \"../../lib/as-child\"\nimport { cn } from \"../../lib/cn\"\nimport type { Color } from \"../../lib/colors\"\nimport { focusStyles } from \"../../lib/focus-styles\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { Spinner } from \"../spinner/spinner\"\n\n/**\n * Button — interactive but stateless primitive.\n *\n * The new (variant × color) model splits visual treatment from accent palette:\n * - `variant` picks the shape (filled / light / outline / subtle)\n * - `color` picks the palette (brand / gray / neutral / red / orange / …)\n *\n * Color is delivered through CSS variables: the component writes a\n * `data-color=\"…\"` attribute and the global rules in `colors.css` resolve\n * `--c-solid`, `--c-soft`, `--c-text` etc. for both light and dark mode. So\n * the cva matrix only enumerates variants, not (variant × color) pairs.\n * When `color` is omitted, no `data-color` attribute is rendered and the\n * slot vars cascade from `:root` — which mirrors `neutral` — so the\n * zero-config `<Button>` renders `filled` · `neutral`. Consumers retheme the\n * default for the whole app by overriding the slot vars at `:root`, no JS\n * required.\n *\n * `asChild` (inherited from `HTMLArkProps`) renders the single child element\n * with Button's styling merged in. Ark's factory clones exactly one element,\n * so only one element can survive the swap — `startSlot`/`endSlot` and the\n * `loading` spinner are folded into *that* element's own children\n * (`withAsChildContent`, `lib/as-child.ts`) rather than rendered as siblings,\n * so they keep showing up even when the child is a link. Common case:\n * `<Button asChild startSlot={<Icon />}><a ...>Go</a></Button>`.\n *\n * `loading` never changes the button's size or moves its label. Nothing\n * leaves the layout; the spinner morphs into a place that is already there:\n * - with a `startSlot`, the spinner is stacked on the icon in the same grid\n * cell and the two crossfade (`LoadingSlot`); the label and any `endSlot`\n * stay put;\n * - with only an `endSlot`, the same morph happens in the end slot;\n * - with no slot, the label stays laid out (so it still sizes the button)\n * while it fades and lifts away, and the spinner fades up into an\n * overlay centred over it (`LoadingLabel`).\n * The cell and the label keep their idle size, so the button is sized by its\n * idle content — CSS only, nothing measured. The spinner is mounted whenever\n * the `loading` prop is *passed* (true or false), so the fade has a state to\n * start from, and its rotation is paused while idle so a page of idle buttons\n * runs no animations; a button that never passes `loading` renders no\n * spinner at all. Under `motion-reduce` the swap is instant; the spinner\n * itself still turns.\n *\n * A loading button keeps full contrast — dimming it would read as\n * `disabled`. `disabled` alone still dims (`not-data-loading:` scopes the\n * `:disabled` dim off, since `resolvedDisabled` sets native `disabled` for\n * `loading` too).\n *\n * `loading` doesn't use `pointer-events-none` to block interaction — that\n * also blocks `:hover`, which would make `cursor-progress` unreachable by a\n * real mouse. Instead native `disabled` handles a real `<button>` (the\n * `disabled:pointer-events-none` rule is scoped off while loading via\n * `not-data-loading:` for the same reason as the dim), and an explicit\n * `onClick` guard (`preventWhileLoading`) handles an arbitrary `asChild`\n * element, which `disabled` doesn't affect. `cursor-progress` and the hover\n * suppression are keyed off `data-loading` rather than `:disabled`, which\n * never matches a non-form element like an `<a>`.\n */\nconst buttonVariants = cva(\n [\n \"inline-flex items-center justify-center\",\n \"whitespace-nowrap select-none\",\n \"font-medium uppercase tracking-wide\",\n \"no-underline\",\n \"rounded-button border border-transparent\",\n \"transition-colors-radius\",\n focusStyles(),\n \"disabled:not-data-loading:pointer-events-none disabled:not-data-loading:opacity-50\",\n \"data-disabled:pointer-events-none data-disabled:opacity-50\",\n \"not-data-loading:hover:cursor-pointer\",\n \"data-loading:cursor-progress\",\n \"[&_svg]:shrink-0 [&_svg]:pointer-events-none\",\n ],\n {\n variants: {\n variant: {\n filled: [\n \"bg-(--c-solid) text-(--c-on-solid)\",\n \"not-data-loading:hover:bg-(--c-solid-hover)\",\n ],\n light: [\n \"bg-(--c-soft) text-(--c-text) border-(--c-soft-hover)\",\n \"not-data-loading:hover:bg-(--c-soft-hover) not-data-loading:hover:border-(--c-solid)\",\n ],\n outline: [\n \"bg-transparent text-(--c-text) border-(--c-solid)\",\n \"not-data-loading:hover:bg-(--c-soft)\",\n ],\n subtle: [\"bg-transparent text-(--c-text)\", \"not-data-loading:hover:bg-(--c-soft)\"],\n },\n size: {\n xs: \"h-7 px-2 text-xs [&_svg]:size-3 gap-1\",\n sm: \"h-8 px-3 text-sm [&_svg]:size-3.5 gap-1.5\",\n md: \"h-9 px-4 text-md [&_svg]:size-4 gap-2\",\n lg: \"h-10 px-4 text-lg [&_svg]:size-5 gap-3\",\n xl: \"h-12 px-5 text-xl [&_svg]:size-6 gap-3\",\n },\n },\n defaultVariants: {\n variant: \"filled\",\n size: \"md\",\n },\n },\n)\n\nconst startSlotVariants = cva(\"inline-flex shrink-0 items-center\", {\n variants: {\n size: {\n xs: \"-ms-0.5\",\n sm: \"-ms-1\",\n md: \"-ms-2\",\n lg: \"-ms-2.5\",\n xl: \"-ms-3\",\n },\n },\n})\nconst endSlotVariants = cva(\"inline-flex shrink-0 items-center\", {\n variants: {\n size: {\n xs: \"-me-0.5\",\n sm: \"-me-1\",\n md: \"-me-2\",\n lg: \"-me-2.5\",\n xl: \"-me-3\",\n },\n },\n})\n\nexport type ButtonVariant = NonNullable<VariantProps<typeof buttonVariants>[\"variant\"]>\nexport type ButtonSize = NonNullable<VariantProps<typeof buttonVariants>[\"size\"]>\n\nexport type ButtonProps = Omit<HTMLArkProps<\"button\">, \"color\"> &\n VariantProps<typeof buttonVariants> &\n WithTestId & {\n /** Accent palette. Re-exported as `Color` from `@42/ui-react`. */\n color?: Color\n /**\n * Show a spinner and mark the button as busy + non-interactive, without\n * changing its size: the spinner crossfades in place of `startSlot` (or\n * `endSlot` when there is no `startSlot`), or over the label when there\n * is no slot. Use for async submit handlers.\n */\n loading?: boolean\n /**\n * Optional element rendered at the inline-start of the children (e.g. an\n * icon) — left in LTR, right in RTL. Hidden from assistive tech via\n * `aria-hidden`.\n */\n startSlot?: ReactNode\n /**\n * Optional element rendered at the inline-end of the children — right in\n * LTR, left in RTL. `aria-hidden`.\n */\n endSlot?: ReactNode\n }\n\nconst HiddenSlot = ({ children, className }: { children: ReactNode; className?: string }) => (\n <span\n aria-hidden=\"true\"\n className={cn(\"inline-flex shrink-0 items-center justify-center\", className)}\n >\n {children}\n </span>\n)\n\n/** Both layers of a loading morph share one grid cell, so the cell is as big\n * as the larger of the two and swapping them can't move anything. */\nconst morphLayer = \"col-start-1 row-start-1 transition-morph motion-reduce:transition-none\"\n\n/** The spinner's own rotation runs only while it is showing; paused (not\n * removed) so it fades out from where it was rather than snapping back. */\nconst LoadingSpinner = ({ loading }: { loading: boolean }) => (\n <Spinner label={null} className={loading ? undefined : \"[animation-play-state:paused]\"} />\n)\n\n/**\n * A slot's icon and the spinner stacked in place: the icon shrinks and fades\n * out as the spinner grows and fades in, inside a cell that keeps its size.\n */\nconst LoadingSlot = ({ loading, children }: { loading: boolean; children: ReactNode }) => (\n <span className=\"inline-grid place-items-center\">\n <span className={cn(morphLayer, \"inline-flex\", loading && \"scale-50 opacity-0\")}>\n {children}\n </span>\n <span className={cn(morphLayer, \"inline-flex\", !loading && \"scale-50 opacity-0\")}>\n <LoadingSpinner loading={loading} />\n </span>\n </span>\n)\n\n/**\n * No slot to morph in: the label stays laid out (it still sizes the button)\n * while it fades and lifts away, and the spinner rises into an overlay over\n * the whole button — the root is `relative` for it. The label wrapper\n * inherits the root's `gap`, so children with several nodes keep their\n * spacing.\n */\nconst LoadingLabel = ({ loading, children }: { loading: boolean; children: ReactNode }) => (\n <>\n <span\n className={cn(\n morphLayer,\n \"inline-flex items-center justify-center gap-[inherit]\",\n loading && \"-translate-y-1 opacity-0\",\n )}\n >\n {children}\n </span>\n <span\n aria-hidden=\"true\"\n className={cn(\n \"pointer-events-none absolute inset-0 grid place-items-center\",\n \"transition-morph motion-reduce:transition-none\",\n !loading && \"translate-y-1 opacity-0\",\n )}\n >\n <LoadingSpinner loading={loading} />\n </span>\n </>\n)\n\n/**\n * Swallows the click while `loading`. Native `disabled` already blocks\n * interaction on a real `<button>` with or without this, but it's a no-op\n * on an arbitrary `asChild` element (e.g. an `<a>`) — that's the one case\n * this actually needs to do something. A stable module-level reference so\n * it never causes the clone below to look \"changed\" across renders.\n */\nconst preventWhileLoading = (event: MouseEvent) => {\n event.preventDefault()\n event.stopPropagation()\n}\n\nexport const Button = ({\n className,\n variant,\n size,\n color,\n loading: loadingProp,\n startSlot,\n endSlot,\n children,\n disabled,\n type,\n asChild,\n testId,\n onClick,\n ...rest\n}: ButtonProps) => {\n const loading = loadingProp ?? false\n // Passing `loading` at all (even `false`) opts into the spinner layers, so\n // the first switch to `true` already has a from-state to fade from.\n const loadable = loadingProp !== undefined\n // Where the spinner morphs: the start slot, else the end slot, else over\n // the label.\n const morph = !loadable ? null : startSlot ? \"start\" : endSlot ? \"end\" : \"label\"\n const resolvedDisabled = disabled || loading\n const resolvedOnClick = loading ? preventWhileLoading : onClick\n const content = (own: ReactNode) => (\n <>\n {startSlot && (\n <HiddenSlot className={startSlotVariants({ size })}>\n {morph === \"start\" ? <LoadingSlot loading={loading}>{startSlot}</LoadingSlot> : startSlot}\n </HiddenSlot>\n )}\n {morph === \"label\" ? <LoadingLabel loading={loading}>{own}</LoadingLabel> : own}\n {endSlot && (\n <HiddenSlot className={endSlotVariants({ size })}>\n {morph === \"end\" ? <LoadingSlot loading={loading}>{endSlot}</LoadingSlot> : endSlot}\n </HiddenSlot>\n )}\n </>\n )\n\n return (\n <ark.button\n asChild={asChild}\n type={asChild ? type : (type ?? \"button\")}\n disabled={resolvedDisabled}\n data-color={color}\n data-variant={variant ?? \"filled\"}\n data-size={size ?? \"md\"}\n className={cn(buttonVariants({ variant, size }), morph === \"label\" && \"relative\", className)}\n onClick={resolvedOnClick}\n {...props({\n \"aria-busy\": loading,\n \"aria-disabled\": resolvedDisabled,\n \"data-loading\": loading,\n \"data-testid\": testId,\n })}\n {...rest}\n >\n {asChild\n ? withAsChildContent(\n children,\n content,\n loading ? { onClick: preventWhileLoading } : undefined,\n )\n : content(children)}\n </ark.button>\n )\n}\n"]}
1
+ {"version":3,"sources":["../src/components/button/button.tsx"],"names":[],"mappings":";;;;;;;;;AAsEA,IAAM,cAAA,GAAiB,GAAA;AAAA,EACrB;AAAA,IACE,yCAAA;AAAA,IACA,+BAAA;AAAA,IACA,qCAAA;AAAA,IACA,cAAA;AAAA,IACA,0CAAA;AAAA,IACA,0BAAA;AAAA,IACA,WAAA,EAAY;AAAA,IACZ,oFAAA;AAAA,IACA,4DAAA;AAAA,IACA,uCAAA;AAAA,IACA,8BAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,MAAA,EAAQ;AAAA,UACN,oCAAA;AAAA,UACA;AAAA,SACF;AAAA,QACA,KAAA,EAAO;AAAA,UACL,uDAAA;AAAA,UACA;AAAA,SACF;AAAA,QACA,OAAA,EAAS;AAAA,UACP,mDAAA;AAAA,UACA;AAAA,SACF;AAAA,QACA,MAAA,EAAQ,CAAC,gCAAA,EAAkC,sCAAsC;AAAA,OACnF;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,EAAA,EAAI,uCAAA;AAAA,QACJ,EAAA,EAAI,2CAAA;AAAA,QACJ,EAAA,EAAI,uCAAA;AAAA,QACJ,EAAA,EAAI,wCAAA;AAAA,QACJ,EAAA,EAAI;AAAA;AACN,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,OAAA,EAAS,QAAA;AAAA,MACT,IAAA,EAAM;AAAA;AACR;AAEJ,CAAA;AAEA,IAAM,iBAAA,GAAoB,IAAI,mCAAA,EAAqC;AAAA,EACjE,QAAA,EAAU;AAAA,IACR,IAAA,EAAM;AAAA,MACJ,EAAA,EAAI,SAAA;AAAA,MACJ,EAAA,EAAI,OAAA;AAAA,MACJ,EAAA,EAAI,OAAA;AAAA,MACJ,EAAA,EAAI,SAAA;AAAA,MACJ,EAAA,EAAI;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A;AAAA,QAChB,aAAA,EAAe;AAAA,OAChB,CAAA;AAAA,MACA,GAAG,IAAA;AAAA,MAEH,QAAA,EAAA,OAAA,GACG,kBAAA;AAAA,QACE,QAAA;AAAA,QACA,OAAA;AAAA,QACA,OAAA,GAAU,EAAE,OAAA,EAAS,mBAAA,EAAoB,GAAI;AAAA,OAC/C,GACA,QAAQ,QAAQ;AAAA;AAAA,GACtB;AAEJ","file":"chunk-SWVUXEBT.js","sourcesContent":["\"use client\"\n\nimport { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport type { MouseEvent, ReactNode } from \"react\"\nimport { withAsChildContent } from \"../../lib/as-child\"\nimport { cn } from \"../../lib/cn\"\nimport type { Color } from \"../../lib/colors\"\nimport { focusStyles } from \"../../lib/focus-styles\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { Spinner } from \"../spinner/spinner\"\n\n/**\n * Button — interactive but stateless primitive.\n *\n * The new (variant × color) model splits visual treatment from accent palette:\n * - `variant` picks the shape (filled / light / outline / subtle)\n * - `color` picks the palette (brand / gray / neutral / red / orange / …)\n *\n * Color is delivered through CSS variables: the component writes a\n * `data-color=\"…\"` attribute and the global rules in `colors.css` resolve\n * `--c-solid`, `--c-soft`, `--c-text` etc. for both light and dark mode. So\n * the cva matrix only enumerates variants, not (variant × color) pairs.\n * When `color` is omitted, no `data-color` attribute is rendered and the\n * slot vars cascade from `:root` — which mirrors `neutral` — so the\n * zero-config `<Button>` renders `filled` · `neutral`. Consumers retheme the\n * default for the whole app by overriding the slot vars at `:root`, no JS\n * required.\n *\n * `asChild` (inherited from `HTMLArkProps`) renders the single child element\n * with Button's styling merged in. Ark's factory clones exactly one element,\n * so only one element can survive the swap — `startSlot`/`endSlot` and the\n * `loading` spinner are folded into *that* element's own children\n * (`withAsChildContent`, `lib/as-child.ts`) rather than rendered as siblings,\n * so they keep showing up even when the child is a link. Common case:\n * `<Button asChild startSlot={<Icon />}><a ...>Go</a></Button>`.\n *\n * `loading` never changes the button's size or moves its label. Nothing\n * leaves the layout; the spinner morphs into a place that is already there:\n * - with a `startSlot`, the spinner is stacked on the icon in the same grid\n * cell and the two crossfade (`LoadingSlot`); the label and any `endSlot`\n * stay put;\n * - with only an `endSlot`, the same morph happens in the end slot;\n * - with no slot, the label stays laid out (so it still sizes the button)\n * while it fades and lifts away, and the spinner fades up into an\n * overlay centred over it (`LoadingLabel`).\n * The cell and the label keep their idle size, so the button is sized by its\n * idle content — CSS only, nothing measured. The spinner is mounted whenever\n * the `loading` prop is *passed* (true or false), so the fade has a state to\n * start from, and its rotation is paused while idle so a page of idle buttons\n * runs no animations; a button that never passes `loading` renders no\n * spinner at all. Under `motion-reduce` the swap is instant; the spinner\n * itself still turns.\n *\n * A loading button keeps full contrast — dimming it would read as\n * `disabled`. `disabled` alone still dims (`not-data-loading:` scopes the\n * `:disabled` dim off, since `resolvedDisabled` sets native `disabled` for\n * `loading` too).\n *\n * `loading` doesn't use `pointer-events-none` to block interaction — that\n * also blocks `:hover`, which would make `cursor-progress` unreachable by a\n * real mouse. Instead native `disabled` handles a real `<button>` (the\n * `disabled:pointer-events-none` rule is scoped off while loading via\n * `not-data-loading:` for the same reason as the dim), and an explicit\n * `onClick` guard (`preventWhileLoading`) handles an arbitrary `asChild`\n * element, which `disabled` doesn't affect. `cursor-progress` and the hover\n * suppression are keyed off `data-loading` rather than `:disabled`, which\n * never matches a non-form element like an `<a>`.\n */\nconst buttonVariants = cva(\n [\n \"inline-flex items-center justify-center\",\n \"whitespace-nowrap select-none\",\n \"font-medium uppercase tracking-wide\",\n \"no-underline\",\n \"rounded-button border border-transparent\",\n \"transition-colors-radius\",\n focusStyles(),\n \"disabled:not-data-loading:pointer-events-none disabled:not-data-loading:opacity-50\",\n \"data-disabled:pointer-events-none data-disabled:opacity-50\",\n \"not-data-loading:hover:cursor-pointer\",\n \"data-loading:cursor-progress\",\n \"[&_svg]:shrink-0 [&_svg]:pointer-events-none\",\n ],\n {\n variants: {\n variant: {\n filled: [\n \"bg-(--c-solid) text-(--c-on-solid)\",\n \"not-data-loading:hover:bg-(--c-solid-hover)\",\n ],\n light: [\n \"bg-(--c-soft) text-(--c-text) border-(--c-soft-hover)\",\n \"not-data-loading:hover:bg-(--c-soft-hover) not-data-loading:hover:border-(--c-solid)\",\n ],\n outline: [\n \"bg-transparent text-(--c-text) border-(--c-solid)\",\n \"not-data-loading:hover:bg-(--c-soft)\",\n ],\n subtle: [\"bg-transparent text-(--c-text)\", \"not-data-loading:hover:bg-(--c-soft)\"],\n },\n size: {\n xs: \"h-7 px-2 text-xs [&_svg]:size-3 gap-1\",\n sm: \"h-8 px-3 text-sm [&_svg]:size-3.5 gap-1.5\",\n md: \"h-9 px-4 text-md [&_svg]:size-4 gap-2\",\n lg: \"h-10 px-4 text-lg [&_svg]:size-5 gap-3\",\n xl: \"h-12 px-5 text-xl [&_svg]:size-6 gap-3\",\n },\n },\n defaultVariants: {\n variant: \"filled\",\n size: \"md\",\n },\n },\n)\n\nconst startSlotVariants = cva(\"inline-flex shrink-0 items-center\", {\n variants: {\n size: {\n xs: \"-ms-0.5\",\n sm: \"-ms-1\",\n md: \"-ms-2\",\n lg: \"-ms-2.5\",\n xl: \"-ms-3\",\n },\n },\n})\nconst endSlotVariants = cva(\"inline-flex shrink-0 items-center\", {\n variants: {\n size: {\n xs: \"-me-0.5\",\n sm: \"-me-1\",\n md: \"-me-2\",\n lg: \"-me-2.5\",\n xl: \"-me-3\",\n },\n },\n})\n\nexport type ButtonVariant = NonNullable<VariantProps<typeof buttonVariants>[\"variant\"]>\nexport type ButtonSize = NonNullable<VariantProps<typeof buttonVariants>[\"size\"]>\n\nexport type ButtonProps = Omit<HTMLArkProps<\"button\">, \"color\"> &\n VariantProps<typeof buttonVariants> &\n WithTestId & {\n /** Accent palette. Re-exported as `Color` from `@42/ui-react`. */\n color?: Color\n /**\n * Show a spinner and mark the button as busy + non-interactive, without\n * changing its size: the spinner crossfades in place of `startSlot` (or\n * `endSlot` when there is no `startSlot`), or over the label when there\n * is no slot. Use for async submit handlers.\n */\n loading?: boolean\n /**\n * Optional element rendered at the inline-start of the children (e.g. an\n * icon) — left in LTR, right in RTL. Hidden from assistive tech via\n * `aria-hidden`.\n */\n startSlot?: ReactNode\n /**\n * Optional element rendered at the inline-end of the children — right in\n * LTR, left in RTL. `aria-hidden`.\n */\n endSlot?: ReactNode\n }\n\nconst HiddenSlot = ({ children, className }: { children: ReactNode; className?: string }) => (\n <span\n aria-hidden=\"true\"\n className={cn(\"inline-flex shrink-0 items-center justify-center\", className)}\n >\n {children}\n </span>\n)\n\n/** Both layers of a loading morph share one grid cell, so the cell is as big\n * as the larger of the two and swapping them can't move anything. */\nconst morphLayer = \"col-start-1 row-start-1 transition-morph motion-reduce:transition-none\"\n\n/** The spinner's own rotation runs only while it is showing; paused (not\n * removed) so it fades out from where it was rather than snapping back. */\nconst LoadingSpinner = ({ loading }: { loading: boolean }) => (\n <Spinner label={null} className={loading ? undefined : \"[animation-play-state:paused]\"} />\n)\n\n/**\n * A slot's icon and the spinner stacked in place: the icon shrinks and fades\n * out as the spinner grows and fades in, inside a cell that keeps its size.\n */\nconst LoadingSlot = ({ loading, children }: { loading: boolean; children: ReactNode }) => (\n <span className=\"inline-grid place-items-center\">\n <span className={cn(morphLayer, \"inline-flex\", loading && \"scale-50 opacity-0\")}>\n {children}\n </span>\n <span className={cn(morphLayer, \"inline-flex\", !loading && \"scale-50 opacity-0\")}>\n <LoadingSpinner loading={loading} />\n </span>\n </span>\n)\n\n/**\n * No slot to morph in: the label stays laid out (it still sizes the button)\n * while it fades and lifts away, and the spinner rises into an overlay over\n * the whole button — the root is `relative` for it. The label wrapper\n * inherits the root's `gap`, so children with several nodes keep their\n * spacing.\n */\nconst LoadingLabel = ({ loading, children }: { loading: boolean; children: ReactNode }) => (\n <>\n <span\n className={cn(\n morphLayer,\n \"inline-flex items-center justify-center gap-[inherit]\",\n loading && \"-translate-y-1 opacity-0\",\n )}\n >\n {children}\n </span>\n <span\n aria-hidden=\"true\"\n className={cn(\n \"pointer-events-none absolute inset-0 grid place-items-center\",\n \"transition-morph motion-reduce:transition-none\",\n !loading && \"translate-y-1 opacity-0\",\n )}\n >\n <LoadingSpinner loading={loading} />\n </span>\n </>\n)\n\n/**\n * Swallows the click while `loading`. Native `disabled` already blocks\n * interaction on a real `<button>` with or without this, but it's a no-op\n * on an arbitrary `asChild` element (e.g. an `<a>`) — that's the one case\n * this actually needs to do something. A stable module-level reference so\n * it never causes the clone below to look \"changed\" across renders.\n */\nconst preventWhileLoading = (event: MouseEvent) => {\n event.preventDefault()\n event.stopPropagation()\n}\n\nexport const Button = ({\n className,\n variant,\n size,\n color,\n loading: loadingProp,\n startSlot,\n endSlot,\n children,\n disabled,\n type,\n asChild,\n testId,\n onClick,\n ...rest\n}: ButtonProps) => {\n const loading = loadingProp ?? false\n // Passing `loading` at all (even `false`) opts into the spinner layers, so\n // the first switch to `true` already has a from-state to fade from.\n const loadable = loadingProp !== undefined\n // Where the spinner morphs: the start slot, else the end slot, else over\n // the label.\n const morph = !loadable ? null : startSlot ? \"start\" : endSlot ? \"end\" : \"label\"\n const resolvedDisabled = disabled || loading\n const resolvedOnClick = loading ? preventWhileLoading : onClick\n const content = (own: ReactNode) => (\n <>\n {startSlot && (\n <HiddenSlot className={startSlotVariants({ size })}>\n {morph === \"start\" ? <LoadingSlot loading={loading}>{startSlot}</LoadingSlot> : startSlot}\n </HiddenSlot>\n )}\n {morph === \"label\" ? <LoadingLabel loading={loading}>{own}</LoadingLabel> : own}\n {endSlot && (\n <HiddenSlot className={endSlotVariants({ size })}>\n {morph === \"end\" ? <LoadingSlot loading={loading}>{endSlot}</LoadingSlot> : endSlot}\n </HiddenSlot>\n )}\n </>\n )\n\n return (\n <ark.button\n asChild={asChild}\n type={asChild ? type : (type ?? \"button\")}\n disabled={resolvedDisabled}\n data-color={color}\n data-variant={variant ?? \"filled\"}\n data-size={size ?? \"md\"}\n className={cn(buttonVariants({ variant, size }), morph === \"label\" && \"relative\", className)}\n onClick={resolvedOnClick}\n {...props({\n \"aria-busy\": loading,\n \"aria-disabled\": resolvedDisabled,\n \"data-loading\": loading,\n \"data-testid\": testId,\n })}\n {...rest}\n >\n {asChild\n ? withAsChildContent(\n children,\n content,\n loading ? { onClick: preventWhileLoading } : undefined,\n )\n : content(children)}\n </ark.button>\n )\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import { props } from './chunk-WYCMIIRR.js';
2
- import { cn } from './chunk-QP4I37PA.js';
2
+ import { cn } from './chunk-4ASNIDV7.js';
3
3
  import { cva } from 'class-variance-authority';
4
4
  import { jsxs, jsx } from 'react/jsx-runtime';
5
5
 
@@ -102,5 +102,5 @@ var Skeleton = ({
102
102
  };
103
103
 
104
104
  export { Skeleton };
105
- //# sourceMappingURL=chunk-GGT4GJD6.js.map
106
- //# sourceMappingURL=chunk-GGT4GJD6.js.map
105
+ //# sourceMappingURL=chunk-TWNIAF7K.js.map
106
+ //# sourceMappingURL=chunk-TWNIAF7K.js.map