@42-central/ui-react 0.29.0 → 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (591) hide show
  1. package/dist/{chunk-X6DESK37.js → chunk-2RRTT4AF.js} +17 -5
  2. package/dist/chunk-2RRTT4AF.js.map +1 -0
  3. package/dist/{chunk-TUP7WXQE.js → chunk-322I2RSV.js} +9 -6
  4. package/dist/chunk-322I2RSV.js.map +1 -0
  5. package/dist/{chunk-ISX3AM32.js → chunk-37SRSNLJ.js} +4 -4
  6. package/dist/{chunk-ISX3AM32.js.map → chunk-37SRSNLJ.js.map} +1 -1
  7. package/dist/{chunk-L5GH7LLD.js → chunk-3MFWUG5O.js} +4 -4
  8. package/dist/{chunk-L5GH7LLD.js.map → chunk-3MFWUG5O.js.map} +1 -1
  9. package/dist/{chunk-FQJNQW3G.js → chunk-3XQEOJCE.js} +8 -5
  10. package/dist/chunk-3XQEOJCE.js.map +1 -0
  11. package/dist/{chunk-JKFPRQB2.js → chunk-4LSZ5JWF.js} +3 -3
  12. package/dist/{chunk-JKFPRQB2.js.map → chunk-4LSZ5JWF.js.map} +1 -1
  13. package/dist/{chunk-V2QZG4IT.js → chunk-5HWFYYHW.js} +27 -9
  14. package/dist/chunk-5HWFYYHW.js.map +1 -0
  15. package/dist/{chunk-GEZYGBXY.js → chunk-6MVFCS46.js} +99 -42
  16. package/dist/chunk-6MVFCS46.js.map +1 -0
  17. package/dist/{chunk-NNPSBC7O.js → chunk-6WZSUS3U.js} +10 -9
  18. package/dist/chunk-6WZSUS3U.js.map +1 -0
  19. package/dist/chunk-6YRGP6PS.js +138 -0
  20. package/dist/chunk-6YRGP6PS.js.map +1 -0
  21. package/dist/{chunk-B5YHYI7E.js → chunk-ALANKV5Y.js} +23 -6
  22. package/dist/chunk-ALANKV5Y.js.map +1 -0
  23. package/dist/{chunk-IA6DCC3N.js → chunk-AUQPNDE5.js} +23 -13
  24. package/dist/chunk-AUQPNDE5.js.map +1 -0
  25. package/dist/{chunk-AKXALCUN.js → chunk-D7SW2E24.js} +4 -4
  26. package/dist/chunk-D7SW2E24.js.map +1 -0
  27. package/dist/{chunk-OXR7BXZA.js → chunk-DQIYYDFD.js} +4 -3
  28. package/dist/chunk-DQIYYDFD.js.map +1 -0
  29. package/dist/{chunk-HMNXNKDA.js → chunk-FCBYUN6F.js} +4 -4
  30. package/dist/{chunk-HMNXNKDA.js.map → chunk-FCBYUN6F.js.map} +1 -1
  31. package/dist/{chunk-2W7H43WL.js → chunk-FED6SJWM.js} +23 -14
  32. package/dist/chunk-FED6SJWM.js.map +1 -0
  33. package/dist/{chunk-7E7JNWOC.js → chunk-FEPIHXVI.js} +6 -5
  34. package/dist/chunk-FEPIHXVI.js.map +1 -0
  35. package/dist/{chunk-Y57NW6G7.js → chunk-G3YOSG3U.js} +4 -4
  36. package/dist/{chunk-Y57NW6G7.js.map → chunk-G3YOSG3U.js.map} +1 -1
  37. package/dist/chunk-GZN5CXMR.js +100 -0
  38. package/dist/chunk-GZN5CXMR.js.map +1 -0
  39. package/dist/{chunk-HCHGERDB.js → chunk-HCSZPBWV.js} +17 -115
  40. package/dist/chunk-HCSZPBWV.js.map +1 -0
  41. package/dist/{chunk-I4B3N3UX.js → chunk-HTVICHT4.js} +12 -7
  42. package/dist/chunk-HTVICHT4.js.map +1 -0
  43. package/dist/chunk-I7TC2C3I.js +163 -0
  44. package/dist/chunk-I7TC2C3I.js.map +1 -0
  45. package/dist/{chunk-7FPSQBWB.js → chunk-IBXYLO2J.js} +14 -13
  46. package/dist/chunk-IBXYLO2J.js.map +1 -0
  47. package/dist/{chunk-7KFUFAVP.js → chunk-IRYG6B5A.js} +9 -8
  48. package/dist/chunk-IRYG6B5A.js.map +1 -0
  49. package/dist/{chunk-2RQLPN4U.js → chunk-JCNEW4WJ.js} +8 -8
  50. package/dist/{chunk-2RQLPN4U.js.map → chunk-JCNEW4WJ.js.map} +1 -1
  51. package/dist/{chunk-SP6LCCTZ.js → chunk-KZDMVOL6.js} +35 -8
  52. package/dist/chunk-KZDMVOL6.js.map +1 -0
  53. package/dist/chunk-LR5U6TZZ.js +169 -0
  54. package/dist/chunk-LR5U6TZZ.js.map +1 -0
  55. package/dist/{chunk-MQHD3EJE.js → chunk-LZHZJWVM.js} +6 -4
  56. package/dist/chunk-LZHZJWVM.js.map +1 -0
  57. package/dist/{chunk-5EOMSWNO.js → chunk-MAM2X3MW.js} +5 -5
  58. package/dist/{chunk-5EOMSWNO.js.map → chunk-MAM2X3MW.js.map} +1 -1
  59. package/dist/{chunk-FSPS7TVD.js → chunk-MCMS4NMO.js} +5 -5
  60. package/dist/{chunk-FSPS7TVD.js.map → chunk-MCMS4NMO.js.map} +1 -1
  61. package/dist/{chunk-ZB5VMGKB.js → chunk-MV5DIE2T.js} +15 -4
  62. package/dist/chunk-MV5DIE2T.js.map +1 -0
  63. package/dist/chunk-NDI4HLQE.js +41 -0
  64. package/dist/chunk-NDI4HLQE.js.map +1 -0
  65. package/dist/{chunk-B4GNSSHU.js → chunk-NLJEQZQQ.js} +3 -3
  66. package/dist/{chunk-B4GNSSHU.js.map → chunk-NLJEQZQQ.js.map} +1 -1
  67. package/dist/{chunk-SBZJGFZ6.js → chunk-QHT4DCXE.js} +8 -7
  68. package/dist/chunk-QHT4DCXE.js.map +1 -0
  69. package/dist/{chunk-I4IJOLNA.js → chunk-RMUBCTEF.js} +5 -5
  70. package/dist/{chunk-I4IJOLNA.js.map → chunk-RMUBCTEF.js.map} +1 -1
  71. package/dist/{chunk-G3AD3NJG.js → chunk-RNTDM3RP.js} +9 -5
  72. package/dist/chunk-RNTDM3RP.js.map +1 -0
  73. package/dist/chunk-RPFN6ETQ.js +509 -0
  74. package/dist/chunk-RPFN6ETQ.js.map +1 -0
  75. package/dist/{chunk-HWBFRDX7.js → chunk-SI7C3W5M.js} +28 -9
  76. package/dist/chunk-SI7C3W5M.js.map +1 -0
  77. package/dist/chunk-TPOV3OCC.js +234 -0
  78. package/dist/chunk-TPOV3OCC.js.map +1 -0
  79. package/dist/{chunk-IANYMDKH.js → chunk-UBQ54W46.js} +4 -4
  80. package/dist/chunk-UBQ54W46.js.map +1 -0
  81. package/dist/{chunk-QVOBLRCM.js → chunk-UIKQ4X6W.js} +3 -3
  82. package/dist/{chunk-QVOBLRCM.js.map → chunk-UIKQ4X6W.js.map} +1 -1
  83. package/dist/chunk-UOWQH53N.js +70 -0
  84. package/dist/chunk-UOWQH53N.js.map +1 -0
  85. package/dist/{chunk-QRNQQIQM.js → chunk-WJUY6YWF.js} +52 -20
  86. package/dist/chunk-WJUY6YWF.js.map +1 -0
  87. package/dist/{chunk-3KARNPW4.js → chunk-WKIUMLRT.js} +3 -3
  88. package/dist/{chunk-3KARNPW4.js.map → chunk-WKIUMLRT.js.map} +1 -1
  89. package/dist/chunk-X6RB74JN.js +37 -0
  90. package/dist/chunk-X6RB74JN.js.map +1 -0
  91. package/dist/chunk-XQ6L2CM5.js +83 -0
  92. package/dist/chunk-XQ6L2CM5.js.map +1 -0
  93. package/dist/{chunk-RKCUXOU2.js → chunk-YUVKROMA.js} +44 -7
  94. package/dist/chunk-YUVKROMA.js.map +1 -0
  95. package/dist/components/action-icon/action-icon.d.ts +9 -2
  96. package/dist/components/action-icon/action-icon.d.ts.map +1 -1
  97. package/dist/components/action-icon/index.js +5 -1
  98. package/dist/components/alert/index.js +4 -4
  99. package/dist/components/anchor/anchor.d.ts +45 -0
  100. package/dist/components/anchor/anchor.d.ts.map +1 -0
  101. package/dist/components/anchor/index.d.ts +2 -0
  102. package/dist/components/anchor/index.d.ts.map +1 -0
  103. package/dist/components/anchor/index.js +11 -0
  104. package/dist/components/anchor/index.js.map +1 -0
  105. package/dist/components/app-shell/app-shell.d.ts +10 -6
  106. package/dist/components/app-shell/app-shell.d.ts.map +1 -1
  107. package/dist/components/app-shell/index.js +23 -24
  108. package/dist/components/app-shell/index.js.map +1 -1
  109. package/dist/components/autocomplete/autocomplete.d.ts +1 -1
  110. package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
  111. package/dist/components/autocomplete/index.js +15 -9
  112. package/dist/components/autocomplete/index.js.map +1 -1
  113. package/dist/components/avatar/index.js +1 -1
  114. package/dist/components/button/button.d.ts +15 -2
  115. package/dist/components/button/button.d.ts.map +1 -1
  116. package/dist/components/button/index.js +5 -1
  117. package/dist/components/button-multi-select/index.js +6 -4
  118. package/dist/components/button-multi-select/index.js.map +1 -1
  119. package/dist/components/button-select/button-select-control.d.ts.map +1 -1
  120. package/dist/components/button-select/button-select.d.ts +2 -2
  121. package/dist/components/button-select/button-select.d.ts.map +1 -1
  122. package/dist/components/button-select/index.js +6 -4
  123. package/dist/components/button-select/index.js.map +1 -1
  124. package/dist/components/calendar/aliases.d.ts +16 -0
  125. package/dist/components/calendar/aliases.d.ts.map +1 -0
  126. package/dist/components/calendar/calendar-body.d.ts +11 -1
  127. package/dist/components/calendar/calendar-body.d.ts.map +1 -1
  128. package/dist/components/calendar/calendar.d.ts +8 -4
  129. package/dist/components/calendar/calendar.d.ts.map +1 -1
  130. package/dist/components/calendar/index.d.ts +2 -1
  131. package/dist/components/calendar/index.d.ts.map +1 -1
  132. package/dist/components/calendar/index.js +15 -5
  133. package/dist/components/calendar/index.js.map +1 -1
  134. package/dist/components/calendar-heatmap/calendar-heatmap.d.ts.map +1 -1
  135. package/dist/components/calendar-heatmap/index.js +85 -73
  136. package/dist/components/calendar-heatmap/index.js.map +1 -1
  137. package/dist/components/camera/index.js +16 -14
  138. package/dist/components/carousel/index.js +3 -3
  139. package/dist/components/checkbox/checkbox.d.ts.map +1 -1
  140. package/dist/components/checkbox/index.js +2 -2
  141. package/dist/components/choice-card-group/index.js +2 -2
  142. package/dist/components/choice-card-group/index.js.map +1 -1
  143. package/dist/components/circular-progress/circular-progress.d.ts +22 -11
  144. package/dist/components/circular-progress/circular-progress.d.ts.map +1 -1
  145. package/dist/components/circular-progress/index.d.ts +1 -1
  146. package/dist/components/circular-progress/index.d.ts.map +1 -1
  147. package/dist/components/circular-progress/index.js +68 -49
  148. package/dist/components/circular-progress/index.js.map +1 -1
  149. package/dist/components/clipboard/index.js +7 -3
  150. package/dist/components/clipboard/index.js.map +1 -1
  151. package/dist/components/code/code.d.ts +10 -0
  152. package/dist/components/code/code.d.ts.map +1 -1
  153. package/dist/components/code/index.js +1 -0
  154. package/dist/components/code/index.js.map +1 -1
  155. package/dist/components/code-block/chrome.js +10 -6
  156. package/dist/components/code-block/index.js +10 -7
  157. package/dist/components/code-block/index.js.map +1 -1
  158. package/dist/components/combobox/combobox.d.ts +5 -3
  159. package/dist/components/combobox/combobox.d.ts.map +1 -1
  160. package/dist/components/combobox/index.js +12 -7
  161. package/dist/components/combobox-list/combobox-list.d.ts +1 -1
  162. package/dist/components/combobox-list/combobox-list.d.ts.map +1 -1
  163. package/dist/components/combobox-list/index.js +14 -9
  164. package/dist/components/compare/index.js +1 -1
  165. package/dist/components/data-list/data-list.d.ts +96 -0
  166. package/dist/components/data-list/data-list.d.ts.map +1 -0
  167. package/dist/components/data-list/index.d.ts +2 -0
  168. package/dist/components/data-list/index.d.ts.map +1 -0
  169. package/dist/components/data-list/index.js +147 -0
  170. package/dist/components/data-list/index.js.map +1 -0
  171. package/dist/components/data-table/data-table-group.d.ts.map +1 -1
  172. package/dist/components/data-table/data-table-placeholder.d.ts +12 -1
  173. package/dist/components/data-table/data-table-placeholder.d.ts.map +1 -1
  174. package/dist/components/data-table/data-table-stack.d.ts.map +1 -1
  175. package/dist/components/data-table/data-table.d.ts +5 -2
  176. package/dist/components/data-table/data-table.d.ts.map +1 -1
  177. package/dist/components/data-table/index.js +163 -168
  178. package/dist/components/data-table/index.js.map +1 -1
  179. package/dist/components/date-picker/aliases.d.ts +16 -0
  180. package/dist/components/date-picker/aliases.d.ts.map +1 -1
  181. package/dist/components/date-picker/date-picker.d.ts +22 -8
  182. package/dist/components/date-picker/date-picker.d.ts.map +1 -1
  183. package/dist/components/date-picker/index.d.ts +2 -2
  184. package/dist/components/date-picker/index.d.ts.map +1 -1
  185. package/dist/components/date-picker/index.js +34 -28
  186. package/dist/components/date-picker/index.js.map +1 -1
  187. package/dist/components/download-button/index.js +6 -2
  188. package/dist/components/drawer/drawer.d.ts +7 -4
  189. package/dist/components/drawer/drawer.d.ts.map +1 -1
  190. package/dist/components/drawer/index.js +11 -6
  191. package/dist/components/empty-state/empty-state.d.ts +57 -0
  192. package/dist/components/empty-state/empty-state.d.ts.map +1 -0
  193. package/dist/components/empty-state/index.d.ts +2 -0
  194. package/dist/components/empty-state/index.d.ts.map +1 -0
  195. package/dist/components/empty-state/index.js +8 -0
  196. package/dist/components/empty-state/index.js.map +1 -0
  197. package/dist/components/field/field.d.ts +20 -0
  198. package/dist/components/field/field.d.ts.map +1 -1
  199. package/dist/components/field/index.js +1 -1
  200. package/dist/components/fieldset/fieldset.d.ts +103 -0
  201. package/dist/components/fieldset/fieldset.d.ts.map +1 -0
  202. package/dist/components/fieldset/index.d.ts +2 -0
  203. package/dist/components/fieldset/index.d.ts.map +1 -0
  204. package/dist/components/fieldset/index.js +150 -0
  205. package/dist/components/fieldset/index.js.map +1 -0
  206. package/dist/components/file-item/index.js +10 -7
  207. package/dist/components/file-preview/file-preview.d.ts.map +1 -1
  208. package/dist/components/file-preview/index.js +10 -18
  209. package/dist/components/file-preview/index.js.map +1 -1
  210. package/dist/components/file-trigger/index.js +6 -2
  211. package/dist/components/file-upload/file-upload.d.ts.map +1 -1
  212. package/dist/components/file-upload/index.js +18 -14
  213. package/dist/components/file-upload/index.js.map +1 -1
  214. package/dist/components/gallery/index.js +3 -3
  215. package/dist/components/geodesic/a11y.d.ts +3 -3
  216. package/dist/components/geodesic/a11y.d.ts.map +1 -1
  217. package/dist/components/hover-card/hover-card.d.ts.map +1 -1
  218. package/dist/components/hover-card/index.js +10 -3
  219. package/dist/components/hover-card/index.js.map +1 -1
  220. package/dist/components/image/index.js +3 -3
  221. package/dist/components/image-cropper/index.js +9 -6
  222. package/dist/components/input/index.js +2 -2
  223. package/dist/components/input/input.d.ts.map +1 -1
  224. package/dist/components/kbd/index.js +3 -3
  225. package/dist/components/kbd/kbd.d.ts +4 -0
  226. package/dist/components/kbd/kbd.d.ts.map +1 -1
  227. package/dist/components/lightbox/index.js +13 -11
  228. package/dist/components/lightbox/index.js.map +1 -1
  229. package/dist/components/menu/index.js +9 -5
  230. package/dist/components/menu/index.js.map +1 -1
  231. package/dist/components/menu/menu.d.ts.map +1 -1
  232. package/dist/components/modal/index.js +11 -6
  233. package/dist/components/modal/modal.d.ts +10 -4
  234. package/dist/components/modal/modal.d.ts.map +1 -1
  235. package/dist/components/multi-combobox-list/index.js +13 -9
  236. package/dist/components/multi-combobox-list/multi-combobox-list.d.ts +1 -1
  237. package/dist/components/multi-combobox-list/multi-combobox-list.d.ts.map +1 -1
  238. package/dist/components/multi-select/index.js +13 -10
  239. package/dist/components/multi-select/index.js.map +1 -1
  240. package/dist/components/multi-select/multi-select.d.ts +1 -1
  241. package/dist/components/multi-select/multi-select.d.ts.map +1 -1
  242. package/dist/components/nav-link/index.js +4 -4
  243. package/dist/components/nav-link/tanstack.js +4 -4
  244. package/dist/components/notification/index.js +6 -6
  245. package/dist/components/notification/index.js.map +1 -1
  246. package/dist/components/number-input/index.js +11 -7
  247. package/dist/components/number-input/number-input.d.ts +1 -1
  248. package/dist/components/number-input/number-input.d.ts.map +1 -1
  249. package/dist/components/overlays/dialog-parts.d.ts +10 -1
  250. package/dist/components/overlays/dialog-parts.d.ts.map +1 -1
  251. package/dist/components/overlays/index.js +13 -8
  252. package/dist/components/overlays/index.js.map +1 -1
  253. package/dist/components/pagination/index.d.ts +2 -0
  254. package/dist/components/pagination/index.d.ts.map +1 -0
  255. package/dist/components/pagination/index.js +362 -0
  256. package/dist/components/pagination/index.js.map +1 -0
  257. package/dist/components/pagination/pagination.d.ts +147 -0
  258. package/dist/components/pagination/pagination.d.ts.map +1 -0
  259. package/dist/components/password-input/index.js +6 -5
  260. package/dist/components/password-input/index.js.map +1 -1
  261. package/dist/components/password-input/password-input.d.ts +1 -1
  262. package/dist/components/password-input/password-input.d.ts.map +1 -1
  263. package/dist/components/phone-input/index.js +14 -11
  264. package/dist/components/phone-input/index.js.map +1 -1
  265. package/dist/components/phone-input/phone-input.d.ts +1 -1
  266. package/dist/components/phone-input/phone-input.d.ts.map +1 -1
  267. package/dist/components/photo-capture/index.js +19 -17
  268. package/dist/components/photo-capture/index.js.map +1 -1
  269. package/dist/components/pills-input/index.js +4 -4
  270. package/dist/components/pills-input/pills-input.d.ts +1 -1
  271. package/dist/components/pills-input/pills-input.d.ts.map +1 -1
  272. package/dist/components/pin-input/index.js +6 -5
  273. package/dist/components/pin-input/index.js.map +1 -1
  274. package/dist/components/pin-input/pin-input.d.ts.map +1 -1
  275. package/dist/components/popover/index.js +7 -2
  276. package/dist/components/popover/popover.d.ts +41 -16
  277. package/dist/components/popover/popover.d.ts.map +1 -1
  278. package/dist/components/progress/index.d.ts +1 -1
  279. package/dist/components/progress/index.d.ts.map +1 -1
  280. package/dist/components/progress/index.js +4 -1
  281. package/dist/components/progress/progress.d.ts +22 -14
  282. package/dist/components/progress/progress.d.ts.map +1 -1
  283. package/dist/components/prose/index.d.ts +2 -0
  284. package/dist/components/prose/index.d.ts.map +1 -0
  285. package/dist/components/prose/index.js +17 -0
  286. package/dist/components/prose/index.js.map +1 -0
  287. package/dist/components/prose/prose.d.ts +49 -0
  288. package/dist/components/prose/prose.d.ts.map +1 -0
  289. package/dist/components/prose/styles.css +593 -0
  290. package/dist/components/radio-group/index.js +9 -3
  291. package/dist/components/radio-group/index.js.map +1 -1
  292. package/dist/components/radio-group/radio-group.d.ts.map +1 -1
  293. package/dist/components/rating/index.js +3 -2
  294. package/dist/components/rating/index.js.map +1 -1
  295. package/dist/components/rating/rating.d.ts.map +1 -1
  296. package/dist/components/schedule/index.js +10 -8
  297. package/dist/components/schedule/index.js.map +1 -1
  298. package/dist/components/scroll-area/index.d.ts +2 -0
  299. package/dist/components/scroll-area/index.d.ts.map +1 -0
  300. package/dist/components/scroll-area/index.js +10 -0
  301. package/dist/components/scroll-area/index.js.map +1 -0
  302. package/dist/components/scroll-area/scroll-area.d.ts +150 -0
  303. package/dist/components/scroll-area/scroll-area.d.ts.map +1 -0
  304. package/dist/components/segment-group/index.js +2 -2
  305. package/dist/components/segment-group/segment-group.d.ts.map +1 -1
  306. package/dist/components/select/index.js +12 -8
  307. package/dist/components/select/select.d.ts +1 -1
  308. package/dist/components/select/select.d.ts.map +1 -1
  309. package/dist/components/slider/index.js +2 -2
  310. package/dist/components/slider/slider.d.ts.map +1 -1
  311. package/dist/components/splitter/index.d.ts +2 -0
  312. package/dist/components/splitter/index.d.ts.map +1 -0
  313. package/dist/components/splitter/index.js +373 -0
  314. package/dist/components/splitter/index.js.map +1 -0
  315. package/dist/components/splitter/splitter.d.ts +159 -0
  316. package/dist/components/splitter/splitter.d.ts.map +1 -0
  317. package/dist/components/spotlight/index.js +23 -22
  318. package/dist/components/spotlight/index.js.map +1 -1
  319. package/dist/components/spotlight/spotlight.d.ts.map +1 -1
  320. package/dist/components/steps/index.d.ts +4 -0
  321. package/dist/components/steps/index.d.ts.map +1 -0
  322. package/dist/components/steps/index.js +478 -0
  323. package/dist/components/steps/index.js.map +1 -0
  324. package/dist/components/steps/steps-data.d.ts +78 -0
  325. package/dist/components/steps/steps-data.d.ts.map +1 -0
  326. package/dist/components/steps/steps.d.ts +183 -0
  327. package/dist/components/steps/steps.d.ts.map +1 -0
  328. package/dist/components/switch/index.js +4 -3
  329. package/dist/components/switch/index.js.map +1 -1
  330. package/dist/components/switch/switch.d.ts.map +1 -1
  331. package/dist/components/table-of-contents/index.d.ts +2 -0
  332. package/dist/components/table-of-contents/index.d.ts.map +1 -0
  333. package/dist/components/table-of-contents/index.js +471 -0
  334. package/dist/components/table-of-contents/index.js.map +1 -0
  335. package/dist/components/table-of-contents/table-of-contents.d.ts +173 -0
  336. package/dist/components/table-of-contents/table-of-contents.d.ts.map +1 -0
  337. package/dist/components/tags-input/index.js +12 -9
  338. package/dist/components/tags-input/index.js.map +1 -1
  339. package/dist/components/tags-input/tags-input.d.ts +1 -1
  340. package/dist/components/tags-input/tags-input.d.ts.map +1 -1
  341. package/dist/components/text-input/index.js +2 -2
  342. package/dist/components/textarea/index.js +8 -6
  343. package/dist/components/textarea/index.js.map +1 -1
  344. package/dist/components/textarea/textarea.d.ts.map +1 -1
  345. package/dist/components/time-input/index.js +11 -9
  346. package/dist/components/time-input/index.js.map +1 -1
  347. package/dist/components/timeline/index.js +8 -1
  348. package/dist/components/timeline/index.js.map +1 -1
  349. package/dist/components/timeline/timeline.d.ts.map +1 -1
  350. package/dist/components/tooltip/index.js +1 -1
  351. package/dist/components/tooltip/tooltip.d.ts +3 -8
  352. package/dist/components/tooltip/tooltip.d.ts.map +1 -1
  353. package/dist/components/tour/conditions.d.ts +83 -0
  354. package/dist/components/tour/conditions.d.ts.map +1 -0
  355. package/dist/components/tour/create-tours.d.ts +49 -0
  356. package/dist/components/tour/create-tours.d.ts.map +1 -0
  357. package/dist/components/tour/index.d.ts +6 -0
  358. package/dist/components/tour/index.d.ts.map +1 -0
  359. package/dist/components/tour/index.js +1449 -0
  360. package/dist/components/tour/index.js.map +1 -0
  361. package/dist/components/tour/runtime.d.ts +57 -0
  362. package/dist/components/tour/runtime.d.ts.map +1 -0
  363. package/dist/components/tour/storage.d.ts +14 -0
  364. package/dist/components/tour/storage.d.ts.map +1 -0
  365. package/dist/components/tour/store.d.ts +62 -0
  366. package/dist/components/tour/store.d.ts.map +1 -0
  367. package/dist/components/tour/tour.d.ts +77 -0
  368. package/dist/components/tour/tour.d.ts.map +1 -0
  369. package/dist/components/tour/types.d.ts +680 -0
  370. package/dist/components/tour/types.d.ts.map +1 -0
  371. package/dist/components/tree/index.d.ts +3 -0
  372. package/dist/components/tree/index.d.ts.map +1 -0
  373. package/dist/components/tree/index.js +457 -0
  374. package/dist/components/tree/index.js.map +1 -0
  375. package/dist/components/tree/tree-row.d.ts +72 -0
  376. package/dist/components/tree/tree-row.d.ts.map +1 -0
  377. package/dist/components/tree/tree.d.ts +193 -0
  378. package/dist/components/tree/tree.d.ts.map +1 -0
  379. package/dist/components/tree-multi-select/index.js +31 -54
  380. package/dist/components/tree-multi-select/index.js.map +1 -1
  381. package/dist/components/tree-multi-select/tree-multi-select.d.ts +16 -1
  382. package/dist/components/tree-multi-select/tree-multi-select.d.ts.map +1 -1
  383. package/dist/components/tree-select/index.js +30 -24
  384. package/dist/components/tree-select/index.js.map +1 -1
  385. package/dist/components/tree-select/tree-popover.d.ts +20 -31
  386. package/dist/components/tree-select/tree-popover.d.ts.map +1 -1
  387. package/dist/components/tree-select/tree-select.d.ts +1 -1
  388. package/dist/components/tree-select/tree-select.d.ts.map +1 -1
  389. package/dist/index.d.ts +2 -0
  390. package/dist/index.d.ts.map +1 -1
  391. package/dist/index.js +10 -8
  392. package/dist/index.js.map +1 -1
  393. package/dist/lib/date-predicates.d.ts +7 -5
  394. package/dist/lib/date-predicates.d.ts.map +1 -1
  395. package/dist/lib/date-value.d.ts +20 -0
  396. package/dist/lib/date-value.d.ts.map +1 -1
  397. package/dist/lib/floating-arrow.d.ts +53 -0
  398. package/dist/lib/floating-arrow.d.ts.map +1 -0
  399. package/dist/lib/focus-return.d.ts +53 -0
  400. package/dist/lib/focus-return.d.ts.map +1 -0
  401. package/dist/lib/meter.d.ts +104 -0
  402. package/dist/lib/meter.d.ts.map +1 -0
  403. package/dist/lib/overlay-layer.d.ts +26 -8
  404. package/dist/lib/overlay-layer.d.ts.map +1 -1
  405. package/dist/lib/pressed.d.ts +92 -0
  406. package/dist/lib/pressed.d.ts.map +1 -0
  407. package/dist/lib/tree-data.d.ts +18 -2
  408. package/dist/lib/tree-data.d.ts.map +1 -1
  409. package/dist/lib/use-pagination.d.ts +102 -0
  410. package/dist/lib/use-pagination.d.ts.map +1 -0
  411. package/dist/lib/use-scroll-spy.d.ts +126 -0
  412. package/dist/lib/use-scroll-spy.d.ts.map +1 -0
  413. package/dist/theme.css +39 -3
  414. package/package.json +1 -1
  415. package/src/as-child.contract.test.tsx +283 -1
  416. package/src/components/action-icon/action-icon.tsx +34 -4
  417. package/src/components/anchor/anchor.test.tsx +232 -0
  418. package/src/components/anchor/anchor.tsx +187 -0
  419. package/src/components/anchor/index.ts +12 -0
  420. package/src/components/app-shell/app-shell.test.tsx +15 -7
  421. package/src/components/app-shell/app-shell.tsx +27 -20
  422. package/src/components/autocomplete/autocomplete.tsx +11 -3
  423. package/src/components/button/button-pressed.test.tsx +202 -0
  424. package/src/components/button/button.tsx +48 -6
  425. package/src/components/button-select/button-select-control.tsx +2 -2
  426. package/src/components/button-select/button-select.tsx +22 -2
  427. package/src/components/calendar/aliases.tsx +28 -0
  428. package/src/components/calendar/calendar-body.tsx +310 -210
  429. package/src/components/calendar/calendar.tsx +43 -12
  430. package/src/components/calendar/index.ts +7 -1
  431. package/src/components/calendar/month-year-calendar.test.tsx +106 -0
  432. package/src/components/calendar-heatmap/calendar-heatmap.tsx +88 -73
  433. package/src/components/checkbox/checkbox.tsx +7 -2
  434. package/src/components/choice-card-group/choice-card-group.tsx +2 -2
  435. package/src/components/circular-progress/circular-progress.test.tsx +35 -0
  436. package/src/components/circular-progress/circular-progress.tsx +116 -59
  437. package/src/components/circular-progress/index.ts +1 -0
  438. package/src/components/code/code.test.tsx +16 -0
  439. package/src/components/code/code.tsx +11 -0
  440. package/src/components/combobox/combobox.tsx +63 -28
  441. package/src/components/combobox-list/combobox-list.tsx +11 -3
  442. package/src/components/data-list/data-list.test.tsx +149 -0
  443. package/src/components/data-list/data-list.tsx +268 -0
  444. package/src/components/data-list/index.ts +9 -0
  445. package/src/components/data-table/data-table-group.test.tsx +16 -0
  446. package/src/components/data-table/data-table-group.tsx +15 -2
  447. package/src/components/data-table/data-table-placeholder.tsx +28 -36
  448. package/src/components/data-table/data-table-stack.tsx +33 -39
  449. package/src/components/data-table/data-table.test.tsx +31 -0
  450. package/src/components/data-table/data-table.tsx +41 -42
  451. package/src/components/date-picker/aliases.tsx +28 -0
  452. package/src/components/date-picker/date-picker.test.tsx +29 -0
  453. package/src/components/date-picker/date-picker.tsx +164 -45
  454. package/src/components/date-picker/index.ts +5 -1
  455. package/src/components/date-picker/month-year-picker.test.tsx +362 -0
  456. package/src/components/drawer/drawer.test.tsx +41 -0
  457. package/src/components/drawer/drawer.tsx +7 -1
  458. package/src/components/empty-state/empty-state.test.tsx +109 -0
  459. package/src/components/empty-state/empty-state.tsx +180 -0
  460. package/src/components/empty-state/index.ts +9 -0
  461. package/src/components/field/field.tsx +35 -1
  462. package/src/components/fieldset/fieldset.test.tsx +352 -0
  463. package/src/components/fieldset/fieldset.tsx +268 -0
  464. package/src/components/fieldset/index.ts +11 -0
  465. package/src/components/file-preview/file-preview.test.tsx +2 -1
  466. package/src/components/file-preview/file-preview.tsx +7 -13
  467. package/src/components/file-upload/file-upload.tsx +14 -5
  468. package/src/components/hover-card/hover-card.tsx +5 -1
  469. package/src/components/input/input.tsx +12 -5
  470. package/src/components/kbd/kbd.test.tsx +13 -0
  471. package/src/components/kbd/kbd.tsx +6 -0
  472. package/src/components/menu/menu.tsx +6 -2
  473. package/src/components/modal/modal.test.tsx +41 -0
  474. package/src/components/modal/modal.tsx +17 -9
  475. package/src/components/multi-combobox-list/multi-combobox-list.tsx +11 -3
  476. package/src/components/multi-select/multi-select.tsx +11 -3
  477. package/src/components/notification/create-notifier.tsx +1 -1
  478. package/src/components/number-input/number-input.tsx +12 -3
  479. package/src/components/overlays/dialog-parts.tsx +42 -5
  480. package/src/components/pagination/index.ts +19 -0
  481. package/src/components/pagination/pagination.test.tsx +187 -0
  482. package/src/components/pagination/pagination.tsx +563 -0
  483. package/src/components/password-input/password-input.tsx +12 -3
  484. package/src/components/phone-input/phone-input.tsx +12 -3
  485. package/src/components/pills-input/pills-input.tsx +7 -2
  486. package/src/components/pin-input/pin-input.tsx +13 -4
  487. package/src/components/popover/popover.tsx +87 -17
  488. package/src/components/progress/index.ts +1 -0
  489. package/src/components/progress/progress.test.tsx +102 -0
  490. package/src/components/progress/progress.tsx +116 -62
  491. package/src/components/prose/index.ts +1 -0
  492. package/src/components/prose/prose.test.tsx +90 -0
  493. package/src/components/prose/prose.tsx +60 -0
  494. package/src/components/prose/styles.css +593 -0
  495. package/src/components/radio-group/radio-group.tsx +8 -3
  496. package/src/components/rating/rating.tsx +5 -2
  497. package/src/components/scroll-area/index.ts +18 -0
  498. package/src/components/scroll-area/scroll-area.test.tsx +184 -0
  499. package/src/components/scroll-area/scroll-area.tsx +448 -0
  500. package/src/components/segment-group/segment-group.tsx +2 -2
  501. package/src/components/select/select.tsx +37 -18
  502. package/src/components/slider/slider.tsx +2 -2
  503. package/src/components/splitter/index.ts +15 -0
  504. package/src/components/splitter/splitter.test.tsx +244 -0
  505. package/src/components/splitter/splitter.tsx +625 -0
  506. package/src/components/spotlight/spotlight.test.tsx +34 -26
  507. package/src/components/spotlight/spotlight.tsx +7 -9
  508. package/src/components/steps/index.ts +21 -0
  509. package/src/components/steps/steps-data.tsx +179 -0
  510. package/src/components/steps/steps.test.tsx +235 -0
  511. package/src/components/steps/steps.tsx +686 -0
  512. package/src/components/switch/switch.tsx +7 -2
  513. package/src/components/table-of-contents/index.ts +17 -0
  514. package/src/components/table-of-contents/table-of-contents.test.tsx +289 -0
  515. package/src/components/table-of-contents/table-of-contents.tsx +708 -0
  516. package/src/components/tags-input/tags-input.tsx +12 -3
  517. package/src/components/textarea/textarea.tsx +15 -5
  518. package/src/components/timeline/timeline.test.tsx +22 -0
  519. package/src/components/timeline/timeline.tsx +10 -1
  520. package/src/components/tooltip/tooltip.tsx +8 -17
  521. package/src/components/tour/conditions.test.ts +527 -0
  522. package/src/components/tour/conditions.ts +445 -0
  523. package/src/components/tour/create-tours.tsx +150 -0
  524. package/src/components/tour/index.ts +86 -0
  525. package/src/components/tour/runtime.ts +187 -0
  526. package/src/components/tour/storage.test.ts +68 -0
  527. package/src/components/tour/storage.ts +44 -0
  528. package/src/components/tour/store.test.tsx +784 -0
  529. package/src/components/tour/store.ts +661 -0
  530. package/src/components/tour/tour.test.tsx +318 -0
  531. package/src/components/tour/tour.tsx +773 -0
  532. package/src/components/tour/tour.types.test.ts +185 -0
  533. package/src/components/tour/types.ts +904 -0
  534. package/src/components/tree/index.ts +24 -0
  535. package/src/components/tree/tree-row.tsx +179 -0
  536. package/src/components/tree/tree.test.tsx +296 -0
  537. package/src/components/tree/tree.tsx +796 -0
  538. package/src/components/tree-multi-select/tree-multi-select.tsx +29 -58
  539. package/src/components/tree-select/tree-popover.tsx +26 -107
  540. package/src/components/tree-select/tree-select.tsx +24 -16
  541. package/src/icon-stroke.test.tsx +2 -0
  542. package/src/index.ts +16 -0
  543. package/src/lib/date-predicates.test.ts +46 -0
  544. package/src/lib/date-predicates.ts +44 -24
  545. package/src/lib/date-value.test.ts +24 -1
  546. package/src/lib/date-value.ts +42 -1
  547. package/src/lib/floating-arrow.tsx +73 -0
  548. package/src/lib/focus-return.test.tsx +143 -0
  549. package/src/lib/focus-return.ts +106 -0
  550. package/src/lib/meter.test.ts +40 -0
  551. package/src/lib/meter.ts +159 -0
  552. package/src/lib/overlay-layer.test.tsx +47 -1
  553. package/src/lib/overlay-layer.tsx +65 -8
  554. package/src/lib/pressed.ts +130 -0
  555. package/src/lib/tree-data.ts +42 -2
  556. package/src/lib/use-pagination.test.ts +105 -0
  557. package/src/lib/use-pagination.ts +179 -0
  558. package/src/lib/use-scroll-spy.test.tsx +238 -0
  559. package/src/lib/use-scroll-spy.ts +336 -0
  560. package/src/theme.css +39 -3
  561. package/src/theme.test.ts +29 -1
  562. package/src/visually-hidden-containment.test.tsx +9 -0
  563. package/dist/chunk-2W7H43WL.js.map +0 -1
  564. package/dist/chunk-7E7JNWOC.js.map +0 -1
  565. package/dist/chunk-7FPSQBWB.js.map +0 -1
  566. package/dist/chunk-7KFUFAVP.js.map +0 -1
  567. package/dist/chunk-AKXALCUN.js.map +0 -1
  568. package/dist/chunk-B5YHYI7E.js.map +0 -1
  569. package/dist/chunk-FQJNQW3G.js.map +0 -1
  570. package/dist/chunk-G3AD3NJG.js.map +0 -1
  571. package/dist/chunk-GEZYGBXY.js.map +0 -1
  572. package/dist/chunk-HCHGERDB.js.map +0 -1
  573. package/dist/chunk-HWBFRDX7.js.map +0 -1
  574. package/dist/chunk-I4B3N3UX.js.map +0 -1
  575. package/dist/chunk-IA6DCC3N.js.map +0 -1
  576. package/dist/chunk-IANYMDKH.js.map +0 -1
  577. package/dist/chunk-MQHD3EJE.js.map +0 -1
  578. package/dist/chunk-NNPSBC7O.js.map +0 -1
  579. package/dist/chunk-OXR7BXZA.js.map +0 -1
  580. package/dist/chunk-QKSLDQM2.js +0 -120
  581. package/dist/chunk-QKSLDQM2.js.map +0 -1
  582. package/dist/chunk-QRNQQIQM.js.map +0 -1
  583. package/dist/chunk-RKCUXOU2.js.map +0 -1
  584. package/dist/chunk-S5CQRCTF.js +0 -426
  585. package/dist/chunk-S5CQRCTF.js.map +0 -1
  586. package/dist/chunk-SBZJGFZ6.js.map +0 -1
  587. package/dist/chunk-SP6LCCTZ.js.map +0 -1
  588. package/dist/chunk-TUP7WXQE.js.map +0 -1
  589. package/dist/chunk-V2QZG4IT.js.map +0 -1
  590. package/dist/chunk-X6DESK37.js.map +0 -1
  591. package/dist/chunk-ZB5VMGKB.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/combobox-list/combobox-list.tsx"],"names":["ArkCombobox"],"mappings":";;;;;;;;;;;;;AA8DO,IAAM,aAAA,GAAyD;AAAA,EACpE,MAAA,kBAAQ,GAAA,CAAC,UAAA,EAAA,EAAW,SAAA,EAAW,UAAA,EAAY,CAAA;AAAA,EAC3C,KAAA,sBAAQ,SAAA,EAAA,EAAU,CAAA;AAAA,EAClB,KAAA,sBAAQ,SAAA,EAAA,EAAU;AACpB,CAAA;AA4DA,IAAM,UAAA,GAAa,CAAC,CAAA,KAAgC,CAAA,KAAM,OAAO,EAAC,GAAI,CAAC,CAAC,CAAA;AAEjE,IAAM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IAAA,EAAY,KAAA,EAAO,KAAA,IAAS,EAAA,EAAI;AAAA;AAAA;AAAA,GACxE;AAGF,EAAA,uBACE,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,KAAA;AAAA,MACA,WAAA;AAAA,MACA,KAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,IAAA;AAAA,MACA,WAAW,UAAA,EAAY,KAAA;AAAA,MAEtB,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ","file":"chunk-NNPSBC7O.js","sourcesContent":["\"use client\"\n\nimport { Combobox as ArkCombobox } from \"@ark-ui/react/combobox\"\nimport { SearchIcon } from \"lucide-react\"\nimport { type FocusEvent, type ReactNode, type Ref, useMemo, useState } from \"react\"\nimport { type IconMap, iconStroke, mergeIcons } from \"../../lib/icons\"\nimport {\n filterSelectData,\n type NormalizedItemOf,\n normalizeSelectData,\n type RenderItem,\n type SelectData,\n type SelectValue,\n useLabelSearch,\n} from \"../../lib/select-data\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { useUncontrolled } from \"../../lib/use-uncontrolled\"\nimport {\n COMBOBOX_DEFAULT_TRANSLATIONS,\n Combobox,\n type ComboboxTranslations,\n} from \"../combobox/combobox\"\nimport { type FieldProps, FieldShell } from \"../field/field\"\nimport type { InputSize, InputVariant } from \"../input/input\"\nimport { CheckIcon, CloseIcon } from \"../popover/icons\"\nimport { popoverIndicator } from \"../popover/popover\"\nimport { ComboboxSearchRow } from \"./combobox-search-row\"\n\n/**\n * ComboboxList — a searchable, single-value option list with no trigger of its\n * own. It renders permanently open: embed it inline inside a container you\n * already control the visibility of (a `Popover`, a `Drawer`, a custom panel)\n * rather than owning a floating dropdown. For a self-contained trigger +\n * floating panel, use [`Select`](/docs/select) instead — same `data` contract\n * and value shape, just with its own closed/open trigger button.\n *\n * - `data` / `value` / `onChange` match `Select` exactly\n * (`SelectValue<Data> | null`) — the picked value must come from `data`;\n * for free text see [`Autocomplete`](/docs/autocomplete).\n * - Type to filter; `clearable` adds a clear button next to the search icon\n * once there's a value.\n * - Label / description / error come from the built-in `Field`, same as the\n * rest of the family — omit them when embedding inside your own popover.\n */\n\ntype ComboboxListClassNames = {\n /** The field wrapper (label / description / error). */\n field?: string\n /** The search row (also targeted by `className`). */\n search?: string\n /** The search `<input>`. */\n input?: string\n /** A single option row. */\n option?: string\n /** The scrollable option list. */\n list?: string\n}\n\nexport type ComboboxListIconSlot = \"search\" | \"clear\" | \"check\"\nexport type ComboboxListIcons = IconMap<ComboboxListIconSlot>\n\n/** The default icons: the search row's magnifier and clear ×, and the selected option's check. */\nexport const DEFAULT_ICONS: Record<ComboboxListIconSlot, ReactNode> = {\n search: <SearchIcon className={iconStroke} />,\n clear: <CloseIcon />,\n check: <CheckIcon />,\n}\n\nexport type ComboboxListProps<Data extends SelectData = SelectData> = Pick<\n FieldProps,\n \"label\" | \"description\" | \"error\" | \"required\"\n> &\n WithTestId & {\n /** Options: `string[]`, `{ value, label?, disabled? }[]`, or `{ group, items }[]`. */\n data: Data\n /** Controlled value. */\n value?: SelectValue<Data> | null\n /** Uncontrolled initial value. */\n defaultValue?: SelectValue<Data> | null\n /** Fires with the selected value (or `null` when cleared). */\n onChange?: (value: SelectValue<Data> | null) => void\n /**\n * Render each option yourself. Receives the (value-narrowed) item and its live\n * `{ selected, highlighted }` state; you own the whole row, including any check\n * affordance. Omit it to render the label + selected check.\n */\n renderItem?: RenderItem<Data>\n /** Placeholder for the search field. */\n placeholder?: string\n /** Message shown when no option matches. Pass `null` to render nothing. */\n empty?: ReactNode\n /** Show a clear button once there's a value. */\n clearable?: boolean\n size?: InputSize\n /**\n * Search row treatment. Defaults to `\"unstyled\"` (no border/background) since\n * this is normally embedded inside a container that already draws its own\n * chrome; pass `\"default\"` / `\"filled\"` when using it standalone.\n */\n variant?: InputVariant\n disabled?: boolean\n readOnly?: boolean\n /** Red invalid state, independent of (and OR'd with) `error`. */\n invalid?: boolean\n /** Name for native form submission. */\n name?: string\n /** Forwarded to the search input; drives touched/blurred validation. */\n onBlur?: (event: FocusEvent<HTMLInputElement>) => void\n /** Lands on the focusable search `<input>` for focus-on-error. */\n ref?: Ref<HTMLInputElement>\n className?: string\n classNames?: ComboboxListClassNames\n /** Overrides the clear button's accessible name (`clearTriggerLabel`, default\n * `\"Clear value\"`) — the same key as the rest of the combobox family. */\n translations?: ComboboxListTranslations\n /** Replaces the default icons: `search`, `clear`, `check`. A missing key keeps its\n * default; `search: null` drops the magnifier. `renderItem` draws its own rows. */\n icons?: ComboboxListIcons\n }\n\n/** The combobox family's `clearTriggerLabel` — the only family key this always-open list\n * renders (it has no chevron). */\nexport type ComboboxListTranslations = Pick<ComboboxTranslations, \"clearTriggerLabel\">\n\n/** Wrap a scalar value into Ark's array contract (or clear with `[]`) — same\n * bridge `Select` uses (`toArkValue`, `select.tsx`). */\nconst toArkValue = (v: string | null): string[] => (v === null ? [] : [v])\n\nexport const ComboboxList = <const Data extends SelectData = SelectData>({\n data,\n value: valueProp,\n defaultValue,\n onChange,\n renderItem,\n placeholder = \"Search…\",\n empty = \"Nothing found\",\n clearable,\n size = \"md\",\n variant = \"unstyled\",\n disabled,\n readOnly,\n required,\n invalid,\n name,\n onBlur,\n ref,\n label,\n description,\n error,\n className,\n classNames,\n testId,\n translations,\n icons: iconsProp,\n}: ComboboxListProps<Data>) => {\n const icons = mergeIcons(DEFAULT_ICONS, iconsProp)\n const clearLabel =\n translations?.clearTriggerLabel ?? COMBOBOX_DEFAULT_TRANSLATIONS.clearTriggerLabel\n type Item = SelectValue<Data>\n\n // Red state is driven independently of the `Field` error slot so a form\n // library can flip it from `fieldState.invalid` (see FormControlProps).\n const isInvalid = invalid || error != null\n\n const [value, setValue] = useUncontrolled<Item | null>({\n value: valueProp,\n defaultValue: defaultValue ?? null,\n onChange,\n })\n const [search, setSearch] = useState(\"\")\n\n // Normalize once per `data`; only the filter re-runs as the query changes.\n const normalized = useMemo(() => normalizeSelectData(data), [data])\n const labelSearch = useLabelSearch()\n const { collection, items, groups } = useMemo(\n () => filterSelectData(normalized, (item) => labelSearch.matches(item.label, search)),\n [normalized, search, labelSearch],\n )\n\n // `canClear` reserves the clear button's box (and the shell's end-slot\n // padding) for the whole time the field is clearable, not just while it\n // has a value — otherwise the button mounting/unmounting shifts the\n // search input's width. `showClear` only toggles visibility/interactivity.\n const canClear = Boolean(clearable) && !disabled && !readOnly\n const showClear = canClear && (value != null || search.length > 0)\n\n const renderOption = (item: NormalizedItemOf<Data>) => (\n <Combobox.Item\n key={item.value}\n item={item}\n data-testid={item.testId}\n className={classNames?.option}\n >\n {renderItem\n ? (state) => renderItem(item, state)\n : // `Combobox.Item`'s own label + check row, with the check from `icons`.\n () => (\n <>\n <ArkCombobox.ItemText>{item.label}</ArkCombobox.ItemText>\n <ArkCombobox.ItemIndicator className={popoverIndicator}>\n {icons.check}\n </ArkCombobox.ItemIndicator>\n </>\n )}\n </Combobox.Item>\n )\n\n const control = (\n <Combobox.Root<NormalizedItemOf<Data>>\n collection={collection}\n value={toArkValue(value)}\n // Ark types the value as `string[]`; it always originates from `data`,\n // so narrow it back to the caller's value union.\n onValueChange={(details) => setValue((details.value[0] ?? null) as Item)}\n inputValue={search}\n onInputValueChange={(details) => setSearch(details.inputValue)}\n // There's no trigger to open it — the caller (e.g. a `Popover`) already\n // owns whether this mounts at all, so keep the machine permanently open.\n open\n onOpenChange={() => {}}\n // The caller's own container (Popover, Drawer, …) already owns\n // dismiss-on-outside-click; without this the always-open machine\n // registers its own (functionally inert, since `onOpenChange` is a\n // no-op) listbox dismissable layer, which logs a spurious\n // \"[@zag-js/dismissable] node is `null` or `undefined`\" warning.\n disableLayer\n closeOnSelect={false}\n autoFocus\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n size={size}\n variant={variant}\n className={className}\n >\n <ComboboxSearchRow\n size={size}\n variant={variant}\n invalid={isInvalid}\n placeholder={placeholder}\n canClear={canClear}\n showClear={showClear}\n clearLabel={clearLabel}\n onClear={() => {\n setValue(null)\n setSearch(\"\")\n }}\n onBlur={onBlur}\n ref={ref}\n testId={testId}\n icons={icons}\n classNames={classNames}\n />\n\n <Combobox.Panel className={classNames?.list}>\n {groups\n ? groups.map((group) => (\n <Combobox.Group key={group.group} label={group.group}>\n {group.items.map(renderOption)}\n </Combobox.Group>\n ))\n : items.map(renderOption)}\n {empty != null && <Combobox.Empty>{empty}</Combobox.Empty>}\n </Combobox.Panel>\n\n {/* Carries the real selection so a native `<form>` submits it — the\n search input is unnamed (it would submit the typed query, not the\n value). */}\n {name != null && <input type=\"hidden\" name={name} value={value ?? \"\"} />}\n </Combobox.Root>\n )\n\n return (\n <FieldShell\n label={label}\n description={description}\n error={error}\n required={required}\n disabled={disabled}\n size={size}\n className={classNames?.field}\n >\n {control}\n </FieldShell>\n )\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/kbd/kbd.tsx"],"names":[],"mappings":";;;;;;;;;AAmDA,IAAM,WAAA,GAAc,GAAA;AAAA,EAClB;AAAA,IACE,+CAAA;AAAA,IACA,+BAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,oCAAA;AAAA,IACA,sCAAA;AAAA,IACA,8CAAA;AAAA;AAAA;AAAA;AAAA,IAIA,mEAAA;AAAA;AAAA;AAAA,IAGA,4BAAA;AAAA;AAAA;AAAA,IAGA,WAAA;AAAY,GACd;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,MAAA,EAAQ,oCAAA;AAAA,QACR,KAAA,EAAO,+BAAA;AAAA;AAAA,QAEP,OAAA,EAAS,sDAAA;AAAA,QACT,MAAA,EAAQ,gCAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAYR,OAAA,EAAS;AAAA,UACP,kDAAA;AAAA,UACA,2CAAA;AAAA,UACA,yDAAA;AAAA,UACA;AAAA;AACF,OACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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SAAA,EAClC,CAAA,GAEA;AAAA,OAAA;AAAA,MATG;AAAA;AAWP,GACD,CAAA;AACD,EAAA,uBACE,GAAA;AAAA,IAAC,GAAA,CAAI,GAAA;AAAA,IAAJ;AAAA,MAGC,GAAA,EAAI,KAAA;AAAA,MACJ,YAAA,EAAY,KAAA;AAAA,MACX,GAAG,KAAA,CAAM,EAAE,aAAA,EAAe,QAAQ,CAAA;AAAA,MAClC,GAAG,IAAA;AAAA,MACJ,OAAA;AAAA,MACA,SAAA,EAAW,EAAA,CAAG,QAAA,EAAU,SAAS,CAAA;AAAA,MAEhC,QAAA,EAAA,eAAA,CAAgB,OAAA,EAAS,QAAA,EAAU,MAAM,IAAI;AAAA;AAAA,GAChD;AAEJ,CAAA;AAEO,IAAM,GAAA,GAAM,CAAC,QAAA,KAAuB;AACzC,EAAA,IAAI,SAAS,MAAA,KAAW,MAAA,yBAAkB,GAAA,CAAC,QAAA,EAAA,EAAU,GAAG,QAAA,EAAU,CAAA;AAClE,EAAA,MAAM;AAAA,IACJ,SAAA;AAAA,IACA,OAAA;AAAA,IACA,IAAA;AAAA,IACA,KAAA;AAAA,IACA,MAAA;AAAA,IACA,MAAA,EAAQ,OAAA;AAAA,IACR,YAAA,EAAc,aAAA;AAAA,IACd,GAAG;AAAA,GACL,GAAI,QAAA;AACJ,EAAA,uBACE,GAAA;AAAA,IAAC,GAAA,CAAI,GAAA;AAAA,IAAJ;AAAA,MACC,YAAA,EAAY,KAAA;AAAA,MACX,GAAG,KAAA,CAAM,EAAE,aAAA,EAAe,QAAQ,CAAA;AAAA,MAClC,GAAG,IAAA;AAAA,MACJ,SAAA,EAAW,GAAG,WAAA,CAAY,EAAE,SAAS,IAAA,EAAM,GAAG,SAAS;AAAA;AAAA,GACzD;AAEJ","file":"chunk-OXR7BXZA.js","sourcesContent":["\"use client\"\n\nimport { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport type { ReactElement } from \"react\"\nimport { composeChildren } 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 { hotkeyCaps, type KbdTranslations, useApplePlatform } from \"../../lib/use-hotkey\"\n\n/**\n * Kbd — a keyboard-key / shortcut indicator (`<kbd>`).\n *\n * A client component only for `hotkey`, whose keys depend on the platform\n * (`[⌘] [K]` vs `[Ctrl] [K]`). It borrows Button's (variant × color) system so\n * a shortcut hint speaks the same accent language as the action it labels — but\n * unlike Button it is non-interactive: no hover treatment, no click handling,\n * just a key cap.\n *\n * The shape axis is the exact set Button exposes (filled / light / outline /\n * subtle / default), wired through the same `--c-*` slot vars — `color` routes\n * via a `data-color` attribute resolved in `colors.css`, so the cva matrix\n * enumerates variants only, never (variant × color) pairs. The default\n * treatment is the `default` variant: a neutral, bordered key-cap surface that\n * reads as a physical key regardless of `color` (pairing `default` with a color\n * is a no-op, mirroring Button/Badge).\n *\n * Sizing keeps single-character keys square via a per-size `min-w` equal to the\n * height, while wider labels (`Enter`, `Esc`, `⌘N`) grow horizontally. Padding\n * is symmetric, so a key reads the same in RTL.\n *\n * `asChild` (from `HTMLArkProps`) renders the single child as the root with\n * Kbd's styling merged in — e.g. `<Kbd asChild><a href=\"…\">⌘K</a></Kbd>`. The\n * kit's focus ring (`focusStyles`) comes along with it, so a Kbd composed onto\n * a real control is keyboard-visible without the caller restyling anything; on\n * a plain `<kbd>` those classes never match.\n *\n * `hotkey` draws a key combination the way the HTML spec marks one up: an\n * outer `<kbd>` for the whole combination holding one inner `<kbd>` per key,\n * with no `+` between them. The outer one is an unstyled inline-flex row;\n * each key is a full cap (`variant` / `size` / `color` apply to every cap),\n * so `\"mod+k\"` is two square caps. The rest of the props (`className`,\n * `testId`, `asChild`, `aria-*`, …) land on the outer `<kbd>`, which is the\n * element a layout positions; `color` is set there too and every cap reads\n * its slot vars from it. The words the caps show and speak (\"Ctrl\", \"Esc\",\n * \"Command\", \"Up Arrow\") are English unless `translations` replaces them, per\n * key (`KbdTranslations`); `formatHotkey` takes the same object.\n */\nconst kbdVariants = cva(\n [\n \"inline-flex items-center justify-center gap-1\",\n \"whitespace-nowrap select-none\",\n // Regular weight, not medium: the mono face (Kode Mono) has no ⌘ ⇧ ⌥ ↵\n // glyphs, so they fall back to a system font — and a 500 weight makes that\n // fallback resolve to its *bold* face (Menlo Bold), a heavy blot next to\n // the regular letters around it.\n \"font-mono font-normal leading-none\",\n \"rounded-md border border-transparent\",\n \"[&_svg]:shrink-0 [&_svg]:pointer-events-none\",\n // A 1.5px stroke at every size: the icon is sized by CSS, so a stroke in\n // viewBox units would thin out at `size-3`. `non-scaling-stroke` keeps it in\n // screen pixels (lucide's `absoluteStrokeWidth` ignores CSS sizing).\n \"[&_svg]:stroke-[1.5] [&_svg_*]:[vector-effect:non-scaling-stroke]\",\n // A lone icon is narrower than the cap is tall, but the side padding\n // would push it past `min-w`: drop the padding so the cap stays square.\n \"has-[>svg:only-child]:px-0\",\n // Inert on the default non-focusable <kbd>; applies once `asChild`\n // renders Kbd onto a real <button>/<a>. See `focusStyles`.\n focusStyles(),\n ],\n {\n variants: {\n variant: {\n filled: \"bg-(--c-solid) text-(--c-on-solid)\",\n light: \"bg-(--c-soft) text-(--c-text)\",\n // Button's outline edge: the colour at 35%.\n outline: \"bg-transparent text-(--c-text) border-(--c-solid)/35\",\n subtle: \"bg-transparent text-(--c-text)\",\n // The key cap sits on the kit's translucent surface recipe — a 3%/4%\n // overlay plus the hairline `border-brand-900/20 dark:border-white/15`,\n // the same pair `Input`'s default shell, `Card`, `Tabs` and\n // `ChoiceCardGroup` use. An opaque gray step can only ever be right on\n // the one background it was picked against, and a `Kbd` is most often\n // inlined into a Button, a Menu row or a tinted panel. Light mode\n // darkens (`bg-black/3`) because `bg-white/4` on a near-white page is\n // invisible; dark mode lightens. A 1px inset shade along the bottom\n // edge is the key-cap depth cue — the lip of a physical key — without\n // adding height. The label is the kit's secondary text, not full\n // contrast: a shortcut hint annotates the action, it is not the action.\n default: [\n \"bg-black/3 text-brand-900/70 border-brand-900/20\",\n \"shadow-[inset_0_-1px_0_0_rgb(0_0_0/0.08)]\",\n \"dark:bg-white/4 dark:text-white/80 dark:border-white/15\",\n \"dark:shadow-[inset_0_-1px_0_0_rgb(0_0_0/0.35)]\",\n ],\n },\n // Type is one Tailwind step per size (12 / 14 / 16px), the scale of\n // the text a key sits beside — a 10px label left ⌘ and ↵ unreadable.\n //\n // A single character must fit `min-w` (= height) to stay square. Kode\n // Mono advances 0.6em per glyph, so glyph + 2 × padding + 2 × 1px border:\n // sm: 7.2 + 2 × 5 + 2 = 19.2 ≤ 20 (px-1.5 gave 21.2: one px too wide)\n // md: 8.4 + 2 × 6 + 2 = 22.4 ≤ 24\n // lg: 9.6 + 2 × 8 + 2 = 27.6 ≤ 28\n // Re-check these sums after a font, type step or padding change.\n size: {\n sm: \"h-5 min-w-5 px-1.25 text-xs [&_svg]:size-3\",\n md: \"h-6 min-w-6 px-1.5 text-sm [&_svg]:size-3.5\",\n lg: \"h-7 min-w-7 px-2 text-base [&_svg]:size-4\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n },\n },\n)\n\nexport type KbdVariant = NonNullable<VariantProps<typeof kbdVariants>[\"variant\"]>\nexport type KbdSize = NonNullable<VariantProps<typeof kbdVariants>[\"size\"]>\n\n/** The outer `<kbd>` of a `hotkey` combination: a row of caps, unstyled itself.\n * `align-middle` sits it on the text it annotates the way a lone cap does. */\nconst kbdGroup = \"inline-flex items-center gap-0.5 align-middle\"\n\n/** With `hotkey`: the key words, merged per key onto `KBD_DEFAULT_TRANSLATIONS`. */\ntype KbdHotkeyTranslations = {\n /** The words the caps read as and are spoken by, merged per key onto the English\n * `KBD_DEFAULT_TRANSLATIONS`: `{ ctrl: \"Strg\", enter: \"Eingabe\" }`. Pass the same\n * object to `formatHotkey` / `hotkeyKeys` so plain text reads the same. */\n translations?: Partial<KbdTranslations>\n}\n\ntype KbdHotkeyProps =\n | { hotkey?: undefined; translations?: undefined }\n | (KbdHotkeyTranslations & {\n /** A `useHotkey` string to draw, one cap per key, the way the visitor's\n * platform writes it: `\"mod+k\"` is `[⌘] [K]` on Apple platforms and\n * `[Ctrl] [K]` elsewhere (see `hotkeyKeys`). A key with an icon (Shift,\n * Enter, Tab, the arrows, and ⌘ ⌥ ⌃ ⌫ on Apple) is drawn as one, with a\n * spoken name; Ctrl, Alt, Esc, Space (and Backspace off Apple) stay\n * words. Server-rendered as the non-Apple caps, then corrected on\n * hydration. The caps are the content, so it takes no children. */\n hotkey: string\n asChild?: false\n children?: never\n })\n | (KbdHotkeyTranslations & {\n hotkey: string\n /** With `hotkey`: the single child becomes the outer `<kbd>` of the\n * combination, the caps rendered inside it. */\n asChild: true\n children: ReactElement\n })\n\nexport type KbdProps = HTMLArkProps<\"kbd\"> &\n VariantProps<typeof kbdVariants> &\n WithTestId & {\n /** Accent palette. Re-exported as `Color` from `@42/ui-react`. */\n color?: Color\n } & KbdHotkeyProps\n\ntype KbdComboProps = KbdProps & { hotkey: string }\n\n/** `<Kbd hotkey>`: the combination's outer `<kbd>`, one cap per key inside. */\nconst KbdCombo = ({\n className,\n variant,\n size,\n color,\n testId,\n hotkey,\n translations,\n asChild,\n children,\n ...rest\n}: KbdComboProps) => {\n const apple = useApplePlatform()\n const caps = hotkeyCaps(hotkey, apple, translations).map(({ id, label, icon: Icon, name }) => (\n // A symbol is drawn (an icon, or the glyph where there is none) and its\n // name spoken: an svg says nothing, and `⌘` alone reads inconsistently.\n // `relative` holds the absolutely positioned `sr-only` inside the cap.\n // An icon cap drops its side padding to stay square, as a lone icon does\n // (the `sr-only` name beside the svg keeps `:only-child` from matching).\n <kbd\n key={id}\n className={cn(kbdVariants({ variant, size }), name && \"relative\", Icon && \"px-0\")}\n >\n {name ? (\n <>\n {Icon ? <Icon aria-hidden /> : <span aria-hidden>{label}</span>}\n <span className=\"sr-only\">{name}</span>\n </>\n ) : (\n label\n )}\n </kbd>\n ))\n return (\n <ark.kbd\n // A combination reads left to right in either direction, like the\n // single string it replaces.\n dir=\"ltr\"\n data-color={color}\n {...props({ \"data-testid\": testId })}\n {...rest}\n asChild={asChild}\n className={cn(kbdGroup, className)}\n >\n {composeChildren(asChild, children, () => caps)}\n </ark.kbd>\n )\n}\n\nexport const Kbd = (allProps: KbdProps) => {\n if (allProps.hotkey !== undefined) return <KbdCombo {...allProps} />\n const {\n className,\n variant,\n size,\n color,\n testId,\n hotkey: _hotkey,\n translations: _translations,\n ...rest\n } = allProps\n return (\n <ark.kbd\n data-color={color}\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(kbdVariants({ variant, size }), className)}\n />\n )\n}\n"]}
