@42-central/ui-react 0.17.0 → 0.18.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 (346) hide show
  1. package/README.md +36 -175
  2. package/dist/{chunk-FD6P6PLQ.js → chunk-5JHDSVEZ.js} +3 -3
  3. package/dist/{chunk-FD6P6PLQ.js.map → chunk-5JHDSVEZ.js.map} +1 -1
  4. package/dist/{chunk-QMW7D5GU.js → chunk-5OQLFX47.js} +4 -3
  5. package/dist/chunk-5OQLFX47.js.map +1 -0
  6. package/dist/{chunk-VZ2TPU4B.js → chunk-6GDMSENK.js} +3 -2
  7. package/dist/chunk-6GDMSENK.js.map +1 -0
  8. package/dist/{chunk-TNNH3FVQ.js → chunk-6OLTJYSX.js} +24 -8
  9. package/dist/chunk-6OLTJYSX.js.map +1 -0
  10. package/dist/{chunk-POKDSVQT.js → chunk-AE7QTLJ5.js} +5 -4
  11. package/dist/chunk-AE7QTLJ5.js.map +1 -0
  12. package/dist/{chunk-44OV3PNH.js → chunk-B2YJKRNQ.js} +3 -3
  13. package/dist/{chunk-44OV3PNH.js.map → chunk-B2YJKRNQ.js.map} +1 -1
  14. package/dist/{chunk-YIQI2CF3.js → chunk-CTSO6V72.js} +3 -2
  15. package/dist/chunk-CTSO6V72.js.map +1 -0
  16. package/dist/{chunk-ACE7FBWE.js → chunk-EBREIC3L.js} +5 -4
  17. package/dist/chunk-EBREIC3L.js.map +1 -0
  18. package/dist/{chunk-UNSAA7YG.js → chunk-FHG54IT5.js} +3 -2
  19. package/dist/chunk-FHG54IT5.js.map +1 -0
  20. package/dist/{chunk-3GYOIQW7.js → chunk-FZIHZT5R.js} +5 -5
  21. package/dist/{chunk-3GYOIQW7.js.map → chunk-FZIHZT5R.js.map} +1 -1
  22. package/dist/{chunk-2H46IXW4.js → chunk-HAQJQFE6.js} +28 -8
  23. package/dist/chunk-HAQJQFE6.js.map +1 -0
  24. package/dist/{chunk-IHYFYMHJ.js → chunk-HT5JAHR3.js} +6 -6
  25. package/dist/{chunk-IHYFYMHJ.js.map → chunk-HT5JAHR3.js.map} +1 -1
  26. package/dist/chunk-I4SQQIP5.js +12 -0
  27. package/dist/chunk-I4SQQIP5.js.map +1 -0
  28. package/dist/{chunk-J3PELDH3.js → chunk-JITF6I7N.js} +22 -6
  29. package/dist/chunk-JITF6I7N.js.map +1 -0
  30. package/dist/{chunk-IFWCCAQV.js → chunk-KHMFNH3X.js} +3 -2
  31. package/dist/chunk-KHMFNH3X.js.map +1 -0
  32. package/dist/{chunk-SIG4DMNZ.js → chunk-MI2WZRK3.js} +4 -4
  33. package/dist/{chunk-SIG4DMNZ.js.map → chunk-MI2WZRK3.js.map} +1 -1
  34. package/dist/{chunk-PJL4ZL5V.js → chunk-O23Y5ML4.js} +8 -8
  35. package/dist/{chunk-PJL4ZL5V.js.map → chunk-O23Y5ML4.js.map} +1 -1
  36. package/dist/{chunk-P7A3BCAC.js → chunk-OWG4BCQR.js} +3 -3
  37. package/dist/{chunk-P7A3BCAC.js.map → chunk-OWG4BCQR.js.map} +1 -1
  38. package/dist/{chunk-FUWSTUDM.js → chunk-PH354ECN.js} +4 -4
  39. package/dist/{chunk-FUWSTUDM.js.map → chunk-PH354ECN.js.map} +1 -1
  40. package/dist/{chunk-U5GW5EBR.js → chunk-RAUOFTUH.js} +12 -20
  41. package/dist/chunk-RAUOFTUH.js.map +1 -0
  42. package/dist/{chunk-2762HZYX.js → chunk-S2HWWR2H.js} +47 -25
  43. package/dist/chunk-S2HWWR2H.js.map +1 -0
  44. package/dist/{chunk-VLUKI3HL.js → chunk-S7N4LGLZ.js} +6 -13
  45. package/dist/chunk-S7N4LGLZ.js.map +1 -0
  46. package/dist/{chunk-TMMEJKLI.js → chunk-UHNRAI6V.js} +17 -4
  47. package/dist/chunk-UHNRAI6V.js.map +1 -0
  48. package/dist/{chunk-3NZXWCGF.js → chunk-WHKKN3ZK.js} +6 -6
  49. package/dist/{chunk-3NZXWCGF.js.map → chunk-WHKKN3ZK.js.map} +1 -1
  50. package/dist/{chunk-MOI7B3KH.js → chunk-WQN64ZHG.js} +5 -5
  51. package/dist/{chunk-MOI7B3KH.js.map → chunk-WQN64ZHG.js.map} +1 -1
  52. package/dist/chunk-WSIVRDRB.js +34 -0
  53. package/dist/chunk-WSIVRDRB.js.map +1 -0
  54. package/dist/{chunk-6SWK4XG5.js → chunk-YXE4B6X3.js} +2 -2
  55. package/dist/chunk-YXE4B6X3.js.map +1 -0
  56. package/dist/{chunk-NGAQITWP.js → chunk-Z2Z5EXVT.js} +10 -7
  57. package/dist/chunk-Z2Z5EXVT.js.map +1 -0
  58. package/dist/{chunk-IXKELBJA.js → chunk-ZDXQ64A7.js} +63 -44
  59. package/dist/chunk-ZDXQ64A7.js.map +1 -0
  60. package/dist/components/accordion/accordion-data.d.ts +3 -2
  61. package/dist/components/accordion/accordion-data.d.ts.map +1 -1
  62. package/dist/components/accordion/accordion.d.ts +2 -2
  63. package/dist/components/accordion/accordion.d.ts.map +1 -1
  64. package/dist/components/accordion/index.js +20 -8
  65. package/dist/components/accordion/index.js.map +1 -1
  66. package/dist/components/action-icon/action-icon.d.ts +3 -4
  67. package/dist/components/action-icon/action-icon.d.ts.map +1 -1
  68. package/dist/components/action-icon/index.js +2 -1
  69. package/dist/components/alert/alert.d.ts +18 -10
  70. package/dist/components/alert/alert.d.ts.map +1 -1
  71. package/dist/components/alert/index.js +17 -5
  72. package/dist/components/alert/index.js.map +1 -1
  73. package/dist/components/app-shell/app-shell.d.ts +3 -2
  74. package/dist/components/app-shell/app-shell.d.ts.map +1 -1
  75. package/dist/components/app-shell/index.js +4 -2
  76. package/dist/components/app-shell/index.js.map +1 -1
  77. package/dist/components/autocomplete/index.js +5 -4
  78. package/dist/components/autocomplete/index.js.map +1 -1
  79. package/dist/components/breadcrumb/breadcrumb.d.ts +3 -2
  80. package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -1
  81. package/dist/components/breadcrumb/index.js +11 -5
  82. package/dist/components/breadcrumb/index.js.map +1 -1
  83. package/dist/components/button/button.d.ts +4 -4
  84. package/dist/components/button/button.d.ts.map +1 -1
  85. package/dist/components/button/index.js +2 -1
  86. package/dist/components/button-multi-select/index.js +4 -3
  87. package/dist/components/button-multi-select/index.js.map +1 -1
  88. package/dist/components/button-select/index.js +4 -3
  89. package/dist/components/button-select/index.js.map +1 -1
  90. package/dist/components/calendar/calendar-body.d.ts.map +1 -1
  91. package/dist/components/calendar/index.js +3 -2
  92. package/dist/components/checkbox/index.js +2 -2
  93. package/dist/components/choice-card-group/index.js +1 -1
  94. package/dist/components/circular-progress/circular-progress.d.ts +3 -2
  95. package/dist/components/circular-progress/circular-progress.d.ts.map +1 -1
  96. package/dist/components/circular-progress/index.js +1 -0
  97. package/dist/components/circular-progress/index.js.map +1 -1
  98. package/dist/components/clipboard/clipboard.d.ts +1 -1
  99. package/dist/components/clipboard/clipboard.d.ts.map +1 -1
  100. package/dist/components/clipboard/index.js +9 -5
  101. package/dist/components/clipboard/index.js.map +1 -1
  102. package/dist/components/code-block/chrome.d.ts +4 -1
  103. package/dist/components/code-block/chrome.d.ts.map +1 -1
  104. package/dist/components/code-block/chrome.js +5 -4
  105. package/dist/components/code-block/code-block.d.ts +7 -1
  106. package/dist/components/code-block/code-block.d.ts.map +1 -1
  107. package/dist/components/code-block/index.d.ts +1 -1
  108. package/dist/components/code-block/index.js +12 -10
  109. package/dist/components/code-block/index.js.map +1 -1
  110. package/dist/components/code-block/notation.d.ts +5 -2
  111. package/dist/components/code-block/notation.d.ts.map +1 -1
  112. package/dist/components/code-block/static.d.ts +4 -1
  113. package/dist/components/code-block/static.d.ts.map +1 -1
  114. package/dist/components/code-block/static.js +5 -4
  115. package/dist/components/code-block/static.js.map +1 -1
  116. package/dist/components/collapse/collapse.d.ts +7 -3
  117. package/dist/components/collapse/collapse.d.ts.map +1 -1
  118. package/dist/components/collapse/index.js +2 -1
  119. package/dist/components/combobox/combobox.d.ts +11 -10
  120. package/dist/components/combobox/combobox.d.ts.map +1 -1
  121. package/dist/components/combobox/index.js +5 -4
  122. package/dist/components/combobox-list/index.js +6 -5
  123. package/dist/components/data-table/index.js +20 -19
  124. package/dist/components/data-table/index.js.map +1 -1
  125. package/dist/components/date-picker/index.js +12 -11
  126. package/dist/components/date-picker/index.js.map +1 -1
  127. package/dist/components/divider/divider.d.ts +3 -2
  128. package/dist/components/divider/divider.d.ts.map +1 -1
  129. package/dist/components/divider/index.js +1 -1
  130. package/dist/components/drawer/drawer.d.ts +6 -5
  131. package/dist/components/drawer/drawer.d.ts.map +1 -1
  132. package/dist/components/drawer/index.js +3 -2
  133. package/dist/components/field/field.d.ts +7 -4
  134. package/dist/components/field/field.d.ts.map +1 -1
  135. package/dist/components/field/index.js +1 -1
  136. package/dist/components/file-upload/index.js +3 -2
  137. package/dist/components/file-upload/index.js.map +1 -1
  138. package/dist/components/hover-card/index.js +1 -1
  139. package/dist/components/input/index.js +2 -2
  140. package/dist/components/input/input.d.ts +3 -2
  141. package/dist/components/input/input.d.ts.map +1 -1
  142. package/dist/components/menu/index.js +3 -2
  143. package/dist/components/menu/index.js.map +1 -1
  144. package/dist/components/menu/menu-data.d.ts +6 -1
  145. package/dist/components/menu/menu-data.d.ts.map +1 -1
  146. package/dist/components/menu/menu.d.ts +5 -5
  147. package/dist/components/menu/menu.d.ts.map +1 -1
  148. package/dist/components/modal/index.js +3 -2
  149. package/dist/components/modal/modal.d.ts +4 -3
  150. package/dist/components/modal/modal.d.ts.map +1 -1
  151. package/dist/components/multi-combobox-list/index.js +6 -5
  152. package/dist/components/multi-select/index.js +7 -6
  153. package/dist/components/multi-select/index.js.map +1 -1
  154. package/dist/components/nav-link/index.js +3 -2
  155. package/dist/components/nav-link/tanstack.js +3 -2
  156. package/dist/components/nav-link/tanstack.js.map +1 -1
  157. package/dist/components/notification/create-notifier.d.ts.map +1 -1
  158. package/dist/components/notification/index.js +8 -7
  159. package/dist/components/notification/index.js.map +1 -1
  160. package/dist/components/notification/notification.d.ts +7 -6
  161. package/dist/components/notification/notification.d.ts.map +1 -1
  162. package/dist/components/number-input/index.js +4 -4
  163. package/dist/components/overlays/index.js +5 -4
  164. package/dist/components/overlays/index.js.map +1 -1
  165. package/dist/components/password-input/index.js +2 -2
  166. package/dist/components/pill/index.js +2 -1
  167. package/dist/components/pill/pill.d.ts +4 -2
  168. package/dist/components/pill/pill.d.ts.map +1 -1
  169. package/dist/components/pills-input/index.js +5 -4
  170. package/dist/components/pills-input/pills-input.d.ts +3 -2
  171. package/dist/components/pills-input/pills-input.d.ts.map +1 -1
  172. package/dist/components/pin-input/index.js +2 -2
  173. package/dist/components/popover/index.js +1 -1
  174. package/dist/components/popover/popover.d.ts +3 -2
  175. package/dist/components/popover/popover.d.ts.map +1 -1
  176. package/dist/components/progress/index.js +1 -0
  177. package/dist/components/progress/index.js.map +1 -1
  178. package/dist/components/progress/progress.d.ts +3 -2
  179. package/dist/components/progress/progress.d.ts.map +1 -1
  180. package/dist/components/radio-group/index.js +1 -1
  181. package/dist/components/rating/index.js +2 -1
  182. package/dist/components/rating/index.js.map +1 -1
  183. package/dist/components/rating/rating.d.ts +3 -2
  184. package/dist/components/rating/rating.d.ts.map +1 -1
  185. package/dist/components/schedule/index.d.ts +4 -4
  186. package/dist/components/schedule/index.js +211 -110
  187. package/dist/components/schedule/index.js.map +1 -1
  188. package/dist/components/schedule/schedule-agenda-list.d.ts +6 -7
  189. package/dist/components/schedule/schedule-agenda-list.d.ts.map +1 -1
  190. package/dist/components/schedule/schedule-agenda-view.d.ts +19 -16
  191. package/dist/components/schedule/schedule-agenda-view.d.ts.map +1 -1
  192. package/dist/components/schedule/schedule-create-draft.d.ts +3 -2
  193. package/dist/components/schedule/schedule-create-draft.d.ts.map +1 -1
  194. package/dist/components/schedule/schedule-dates.d.ts.map +1 -1
  195. package/dist/components/schedule/schedule-days-view.d.ts +3 -2
  196. package/dist/components/schedule/schedule-days-view.d.ts.map +1 -1
  197. package/dist/components/schedule/schedule-drag-ghost.d.ts +12 -5
  198. package/dist/components/schedule/schedule-drag-ghost.d.ts.map +1 -1
  199. package/dist/components/schedule/schedule-event-chip.d.ts.map +1 -1
  200. package/dist/components/schedule/schedule-geometry.d.ts +16 -0
  201. package/dist/components/schedule/schedule-geometry.d.ts.map +1 -1
  202. package/dist/components/schedule/schedule-grid-gesture.d.ts +29 -6
  203. package/dist/components/schedule/schedule-grid-gesture.d.ts.map +1 -1
  204. package/dist/components/schedule/schedule-month-view.d.ts +3 -2
  205. package/dist/components/schedule/schedule-month-view.d.ts.map +1 -1
  206. package/dist/components/schedule/schedule-next-up.d.ts +4 -3
  207. package/dist/components/schedule/schedule-next-up.d.ts.map +1 -1
  208. package/dist/components/schedule/schedule-timed-grid.d.ts.map +1 -1
  209. package/dist/components/schedule/schedule-toolbar.d.ts +3 -3
  210. package/dist/components/schedule/schedule-toolbar.d.ts.map +1 -1
  211. package/dist/components/schedule/schedule-types.d.ts +9 -4
  212. package/dist/components/schedule/schedule-types.d.ts.map +1 -1
  213. package/dist/components/schedule/schedule-views.d.ts +2 -2
  214. package/dist/components/schedule/schedule-views.d.ts.map +1 -1
  215. package/dist/components/schedule/schedule-year-view.d.ts +3 -2
  216. package/dist/components/schedule/schedule-year-view.d.ts.map +1 -1
  217. package/dist/components/schedule/schedule.d.ts +9 -6
  218. package/dist/components/schedule/schedule.d.ts.map +1 -1
  219. package/dist/components/schedule/use-event-create.d.ts.map +1 -1
  220. package/dist/components/schedule/use-event-drag.d.ts.map +1 -1
  221. package/dist/components/schedule/use-event-resize.d.ts.map +1 -1
  222. package/dist/components/segment-group/index.js +2 -2
  223. package/dist/components/select/index.js +4 -4
  224. package/dist/components/slider/index.js +2 -1
  225. package/dist/components/slider/index.js.map +1 -1
  226. package/dist/components/slider/slider.d.ts +3 -2
  227. package/dist/components/slider/slider.d.ts.map +1 -1
  228. package/dist/components/switch/index.js +1 -1
  229. package/dist/components/tabs/index.js +1 -1
  230. package/dist/components/tabs/tabs-data.d.ts +3 -2
  231. package/dist/components/tabs/tabs-data.d.ts.map +1 -1
  232. package/dist/components/tags-input/index.js +6 -5
  233. package/dist/components/tags-input/index.js.map +1 -1
  234. package/dist/components/text-input/index.js +2 -2
  235. package/dist/components/textarea/index.js +2 -2
  236. package/dist/components/time-input/index.js +6 -6
  237. package/dist/components/timeline/index.js +8 -5
  238. package/dist/components/timeline/index.js.map +1 -1
  239. package/dist/components/timeline/timeline.d.ts +1 -1
  240. package/dist/components/timeline/timeline.d.ts.map +1 -1
  241. package/dist/components/tooltip/index.js +1 -1
  242. package/dist/components/tooltip/tooltip.d.ts +2 -1
  243. package/dist/components/tooltip/tooltip.d.ts.map +1 -1
  244. package/dist/components/tree-multi-select/index.js +6 -5
  245. package/dist/components/tree-multi-select/index.js.map +1 -1
  246. package/dist/components/tree-select/index.js +3 -3
  247. package/dist/lib/as-child.d.ts +104 -0
  248. package/dist/lib/as-child.d.ts.map +1 -0
  249. package/dist/theme.css +9 -3
  250. package/package.json +1 -1
  251. package/src/as-child.contract.test.tsx +809 -0
  252. package/src/components/accordion/accordion-data.tsx +8 -5
  253. package/src/components/accordion/accordion.test.tsx +40 -0
  254. package/src/components/accordion/accordion.tsx +23 -6
  255. package/src/components/action-icon/action-icon.tsx +9 -24
  256. package/src/components/alert/alert.test.tsx +25 -2
  257. package/src/components/alert/alert.tsx +39 -13
  258. package/src/components/app-shell/app-shell.tsx +3 -1
  259. package/src/components/breadcrumb/breadcrumb.test.tsx +30 -0
  260. package/src/components/breadcrumb/breadcrumb.tsx +21 -12
  261. package/src/components/button/button.tsx +21 -50
  262. package/src/components/calendar/calendar-body.tsx +8 -1
  263. package/src/components/circular-progress/circular-progress.tsx +4 -1
  264. package/src/components/clipboard/clipboard.test.tsx +18 -0
  265. package/src/components/clipboard/clipboard.tsx +8 -2
  266. package/src/components/code-block/chrome.tsx +60 -36
  267. package/src/components/code-block/code-block.test.tsx +27 -0
  268. package/src/components/code-block/code-block.tsx +13 -3
  269. package/src/components/code-block/notation.test.ts +8 -0
  270. package/src/components/code-block/notation.ts +6 -3
  271. package/src/components/code-block/static.tsx +8 -2
  272. package/src/components/collapse/collapse.tsx +33 -15
  273. package/src/components/combobox/combobox.test.tsx +38 -0
  274. package/src/components/combobox/combobox.tsx +24 -10
  275. package/src/components/divider/divider.tsx +3 -1
  276. package/src/components/drawer/drawer.tsx +37 -16
  277. package/src/components/field/field.tsx +7 -3
  278. package/src/components/input/input.tsx +3 -1
  279. package/src/components/menu/menu-data.tsx +8 -1
  280. package/src/components/menu/menu.test.tsx +52 -0
  281. package/src/components/menu/menu.tsx +83 -35
  282. package/src/components/modal/close-trigger.test.tsx +38 -0
  283. package/src/components/modal/modal.tsx +29 -13
  284. package/src/components/notification/create-notifier.tsx +6 -5
  285. package/src/components/notification/notification.test.tsx +15 -0
  286. package/src/components/notification/notification.tsx +8 -5
  287. package/src/components/pill/pill.tsx +29 -20
  288. package/src/components/pills-input/pills-input.tsx +3 -1
  289. package/src/components/popover/popover.tsx +3 -1
  290. package/src/components/progress/progress.tsx +4 -1
  291. package/src/components/rating/rating.tsx +27 -23
  292. package/src/components/schedule/index.ts +1 -1
  293. package/src/components/schedule/now-cursor-line.tsx +1 -1
  294. package/src/components/schedule/schedule-agenda-list.tsx +6 -7
  295. package/src/components/schedule/schedule-agenda-view.test.tsx +105 -28
  296. package/src/components/schedule/schedule-agenda-view.tsx +46 -31
  297. package/src/components/schedule/schedule-all-day-row.tsx +1 -1
  298. package/src/components/schedule/schedule-create-draft.tsx +14 -5
  299. package/src/components/schedule/schedule-dates.test.ts +37 -52
  300. package/src/components/schedule/schedule-dates.ts +25 -27
  301. package/src/components/schedule/schedule-days-view.tsx +9 -5
  302. package/src/components/schedule/schedule-drag-ghost.tsx +27 -12
  303. package/src/components/schedule/schedule-event-chip.tsx +9 -2
  304. package/src/components/schedule/schedule-event-list-popover-content.tsx +1 -1
  305. package/src/components/schedule/schedule-geometry.ts +21 -0
  306. package/src/components/schedule/schedule-grid-gesture.test.ts +83 -1
  307. package/src/components/schedule/schedule-grid-gesture.ts +67 -28
  308. package/src/components/schedule/schedule-month-view.tsx +10 -6
  309. package/src/components/schedule/schedule-next-up.tsx +11 -5
  310. package/src/components/schedule/schedule-timed-grid.tsx +41 -3
  311. package/src/components/schedule/schedule-toolbar.test.tsx +26 -0
  312. package/src/components/schedule/schedule-toolbar.tsx +35 -17
  313. package/src/components/schedule/schedule-types.ts +9 -4
  314. package/src/components/schedule/schedule-views.ts +4 -5
  315. package/src/components/schedule/schedule-year-view.tsx +10 -6
  316. package/src/components/schedule/schedule.test.tsx +198 -36
  317. package/src/components/schedule/schedule.tsx +28 -17
  318. package/src/components/schedule/use-event-create.ts +7 -6
  319. package/src/components/schedule/use-event-drag.ts +10 -4
  320. package/src/components/schedule/use-event-resize.ts +4 -2
  321. package/src/components/slider/slider.tsx +4 -0
  322. package/src/components/tabs/tabs-data.tsx +17 -14
  323. package/src/components/timeline/timeline.tsx +102 -95
  324. package/src/components/tooltip/tooltip.tsx +2 -1
  325. package/src/lib/as-child.test.tsx +70 -0
  326. package/src/lib/as-child.ts +119 -0
  327. package/src/theme.css +9 -3
  328. package/dist/chunk-2762HZYX.js.map +0 -1
  329. package/dist/chunk-2H46IXW4.js.map +0 -1
  330. package/dist/chunk-6SWK4XG5.js.map +0 -1
  331. package/dist/chunk-ACE7FBWE.js.map +0 -1
  332. package/dist/chunk-HWNPXAEN.js +0 -31
  333. package/dist/chunk-HWNPXAEN.js.map +0 -1
  334. package/dist/chunk-IFWCCAQV.js.map +0 -1
  335. package/dist/chunk-IXKELBJA.js.map +0 -1
  336. package/dist/chunk-J3PELDH3.js.map +0 -1
  337. package/dist/chunk-NGAQITWP.js.map +0 -1
  338. package/dist/chunk-POKDSVQT.js.map +0 -1
  339. package/dist/chunk-QMW7D5GU.js.map +0 -1
  340. package/dist/chunk-TMMEJKLI.js.map +0 -1
  341. package/dist/chunk-TNNH3FVQ.js.map +0 -1
  342. package/dist/chunk-U5GW5EBR.js.map +0 -1
  343. package/dist/chunk-UNSAA7YG.js.map +0 -1
  344. package/dist/chunk-VLUKI3HL.js.map +0 -1
  345. package/dist/chunk-VZ2TPU4B.js.map +0 -1
  346. package/dist/chunk-YIQI2CF3.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/combobox/combobox.tsx"],"names":["Ark"],"mappings":";;;;;;;;;;;;AAsEA,IAAM,uBAAuB,aAAA,CAA6B;AAAA,EACxD,IAAA,EAAM,IAAA;AAAA,EACN,OAAA,EAAS;AACX,CAAC,CAAA;AAiBD,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,MAAA;AAAA,EACA,GAAG;AACL,CAAA,qBACE,GAAA,CAAC,qBAAqB,QAAA,EAArB,EAA8B,OAAO,EAAE,IAAA,EAAM,SAAQ,EACpD,QAAA,kBAAA,GAAA;AAAA,EAACA,UAAA,CAAI,IAAA;AAAA,EAAJ;AAAA,IAEC,WAAA,EAAa,EAAE,SAAA,EAAW,IAAA,EAAM,GAAG,WAAA,EAAY;AAAA,IAK/C,eAAA,EAAiB,yBAAA;AAAA,IACjB,SAAA,EAAW,EAAA,CAAG,QAAA,EAAU,SAAS,CAAA;AAAA,IAChC,GAAG,KAAA,CAAM,EAAE,aAAA,EAAe,QAAQ,CAAA;AAAA,IAClC,GAAG,IAAA;AAAA,IAEH;AAAA;AACH,CAAA,EACF,CAAA;AAWF,IAAM,UAAU,CAAC;AAAA,EACf,SAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AAAA,EACA,QAAA;AAAA,EACA,MAAA;AAAA,EACA,GAAG;AACL,CAAA,KAA4B;AAC1B,EAAA,MAAM,EAAE,IAAA,EAAM,OAAA,EAAQ,GAAI,WAAW,oBAAoB,CAAA;AACzD,EAAA,uBACE,IAAA;AAAA,IAACA,UAAA,CAAI,OAAA;AAAA,IAAJ;AA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,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-TNNH3FVQ.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 { 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\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 ...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 {...props({ \"data-testid\": testId })}\n {...rest}\n >\n {children}\n </Ark.Root>\n </ComboboxStyleContext.Provider>\n)\n\nexport type ComboboxControlProps = 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 ...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 ...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 {...rest}\n >\n {children ?? <ChevronIcon />}\n </Ark.Trigger>\n)\n\nconst ClearTrigger = ({\n className,\n children,\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 tabIndex={0} className={cn(popoverClearTrigger, className)} {...rest}>\n {children ?? <CloseIcon />}\n </Ark.ClearTrigger>\n)\n\nconst Content = ({\n className,\n children,\n withPaddingTop = true,\n withinPortal = true,\n container,\n ...rest\n}: 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 ...rest\n}: 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 = Omit<ComponentPropsWithoutRef<typeof Ark.Item>, \"children\"> &\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, ...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 = ComponentPropsWithoutRef<typeof Ark.ItemGroup> & {\n /** Group heading rendered above the options. */\n label?: ReactNode\n}\n\nconst Group = ({ label, className, children, ...rest }: ComboboxGroupProps) => (\n <Ark.ItemGroup className={className} {...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/components/button/button.tsx"],"names":[],"mappings":";;;;;;;;;AAkDA,IAAM,cAAA,GAAiB,GAAA;AAAA,EACrB;AAAA,IACE,yCAAA;AAAA,IACA,+BAAA;AAAA,IACA,qCAAA;A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A,CAAC,cAAW,SAAA,EAAW,iBAAA,CAAkB,EAAE,IAAA,EAAM,GAAI,QAAA,EAAA,YAAA,EAAa,CAAA;AAAA,QAEnE,QAAA;AAAA,QACA,UAAA,wBACE,UAAA,EAAA,EAAW,SAAA,EAAW,gBAAgB,EAAE,IAAA,EAAM,CAAA,EAAI,QAAA,EAAA,UAAA,EAAW;AAAA,OAAA,EAElE;AAAA;AAAA,GAEJ;AAEJ","file":"chunk-U5GW5EBR.js","sourcesContent":["\"use client\"\n\nimport { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cloneElement, isValidElement, type MouseEvent, type ReactNode } from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport type { Color } from \"../../lib/colors\"\nimport { focusStyles } from \"../../lib/focus-styles\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { Spinner } from \"../spinner/spinner\"\n\n/**\n * Button — interactive but stateless primitive.\n *\n * The new (variant × color) model splits visual treatment from accent palette:\n * - `variant` picks the shape (filled / light / outline / subtle)\n * - `color` picks the palette (brand / gray / neutral / red / orange / …)\n *\n * Color is delivered through CSS variables: the component writes a\n * `data-color=\"…\"` attribute and the global rules in `colors.css` resolve\n * `--c-solid`, `--c-soft`, `--c-text` etc. for both light and dark mode. So\n * the cva matrix only enumerates variants, not (variant × color) pairs.\n * When `color` is omitted, no `data-color` attribute is rendered and the\n * slot vars cascade from `:root` — which mirrors `neutral` — so the\n * zero-config `<Button>` renders `filled` · `neutral`. Consumers retheme the\n * default for the whole app by overriding the slot vars at `:root`, no JS\n * required.\n *\n * `asChild` (inherited from `HTMLArkProps`) renders the single child element\n * with Button's styling merged in. Ark's factory uses `Children.only`, so\n * only one element can survive the swap — `startSlot`/`endSlot` (and the\n * `loading` spinner, which replaces `startSlot`) are folded into *that*\n * element's own children (see `withAsChildContent` below) rather than\n * rendered as siblings, so they keep showing up even when the child is a\n * link. Common case: `<Button asChild startSlot={<Icon />}><a ...>Go</a></Button>`.\n *\n * `loading` doesn't use `pointer-events-none` to block interaction — that\n * also blocks `:hover`, which would make `cursor-progress` unreachable by a\n * real mouse. Instead native `disabled` handles a real `<button>` (the\n * `disabled:pointer-events-none` rule is scoped off while loading via\n * `not-data-loading:`, since `resolvedDisabled` sets native `disabled` for\n * `loading` too and would otherwise reintroduce the same dead-cursor bug),\n * and an explicit `onClick` guard (`preventWhileLoading`) handles an\n * arbitrary `asChild` element, which `disabled` doesn't affect. The dimmed\n * `opacity-50` treatment is likewise keyed off `data-loading` (not just\n * `:disabled`) for the same reason — `:disabled` never matches a non-form\n * element like an `<a>`, even with a `disabled` attribute on it, so an\n * `asChild` link would otherwise stay at full opacity while loading.\n */\nconst buttonVariants = cva(\n [\n \"inline-flex items-center justify-center\",\n \"whitespace-nowrap select-none\",\n \"font-medium uppercase tracking-wide\",\n \"no-underline\",\n \"rounded-button border border-transparent\",\n \"transition-colors-radius\",\n focusStyles(),\n \"disabled:not-data-loading:pointer-events-none disabled:opacity-50\",\n \"data-disabled:pointer-events-none data-disabled:opacity-50\",\n \"not-data-loading:hover:cursor-pointer\",\n \"data-loading:cursor-progress data-loading:opacity-50\",\n \"[&_svg]:shrink-0 [&_svg]:pointer-events-none\",\n ],\n {\n variants: {\n variant: {\n filled: [\n \"bg-(--c-solid) text-(--c-on-solid)\",\n \"not-data-loading:hover:bg-(--c-solid-hover)\",\n ],\n light: [\n \"bg-(--c-soft) text-(--c-text) border-(--c-soft-hover)\",\n \"not-data-loading:hover:bg-(--c-soft-hover) not-data-loading:hover:border-(--c-solid)\",\n ],\n outline: [\n \"bg-transparent text-(--c-text) border-(--c-solid)\",\n \"not-data-loading:hover:bg-(--c-soft)\",\n ],\n subtle: [\"bg-transparent text-(--c-text)\", \"not-data-loading:hover:bg-(--c-soft)\"],\n },\n size: {\n xs: \"h-7 px-2 text-xs [&_svg]:size-3 gap-1\",\n sm: \"h-8 px-3 text-sm [&_svg]:size-3.5 gap-1.5\",\n md: \"h-9 px-4 text-md [&_svg]:size-4 gap-2\",\n lg: \"h-10 px-4 text-lg [&_svg]:size-5 gap-3\",\n xl: \"h-12 px-5 text-xl [&_svg]:size-6 gap-3\",\n },\n },\n defaultVariants: {\n variant: \"filled\",\n size: \"md\",\n },\n },\n)\n\nconst startSlotVariants = cva(\"inline-flex shrink-0 items-center\", {\n variants: {\n size: {\n xs: \"-ms-0.5\",\n sm: \"-ms-1\",\n md: \"-ms-2\",\n lg: \"-ms-2.5\",\n xl: \"-ms-3\",\n },\n },\n})\nconst endSlotVariants = cva(\"inline-flex shrink-0 items-center\", {\n variants: {\n size: {\n xs: \"-me-0.5\",\n sm: \"-me-1\",\n md: \"-me-2\",\n lg: \"-me-2.5\",\n xl: \"-me-3\",\n },\n },\n})\n\nexport type ButtonVariant = NonNullable<VariantProps<typeof buttonVariants>[\"variant\"]>\nexport type ButtonSize = NonNullable<VariantProps<typeof buttonVariants>[\"size\"]>\n\nexport type ButtonProps = Omit<HTMLArkProps<\"button\">, \"color\"> &\n VariantProps<typeof buttonVariants> &\n WithTestId & {\n /** Accent palette. Re-exported as `Color` from `@42/ui-react`. */\n color?: Color\n /**\n * Render a spinner in place of (or before) the children and mark the\n * button as busy + non-interactive. Use for async submit handlers.\n */\n loading?: boolean\n /**\n * Optional element rendered at the inline-start of the children (e.g. an\n * icon) — left in LTR, right in RTL. Hidden from assistive tech via\n * `aria-hidden`.\n */\n startSlot?: ReactNode\n /**\n * Optional element rendered at the inline-end of the children — right in\n * LTR, left in RTL. `aria-hidden`.\n */\n endSlot?: ReactNode\n }\n\nconst HiddenSlot = ({ children, className }: { children: ReactNode; className?: string }) => (\n <span\n aria-hidden=\"true\"\n className={cn(\"inline-flex shrink-0 items-center justify-center\", className)}\n >\n {children}\n </span>\n)\n\n/**\n * Swallows the click while `loading`. Native `disabled` already blocks\n * interaction on a real `<button>` with or without this, but it's a no-op\n * on an arbitrary `asChild` element (e.g. an `<a>`) — that's the one case\n * this actually needs to do something. A stable module-level reference so\n * it never causes the clone below to look \"changed\" across renders.\n */\nconst preventWhileLoading = (event: MouseEvent) => {\n event.preventDefault()\n event.stopPropagation()\n}\n\n/**\n * Ark's `asChild` clones the single child element in place of `ark.button`,\n * so the start/end content (icon or spinner) can't be rendered as siblings\n * of `children` (that would hand `Children.only` a `Fragment` and lose\n * Button's own props in the clone). Instead, fold them into the child's own\n * children — same trick as `Breadcrumb.Home`. Falls through unchanged when\n * there's nothing to add or the child isn't a single element, letting Ark's\n * own `Children.only` handle the misuse case as it already does.\n */\nconst withAsChildContent = (\n child: ReactNode,\n startContent: ReactNode,\n endContent: ReactNode,\n size: VariantProps<typeof buttonVariants>[\"size\"],\n loading: boolean,\n) => {\n if (!startContent && !endContent && !loading) return child\n if (!isValidElement<{ children?: ReactNode; onClick?: (event: MouseEvent) => void }>(child))\n return child\n return cloneElement(child, {\n onClick: loading ? preventWhileLoading : child.props.onClick,\n children: (\n <>\n {startContent && (\n <HiddenSlot className={startSlotVariants({ size })}>{startContent}</HiddenSlot>\n )}\n {child.props.children}\n {endContent && <HiddenSlot className={endSlotVariants({ size })}>{endContent}</HiddenSlot>}\n </>\n ),\n })\n}\n\nexport const Button = ({\n className,\n variant,\n size,\n color,\n loading = false,\n startSlot,\n endSlot,\n children,\n disabled,\n type,\n asChild,\n testId,\n onClick,\n ...rest\n}: ButtonProps) => {\n const resolvedDisabled = disabled || loading\n const startContent = loading ? <Spinner label={null} /> : startSlot\n const endContent = loading ? null : endSlot\n const resolvedOnClick = loading ? preventWhileLoading : onClick\n\n return (\n <ark.button\n asChild={asChild}\n type={asChild ? type : (type ?? \"button\")}\n disabled={resolvedDisabled}\n aria-busy={loading || undefined}\n aria-disabled={resolvedDisabled || undefined}\n data-loading={loading || undefined}\n data-color={color}\n data-variant={variant ?? \"filled\"}\n data-size={size ?? \"md\"}\n className={cn(buttonVariants({ variant, size }), className)}\n onClick={resolvedOnClick}\n {...props({ \"data-testid\": testId })}\n {...rest}\n >\n {asChild ? (\n withAsChildContent(children, startContent, endContent, size, loading)\n ) : (\n <>\n {startContent && (\n <HiddenSlot className={startSlotVariants({ size })}>{startContent}</HiddenSlot>\n )}\n {children}\n {endContent && (\n <HiddenSlot className={endSlotVariants({ size })}>{endContent}</HiddenSlot>\n )}\n </>\n )}\n </ark.button>\n )\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/field/field.tsx"],"names":["Ark"],"mappings":";;;;;;AAiCO,IAAM,SAAA,GAAY,IAAI,+BAAA,EAAiC;AAAA,EAC5D,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,EAAE,EAAA,EAAI,OAAA,EAAS,EAAA,EAAI,OAAA,EAAS,EAAA,EAAI,SAAA,EAAW,EAAA,EAAI,SAAA,EAAW,EAAA,EAAI,OAAA;AAAQ,GAC9E;AAAA,EACA,eAAA,EAAiB,EAAE,IAAA,EAAM,IAAA;AAC3B,CAAC;AAEM,IAAM,UAAA,GAAa,GAAA;AAAA,EACxB;AAAA,IACE,4DAAA;AAAA,IACA,6CAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,IAAA,EAAM;AAAA,QACJ,EAAA,EAAI,SAAA;AAAA,QACJ,EAAA,EAAI,SAAA;AAAA,QACJ,EAAA,EAAI,SAAA;AAAA,QACJ,EAAA,EAAI,SAAA;AAAA,QACJ,EAAA,EAAI;AAAA;AACN,KACF;AAAA,IACA,eAAA,EAAiB,EAAE,IAAA,EAAM,IAAA;AAAK;AAElC;AAEA,IAAM,SAAA,GAAY,IAAI,6CAAA,EAA+C;AAAA,EACnE,QAAA,EAAU;AAAA,IACR,IAAA,EAAM;AAAA,MACJ,EAAA,EAAI,SAAA;AAAA,MACJ,EAAA,EAAI,SAAA;AAAA,MACJ,EAAA,EAAI,SAAA;AAAA,MACJ,EAAA,EAAI,SAAA;AAAA,MACJ,EAAA,EAAI;AAAA;AACN,GACF;AAAA,EACA,eAAA,EAAiB,EAAE,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aAAA,EAAe,UAAU,CAAA,EAAG,MAAM,gBAAgB,CAAA;AAAA,YAE7D,QAAA,EAAA;AAAA;AAAA,SACH;AAAA,QAGD,QAAA;AAAA,QAEA,SAAS,IAAA,oBACR,GAAA;AAAA,UAACA,OAAA,CAAI,SAAA;AAAA,UAAJ;AAAA,YACC,SAAA,EAAW,GAAG,UAAA,CAAW,EAAE,MAAM,CAAA,EAAG,YAAY,KAAK,CAAA;AAAA,YACpD,GAAG,MAAM,EAAE,aAAA,EAAe,UAAU,CAAA,EAAG,MAAM,UAAU,CAAA;AAAA,YAEvD,QAAA,EAAA;AAAA;AAAA;AACH;AAAA;AAAA,GAEJ;AAEJ","file":"chunk-UNSAA7YG.js","sourcesContent":["\"use client\"\n\nimport { Field as Ark, type UseFieldContext } from \"@ark-ui/react/field\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\n\n/**\n * Field — label / description / error scaffold for any form control, on top of\n * Ark UI's `Field`. It is the *one* place the family wires accessible names and\n * descriptions: drop a field-aware control inside (the kit's `Input`, `Select`,\n * `Combobox`, … all qualify) and Ark hands it the right `id`,\n * `aria-describedby`, `aria-invalid`, `disabled`, and `required` through\n * context — no manual plumbing per control.\n *\n * - `label` renders a `<label>` bound to the control (click-to-focus).\n * - `description` (helper text) sits between the label and the control.\n * `error` sits below the control and renders independently of it — both\n * can be visible at once. Passing `error` flips the field to `invalid`,\n * which both styles field-aware controls red and associates the message.\n * - `required` adds the semantic flag and a red asterisk in the label.\n * - `size` scales only the field's own typography; set the control's `size`\n * separately (the family components forward both).\n *\n * Every other prop (incl. `disabled`, `readOnly`, `id`, `asChild`) forwards to\n * Ark's `Field.Root`.\n */\n\n// `relative` contains a `sr-only` label (and any hidden input rendered inside\n// the field): absolutely positioned with no offsets, it would otherwise be laid\n// out against the page and escape any scroller the field sits in.\nexport const fieldRoot = cva(\"relative flex w-full flex-col\", {\n variants: {\n size: { xs: \"gap-1\", sm: \"gap-1\", md: \"gap-1.5\", lg: \"gap-1.5\", xl: \"gap-2\" },\n },\n defaultVariants: { size: \"md\" },\n})\n\nexport const fieldLabel = cva(\n [\n \"inline-flex items-center font-medium select-none text-trim\",\n \"text-gray-light-700 dark:text-gray-dark-300\",\n \"data-disabled:opacity-60\",\n ],\n {\n variants: {\n size: {\n xs: \"text-xs\",\n sm: \"text-sm\",\n md: \"text-sm\",\n lg: \"text-md\",\n xl: \"text-lg\",\n },\n },\n defaultVariants: { size: \"md\" },\n },\n)\n\nconst fieldHelp = cva(\"text-gray-light-600 dark:text-gray-dark-400\", {\n variants: {\n size: {\n xs: \"text-xs\",\n sm: \"text-xs\",\n md: \"text-xs\",\n lg: \"text-sm\",\n xl: \"text-sm\",\n },\n },\n defaultVariants: { size: \"md\" },\n})\n\nconst fieldError = cva(\"text-red-600 dark:text-red-400\", {\n variants: {\n size: {\n xs: \"text-xs\",\n sm: \"text-xs\",\n md: \"text-xs\",\n lg: \"text-sm\",\n xl: \"text-sm\",\n },\n },\n defaultVariants: { size: \"md\" },\n})\n\nexport type FieldSize = NonNullable<VariantProps<typeof fieldRoot>[\"size\"]>\n\n/**\n * `aria-describedby` / `aria-errormessage` / `aria-labelledby` for a control nested\n * in a `Field`. Points `aria-describedby` at the error text id directly once\n * `invalid`, rather than trusting `field.ariaDescribedby`'s own DOM-presence-tracked\n * inclusion of it (a `MutationObserver` check that doesn't reliably catch up for\n * every control) — and adds `aria-errormessage`, which Ark's field getters never\n * emit for any control. `aria-labelledby` points at the id already rendered on\n * `Field`'s own `<label>`: needed because `NumberInput`, `PasswordInput`,\n * `TagsInput`, `Select`, and `SegmentGroup`'s real interactive element isn't\n * `Field`'s own `Ark.Input`, so it never otherwise carries an id matching the\n * label's `htmlFor`.\n */\nexport const fieldA11yProps = (field: UseFieldContext) => ({\n \"aria-describedby\": field?.invalid ? field.ids.errorText : field?.ariaDescribedby,\n \"aria-errormessage\": field?.invalid ? field.ids.errorText : undefined,\n \"aria-labelledby\": field?.ids.label,\n})\n\ntype FieldClassNames = {\n root?: string\n label?: string\n description?: string\n error?: string\n requiredIndicator?: string\n}\n\nexport type FieldProps = Omit<ComponentPropsWithoutRef<typeof Ark.Root>, \"className\"> &\n VariantProps<typeof fieldRoot> &\n WithTestId & {\n /** Accessible name, rendered as a `<label>` bound to the control. */\n label?: ReactNode\n /** Helper text between the label and the control. */\n description?: ReactNode\n /** Error message below the control; its presence sets `invalid`. */\n error?: ReactNode\n /** Styles the field root (matching the kit's other components). */\n className?: string\n classNames?: FieldClassNames\n }\n\n/**\n * Wrap a control in a `Field` only when there's something to wire (label /\n * description / error / required) — otherwise render it bare. The data-driven\n * pickers all end with this, so it lives here instead of five copies. Bare is\n * important: an empty `Field` would still make Ark controls reference a label\n * that isn't rendered.\n */\nexport const FieldShell = ({\n label,\n description,\n error,\n required,\n disabled,\n size,\n className,\n classNames,\n testId,\n children,\n}: Pick<\n FieldProps,\n | \"label\"\n | \"description\"\n | \"error\"\n | \"required\"\n | \"disabled\"\n | \"size\"\n | \"className\"\n | \"classNames\"\n | \"testId\"\n> & { children: ReactNode }) => {\n const hasField = label != null || description != null || error != null || Boolean(required)\n if (!hasField) return children\n return (\n <Field\n label={label}\n description={description}\n error={error}\n required={required}\n disabled={disabled}\n size={size}\n className={className}\n classNames={classNames}\n testId={testId}\n >\n {children}\n </Field>\n )\n}\n\nexport const Field = ({\n label,\n description,\n error,\n required,\n invalid,\n size,\n children,\n className,\n classNames,\n testId,\n ...rest\n}: FieldProps) => {\n const isInvalid = invalid ?? error != null\n\n return (\n <Ark.Root\n required={required}\n invalid={isInvalid}\n className={cn(fieldRoot({ size }), className, classNames?.root)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n >\n {label != null && (\n <Ark.Label className={cn(fieldLabel({ size }), classNames?.label)}>\n {label}\n {required && (\n <Ark.RequiredIndicator\n className={cn(\"ms-0.5 text-red-500\", classNames?.requiredIndicator)}\n >\n *\n </Ark.RequiredIndicator>\n )}\n </Ark.Label>\n )}\n\n {description != null && (\n <Ark.HelperText\n className={cn(fieldHelp({ size }), classNames?.description)}\n {...props({ \"data-testid\": testId && `${testId}-description` })}\n >\n {description}\n </Ark.HelperText>\n )}\n\n {children}\n\n {error != null && (\n <Ark.ErrorText\n className={cn(fieldError({ size }), classNames?.error)}\n {...props({ \"data-testid\": testId && `${testId}-error` })}\n >\n {error}\n </Ark.ErrorText>\n )}\n </Ark.Root>\n )\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/action-icon/action-icon.tsx"],"names":[],"mappings":";;;;;;;;;AAuCA,IAAM,kBAAA,GAAqB,GAAA;AAAA,EACzB;AAAA,IACE,yCAAA;AAAA,IACA,oCAAA;AAAA,IACA,qCAAA;AAAA,IACA,cAAA;AAAA,IACA,+CAAA;AAAA,IACA,0BAAA;AAAA,IACA,WAAA,EAAY;AAAA,IACZ,mEAAA;AAAA,IACA,4DAAA;AAAA,IACA,uCAAA;AAAA,IACA,sDAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,MAAA,EAAQ;AAAA,UACN,oCAAA;AAAA,UACA;AAAA,SACF;AAAA,QACA,KAAA,EAAO;AAAA,UACL,uDAAA;AAAA,UACA;AAAA,SACF;AAAA,QACA,OAAA,EAAS;AAAA,UACP,mDAAA;AAAA,UACA;AAAA,SACF;AAAA,QACA,MAAA,EAAQ,CAAC,gCAAA,EAAkC,sCAAsC,CAAA;AAAA,QACjF,OAAA,EAAS;AAAA,UACP,yHAAA;AAAA,UACA;AAAA;AACF,OACF;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,EAAA,EAAI,4BAAA;AAAA,QACJ,EAAA,EAAI,8BAAA;AAAA,QACJ,EAAA,EAAI,4BAAA;AAAA,QACJ,EAAA,EAAI,6BAAA;AAAA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AA,CAAI,MAAA;AAAA,IAAJ;AAAA,MACC,OAAA;AAAA,MACA,IAAA,EAAM,OAAA,GAAU,IAAA,GAAQ,IAAA,IAAQ,QAAA;AAAA,MAChC,QAAA,EAAU,gBAAA;AAAA,MACV,aAAW,OAAA,IAAW,MAAA;AAAA,MACtB,iBAAe,gBAAA,IAAoB,MAAA;AAAA,MACnC,gBAAc,OAAA,IAAW,MAAA;AAAA,MACzB,YAAA,EAAY,KAAA;AAAA,MACZ,gBAAc,OAAA,IAAW,SAAA;AAAA,MACzB,SAAA,EAAW,GAAG,kBAAA,CAAmB,EAAE,SAAS,IAAA,EAAM,MAAA,EAAQ,CAAA,EAAG,SAAS,CAAA;AAAA,MACtE,OAAA,EAAS,eAAA;AAAA,MACR,GAAG,KAAA,CAAM,EAAE,aAAA,EAAe,QAAQ,CAAA;AAAA,MAClC,GAAG,IAAA;AAAA,MAEH,QAAA,EAAA,OAAA,GACC,kBAAA,CAAmB,QAAA,EAAU,OAAO,CAAA,GAClC,0BACF,GAAA,CAAC,OAAA,EAAA,EAAQ,KAAA,EAAO,IAAA,EAAM,CAAA,GAEtB;AAAA;AAAA,GAEJ;AAEJ","file":"chunk-VLUKI3HL.js","sourcesContent":["\"use client\"\n\nimport { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cloneElement, isValidElement, type MouseEvent, type ReactNode } from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport type { Color } from \"../../lib/colors\"\nimport { focusStyles } from \"../../lib/focus-styles\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { Spinner } from \"../spinner/spinner\"\n\n/**\n * ActionIcon — square, icon-only sibling of `Button`.\n *\n * Same (variant × color) model as `Button`:\n * - `variant` picks the shape (filled / light / outline / subtle / default)\n * - `color` picks the palette (brand / gray / red / …)\n * - Color is delivered via `data-color` + the slot vars in `colors.css`,\n * so dark mode shade-shifts happen at the CSS layer.\n *\n * What's specific to ActionIcon:\n * - Forced 1:1 aspect ratio.\n * - Own `radius` scale (incl. `full` for circular FABs / like-buttons).\n * - Wider size scale (xs..xl) than Button — toolbar density matters here.\n *\n * The accessible name MUST come from `aria-label` (or `aria-labelledby`); the\n * icon children are decoration.\n *\n * `asChild` renders the single child with ActionIcon's styling. Ark's\n * factory uses `Children.only`, so only one element can survive the swap —\n * `loading`'s spinner replaces *that* element's own children (see\n * `withAsChildLoading` below) rather than the element itself, same trick as\n * `Button`'s `withAsChildContent`. The `onClick` guard (`preventWhileLoading`)\n * goes on the same clone, since `disabled` doesn't do anything on an\n * arbitrary `asChild` element (e.g. an `<a>`) — same reason the `opacity-50`\n * dimming and `pointer-events-none` blocking are keyed off `data-loading`\n * rather than `:disabled` (see `Button`'s note on this).\n */\nconst actionIconVariants = cva(\n [\n \"inline-flex items-center justify-center\",\n \"aspect-square shrink-0 select-none\",\n \"font-medium uppercase tracking-wide\",\n \"no-underline\",\n \"rounded-action-icon border border-transparent\",\n \"transition-colors-radius\",\n focusStyles(),\n \"disabled:not-data-loading:pointer-events-none disabled:opacity-50\",\n \"data-disabled:pointer-events-none data-disabled:opacity-50\",\n \"not-data-loading:hover:cursor-pointer\",\n \"data-loading:cursor-progress data-loading:opacity-50\",\n \"[&_svg]:shrink-0 [&_svg]:pointer-events-none\",\n ],\n {\n variants: {\n variant: {\n filled: [\n \"bg-(--c-solid) text-(--c-on-solid)\",\n \"not-data-loading:hover:bg-(--c-solid-hover)\",\n ],\n light: [\n \"bg-(--c-soft) text-(--c-text) border-(--c-soft-hover)\",\n \"not-data-loading:hover:bg-(--c-soft-hover) not-data-loading:hover:border-(--c-solid)\",\n ],\n outline: [\n \"bg-transparent text-(--c-text) border-(--c-solid)\",\n \"not-data-loading:hover:bg-(--c-soft)\",\n ],\n subtle: [\"bg-transparent text-(--c-text)\", \"not-data-loading:hover:bg-(--c-soft)\"],\n default: [\n \"dark:bg-gray-light-50 dark:text-gray-light-900 dark:border-gray-light-400 dark:not-data-loading:hover:bg-gray-light-300\",\n \"bg-gray-dark-900 text-gray-dark-25 border-gray-dark-800 not-data-loading:hover:bg-gray-dark-800\",\n ],\n },\n size: {\n xs: \"h-7 text-xs [&_svg]:size-5\",\n sm: \"h-8 text-sm [&_svg]:size-5.5\",\n md: \"h-9 text-md [&_svg]:size-6\",\n lg: \"h-10 text-lg [&_svg]:size-7\",\n xl: \"h-12 text-xl [&_svg]:size-8\",\n },\n radius: {\n xs: \"rounded-xs\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n xl: \"rounded-xl\",\n full: \"rounded-full\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n },\n },\n)\n\nexport type ActionIconVariant = NonNullable<VariantProps<typeof actionIconVariants>[\"variant\"]>\nexport type ActionIconSize = NonNullable<VariantProps<typeof actionIconVariants>[\"size\"]>\nexport type ActionIconRadius = NonNullable<VariantProps<typeof actionIconVariants>[\"radius\"]>\n\nexport type ActionIconProps = Omit<HTMLArkProps<\"button\">, \"color\"> &\n VariantProps<typeof actionIconVariants> &\n WithTestId & {\n /** Accent palette. Re-exported as `Color` from `@42/ui-react`. */\n color?: Color\n /**\n * Replace the icon with a spinner, mark the element as busy, and suppress\n * pointer interactions. Mirrors `Button`'s `loading`.\n */\n loading?: boolean\n }\n\n/** Mirrors `Button`'s `preventWhileLoading` — see the note there. */\nconst preventWhileLoading = (event: MouseEvent) => {\n event.preventDefault()\n event.stopPropagation()\n}\n\n/**\n * Replaces the single `asChild` child's own children with the spinner and\n * guards its `onClick`, mirroring `Button`'s `withAsChildContent`. Falls\n * through unchanged when not loading or the child isn't a single element,\n * letting Ark's own `Children.only` handle the misuse case as it already\n * does.\n */\nconst withAsChildLoading = (child: ReactNode, loading: boolean) => {\n if (!loading) return child\n if (!isValidElement<{ children?: ReactNode; onClick?: (event: MouseEvent) => void }>(child))\n return child\n return cloneElement(child, {\n onClick: preventWhileLoading,\n children: <Spinner label={null} />,\n })\n}\n\nexport const ActionIcon = ({\n className,\n variant,\n size,\n radius,\n color,\n loading = false,\n children,\n disabled,\n type,\n asChild,\n testId,\n onClick,\n ...rest\n}: ActionIconProps) => {\n const resolvedDisabled = disabled || loading\n const resolvedOnClick = loading ? preventWhileLoading : onClick\n\n return (\n <ark.button\n asChild={asChild}\n type={asChild ? type : (type ?? \"button\")}\n disabled={resolvedDisabled}\n aria-busy={loading || undefined}\n aria-disabled={resolvedDisabled || undefined}\n data-loading={loading || undefined}\n data-color={color}\n data-variant={variant ?? \"default\"}\n className={cn(actionIconVariants({ variant, size, radius }), className)}\n onClick={resolvedOnClick}\n {...props({ \"data-testid\": testId })}\n {...rest}\n >\n {asChild ? (\n withAsChildLoading(children, loading)\n ) : loading ? (\n <Spinner label={null} />\n ) : (\n children\n )}\n </ark.button>\n )\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/popover/popover.tsx"],"names":["ArkPopover"],"mappings":";;;;;;;;;;;AA+CO,IAAM,aAAA,GAAgB,EAAA;AAAA,EAC3B,+DAAA;AAAA,EACA,qCAAA;AAAA,EACA,kBAAA;AAAA,EACA,8BAAA;AAAA,EACA,8EAAA;AAAA,EACA;AACF;AASO,IAAM,cAAA,GAAiB,EAAA,CAAG,aAAA,EAAe,sCAAsC;AAQ/E,IAAM,WAAA,GAAc,GAAA;AAAA,EACzB;AAAA,IACE,qCAAA;AAAA,IACA,oCAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,cAAA,EAAgB;AAAA,QACd,IAAA,EAAM;AAAA;AACR;AACF;AAEJ;AAOO,IAAM,4BAA4B,CAAC;AAAA,EACxC;AACF,CAAA,KAEM,YAAW,EAAG,cAAA,CAAe,EAAE,KAAA,EAAO,WAAW;AAOhD,IAAM,YAAA,GAAe,EAAA,CAAG,aAAA,EAAe,+BAA+B;AAItE,IAAM,eAAA,GAAkB,EAAA;AAAA,EAC7B,sDAAA;AAAA,E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,+DAAA;AAKjB,IAAM,SAAS,CAAC,EAAE,WAAW,MAAA,EAAQ,GAAG,MAAK,qBAC3C,GAAA;AAAA,EAAC,KAAA;AAAA,EAAA;AAAA,IACC,SAAA,EAAW,EAAA,CAAG,QAAA,EAAU,UAAA,EAAY,SAAS,CAAA;AAAA,IAC5C,GAAG,KAAA,CAAM,EAAE,aAAA,EAAe,QAAQ,CAAA;AAAA,IAClC,GAAG;AAAA;AACN,CAAA;AAMF,IAAM,MAAA,GAAS,CAAC,EAAE,SAAA,EAAW,QAAQ,GAAG,IAAA,EAAK,qBAC3C,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,GAAG,QAAA,EAAU,SAAS,CAAA,EAAI,GAAG,KAAA,CAAM,EAAE,eAAe,MAAA,EAAQ,CAAA,EAAI,GAAG,IAAA,EAAM,CAAA;AAM3F,IAAM,OAAO,CAAC,EAAE,WAAW,MAAA,EAAQ,GAAG,MAAK,qBACzC,GAAA;AAAA,EAAC,KAAA;AAAA,EAAA;AAAA,IACC,SAAA,EAAW,EAAA,CAAG,eAAA,EAAiB,QAAA,EAAU,SAAS,CAAA;AAAA,IACjD,GAAG,KAAA,CAAM,EAAE,aAAA,EAAe,QAAQ,CAAA;AAAA,IAClC,GAAG;AAAA;AACN,CAAA;AAKK,IAAM,OAAA,GAAU;AAAA,EACrB,IAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,QAAQA,SAAA,CAAW,MAAA;AAAA,EACnB,OAAA;AAAA,EACA,MAAA;AAAA,EACA,IAAA;AAAA,EACA;AACF","file":"chunk-VZ2TPU4B.js","sourcesContent":["\"use client\"\n\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 useContext,\n useEffect,\n useRef,\n useState,\n} from \"react\"\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 { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\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 =\n \"shrink-0 text-gray-light-500 transition-transform dark:text-gray-dark-400\"\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-gray-light-500 transition-colors hover:text-gray-light-700 dark:text-gray-dark-400 dark:hover:text-gray-dark-200\"\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-gray-light-900 dark:text-gray-dark-100\",\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/** Presentational checkbox for a multi-select option row — a box that fills\n * once its parent row carries `data-state=\"checked\"` (needs `group/item` on\n * the row; the check icon itself should still be an `Ark.ItemIndicator` so it\n * only mounts when selected). Modeled on `TreeMultiSelect`'s local\n * `treeCheckbox`, generalized off `data-state` instead of that component's own\n * hand-rolled `data-checked`/`data-mixed` (there's no tri-state \"mixed\" outside\n * a tree, so this only needs the one variant). */\nexport const popoverCheckbox = cva(\n [\n \"inline-flex shrink-0 items-center justify-center rounded-xs border transition-colors\",\n \"border-gray-light-300 dark:border-gray-dark-700\",\n \"bg-gray-light-25 dark:bg-gray-dark-900\",\n \"text-(--c-on-solid)\",\n \"group-data-[state=checked]/item:border-(--c-solid) group-data-[state=checked]/item:bg-(--c-solid)\",\n ],\n {\n variants: {\n size: {\n xs: \"size-3.5 [&_svg]:size-2.5\",\n sm: \"size-4 [&_svg]:size-3\",\n md: \"size-4 [&_svg]:size-3\",\n lg: \"size-4.5 [&_svg]:size-3.5\",\n xl: \"size-5 [&_svg]:size-4\",\n },\n },\n defaultVariants: { size: \"md\" },\n },\n)\n\n/** Group heading above a set of options. */\nexport const popoverGroupLabel =\n \"px-2 py-1.5 text-xs font-medium select-none text-gray-light-500 dark:text-gray-dark-400\"\n\n/** Empty / nothing-found message. */\nexport const popoverEmpty =\n \"px-2 py-6 text-center text-sm select-none text-gray-light-500 dark:text-gray-dark-400\"\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\ntype PopoverPosition = NonNullable<NonNullable<ArkPopover.RootProps[\"positioning\"]>[\"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. */\n onPointerEnter: (event: PointerEvent) => 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 the close Ark answers it with 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}\nconst PopoverContext = createContext<PopoverContextValue>({\n width: \"target\",\n withinPortal: true,\n layers: new Set(),\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 = ArkPopover.RootProps &\n PopoverModeProps & {\n /** Match the trigger's width (`\"target\"`, default) or size to content (`\"auto\"`). */\n width?: \"target\" | \"auto\"\n /** Panel placement relative to the trigger. Defaults to Ark's `\"bottom\"`. */\n position?: PopoverPosition\n /** Gap in px between the trigger and the panel. */\n gutter?: number\n /** Positionner offset */\n offset?:\n | {\n mainAxis?: number | undefined\n crossAxis?: number | undefined\n }\n | undefined\n /** Hide the panel (`visibility: hidden`, no pointer events) once the\n * trigger is fully clipped by its own scrolling ancestor, and restore it\n * once back in view — Floating UI's `hide()` middleware\n * (`strategy: \"referenceHidden\"`), already wired into Ark's positioning\n * engine, just not exposed until now. Rides the positioner's existing\n * scroll/resize listeners, so no extra observer is needed. Default `true`\n * — a panel that can't see its own trigger is never in a state worth\n * keeping visible; pass `false` to restore the old \"keep following the\n * trigger's last known position\" behavior. */\n hideWhenDetached?: boolean\n /** Ark's full positioning options (`flip`, `slide`, `overlap`, `boundary`,\n * `getAnchorElement`, …), for placements the props above can't express.\n * Applied over them, so a key set here wins. */\n positioning?: ArkPopover.RootProps[\"positioning\"]\n\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\ntype UsePopoverHoverOptions = {\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 */\nconst usePopoverHover = ({\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 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) => {\n if (event.pointerType === \"touch\" || pinned) return\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 { open: isOpen, press: source === \"press\", hover, onArkOpenChange }\n}\n\nconst Root = ({\n mode = \"click\",\n openDelay,\n closeDelay,\n width = \"target\",\n position,\n gutter,\n offset,\n hideWhenDetached = true,\n positioning,\n withinPortal = true,\n container,\n children,\n open,\n defaultOpen,\n autoFocus = true,\n restoreFocus = true,\n modal = false,\n onOpenChange,\n onClose,\n onPointerDownOutside,\n ...rest\n}: PopoverProps) => {\n const guard = useLayerGuard(onPointerDownOutside)\n const notify = (details: { open: boolean }) => {\n onOpenChange?.(details)\n if (!details.open) onClose?.()\n }\n const hovering = usePopoverHover({\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 return (\n <PopoverContext.Provider\n value={{ width, withinPortal, container, layers: guard.layers, hover }}\n >\n <ArkPopover.Root\n onPointerDownOutside={guard.onPointerDownOutside}\n positioning={{\n sameWidth: width === \"target\",\n placement: position,\n gutter,\n offset,\n hideWhenDetached,\n ...positioning,\n }}\n autoFocus={press && autoFocus}\n restoreFocus={press && restoreFocus}\n modal={press && modal}\n {...state}\n {...rest}\n >\n {children}\n </ArkPopover.Root>\n </PopoverContext.Provider>\n )\n}\n\nexport type PopoverTriggerProps = ArkPopover.TriggerProps\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 ...rest\n}: PopoverTriggerProps) => {\n const { hover } = useContext(PopoverContext)\n return (\n <ArkPopover.Trigger\n onPointerEnter={(event) => {\n onPointerEnter?.(event)\n hover?.onPointerEnter(event)\n }}\n onPointerLeave={(event) => {\n onPointerLeave?.(event)\n hover?.onPointerLeave(event)\n }}\n onClickCapture={(event) => {\n onClickCapture?.(event)\n hover?.onTriggerClickCapture(event)\n }}\n {...rest}\n />\n )\n}\n\nexport type PopoverContentProps = ArkPopover.ContentProps & WithTestId\n\nconst Content = ({\n className,\n children,\n testId,\n onPointerEnter,\n onPointerLeave,\n onPointerDown,\n onFocus,\n ...rest\n}: PopoverContentProps) => {\n const { width, withinPortal, container, layers, hover } = 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>\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. */\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 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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,CAAC,SAAA,EAAW,UAAA,GAAa,cAAA,GAAiB,QAAQ,CAAA;AAAA,QACtD;AAAA,OACF;AAAA,MAEC,mCACC,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,wBAAA,GAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,WAAA,EAAU,MAAA;AAAA,YACV,WAAW,EAAA,CAAG,SAAA,EAAW,QAAA,EAAU,aAAA,KAAkB,WAAW,QAAQ;AAAA;AAAA,SAC1E;AAAA,4BACC,MAAA,EAAA,EAAK,WAAA,EAAU,OAAA,EAAQ,SAAA,EAAW,YAChC,QAAA,EAAA,KAAA,EACH,CAAA;AAAA,wBACA,GAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,WAAA,EAAU,MAAA;AAAA,YACV,WAAW,EAAA,CAAG,SAAA,EAAW,QAAA,EAAU,aAAA,KAAkB,SAAS,QAAQ;AAAA;AAAA;AACxE,OAAA,EACF;AAAA;AAAA,GAEJ;AAEJ","file":"chunk-YIQI2CF3.js","sourcesContent":["import { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport type { ReactNode } from \"react\"\nimport type { Align } from \"../../lib/align\"\nimport { cn } from \"../../lib/cn\"\nimport type { Color } from \"../../lib/colors\"\nimport { props } from \"../../lib/props\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { WithTestId } from \"../../lib/test-id\"\n\n/**\n * `size` here only ever controls border thickness (1–5px, Mantine's own\n * xs..xl mapping) — unlike Timeline's density `size`, there's no parent/\n * child override relationship to defeat via a CSS custom property, so\n * thickness is a plain `(orientation × size)` compound lookup, the simpler\n * of the two mechanisms this kit uses for a sized dimension.\n *\n * Horizontal orientation's thickness sits on the block axis (`border-t`) —\n * RTL never touches top/bottom, so a physical property is fine, same split\n * `ButtonGroup` uses between its own horizontal/vertical orientations.\n * Vertical orientation's thickness sits on the inline axis, so it uses the\n * logical `border-s` (border-inline-start) instead, matching Timeline's own\n * vertical connecting line.\n *\n * Tailwind's default border-width scale has no 3px/5px step, hence the\n * arbitrary `[Npx]` values below — static literals (not interpolated) so\n * Tailwind v4's scanner keeps them.\n */\nconst dividerVariants = cva([\"shrink-0\"], {\n variants: {\n // No own classes — matched by `compoundVariants` only, the same\n // internal-only pattern `timelineBulletVariants`'s `ringed` axis uses.\n orientation: { horizontal: \"\", vertical: \"\" },\n size: { xs: \"\", sm: \"\", md: \"\", lg: \"\", xl: \"\" },\n // A different vocabulary than the kit's shape axis (filled/light/\n // outline/subtle/default) — same precedent as Timeline's own local\n // `TimelineLineVariant`.\n variant: {\n solid: \"border-solid\",\n dashed: \"border-dashed\",\n dotted: \"border-dotted\",\n },\n },\n compoundVariants: [\n { orientation: \"horizontal\", size: \"xs\", class: \"border-t\" },\n { orientation: \"horizontal\", size: \"sm\", class: \"border-t-2\" },\n { orientation: \"horizontal\", size: \"md\", class: \"border-t-[3px]\" },\n { orientation: \"horizontal\", size: \"lg\", class: \"border-t-4\" },\n { orientation: \"horizontal\", size: \"xl\", class: \"border-t-[5px]\" },\n { orientation: \"vertical\", size: \"xs\", class: \"border-s\" },\n { orientation: \"vertical\", size: \"sm\", class: \"border-s-2\" },\n { orientation: \"vertical\", size: \"md\", class: \"border-s-[3px]\" },\n { orientation: \"vertical\", size: \"lg\", class: \"border-s-4\" },\n { orientation: \"vertical\", size: \"xl\", class: \"border-s-[5px]\" },\n ],\n defaultVariants: { orientation: \"horizontal\", size: \"xs\", variant: \"solid\" },\n})\n\nexport type DividerOrientation = NonNullable<VariantProps<typeof dividerVariants>[\"orientation\"]>\nexport type DividerVariant = NonNullable<VariantProps<typeof dividerVariants>[\"variant\"]>\n/** Divider's thickness scale is the kit's canonical `Size` (xs–xl). */\nexport type DividerSize = Size\nexport type DividerLabelPosition = Align\n\nexport type DividerProps = Omit<HTMLArkProps<\"div\">, \"children\"> &\n VariantProps<typeof dividerVariants> &\n WithTestId & {\n /**\n * Accent palette for the line. Re-exported as `Color` from `@42/ui-react`.\n * Unset renders a neutral hairline — it deliberately does not fall\n * through to `--c-solid` (that cascades to a bold black/white default at\n * `:root`, wrong for a hairline).\n */\n color?: Color\n /**\n * Content centered on the line (a word, an icon). Renders as three real\n * flex children — a leading line, the label, a trailing line — rather\n * than `::before`/`::after` pseudo-elements, matching Timeline's own line\n * convention. The label text is small (`text-xs`) and colored the same as\n * the line itself, so it reads as part of the separator rather than\n * competing with surrounding content. Omit for a plain, unlabeled line.\n */\n label?: ReactNode\n /**\n * Where `label` sits along the line. `\"start\"`/`\"end\"` follow flexbox's\n * own logical main-axis edges (matching `Drawer`'s `placement` prop), so\n * they flip correctly under `dir=\"rtl\"` with no extra CSS. Ignored when\n * `label` is unset. Both segments render equally (a centered label) by\n * default.\n */\n labelPosition?: DividerLabelPosition\n }\n\n/**\n * Divider — a thin separator line, horizontal or vertical, with an optional\n * centered/leading/trailing label. Pure React Server Component.\n *\n * `orientation=\"vertical\"` relies entirely on `align-self: stretch` — like\n * Mantine's own Divider, it has no self-sizing, so it needs a flex/grid\n * parent that already provides a definite height, or it renders with zero\n * height.\n *\n * ```tsx\n * <Divider />\n * <Divider label=\"OR\" />\n * <Divider orientation=\"vertical\" />\n * ```\n */\nexport const Divider = ({\n className,\n orientation,\n size,\n variant,\n color,\n label,\n labelPosition,\n testId,\n ...rest\n}: DividerProps) => {\n const isVertical = orientation === \"vertical\"\n const lineClass = cn(\n dividerVariants({ orientation, size, variant }),\n color ? \"border-(--c-solid)\" : \"border-brand-900/20 dark:border-white/15\",\n )\n const labelClass = cn(\n \"shrink-0 text-xs\",\n color ? \"text-(--c-solid)\" : \"text-brand-900/20 dark:text-white/15\",\n )\n\n return (\n <ark.div\n role=\"separator\"\n aria-orientation={isVertical ? \"vertical\" : undefined}\n data-orientation={orientation ?? \"horizontal\"}\n data-color={color}\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\n label\n ? [\"flex items-center gap-2\", isVertical ? \"flex-col self-stretch\" : \"w-full\"]\n : [lineClass, isVertical ? \"self-stretch\" : \"w-full\"],\n className,\n )}\n >\n {label && (\n <>\n <span\n data-part=\"line\"\n className={cn(lineClass, \"flex-1\", labelPosition === \"start\" && \"hidden\")}\n />\n <span data-part=\"label\" className={labelClass}>\n {label}\n </span>\n <span\n data-part=\"line\"\n className={cn(lineClass, \"flex-1\", labelPosition === \"end\" && \"hidden\")}\n />\n </>\n )}\n </ark.div>\n )\n}\n"]}