@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
package/README.md CHANGED
@@ -1,4 +1,24 @@
1
- # @42-central/ui-react
1
+ <p align="center">
2
+ <img alt="@42-central/ui-react" src="https://shieldcn.dev/header/dots.svg?title=UI+React&subtitle=Code-themed+React+UI+kit+for+42%27s+apps&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAMgAAADIBAMAAABfdrOtAAAAMFBMVEUAAAD%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F87TQQwAAAAD3RSTlMAAw4fKzNGVm%2BMn73c6vz7344aAAACqklEQVR42u3ZMWsUQRjG8ed9jaA2N5fWQswnEMVG1I9gpXZKvsGdnVZ3VpdClBQi2KlgI5b2fgobI3baOXOI3mJgx5Bb8Hb21tkwN2%2BMef%2BQIrs7PPyyaY6DpmmapmmapmmHnUH%2BiDbCMG89vH4xvHC%2BM%2BTqp6APNL%2FxOLzxKLzwlQBGPPr%2BaiPoeQ%2F7hcSzjScNuo30rpzz1ju4%2Bc9es22Hee7Pde%2B929p7cvGa9egWnfhs%2FWKl3zTYzzyxtRsFrvt65YwA7gQxWGxavHBY1nTLYFnc4Y28nGIxbx70sCx%2F%2BiFiI90h222QXnwkHeJaRgQgYAEIWAACFoCABSBgAQhYAAIWgIAFIGABCFgAAhaAgAUgYAEIWAACFoCABSDgdMiZGAScDnkWg4DTIfdcdEQAAhaAgBMh1AECToOgCwScBkEIMS0jKZDdEOLQMXOt9LXsjLC8C%2BHRgQ2O%2FqCun0eGBp2ik7Z5NBUSZu42jirkH4P8lIBsKkQhhwwpJCBjhShEIX%2BDWAHIN4Xov9YRfiMSEF9QP1IKpGqIlUFMC6T8dflWpJvV0Rvh3%2BBLACGqnhyFkNLH2qXgm6Aq%2Bz6ETKjtIzYiebRFrv7rbAiAkbXefWQfodmoGskOAeeFjF01khPiTe4RKsZT5B7pTbzJPULFcA4BC0DAAhCwAAQsAAHng1iTe4SKASEYyQBxJhjJCwELQMACELAABCwAAQtAwAIQcDZIOOJtrCQI1gCgv1rIaGrQkHx8E%2ButPxDEoDHiXt%2BOdedAb2QKNCXUj7SOJAg4%2Bb3HIWCsuGKA7CN%2B4gzC1rDSzKkhsOIR9%2FQd6pFHvdInS3Z20CFGUtSPZZAs8VZAAuiIjuiIjuiIjuiIjhyfEVvLIUN8KQxHtX6QgaZpmqZpmqZpmvbf9xsJbA7rTAka4wAAAABJRU5ErkJggg%3D%3D&mode=dark&font=fira-code">
3
+ </p>
4
+
5
+ <p align="center">
6
+ <a href="https://www.npmjs.com/package/@42-central/ui-react"><img src="https://shieldcn.dev/npm/v/@42-central/ui-react.svg" alt="npm version" /></a>
7
+ <a href="https://react.dev"><img src="https://shieldcn.dev/badge/React-19-58c4dc.svg?logo=react" alt="React 19" /></a>
8
+ <a href="https://tailwindcss.com"><img src="https://shieldcn.dev/badge/Tailwind-v4-00bcff.svg?logo=tailwindcss" alt="Tailwind v4" /></a>
9
+ <a href="https://ark-ui.com"><img src="https://shieldcn.dev/badge/Ark_UI-5-7C3AED.svg" alt="Ark UI 5" /></a>
10
+ <img src="https://shieldcn.dev/badge/module-ESM--only-F7DF1E.svg" alt="ESM only" />
11
+ </p>
12
+
13
+ <p align="center">
14
+ <a href="#install">Install</a> ·
15
+ <a href="#wire-up-the-styles">Styles</a> ·
16
+ <a href="#theme-lightdarksystem">Theme</a> ·
17
+ <a href="#subpath-imports">Imports</a> ·
18
+ <a href="https://42kit.dev"><strong>Live docs ↗</strong></a>
19
+ </p>
20
+
21
+ ---
2
22
 
3
23
  Code-themed, RSC-friendly, **ESM-only** UI kit for 42 Intra-Next.
4
24
 
@@ -19,169 +39,8 @@ peer dependencies.
19
39
 
20
40
  > Consumer `tsconfig.json` must use `"moduleResolution": "Bundler"` (or `"NodeNext"`).
21
41
 