@@ -1,120 +0,0 @@
1
- import { GRADIENT_DIR_CLASS, buildGradientVars } from './chunk-SKPM2FRX.js';
2
- import { props } from './chunk-WYCMIIRR.js';
3
- import { cn } from './chunk-4ASNIDV7.js';
4
- import { Progress as Progress$1 } from '@ark-ui/react/progress';
5
- import { cva } from 'class-variance-authority';
6
- import { jsx } from 'react/jsx-runtime';
7
-
8
- var progressTrack = cva(
9
- // `overflow-x-clip` clips the Range's rounded ends to the track's pill shape
10
- // (mirrors Slider's track); `relative` anchors the indeterminate sweep, whose
11
- // moving bar is positioned within the track's box.
12
- "relative w-full overflow-x-clip rounded-full bg-black/3 dark:bg-white/4",
13
- {
14
- variants: {
15
- size: {
16
- xs: "h-0.5",
17
- sm: "h-1",
18
- md: "h-1.5",
19
- lg: "h-2",
20
- xl: "h-3"
21
- }
22
- },
23
- defaultVariants: { size: "md" }
24
- }
25
- );
26
- var progressRange = cva("h-full rounded-full", {
27
- variants: {
28
- variant: {
29
- filled: "bg-(--c-solid)",
30
- // from-*/to-* are the CSS defaults for --tw-gradient-from/to and the
31
- // --tw-gradient-stops composition chain. A `gradient` prop only overrides
32
- // the individual vars it provides; the direction class is appended
33
- // dynamically (mirrors Badge's gradient variant).
34
- //
35
- // The gradient is stretched to the full track width and pinned to the
36
- // start (see the Range `style` below), so the Range reveals only its left
37
- // slice — the complete from→to shows only at 100%. `bg-no-repeat` keeps
38
- // the stretched image from tiling.
39
- gradient: "bg-linear-to-r from-purple-300 to-pink-400 bg-no-repeat bg-left"
40
- }
41
- },
42
- defaultVariants: { variant: "filled" }
43
- });
44
- var Progress = ({
45
- value,
46
- defaultValue,
47
- onChange,
48
- variant,
49
- size,
50
- color,
51
- gradient,
52
- min = 0,
53
- max = 100,
54
- ref,
55
- className,
56
- classNames,
57
- style,
58
- testId,
59
- asChild: _asChild,
60
- // The naming attributes describe the progressbar, which is the Track, not the root.
61
- "aria-label": label,
62
- "aria-labelledby": labelledBy,
63
- "aria-describedby": describedBy,
64
- "aria-valuetext": valueText,
65
- ...rest
66
- }) => {
67
- const isGradient = variant === "gradient";
68
- return /* @__PURE__ */ jsx(
69
- Progress$1.Root,
70
- {
71
- value,
72
- defaultValue,
73
- onValueChange: onChange ? ({ value: v }) => onChange(v) : void 0,
74
- min,
75
- max,
76
- "data-color": !isGradient ? color : void 0,
77
- className: cn("group/progress w-full", className, classNames?.root),
78
- style,
79
- ...rest,
80
- children: /* @__PURE__ */ jsx(
81
- Progress$1.Track,
82
- {
83
- ref,
84
- className: cn(progressTrack({ size }), classNames?.track),
85
- ...props({
86
- "data-testid": testId,
87
- "aria-label": label,
88
- "aria-labelledby": labelledBy,
89
- "aria-describedby": describedBy,
90
- "aria-valuetext": valueText
91
- }),
92
- children: /* @__PURE__ */ jsx(
93
- Progress$1.Range,
94
- {
95
- style: isGradient ? {
96
- backgroundSize: "calc(10000% / var(--percent, 100)) 100%",
97
- ...gradient ? buildGradientVars(gradient) : null
98
- } : void 0,
99
- className: cn(
100
- progressRange({ variant }),
101
- isGradient && gradient?.dir && GRADIENT_DIR_CLASS[gradient.dir],
102
- // Indeterminate: Ark omits the inline width, so the Range would
103
- // otherwise fill the track. Pin it to a fraction and animate a
104
- // clipped sweep. `group-data-[state=…]` reads the state Ark stamps
105
- // on the root.
106
- "group-data-[state=indeterminate]/progress:w-2/5",
107
- "group-data-[state=indeterminate]/progress:animate-progress-indeterminate",
108
- classNames?.range
109
- )
110
- }
111
- )
112
- }
113
- )
114
- }
115
- );
116
- };
117
-
118
- export { Progress };
119
- //# sourceMappingURL=chunk-QKSLDQM2.js.map
120
- //# sourceMappingURL=chunk-QKSLDQM2.js.map
@@ -1 +0,0 @@
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;AAAA;AAAA,MAUR,QAAA,EAAU;AAAA;AACZ,GACF;AAAA,EACA,eAAA,EAAiB,EAAE,OAAA,EAAS,QAAA;AAC9B,CAAC,CAAA;AAwDM,IAAM,WAAW,CAAC;AAAA,EACvB,KAAA;AAAA,EACA,YAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,IAAA;AAAA,EACA,KAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAA,GAAM,CAAA;AAAA,EACN,GAAA,GAAM,GAAA;AAAA,EACN,GAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;A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AAA,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-QKSLDQM2.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 +0,0 @@
1
- {"version":3,"sources":["../src/components/combobox/combobox.tsx"],"names":["Ark"],"mappings":";;;;;;;;;;;;;AAuEA,IAAM,uBAAuB,aAAA,CAA6B;AAAA,EACxD,IAAA,EAAM,IAAA;AAAA,EACN,OAAA,EAAS;AACX,CAAC,CAAA;AAUM,IAAM,6BAAA,GAAgC;AAAA,EAC3C,YAAA,EAAc,cAAA;AAAA,EACd,iBAAA,EAAmB;AACrB;AAGO,IAAM,2BAAA,GAA8B,CAAC,SAAA,KAC1C,SAAA,GAAY,EAAE,GAAG,6BAAA,EAA+B,GAAG,SAAA,EAAU,GAAI;AAiBnE,IAAM,OAAO,CAAoD;AAAA,EAC/D,IAAA,GAAO,IAAA;AAAA,EACP,OAAA,GAAU,SAAA;AAAA,EACV,WAAA;AAAA,EACA,SAAA;AAAA,EACA,QAAA;AAAA,EACA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A,UAAA,CAAI,gBAAJ,EAAmB,SAAA,EAAW,mBAAoB,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,EAE1D;AAAA,CAAA,EACH,CAAA;AAGF,IAAM,QAAQ,CAAC,EAAE,SAAA,EAAW,GAAG,MAAK,qBAClC,GAAA,CAACA,UAAA,CAAI,KAAA,EAAJ,EAAU,SAAA,EAAW,EAAA,CAAG,cAAc,SAAS,CAAA,EAAI,GAAG,IAAA,EAAM,CAAA;AAOxD,IAAM,QAAA,GAAW;AAAA,EACtB,IAAA;AAAA,EACA,OAAA;AAAA,EACA,KAAA;AAAA,EACA,OAAA;AAAA,EACA,YAAA;AAAA,EACA,OAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA,KAAA;AAAA,EACA,KAAA;AAAA,EACA,SAASA,UAAA,CAAI;AACf","file":"chunk-QRNQQIQM.js","sourcesContent":["\"use client\"\n\nimport { Combobox as Ark, useComboboxContext } from \"@ark-ui/react/combobox\"\nimport { Portal } from \"@ark-ui/react/portal\"\nimport {\n type ComponentProps,\n type ComponentPropsWithoutRef,\n createContext,\n type ReactNode,\n useContext,\n} from \"react\"\nimport { composeChildren, type NoAsChild } from \"../../lib/as-child\"\nimport { cn } from \"../../lib/cn\"\nimport { useOverlayContainer } from \"../../lib/overlay-container\"\nimport { useNestedLayer } from \"../../lib/overlay-layer\"\nimport { props } from \"../../lib/props\"\nimport type { ItemRenderState } from \"../../lib/select-data\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport {\n type InputSize,\n type InputVariant,\n inputControlClasses,\n inputShell,\n inputSlot,\n} from \"../input/input\"\nimport { CheckIcon, ChevronIcon, CloseIcon } from \"../popover/icons\"\nimport {\n popoverChevron,\n popoverClearTrigger,\n popoverContent,\n popoverEmpty,\n popoverGroupLabel,\n popoverIndicator,\n popoverList,\n popoverOption,\n scrollHighlightedIntoView,\n} from \"../popover/popover\"\n\n/**\n * Combobox — the kit's composable search-select primitive, a thin styled layer\n * over Ark UI's Combobox parts. It's the engine `Autocomplete` and `MultiSelect`\n * build on, and the escape hatch when the data-driven components don't fit.\n *\n * Compose the parts yourself, Ark-style — pass a `collection`\n * (`createListCollection`, re-exported here), filter it on input change, and\n * render `Combobox.Item`s from it:\n *\n * const collection = createListCollection({ items });\n * <Combobox.Root collection={collection} onInputValueChange={...}>\n * <Combobox.Control>\n * <Combobox.Input />\n * <Combobox.Trigger />\n * </Combobox.Control>\n * <Combobox.Content>\n * {items.map((i) => <Combobox.Item key={i.value} item={i}>{i.label}</Combobox.Item>)}\n * <Combobox.Empty>Nothing found</Combobox.Empty>\n * </Combobox.Content>\n * </Combobox.Root>\n *\n * `Content` is the floating popover panel (Portal + Positioner + card chrome) —\n * the right choice behind a `Trigger`. For a combobox that renders permanently\n * open inside a container you already own (no trigger of its own — see\n * `ComboboxList` / `MultiComboboxList`), use `Panel` instead: same `Ark.Content`\n * + `Ark.List` wiring, no Portal/Positioner/card chrome.\n *\n * `size` / `variant` / `color` set once on `Root` flow to the control and\n * options through context. Ark owns the state machine: filtering contract,\n * keyboard nav, `multiple`, custom values, RTL, and Field wiring.\n */\n\ntype ComboboxStyle = { size: InputSize; variant: InputVariant }\nconst ComboboxStyleContext = createContext<ComboboxStyle>({\n size: \"md\",\n variant: \"default\",\n})\n\n/** The combobox family's wording — Ark's own Combobox `translations` type, derived structurally\n * rather than imported by name (`IntlTranslations` lives in `@zag-js/combobox`, a transitive\n * dependency). `triggerLabel` names the chevron toggle, `clearTriggerLabel` the clear (×)\n * button. Shared by `Combobox`, `Autocomplete`, `MultiSelect`, `ComboboxList` and\n * `MultiComboboxList`, so one translation pack covers the family. */\nexport type ComboboxTranslations = NonNullable<Ark.RootProps<Ark.CollectionItem>[\"translations\"]>\n\n/** The family's English defaults — the kit's own wording, not zag's (\"Toggle suggestions\"). */\nexport const COMBOBOX_DEFAULT_TRANSLATIONS = {\n triggerLabel: \"Show options\",\n clearTriggerLabel: \"Clear value\",\n} as const satisfies ComboboxTranslations\n\n/** Shallow per-key merge over `COMBOBOX_DEFAULT_TRANSLATIONS`. */\nexport const resolveComboboxTranslations = (overrides?: ComboboxTranslations) =>\n overrides ? { ...COMBOBOX_DEFAULT_TRANSLATIONS, ...overrides } : COMBOBOX_DEFAULT_TRANSLATIONS\n\nexport type ComboboxRootProps<T extends Ark.CollectionItem = Ark.CollectionItem> = Omit<\n Ark.RootProps<T>,\n \"color\" | \"className\"\n> &\n WithTestId & {\n /** Control + option sizing. Flows to the parts via context. */\n size?: InputSize\n /** Control shell treatment. */\n variant?: InputVariant\n /** Focus-ring accent for the control. */\n className?: string\n }\n\n// Generic over the collection item type (like Ark's Root) so a typed\n// `ListCollection<T>` flows through without widening to `unknown`.\nconst Root = <T extends Ark.CollectionItem = Ark.CollectionItem>({\n size = \"md\",\n variant = \"default\",\n positioning,\n className,\n children,\n testId,\n translations,\n ...rest\n}: ComboboxRootProps<T>) => (\n <ComboboxStyleContext.Provider value={{ size, variant }}>\n <Ark.Root\n // Match the popover width to the control by default; callers can override.\n positioning={{ sameWidth: true, ...positioning }}\n // The popover's Content is an `overflow-hidden` clip wrapper, so the\n // machine's native auto-scroll (which needs Content to be scrollable) is a\n // no-op; route scrolling to the inner List scroller instead. Callers in\n // `rest` can still override.\n scrollToIndexFn={scrollHighlightedIntoView}\n className={cn(\"w-full\", className)}\n // The kit's English wording over zag's; a partial override keeps the other key.\n translations={resolveComboboxTranslations(translations)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n >\n {children}\n </Ark.Root>\n </ComboboxStyleContext.Provider>\n)\n\nexport type ComboboxControlProps = NoAsChild<ComponentPropsWithoutRef<typeof Ark.Control>> &\n WithTestId & {\n /** Inline-start adornment (icon, label). */\n startSlot?: ReactNode\n /** Inline-end adornment — rendered before the composed Trigger / ClearTrigger. */\n endSlot?: ReactNode\n }\n\nconst Control = ({\n startSlot,\n endSlot,\n className,\n children,\n testId,\n asChild: _asChild,\n ...rest\n}: ComboboxControlProps) => {\n const { size, variant } = useContext(ComboboxStyleContext)\n return (\n <Ark.Control\n {...props({\n \"data-with-start-slot\": startSlot != null,\n // The composed Trigger / ClearTrigger always sits at the end.\n \"data-with-end-slot\": true,\n \"data-testid\": testId,\n })}\n className={cn(inputShell({ size, variant }), className)}\n {...rest}\n >\n {startSlot != null && (\n <span className={inputSlot} aria-hidden>\n {startSlot}\n </span>\n )}\n {children}\n {endSlot != null && <span className={inputSlot}>{endSlot}</span>}\n </Ark.Control>\n )\n}\n\n// `ComponentProps` (not `…WithoutRef`) so a caller's `ref` reaches the underlying\n// `<input>` — it's the focus target for the form-control contract (focus-on-error).\nconst Input = ({ className, testId, ...rest }: ComponentProps<typeof Ark.Input> & WithTestId) => (\n <Ark.Input\n className={cn(inputControlClasses, className)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n />\n)\n\nconst Trigger = ({\n className,\n children,\n asChild,\n ...rest\n}: ComponentPropsWithoutRef<typeof Ark.Trigger>) => (\n <Ark.Trigger\n className={cn(\n popoverChevron,\n \"inline-flex cursor-pointer items-center justify-center rounded-sm\",\n \"data-[state=open]:rotate-180 disabled:cursor-not-allowed\",\n className,\n )}\n asChild={asChild}\n {...rest}\n >\n {composeChildren(asChild, children, (own) => own ?? <ChevronIcon />)}\n </Ark.Trigger>\n)\n\nconst ClearTrigger = ({\n className,\n children,\n asChild,\n ...rest\n}: ComponentPropsWithoutRef<typeof Ark.ClearTrigger>) => (\n // zag marks the combobox clear control `tabIndex={-1}`; surface it in the tab\n // order so keyboard users can reach it (matching Select's clear and the tree\n // clears). A caller can still override via `tabIndex` in `rest`.\n <Ark.ClearTrigger\n tabIndex={0}\n className={cn(popoverClearTrigger, className)}\n asChild={asChild}\n {...rest}\n >\n {composeChildren(asChild, children, (own) => own ?? <CloseIcon />)}\n </Ark.ClearTrigger>\n)\n\nconst Content = ({\n className,\n children,\n withPaddingTop = true,\n withinPortal = true,\n container,\n asChild: _asChild,\n ...rest\n}: NoAsChild<ComponentPropsWithoutRef<typeof Ark.Content>> & {\n withPaddingTop?: boolean\n /** Render the panel in a Portal so it escapes clipping ancestors.\n * Default `true`. */\n withinPortal?: boolean\n /** Portal target. Defaults to the enclosing `Modal`/`Drawer` when there is\n * one (so the panel stays above it), else `document.body`. */\n container?: HTMLElement | null\n}) => {\n const portalContainer = useOverlayContainer(container)\n // Holds an enclosing Modal/Drawer/Popover open while the list is; see `lib/overlay-layer.tsx`.\n useNestedLayer(useComboboxContext().open)\n return (\n <Portal disabled={!withinPortal} container={portalContainer}>\n <Ark.Positioner>\n <Ark.Content className={cn(popoverContent, className)} {...rest}>\n <Ark.List className={popoverList({ withPaddingTop })}>{children}</Ark.List>\n </Ark.Content>\n </Ark.Positioner>\n </Portal>\n )\n}\n\n/**\n * Inline alternative to `Content` — no `Portal`, no `Positioner`, no floating\n * chrome. For a combobox meant to render permanently open inside a container\n * the caller already owns (e.g. another `Popover`'s body), where the floating\n * machinery would just be dead weight and the wrong chrome (a card inside a\n * card). `getContentProps` doesn't require a Positioner to work — it's a plain\n * `hidden`-toggled element — so `Ark.Content` renders inline in normal flow.\n */\nconst Panel = ({\n className,\n children,\n withPaddingTop = true,\n asChild: _asChild,\n ...rest\n}: NoAsChild<ComponentPropsWithoutRef<typeof Ark.Content>> & { withPaddingTop?: boolean }) => {\n return (\n <Ark.Content {...rest}>\n <Ark.List className={cn(popoverList({ withPaddingTop }), className)}>{children}</Ark.List>\n </Ark.Content>\n )\n}\n\nexport type ComboboxItemProps = NoAsChild<\n Omit<ComponentPropsWithoutRef<typeof Ark.Item>, \"children\">\n> &\n WithTestId & {\n /**\n * Option content. A plain node renders as the label (the kit adds the check\n * indicator); a function takes over the whole row, receiving the item's live\n * state so it can draw its own affordance.\n */\n children?: ReactNode | ((state: ItemRenderState) => ReactNode)\n }\n\nconst Item = ({ className, children, testId, asChild: _asChild, ...rest }: ComboboxItemProps) => {\n const { size } = useContext(ComboboxStyleContext)\n return (\n <Ark.Item\n className={cn(popoverOption({ size }), className)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n >\n {typeof children === \"function\" ? (\n <Ark.ItemContext>\n {(ctx) => children({ selected: ctx.selected, highlighted: ctx.highlighted })}\n </Ark.ItemContext>\n ) : (\n <>\n <Ark.ItemText>{children}</Ark.ItemText>\n <Ark.ItemIndicator className={popoverIndicator}>\n <CheckIcon />\n </Ark.ItemIndicator>\n </>\n )}\n </Ark.Item>\n )\n}\n\nexport type ComboboxGroupProps = NoAsChild<ComponentPropsWithoutRef<typeof Ark.ItemGroup>> &\n WithTestId & {\n /** Group heading rendered above the options. */\n label?: ReactNode\n }\n\nconst Group = ({\n label,\n className,\n children,\n testId,\n asChild: _asChild,\n ...rest\n}: ComboboxGroupProps) => (\n <Ark.ItemGroup className={className} {...props({ \"data-testid\": testId })} {...rest}>\n {label != null && (\n <Ark.ItemGroupLabel className={popoverGroupLabel}>{label}</Ark.ItemGroupLabel>\n )}\n {children}\n </Ark.ItemGroup>\n)\n\nconst Empty = ({ className, ...rest }: ComponentPropsWithoutRef<typeof Ark.Empty>) => (\n <Ark.Empty className={cn(popoverEmpty, className)} {...rest} />\n)\n\n/**\n * Composable parts namespace (Ark-style). `Context` is Ark's render-prop access\n * to the live machine api (e.g. to map over the filtered collection).\n */\nexport const Combobox = {\n Root,\n Control,\n Input,\n Trigger,\n ClearTrigger,\n Content,\n Panel,\n Item,\n Group,\n Empty,\n Context: Ark.Context,\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/lib/slide-on-switch.ts","../src/components/popover/popover.tsx"],"names":["useState","useRef","ArkPopover","api","props"],"mappings":";;;;;;;;;;;;;;AAiCO,IAAM,UAAA,GAAa;AAAA,EACxB,kBAAA,EAAoB,WAAA;AAAA,EACpB,kBAAA,EAAoB,OAAA;AAAA,EACpB,wBAAA,EAA0B;AAC5B;AAiBO,IAAM,sBAAsB,MAAM;AACvC,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAI,SAAS,KAAK,CAAA;AAG5C,EAAA,MAAM,IAAA,GAAO,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AAA;AAAA,EACnB,OAAA;AAAA,EACA,MAAA;AAAA,EACA,IAAA;AAAA,EACA;AACF","file":"chunk-RKCUXOU2.js","sourcesContent":["import {\n Children,\n cloneElement,\n type ElementType,\n isValidElement,\n type ReactElement,\n type ReactNode,\n useRef,\n useState,\n} from \"react\"\nimport type { Positioning } from \"./placement\"\n\n/**\n * Shared by `HoverCard.Group` and `Popover.Group`: several named triggers on\n * one Ark machine, one panel that slides from the active trigger to the next.\n */\n\n/** Slide transition for a group's shared positioner. Ark sets the\n * positioner's `transform: translate3d(var(--x), var(--y), 0)` inline\n * (`@zag-js/popper`); animating `transform` itself makes the browser\n * interpolate that translate between two trigger anchors when the group's\n * active trigger changes. Passed as `style` (not a class) so it merges with,\n * rather than replaces, Ark's own inline `transform`/`position` (Ark's\n * `mergeProps` shallow-merges style objects); the same override-the-real-style\n * technique `Tabs.Indicator` / `SegmentGroup` use for their sliding pill.\n *\n * Only applied once `useSlideAfterPlaced` reports `sliding`, never on an\n * open's first placement: before it, the positioner sits at its unplaced\n * origin (far off the trigger), and animating *that* jump reads as the panel\n * flying in across the page instead of just appearing. A standalone `Root`\n * never gets this at all: it also repositions on scroll/resize\n * (`autoUpdate`), where an animated `transform` would look laggy rather than\n * responsive. */\nexport const slideStyle = {\n transitionProperty: \"transform\",\n transitionDuration: \"200ms\",\n transitionTimingFunction: \"cubic-bezier(0.32, 0.72, 0, 1)\",\n} as const\n\ntype UpdatePosition = NonNullable<Positioning[\"updatePosition\"]>\n\n/**\n * `sliding` turns true once an open's first placement has been applied, and\n * false on every close. Waiting for the placement itself, not a frame count:\n * the first one after an open can take several frames (the panel mounts,\n * zag defers to the next frame, floating-ui computes asynchronously), and a\n * transition switched on before it lands slides the panel in from its\n * unplaced origin.\n *\n * Feed every open change to `onOpenChange`, and pass `updatePosition(...)`\n * as the machine's `positioning.updatePosition` — zag calls it for every\n * placement, with its own `updatePosition` to run. A consumer's own\n * `updatePosition`, if any, is wrapped rather than replaced.\n */\nexport const useSlideAfterPlaced = () => {\n const [sliding, setSliding] = useState(false)\n // Read by placements zag finishes asynchronously, after a close may have\n // landed — one of those must not re-arm the slide for the next open.\n const open = useRef(false)\n const onOpenChange = (next: boolean) => {\n open.current = next\n if (!next) setSliding(false)\n }\n const updatePosition =\n (custom?: UpdatePosition): UpdatePosition =>\n async (data) => {\n await (custom ? custom(data) : data.updatePosition())\n if (open.current) setSliding(true)\n }\n return { sliding, onOpenChange, updatePosition }\n}\n\n/** Split a group's children into its `Content` parts (matched by `type`)\n * and everything else (the triggers), one level deep. */\nexport const splitGroupChildren = <P extends { value?: string }>(\n children: ReactNode,\n content: ElementType<P>,\n) => {\n const items = Children.toArray(children)\n const isContent = (node: ReactNode): node is ReactElement<P> =>\n isValidElement(node) && node.type === content\n return { contents: items.filter(isContent), triggers: items.filter((item) => !isContent(item)) }\n}\n\n/** The `Content` whose `value` matches the active trigger, under one forced,\n * stable `key` — overriding whatever each was authored with (e.g.\n * `key={person.handle}` in a `.map()`). The slot only ever renders one at a\n * time, but a *different* key switching in reads to React as a different\n * component, unmounting the real Positioner/Content DOM tree and mounting a\n * fresh one instead of updating it in place. That fresh mount breaks the\n * \"one shared, sliding panel\" contract: its position starts unset again, so\n * every switch would look like the panel jumping in from the top. */\nexport const activeGroupContent = (\n contents: ReactElement<{ value?: string }>[],\n triggerValue: string | null,\n) => {\n const active = contents.find((content) => content.props.value === triggerValue)\n return active ? cloneElement(active, { key: \"group-content\" }) : null\n}\n","\"use client\"\n\nimport { useLocaleContext } from \"@ark-ui/react/locale\"\nimport { Popover as ArkPopover, usePopoverContext } from \"@ark-ui/react/popover\"\nimport { Portal } from \"@ark-ui/react/portal\"\nimport { cva } from \"class-variance-authority\"\nimport {\n type ComponentPropsWithoutRef,\n createContext,\n type MouseEvent,\n type PointerEvent,\n type RefObject,\n useContext,\n useEffect,\n useRef,\n useState,\n} from \"react\"\nimport type { NoAsChild } from \"../../lib/as-child\"\nimport type { UnavailableProps } from \"../../lib/available-if\"\nimport { cn } from \"../../lib/cn\"\nimport { useOverlayContainer } from \"../../lib/overlay-container\"\nimport {\n OverlayLayerProvider,\n type OverlayLayers,\n useLayerGuard,\n useNestedLayer,\n} from \"../../lib/overlay-layer\"\nimport {\n type LogicalPosition,\n type Placement,\n type PlacementProps,\n toPositioning,\n} from \"../../lib/placement\"\nimport { props } from \"../../lib/props\"\nimport {\n activeGroupContent,\n slideStyle,\n splitGroupChildren,\n useSlideAfterPlaced,\n} from \"../../lib/slide-on-switch\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { TEXT_COLOR_CLASSES } from \"../../lib/typography-size\"\nimport { useUncontrolled } from \"../../lib/use-uncontrolled\"\n\n/*\n * Shared popover presentation. Co-located with the Popover component and reused\n * across the form family (Combobox / Select / TreeSelect / TagsInput); Ark's\n * Select / Combobox expose different part components, so these class generators\n * are applied to each machine's own parts — keeping every popover surface\n * visually identical and cheap to retheme.\n */\n\n/** Shared floating-panel chrome — border, surface, shadow, layering token, and\n * the open/close animation (origin follows `data-placement`). Every popover\n * surface builds on this so they stay visually identical. Exported so overlays\n * that aren't scroll-clipping listboxes (e.g. Menu) can build their own surface\n * on the exact same border/shadow/animation without drift.\n *\n * Brand-tinted surface, matching `InputBase`'s shell (`border-brand-900/20\n * dark:border-white/15`): the fill sits at the two extreme ends of the brand\n * scale (`brand-50` / `brand-950`, near-white/near-black) so floating panels\n * read as part of the same brand-derived surface family as inputs rather than\n * a neutral gray. The backdrop blur stays; only the fill/border are tinted. */\nexport const popoverChrome = cn(\n \"rounded-input border border-brand-900/20 dark:border-white/15\",\n \"bg-brand-50/90 dark:bg-brand-950/85\",\n \"backdrop-blur-sm\",\n \"shadow-lg focus:outline-none\",\n \"data-[state=open]:animate-popover-in data-[state=closed]:animate-popover-out\",\n \"data-[placement^=top]:origin-bottom data-[placement^=bottom]:origin-top\",\n)\n\n/** Outer chrome for the machine-driven listboxes (Combobox / Select / Autocomplete\n * / MultiSelect): border, surface, shadow, and the open/close animation. It's a\n * rounded **clipping** wrapper (`overflow-hidden`), NOT the scroller — the inner\n * `popoverList` scrolls, and this clip rounds that scrollbar's corners on the\n * scrollbar side. Border + clip on one element (like `popoverPanel`) keep the\n * border whole, and `data-state` rides here so the whole box animates in/out and\n * unmounts cleanly — no eaten corner, no floating frame on close. */\nexport const popoverContent = cn(popoverChrome, \"flex w-full flex-col overflow-hidden\")\n\n/** Inner scroll region for the machine-driven listboxes — the actual scroller,\n * nested in `popoverContent`, capped at 16rem via `--available-height`. Has no\n * border/radius of its own; the parent clip rounds its scrollbar corners. Since\n * Content is `overflow-hidden`, the machines can't auto-scroll it natively, so\n * scrolling is routed here via `scrollHighlightedIntoView` (the root's\n * `scrollToIndexFn`). */\nexport const popoverList = cva(\n [\n \"flex w-full flex-col ps-1 pe-1 pb-1\",\n \"overflow-y-auto overscroll-contain\",\n \"max-h-[min(16rem,var(--available-height,16rem))]\",\n ],\n {\n variants: {\n withPaddingTop: {\n true: \"pt-1\",\n },\n },\n },\n)\n\n/** Scroll the highlighted option into view from inside the `popoverList` scroller.\n * Wired as the combobox/select root's `scrollToIndexFn` so the machine routes\n * scrolling through here instead of its native path — which early-returns unless\n * the (now `overflow-hidden`) Content is itself scrollable. Native `scrollIntoView`\n * walks to the nearest scrollable ancestor, i.e. the List. */\nexport const scrollHighlightedIntoView = ({\n getElement,\n}: {\n getElement: () => HTMLElement | null\n}) => getElement()?.scrollIntoView({ block: \"nearest\" })\n\n/** Panel chrome for the `Popover` component — NOT a scroll container: it clips\n * its children so fixed Header/Footer and the scrolling Body sit flush inside\n * the rounded border. Pair with `popoverViewport`. Its own `overflow-hidden`\n * never clips its own shadow, and the inner Body's scrollbar is rounded by this\n * panel's clip — so it doesn't need `scrollbar-soft`. */\nexport const popoverPanel = cn(popoverChrome, \"flex flex-col overflow-hidden\")\n\n/** The scroll region inside a `Popover` panel (its `Body`). Height tracks the\n * positioner's `--available-height`, capped at 24rem. */\nexport const popoverViewport = cn(\n \"flex flex-col overflow-y-auto overscroll-contain p-1\",\n \"max-h-[min(24rem,var(--available-height,24rem))]\",\n)\n\n/** Trigger chevron — base look; add rotation per machine\n * (`data-[state=open]:rotate-180`, or `open && \"rotate-180\"`). */\nexport const popoverChevron = \"shrink-0 text-black/50 transition-transform dark:text-white/50\"\n\n/** Clear (×) button — shared by Combobox / Select / TagsInput / NumberInput clear triggers. */\nexport const popoverClearTrigger =\n \"inline-flex shrink-0 cursor-pointer items-center justify-center rounded-full text-black/50 transition-colors hover:text-brand-900/70 dark:text-white/50 dark:hover:text-white/80\"\n\n/** A single option row. Highlight is `data-highlighted`, selection is\n * `data-state=checked`, both owned by the Ark machine. Highlight is neutral\n * and transparent — a low-opacity black/white wash, not an opaque gray —\n * matching the surface's own background-dependent tint (no Figma reference\n * for this specific state yet, so this is a considered default, not an\n * extracted value). */\nexport const popoverOption = cva(\n [\n \"relative flex cursor-pointer items-center gap-2 rounded-sm\",\n \"select-none outline-none\",\n TEXT_COLOR_CLASSES.primary,\n \"data-highlighted:bg-black/5 dark:data-highlighted:bg-white/8\",\n \"data-[state=checked]:font-medium\",\n \"data-disabled:pointer-events-none data-disabled:opacity-50\",\n ],\n {\n variants: {\n size: {\n xs: \"px-2 py-1 text-xs\",\n sm: \"px-2 py-1 text-sm\",\n md: \"px-2.5 py-1.5 text-md\",\n lg: \"px-3 py-2 text-lg\",\n xl: \"px-3.5 py-2.5 text-xl\",\n },\n },\n defaultVariants: { size: \"md\" },\n },\n)\n\n/** The check / selected indicator slot at the inline-end of an option. */\nexport const popoverIndicator =\n \"ms-auto inline-flex shrink-0 items-center text-(--c-solid) [&_svg]:size-4\"\n\n/** Group heading above a set of options. */\nexport const popoverGroupLabel = cn(\n \"px-2 py-1.5 text-xs font-medium select-none\",\n TEXT_COLOR_CLASSES.muted,\n)\n\n/** Empty / nothing-found message. */\nexport const popoverEmpty = cn(\n \"px-2 py-6 text-center text-sm select-none\",\n TEXT_COLOR_CLASSES.muted,\n)\n\n/**\n * Popover — the kit's floating panel, a styled layer over Ark UI's Popover.\n *\n * <Popover.Root open={open} onOpenChange={...}>\n * <Popover.Trigger asChild><button>…</button></Popover.Trigger>\n * <Popover.Content>\n * <Popover.Header>…</Popover.Header> // optional fixed slot\n * <Popover.Body>…</Popover.Body> // the scroll region\n * <Popover.Footer>…</Popover.Footer> // optional fixed slot\n * </Popover.Content>\n * </Popover.Root>\n *\n * It's a *panel*, not a menu: hosts (TreeSelect, custom pickers) render their own\n * rows inside `Body`. Portaled by default (escapes `overflow:hidden` ancestors),\n * width-matched to the trigger, and animated via the kit's `popover-in/out`.\n *\n * `mode=\"hover\"` adds a delayed hover preview on top of the click: hovering the\n * trigger opens the panel after `openDelay` without moving focus, and leaving\n * both the trigger and the panel closes it after `closeDelay`. A click, a tap\n * or Enter/Space on the trigger — or a press or focus inside a previewing\n * panel — *pins* it: from then on it behaves as a plain Popover (focus moves\n * in, pointer-leave is ignored, Escape / outside click / Tab out dismisses).\n * It's the interactive counterpart of `HoverCard`, whose content is a\n * mouse-only, unfocusable link preview by design (Ark's HoverCard ignores\n * touch and never takes focus).\n */\n\n/** `position` accepts Ark's physical placements plus the logical, RTL-aware\n * horizontal sides `start` / `end` (resolved to `left` / `right` by direction). */\nexport type PopoverPosition = LogicalPosition<Placement>\n\n/** Elements a pinned panel can move focus to — the first one wins, else the\n * panel itself (it carries `tabIndex={-1}`). Mirrors what zag's own\n * `autoFocus` picks on a fresh open, which the upgrade path can't reuse: zag\n * only runs it on entering the open state, and an upgraded preview is\n * already open. */\nconst tabbableSelector = [\n \"a[href]\",\n \"button:not(:disabled)\",\n \"input:not(:disabled):not([type=hidden])\",\n \"select:not(:disabled)\",\n \"textarea:not(:disabled)\",\n \"[contenteditable=true]\",\n \"[tabindex]:not([tabindex='-1'])\",\n].join(\",\")\n\n/** How a `mode=\"hover\"` panel was opened: `\"hover\"` is the delayed,\n * focus-free preview; `\"press\"` is the pinned, regular Popover. */\ntype HoverSource = \"hover\" | \"press\"\n\ntype PopoverHover = {\n /** Open and opened by a press (or upgraded from a preview). */\n pinned: boolean\n /** Pointer entering the trigger or the panel. `value` is the entered\n * trigger's, inside `Popover.Group`; the panel passes none. */\n onPointerEnter: (event: PointerEvent, value?: string) => void\n /** Pointer leaving the trigger or the panel. */\n onPointerLeave: (event: PointerEvent) => void\n /** A trigger click about to reach Ark — flags a click on an open preview,\n * so whatever Ark answers it with (a close, or a switch to another\n * trigger) becomes a pin instead. */\n onTriggerClickCapture: (event: MouseEvent<HTMLElement>) => void\n /** A press or focus inside the panel. */\n pin: () => void\n}\n\ntype PopoverContextValue = {\n width: \"target\" | \"auto\"\n withinPortal: boolean\n container?: HTMLElement | null\n /** Open layers nested in this popover; see `lib/overlay-layer.tsx`. */\n layers: OverlayLayers\n /** Set only in `mode=\"hover\"`. */\n hover?: PopoverHover\n /** `Popover.Group`'s shared panel, past its open's first placement —\n * gates the slide between triggers (see `useSlideAfterPlaced`). */\n sliding: boolean\n}\nconst PopoverContext = createContext<PopoverContextValue>({\n width: \"target\",\n withinPortal: true,\n layers: new Set(),\n sliding: false,\n})\n\ntype PopoverHoverDelays = {\n /** Hover time in ms before the preview opens. Default `600`, like `HoverCard`. */\n openDelay?: number\n /** Time in ms after the pointer leaves the trigger and the panel before the\n * preview closes. Default `300`, like `HoverCard`. A pinned panel ignores it. */\n closeDelay?: number\n}\n\n/** `openDelay`/`closeDelay` only mean something with `mode=\"hover\"`, so a\n * click popover rejects them at compile time instead of dropping them. */\ntype PopoverModeProps =\n | ({\n /** `\"click\"` (default) opens on click/tap/Enter only. `\"hover\"` also\n * opens a delayed, focus-free preview on hover, which a click, or a\n * press or focus inside it, pins open as a regular popover. */\n mode?: \"click\"\n } & UnavailableProps<PopoverHoverDelays, 'requires mode=\"hover\"'>)\n | ({ mode: \"hover\" } & PopoverHoverDelays)\n\nexport type PopoverProps = Omit<ArkPopover.RootProps, \"positioning\"> &\n PopoverModeProps &\n PlacementProps & {\n /** Match the trigger's width (`\"target\"`, default) or size to content (`\"auto\"`). */\n width?: \"target\" | \"auto\"\n /** Render the panel in a Portal so it escapes clipping ancestors. Default `true`. */\n withinPortal?: boolean\n /** Portal target. Defaults to the enclosing `Modal`/`Drawer` when there is\n * one (so the panel stays above it), else `document.body`. */\n container?: HTMLElement | null\n /** Fires on close (any source) — Escape, outside interaction, or a controlled `onOpenChange`. */\n onClose?: () => void\n }\n\n/** A `Unavailable`-branded delay narrows back to its default. */\nconst delay = (value: unknown, fallback: number) => (typeof value === \"number\" ? value : fallback)\n\n/** Focus the first tabbable element of the panel a trigger controls, else the\n * panel itself — on the next frame, once the pin has re-rendered. */\nconst focusInto = (trigger: HTMLElement, initialFocusEl?: () => HTMLElement | null) =>\n requestAnimationFrame(() => {\n const id = trigger.getAttribute(\"aria-controls\")\n const panel = id ? trigger.ownerDocument.getElementById(id) : null\n if (!panel || panel.contains(trigger.ownerDocument.activeElement)) return\n const target = initialFocusEl?.() ?? panel.querySelector<HTMLElement>(tabbableSelector) ?? panel\n target.focus({ preventScroll: true })\n })\n\n/** Ark's live Popover API, for the hover path to send zag events through. */\ntype PopoverApi = ReturnType<typeof usePopoverContext>\n\n/** `Popover.Group`'s link into the Ark root, rendered inside it: keeps `api`\n * pointing at the machine's current API for the hover hook (which runs\n * above the root), and re-anchors the panel whenever the active trigger\n * changes. zag's trigger switch does reposition, but in the same action,\n * against the render it was sent from — still the old trigger — so on its\n * own the panel would swap content in place. (HoverCard's machine gets\n * away with it because its switch re-enters the open state.) */\nconst GroupBridge = ({ api }: { api: RefObject<PopoverApi | null> }) => {\n const live = usePopoverContext()\n useEffect(() => {\n api.current = live\n })\n // biome-ignore lint/correctness/useExhaustiveDependencies: keyed on the active trigger only; `live` is a new object every render.\n useEffect(() => {\n if (live.open) live.reposition()\n }, [live.triggerValue])\n return null\n}\n\ntype UsePopoverHoverOptions = {\n /** The machine's API (see `GroupBridge`); set once the Ark root mounts. */\n api: RefObject<PopoverApi | null>\n open?: boolean\n defaultOpen?: boolean\n openDelay: number\n closeDelay: number\n autoFocus: boolean\n initialFocusEl?: () => HTMLElement | null\n onChange: (open: boolean) => void\n}\n\n/**\n * `mode=\"hover\"`'s state: owns `open` (still controllable through\n * `open`/`defaultOpen`/`onOpenChange`) and *how* it was opened, and drives\n * Ark's machine fully controlled. The hover path never goes through Ark —\n * zag's Popover has no hover — it just flips `open` on a timer. Everything\n * else is Ark's: its trigger click, Escape and outside-click arrive as\n * `onArkOpenChange`, and the only one rewritten is a click on an open preview,\n * which zag answers with a close and this turns into a pin.\n *\n * `source` is deliberately not reset on close: zag reads `restoreFocus` when\n * the close lands, so a preview closing must still read as `\"hover\"` there,\n * or it would yank focus to a trigger the user never focused.\n *\n * Inside `Popover.Group`, hovering a trigger also makes it the active one,\n * through zag's own `setTriggerValue` — the one path that re-anchors the\n * panel too (zag repositions in the same action, reading the value it just\n * set; a controlled `triggerValue` prop would still hold the old one there).\n * So zag owns the value, and the hook never mirrors it. Over an open preview\n * that switch is immediate (the panel slides, no delay replays); a pinned\n * panel ignores hover and stays on its trigger. A click on an open preview\n * pins it whichever answer zag gives: a close for the active trigger, a\n * switch for another one. Which comes is zag's call, so the hook never\n * predicts it — by the time a click lands, a hover may have moved the\n * trigger already.\n */\nconst usePopoverHover = ({\n api,\n open,\n defaultOpen,\n openDelay,\n closeDelay,\n autoFocus,\n initialFocusEl,\n onChange,\n}: UsePopoverHoverOptions) => {\n const [isOpen, setOpen] = useUncontrolled<boolean>({\n value: open,\n defaultValue: defaultOpen,\n finalValue: false,\n onChange,\n })\n const [source, setSource] = useState<HoverSource>(\"press\")\n const timer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined)\n // The trigger of a click that landed on an open preview, between its\n // capture phase and the close or switch Ark answers it with.\n const upgrading = useRef<HTMLElement | null>(null)\n const clear = () => {\n clearTimeout(timer.current)\n timer.current = undefined\n }\n // Unmount only; reads the ref at cleanup time, so it needs no deps.\n useEffect(() => () => clearTimeout(timer.current), [])\n const later = (next: boolean, ms: number) => {\n clear()\n timer.current = setTimeout(() => {\n timer.current = undefined\n setOpen(next)\n }, ms)\n }\n\n const pinned = isOpen && source === \"press\"\n const hover: PopoverHover = {\n pinned,\n onPointerEnter: (event, value) => {\n if (event.pointerType === \"touch\" || pinned) return\n if (value !== undefined && api.current && api.current.triggerValue !== value)\n api.current.setTriggerValue(value)\n if (isOpen) return clear()\n setSource(\"hover\")\n later(true, openDelay)\n },\n onPointerLeave: (event) => {\n if (event.pointerType === \"touch\" || pinned) return\n if (isOpen) later(false, closeDelay)\n else clear()\n },\n onTriggerClickCapture: (event) => {\n upgrading.current = isOpen && source === \"hover\" ? event.currentTarget : null\n },\n pin: () => {\n clear()\n setSource(\"press\")\n },\n }\n\n const onArkOpenChange = ({ open: next }: { open: boolean }) => {\n clear()\n const trigger = upgrading.current\n upgrading.current = null\n if (!next && trigger) {\n setSource(\"press\")\n if (autoFocus) focusInto(trigger, initialFocusEl)\n return\n }\n if (next) setSource(\"press\")\n setOpen(next)\n }\n\n return {\n open: isOpen,\n press: source === \"press\",\n hover,\n onArkOpenChange,\n /** zag switched triggers — pins it if a click on a preview caused it. */\n onArkTriggerValueChange: () => {\n const trigger = upgrading.current\n upgrading.current = null\n if (!trigger) return\n clear()\n setSource(\"press\")\n if (autoFocus) focusInto(trigger, initialFocusEl)\n },\n }\n}\n\n/** `Root` and `Group` — one machine; `group` swaps plain children for\n * `Trigger`s plus the active trigger's `Content`. */\nconst Machine = ({\n group,\n mode = \"click\",\n openDelay,\n closeDelay,\n width = \"target\",\n position,\n gutter,\n offset,\n hideWhenDetached,\n positioning,\n withinPortal = true,\n container,\n children,\n open,\n defaultOpen,\n triggerValue,\n defaultTriggerValue,\n onTriggerValueChange,\n autoFocus = true,\n restoreFocus = true,\n modal = false,\n onOpenChange,\n onClose,\n onPointerDownOutside,\n ...rest\n}: PopoverProps & { group: boolean }) => {\n const { dir } = useLocaleContext()\n const guard = useLayerGuard(onPointerDownOutside)\n const slide = useSlideAfterPlaced()\n const api = useRef<PopoverApi | null>(null)\n const notify = (details: { open: boolean }) => {\n onOpenChange?.(details)\n if (group) slide.onOpenChange(details.open)\n if (!details.open) onClose?.()\n }\n const hovering = usePopoverHover({\n api,\n open,\n defaultOpen,\n openDelay: delay(openDelay, 600),\n closeDelay: delay(closeDelay, 300),\n autoFocus,\n initialFocusEl: rest.initialFocusEl,\n onChange: (next) => notify({ open: next }),\n })\n const hover = mode === \"hover\" ? hovering.hover : undefined\n // A preview is never modal and never moves or restores focus; a pinned\n // panel takes the consumer's settings. zag reads all three on entering or\n // leaving the open state, which `source` is stable across.\n const press = !hover || hovering.press\n const state = hover\n ? { open: hovering.open, onOpenChange: hovering.onArkOpenChange }\n : { open, defaultOpen, onOpenChange: notify }\n const parts = group ? splitGroupChildren(children, Content) : undefined\n return (\n <PopoverContext.Provider\n value={{\n width,\n withinPortal,\n container,\n layers: guard.layers,\n hover,\n sliding: group && slide.sliding,\n }}\n >\n <ArkPopover.Root\n // A group's panel mounts on each open, like HoverCard's, so its first\n // frame never inherits a stale position to slide from.\n lazyMount={group}\n unmountOnExit={group}\n onPointerDownOutside={guard.onPointerDownOutside}\n positioning={toPositioning(\n {\n position,\n gutter,\n offset,\n hideWhenDetached,\n positioning: group\n ? {\n ...positioning,\n updatePosition: slide.updatePosition(positioning?.updatePosition),\n }\n : positioning,\n },\n dir,\n width,\n )}\n autoFocus={press && autoFocus}\n restoreFocus={press && restoreFocus}\n modal={press && modal}\n triggerValue={triggerValue}\n defaultTriggerValue={defaultTriggerValue}\n onTriggerValueChange={(details) => {\n onTriggerValueChange?.(details)\n hovering.onArkTriggerValueChange()\n }}\n {...state}\n {...rest}\n >\n {parts ? (\n <>\n <GroupBridge api={api} />\n {parts.triggers}\n <ArkPopover.Context>\n {(api) => activeGroupContent(parts.contents, api.triggerValue)}\n </ArkPopover.Context>\n </>\n ) : (\n children\n )}\n </ArkPopover.Root>\n </PopoverContext.Provider>\n )\n}\n\nconst Root = (props: PopoverProps) => <Machine group={false} {...props} />\n\nexport type PopoverGroupProps = PopoverProps\n\n/**\n * One shared panel across several triggers (e.g. a row of avatars) — the\n * same `Popover.Trigger` / `Popover.Content` parts `Popover.Root` uses, just\n * several of each, matched by a shared `value`. The Popover counterpart of\n * `HoverCard.Group`, with the same contract, for cards people act on:\n *\n * <Popover.Group mode=\"hover\" width=\"auto\">\n * <Popover.Trigger value=\"ada\"><Avatar name=\"Ada Lovelace\" /></Popover.Trigger>\n * <Popover.Trigger value=\"grace\"><Avatar name=\"Grace Hopper\" /></Popover.Trigger>\n *\n * <Popover.Content value=\"ada\">Ada's card</Popover.Content>\n * <Popover.Content value=\"grace\">Grace's card</Popover.Content>\n * </Popover.Group>\n *\n * zag's Popover supports several named triggers on one machine: clicking\n * another trigger while the panel is open moves it there instead of closing\n * it, and only the active trigger gets `aria-expanded`. In `mode=\"hover\"`,\n * hovering another trigger while the preview is open moves it too, with no\n * delay replay; a click, tap or Enter on any trigger, or a press or focus in\n * the panel, pins it exactly like a single `mode=\"hover\"` Popover. Either\n * way the panel slides between triggers (`slideStyle`), never on the first\n * open.\n *\n * `triggerValue` / `defaultTriggerValue` / `onTriggerValueChange` read and\n * drive the active trigger. `Trigger`/`Content` must be `Group`'s own direct\n * children (it scans one level, like `HoverCard.Group`); `Group` renders no\n * DOM node, so wrap it from the outside for row layout (`Avatar.Group`).\n */\nconst Group = (props: PopoverGroupProps) => <Machine group {...props} />\n\nexport type PopoverTriggerProps = ArkPopover.TriggerProps & WithTestId\n\n/** Ark's trigger, plus the hover handlers in `mode=\"hover\"`. Ark merges them\n * with its own, so `asChild` and the click/keyboard toggle are untouched. */\nconst Trigger = ({\n onPointerEnter,\n onPointerLeave,\n onClickCapture,\n testId,\n ...rest\n}: PopoverTriggerProps) => {\n const { hover } = useContext(PopoverContext)\n return (\n <ArkPopover.Trigger\n onPointerEnter={(event) => {\n onPointerEnter?.(event)\n hover?.onPointerEnter(event, rest.value)\n }}\n onPointerLeave={(event) => {\n onPointerLeave?.(event)\n hover?.onPointerLeave(event)\n }}\n onClickCapture={(event) => {\n onClickCapture?.(event)\n hover?.onTriggerClickCapture(event)\n }}\n {...props({ \"data-testid\": testId })}\n {...rest}\n />\n )\n}\n\nexport type PopoverContentProps = NoAsChild<ArkPopover.ContentProps> &\n WithTestId & {\n /** Which `Popover.Group` trigger this content belongs to — only\n * meaningful inside `Popover.Group`, where `Group` renders the one whose\n * `value` matches the active trigger. Never forwarded to the DOM. */\n value?: string\n }\n\nconst Content = ({\n className,\n children,\n testId,\n onPointerEnter,\n onPointerLeave,\n onPointerDown,\n onFocus,\n asChild: _asChild,\n value: _value,\n ...rest\n}: PopoverContentProps) => {\n const { width, withinPortal, container, layers, hover, sliding } = useContext(PopoverContext)\n const portalContainer = useOverlayContainer(container)\n // A child of the enclosing Modal/Drawer/Popover (read above this popover's\n // own provider), and the parent of whatever opens from its body.\n useNestedLayer(usePopoverContext().open)\n const panel = (\n <ArkPopover.Positioner style={sliding ? slideStyle : undefined}>\n <ArkPopover.Content\n tabIndex={-1}\n // target → fill the sameWidth positioner; auto → size to content (max-content).\n className={cn(popoverPanel, width === \"target\" ? \"w-full\" : \"w-max\", className)}\n {...props({ \"data-testid\": testId })}\n // In `mode=\"hover\"`: reaching the panel keeps a preview open, and\n // pressing or focusing anything in it (a click, or Tab through\n // zag's `proxyTabFocus`) pins it.\n onPointerEnter={(event) => {\n onPointerEnter?.(event)\n hover?.onPointerEnter(event)\n }}\n onPointerLeave={(event) => {\n onPointerLeave?.(event)\n hover?.onPointerLeave(event)\n }}\n onPointerDown={(event) => {\n onPointerDown?.(event)\n hover?.pin()\n }}\n onFocus={(event) => {\n onFocus?.(event)\n hover?.pin()\n }}\n {...rest}\n >\n <OverlayLayerProvider value={layers}>{children}</OverlayLayerProvider>\n </ArkPopover.Content>\n </ArkPopover.Positioner>\n )\n if (!withinPortal) return panel\n return <Portal container={portalContainer}>{panel}</Portal>\n}\n\nconst slotEdge = \"shrink-0 px-2 py-1.5 border-brand-900/20 dark:border-white/15\"\n\nexport type PopoverHeaderProps = ComponentPropsWithoutRef<\"div\"> & WithTestId\n\n/** Fixed slot above the scrolling Body — a search input, filters, etc. */\nconst Header = ({ className, testId, ...rest }: PopoverHeaderProps) => (\n <div\n className={cn(slotEdge, \"border-b\", className)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n />\n)\n\nexport type PopoverFooterProps = ComponentPropsWithoutRef<\"div\"> & WithTestId\n\n/** Fixed slot below the scrolling Body. Unlike `Header`, it draws no divider: a footer of\n * actions (Apply / Cancel, a time row) reads as part of the panel, the way `Modal` and\n * `Drawer` footers do. `slotEdge` still sets the hairline colour, so a consumer who wants\n * one adds only `className=\"border-t\"`. */\nconst Footer = ({ className, testId, ...rest }: PopoverFooterProps) => (\n <div className={cn(slotEdge, className)} {...props({ \"data-testid\": testId })} {...rest} />\n)\n\nexport type PopoverBodyProps = ComponentPropsWithoutRef<\"div\"> & WithTestId\n\n/** The scroll region; hosts render their rows (and any empty message) here. */\nconst Body = ({ className, testId, ...rest }: PopoverBodyProps) => (\n <div\n className={cn(popoverViewport, slotEdge, className)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n />\n)\n\nexport type PopoverAnchorProps = ArkPopover.AnchorProps\n\nexport const Popover = {\n Root,\n Group,\n Trigger,\n /** Positions the panel without attaching any click/keyboard trigger\n * semantics — for a host that already owns its own click resolution\n * (e.g. `Schedule`'s drag-vs-click gesture) and only needs the panel to\n * float relative to a given element. */\n Anchor: ArkPopover.Anchor,\n Content,\n Header,\n Body,\n Footer,\n}\n"]}