22
- The Vite plugin is on npm as `@42-central/vite-plugin-theme` (see
23
- [Vite](#vite-client-only-spa)).
24
-
25
- ### From Nexus
26
-
27
- Existing consumers can keep installing `@42/ui-react` from the private Nexus
28
- registry (`nexus.tooling.42.tech`). Every release is published there too, at
29
- the same versions, under the `@42` names: use the `@42` scope wherever this
30
- README says `@42-central`. You'll need credentials, set up once below.
31
-
32
- One-time setup: point the `@42` scope at Nexus. This half isn't secret, so
33
- it's safe to commit to your project's `.npmrc`:
34
-
35
- ```ini
36
- @42:registry=https://nexus.tooling.42.tech/repository/npm-hosted/
37
- always-auth=true
38
- ```
39
-
40
- Modern pnpm (≥10.34.2 / ≥11.5.3) no longer expands `${VAR}` placeholders for
41
- _credentials_ that come from a project-level `.npmrc` — that file is
42
- committed, and a malicious repo could otherwise use the same trick to
43
- exfiltrate env secrets to an attacker-controlled registry
44
- ([GHSA-3qhv-2rgh-x77r](https://github.com/pnpm/pnpm/security/advisories/GHSA-3qhv-2rgh-x77r)).
45
- So the token never goes in a file that's part of the repo — set it once at
46
- the user level instead, where pnpm still trusts it:
47
-
48
- ```bash
49
- NEXUS_NPM_AUTH="$(echo "<nexus-username>:<nexus-password>" | base64)"
50
- pnpm config set "//nexus.tooling.42.tech/repository/npm-hosted/:_auth" "$NEXUS_NPM_AUTH"
51
- ```
52
-
53
- You can get these crendentials on the company 1password.
54
-
55
- ```bash
56
- pnpm add @42/ui-react @ark-ui/react react react-dom tailwindcss
57
- ```
58
-
59
- > Using npm instead of pnpm? It doesn't enforce the restriction above, so the
60
- > original single-`.npmrc`-with-`${NEXUS_NPM_AUTH}` approach still works —
61
- > see the git history of this file for that version.
62
-
63
- #### In a pipeline
64
-
65
- Commit the same registry mapping (above) to the consuming repo — it's the
66
- non-secret half, and `nexus.tooling.42.tech` is reachable over the public
67
- internet, so any CI runner works, hosted or self-hosted. For the credential,
68
- skip writing a file at all: pass it as a URL-scoped, `pnpm_config_`-prefixed
69
- environment variable for just the one `install` invocation that needs it
70
- (pnpm ≥11.6):
71
-
72
- ```yaml
73
- # .npmrc (committed to the consuming repo, alongside package.json)
74
- # @42:registry=https://nexus.tooling.42.tech/repository/npm-hosted/
75
- # always-auth=true
76
-
77
- jobs:
78
- build:
79
- runs-on: "node-22-small" # or your org's lightweight Node runner (e.g. a wolfi-based one)
80
- steps:
81
- - uses: "actions/checkout@v4"
82
- - uses: "pnpm/action-setup@v4"
83
- - uses: "actions/setup-node@v4"
84
- with:
85
- node-version: "22"
86
- cache: "pnpm"
87
- - name: "Install dependencies"
88
- env:
89
- NEXUS_NPM_AUTH: "${{ secrets.NEXUS_NPM_AUTH }}"
90
- # pnpm won't expand ${VAR} auth fields read from a committed/project .npmrc —
91
- # https://pnpm.io/blog/2026/06/11/env-variables-in-repository-npmrc — so the
92
- # resolved credential has to be written into the user-level .npmrc instead.
93
- run: >
94
- echo "//nexus.tooling.42.tech/repository/npm-hosted/:_auth=${NEXUS_NPM_AUTH}" >> "$HOME/.npmrc"
95
- pnpm install --frozen-lockfile
96
- ```
97
-
98
- Set `NEXUS_NPM_AUTH` as a repository secret (Settings → Secrets and variables
99
- → Actions) holding the same base64 value from the local setup above — a
100
- different Nexus account than the one used to publish, scoped to read only.
101
-
102
- On pnpm <11.6, or any runner where inlining the env var isn't convenient,
103
- write the resolved value into a _runtime-generated_ `.npmrc` instead of a
104
- committed one — the same pattern this repo's own
105
- [publish workflow](../../.github/workflows/publish.yml) uses to authenticate
106
- `npm publish`:
107
-
108
- ```yaml
109
- - name: "Install dependencies"
110
- env:
111
- NEXUS_NPM_AUTH: "${{ secrets.NEXUS_NPM_AUTH }}"
112
- run: |
113
- echo "//nexus.tooling.42.tech/repository/npm-hosted/:_auth=${NEXUS_NPM_AUTH}" >> .npmrc
114
- pnpm install --frozen-lockfile
115
- ```
116
-
117
- #### In a container
118
-
119
- Same non-secret registry mapping in the committed `.npmrc`. Keep the token
120
- out of the image with a
121
- [BuildKit secret mount](https://docs.docker.com/build/building/secrets/)
122
- instead of a build `ARG`/`ENV` — those get baked into `docker history` even if
123
- a later layer never references them again:
124
-
125
- ```dockerfile
126
- # syntax=docker/dockerfile:1
127
- FROM node:22-slim AS deps
128
- WORKDIR /app
129
- RUN corepack enable
130
-
131
- COPY package.json pnpm-lock.yaml .npmrc ./
132
- # .npmrc (committed alongside package.json):
133
- # @42:registry=https://nexus.tooling.42.tech/repository/npm-hosted/
134
- # always-auth=true
135
- RUN --mount=type=secret,id=nexus_npm_auth \
136
- env "pnpm_config_//nexus.tooling.42.tech/repository/npm-hosted/:_auth=$(cat /run/secrets/nexus_npm_auth)" \
137
- pnpm install --frozen-lockfile
138
- ```
139
-
140
- Supply the secret at build time, not as `--build-arg`:
141
-
142
- ```bash
143
- NEXUS_NPM_AUTH="$(printf '%s' "<nexus-username>:<nexus-password>" | base64)"
144
- docker build --secret id=nexus_npm_auth,env=NEXUS_NPM_AUTH -t your-image .
145
- ```
146
-
147
- In CI, source it from the pipeline's own secret store, e.g.
148
- [`docker/build-push-action`](https://github.com/docker/build-push-action):
149
-
150
- ```yaml
151
- - uses: "docker/build-push-action@v6"
152
- with:
153
- secrets: |
154
- "nexus_npm_auth=${{ secrets.NEXUS_NPM_AUTH }}"
155
- ```
156
-
157
- #### With Docker Compose
158
-
159
- Same Dockerfile as above — Compose just supplies the build secret instead of
160
- a raw `docker build --secret` flag. Define it once at the top level, sourced
161
- straight from your shell's environment (no secret file needed), and grant the
162
- service's build access to it explicitly:
163
-
164
- ```yaml
165
- # compose.yaml
166
- services:
167
- app:
168
- build:
169
- context: .
170
- secrets:
171
- - nexus_npm_auth
172
-
173
- secrets:
174
- nexus_npm_auth:
175
- environment: "NEXUS_NPM_AUTH"
176
- ```
177
-
178
- ```bash
179
- export NEXUS_NPM_AUTH="$(printf '%s' "<nexus-username>:<nexus-password>" | base64)"
180
- docker compose build
181
- ```
182
-
183
- Environment-sourced secrets are a Compose-only convenience — they don't carry
184
- over to `docker stack deploy`/Swarm, which needs `file:` or `external:` instead.
42
+ Using Vite? Add `@42-central/vite-plugin-theme` too, for flash-free theme
43
+ loading (see [Vite](#vite-client-only-spa)).
185
44
 
186
45
  ## Wire up the styles
187
46
 
@@ -269,16 +128,9 @@ The script needs to land in `index.html` itself, genuinely blocking (not
269
128
  `type="module"`, which Vite treats as deferred). Three ways to get it there,
270
129
  in order of preference:
271
130
 
272
- **1. `@42-central/vite-plugin-theme` (recommended).** Injects the script into
273
- `index.html` automatically, at both `vite dev` and `vite build` time — no
274
- manual HTML editing, correct in both dev and production:
275
-
276
- ```bash
277
- npm install -D @42-central/vite-plugin-theme
278
- pnpm add -D @42-central/vite-plugin-theme
279
- yarn add --dev @42-central/vite-plugin-theme
280
- bun add --dev @42-central/vite-plugin-theme
281
- ```
131
+ **1. [`@42-central/vite-plugin-theme`](https://www.npmjs.com/package/@42-central/vite-plugin-theme) (recommended).**
132
+ Injects the script into `index.html` at both `vite dev` and `vite build` time,
133
+ so you never edit the HTML by hand:
282
134
 
283
135
  ```ts
284
136
  // vite.config.ts
@@ -286,10 +138,13 @@ import { defineConfig } from "vite";
286
138
  import { themeInitPlugin } from "@42-central/vite-plugin-theme";
287
139
 
288
140
  export default defineConfig({
289
- plugins: [themeInitPlugin()], // accepts the same options as buildThemeInitScript()
141
+ plugins: [themeInitPlugin()],
290
142
  });
291
143
  ```
292
144
 
145
+ Install and options are in the
146
+ [plugin README](https://github.com/42staff/kit/blob/main/packages/vite-plugin-theme/README.md).
147
+
293
148
  **2. The static asset, copied into `public/`.** `@42-central/ui-react/theme-init.js` is
294
149
  a prebuilt, dependency-free script. A hardcoded `<script src="/node_modules/...">`
295
150
  only works in `vite dev` — Vite's dev server serves `node_modules` directly,
@@ -453,3 +308,9 @@ The package root (`@42-central/ui-react`) only re-exports shared utilities and t
453
308
  `cn`, `COLORS` / `Color`, `SIZES` / `Size`, `FormControlProps`, `useLogger`, and
454
309
  `useTheme` / `ThemeMode` / `ResolvedTheme`. Components live at their own
455
310
  subpaths so bundlers never pull in the whole kit.
311
+
312
+ ## Links
313
+
314
+ - [Live docs and component reference](https://42kit.dev)
315
+ - [Changelog](https://42kit.dev/docs/changelog)
316
+ - [Source on GitHub](https://github.com/42staff/kit)
@@ -1,7 +1,7 @@
1
1
  import { useLinkComponent } from './chunk-GTKKRV5N.js';
2
2
  import { useUncontrolled } from './chunk-BEL75C7N.js';
3
3
  import { ChevronIcon } from './chunk-IG7FBZVM.js';
4
- import { Collapse } from './chunk-HWNPXAEN.js';
4
+ import { Collapse } from './chunk-WSIVRDRB.js';
5
5
  import { focusStyles } from './chunk-B2LCHXUB.js';
6
6
  import { cn } from './chunk-QP4I37PA.js';
7
7
  import { cva } from 'class-variance-authority';
@@ -149,5 +149,5 @@ function Navigation(props) {
149
149
  }
150
150
 
151
151
  export { NavLink, Navigation };
152
- //# sourceMappingURL=chunk-FD6P6PLQ.js.map
153
- //# sourceMappingURL=chunk-FD6P6PLQ.js.map
152
+ //# sourceMappingURL=chunk-5JHDSVEZ.js.map
153
+ //# sourceMappingURL=chunk-5JHDSVEZ.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/nav-link/nav-link.tsx","../src/components/nav-link/navigation.tsx"],"names":["jsx","Fragment"],"mappings":";;;;;;;;;AAsCA,IAAM,UAAA,GAAa,GAAA;AAAA,EACjB;AAAA,IACE,iGAAA;AAAA,IACA,gCAAA;AAAA,IACA,wCAAA;AAAA,IACA,WAAA,EAAY;AAAA,IACZ;AAAA,GACF;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,IAAA,EAAM,mFAAA;AAAA,QACN,KAAA,EAAO;AAAA;AACT,KACF;AAAA,IACA,eAAA,EAAiB,EAAE,OAAA,EAAS,KAAA;AAAM;AAEtC,CAAA;AA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AAW,MAAM,CAAA,IAAA,EAAO,CAAC,CAAA,CAAA,EAAI,aAAa,CAAC,CAAA,EAAE,CAAA;AAC/E;AAIO,SAAS,WAAW,KAAA,EAAmC;AAC5D,EAAA,uBAAOD,GAAAA,CAAC,cAAA,EAAA,EAAgB,GAAG,KAAA,EAAO,CAAA;AACpC","file":"chunk-FD6P6PLQ.js","sourcesContent":["\"use client\"\n\nimport { cva } from \"class-variance-authority\"\nimport type { ElementType, ReactNode } from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport { focusStyles } from \"../../lib/focus-styles\"\nimport { useLinkComponent } from \"../../lib/link-component\"\nimport { useUncontrolled } from \"../../lib/use-uncontrolled\"\nimport { Collapse } from \"../collapse/collapse\"\nimport { ChevronIcon } from \"../popover/icons\"\n\n/**\n * NavLink — a single sidebar/nav row: leading `startSlot`, `label`, trailing\n * `endSlot`, current-page treatment, and self-nesting via `children` for\n * arbitrary-depth sub-navigation (each nested `<NavLink>` renders indented,\n * revealed with `Collapse` when the parent is `open`).\n *\n * Router-agnostic: pass whatever the target link needs as `linkOptions` (a\n * plain `{ href }` for a bare `<a>`, or a framework router's own shape, e.g.\n * TanStack Router's `{ to, params }`) — it's spread verbatim onto whatever\n * renders the link. `linkComponent` picks what that is; if omitted, it falls\n * back to the app-wide `<LinkComponentProvider>` (see `lib/link-component`),\n * then to a plain `<a>`. Generic over `linkOptions`'s shape so a router's own\n * type-safety utilities can validate/autocomplete it — see\n * `nav-link/tanstack.tsx` for a TanStack Router–typed wrapper built this way.\n *\n * A row with no `linkOptions` (a pure category / toggle heading) renders as a\n * `<button>` instead of a link. A row with both `linkOptions` and nested\n * children renders the link and its expand/collapse toggle as two separate\n * controls (a link nested inside a button, or vice versa, isn't valid HTML).\n *\n * <NavLink label=\"Dashboard\" startSlot={<Home />} linkOptions={{ href: \"/dashboard\" }} />\n * <NavLink label=\"Settings\" startSlot={<Settings />} defaultOpen>\n * <NavLink label=\"Profile\" linkOptions={{ href: \"/settings/profile\" }} />\n * <NavLink label=\"Security\" linkOptions={{ href: \"/settings/security\" }} />\n * </NavLink>\n */\n\nconst navLinkRow = cva(\n [\n \"flex min-w-0 flex-1 cursor-pointer items-center gap-2 rounded-md px-2.5 py-2 text-start text-sm\",\n \"outline-none transition-colors\",\n \"hover:bg-black/5 dark:hover:bg-white/8\",\n focusStyles(),\n \"aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n ],\n {\n variants: {\n current: {\n true: \"bg-black/5 font-medium text-gray-light-900 dark:bg-white/8 dark:text-gray-dark-25\",\n false: \"text-gray-light-700 dark:text-gray-dark-200\",\n },\n },\n defaultVariants: { current: false },\n },\n)\n\nconst chevronButton = cn(\n \"flex shrink-0 cursor-pointer items-center justify-center rounded-md p-2 text-gray-light-500 transition-colors\",\n \"hover:bg-black/5 dark:text-gray-dark-400 dark:hover:bg-white/8\",\n focusStyles(),\n)\n\nconst chevron = (open: boolean) => (\n <span\n aria-hidden=\"true\"\n data-state={open ? \"open\" : \"closed\"}\n className=\"ms-auto flex shrink-0 transition-transform data-[state=open]:rotate-180 [&_svg]:size-4\"\n >\n <ChevronIcon />\n </span>\n)\n\nexport type NavLinkClassNames = {\n /** The link/button row itself. */\n row?: string\n /** The indented container holding nested `<NavLink>` children. */\n items?: string\n}\n\nexport type NavLinkProps<TOptions = unknown> = {\n label: ReactNode\n /** Leading slot (icon, avatar, etc). */\n startSlot?: ReactNode\n /** Trailing slot (e.g. a count or status badge). */\n endSlot?: ReactNode\n /** Marks this as the active/current page. */\n current?: boolean\n disabled?: boolean\n /** Whether nested `children` are revealed. Uncontrolled by default. */\n open?: boolean\n defaultOpen?: boolean\n onOpenChange?: (open: boolean) => void\n /** The router's own link options — e.g. `{ href: \"/x\" }` for a plain `<a>`,\n * or `{ to: \"/x\", params: {...} }` for TanStack Router. Omit for a pure\n * category/toggle row with no link of its own. */\n linkOptions?: TOptions\n /** Overrides the `<LinkComponentProvider>` for this row only. */\n linkComponent?: ElementType\n classNames?: NavLinkClassNames\n className?: string\n /** Nested `<NavLink>` elements, revealed when `open`. */\n children?: ReactNode\n}\n\nfunction NavLinkImpl({\n label,\n startSlot,\n endSlot,\n current,\n disabled,\n open,\n defaultOpen,\n onOpenChange,\n linkOptions,\n linkComponent,\n classNames,\n className,\n children,\n}: NavLinkProps) {\n const [isOpen, setOpen] = useUncontrolled<boolean>({\n value: open,\n defaultValue: defaultOpen,\n finalValue: false,\n onChange: onOpenChange,\n })\n const hasChildren = children != null\n const isLink = linkOptions != null\n const Comp = useLinkComponent(linkComponent) ?? \"a\"\n\n const content = (\n <>\n {startSlot}\n <span className=\"min-w-0 flex-1 truncate\">{label}</span>\n {endSlot}\n </>\n )\n\n const rowClassName = cn(navLinkRow({ current }), classNames?.row, className)\n\n return (\n <div>\n <div className=\"flex items-stretch gap-1\">\n {isLink ? (\n <Comp\n {...linkOptions}\n aria-current={current ? \"page\" : undefined}\n aria-disabled={disabled || undefined}\n className={rowClassName}\n >\n {content}\n </Comp>\n ) : (\n <button\n type=\"button\"\n aria-current={current ? \"page\" : undefined}\n aria-disabled={disabled || undefined}\n aria-expanded={hasChildren ? isOpen : undefined}\n disabled={disabled}\n onClick={() => hasChildren && setOpen(!isOpen)}\n className={rowClassName}\n >\n {content}\n {hasChildren && chevron(isOpen)}\n </button>\n )}\n {hasChildren && isLink && (\n <button\n type=\"button\"\n aria-expanded={isOpen}\n aria-label={isOpen ? \"Collapse\" : \"Expand\"}\n onClick={() => setOpen(!isOpen)}\n className={chevronButton}\n >\n {chevron(isOpen)}\n </button>\n )}\n </div>\n {hasChildren && (\n <Collapse open={isOpen}>\n <div\n className={cn(\n \"ms-4.5 space-y-0.5 border-s border-brand-900/20 ps-2 pt-0.5 dark:border-white/15\",\n classNames?.items,\n )}\n >\n {children}\n </div>\n </Collapse>\n )}\n </div>\n )\n}\n\n/**\n * `NavLink<TOptions>` — generic so a router's own type-safety utility (e.g.\n * TanStack Router's `ValidateLinkOptions`) can validate `linkOptions` when\n * explicitly parameterized. The implementation itself stays untyped/loose\n * (the generic can't be forwarded through the JSX body); see\n * TanStack Router's own documented pattern for this exact split.\n */\nexport function NavLink<TOptions = unknown>(props: NavLinkProps<TOptions>): ReactNode\nexport function NavLink(props: NavLinkProps): ReactNode {\n return <NavLinkImpl {...props} />\n}\n","\"use client\"\n\nimport type { ElementType, ReactNode } from \"react\"\nimport { NavLink, type NavLinkClassNames } from \"./nav-link\"\n\n/**\n * `Navigation` — the `data`-driven convenience wrapper over `NavLink` (same\n * relationship as `menu-data.tsx` to `menu.tsx`): pass a `data` array, get a\n * fully wired, arbitrarily-nested nav tree.\n *\n * <Navigation\n * data={[\n * { label: \"Dashboard\", startSlot: <Home />, linkOptions: { href: \"/dashboard\" } },\n * { label: \"Settings\", startSlot: <Settings />, items: [\n * { label: \"Profile\", linkOptions: { href: \"/settings/profile\" } },\n * { label: \"Security\", linkOptions: { href: \"/settings/security\" } },\n * ]},\n * ]}\n * />\n *\n * Generic over the same `TOptions` as `NavLink` — parameterize it (e.g. with\n * `TanStackLinkOptions` from `nav-link/tanstack`) to get a router's own\n * type-safety utilities validating every entry's `linkOptions`.\n */\nexport type NavigationItem<TOptions = unknown> = {\n label: ReactNode\n startSlot?: ReactNode\n endSlot?: ReactNode\n current?: boolean\n disabled?: boolean\n open?: boolean\n defaultOpen?: boolean\n onOpenChange?: (open: boolean) => void\n linkOptions?: TOptions\n classNames?: NavLinkClassNames\n /** Nested entries — an item with `items` renders its children indented,\n * revealed on expand/collapse. Recursive: nests to any depth. */\n items?: readonly NavigationItem<TOptions>[]\n}\n\nexport type NavigationProps<TOptions = unknown> = {\n /** The nav entries, in order. */\n data: readonly NavigationItem<TOptions>[]\n /** Overrides the app-wide `<LinkComponentProvider>` for every generated row. */\n linkComponent?: ElementType\n}\n\nconst renderItem = (\n item: NavigationItem,\n key: string,\n linkComponent: ElementType | undefined,\n): ReactNode => (\n <NavLink\n key={key}\n label={item.label}\n startSlot={item.startSlot}\n endSlot={item.endSlot}\n current={item.current}\n disabled={item.disabled}\n open={item.open}\n defaultOpen={item.defaultOpen}\n onOpenChange={item.onOpenChange}\n linkOptions={item.linkOptions}\n linkComponent={linkComponent}\n classNames={item.classNames}\n >\n {item.items && item.items.length > 0\n ? item.items.map((child, i) => renderItem(child, `${key}.${i}`, linkComponent))\n : undefined}\n </NavLink>\n)\n\nfunction NavigationImpl({ data, linkComponent }: NavigationProps) {\n return <>{data.map((item, i) => renderItem(item, `nav-${i}`, linkComponent))}</>\n}\n\n/** Generic for the same reason as `NavLink` — see its doc comment. */\nexport function Navigation<TOptions = unknown>(props: NavigationProps<TOptions>): ReactNode\nexport function Navigation(props: NavigationProps): ReactNode {\n return <NavigationImpl {...props} />\n}\n"]}
1
+ {"version":3,"sources":["../src/components/nav-link/nav-link.tsx","../src/components/nav-link/navigation.tsx"],"names":["jsx","Fragment"],"mappings":";;;;;;;;;AAsCA,IAAM,UAAA,GAAa,GAAA;AAAA,EACjB;AAAA,IACE,iGAAA;AAAA,IACA,gCAAA;AAAA,IACA,wCAAA;AAAA,IACA,WAAA,EAAY;AAAA,IACZ;AAAA,GACF;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,IAAA,EAAM,mFAAA;AAAA,QACN,KAAA,EAAO;AAAA;AACT,KACF;AAAA,IACA,eAAA,EAAiB,EAAE,OAAA,EAAS,KAAA;AAAM;AAEtC,CAAA;AAEA,IAAM,aAAA,GAAgB,EAAA;AAAA,EACpB,+GAAA;AAAA,EACA,gEAAA;AAAA,EACA,WAAA;AACF,CAAA;AAEA,IAAM,OAAA,GAAU,CAAC,IAAA,qBACf,GAAA;AAAA,EAAC,MAAA;AAAA,EAAA;AAAA,IACC,aAAA,EAAY,MAAA;AAAA,IACZ,YAAA,EAAY,OAAO,MAAA,GAAS,QAAA;AAAA,IAC5B,SAAA,EAAU,wFAAA;AAAA,IAEV,8BAAC,WAAA,EAAA,EAAY;AAAA;AACf,CAAA;AAmCF,SAAS,WAAA,CAAY;AAA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EAA,GAAAA;AAAA,EAAC,OAAA;AAAA,EAAA;AAAA,IAEC,OAAO,IAAA,CAAK,KAAA;AAAA,IACZ,WAAW,IAAA,CAAK,SAAA;AAAA,IAChB,SAAS,IAAA,CAAK,OAAA;AAAA,IACd,SAAS,IAAA,CAAK,OAAA;AAAA,IACd,UAAU,IAAA,CAAK,QAAA;AAAA,IACf,MAAM,IAAA,CAAK,IAAA;AAAA,IACX,aAAa,IAAA,CAAK,WAAA;AAAA,IAClB,cAAc,IAAA,CAAK,YAAA;AAAA,IACnB,aAAa,IAAA,CAAK,WAAA;AAAA,IAClB,aAAA;AAAA,IACA,YAAY,IAAA,CAAK,UAAA;AAAA,IAEhB,QAAA,EAAA,IAAA,CAAK,SAAS,IAAA,CAAK,KAAA,CAAM,SAAS,CAAA,GAC/B,IAAA,CAAK,MAAM,GAAA,CAAI,CAAC,OAAO,CAAA,KAAM,UAAA,CAAW,OAAO,CAAA,EAAG,GAAG,IAAI,CAAC,CAAA,CAAA,EAAI,aAAa,CAAC,CAAA,GAC5E;AAAA,GAAA;AAAA,EAfC;AAgBP,CAAA;AAGF,SAAS,cAAA,CAAe,EAAE,IAAA,EAAM,aAAA,EAAc,EAAoB;AAChE,EAAA,uBAAOA,GAAAA,CAAAC,QAAAA,EAAA,EAAG,QAAA,EAAA,IAAA,CAAK,IAAI,CAAC,IAAA,EAAM,CAAA,KAAM,UAAA,CAAW,MAAM,CAAA,IAAA,EAAO,CAAC,CAAA,CAAA,EAAI,aAAa,CAAC,CAAA,EAAE,CAAA;AAC/E;AAIO,SAAS,WAAW,KAAA,EAAmC;AAC5D,EAAA,uBAAOD,GAAAA,CAAC,cAAA,EAAA,EAAgB,GAAG,KAAA,EAAO,CAAA;AACpC","file":"chunk-5JHDSVEZ.js","sourcesContent":["\"use client\"\n\nimport { cva } from \"class-variance-authority\"\nimport type { ElementType, ReactNode } from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport { focusStyles } from \"../../lib/focus-styles\"\nimport { useLinkComponent } from \"../../lib/link-component\"\nimport { useUncontrolled } from \"../../lib/use-uncontrolled\"\nimport { Collapse } from \"../collapse/collapse\"\nimport { ChevronIcon } from \"../popover/icons\"\n\n/**\n * NavLink — a single sidebar/nav row: leading `startSlot`, `label`, trailing\n * `endSlot`, current-page treatment, and self-nesting via `children` for\n * arbitrary-depth sub-navigation (each nested `<NavLink>` renders indented,\n * revealed with `Collapse` when the parent is `open`).\n *\n * Router-agnostic: pass whatever the target link needs as `linkOptions` (a\n * plain `{ href }` for a bare `<a>`, or a framework router's own shape, e.g.\n * TanStack Router's `{ to, params }`) — it's spread verbatim onto whatever\n * renders the link. `linkComponent` picks what that is; if omitted, it falls\n * back to the app-wide `<LinkComponentProvider>` (see `lib/link-component`),\n * then to a plain `<a>`. Generic over `linkOptions`'s shape so a router's own\n * type-safety utilities can validate/autocomplete it — see\n * `nav-link/tanstack.tsx` for a TanStack Router–typed wrapper built this way.\n *\n * A row with no `linkOptions` (a pure category / toggle heading) renders as a\n * `<button>` instead of a link. A row with both `linkOptions` and nested\n * children renders the link and its expand/collapse toggle as two separate\n * controls (a link nested inside a button, or vice versa, isn't valid HTML).\n *\n * <NavLink label=\"Dashboard\" startSlot={<Home />} linkOptions={{ href: \"/dashboard\" }} />\n * <NavLink label=\"Settings\" startSlot={<Settings />} defaultOpen>\n * <NavLink label=\"Profile\" linkOptions={{ href: \"/settings/profile\" }} />\n * <NavLink label=\"Security\" linkOptions={{ href: \"/settings/security\" }} />\n * </NavLink>\n */\n\nconst navLinkRow = cva(\n [\n \"flex min-w-0 flex-1 cursor-pointer items-center gap-2 rounded-md px-2.5 py-2 text-start text-sm\",\n \"outline-none transition-colors\",\n \"hover:bg-black/5 dark:hover:bg-white/8\",\n focusStyles(),\n \"aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n ],\n {\n variants: {\n current: {\n true: \"bg-black/5 font-medium text-gray-light-900 dark:bg-white/8 dark:text-gray-dark-25\",\n false: \"text-gray-light-700 dark:text-gray-dark-200\",\n },\n },\n defaultVariants: { current: false },\n },\n)\n\nconst chevronButton = cn(\n \"flex shrink-0 cursor-pointer items-center justify-center rounded-md p-2 text-gray-light-500 transition-colors\",\n \"hover:bg-black/5 dark:text-gray-dark-400 dark:hover:bg-white/8\",\n focusStyles(),\n)\n\nconst chevron = (open: boolean) => (\n <span\n aria-hidden=\"true\"\n data-state={open ? \"open\" : \"closed\"}\n className=\"ms-auto flex shrink-0 transition-transform data-[state=open]:rotate-180 [&_svg]:size-4\"\n >\n <ChevronIcon />\n </span>\n)\n\nexport type NavLinkClassNames = {\n /** The link/button row itself. */\n row?: string\n /** The indented container holding nested `<NavLink>` children. */\n items?: string\n}\n\nexport type NavLinkProps<TOptions = unknown> = {\n label: ReactNode\n /** Leading slot (icon, avatar, etc). */\n startSlot?: ReactNode\n /** Trailing slot (e.g. a count or status badge). */\n endSlot?: ReactNode\n /** Marks this as the active/current page. */\n current?: boolean\n disabled?: boolean\n /** Whether nested `children` are revealed. Uncontrolled by default. */\n open?: boolean\n defaultOpen?: boolean\n onOpenChange?: (open: boolean) => void\n /** The router's own link options — e.g. `{ href: \"/x\" }` for a plain `<a>`,\n * or `{ to: \"/x\", params: {...} }` for TanStack Router. Omit for a pure\n * category/toggle row with no link of its own. */\n linkOptions?: TOptions\n /** Overrides the `<LinkComponentProvider>` for this row only. */\n linkComponent?: ElementType\n classNames?: NavLinkClassNames\n className?: string\n /** Nested `<NavLink>` elements, revealed when `open`. */\n children?: ReactNode\n}\n\nfunction NavLinkImpl({\n label,\n startSlot,\n endSlot,\n current,\n disabled,\n open,\n defaultOpen,\n onOpenChange,\n linkOptions,\n linkComponent,\n classNames,\n className,\n children,\n}: NavLinkProps) {\n const [isOpen, setOpen] = useUncontrolled<boolean>({\n value: open,\n defaultValue: defaultOpen,\n finalValue: false,\n onChange: onOpenChange,\n })\n const hasChildren = children != null\n const isLink = linkOptions != null\n const Comp = useLinkComponent(linkComponent) ?? \"a\"\n\n const content = (\n <>\n {startSlot}\n <span className=\"min-w-0 flex-1 truncate\">{label}</span>\n {endSlot}\n </>\n )\n\n const rowClassName = cn(navLinkRow({ current }), classNames?.row, className)\n\n return (\n <div>\n <div className=\"flex items-stretch gap-1\">\n {isLink ? (\n <Comp\n {...linkOptions}\n aria-current={current ? \"page\" : undefined}\n aria-disabled={disabled || undefined}\n className={rowClassName}\n >\n {content}\n </Comp>\n ) : (\n <button\n type=\"button\"\n aria-current={current ? \"page\" : undefined}\n aria-disabled={disabled || undefined}\n aria-expanded={hasChildren ? isOpen : undefined}\n disabled={disabled}\n onClick={() => hasChildren && setOpen(!isOpen)}\n className={rowClassName}\n >\n {content}\n {hasChildren && chevron(isOpen)}\n </button>\n )}\n {hasChildren && isLink && (\n <button\n type=\"button\"\n aria-expanded={isOpen}\n aria-label={isOpen ? \"Collapse\" : \"Expand\"}\n onClick={() => setOpen(!isOpen)}\n className={chevronButton}\n >\n {chevron(isOpen)}\n </button>\n )}\n </div>\n {hasChildren && (\n <Collapse open={isOpen}>\n <div\n className={cn(\n \"ms-4.5 space-y-0.5 border-s border-brand-900/20 ps-2 pt-0.5 dark:border-white/15\",\n classNames?.items,\n )}\n >\n {children}\n </div>\n </Collapse>\n )}\n </div>\n )\n}\n\n/**\n * `NavLink<TOptions>` — generic so a router's own type-safety utility (e.g.\n * TanStack Router's `ValidateLinkOptions`) can validate `linkOptions` when\n * explicitly parameterized. The implementation itself stays untyped/loose\n * (the generic can't be forwarded through the JSX body); see\n * TanStack Router's own documented pattern for this exact split.\n */\nexport function NavLink<TOptions = unknown>(props: NavLinkProps<TOptions>): ReactNode\nexport function NavLink(props: NavLinkProps): ReactNode {\n return <NavLinkImpl {...props} />\n}\n","\"use client\"\n\nimport type { ElementType, ReactNode } from \"react\"\nimport { NavLink, type NavLinkClassNames } from \"./nav-link\"\n\n/**\n * `Navigation` — the `data`-driven convenience wrapper over `NavLink` (same\n * relationship as `menu-data.tsx` to `menu.tsx`): pass a `data` array, get a\n * fully wired, arbitrarily-nested nav tree.\n *\n * <Navigation\n * data={[\n * { label: \"Dashboard\", startSlot: <Home />, linkOptions: { href: \"/dashboard\" } },\n * { label: \"Settings\", startSlot: <Settings />, items: [\n * { label: \"Profile\", linkOptions: { href: \"/settings/profile\" } },\n * { label: \"Security\", linkOptions: { href: \"/settings/security\" } },\n * ]},\n * ]}\n * />\n *\n * Generic over the same `TOptions` as `NavLink` — parameterize it (e.g. with\n * `TanStackLinkOptions` from `nav-link/tanstack`) to get a router's own\n * type-safety utilities validating every entry's `linkOptions`.\n */\nexport type NavigationItem<TOptions = unknown> = {\n label: ReactNode\n startSlot?: ReactNode\n endSlot?: ReactNode\n current?: boolean\n disabled?: boolean\n open?: boolean\n defaultOpen?: boolean\n onOpenChange?: (open: boolean) => void\n linkOptions?: TOptions\n classNames?: NavLinkClassNames\n /** Nested entries — an item with `items` renders its children indented,\n * revealed on expand/collapse. Recursive: nests to any depth. */\n items?: readonly NavigationItem<TOptions>[]\n}\n\nexport type NavigationProps<TOptions = unknown> = {\n /** The nav entries, in order. */\n data: readonly NavigationItem<TOptions>[]\n /** Overrides the app-wide `<LinkComponentProvider>` for every generated row. */\n linkComponent?: ElementType\n}\n\nconst renderItem = (\n item: NavigationItem,\n key: string,\n linkComponent: ElementType | undefined,\n): ReactNode => (\n <NavLink\n key={key}\n label={item.label}\n startSlot={item.startSlot}\n endSlot={item.endSlot}\n current={item.current}\n disabled={item.disabled}\n open={item.open}\n defaultOpen={item.defaultOpen}\n onOpenChange={item.onOpenChange}\n linkOptions={item.linkOptions}\n linkComponent={linkComponent}\n classNames={item.classNames}\n >\n {item.items && item.items.length > 0\n ? item.items.map((child, i) => renderItem(child, `${key}.${i}`, linkComponent))\n : undefined}\n </NavLink>\n)\n\nfunction NavigationImpl({ data, linkComponent }: NavigationProps) {\n return <>{data.map((item, i) => renderItem(item, `nav-${i}`, linkComponent))}</>\n}\n\n/** Generic for the same reason as `NavLink` — see its doc comment. */\nexport function Navigation<TOptions = unknown>(props: NavigationProps<TOptions>): ReactNode\nexport function Navigation(props: NavigationProps): ReactNode {\n return <NavigationImpl {...props} />\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { fieldA11yProps } from './chunk-UNSAA7YG.js';
1
+ import { fieldA11yProps } from './chunk-FHG54IT5.js';
2
2
  import { props } from './chunk-WYCMIIRR.js';
3
3
  import { cn } from './chunk-QP4I37PA.js';
4
4
  import { ark } from '@ark-ui/react';
@@ -120,6 +120,7 @@ var InputBase = ({
120
120
  className,
121
121
  classNames,
122
122
  testId,
123
+ asChild: _asChild,
123
124
  ...rest
124
125
  }) => /* @__PURE__ */ jsxs(
125
126
  ark.div,
@@ -203,5 +204,5 @@ var Input = ({
203
204
  };
204
205
 
205
206
  export { Input, InputBase, inputControlClasses, inputShell, inputSlot, placeholderColor, shellChrome, shellGap, shellVariants };
206
- //# sourceMappingURL=chunk-QMW7D5GU.js.map
207
- //# sourceMappingURL=chunk-QMW7D5GU.js.map
207
+ //# sourceMappingURL=chunk-5OQLFX47.js.map
208
+ //# sourceMappingURL=chunk-5OQLFX47.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/input/input.tsx"],"names":[],"mappings":";;;;;;;;AAuCO,IAAM,mBAAA,GAAsB,EAAA;AAAA,EACjC,uEAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,6BAAA;AAAA,EACA,iCAAA;AAAA,EACA,qEAAA;AAAA,EACA;AACF;AAQO,IAAM,WAAA,GAAc;AAAA,EACzB,wDAAA;AAAA,EACA,4CAAA;AAAA,EACA,4CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,mLAAA;AAAA;AAAA;AAAA,EAGA,yMAAA;AAAA;AAAA,EAEA,2DAAA;AAAA,EACA,0BAAA;AAAA,EACA,6BAAA;AAAA,EACA;AACF;AAGO,IAAM,aAAA,GAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ3B,OAAA,EAAS,CA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,mBAAA,EAAqB,UAAA,EAAY,KAAK,CAAA;AAAA,UACnD,GAAG;AAAA;AAAA;AACN;AAAA,GACF;AAEJ","file":"chunk-5OQLFX47.js","sourcesContent":["\"use client\"\n\nimport { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { useFieldContext } from \"@ark-ui/react/field\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport type { ReactNode, Ref } from \"react\"\nimport type { NoAsChild } from \"../../lib/as-child\"\nimport { cn } from \"../../lib/cn\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { fieldA11yProps } from \"../field/field\"\n\n/**\n * Input / InputBase — the styled input *shell* the whole form family renders\n * into (Select trigger, Combobox/Autocomplete search field, PillsInput, and\n * `TextInput`). It is deliberately the lowest layer: label / description /\n * error live in `Field`, not here — reach for `TextInput` when you want them\n * built in, which is the common case, and for `Input` when you're composing\n * the shell yourself or the control needs no accessible name of its own.\n *\n * - `InputBase` is the polymorphic shell. It draws the bordered box, the\n * focus-visible ring, the disabled / invalid states, and lays out\n * an optional `startSlot` / `endSlot` around a single control child. The\n * child can be anything — an `<input>`, a `<button>` (Select trigger), or a\n * `<div>` of pills (PillsInput). Style your control with the exported\n * `inputControlClasses` so it sits flush inside the shell.\n * - `Input` is `InputBase` wrapping a real `<input>`. Native\n * input props (`value`, `onChange`, `placeholder`, `name`, `type`, `ref`, …)\n * are forwarded straight to the element; `className` styles the shell root\n * (matching the kit's other components), and `classNames` overrides parts.\n *\n * The shell is palette-independent, so there is no `color` prop: the focus halo\n * and border are a fixed `brand-500` per the 42 UI Kit Figma (see `shellChrome`),\n * and `de33dee` removed both `color` and the `filled` variant. `invalid` swaps\n * the border / ring to red.\n */\n\n/** Inner-control reset — apply to whatever element you nest inside `InputBase`\n * (input, button, …) so it inherits the shell's font and fills the row. */\nexport const inputControlClasses = cn(\n \"w-full flex-1 min-w-0 appearance-none border-0 bg-transparent p-0 m-0\",\n // `font: inherit` is the canonical form-control reset — without it the UA\n // forces its own font-size and the shell's `size` text scale is ignored.\n // No `text-trim`: a native `<input>`'s text renders inside the UA's own\n // form-control internals, not a normal CSS line box, so `text-box-trim`\n // computes an inconsistent (content-dependent) box height there — Chrome\n // was scrolling the text vertically once its computed box stopped matching\n // the element's actual rendered height.\n \"font-[inherit] text-inherit\",\n \"outline-none focus:outline-none\",\n \"placeholder:text-gray-light-500 dark:placeholder:text-gray-dark-400\",\n \"disabled:cursor-not-allowed\",\n)\n\n/**\n * Shared shell chrome — surface, border, focus ring, and state styling. The\n * single-line `Input` shell and the multi-line `PillsInput` shell both build on\n * these; only the layout (row vs wrap) and the sizing differ, so the visual\n * treatment (incl. the invalid red halo) lives in exactly one place.\n */\nexport const shellChrome = [\n \"group/input relative rounded-input border outline-none\",\n \"text-gray-light-900 dark:text-gray-dark-25\",\n \"transition-[color,box-shadow,border-color]\",\n // Fixed brand-500 focus halo + border, per the 42 UI Kit Figma — independent\n // of the instance's own `color`. The combined selector matches either shape\n // in the family: a shell wrapping a real focusable descendant (Input,\n // Select, Combobox, MultiSelect, ComboboxList, MultiComboboxList, PinInput's\n // per-cell shell) or a shell that IS the tabbable element itself (TreeSelect,\n // TreeMultiSelect). `:has()` alone only matches the former.\n \"[&:is(:focus-visible,:has(:focus-visible))]:border-brand-500 [&:is(:focus-visible,:has(:focus-visible))]:ring-[3px] [&:is(:focus-visible,:has(:focus-visible))]:ring-brand-500/15\",\n // Invalid wins over the palette: red border + red halo. Same combined\n // selector as the rule above so the two can't drift out of sync.\n \"data-invalid:border-red-500 data-invalid:[&:is(:focus-visible,:has(:focus-visible))]:border-red-500 data-invalid:[&:is(:focus-visible,:has(:focus-visible))]:ring-red-500/15 data-invalid:bg-red-500/10\",\n // Disabled affordances on the shell.\n \"data-disabled:cursor-not-allowed data-disabled:opacity-60\",\n \"data-disabled:bg-white/8\",\n \"data-pointer:cursor-pointer\",\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0\",\n]\n\n/** Surface treatment per `variant`, shared across the input shells. */\nexport const shellVariants = {\n // Translucent border to go with the translucent fill: at `bg-white/4` the\n // shell has no ground of its own, so a fixed opaque hairline can vanish (on\n // a light-gray card) or over-assert (on a mid-tone host page). Same hue\n // language as Card's `default` (navy-tinted light / white-tinted dark), one\n // alpha step tighter — these render within a shade of the opaque colors\n // they replace, so the hairline keeps its weight and only gains\n // background-adaptivity.\n default: [\"bg-white/4\", \"border-brand-900/20 dark:border-white/15\"],\n // Escape hatch: strip the chrome but keep the layout (height / slots). Same\n // combined selector as `shellChrome`'s \"on\" rule so the cancel can't drift.\n unstyled: [\n \"border-transparent bg-transparent\",\n \"rounded-none [&:is(:focus-visible,:has(:focus-visible))]:ring-0\",\n ],\n}\n\n/**\n * Inline gap between the shell's slots and control, per `size`. The single\n * source for this spacing: `inputShell` applies it to the shell row, and any\n * control that lays out its *own* slots inside a nested flex (e.g. the Select\n * trigger) reuses it so adornments sit identically across the family.\n */\nexport const shellGap = {\n xs: \"gap-1.5\",\n sm: \"gap-1.5\",\n md: \"gap-2\",\n lg: \"gap-2.5\",\n xl: \"gap-3\",\n} as const\n\n/** Single-line input shell. Reused by the family's button / input controls. */\nexport const inputShell = cva([...shellChrome, \"flex w-full items-center gap-y-0.5\"], {\n variants: {\n variant: shellVariants,\n // Padding is slot-aware: the base is the tight, no-adornment inset, and each\n // side gains a step of inline padding only when `InputBase` flags an\n // adornment there (`data-with-start-slot` / `data-with-end-slot`). These are\n // self-referential `data-*` variants — the attributes live on this same\n // shell element, so a `group-*` variant (which targets descendants) wouldn't\n // match.\n size: {\n xs: [\n \"ps-1.5 pe-1.5\",\n \"data-with-start-slot:ps-2 data-with-end-slot:pe-2\",\n `min-h-7 ${shellGap.xs} text-xs [&_svg]:size-3`,\n ],\n sm: [\n \"ps-2 pe-2\",\n \"data-with-start-slot:ps-2.5 data-with-end-slot:pe-2.5\",\n `min-h-8 ${shellGap.sm} text-sm [&_svg]:size-3.5`,\n ],\n md: [\n \"ps-2 pe-2\",\n \"data-with-start-slot:ps-2.5 data-with-end-slot:pe-2.5\",\n `min-h-9 ${shellGap.md} text-md [&_svg]:size-4`,\n ],\n lg: [\n \"ps-3 pe-3\",\n \"data-with-start-slot:ps-3.5 data-with-end-slot:pe-3.5\",\n `min-h-10 ${shellGap.lg} text-lg [&_svg]:size-5`,\n ],\n xl: [\n \"ps-3.5 pe-3.5\",\n \"data-with-start-slot:ps-4 data-with-end-slot:pe-4\",\n `min-h-12 ${shellGap.xl} text-xl [&_svg]:size-6`,\n ],\n },\n },\n defaultVariants: { variant: \"default\", size: \"md\" },\n})\n\n/** Start/end adornment slot — the shared visual contract for the inline-start /\n * inline-end content the whole form family lays out (icon, chevron, clear).\n * Exported so Select / Combobox / the pills controls slot their adornments\n * identically to `InputBase` instead of re-deriving the layout. */\nexport const inputSlot = cn(\n \"inline-flex shrink-0 items-center justify-center\",\n \"text-gray-light-500 dark:text-gray-dark-400\",\n)\n\n/** Muted color for a component's own custom-rendered placeholder / empty-state text — a\n * `<span>` standing in for a native `::placeholder` wherever the value display isn't a real\n * `<input>` (Select's trigger, MultiSelect's non-searchable mode, TreeSelect / TreeMultiSelect's\n * trigger, DatePicker's range-mode trigger). Same color pairing as `inputControlClasses`'s native\n * `::placeholder` rule above. Kept as its own export, not folded into `inputSlot` — `inputSlot`'s\n * `inline-flex items-center justify-center shrink-0` are icon-slot layout rules; forced onto a\n * run of text they'd center it and block it from shrinking, silently breaking truncation on the\n * call sites where this color sits on the same span as `flex-1`/`truncate`. */\nexport const placeholderColor = \"text-gray-light-500 dark:text-gray-dark-400\"\n\nexport type InputVariant = NonNullable<VariantProps<typeof inputShell>[\"variant\"]>\nexport type InputSize = NonNullable<VariantProps<typeof inputShell>[\"size\"]>\n\ntype ShellClassNames = {\n /** The shell `<div>` (also targeted by `className`). */\n root?: string\n startSlot?: string\n endSlot?: string\n}\n\n/** Props shared by the shell and the convenience `Input`. */\ntype ShellOwnProps = VariantProps<typeof inputShell> & {\n /** Red border + ring; also wires `aria-invalid` on `Input`. */\n invalid?: boolean\n /** Dims the shell and (on `Input`) disables the element. */\n disabled?: boolean\n /** Keeps full contrast but blocks edits (on `Input`). */\n readOnly?: boolean\n /** `cursor: pointer` — for button-like triggers (Select). */\n pointer?: boolean\n /** Decorative or interactive content at the inline-start of the control. */\n startSlot?: ReactNode\n /** Content at the inline-end — chevron, clear button, spinner. */\n endSlot?: ReactNode\n}\n\nexport type InputBaseProps = NoAsChild<Omit<HTMLArkProps<\"div\">, \"color\">> &\n ShellOwnProps &\n WithTestId & {\n classNames?: ShellClassNames\n }\n\nexport const InputBase = ({\n variant,\n size,\n invalid,\n disabled,\n readOnly,\n pointer,\n startSlot,\n endSlot,\n children,\n className,\n classNames,\n testId,\n asChild: _asChild,\n ...rest\n}: InputBaseProps) => (\n <ark.div\n {...props({\n \"data-invalid\": invalid,\n \"data-disabled\": disabled,\n \"data-readonly\": readOnly,\n \"data-pointer\": pointer,\n // Drive the slot-aware padding in `inputShell`: each side gains a step of\n // inline padding when an adornment sits there (`data-with-*-slot:`).\n \"data-with-start-slot\": startSlot != null,\n \"data-with-end-slot\": endSlot != null,\n // Only meaningful when `InputBase` is used bare (no `Input`-style inner\n // control routing its own `testId`) — a `testId` given to a control that\n // wraps `InputBase` itself (Input, NumberInput, Select, …) always lands\n // on that control's real interactive element instead, never here.\n \"data-testid\": testId,\n })}\n className={cn(className, classNames?.root, inputShell({ variant, size }))}\n {...rest}\n >\n {startSlot != null && (\n <span className={cn(inputSlot, classNames?.startSlot)} aria-hidden>\n {startSlot}\n </span>\n )}\n {children}\n {endSlot != null && (\n <span className={cn(inputSlot, classNames?.endSlot)} aria-hidden>\n {endSlot}\n </span>\n )}\n </ark.div>\n)\n\nexport type InputProps = Omit<HTMLArkProps<\"input\">, \"size\" | \"color\"> &\n ShellOwnProps &\n WithTestId & {\n /** Lands on the underlying `<input>` for focus-on-error. Declared\n * explicitly because `HTMLArkProps` is `ComponentPropsWithoutRef`, so the\n * native prop types alone don't carry it — same as `Textarea`,\n * `PasswordInput`, and `NumberInput`. */\n ref?: Ref<HTMLInputElement>\n classNames?: ShellClassNames & {\n /** The inner `<input>` element. */\n input?: string\n }\n }\n\nexport const Input = ({\n variant,\n size,\n invalid,\n disabled,\n readOnly,\n pointer,\n startSlot,\n endSlot,\n className,\n classNames,\n testId,\n ...rest\n}: InputProps) => {\n // When nested in a `Field`, inherit its id / aria-describedby / state so the\n // label, description, and error wire up — exactly how Ark's own `Field.Input`\n // behaves. `useFieldContext` is null outside a Field, so this is a no-op then.\n const field = useFieldContext()\n const fieldInputProps = field?.getInputProps()\n\n return (\n <InputBase\n variant={variant}\n size={size}\n pointer={pointer}\n startSlot={startSlot}\n endSlot={endSlot}\n className={className}\n classNames={{\n root: classNames?.root,\n startSlot: classNames?.startSlot,\n endSlot: classNames?.endSlot,\n }}\n {...props({\n disabled: disabled || field?.disabled,\n invalid: invalid || field?.invalid,\n readOnly: readOnly || field?.readOnly,\n })}\n >\n <ark.input\n {...fieldInputProps}\n {...fieldA11yProps(field)}\n {...props({\n disabled: disabled || field?.disabled,\n \"aria-invalid\": invalid || field?.invalid,\n readOnly: readOnly || field?.readOnly,\n \"data-testid\": testId,\n })}\n className={cn(inputControlClasses, classNames?.input)}\n {...rest}\n />\n </InputBase>\n )\n}\n"]}
@@ -277,6 +277,7 @@ var Content = ({
277
277
  onPointerLeave,
278
278
  onPointerDown,
279
279
  onFocus,
280
+ asChild: _asChild,
280
281
  ...rest
281
282
  }) => {
282
283
  const { width, withinPortal, container, layers, hover } = useContext(PopoverContext);
@@ -344,5 +345,5 @@ var Popover = {
344
345
  };
345
346
 
346
347
  export { Popover, popoverCheckbox, popoverChevron, popoverChrome, popoverClearTrigger, popoverContent, popoverEmpty, popoverGroupLabel, popoverIndicator, popoverList, popoverOption, popoverPanel, scrollHighlightedIntoView };
347
- //# sourceMappingURL=chunk-VZ2TPU4B.js.map
348
- //# sourceMappingURL=chunk-VZ2TPU4B.js.map
348
+ //# sourceMappingURL=chunk-6GDMSENK.js.map
349
+ //# sourceMappingURL=chunk-6GDMSENK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/popover/popover.tsx"],"names":["ArkPopover"],"mappings":";;;;;;;;;;;AAgDO,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,EACA;AACF,CAAA;AAIO,IAAM,cAAA,GACX;AAGK,IAAM,mBAAA,GACX;AAQK,IAAM,aAAA,GAAgB,GAAA;AAAA,EAC3B;AAAA,IACE,4DAAA;AAAA,IACA,0BAAA;AAAA,IACA,6CAAA;AAAA,IACA,8DAAA;AAAA,IACA,kCAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,IAAA,EAAM;AAAA,QACJ,EAAA,EAAI,mBAAA;AAAA,QACJ,EAAA,EAAI,mBAAA;AAAA,QACJ,EAAA,EAAI,uBAAA;AAAA,QACJ,EAAA,EAAI,mBAAA;AAAA,QACJ,EAAA,EAAI;AAAA;AACN,KACF;AAAA,IACA,eAAA,EAAiB,EAAE,IAA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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-6GDMSENK.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 { 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 { 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 = NoAsChild<ArkPopover.ContentProps> & WithTestId\n\nconst Content = ({\n className,\n children,\n testId,\n onPointerEnter,\n onPointerLeave,\n onPointerDown,\n onFocus,\n asChild: _asChild,\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 Content,\n Header,\n Body,\n Footer,\n}\n"]}
@@ -1,8 +1,9 @@
1
- import { inputSlot, inputShell, inputControlClasses } from './chunk-QMW7D5GU.js';
2
- import { scrollHighlightedIntoView, popoverChevron, popoverClearTrigger, popoverList, popoverContent, popoverIndicator, popoverOption, popoverGroupLabel, popoverEmpty } from './chunk-VZ2TPU4B.js';
1
+ import { inputSlot, inputShell, inputControlClasses } from './chunk-5OQLFX47.js';
2
+ import { scrollHighlightedIntoView, popoverChevron, popoverClearTrigger, popoverList, popoverContent, popoverIndicator, popoverOption, popoverGroupLabel, popoverEmpty } from './chunk-6GDMSENK.js';
3
3
  import { useNestedLayer } from './chunk-AIQG7IIT.js';
4
4
  import { useOverlayContainer } from './chunk-7P32XCEU.js';
5
5
  import { ChevronIcon, CloseIcon, CheckIcon } from './chunk-IG7FBZVM.js';
6
+ import { composeChildren } from './chunk-I4SQQIP5.js';
6
7
  import { props } from './chunk-WYCMIIRR.js';
7
8
  import { cn } from './chunk-QP4I37PA.js';
8
9
  import { Combobox as Combobox$1, useComboboxContext } from '@ark-ui/react/combobox';
@@ -39,6 +40,7 @@ var Control = ({
39
40
  className,
40
41
  children,
41
42
  testId,
43
+ asChild: _asChild,
42
44
  ...rest
43
45
  }) => {
44
46
  const { size, variant } = useContext(ComboboxStyleContext);
@@ -72,6 +74,7 @@ var Input = ({ className, testId, ...rest }) => /* @__PURE__ */ jsx(
72
74
  var Trigger = ({
73
75
  className,
74
76
  children,
77
+ asChild,
75
78
  ...rest
76
79
  }) => /* @__PURE__ */ jsx(
77
80
  Combobox$1.Trigger,
@@ -82,19 +85,30 @@ var Trigger = ({
82
85
  "data-[state=open]:rotate-180 disabled:cursor-not-allowed",
83
86
  className
84
87
  ),
88
+ asChild,
85
89
  ...rest,
86
- children: children ?? /* @__PURE__ */ jsx(ChevronIcon, {})
90
+ children: composeChildren(asChild, children, (own) => own ?? /* @__PURE__ */ jsx(ChevronIcon, {}))
87
91
  }
88
92
  );
89
93
  var ClearTrigger = ({
90
94
  className,
91
95
  children,
96
+ asChild,
92
97
  ...rest
93
98
  }) => (
94
99
  // zag marks the combobox clear control `tabIndex={-1}`; surface it in the tab
95
100
  // order so keyboard users can reach it (matching Select's clear and the tree
96
101
  // clears). A caller can still override via `tabIndex` in `rest`.
97
- /* @__PURE__ */ jsx(Combobox$1.ClearTrigger, { tabIndex: 0, className: cn(popoverClearTrigger, className), ...rest, children: children ?? /* @__PURE__ */ jsx(CloseIcon, {}) })
102
+ /* @__PURE__ */ jsx(
103
+ Combobox$1.ClearTrigger,
104
+ {
105
+ tabIndex: 0,
106
+ className: cn(popoverClearTrigger, className),
107
+ asChild,
108
+ ...rest,
109
+ children: composeChildren(asChild, children, (own) => own ?? /* @__PURE__ */ jsx(CloseIcon, {}))
110
+ }
111
+ )
98
112
  );
99
113
  var Content = ({
100
114
  className,
@@ -102,6 +116,7 @@ var Content = ({
102
116
  withPaddingTop = true,
103
117
  withinPortal = true,
104
118
  container,
119
+ asChild: _asChild,
105
120
  ...rest
106
121
  }) => {
107
122
  const portalContainer = useOverlayContainer(container);
@@ -112,11 +127,12 @@ var Panel = ({
112
127
  className,
113
128
  children,
114
129
  withPaddingTop = true,
130
+ asChild: _asChild,
115
131
  ...rest
116
132
  }) => {
117
133
  return /* @__PURE__ */ jsx(Combobox$1.Content, { ...rest, children: /* @__PURE__ */ jsx(Combobox$1.List, { className: cn(popoverList({ withPaddingTop }), className), children }) });
118
134
  };
119
- var Item = ({ className, children, testId, ...rest }) => {
135
+ var Item = ({ className, children, testId, asChild: _asChild, ...rest }) => {
120
136
  const { size } = useContext(ComboboxStyleContext);
121
137
  return /* @__PURE__ */ jsx(
122
138
  Combobox$1.Item,
@@ -131,7 +147,7 @@ var Item = ({ className, children, testId, ...rest }) => {
131
147
  }
132
148
  );
133
149
  };
134
- var Group = ({ label, className, children, ...rest }) => /* @__PURE__ */ jsxs(Combobox$1.ItemGroup, { className, ...rest, children: [
150
+ var Group = ({ label, className, children, asChild: _asChild, ...rest }) => /* @__PURE__ */ jsxs(Combobox$1.ItemGroup, { className, ...rest, children: [
135
151
  label != null && /* @__PURE__ */ jsx(Combobox$1.ItemGroupLabel, { className: popoverGroupLabel, children: label }),
136
152
  children
137
153
  ] });
@@ -151,5 +167,5 @@ var Combobox = {
151
167
  };
152
168
 
153
169
  export { Combobox };
154
- //# sourceMappingURL=chunk-TNNH3FVQ.js.map
155
- //# sourceMappingURL=chunk-TNNH3FVQ.js.map
170
+ //# sourceMappingURL=chunk-6OLTJYSX.js.map
171
+ //# sourceMappingURL=chunk-6OLTJYSX.js.map