themelia-ui 2.0.0 → 2.0.1

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 (402) hide show
  1. package/.agents/skills/themelia-ui/references/components/INDEX.json +1 -2
  2. package/.agents/skills/themelia-ui/references/components/base--qr-code.md +2 -2
  3. package/.agents/skills/themelia-ui/references/components/base--typography.md +1 -1
  4. package/.agents/skills/themelia-ui/references/components/features--schema-form.md +1 -1
  5. package/.agents/skills/themelia-ui/references/components/features--theme-tweaker.md +3 -2
  6. package/.agents/skills/themelia-ui/references/components/theming.md +3 -2
  7. package/.agents/skills/themelia-ui/references/components/ui-provider.md +1 -0
  8. package/.agents/skills/themelia-ui/references/migration.md +16 -1
  9. package/.agents/skills/themelia-ui/references/theming.md +1 -1
  10. package/CHANGELOG.md +52 -0
  11. package/README.md +1 -1
  12. package/dist/{accordion-DLW9FGTP.js → accordion-B4zNzH7s.js} +3 -4
  13. package/dist/accordion-VazE3cHZ.cjs +1 -0
  14. package/dist/{action-menu-DqQX1_H8.js → action-menu-BrMchcyt.js} +4 -4
  15. package/dist/{action-menu-BFDQbOMx.cjs → action-menu-CO6DZ2xa.cjs} +1 -1
  16. package/dist/admin/patterns/access.cjs +1 -1
  17. package/dist/admin/patterns/access.js +9 -9
  18. package/dist/admin/patterns/commerce.cjs +1 -1
  19. package/dist/admin/patterns/commerce.js +20 -19
  20. package/dist/{alert-dialog-BPePUOHx.cjs → alert-dialog-ByJw3YGj.cjs} +1 -1
  21. package/dist/{alert-dialog-DzqaOiE5.js → alert-dialog-ZHkE0QEz.js} +1 -1
  22. package/dist/{avatar-2v-o_zEv.js → avatar-C30TNJoy.js} +1 -1
  23. package/dist/{avatar-Cdw0zuGn.cjs → avatar-b2IaEzda.cjs} +1 -1
  24. package/dist/base/accordion.cjs +1 -1
  25. package/dist/base/accordion.js +1 -1
  26. package/dist/base/action-menu.cjs +1 -1
  27. package/dist/base/action-menu.js +1 -1
  28. package/dist/base/alert-dialog.cjs +1 -1
  29. package/dist/base/alert-dialog.js +1 -1
  30. package/dist/base/avatar.cjs +1 -1
  31. package/dist/base/avatar.js +1 -1
  32. package/dist/base/batch-action-bar.cjs +1 -1
  33. package/dist/base/batch-action-bar.js +1 -1
  34. package/dist/base/buttons.cjs +1 -1
  35. package/dist/base/buttons.js +1 -1
  36. package/dist/base/cards.cjs +1 -1
  37. package/dist/base/cards.js +1 -1
  38. package/dist/base/carousel.cjs +1 -1
  39. package/dist/base/carousel.js +1 -1
  40. package/dist/base/choice-inputs.cjs +1 -1
  41. package/dist/base/choice-inputs.js +1 -1
  42. package/dist/base/combobox.cjs +1 -1
  43. package/dist/base/combobox.js +1 -1
  44. package/dist/base/command.cjs +1 -1
  45. package/dist/base/command.js +1 -1
  46. package/dist/base/context-menu.cjs +1 -1
  47. package/dist/base/context-menu.js +2 -2
  48. package/dist/base/copyable.cjs +1 -1
  49. package/dist/base/copyable.js +1 -1
  50. package/dist/base/date-pickers.cjs +1 -1
  51. package/dist/base/date-pickers.js +1 -1
  52. package/dist/base/dialog.cjs +1 -1
  53. package/dist/base/dialog.js +1 -1
  54. package/dist/base/display.cjs +1 -1
  55. package/dist/base/display.js +1 -1
  56. package/dist/base/dropdown-menu.cjs +1 -1
  57. package/dist/base/dropdown-menu.js +1 -1
  58. package/dist/base/feedback.cjs +1 -1
  59. package/dist/base/feedback.js +1 -1
  60. package/dist/base/forms-numeric.cjs +1 -1
  61. package/dist/base/forms-numeric.js +1 -1
  62. package/dist/base/forms.cjs +1 -1
  63. package/dist/base/forms.js +1 -1
  64. package/dist/base/hover-card.cjs +1 -1
  65. package/dist/base/hover-card.js +1 -1
  66. package/dist/base/input-group.cjs +1 -1
  67. package/dist/base/input-group.js +1 -1
  68. package/dist/base/item.cjs +1 -1
  69. package/dist/base/item.js +1 -1
  70. package/dist/base/label.cjs +1 -1
  71. package/dist/base/label.js +1 -1
  72. package/dist/base/navigation-menu.cjs +1 -1
  73. package/dist/base/navigation-menu.js +1 -1
  74. package/dist/base/navigation.cjs +1 -1
  75. package/dist/base/navigation.js +1 -1
  76. package/dist/base/otp-input.cjs +1 -1
  77. package/dist/base/otp-input.js +1 -1
  78. package/dist/base/overlay.cjs +1 -1
  79. package/dist/base/overlay.js +1 -1
  80. package/dist/base/popover-menu.cjs +1 -1
  81. package/dist/base/popover-menu.js +1 -1
  82. package/dist/base/popover.cjs +1 -1
  83. package/dist/base/popover.js +1 -1
  84. package/dist/base/qr-code.cjs +1 -1
  85. package/dist/base/qr-code.js +47 -43
  86. package/dist/base/repeaters.cjs +1 -1
  87. package/dist/base/repeaters.js +1 -1
  88. package/dist/base/sheet.cjs +1 -1
  89. package/dist/base/sheet.js +1 -1
  90. package/dist/base/sidebar.cjs +1 -1
  91. package/dist/base/sidebar.js +1 -1
  92. package/dist/base/skeleton.cjs +1 -1
  93. package/dist/base/skeleton.js +1 -1
  94. package/dist/base/table.cjs +1 -1
  95. package/dist/base/table.js +1 -1
  96. package/dist/base/timeline.cjs +1 -1
  97. package/dist/base/timeline.js +1 -1
  98. package/dist/base/toaster.cjs +1 -1
  99. package/dist/base/toaster.js +1 -1
  100. package/dist/base/toolbar.cjs +1 -1
  101. package/dist/base/toolbar.js +1 -1
  102. package/dist/base/tooltip.cjs +1 -1
  103. package/dist/base/tooltip.js +1 -1
  104. package/dist/base/typography.cjs +1 -1
  105. package/dist/base/typography.js +1 -1
  106. package/dist/base/upload.cjs +1 -1
  107. package/dist/base/upload.js +1 -1
  108. package/dist/base/value-inputs.cjs +1 -1
  109. package/dist/base/value-inputs.js +1 -1
  110. package/dist/{batch-action-bar-Cvnz248b.cjs → batch-action-bar-BMIiHBU8.cjs} +1 -1
  111. package/dist/{batch-action-bar-BRCopWlT.js → batch-action-bar-CAIjntVw.js} +2 -2
  112. package/dist/{buttons-CMsvnL6-.cjs → buttons-Dwl42fIr.cjs} +1 -1
  113. package/dist/{buttons-Corm-KHK.js → buttons-riLAPVQV.js} +4 -3
  114. package/dist/{cards-CEtNjl6A.js → cards-CcwLsQQS.js} +8 -9
  115. package/dist/cards-DQPevRTY.cjs +1 -0
  116. package/dist/{choice-inputs-Ca9PoQwa.js → choice-inputs-BjZYCdzk.js} +7 -7
  117. package/dist/{choice-inputs-CySnLjfA.cjs → choice-inputs-C8LMAkh8.cjs} +1 -1
  118. package/dist/combobox-bDQg27j0.cjs +1 -0
  119. package/dist/{combobox-Dl1xWnR7.js → combobox-exdUS4qj.js} +8 -9
  120. package/dist/{command-DWZf3CPI.js → command-Dv84KSRv.js} +3 -3
  121. package/dist/{command-BSvB58XI.cjs → command-Geb5eIzu.cjs} +1 -1
  122. package/dist/{comments-CVD4jB9V.cjs → comments-CV9tvSAi.cjs} +1 -1
  123. package/dist/{comments-CIZ1L-DR.js → comments-CqdhAH1O.js} +485 -491
  124. package/dist/components/base/buttons/button.d.cts +1 -1
  125. package/dist/components/base/buttons/button.d.ts +1 -1
  126. package/dist/components/base/qr-code/qr-code.d.cts +2 -2
  127. package/dist/components/base/qr-code/qr-code.d.ts +2 -2
  128. package/dist/components/base/typography/rich-text/rich-text.d.cts +1 -0
  129. package/dist/components/base/typography/rich-text/rich-text.d.ts +1 -0
  130. package/dist/{copyable-Bbd_Tsxc.cjs → copyable-CMhsv_91.cjs} +1 -1
  131. package/dist/{copyable-CRdTLtmK.js → copyable-uzkCHMzl.js} +3 -3
  132. package/dist/core.css +1 -1
  133. package/dist/css/access.css +1 -1
  134. package/dist/css/accordion.css +1 -1
  135. package/dist/css/action-menu.css +1 -1
  136. package/dist/css/activities.css +1 -1
  137. package/dist/css/ai-chat.css +1 -1
  138. package/dist/css/analytics.css +1 -1
  139. package/dist/css/app-shell.css +1 -1
  140. package/dist/css/async-preview.css +1 -1
  141. package/dist/css/auth.css +1 -1
  142. package/dist/css/avatar.css +1 -1
  143. package/dist/css/badge.css +1 -1
  144. package/dist/css/batch-action-bar.css +1 -1
  145. package/dist/css/buttons.css +1 -1
  146. package/dist/css/cards.css +1 -1
  147. package/dist/css/carousel.css +1 -1
  148. package/dist/css/chart.css +1 -1
  149. package/dist/css/choice-inputs.css +1 -1
  150. package/dist/css/combobox.css +1 -1
  151. package/dist/css/combobox2.css +1 -1
  152. package/dist/css/command.css +1 -1
  153. package/dist/css/comments.css +1 -1
  154. package/dist/css/commerce.css +1 -1
  155. package/dist/css/copyable.css +1 -1
  156. package/dist/css/data-view.css +1 -1
  157. package/dist/css/date-pickers.css +1 -1
  158. package/dist/css/display.css +1 -1
  159. package/dist/css/dropdown-menu.css +1 -1
  160. package/dist/css/event-calendar.css +1 -1
  161. package/dist/css/feedback.css +1 -1
  162. package/dist/css/filters.css +1 -1
  163. package/dist/css/forms.css +1 -1
  164. package/dist/css/global-search.css +1 -1
  165. package/dist/css/header.css +1 -1
  166. package/dist/css/hover-card.css +1 -1
  167. package/dist/css/input-group.css +1 -1
  168. package/dist/css/item.css +1 -1
  169. package/dist/css/kanban.css +1 -1
  170. package/dist/css/label.css +1 -1
  171. package/dist/css/map.css +1 -1
  172. package/dist/css/media-library.css +1 -1
  173. package/dist/css/mentions.css +1 -1
  174. package/dist/css/navigation-menu.css +1 -1
  175. package/dist/css/navigation.css +1 -1
  176. package/dist/css/navigation2.css +1 -1
  177. package/dist/css/overlay.css +1 -1
  178. package/dist/css/popover-menu.css +1 -1
  179. package/dist/css/popover.css +1 -1
  180. package/dist/css/products.css +1 -1
  181. package/dist/css/qr-code.css +1 -1
  182. package/dist/css/repeaters.css +1 -1
  183. package/dist/css/resource-assignment.css +1 -1
  184. package/dist/css/resource.css +1 -1
  185. package/dist/css/rich-text-editor.css +1 -1
  186. package/dist/css/schema-form.css +1 -1
  187. package/dist/css/sidebar2.css +1 -1
  188. package/dist/css/skeleton.css +1 -1
  189. package/dist/css/styles.css +1 -1
  190. package/dist/css/sync.css +1 -1
  191. package/dist/css/table.css +1 -1
  192. package/dist/css/table2.css +1 -1
  193. package/dist/css/text-inputs.css +1 -1
  194. package/dist/css/theme-tweaker.css +1 -1
  195. package/dist/css/timeline.css +1 -1
  196. package/dist/css/toaster.css +1 -1
  197. package/dist/css/toggle.css +1 -1
  198. package/dist/css/toolbar.css +1 -1
  199. package/dist/css/tooltip.css +1 -1
  200. package/dist/css/typography.css +1 -1
  201. package/dist/css/upload.css +1 -1
  202. package/dist/css/value-inputs.css +1 -1
  203. package/dist/css/workspace.css +1 -1
  204. package/dist/{date-pickers-Dy9BVNnb.js → date-pickers-1_Ah7qWO.js} +5 -5
  205. package/dist/{date-pickers-C6rE7fLo.cjs → date-pickers-DejXe5oe.cjs} +1 -1
  206. package/dist/{dialog-CLwUz8Gb.js → dialog-CXugTX8t.js} +1 -1
  207. package/dist/{dialog-Bf7tBRkZ.cjs → dialog-DZ9_m_qc.cjs} +1 -1
  208. package/dist/display-CFj87iEn.cjs +1 -0
  209. package/dist/{display-DVhYS75K.js → display-Dehpw83R.js} +6 -5
  210. package/dist/{dropdown-menu-CIXxWTpw.js → dropdown-menu-BdgB__AC.js} +1 -1
  211. package/dist/{dropdown-menu-0OW7zJto.cjs → dropdown-menu-DCf_EqVG.cjs} +1 -1
  212. package/dist/features/actions.cjs +1 -1
  213. package/dist/features/actions.js +1 -1
  214. package/dist/features/activities.cjs +1 -1
  215. package/dist/features/activities.js +361 -363
  216. package/dist/features/ai-chat.cjs +2 -2
  217. package/dist/features/ai-chat.js +11 -10
  218. package/dist/features/async-preview.cjs +1 -1
  219. package/dist/features/async-preview.js +4 -4
  220. package/dist/features/combobox.cjs +1 -1
  221. package/dist/features/combobox.js +5 -5
  222. package/dist/features/comments.cjs +1 -1
  223. package/dist/features/comments.js +1 -1
  224. package/dist/features/data-view.cjs +1 -1
  225. package/dist/features/data-view.js +6 -6
  226. package/dist/features/event-calendar.cjs +1 -1
  227. package/dist/features/event-calendar.js +10 -10
  228. package/dist/features/filters.cjs +1 -1
  229. package/dist/features/filters.js +1 -1
  230. package/dist/features/global-search.cjs +1 -1
  231. package/dist/features/global-search.js +8 -8
  232. package/dist/features/kanban.cjs +1 -1
  233. package/dist/features/kanban.js +4 -5
  234. package/dist/features/map.cjs +1 -1
  235. package/dist/features/map.js +318 -317
  236. package/dist/features/media-library.cjs +1 -1
  237. package/dist/features/media-library.js +751 -771
  238. package/dist/features/mentions.cjs +1 -1
  239. package/dist/features/mentions.js +1 -1
  240. package/dist/features/overlays.cjs +1 -1
  241. package/dist/features/overlays.js +1 -1
  242. package/dist/features/products.cjs +1 -1
  243. package/dist/features/products.js +15 -15
  244. package/dist/features/resource-assignment.cjs +1 -1
  245. package/dist/features/resource-assignment.js +6 -6
  246. package/dist/features/resource.cjs +1 -1
  247. package/dist/features/resource.js +6 -6
  248. package/dist/features/rich-text-editor.cjs +1 -1
  249. package/dist/features/rich-text-editor.js +1 -1
  250. package/dist/features/schema-form.cjs +1 -1
  251. package/dist/features/schema-form.css +1 -1
  252. package/dist/features/schema-form.js +207 -223
  253. package/dist/features/sync.cjs +1 -1
  254. package/dist/features/sync.js +3 -3
  255. package/dist/features/table.cjs +1 -1
  256. package/dist/features/table.js +1 -1
  257. package/dist/features/theme-tweaker.cjs +2 -2
  258. package/dist/features/theme-tweaker.js +105 -124
  259. package/dist/{feedback-BmquisO3.js → feedback-C8QtkdHc.js} +3 -3
  260. package/dist/feedback-IpUFKqgv.cjs +1 -0
  261. package/dist/{filters-BD0zRwCE.js → filters-BMKZHnBA.js} +22 -17
  262. package/dist/filters-Ct07D74Q.cjs +1 -0
  263. package/dist/{forms-zF9SP3Ai.js → forms-C-d0-GML.js} +5 -7
  264. package/dist/forms-mJ0fjWEl.cjs +1 -0
  265. package/dist/{forms-numeric-B1cqc9Vn.cjs → forms-numeric-B7TRpwvH.cjs} +1 -1
  266. package/dist/{forms-numeric-DzxBaEg1.js → forms-numeric-MKOgf5BF.js} +1 -1
  267. package/dist/index.cjs +1 -1
  268. package/dist/index.js +2 -2
  269. package/dist/{input-group-Bnc24cRI.cjs → input-group-HplgNyti.cjs} +1 -1
  270. package/dist/{input-group-CTSiVEGd.js → input-group-xFaO6qrB.js} +2 -2
  271. package/dist/{item-Cye3hJmr.cjs → item-BxPJsxh2.cjs} +1 -1
  272. package/dist/{item-OVu-oGxQ.js → item-C7Wfarcx.js} +2 -2
  273. package/dist/{label-Cr4NpRvn.cjs → label-B8WTGCTZ.cjs} +1 -1
  274. package/dist/{label-DYJT1uER.js → label-DumoMDm6.js} +1 -1
  275. package/dist/layout/app-shell.cjs +1 -1
  276. package/dist/layout/app-shell.js +1 -1
  277. package/dist/layout/auth.cjs +1 -1
  278. package/dist/layout/auth.js +4 -2
  279. package/dist/layout/header.cjs +1 -1
  280. package/dist/layout/header.js +10 -10
  281. package/dist/layout/navigation.cjs +1 -1
  282. package/dist/layout/navigation.js +1 -1
  283. package/dist/layout/page.cjs +1 -1
  284. package/dist/layout/page.js +4 -4
  285. package/dist/layout/settings.cjs +1 -1
  286. package/dist/layout/settings.js +2 -2
  287. package/dist/layout/sidebar.cjs +1 -1
  288. package/dist/layout/sidebar.js +7 -7
  289. package/dist/layout/workspace.cjs +1 -1
  290. package/dist/layout/workspace.js +6 -7
  291. package/dist/lib/theming/recipes.d.cts +5 -2
  292. package/dist/lib/theming/recipes.d.ts +5 -2
  293. package/dist/lib/ui-provider/types.d.cts +4 -1
  294. package/dist/lib/ui-provider/types.d.ts +4 -1
  295. package/dist/{mentions-DbQAE-Ug.cjs → mentions-Ckm9Ct-r.cjs} +1 -1
  296. package/dist/{mentions-BU1sDupC.js → mentions-D_b-yVXN.js} +5 -5
  297. package/dist/{navigation-D00jGH59.js → navigation-COnv0B1H.js} +6 -5
  298. package/dist/navigation-D_hEWZYv.cjs +1 -0
  299. package/dist/{navigation-BRv9Xerv.js → navigation-DwNUlszz.js} +17 -15
  300. package/dist/navigation-UfUJU2LC.cjs +1 -0
  301. package/dist/{overlay-Bdri8Z7E.js → overlay-A5bE-8n5.js} +2 -2
  302. package/dist/{overlay-D1wEvshK.cjs → overlay-BtQz_AN3.cjs} +1 -1
  303. package/dist/{overlays-CaBkEKRc.js → overlays-DX9ux-XL.js} +7 -7
  304. package/dist/{overlays-BnWOasE6.cjs → overlays-MmLNLV9f.cjs} +1 -1
  305. package/dist/patterns/analytics.cjs +1 -1
  306. package/dist/patterns/analytics.js +41 -44
  307. package/dist/patterns/onboarding.cjs +1 -1
  308. package/dist/patterns/onboarding.js +4 -4
  309. package/dist/patterns/timelines.cjs +1 -1
  310. package/dist/patterns/timelines.js +1 -1
  311. package/dist/{popover-Dt8IXXKy.js → popover-CM1nxkAM.js} +2 -2
  312. package/dist/{popover-menu-BeNyDDo1.js → popover-menu-BCs5CLkw.js} +4 -4
  313. package/dist/{popover-menu-Cm10om_m.cjs → popover-menu-DcDdf9H2.cjs} +1 -1
  314. package/dist/{popover-BUebuMJK.cjs → popover-rLMSEj5V.cjs} +1 -1
  315. package/dist/{primitives-B2aeaudR.js → primitives-BnXNg-Kr.js} +2 -2
  316. package/dist/{primitives-BP7kGVYZ.cjs → primitives-kywiHMJE.cjs} +1 -1
  317. package/dist/primitives.cjs +1 -1
  318. package/dist/primitives.js +1 -1
  319. package/dist/{repeaters-BIvKI1CQ.cjs → repeaters-B4dnWxUE.cjs} +1 -1
  320. package/dist/{repeaters-C43GWEE_.js → repeaters-B4oohPvd.js} +4 -4
  321. package/dist/{rich-text-editor-CqqHeJDp.cjs → rich-text-editor-7GYD-4Qq.cjs} +1 -1
  322. package/dist/{rich-text-editor-CVo4FB26.js → rich-text-editor-CgsfAGMo.js} +3 -3
  323. package/dist/{sheet-BP2BmI-Z.js → sheet-3sbsGFus.js} +2 -2
  324. package/dist/{sheet-FA8TfP1E.cjs → sheet-B4_LNS7m.cjs} +1 -1
  325. package/dist/{sidebar-C-TSBDj5.cjs → sidebar--uZUOGHE.cjs} +1 -1
  326. package/dist/{sidebar-DOmsOhCp.js → sidebar-BMgoyRxy.js} +10 -9
  327. package/dist/{skeleton-vN_fsg7X.js → skeleton-Bxqw8kwa.js} +1 -1
  328. package/dist/{skeleton-3RdcmQ7K.cjs → skeleton-DeuQS4AK.cjs} +1 -1
  329. package/dist/style.css +1 -1
  330. package/dist/styles/SCOPES.md +28 -9
  331. package/dist/styles/TOKENS.md +165 -9
  332. package/dist/styles/index.css +0 -1
  333. package/dist/styles/map.css +14 -8
  334. package/dist/styles/mentions.css +37 -44
  335. package/dist/styles/tailwind.css +2 -1
  336. package/dist/styles/themes/default.css +16 -14
  337. package/dist/styles/theming/colors.css +28 -22
  338. package/dist/styles/theming/feedback.css +0 -1
  339. package/dist/styles/theming/focus.css +15 -8
  340. package/dist/styles/theming/motion.css +8 -5
  341. package/dist/styles/theming/overlay.css +7 -0
  342. package/dist/styles/theming/sizing.css +8 -4
  343. package/dist/styles/theming/text.css +3 -1
  344. package/dist/styles/theming/typography.css +3 -0
  345. package/dist/styles/tokens/components.css +1 -1
  346. package/dist/styles/tokens/states.css +4 -4
  347. package/dist/{table-B9zwmrtt.cjs → table-3abrkeib.cjs} +1 -1
  348. package/dist/{table-CzsDKBR2.js → table-BXL7IP5P.js} +1 -1
  349. package/dist/{table-CaFQyjTz.cjs → table-CXRnlkV5.cjs} +1 -1
  350. package/dist/{table-CtUahid0.js → table-DszexXEh.js} +14 -14
  351. package/dist/tailwind.css +2 -1
  352. package/dist/{theming-B52zPV1p.cjs → theming-8U04chn7.cjs} +1 -1
  353. package/dist/{theming-y5FKH_La.js → theming-D6KRU7hO.js} +9 -9
  354. package/dist/theming.cjs +1 -1
  355. package/dist/theming.js +1 -1
  356. package/dist/{timeline-B3f7rEXh.cjs → timeline-CzAIDLzd.cjs} +1 -1
  357. package/dist/{timeline-DskNs3lw.js → timeline-ptWoY2GY.js} +2 -2
  358. package/dist/{timelines-wlcL01Rf.js → timelines-BquC31uF.js} +4 -4
  359. package/dist/{timelines-DJdBmWPj.cjs → timelines-DLsQhK72.cjs} +1 -1
  360. package/dist/{toaster-D3Fsaf3I.cjs → toaster-BVTOrAb5.cjs} +1 -1
  361. package/dist/{toaster-CaTwpule.js → toaster-DOBJDiXt.js} +1 -1
  362. package/dist/tokens.json +8 -7
  363. package/dist/{toolbar-CvUhAFhi.js → toolbar-3GLSD7Fi.js} +1 -1
  364. package/dist/{toolbar-Bap7y244.cjs → toolbar-aZKjtFDt.cjs} +1 -1
  365. package/dist/{tooltip-Dewu4Ynm.cjs → tooltip-CEcUVmor.cjs} +1 -1
  366. package/dist/{tooltip-B82dN7Oy.js → tooltip-DksScngC.js} +1 -1
  367. package/dist/{typography-B8Iurhy1.js → typography-BkxEiwQ1.js} +1 -1
  368. package/dist/{typography-LMez-POJ.cjs → typography-Cf5zEv4y.cjs} +1 -1
  369. package/dist/ui-provider-DI1VxMDT.cjs +1 -0
  370. package/dist/{ui-provider-BzyJxcKH.js → ui-provider-gNDv-ZRY.js} +4 -1
  371. package/dist/ui-provider.cjs +1 -1
  372. package/dist/ui-provider.js +1 -1
  373. package/dist/{upload-5tzkI0NC.cjs → upload-Bg8tyH5a.cjs} +1 -1
  374. package/dist/{upload-BL8HIPbS.js → upload-wTBh4QQx.js} +4 -4
  375. package/dist/{value-inputs-DzErolfh.cjs → value-inputs-B6ZURTUl.cjs} +1 -1
  376. package/dist/{value-inputs-DQGHd7k8.js → value-inputs-DnQKmVqW.js} +4 -4
  377. package/docs/generated/component-index.json +1 -2
  378. package/docs/generated/components/base--qr-code.md +2 -2
  379. package/docs/generated/components/base--typography.md +1 -1
  380. package/docs/generated/components/features--schema-form.md +1 -1
  381. package/docs/generated/components/features--theme-tweaker.md +3 -2
  382. package/docs/generated/components/theming.md +3 -2
  383. package/docs/generated/components/ui-provider.md +1 -0
  384. package/docs/generated/migration-codemod.json +28 -3
  385. package/docs/generated/migration.md +72 -3
  386. package/docs/generated/profiles.md +1 -1
  387. package/docs/learn/migration.md +16 -1
  388. package/docs/learn/theming.md +1 -1
  389. package/package.json +1 -1
  390. package/src/styles/SCOPES.md +28 -9
  391. package/src/styles/TOKENS.md +165 -9
  392. package/dist/accordion-BH9vNfdb.cjs +0 -1
  393. package/dist/cards-CO5LHALb.cjs +0 -1
  394. package/dist/combobox-CTUFSblt.cjs +0 -1
  395. package/dist/display-BUiiuPS9.cjs +0 -1
  396. package/dist/feedback-Da53xAUT.cjs +0 -1
  397. package/dist/filters-B8dkhzan.cjs +0 -1
  398. package/dist/forms-BEQN1X5A.cjs +0 -1
  399. package/dist/navigation-BaIANCwE.cjs +0 -1
  400. package/dist/navigation-BmZabEfZ.cjs +0 -1
  401. package/dist/styles/theming/mentions.css +0 -33
  402. package/dist/ui-provider-B3v22pQY.cjs +0 -1
package/dist/tokens.json CHANGED
@@ -719,7 +719,7 @@
719
719
  }
720
720
  },
721
721
  "radius-pill": {
722
- "$description": "Fully rounded ends for pills, switches, and avatars.",
722
+ "$description": "Fully rounded ends for pills, switches, tracks, and status dots. True circles (avatars, radios) use 50%.",
723
723
  "$type": "dimension",
724
724
  "$value": {
725
725
  "value": 999,
@@ -755,7 +755,7 @@
755
755
  "$value": "{palette.neutral.200}"
756
756
  },
757
757
  "sidebar-ring": {
758
- "$description": "Focus-visible ring inside the sidebar.",
758
+ "$description": "The sidebar's focus-ring seed, as --ring is the page's: sidebar surfaces mix it 70/30 toward --sidebar-foreground in light, read it unmixed in dark, and compose --focus-ring, --focus-ring-inset and --field-focus-ring from it.",
759
759
  "$value": "{palette.neutral.400}"
760
760
  },
761
761
  "shadow-ink": {
@@ -783,7 +783,7 @@
783
783
  "$value": "{palette.link.600}"
784
784
  },
785
785
  "primary-accent": {
786
- "$description": "Brand color drawn AS foreground — icons, spinners, active marks — on the app surface. Matches --primary here; lightens in dark, where --primary stays put so primary fills keep the kit color. Not shadcn's --accent, which is a muted hover surface.",
786
+ "$description": "Brand color drawn AS foreground — text, icons, spinners, active marks — on the app surface or a primary tint. Matches --primary here; in dark it steps one lighter than --primary, which is tuned as a fill for --primary-foreground ink. Read this, not --primary, wherever the brand is ink. Not shadcn's --accent, which is a muted hover surface.",
787
787
  "$value": "{palette.brand.600}"
788
788
  },
789
789
  "warning": {
@@ -929,10 +929,11 @@
929
929
  },
930
930
  "sidebar-primary": {
931
931
  "$description": "Strong sidebar selection or primary action fill.",
932
- "$value": "{palette.violet.500}"
932
+ "$value": "{palette.neutral.50}"
933
933
  },
934
934
  "sidebar-primary-foreground": {
935
- "$value": "{theme.light.sidebar-primary-foreground}"
935
+ "$description": "Text and icons on sidebar primary fills.",
936
+ "$value": "{palette.neutral.900}"
936
937
  },
937
938
  "sidebar-accent": {
938
939
  "$description": "Sidebar hover and selected-row neutral fill.",
@@ -947,7 +948,7 @@
947
948
  "$value": "{palette.white.a10}"
948
949
  },
949
950
  "sidebar-ring": {
950
- "$description": "Focus-visible ring inside the sidebar.",
951
+ "$description": "The sidebar's focus-ring seed, as --ring is the page's: sidebar surfaces mix it 70/30 toward --sidebar-foreground in light, read it unmixed in dark, and compose --focus-ring, --focus-ring-inset and --field-focus-ring from it.",
951
952
  "$value": "{palette.neutral.500}"
952
953
  },
953
954
  "shadow-ink": {
@@ -974,7 +975,7 @@
974
975
  "$value": "{palette.link.400}"
975
976
  },
976
977
  "primary-accent": {
977
- "$description": "Brand color drawn AS foreground — icons, spinners, active marks — on the app surface. Matches --primary here; lightens in dark, where --primary stays put so primary fills keep the kit color. Not shadcn's --accent, which is a muted hover surface.",
978
+ "$description": "Brand color drawn AS foreground — text, icons, spinners, active marks — on the app surface or a primary tint. Matches --primary here; in dark it steps one lighter than --primary, which is tuned as a fill for --primary-foreground ink. Read this, not --primary, wherever the brand is ink. Not shadcn's --accent, which is a muted hover surface.",
978
979
  "$value": "{palette.brand.300}"
979
980
  },
980
981
  "warning": {
@@ -1,6 +1,6 @@
1
1
  import "./css/toolbar.css";
2
2
  import { t as e } from "./cx--CBrhWH0.js";
3
- import { c as t } from "./buttons-Corm-KHK.js";
3
+ import { c as t } from "./buttons-riLAPVQV.js";
4
4
  import "react";
5
5
  import { jsx as n } from "react/jsx-runtime";
6
6
  import { Toolbar as r } from "@base-ui/react/toolbar";
@@ -1 +1 @@
1
- const e=require("./rolldown-runtime-BocRIvOZ.cjs"),t=require("./buttons-CMsvnL6-.cjs");let n=require("react");n=e.t(n,1);let r=require("react/jsx-runtime"),i=require("@base-ui/react/toolbar"),a=require("clsx");var o={root:`toolbar__root___WfXZ-`,group:`toolbar__group___XA-d4`,button:`toolbar__button___Bnb_5`,link:`toolbar__link___-qbUF`,input:`toolbar__input___mbE52`,separator:`toolbar__separator___XbvK5`};function s({className:e,...t}){return(0,r.jsx)(i.Toolbar.Root,{"data-slot":`toolbar`,className:(0,a.clsx)(`toolbar--component`,o.root,e),...t})}function c({className:e,...t}){return(0,r.jsx)(i.Toolbar.Group,{"data-slot":`toolbar-group`,className:(0,a.clsx)(`toolbar--group`,o.group,e),...t})}function l({render:e,tone:n=`neutral`,buttonStyle:s=`ghost`,iconOnly:c,loading:l,fullWidth:u,className:d,...f}){return(0,r.jsx)(i.Toolbar.Button,{...f,disabled:f.disabled||l,render:e??(0,r.jsx)(t.c,{tone:n,buttonStyle:s,iconOnly:c,loading:l,fullWidth:u}),"data-slot":`toolbar-button`,className:(0,a.clsx)(`toolbar--button`,o.button,d)})}function u({className:e,...t}){return(0,r.jsx)(i.Toolbar.Link,{"data-slot":`toolbar-link`,className:(0,a.clsx)(`toolbar--link`,o.link,e),...t})}function d({className:e,...t}){return(0,r.jsx)(i.Toolbar.Input,{"data-slot":`toolbar-input`,"data-field-control":``,className:(0,a.clsx)(`toolbar--input`,o.input,e),...t})}function f({className:e,...t}){return(0,r.jsx)(i.Toolbar.Separator,{"data-slot":`toolbar-separator`,className:(0,a.clsx)(`toolbar--separator`,o.separator,e),...t})}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return s}});
1
+ const e=require("./rolldown-runtime-BocRIvOZ.cjs"),t=require("./buttons-Dwl42fIr.cjs");let n=require("react");n=e.t(n,1);let r=require("react/jsx-runtime"),i=require("@base-ui/react/toolbar"),a=require("clsx");var o={root:`toolbar__root___WfXZ-`,group:`toolbar__group___XA-d4`,button:`toolbar__button___Bnb_5`,link:`toolbar__link___-qbUF`,input:`toolbar__input___mbE52`,separator:`toolbar__separator___XbvK5`};function s({className:e,...t}){return(0,r.jsx)(i.Toolbar.Root,{"data-slot":`toolbar`,className:(0,a.clsx)(`toolbar--component`,o.root,e),...t})}function c({className:e,...t}){return(0,r.jsx)(i.Toolbar.Group,{"data-slot":`toolbar-group`,className:(0,a.clsx)(`toolbar--group`,o.group,e),...t})}function l({render:e,tone:n=`neutral`,buttonStyle:s=`ghost`,iconOnly:c,loading:l,fullWidth:u,className:d,...f}){return(0,r.jsx)(i.Toolbar.Button,{...f,disabled:f.disabled||l,render:e??(0,r.jsx)(t.c,{tone:n,buttonStyle:s,iconOnly:c,loading:l,fullWidth:u}),"data-slot":`toolbar-button`,className:(0,a.clsx)(`toolbar--button`,o.button,d)})}function u({className:e,...t}){return(0,r.jsx)(i.Toolbar.Link,{"data-slot":`toolbar-link`,className:(0,a.clsx)(`toolbar--link`,o.link,e),...t})}function d({className:e,...t}){return(0,r.jsx)(i.Toolbar.Input,{"data-slot":`toolbar-input`,"data-field-control":``,className:(0,a.clsx)(`toolbar--input`,o.input,e),...t})}function f({className:e,...t}){return(0,r.jsx)(i.Toolbar.Separator,{"data-slot":`toolbar-separator`,className:(0,a.clsx)(`toolbar--separator`,o.separator,e),...t})}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return s}});
@@ -1 +1 @@
1
- const e=require("./ui-provider-B3v22pQY.cjs");let t=require("react"),n=require("react/jsx-runtime"),r=require("@base-ui/react/tooltip"),i=require("clsx");var a={positioner:`tooltip__positioner___l9j7s`,content:`tooltip__content___3Ln0A`,arrow:`tooltip__arrow___aJN0q`};function o({delay:e,delayDuration:t,...i}){return(0,n.jsx)(r.Tooltip.Provider,{"data-slot":`tooltip-provider`,delay:t??e,...i})}var s=(0,t.createContext)(null);function c({open:e,defaultOpen:i,onOpenChange:a,...o}){let c=(0,t.useId)(),[l,u]=(0,t.useState)(i??!1);return(0,n.jsx)(s.Provider,{value:{id:c,open:e??l},children:(0,n.jsx)(r.Tooltip.Root,{"data-slot":`tooltip`,open:e,defaultOpen:i,onOpenChange:(e,t)=>{u(e),a?.(e,t)},...o})})}function l({render:e,children:i,...a}){let o=(0,t.useContext)(s),c=typeof e==`function`?(t,n)=>{let{nativeButton:r,...i}=t;return e(i,n)}:e;return(0,n.jsx)(r.Tooltip.Trigger,{"data-slot":`tooltip-trigger`,render:c,...a,"aria-describedby":[a[`aria-describedby`],o?.open?o.id:void 0].filter(Boolean).join(` `)||void 0,children:i})}function u({container:o,className:c,side:l=`top`,sideOffset:u=6,align:d=`center`,alignOffset:f=0,children:p,...m}){let h=e.u(o),g=(0,t.useContext)(s);return(0,n.jsx)(r.Tooltip.Portal,{container:h,children:(0,n.jsx)(r.Tooltip.Positioner,{align:d,alignOffset:f,side:l,sideOffset:u,className:a.positioner,children:(0,n.jsxs)(r.Tooltip.Popup,{id:m.id??g?.id,"data-slot":`tooltip-content`,className:(0,i.clsx)(`tooltip-content--component`,a.content,c),...m,children:[p,(0,n.jsx)(r.Tooltip.Arrow,{className:a.arrow})]})})})}Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
1
+ const e=require("./ui-provider-DI1VxMDT.cjs");let t=require("react"),n=require("react/jsx-runtime"),r=require("@base-ui/react/tooltip"),i=require("clsx");var a={positioner:`tooltip__positioner___l9j7s`,content:`tooltip__content___3Ln0A`,arrow:`tooltip__arrow___aJN0q`};function o({delay:e,delayDuration:t,...i}){return(0,n.jsx)(r.Tooltip.Provider,{"data-slot":`tooltip-provider`,delay:t??e,...i})}var s=(0,t.createContext)(null);function c({open:e,defaultOpen:i,onOpenChange:a,...o}){let c=(0,t.useId)(),[l,u]=(0,t.useState)(i??!1);return(0,n.jsx)(s.Provider,{value:{id:c,open:e??l},children:(0,n.jsx)(r.Tooltip.Root,{"data-slot":`tooltip`,open:e,defaultOpen:i,onOpenChange:(e,t)=>{u(e),a?.(e,t)},...o})})}function l({render:e,children:i,...a}){let o=(0,t.useContext)(s),c=typeof e==`function`?(t,n)=>{let{nativeButton:r,...i}=t;return e(i,n)}:e;return(0,n.jsx)(r.Tooltip.Trigger,{"data-slot":`tooltip-trigger`,render:c,...a,"aria-describedby":[a[`aria-describedby`],o?.open?o.id:void 0].filter(Boolean).join(` `)||void 0,children:i})}function u({container:o,className:c,side:l=`top`,sideOffset:u=6,align:d=`center`,alignOffset:f=0,children:p,...m}){let h=e.u(o),g=(0,t.useContext)(s);return(0,n.jsx)(r.Tooltip.Portal,{container:h,children:(0,n.jsx)(r.Tooltip.Positioner,{align:d,alignOffset:f,side:l,sideOffset:u,className:a.positioner,children:(0,n.jsxs)(r.Tooltip.Popup,{id:m.id??g?.id,"data-slot":`tooltip-content`,className:(0,i.clsx)(`tooltip-content--component`,a.content,c),...m,children:[p,(0,n.jsx)(r.Tooltip.Arrow,{className:a.arrow})]})})})}Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
@@ -1,6 +1,6 @@
1
1
  import "./css/tooltip.css";
2
2
  import { t as e } from "./cx--CBrhWH0.js";
3
- import { u as t } from "./ui-provider-BzyJxcKH.js";
3
+ import { u as t } from "./ui-provider-gNDv-ZRY.js";
4
4
  import { createContext as n, useContext as r, useId as i, useState as a } from "react";
5
5
  import { jsx as o, jsxs as s } from "react/jsx-runtime";
6
6
  import { Tooltip as c } from "@base-ui/react/tooltip";
@@ -256,7 +256,7 @@ function T(e) {
256
256
  var E = { root: "rich-text__root___Rqgeq" };
257
257
  //#endregion
258
258
  //#region src/components/base/typography/rich-text/rich-text.tsx
259
- function D({ html: e, children: n, size: r, type: a, align: o, weight: s, lineHeight: c, tag: l = "div", className: u, ...f }) {
259
+ function D({ html: e, children: n, size: r, type: a, align: o, weight: s, lineHeight: c = "relaxed", tag: l = "div", className: u, ...f }) {
260
260
  let p = n === void 0 ? T(e ?? "") : "";
261
261
  if (n === void 0 && !p) return null;
262
262
  let m = {
@@ -1 +1 @@
1
- const e=require("./rolldown-runtime-BocRIvOZ.cjs"),t=require("./cvm-CHrYqf6y.cjs");let n=require("react");n=e.t(n,1);let r=require("react/jsx-runtime"),i=require("hast-util-from-html"),a=require("hast-util-sanitize"),o=require("hast-util-to-html"),s=require("clsx");var c={root:`text__root___WXSj0`,typeMain:`text__typeMain___EMyyg`,typeInverse:`text__typeInverse___rr-F0`,typeSecondary:`text__typeSecondary___lPDp1`,typeError:`text__typeError___MJD1v`,typeSuccess:`text__typeSuccess___RVroi`,typePrimary:`text__typePrimary___T19nc`,sizeDefault:`text__sizeDefault___01O1A`,sizeXxs:`text__sizeXxs___j6dlU`,sizeXs:`text__sizeXs___WXVbr`,sizePxs:`text__sizePxs___TT4nK`,sizeSm:`text__sizeSm___IaquG`,sizeBase:`text__sizeBase___CuUMK`,sizeLg:`text__sizeLg___0VG-5`,sizeXl:`text__sizeXl___-zWCu`,truncate:`text__truncate___S7lLS`,alignLeft:`text__alignLeft___JvUDU`,alignCenter:`text__alignCenter___HrYTw`,alignRight:`text__alignRight___H6b60`,leadingNone:`text__leadingNone___OtxGj`,leadingTight:`text__leadingTight___PNiV7`,leadingSnug:`text__leadingSnug___sqQmC`,leadingNormal:`text__leadingNormal___ONkfy`,leadingRelaxed:`text__leadingRelaxed___yCCy2`,leadingLoose:`text__leadingLoose___LBj11`,weightNormal:`text__weightNormal___EcUAi`,weightMedium:`text__weightMedium___NvDV9`,weightSemibold:`text__weightSemibold___cBVe2`,weightBold:`text__weightBold___cGJTO`,numeric:`text__numeric___1Fztf`},l=t.t(c.root,{variants:{type:{inherit:void 0,main:c.typeMain,inverse:c.typeInverse,secondary:c.typeSecondary,error:c.typeError,success:c.typeSuccess,primary:c.typePrimary},size:{inherit:void 0,default:c.sizeDefault,xxs:c.sizeXxs,xs:c.sizeXs,pxs:c.sizePxs,sm:c.sizeSm,base:c.sizeBase,lg:c.sizeLg,xl:c.sizeXl},align:{left:c.alignLeft,center:c.alignCenter,right:c.alignRight},lineHeight:{none:c.leadingNone,tight:c.leadingTight,snug:c.leadingSnug,normal:c.leadingNormal,relaxed:c.leadingRelaxed,loose:c.leadingLoose},weight:{normal:c.weightNormal,regular:c.weightNormal,medium:c.weightMedium,semibold:c.weightSemibold,bold:c.weightBold},numeric:{true:c.numeric,false:void 0},truncate:{true:c.truncate,false:void 0}}}),u=(0,n.forwardRef)(function({content:e,type:t=`main`,size:n,align:i,lineHeight:a,weight:o=`regular`,className:s,children:c,numeric:u=!1,truncate:d=!1,tag:f=`p`,...p},m){let h=l({type:t,size:n??`default`,align:i,lineHeight:a,weight:o,numeric:u,truncate:d,className:s}),g=c??e;return p.dangerouslySetInnerHTML===void 0&&(g==null||g===``)?null:(0,r.jsx)(f,{ref:m,className:h,"data-typography":`text`,...p,children:g})});u.displayName=`Text`;var d={root:`heading__root___dBhe6`,size2Xl:`heading__size2xl___j2QyW`,sizeXl:`heading__sizeXl___Qromg`,sizeLg:`heading__sizeLg___7PL1b`,sizeBase:`heading__sizeBase___oEAbz`,sizeSm:`heading__sizeSm___bMaet`,group:`heading__group___Sjvwt`,sub:`heading__sub___UOnbD`,truncate:`heading__truncate___tvfJj`},f=t.t(d.root,{variants:{size:{"2xl":d.size2Xl,xl:d.sizeXl,lg:d.sizeLg,base:d.sizeBase,sm:d.sizeSm}},defaultVariants:{size:`lg`}}),p={1:`2xl`,2:`xl`,3:`lg`,4:`base`,5:`sm`,6:`sm`};function m({level:e=2,size:t,subHeading:n,truncate:i=!1,className:a,children:o,...c}){let l=`h${e}`,m=(0,r.jsx)(l,{"data-typography":`heading`,className:(0,s.clsx)(f({size:t??p[e]}),i&&d.truncate,a),...c,children:o});return n?(0,r.jsxs)(`div`,{className:(0,s.clsx)(`heading--component`,d.group),children:[m,(0,r.jsx)(u,{tag:`p`,type:`secondary`,className:d.sub,children:n})]}):m}var h={root:`display-label__root___Pkkay`};function g({className:e,...t}){return(0,r.jsx)(`span`,{"data-typography":`display-label`,className:(0,s.clsx)(`display-label--component`,h.root,e),...t})}var _={root:`text-link__root___BwdQW`,subtle:`text-link__subtle___1pytK`},v=t.t(_.root,{variants:{variant:{default:void 0,subtle:_.subtle}},defaultVariants:{variant:`default`}});function y({className:e,variant:t,render:i,children:a,...o}){let c=v({variant:t,className:e});return i?n.cloneElement(i,{...o,className:[i.props.className,c].filter(Boolean).join(` `),"data-typography":`link`,children:a}):(0,r.jsx)(`a`,{"data-typography":`link`,className:(0,s.clsx)(`text-link--component`,c),...o,children:a})}var b={allowComments:!1,allowDoctypes:!1,tagNames:[...`a.b.blockquote.br.code.del.div.em.h1.h2.h3.h4.h5.h6.i.li.mark.ol.p.pre.s.span.strong.sub.sup.u.ul`.split(`.`)],attributes:{a:[`href`,`title`,[`target`,`_blank`,`_self`,`_parent`,`_top`],`rel`,`dataRefId`,`dataRefKind`,`dataRefTone`,[`contentEditable`,`false`]],span:[`dataRefId`,`dataRefKind`,`dataRefTone`,[`contentEditable`,`false`]]},protocols:{href:[`http`,`https`,`mailto`,`tel`]},strip:[`embed`,`iframe`,`math`,`noscript`,`object`,`script`,`style`,`svg`,`template`]};function x(e){if(e.type===`element`){let t=e.properties.href;typeof t==`string`&&t.trimStart().startsWith(`//`)&&delete e.properties.href}if(e.type===`root`||e.type===`element`)for(let t of e.children)x(t)}var S=256,C=new Map;function w(e){if(!e)return``;let t=C.get(e);if(t!==void 0)return t;let n=(0,i.fromHtml)(e,{fragment:!0});x(n);let r=(0,o.toHtml)((0,a.sanitize)(n,b));return C.size>=S&&C.clear(),C.set(e,r),r}var T={root:`rich-text__root___Rqgeq`};function E({html:e,children:t,size:n,type:i,align:a,weight:o,lineHeight:c,tag:l=`div`,className:d,...f}){let p=t===void 0?w(e??``):``;if(t===void 0&&!p)return null;let m={tag:l,size:n,type:i,align:a,weight:o,lineHeight:c,"data-typography":`rich-text`,className:(0,s.clsx)(`rich-text--component`,T.root,d),...f};return t===void 0?(0,r.jsx)(u,{...m,dangerouslySetInnerHTML:{__html:p}}):(0,r.jsx)(u,{...m,children:t})}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return E}});
1
+ const e=require("./rolldown-runtime-BocRIvOZ.cjs"),t=require("./cvm-CHrYqf6y.cjs");let n=require("react");n=e.t(n,1);let r=require("react/jsx-runtime"),i=require("hast-util-from-html"),a=require("hast-util-sanitize"),o=require("hast-util-to-html"),s=require("clsx");var c={root:`text__root___WXSj0`,typeMain:`text__typeMain___EMyyg`,typeInverse:`text__typeInverse___rr-F0`,typeSecondary:`text__typeSecondary___lPDp1`,typeError:`text__typeError___MJD1v`,typeSuccess:`text__typeSuccess___RVroi`,typePrimary:`text__typePrimary___T19nc`,sizeDefault:`text__sizeDefault___01O1A`,sizeXxs:`text__sizeXxs___j6dlU`,sizeXs:`text__sizeXs___WXVbr`,sizePxs:`text__sizePxs___TT4nK`,sizeSm:`text__sizeSm___IaquG`,sizeBase:`text__sizeBase___CuUMK`,sizeLg:`text__sizeLg___0VG-5`,sizeXl:`text__sizeXl___-zWCu`,truncate:`text__truncate___S7lLS`,alignLeft:`text__alignLeft___JvUDU`,alignCenter:`text__alignCenter___HrYTw`,alignRight:`text__alignRight___H6b60`,leadingNone:`text__leadingNone___OtxGj`,leadingTight:`text__leadingTight___PNiV7`,leadingSnug:`text__leadingSnug___sqQmC`,leadingNormal:`text__leadingNormal___ONkfy`,leadingRelaxed:`text__leadingRelaxed___yCCy2`,leadingLoose:`text__leadingLoose___LBj11`,weightNormal:`text__weightNormal___EcUAi`,weightMedium:`text__weightMedium___NvDV9`,weightSemibold:`text__weightSemibold___cBVe2`,weightBold:`text__weightBold___cGJTO`,numeric:`text__numeric___1Fztf`},l=t.t(c.root,{variants:{type:{inherit:void 0,main:c.typeMain,inverse:c.typeInverse,secondary:c.typeSecondary,error:c.typeError,success:c.typeSuccess,primary:c.typePrimary},size:{inherit:void 0,default:c.sizeDefault,xxs:c.sizeXxs,xs:c.sizeXs,pxs:c.sizePxs,sm:c.sizeSm,base:c.sizeBase,lg:c.sizeLg,xl:c.sizeXl},align:{left:c.alignLeft,center:c.alignCenter,right:c.alignRight},lineHeight:{none:c.leadingNone,tight:c.leadingTight,snug:c.leadingSnug,normal:c.leadingNormal,relaxed:c.leadingRelaxed,loose:c.leadingLoose},weight:{normal:c.weightNormal,regular:c.weightNormal,medium:c.weightMedium,semibold:c.weightSemibold,bold:c.weightBold},numeric:{true:c.numeric,false:void 0},truncate:{true:c.truncate,false:void 0}}}),u=(0,n.forwardRef)(function({content:e,type:t=`main`,size:n,align:i,lineHeight:a,weight:o=`regular`,className:s,children:c,numeric:u=!1,truncate:d=!1,tag:f=`p`,...p},m){let h=l({type:t,size:n??`default`,align:i,lineHeight:a,weight:o,numeric:u,truncate:d,className:s}),g=c??e;return p.dangerouslySetInnerHTML===void 0&&(g==null||g===``)?null:(0,r.jsx)(f,{ref:m,className:h,"data-typography":`text`,...p,children:g})});u.displayName=`Text`;var d={root:`heading__root___dBhe6`,size2Xl:`heading__size2xl___j2QyW`,sizeXl:`heading__sizeXl___Qromg`,sizeLg:`heading__sizeLg___7PL1b`,sizeBase:`heading__sizeBase___oEAbz`,sizeSm:`heading__sizeSm___bMaet`,group:`heading__group___Sjvwt`,sub:`heading__sub___UOnbD`,truncate:`heading__truncate___tvfJj`},f=t.t(d.root,{variants:{size:{"2xl":d.size2Xl,xl:d.sizeXl,lg:d.sizeLg,base:d.sizeBase,sm:d.sizeSm}},defaultVariants:{size:`lg`}}),p={1:`2xl`,2:`xl`,3:`lg`,4:`base`,5:`sm`,6:`sm`};function m({level:e=2,size:t,subHeading:n,truncate:i=!1,className:a,children:o,...c}){let l=`h${e}`,m=(0,r.jsx)(l,{"data-typography":`heading`,className:(0,s.clsx)(f({size:t??p[e]}),i&&d.truncate,a),...c,children:o});return n?(0,r.jsxs)(`div`,{className:(0,s.clsx)(`heading--component`,d.group),children:[m,(0,r.jsx)(u,{tag:`p`,type:`secondary`,className:d.sub,children:n})]}):m}var h={root:`display-label__root___Pkkay`};function g({className:e,...t}){return(0,r.jsx)(`span`,{"data-typography":`display-label`,className:(0,s.clsx)(`display-label--component`,h.root,e),...t})}var _={root:`text-link__root___BwdQW`,subtle:`text-link__subtle___1pytK`},v=t.t(_.root,{variants:{variant:{default:void 0,subtle:_.subtle}},defaultVariants:{variant:`default`}});function y({className:e,variant:t,render:i,children:a,...o}){let c=v({variant:t,className:e});return i?n.cloneElement(i,{...o,className:[i.props.className,c].filter(Boolean).join(` `),"data-typography":`link`,children:a}):(0,r.jsx)(`a`,{"data-typography":`link`,className:(0,s.clsx)(`text-link--component`,c),...o,children:a})}var b={allowComments:!1,allowDoctypes:!1,tagNames:[...`a.b.blockquote.br.code.del.div.em.h1.h2.h3.h4.h5.h6.i.li.mark.ol.p.pre.s.span.strong.sub.sup.u.ul`.split(`.`)],attributes:{a:[`href`,`title`,[`target`,`_blank`,`_self`,`_parent`,`_top`],`rel`,`dataRefId`,`dataRefKind`,`dataRefTone`,[`contentEditable`,`false`]],span:[`dataRefId`,`dataRefKind`,`dataRefTone`,[`contentEditable`,`false`]]},protocols:{href:[`http`,`https`,`mailto`,`tel`]},strip:[`embed`,`iframe`,`math`,`noscript`,`object`,`script`,`style`,`svg`,`template`]};function x(e){if(e.type===`element`){let t=e.properties.href;typeof t==`string`&&t.trimStart().startsWith(`//`)&&delete e.properties.href}if(e.type===`root`||e.type===`element`)for(let t of e.children)x(t)}var S=256,C=new Map;function w(e){if(!e)return``;let t=C.get(e);if(t!==void 0)return t;let n=(0,i.fromHtml)(e,{fragment:!0});x(n);let r=(0,o.toHtml)((0,a.sanitize)(n,b));return C.size>=S&&C.clear(),C.set(e,r),r}var T={root:`rich-text__root___Rqgeq`};function E({html:e,children:t,size:n,type:i,align:a,weight:o,lineHeight:c=`relaxed`,tag:l=`div`,className:d,...f}){let p=t===void 0?w(e??``):``;if(t===void 0&&!p)return null;let m={tag:l,size:n,type:i,align:a,weight:o,lineHeight:c,"data-typography":`rich-text`,className:(0,s.clsx)(`rich-text--component`,T.root,d),...f};return t===void 0?(0,r.jsx)(u,{...m,dangerouslySetInnerHTML:{__html:p}}):(0,r.jsx)(u,{...m,children:t})}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return E}});
@@ -0,0 +1 @@
1
+ let e=require("react"),t=require("react/jsx-runtime"),n=require("@base-ui/react/merge-props"),r=require("@base-ui/react/use-render"),i=require("@base-ui/react/csp-provider");var a={colorScheme:`system`,density:`default`,scale:1,typography:{defaultTextSize:`sm`},overlay:{darkMenus:!0},forms:{preventIPhoneZoom:!1},formatting:{locale:`en-US`},money:{defaultCurrency:`USD`,dualPricingEnabled:!1,displayMode:`dynamic`,layout:`inline`,formatMode:`with-symbol`},dates:{weekStartsOn:1,format:`dd MMM yyyy`,timeFormat:`HH:mm`}},o=(0,e.createContext)(a),s=(0,e.createContext)(!1),c=(0,e.createContext)(null);function l(e,t={}){return{...e,...t,colorScheme:t.colorScheme??e.colorScheme,density:t.density??e.density,scale:t.scale??e.scale,theme:{...e.theme,...t.theme,colors:u(e.theme?.colors,t.theme?.colors),palette:u(e.theme?.palette,t.theme?.palette),vars:u(e.theme?.vars,t.theme?.vars)},typography:{...e.typography,...t.typography,fonts:u(e.typography?.fonts,t.typography?.fonts),sizes:u(e.typography?.sizes,t.typography?.sizes)},motion:{...e.motion,...t.motion,durations:u(e.motion?.durations,t.motion?.durations)},overlay:{...e.overlay,...t.overlay},formatting:{...e.formatting,...t.formatting},forms:{...e.forms,...t.forms},money:{...e.money,...t.money},dates:{...e.dates,...t.dates},defaults:d(e.defaults,t.defaults)}}function u(e,t){return e?t?{...e,...t}:e:t}function d(e,t){if(!e)return t;if(!t)return e;let n=e,r=t,i={...n};for(let e of Object.keys(r))i[e]={...n[e],...r[e]};return i}function f(e){let t={},n=(e,n)=>{n!==void 0&&(t[`--${e}`]=n)},{theme:r,typography:i,motion:a,overlay:o,scale:s}=e;if(s!==void 0&&n(`scale`,String(s)),r){n(`radius`,r.radius),n(`radius-sm`,r.radiusSm);for(let[e,t]of Object.entries(r.colors??{}))n(e,t);for(let[e,t]of Object.entries(r.palette??{}))n(e,t);for(let[e,t]of Object.entries(r.vars??{}))n(e,t)}let c=o?.backdropBlur;if(c!==void 0&&c!==0&&c!==`0`&&c!==``&&n(`overlay-backdrop-filter`,`blur(${typeof c==`number`?`${c}px`:c})`),i){i.scale!==void 0&&n(`text-scale`,String(i.scale));for(let[e,t]of Object.entries(i.fonts??{}))n(`font-${e}`,t);for(let[e,t]of Object.entries(i.sizes??{}))n(`text-${e}`,t);if(i.defaultTextSize!==void 0&&i.defaultTextSize!==`inherit`){let e=i.defaultTextSize===`xxs`?`xs`:i.defaultTextSize;n(`text-default`,`var(--text-${e})`),n(`text-default--line-height`,`var(--text-${e}--line-height)`)}}if(a){for(let[e,t]of Object.entries(a.durations??{}))n(`duration-${e}`,t);a.reduced===!0&&(n(`duration-instant`,`0ms`),n(`duration-fast`,`0ms`),n(`duration-normal`,`0ms`))}return t}function p(e){let t={};return e.density&&e.density!=="default"&&(t[`data-density`]=e.density),(e.colorScheme===`light`||e.colorScheme===`dark`)&&(t[`data-theme`]=e.colorScheme),t}var m=()=>()=>{},h=()=>!1,g=()=>typeof navigator<`u`&&/iPhone/i.test(navigator.userAgent);function _(t){let n=(0,e.useSyncExternalStore)(m,g,h);return t===!0&&n}var v=[`data-theme`,`data-density`,`data-iphone-input-zoom`],y=new Map,b=0,x=new Map;function S(e){return typeof document>`u`?null:e===`body`?document.body:document.documentElement}function C(e){let t=S(e);if(!t)return;let n=null;for(let t of y.values())t.target===e&&(n===null||t.order<n.order)&&(n=t);if(n===null){for(let[n,r]of x.get(e)??[])r===null?t.removeAttribute(n):t.setAttribute(n,r);x.delete(e);return}x.has(e)||x.set(e,new Map(v.map(e=>[e,t.getAttribute(e)])));for(let e of v){let r=n.attributes[e];r==null?t.removeAttribute(e):t.setAttribute(e,r)}}function w({config:n,documentTarget:r=!1,children:i}){let a=(0,e.useContext)(o),c=(0,e.useMemo)(()=>l(a,n),[a,n]),u=_(c.forms?.preventIPhoneZoom),d=(0,e.useRef)(null);d.current??=Symbol(`ui-root`);let f=(0,e.useRef)(null);return f.current??=b++,(0,e.useEffect)(()=>{if(r===!1||typeof document>`u`)return;let e=r,t=d.current;return y.set(t,{order:f.current,target:e,attributes:{...p(c),"data-iphone-input-zoom":String(u)}}),C(e),()=>{y.delete(t),C(e)}},[r,c,u]),(0,t.jsx)(o.Provider,{value:c,children:(0,t.jsx)(s.Provider,{value:!0,children:i})})}function T({config:i,transparent:a=!0,render:c,className:u,style:d,...m}){let h=(0,e.useContext)(o),g=(0,e.useMemo)(()=>l(h,i),[h,i]),v=_(g.forms?.preventIPhoneZoom),y=(0,e.useMemo)(()=>({...a?{display:`contents`}:null,...f(i??{}),...d}),[i,a,d]),b=(0,e.useMemo)(()=>p(g),[g]),x=(0,r.useRender)({defaultTagName:`div`,props:(0,n.mergeProps)({className:u,style:y,...b,"data-ui-scope":``,"data-iphone-input-zoom":String(v)},m),render:c});return(0,t.jsx)(o.Provider,{value:g,children:(0,t.jsx)(s.Provider,{value:!0,children:x})})}function E({config:n,transparent:r=!0,className:i,style:a,children:o}){return(0,e.useContext)(s)?(0,t.jsx)(T,{config:n,transparent:r,className:i,style:a,children:o}):(0,t.jsx)(w,{config:n,documentTarget:`documentElement`,children:(0,t.jsx)(T,{config:n,transparent:r,className:i,style:a,children:o})})}function D(e){return(0,t.jsx)(i.CSPProvider,{...e})}function O({vars:e,as:n=`div`,transparent:r=!0,className:i,style:a,children:o}){return(0,t.jsx)(n,{"data-ui-scope":``,className:i,style:{...r?{display:`contents`}:null,...e,...a},children:o})}function k({container:n,children:r}){let[i,a]=(0,e.useState)(null);return(0,t.jsxs)(c.Provider,{value:n??i,children:[r,n===void 0&&(0,t.jsx)(`div`,{ref:a,"data-slot":`ui-portal-host`,style:{display:`contents`}})]})}function A(){return(0,e.useContext)(o)}function j(){return(0,e.useContext)(o).formatting}function M(){return(0,e.useContext)(o).money}function N(){return(0,e.useContext)(o).dates}function P(){return(0,e.useContext)(o).overlay}function F(){return(0,e.useContext)(o).typography}function I(){let{density:t,scale:n}=(0,e.useContext)(o);return{density:t,scale:n}}function L(){return(0,e.useContext)(o).scale}function R(t,n){let r=(0,e.useContext)(o).defaults?.[t];return(0,e.useMemo)(()=>r?{...n,...r}:n,[n,r])}function z(t){let n=(0,e.useContext)(c);return t??n??void 0}Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return o}});
@@ -106,7 +106,10 @@ function y(e) {
106
106
  i.scale !== void 0 && n("text-scale", String(i.scale));
107
107
  for (let [e, t] of Object.entries(i.fonts ?? {})) n(`font-${e}`, t);
108
108
  for (let [e, t] of Object.entries(i.sizes ?? {})) n(`text-${e}`, t);
109
- i.defaultTextSize !== void 0 && i.defaultTextSize !== "inherit" && (n("text-default", `var(--text-${i.defaultTextSize})`), n("text-default--line-height", `var(--text-${i.defaultTextSize}--line-height)`));
109
+ if (i.defaultTextSize !== void 0 && i.defaultTextSize !== "inherit") {
110
+ let e = i.defaultTextSize === "xxs" ? "xs" : i.defaultTextSize;
111
+ n("text-default", `var(--text-${e})`), n("text-default--line-height", `var(--text-${e}--line-height)`);
112
+ }
110
113
  }
111
114
  if (a) {
112
115
  for (let [e, t] of Object.entries(a.durations ?? {})) n(`duration-${e}`, t);
@@ -1 +1 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./ui-provider-B3v22pQY.cjs");exports.CSPProvider=e.p,exports.DEFAULT_UI_CONFIG=e.S,exports.Scope=e.f,exports.UIConfigContext=e.y,exports.UINestedContext=e.b,exports.UIPortalHost=e.d,exports.UIProvider=e.m,exports.UIRoot=e.g,exports.UIScope=e.h,exports.configToAttributes=e._,exports.configToCssVars=e.v,exports.mergeUIConfig=e.x,exports.useDatesConfig=e.t,exports.useDefaults=e.n,exports.useDensity=e.r,exports.useFormatting=e.i,exports.useMoneyConfig=e.a,exports.useOverlayConfig=e.o,exports.useScale=e.s,exports.useTypographyConfig=e.c,exports.useUIConfig=e.l,exports.useUIPortalContainer=e.u;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./ui-provider-DI1VxMDT.cjs");exports.CSPProvider=e.p,exports.DEFAULT_UI_CONFIG=e.S,exports.Scope=e.f,exports.UIConfigContext=e.y,exports.UINestedContext=e.b,exports.UIPortalHost=e.d,exports.UIProvider=e.m,exports.UIRoot=e.g,exports.UIScope=e.h,exports.configToAttributes=e._,exports.configToCssVars=e.v,exports.mergeUIConfig=e.x,exports.useDatesConfig=e.t,exports.useDefaults=e.n,exports.useDensity=e.r,exports.useFormatting=e.i,exports.useMoneyConfig=e.a,exports.useOverlayConfig=e.o,exports.useScale=e.s,exports.useTypographyConfig=e.c,exports.useUIConfig=e.l,exports.useUIPortalContainer=e.u;
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import { S as e, _ as t, a as n, b as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as d, n as f, o as p, p as m, r as h, s as g, t as _, u as v, v as y, x as b, y as x } from "./ui-provider-BzyJxcKH.js";
2
+ import { S as e, _ as t, a as n, b as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as d, n as f, o as p, p as m, r as h, s as g, t as _, u as v, v as y, x as b, y as x } from "./ui-provider-gNDv-ZRY.js";
3
3
  export { m as CSPProvider, e as DEFAULT_UI_CONFIG, o as Scope, x as UIConfigContext, r as UINestedContext, a as UIPortalHost, d as UIProvider, s as UIRoot, c as UIScope, t as configToAttributes, y as configToCssVars, b as mergeUIConfig, _ as useDatesConfig, f as useDefaults, h as useDensity, l as useFormatting, n as useMoneyConfig, p as useOverlayConfig, g as useScale, i as useTypographyConfig, u as useUIConfig, v as useUIPortalContainer };
@@ -1 +1 @@
1
- const e=require("./feedback-Da53xAUT.cjs"),t=require("./buttons-CMsvnL6-.cjs"),n=require("./display-BUiiuPS9.cjs"),r=require("./primitives-BP7kGVYZ.cjs"),i=require("./badge-BRX7GXRH.cjs"),a=require("./strings-BiKL6k6b.cjs");let o=require("lucide-react"),s=require("react"),c=require("react/jsx-runtime"),l=require("clsx");function u(e){let[t,n]=(0,s.useState)([]),r=(0,s.useRef)([]),i=(0,s.useRef)([]);return(0,s.useEffect)(()=>{if(e.length===r.current.length&&e.every((e,t)=>e===r.current[t]))return;r.current=e;let t=i.current;i.current=e.map(e=>URL.createObjectURL(e)),n(i.current);for(let e of t)URL.revokeObjectURL(e)},[e]),(0,s.useEffect)(()=>()=>{for(let e of i.current)URL.revokeObjectURL(e);i.current=[],r.current=[]},[]),t}function d({src:e,alt:t=``,fallback:n,className:r}){let[i,a]=(0,s.useState)(!1),[o,u]=(0,s.useState)(e);return e!==o&&(u(e),a(!1)),i?(0,c.jsx)(c.Fragment,{children:n}):(0,c.jsx)(`img`,{src:e,alt:t,className:(0,l.clsx)(`preview-image--component`,r),onError:()=>a(!0)})}var f={instruction:`Drop a file here, or browse`,instructionMultiple:`Drop files here, or browse`,uploading:e=>`Uploading ${e}`,remove:e=>`Remove ${e}`,rejection:({file:e,code:t,details:n})=>{switch(t){case`invalid-type`:return`${e.name} is not an accepted file type.`;case`too-small`:return`${e.name} is smaller than ${r.C(n.limitBytes??0)}.`;case`too-large`:return`${e.name} is larger than ${r.C(n.limitBytes??0)}.`;case`duplicate`:return`${e.name} has already been added.`;case`too-many`:return`${e.name} exceeds the limit of ${n.maxFiles??0} file${n.maxFiles===1?``:`s`}.`;default:return n.customMessage??`${e.name} was rejected.`}},constraintHint:({accept:e,maxSizeBytes:t})=>[e,t===void 0?void 0:`up to ${Math.round(t/1024/1024)} MB`].filter(Boolean).join(` · `)},p={cover:`Cover`,add:`Add images`,position:(e,t,n)=>`${e}, position ${t} of ${n}. Use the arrow keys to reorder.`,remove:e=>`Remove ${e}`},m={empty:`Add a photo`,overlay:`Change photo`,remove:`Remove photo`},h={empty:`Drop an image here, or browse`,overlay:`Change image`,remove:`Remove image`},g={status:{queued:`Queued`,uploading:`Uploading`,done:`Uploaded`,error:`Failed`,cancelled:`Cancelled`},cancel:e=>`Cancel ${e}`,retry:e=>`Retry ${e}`,remove:e=>`Remove ${e}`,uploading:e=>`Uploading ${e}`,settled:(e,t)=>`${e}: ${t}`},_={...f,...g,clearAll:`Clear all`},v={instruction:`Drop a file here, or browse`,instructionMultiple:`Drop files here, or browse`,dragOver:`Release to add`,helper:``},y={empty:`No file chosen`,clear:`Remove file`};function b({disabled:e=!1,onFiles:t}){let n=(0,s.useRef)(0),[r,i]=(0,s.useState)(!1),a=r&&!e,o=(0,s.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]);return{isDragging:a,dropTargetProps:{onDragEnter:(0,s.useCallback)(t=>{if(o(t),e){n.current=0;return}n.current+=1,i(!0)},[e,o]),onDragOver:(0,s.useCallback)(t=>{o(t),!e&&(t.dataTransfer&&(t.dataTransfer.dropEffect=`copy`),i(!0))},[e,o]),onDragLeave:(0,s.useCallback)(e=>{o(e),n.current=Math.max(0,n.current-1),n.current===0&&i(!1)},[o]),onDrop:(0,s.useCallback)(r=>{if(o(r),n.current=0,i(!1),e)return;let a=r.dataTransfer?.files;a?.length&&t(Array.from(a))},[e,t,o])}}}var x={dropzone:`upload__dropzone___18PHm`,dropzoneCompact:`upload__dropzoneCompact___lO1Y2`,dropzoneInput:`upload__dropzoneInput___OSLjX`,dropzoneIcon:`upload__dropzoneIcon___dEbuz`,dropzoneCopy:`upload__dropzoneCopy___FGRl_`,dropzoneText:`upload__dropzoneText___fG9Sv`,dropzoneHint:`upload__dropzoneHint____aACx`,list:`upload__list___54BTe`,row:`upload__row___6TE2T`,rowActions:`upload__rowActions___fgMkU`,thumb:`upload__thumb___I7oD7`,statusIcon:`upload__statusIcon___VRRk3`,rowBody:`upload__rowBody___51jrN`,rowName:`upload__rowName____3TMo`,rowMeta:`upload__rowMeta___NlE7h`,progress:`upload__progress___sfhZY`,progressFill:`upload__progressFill___PXFlt`,root:`upload__root___TLif3`,rejections:`upload__rejections___VTeCm`,mediaRoot:`upload__mediaRoot___yS2ko`,mediaPicker:`upload__mediaPicker___eVcZk`,avatarPicker:`upload__avatarPicker___rAikO`,imagePicker:`upload__imagePicker___zDNWf`,mediaPreview:`upload__mediaPreview___BS0TO`,mediaOverlay:`upload__mediaOverlay___diadO`,mediaEmpty:`upload__mediaEmpty___5M65A`,tray:`upload__tray___u741N`,trayToolbar:`upload__trayToolbar___NmrU5`,trayCounts:`upload__trayCounts___hrAmS`,statusQueued:`upload__statusQueued___CMIPL`,statusUploading:`upload__statusUploading___ec2M2`,statusDone:`upload__statusDone___MW_Za`,statusError:`upload__statusError___kutx4`,statusCancelled:`upload__statusCancelled___JKMmC`,rowError:`upload__rowError___X8Aj2`,gallery:`upload__gallery___1UoHk`,tile:`upload__tile___8-XgU`,tileImage:`upload__tileImage___pT1Rk`,tileFallback:`upload__tileFallback___h-Jsc`,tileHandle:`upload__tileHandle___ulbFv`,tileRemove:`upload__tileRemove___JQHnl`,tileCover:`upload__tileCover___0TJt3`,galleryAdd:`upload__galleryAdd___CGqBt`,pickerShell:`upload__pickerShell___25oaj`,pickerIcon:`upload__pickerIcon___v0eFJ`,pickerLabel:`upload__pickerLabel___tY20Z`,pickerEmpty:`upload__pickerEmpty___Ql3p-`,pickerMeta:`upload__pickerMeta___0fZCN`,pickerClear:`upload__pickerClear___Rf83M`,dropzoneFooter:`upload__dropzoneFooter___q6ETS`};function S({onDrop:e,accept:t,multiple:n=!1,disabled:r=!1,invalid:i=!1,compact:a=!1,icon:u,inputProps:d,strings:f,label:p,hint:m,footer:h,className:g,..._}){let y={...v,...f},S=(0,s.useId)(),C=d?.id??S,w=`${S}-prompt`,{isDragging:T,dropTargetProps:E}=b({disabled:r,onFiles:e}),D=T?y.dragOver:p??(n?y.instructionMultiple:y.instruction),O=m===void 0?y.helper:m,k=d?.[`aria-labelledby`];return(0,c.jsxs)(`div`,{className:(0,l.clsx)(`dropzone--component`,g),..._,children:[(0,c.jsxs)(`label`,{htmlFor:C,...E,"data-slot":`dropzone`,"data-dragging":T||void 0,"data-disabled":r||void 0,"data-invalid":i||void 0,className:(0,l.clsx)(x.dropzone,a&&x.dropzoneCompact),children:[(0,c.jsx)(`input`,{"aria-invalid":i||void 0,...d,"aria-labelledby":k?`${k} ${w}`:void 0,id:C,type:`file`,accept:t,multiple:n,disabled:r,className:(0,l.clsx)(x.dropzoneInput,d?.className),onChange:t=>{let n=t.target.files;n?.length&&e(Array.from(n)),t.target.value=``}}),u??(0,c.jsx)(o.UploadCloudIcon,{"aria-hidden":!0,className:x.dropzoneIcon}),(0,c.jsxs)(`span`,{className:x.dropzoneCopy,children:[(0,c.jsx)(`span`,{id:w,className:x.dropzoneText,children:D}),O!=null&&O!==``&&(0,c.jsx)(`span`,{className:x.dropzoneHint,children:O})]})]}),!!h&&(0,c.jsx)(`div`,{className:x.dropzoneFooter,children:h})]})}function C(e){return[e.name,e.size,e.type,e.lastModified].join(`|`)}function w(e,t){if(!t?.trim())return!0;let n=e.name.toLowerCase(),r=e.type.toLowerCase();return t.split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean).some(e=>e.startsWith(`.`)?n.endsWith(e):e.endsWith(`/*`)?r.startsWith(e.slice(0,-1)):r===e)}function T(e,t){let{accept:n,minSizeBytes:r,maxSizeBytes:i,validateFile:a}=t;if(!w(e,n))return{file:e,code:`invalid-type`,details:{}};if(r!==void 0&&e.size<r)return{file:e,code:`too-small`,details:{limitBytes:r}};if(i!==void 0&&e.size>i)return{file:e,code:`too-large`,details:{limitBytes:i}};if(a){let t;try{t=a(e)}catch{t=!1}if(t!==!0)return{file:e,code:`custom`,details:{customMessage:typeof t==`string`?t:void 0}}}}function E({incoming:e,current:t,maxFiles:n,append:r,...i}){let a=r?[...t]:[],o=new Set(a.map(C)),s=[],c=[];for(let t of e){let e=T(t,i);if(e){c.push(e);continue}let r=C(t);if(o.has(r)){c.push({file:t,code:`duplicate`,details:{}});continue}if(a.length>=n){c.push({file:t,code:`too-many`,details:{maxFiles:n}});continue}s.push(t),a.push(t),o.add(r)}return{accepted:s,nextFiles:a,rejections:c}}var D=[];function O({id:n,value:i,defaultValue:a,onValueChange:u,onRejectedFiles:d,multiple:p=!1,maxFiles:m,selectionMode:h,disabled:g=!1,invalid:_=!1,compact:v=!1,label:y,strings:b,hint:C,showList:w=!0,showRejections:T=!0,progress:O,name:A,className:j,"aria-labelledby":M,"aria-describedby":N,"aria-invalid":P,"aria-required":F,...I}){let L={...f,...b},R=(0,s.useId)(),z=n??R,B=(0,s.useRef)(null),V=i!==void 0,[H,U]=(0,s.useState)(a??[]),W=V?i??D:H,[G,K]=(0,s.useState)([]),q=m??(p?1/0:1),J=(h??(p?`append`:`replace`))===`append`,Y=(0,s.useCallback)(e=>{let t=E({incoming:e,current:W,maxFiles:q,append:J,...I});K(t.rejections),t.rejections.length>0&&d?.(t.rejections),(t.accepted.length>0||!J)&&(V||U(t.nextFiles),u?.(t.nextFiles)),B.current&&(B.current.value=``)},[J,I,W,V,d,u,q]),X=(0,s.useRef)(null),Z=(0,s.useRef)(null),Q=(0,s.useCallback)(e=>{let t=W.filter((t,n)=>n!==e);Z.current=e,V||U(t),u?.(t)},[W,V,u]);(0,s.useEffect)(()=>{if(Z.current===null)return;let e=Z.current;Z.current=null;let t=X.current?.querySelectorAll(`[data-remove]`)??[],n=t[Math.min(e,t.length-1)];n?n.focus():B.current?.focus()},[W]);let $=P??(_||void 0),ee=C===void 0?L.constraintHint?.({accept:I.accept,maxSizeBytes:I.maxSizeBytes})||null:C;return(0,c.jsxs)(`div`,{className:(0,l.clsx)(`file-upload--component`,x.root,j),children:[(0,c.jsx)(S,{onDrop:Y,accept:I.accept,multiple:p,disabled:g,invalid:$===!0||$===`true`,compact:v,label:y,hint:ee,strings:{instruction:L.instruction,instructionMultiple:L.instructionMultiple,...L.dragOver?{dragOver:L.dragOver}:null},inputProps:{ref:B,id:z,name:A,"aria-labelledby":M,"aria-describedby":N,"aria-invalid":$,"aria-required":F}}),T&&G.length>0&&(0,c.jsx)(`div`,{className:x.rejections,children:G.map(t=>(0,c.jsx)(e.h,{tone:`destructive`,children:L.rejection(t)},`${t.file.name}-${t.code}`))}),w&&W.length>0&&(0,c.jsx)(`ul`,{ref:X,className:x.list,children:W.map((e,n)=>(0,c.jsxs)(`li`,{className:x.row,children:[(0,c.jsx)(k,{file:e}),(0,c.jsxs)(`div`,{className:x.rowBody,children:[(0,c.jsx)(`span`,{className:x.rowName,children:e.name}),(0,c.jsx)(`span`,{className:x.rowMeta,children:(0,c.jsx)(r.S,{value:e.size})}),O?.[e.name]!==void 0&&(0,c.jsx)(`div`,{className:x.progress,role:`progressbar`,"aria-valuenow":O[e.name],"aria-valuemin":0,"aria-valuemax":100,"aria-label":L.uploading(e.name),children:(0,c.jsx)(`div`,{className:x.progressFill,style:{width:`${O[e.name]}%`}})})]}),(0,c.jsx)(t.c,{tone:`neutral`,buttonStyle:`ghost`,iconOnly:!0,"aria-label":L.remove(e.name),"data-remove":``,disabled:g,onClick:()=>Q(n),children:(0,c.jsx)(o.XIcon,{})})]},`${e.name}-${e.lastModified}`))})]})}function k({file:e}){let t=e.type.startsWith(`image/`),[n]=u(t?[e]:[]);return(0,c.jsx)(`span`,{className:x.thumb,children:t&&n?(0,c.jsx)(d,{src:n,fallback:(0,c.jsx)(o.FileIcon,{"aria-hidden":!0})}):(0,c.jsx)(o.FileIcon,{"aria-hidden":!0})})}function A({value:e,onValueChange:t,onRejectedFiles:n,previewUrl:r,accept:i=`image/*`,...a}){let o=(0,s.useRef)(null),[c,l]=(0,s.useState)(void 0),[d,f]=(0,s.useState)(void 0),[p,m]=(0,s.useState)(r);p!==r&&(m(r),f(void 0));let h=e===void 0?c:e??void 0,[g]=u(h?[h]:[]);return{inputRef:o,accepted:(0,s.useCallback)(r=>{let s=E({incoming:r,current:[],maxFiles:1,append:!1,accept:i,...a}),c=s.accepted[0];c&&(e===void 0&&l(c),t?.(c)),s.rejections.length>0&&n?.(s.rejections),o.current&&(o.current.value=``)},[i,a,n,t,e]),clear:(0,s.useCallback)(()=>{e===void 0&&(l(void 0),f(r)),t?.(void 0)},[t,r,e]),shown:g??(e===void 0&&d===r?null:r)??null,accept:i}}function j({shape:e,emptyIcon:n,emptyLabel:r,overlayLabel:i,removeLabel:a,props:u}){let{id:f,disabled:p,invalid:m,className:h,name:g,"aria-label":_,"aria-labelledby":v,"aria-describedby":y,"aria-invalid":S,"aria-required":C}=u,{inputRef:w,accepted:T,clear:E,shown:D,accept:O}=A(u),{isDragging:k,dropTargetProps:j}=b({disabled:p,onFiles:T}),M=S??(m||void 0),N=(0,s.useId)(),P=f??N;return(0,c.jsxs)(`div`,{className:(0,l.clsx)(e===`avatar`?`avatar-upload--component`:`image-upload--component`,x.mediaRoot,h),children:[(0,c.jsxs)(`div`,{...j,"data-dragging":k||void 0,"data-disabled":p||void 0,"data-filled":D?``:void 0,"data-invalid":M&&M!==`false`||void 0,className:(0,l.clsx)(x.mediaPicker,e===`avatar`?x.avatarPicker:x.imagePicker),children:[(0,c.jsx)(`input`,{ref:w,id:P,type:`file`,name:g,accept:O,disabled:p,"aria-label":_??(D?i:r),"aria-labelledby":v?`${v} ${P}`:void 0,"aria-describedby":y,"aria-invalid":M,"aria-required":C,className:x.dropzoneInput,onChange:e=>{let t=e.target.files;t?.length&&T(Array.from(t)),e.target.value=``}}),D?(0,c.jsx)(d,{src:D,fallback:(0,c.jsx)(`span`,{className:x.mediaEmpty,children:n}),className:x.mediaPreview}):(0,c.jsxs)(`span`,{className:x.mediaEmpty,children:[n,e===`image`&&(0,c.jsx)(`span`,{children:r})]}),(0,c.jsxs)(`span`,{className:x.mediaOverlay,"aria-hidden":!0,children:[(0,c.jsx)(o.PencilIcon,{"aria-hidden":!0}),e===`image`&&(0,c.jsx)(`span`,{children:i})]})]}),D&&!p&&(0,c.jsxs)(t.c,{tone:`neutral`,buttonStyle:`ghost`,onClick:()=>{E(),w.current?.focus()},children:[(0,c.jsx)(o.TrashIcon,{}),a]})]})}function M({strings:e,...t}){let n={...m,...e};return(0,c.jsx)(j,{shape:`avatar`,emptyIcon:(0,c.jsx)(o.UserIcon,{"aria-hidden":!0}),emptyLabel:n.empty,overlayLabel:n.overlay,removeLabel:n.remove,props:t})}function N({strings:e,...t}){let n={...h,...e};return(0,c.jsx)(j,{shape:`image`,emptyIcon:(0,c.jsx)(o.ImageIcon,{"aria-hidden":!0}),emptyLabel:n.empty,overlayLabel:n.overlay,removeLabel:n.remove,props:t})}var P={queued:(0,c.jsx)(o.ClockIcon,{"aria-hidden":!0}),uploading:(0,c.jsx)(o.Loader2Icon,{"aria-hidden":!0}),done:(0,c.jsx)(o.CheckIcon,{"aria-hidden":!0}),error:(0,c.jsx)(o.CircleAlertIcon,{"aria-hidden":!0}),cancelled:(0,c.jsx)(o.XIcon,{"aria-hidden":!0})},F={queued:x.statusQueued,uploading:x.statusUploading,done:x.statusDone,error:x.statusError,cancelled:x.statusCancelled};function I({items:e,onCancel:i,onRetry:u,onRemove:f,strings:p,className:m}){let h=a.t(g,p),_=(0,s.useRef)(new Map),[v,y]=(0,s.useState)(``),b=e.some(e=>e.status===`queued`||e.status===`uploading`),[S,C]=(0,s.useState)(b);return b&&!S&&C(!0),(0,s.useEffect)(()=>{let t=[];for(let n of e){let e=_.current.get(n.id),r=n.status===`done`||n.status===`error`||n.status===`cancelled`;e!==void 0&&e!==n.status&&r&&t.push(h.settled?.(n.name,h.status[n.status])??`${n.name}: ${h.status[n.status]}`)}_.current=new Map(e.map(e=>[e.id,e.status])),t.length>0&&y(t.join(`. `))},[e,h]),e.length===0?null:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(`ul`,{className:(0,l.clsx)(`upload-progress-list--component`,x.list,m),children:e.map(e=>{let n={key:`cancel`,label:h.cancel(e.name),icon:(0,c.jsx)(o.XIcon,{}),run:()=>i?.(e.id)},a={key:`retry`,label:h.retry(e.name),icon:(0,c.jsx)(o.RotateCwIcon,{}),run:()=>u?.(e.id)},s={key:`remove`,label:h.remove(e.name),icon:(0,c.jsx)(o.XIcon,{}),run:()=>f?.(e.id)},p=e.status===`uploading`?i?[n]:[]:e.status===`queued`?i?[n]:f?[s]:[]:e.status===`error`?[...u?[a]:[],...f?[s]:[]]:f?[s]:[];return(0,c.jsxs)(`li`,{className:x.row,children:[e.preview?(0,c.jsx)(`span`,{className:x.thumb,children:(0,c.jsx)(d,{src:e.preview,fallback:(0,c.jsx)(o.FileIcon,{"aria-hidden":!0})})}):(0,c.jsx)(`span`,{className:(0,l.clsx)(x.statusIcon,F[e.status]),"aria-hidden":!0,children:P[e.status]}),(0,c.jsxs)(`div`,{className:x.rowBody,children:[(0,c.jsx)(`span`,{className:x.rowName,children:e.name}),(0,c.jsxs)(`span`,{className:x.rowMeta,children:[h.status[e.status],e.size!==void 0&&(0,c.jsxs)(c.Fragment,{children:[` · `,(0,c.jsx)(r.S,{value:e.size})]})]}),e.status===`uploading`&&(0,c.jsx)(`div`,{className:x.progress,role:`progressbar`,"aria-valuenow":e.progress??0,"aria-valuemin":0,"aria-valuemax":100,"aria-label":h.uploading(e.name),children:(0,c.jsx)(`div`,{className:x.progressFill,style:{width:`${e.progress??0}%`}})}),e.status===`error`&&!!e.error&&(0,c.jsx)(`span`,{className:x.rowError,children:e.error})]}),p.length>0&&(0,c.jsx)(`span`,{className:x.rowActions,children:p.map(e=>(0,c.jsx)(t.c,{tone:`neutral`,buttonStyle:`ghost`,iconOnly:!0,"aria-label":e.label,onClick:e.run,children:e.icon},e.key))})]},e.id)})}),S&&(0,c.jsx)(n.d,{"aria-live":`polite`,children:v})]})}function L({items:e,onAddFiles:n,onCancel:r,onRetry:a,onRemove:o,onClearAll:u,strings:d,showSummary:f=!0,className:p,...m}){let h={..._,...d},g=(0,s.useMemo)(()=>{let t={};for(let n of e)t[n.status]=(t[n.status]??0)+1;return t},[e]),v=[`uploading`,`queued`,`done`,`error`,`cancelled`].filter(e=>g[e]).map(e=>({status:e,count:g[e]}));return(0,c.jsxs)(`div`,{className:(0,l.clsx)(`upload-tray--component`,x.tray,p),children:[(0,c.jsx)(O,{...m,strings:d,multiple:!0,showList:!1,value:[],onValueChange:e=>{e.length>0&&n(e)}}),f&&v.length>0&&(0,c.jsxs)(`div`,{className:x.trayToolbar,children:[(0,c.jsx)(`div`,{className:x.trayCounts,children:v.map(({status:e,count:t})=>(0,c.jsxs)(i.t,{tone:e===`error`?`destructive`:`neutral`,children:[h.status[e],` `,t]},e))}),!!u&&(0,c.jsx)(t.c,{tone:`neutral`,buttonStyle:`ghost`,onClick:u,children:h.clearAll})]}),(0,c.jsx)(I,{items:e,strings:d,onCancel:r,onRetry:a,onRemove:o})]})}var R=[];function z({value:e,defaultValue:n,onValueChange:r,onRejectedFiles:a,maxFiles:f,disabled:m=!1,invalid:h=!1,showCover:g=!0,strings:_,accept:v=`image/*`,...y}){let S={...p,..._},C=e!==void 0,[w,T]=(0,s.useState)(n??[]),D=C?e??R:w,[O,k]=(0,s.useState)(null),[A,j]=(0,s.useState)(null),M=(0,s.useCallback)(e=>{C||T(e),r?.(e)},[C,r]),N=(0,s.useCallback)(e=>{let t=E({incoming:e,current:D,maxFiles:f??1/0,append:!0,accept:v,...y});t.rejections.length>0&&a?.(t.rejections),t.accepted.length>0&&M(t.nextFiles)},[v,M,y,D,f,a]),{isDragging:P,dropTargetProps:F}=b({disabled:m,onFiles:N}),I=(0,s.useCallback)((e,t)=>{if(e===t||t<0||t>=D.length)return;let n=[...D],[r]=n.splice(e,1);r!==void 0&&(n.splice(t,0,r),M(n))},[M,D]),L=u(D),z=(e,t)=>{let n=e.key===`ArrowLeft`?-1:+(e.key===`ArrowRight`);if(n===0)return;e.preventDefault();let r=t+n;I(t,r);let i=e.currentTarget.closest(`[data-gallery]`)?.querySelectorAll(`[data-gallery-tile]`);requestAnimationFrame(()=>i?.[r]?.focus())},B=(e,t)=>{e.preventDefault(),O!==null&&I(O,t),k(null),j(null)},V=f!==void 0&&D.length>=f,H=(0,s.useMemo)(()=>D.map((e,t)=>({file:e,url:L[t]})),[D,L]);return(0,c.jsxs)(`div`,{"data-gallery":``,className:(0,l.clsx)(`media-gallery--component`,x.gallery),children:[H.map(({file:e,url:n},r)=>(0,c.jsxs)(`div`,{className:x.tile,"data-dragging":O===r||void 0,"data-drop":A===r&&O!==null&&O!==r||void 0,onDragOver:e=>{O!==null&&(e.preventDefault(),j(r))},onDrop:e=>B(e,r),onDragEnd:()=>{k(null),j(null)},children:[!!n&&(0,c.jsx)(d,{src:n,fallback:(0,c.jsx)(o.ImageIcon,{"aria-hidden":!0,className:x.tileFallback}),className:x.tileImage}),(0,c.jsx)(`button`,{type:`button`,"data-gallery-tile":``,className:x.tileHandle,"aria-label":S.position(e.name,r+1,D.length),disabled:m,draggable:!m,onDragStart:e=>{k(r),e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,String(r));let t=e.currentTarget.closest(`[data-drop], div`);t&&e.dataTransfer.setDragImage(t,20,20)},onDragEnd:()=>{k(null),j(null)},onKeyDown:e=>z(e,r)}),r===0&&g&&(0,c.jsx)(i.t,{tone:`neutral`,className:x.tileCover,children:S.cover}),(0,c.jsx)(t.c,{tone:`neutral`,buttonStyle:`solid`,iconOnly:!0,className:x.tileRemove,"aria-label":S.remove(e.name),disabled:m,onClick:()=>M(D.filter((e,t)=>t!==r)),children:(0,c.jsx)(o.XIcon,{})})]},`${e.name}-${e.lastModified}-${r}`)),!V&&(0,c.jsxs)(`label`,{...F,"data-dragging":P||void 0,"data-disabled":m||void 0,"aria-invalid":h||void 0,className:x.galleryAdd,children:[(0,c.jsx)(`input`,{type:`file`,accept:v,multiple:!0,disabled:m,className:x.dropzoneInput,onChange:e=>{let t=e.target.files;t?.length&&N(Array.from(t)),e.target.value=``}}),(0,c.jsx)(o.ImagePlusIcon,{"aria-hidden":!0}),(0,c.jsx)(`span`,{children:S.add})]})]})}function B({value:e,onValueChange:n,onRejectedFiles:i,constraints:a={},disabled:u=!1,invalid:d=!1,name:f,strings:p,className:m,...h}){let g={...y,...p},_=(0,s.useRef)(null),[v,b]=(0,s.useState)(void 0),S=e===void 0?v:e??void 0,C=(0,s.useCallback)(t=>{let r=E({incoming:t,current:[],maxFiles:1,append:!1,...a});r.rejections.length>0&&i?.(r.rejections);let o=r.accepted[0];o&&(e===void 0&&b(o),n?.(o)),_.current&&(_.current.value=``)},[a,i,n,e]);return(0,c.jsxs)(`div`,{"data-field-shell":``,"data-disabled":u||void 0,"aria-invalid":d||void 0,className:(0,l.clsx)(`file-picker-input--component`,x.pickerShell,m),...h,children:[(0,c.jsx)(`input`,{ref:_,type:`file`,name:f,accept:a.accept,disabled:u,"aria-label":S?S.name:g.empty,className:x.dropzoneInput,onChange:e=>{let t=e.target.files;t?.length&&C(Array.from(t))}}),(0,c.jsx)(o.PaperclipIcon,{"aria-hidden":!0,className:x.pickerIcon}),(0,c.jsx)(`span`,{className:(0,l.clsx)(x.pickerLabel,!S&&x.pickerEmpty),children:S?S.name:g.empty}),!!S&&(0,c.jsx)(`span`,{className:x.pickerMeta,children:(0,c.jsx)(r.S,{value:S.size})}),!!S&&!u&&(0,c.jsx)(t.c,{tone:`neutral`,buttonStyle:`ghost`,iconOnly:!0,"aria-label":g.clear,className:x.pickerClear,onClick:()=>{e===void 0&&b(void 0),n?.(void 0)},children:(0,c.jsx)(o.XIcon,{})})]})}Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return d}});
1
+ const e=require("./feedback-IpUFKqgv.cjs"),t=require("./buttons-Dwl42fIr.cjs"),n=require("./display-CFj87iEn.cjs"),r=require("./primitives-kywiHMJE.cjs"),i=require("./badge-BRX7GXRH.cjs"),a=require("./strings-BiKL6k6b.cjs");let o=require("lucide-react"),s=require("react"),c=require("react/jsx-runtime"),l=require("clsx");function u(e){let[t,n]=(0,s.useState)([]),r=(0,s.useRef)([]),i=(0,s.useRef)([]);return(0,s.useEffect)(()=>{if(e.length===r.current.length&&e.every((e,t)=>e===r.current[t]))return;r.current=e;let t=i.current;i.current=e.map(e=>URL.createObjectURL(e)),n(i.current);for(let e of t)URL.revokeObjectURL(e)},[e]),(0,s.useEffect)(()=>()=>{for(let e of i.current)URL.revokeObjectURL(e);i.current=[],r.current=[]},[]),t}function d({src:e,alt:t=``,fallback:n,className:r}){let[i,a]=(0,s.useState)(!1),[o,u]=(0,s.useState)(e);return e!==o&&(u(e),a(!1)),i?(0,c.jsx)(c.Fragment,{children:n}):(0,c.jsx)(`img`,{src:e,alt:t,className:(0,l.clsx)(`preview-image--component`,r),onError:()=>a(!0)})}var f={instruction:`Drop a file here, or browse`,instructionMultiple:`Drop files here, or browse`,uploading:e=>`Uploading ${e}`,remove:e=>`Remove ${e}`,rejection:({file:e,code:t,details:n})=>{switch(t){case`invalid-type`:return`${e.name} is not an accepted file type.`;case`too-small`:return`${e.name} is smaller than ${r.C(n.limitBytes??0)}.`;case`too-large`:return`${e.name} is larger than ${r.C(n.limitBytes??0)}.`;case`duplicate`:return`${e.name} has already been added.`;case`too-many`:return`${e.name} exceeds the limit of ${n.maxFiles??0} file${n.maxFiles===1?``:`s`}.`;default:return n.customMessage??`${e.name} was rejected.`}},constraintHint:({accept:e,maxSizeBytes:t})=>[e,t===void 0?void 0:`up to ${Math.round(t/1024/1024)} MB`].filter(Boolean).join(` · `)},p={cover:`Cover`,add:`Add images`,position:(e,t,n)=>`${e}, position ${t} of ${n}. Use the arrow keys to reorder.`,remove:e=>`Remove ${e}`},m={empty:`Add a photo`,overlay:`Change photo`,remove:`Remove photo`},h={empty:`Drop an image here, or browse`,overlay:`Change image`,remove:`Remove image`},g={status:{queued:`Queued`,uploading:`Uploading`,done:`Uploaded`,error:`Failed`,cancelled:`Cancelled`},cancel:e=>`Cancel ${e}`,retry:e=>`Retry ${e}`,remove:e=>`Remove ${e}`,uploading:e=>`Uploading ${e}`,settled:(e,t)=>`${e}: ${t}`},_={...f,...g,clearAll:`Clear all`},v={instruction:`Drop a file here, or browse`,instructionMultiple:`Drop files here, or browse`,dragOver:`Release to add`,helper:``},y={empty:`No file chosen`,clear:`Remove file`};function b({disabled:e=!1,onFiles:t}){let n=(0,s.useRef)(0),[r,i]=(0,s.useState)(!1),a=r&&!e,o=(0,s.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]);return{isDragging:a,dropTargetProps:{onDragEnter:(0,s.useCallback)(t=>{if(o(t),e){n.current=0;return}n.current+=1,i(!0)},[e,o]),onDragOver:(0,s.useCallback)(t=>{o(t),!e&&(t.dataTransfer&&(t.dataTransfer.dropEffect=`copy`),i(!0))},[e,o]),onDragLeave:(0,s.useCallback)(e=>{o(e),n.current=Math.max(0,n.current-1),n.current===0&&i(!1)},[o]),onDrop:(0,s.useCallback)(r=>{if(o(r),n.current=0,i(!1),e)return;let a=r.dataTransfer?.files;a?.length&&t(Array.from(a))},[e,t,o])}}}var x={dropzone:`upload__dropzone___18PHm`,dropzoneCompact:`upload__dropzoneCompact___lO1Y2`,dropzoneInput:`upload__dropzoneInput___OSLjX`,dropzoneIcon:`upload__dropzoneIcon___dEbuz`,dropzoneCopy:`upload__dropzoneCopy___FGRl_`,dropzoneText:`upload__dropzoneText___fG9Sv`,dropzoneHint:`upload__dropzoneHint____aACx`,list:`upload__list___54BTe`,row:`upload__row___6TE2T`,rowActions:`upload__rowActions___fgMkU`,thumb:`upload__thumb___I7oD7`,statusIcon:`upload__statusIcon___VRRk3`,rowBody:`upload__rowBody___51jrN`,rowName:`upload__rowName____3TMo`,rowMeta:`upload__rowMeta___NlE7h`,progress:`upload__progress___sfhZY`,progressFill:`upload__progressFill___PXFlt`,root:`upload__root___TLif3`,rejections:`upload__rejections___VTeCm`,mediaRoot:`upload__mediaRoot___yS2ko`,mediaPicker:`upload__mediaPicker___eVcZk`,avatarPicker:`upload__avatarPicker___rAikO`,imagePicker:`upload__imagePicker___zDNWf`,mediaPreview:`upload__mediaPreview___BS0TO`,mediaOverlay:`upload__mediaOverlay___diadO`,mediaEmpty:`upload__mediaEmpty___5M65A`,tray:`upload__tray___u741N`,trayToolbar:`upload__trayToolbar___NmrU5`,trayCounts:`upload__trayCounts___hrAmS`,statusQueued:`upload__statusQueued___CMIPL`,statusUploading:`upload__statusUploading___ec2M2`,statusDone:`upload__statusDone___MW_Za`,statusError:`upload__statusError___kutx4`,statusCancelled:`upload__statusCancelled___JKMmC`,rowError:`upload__rowError___X8Aj2`,gallery:`upload__gallery___1UoHk`,tile:`upload__tile___8-XgU`,tileImage:`upload__tileImage___pT1Rk`,tileFallback:`upload__tileFallback___h-Jsc`,tileHandle:`upload__tileHandle___ulbFv`,tileRemove:`upload__tileRemove___JQHnl`,tileCover:`upload__tileCover___0TJt3`,galleryAdd:`upload__galleryAdd___CGqBt`,pickerShell:`upload__pickerShell___25oaj`,pickerIcon:`upload__pickerIcon___v0eFJ`,pickerLabel:`upload__pickerLabel___tY20Z`,pickerEmpty:`upload__pickerEmpty___Ql3p-`,pickerMeta:`upload__pickerMeta___0fZCN`,pickerClear:`upload__pickerClear___Rf83M`,dropzoneFooter:`upload__dropzoneFooter___q6ETS`};function S({onDrop:e,accept:t,multiple:n=!1,disabled:r=!1,invalid:i=!1,compact:a=!1,icon:u,inputProps:d,strings:f,label:p,hint:m,footer:h,className:g,..._}){let y={...v,...f},S=(0,s.useId)(),C=d?.id??S,w=`${S}-prompt`,{isDragging:T,dropTargetProps:E}=b({disabled:r,onFiles:e}),D=T?y.dragOver:p??(n?y.instructionMultiple:y.instruction),O=m===void 0?y.helper:m,k=d?.[`aria-labelledby`];return(0,c.jsxs)(`div`,{className:(0,l.clsx)(`dropzone--component`,g),..._,children:[(0,c.jsxs)(`label`,{htmlFor:C,...E,"data-slot":`dropzone`,"data-dragging":T||void 0,"data-disabled":r||void 0,"data-invalid":i||void 0,className:(0,l.clsx)(x.dropzone,a&&x.dropzoneCompact),children:[(0,c.jsx)(`input`,{"aria-invalid":i||void 0,...d,"aria-labelledby":k?`${k} ${w}`:void 0,id:C,type:`file`,accept:t,multiple:n,disabled:r,className:(0,l.clsx)(x.dropzoneInput,d?.className),onChange:t=>{let n=t.target.files;n?.length&&e(Array.from(n)),t.target.value=``}}),u??(0,c.jsx)(o.UploadCloudIcon,{"aria-hidden":!0,className:x.dropzoneIcon}),(0,c.jsxs)(`span`,{className:x.dropzoneCopy,children:[(0,c.jsx)(`span`,{id:w,className:x.dropzoneText,children:D}),O!=null&&O!==``&&(0,c.jsx)(`span`,{className:x.dropzoneHint,children:O})]})]}),!!h&&(0,c.jsx)(`div`,{className:x.dropzoneFooter,children:h})]})}function C(e){return[e.name,e.size,e.type,e.lastModified].join(`|`)}function w(e,t){if(!t?.trim())return!0;let n=e.name.toLowerCase(),r=e.type.toLowerCase();return t.split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean).some(e=>e.startsWith(`.`)?n.endsWith(e):e.endsWith(`/*`)?r.startsWith(e.slice(0,-1)):r===e)}function T(e,t){let{accept:n,minSizeBytes:r,maxSizeBytes:i,validateFile:a}=t;if(!w(e,n))return{file:e,code:`invalid-type`,details:{}};if(r!==void 0&&e.size<r)return{file:e,code:`too-small`,details:{limitBytes:r}};if(i!==void 0&&e.size>i)return{file:e,code:`too-large`,details:{limitBytes:i}};if(a){let t;try{t=a(e)}catch{t=!1}if(t!==!0)return{file:e,code:`custom`,details:{customMessage:typeof t==`string`?t:void 0}}}}function E({incoming:e,current:t,maxFiles:n,append:r,...i}){let a=r?[...t]:[],o=new Set(a.map(C)),s=[],c=[];for(let t of e){let e=T(t,i);if(e){c.push(e);continue}let r=C(t);if(o.has(r)){c.push({file:t,code:`duplicate`,details:{}});continue}if(a.length>=n){c.push({file:t,code:`too-many`,details:{maxFiles:n}});continue}s.push(t),a.push(t),o.add(r)}return{accepted:s,nextFiles:a,rejections:c}}var D=[];function O({id:n,value:i,defaultValue:a,onValueChange:u,onRejectedFiles:d,multiple:p=!1,maxFiles:m,selectionMode:h,disabled:g=!1,invalid:_=!1,compact:v=!1,label:y,strings:b,hint:C,showList:w=!0,showRejections:T=!0,progress:O,name:A,className:j,"aria-labelledby":M,"aria-describedby":N,"aria-invalid":P,"aria-required":F,...I}){let L={...f,...b},R=(0,s.useId)(),z=n??R,B=(0,s.useRef)(null),V=i!==void 0,[H,U]=(0,s.useState)(a??[]),W=V?i??D:H,[G,K]=(0,s.useState)([]),q=m??(p?1/0:1),J=(h??(p?`append`:`replace`))===`append`,Y=(0,s.useCallback)(e=>{let t=E({incoming:e,current:W,maxFiles:q,append:J,...I});K(t.rejections),t.rejections.length>0&&d?.(t.rejections),(t.accepted.length>0||!J)&&(V||U(t.nextFiles),u?.(t.nextFiles)),B.current&&(B.current.value=``)},[J,I,W,V,d,u,q]),X=(0,s.useRef)(null),Z=(0,s.useRef)(null),Q=(0,s.useCallback)(e=>{let t=W.filter((t,n)=>n!==e);Z.current=e,V||U(t),u?.(t)},[W,V,u]);(0,s.useEffect)(()=>{if(Z.current===null)return;let e=Z.current;Z.current=null;let t=X.current?.querySelectorAll(`[data-remove]`)??[],n=t[Math.min(e,t.length-1)];n?n.focus():B.current?.focus()},[W]);let $=P??(_||void 0),ee=C===void 0?L.constraintHint?.({accept:I.accept,maxSizeBytes:I.maxSizeBytes})||null:C;return(0,c.jsxs)(`div`,{className:(0,l.clsx)(`file-upload--component`,x.root,j),children:[(0,c.jsx)(S,{onDrop:Y,accept:I.accept,multiple:p,disabled:g,invalid:$===!0||$===`true`,compact:v,label:y,hint:ee,strings:{instruction:L.instruction,instructionMultiple:L.instructionMultiple,...L.dragOver?{dragOver:L.dragOver}:null},inputProps:{ref:B,id:z,name:A,"aria-labelledby":M,"aria-describedby":N,"aria-invalid":$,"aria-required":F}}),T&&G.length>0&&(0,c.jsx)(`div`,{className:x.rejections,children:G.map(t=>(0,c.jsx)(e.h,{tone:`destructive`,children:L.rejection(t)},`${t.file.name}-${t.code}`))}),w&&W.length>0&&(0,c.jsx)(`ul`,{ref:X,className:x.list,children:W.map((e,n)=>(0,c.jsxs)(`li`,{className:x.row,children:[(0,c.jsx)(k,{file:e}),(0,c.jsxs)(`div`,{className:x.rowBody,children:[(0,c.jsx)(`span`,{className:x.rowName,children:e.name}),(0,c.jsx)(`span`,{className:x.rowMeta,children:(0,c.jsx)(r.S,{value:e.size})}),O?.[e.name]!==void 0&&(0,c.jsx)(`div`,{className:x.progress,role:`progressbar`,"aria-valuenow":O[e.name],"aria-valuemin":0,"aria-valuemax":100,"aria-label":L.uploading(e.name),children:(0,c.jsx)(`div`,{className:x.progressFill,style:{width:`${O[e.name]}%`}})})]}),(0,c.jsx)(t.c,{tone:`neutral`,buttonStyle:`ghost`,iconOnly:!0,"aria-label":L.remove(e.name),"data-remove":``,disabled:g,onClick:()=>Q(n),children:(0,c.jsx)(o.XIcon,{})})]},`${e.name}-${e.lastModified}`))})]})}function k({file:e}){let t=e.type.startsWith(`image/`),[n]=u(t?[e]:[]);return(0,c.jsx)(`span`,{className:x.thumb,children:t&&n?(0,c.jsx)(d,{src:n,fallback:(0,c.jsx)(o.FileIcon,{"aria-hidden":!0})}):(0,c.jsx)(o.FileIcon,{"aria-hidden":!0})})}function A({value:e,onValueChange:t,onRejectedFiles:n,previewUrl:r,accept:i=`image/*`,...a}){let o=(0,s.useRef)(null),[c,l]=(0,s.useState)(void 0),[d,f]=(0,s.useState)(void 0),[p,m]=(0,s.useState)(r);p!==r&&(m(r),f(void 0));let h=e===void 0?c:e??void 0,[g]=u(h?[h]:[]);return{inputRef:o,accepted:(0,s.useCallback)(r=>{let s=E({incoming:r,current:[],maxFiles:1,append:!1,accept:i,...a}),c=s.accepted[0];c&&(e===void 0&&l(c),t?.(c)),s.rejections.length>0&&n?.(s.rejections),o.current&&(o.current.value=``)},[i,a,n,t,e]),clear:(0,s.useCallback)(()=>{e===void 0&&(l(void 0),f(r)),t?.(void 0)},[t,r,e]),shown:g??(e===void 0&&d===r?null:r)??null,accept:i}}function j({shape:e,emptyIcon:n,emptyLabel:r,overlayLabel:i,removeLabel:a,props:u}){let{id:f,disabled:p,invalid:m,className:h,name:g,"aria-label":_,"aria-labelledby":v,"aria-describedby":y,"aria-invalid":S,"aria-required":C}=u,{inputRef:w,accepted:T,clear:E,shown:D,accept:O}=A(u),{isDragging:k,dropTargetProps:j}=b({disabled:p,onFiles:T}),M=S??(m||void 0),N=(0,s.useId)(),P=f??N;return(0,c.jsxs)(`div`,{className:(0,l.clsx)(e===`avatar`?`avatar-upload--component`:`image-upload--component`,x.mediaRoot,h),children:[(0,c.jsxs)(`div`,{...j,"data-dragging":k||void 0,"data-disabled":p||void 0,"data-filled":D?``:void 0,"data-invalid":M&&M!==`false`||void 0,className:(0,l.clsx)(x.mediaPicker,e===`avatar`?x.avatarPicker:x.imagePicker),children:[(0,c.jsx)(`input`,{ref:w,id:P,type:`file`,name:g,accept:O,disabled:p,"aria-label":_??(D?i:r),"aria-labelledby":v?`${v} ${P}`:void 0,"aria-describedby":y,"aria-invalid":M,"aria-required":C,className:x.dropzoneInput,onChange:e=>{let t=e.target.files;t?.length&&T(Array.from(t)),e.target.value=``}}),D?(0,c.jsx)(d,{src:D,fallback:(0,c.jsx)(`span`,{className:x.mediaEmpty,children:n}),className:x.mediaPreview}):(0,c.jsxs)(`span`,{className:x.mediaEmpty,children:[n,e===`image`&&(0,c.jsx)(`span`,{children:r})]}),(0,c.jsxs)(`span`,{className:x.mediaOverlay,"aria-hidden":!0,children:[(0,c.jsx)(o.PencilIcon,{"aria-hidden":!0}),e===`image`&&(0,c.jsx)(`span`,{children:i})]})]}),D&&!p&&(0,c.jsxs)(t.c,{tone:`neutral`,buttonStyle:`ghost`,onClick:()=>{E(),w.current?.focus()},children:[(0,c.jsx)(o.TrashIcon,{}),a]})]})}function M({strings:e,...t}){let n={...m,...e};return(0,c.jsx)(j,{shape:`avatar`,emptyIcon:(0,c.jsx)(o.UserIcon,{"aria-hidden":!0}),emptyLabel:n.empty,overlayLabel:n.overlay,removeLabel:n.remove,props:t})}function N({strings:e,...t}){let n={...h,...e};return(0,c.jsx)(j,{shape:`image`,emptyIcon:(0,c.jsx)(o.ImageIcon,{"aria-hidden":!0}),emptyLabel:n.empty,overlayLabel:n.overlay,removeLabel:n.remove,props:t})}var P={queued:(0,c.jsx)(o.ClockIcon,{"aria-hidden":!0}),uploading:(0,c.jsx)(o.Loader2Icon,{"aria-hidden":!0}),done:(0,c.jsx)(o.CheckIcon,{"aria-hidden":!0}),error:(0,c.jsx)(o.CircleAlertIcon,{"aria-hidden":!0}),cancelled:(0,c.jsx)(o.XIcon,{"aria-hidden":!0})},F={queued:x.statusQueued,uploading:x.statusUploading,done:x.statusDone,error:x.statusError,cancelled:x.statusCancelled};function I({items:e,onCancel:i,onRetry:u,onRemove:f,strings:p,className:m}){let h=a.t(g,p),_=(0,s.useRef)(new Map),[v,y]=(0,s.useState)(``),b=e.some(e=>e.status===`queued`||e.status===`uploading`),[S,C]=(0,s.useState)(b);return b&&!S&&C(!0),(0,s.useEffect)(()=>{let t=[];for(let n of e){let e=_.current.get(n.id),r=n.status===`done`||n.status===`error`||n.status===`cancelled`;e!==void 0&&e!==n.status&&r&&t.push(h.settled?.(n.name,h.status[n.status])??`${n.name}: ${h.status[n.status]}`)}_.current=new Map(e.map(e=>[e.id,e.status])),t.length>0&&y(t.join(`. `))},[e,h]),e.length===0?null:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(`ul`,{className:(0,l.clsx)(`upload-progress-list--component`,x.list,m),children:e.map(e=>{let n={key:`cancel`,label:h.cancel(e.name),icon:(0,c.jsx)(o.XIcon,{}),run:()=>i?.(e.id)},a={key:`retry`,label:h.retry(e.name),icon:(0,c.jsx)(o.RotateCwIcon,{}),run:()=>u?.(e.id)},s={key:`remove`,label:h.remove(e.name),icon:(0,c.jsx)(o.XIcon,{}),run:()=>f?.(e.id)},p=e.status===`uploading`?i?[n]:[]:e.status===`queued`?i?[n]:f?[s]:[]:e.status===`error`?[...u?[a]:[],...f?[s]:[]]:f?[s]:[];return(0,c.jsxs)(`li`,{className:x.row,children:[e.preview?(0,c.jsx)(`span`,{className:x.thumb,children:(0,c.jsx)(d,{src:e.preview,fallback:(0,c.jsx)(o.FileIcon,{"aria-hidden":!0})})}):(0,c.jsx)(`span`,{className:(0,l.clsx)(x.statusIcon,F[e.status]),"aria-hidden":!0,children:P[e.status]}),(0,c.jsxs)(`div`,{className:x.rowBody,children:[(0,c.jsx)(`span`,{className:x.rowName,children:e.name}),(0,c.jsxs)(`span`,{className:x.rowMeta,children:[h.status[e.status],e.size!==void 0&&(0,c.jsxs)(c.Fragment,{children:[` · `,(0,c.jsx)(r.S,{value:e.size})]})]}),e.status===`uploading`&&(0,c.jsx)(`div`,{className:x.progress,role:`progressbar`,"aria-valuenow":e.progress??0,"aria-valuemin":0,"aria-valuemax":100,"aria-label":h.uploading(e.name),children:(0,c.jsx)(`div`,{className:x.progressFill,style:{width:`${e.progress??0}%`}})}),e.status===`error`&&!!e.error&&(0,c.jsx)(`span`,{className:x.rowError,children:e.error})]}),p.length>0&&(0,c.jsx)(`span`,{className:x.rowActions,children:p.map(e=>(0,c.jsx)(t.c,{tone:`neutral`,buttonStyle:`ghost`,iconOnly:!0,"aria-label":e.label,onClick:e.run,children:e.icon},e.key))})]},e.id)})}),S&&(0,c.jsx)(n.d,{"aria-live":`polite`,children:v})]})}function L({items:e,onAddFiles:n,onCancel:r,onRetry:a,onRemove:o,onClearAll:u,strings:d,showSummary:f=!0,className:p,...m}){let h={..._,...d},g=(0,s.useMemo)(()=>{let t={};for(let n of e)t[n.status]=(t[n.status]??0)+1;return t},[e]),v=[`uploading`,`queued`,`done`,`error`,`cancelled`].filter(e=>g[e]).map(e=>({status:e,count:g[e]}));return(0,c.jsxs)(`div`,{className:(0,l.clsx)(`upload-tray--component`,x.tray,p),children:[(0,c.jsx)(O,{...m,strings:d,multiple:!0,showList:!1,value:[],onValueChange:e=>{e.length>0&&n(e)}}),f&&v.length>0&&(0,c.jsxs)(`div`,{className:x.trayToolbar,children:[(0,c.jsx)(`div`,{className:x.trayCounts,children:v.map(({status:e,count:t})=>(0,c.jsxs)(i.t,{tone:e===`error`?`destructive`:`neutral`,children:[h.status[e],` `,t]},e))}),!!u&&(0,c.jsx)(t.c,{tone:`neutral`,buttonStyle:`ghost`,onClick:u,children:h.clearAll})]}),(0,c.jsx)(I,{items:e,strings:d,onCancel:r,onRetry:a,onRemove:o})]})}var R=[];function z({value:e,defaultValue:n,onValueChange:r,onRejectedFiles:a,maxFiles:f,disabled:m=!1,invalid:h=!1,showCover:g=!0,strings:_,accept:v=`image/*`,...y}){let S={...p,..._},C=e!==void 0,[w,T]=(0,s.useState)(n??[]),D=C?e??R:w,[O,k]=(0,s.useState)(null),[A,j]=(0,s.useState)(null),M=(0,s.useCallback)(e=>{C||T(e),r?.(e)},[C,r]),N=(0,s.useCallback)(e=>{let t=E({incoming:e,current:D,maxFiles:f??1/0,append:!0,accept:v,...y});t.rejections.length>0&&a?.(t.rejections),t.accepted.length>0&&M(t.nextFiles)},[v,M,y,D,f,a]),{isDragging:P,dropTargetProps:F}=b({disabled:m,onFiles:N}),I=(0,s.useCallback)((e,t)=>{if(e===t||t<0||t>=D.length)return;let n=[...D],[r]=n.splice(e,1);r!==void 0&&(n.splice(t,0,r),M(n))},[M,D]),L=u(D),z=(e,t)=>{let n=e.key===`ArrowLeft`?-1:+(e.key===`ArrowRight`);if(n===0)return;e.preventDefault();let r=t+n;I(t,r);let i=e.currentTarget.closest(`[data-gallery]`)?.querySelectorAll(`[data-gallery-tile]`);requestAnimationFrame(()=>i?.[r]?.focus())},B=(e,t)=>{e.preventDefault(),O!==null&&I(O,t),k(null),j(null)},V=f!==void 0&&D.length>=f,H=(0,s.useMemo)(()=>D.map((e,t)=>({file:e,url:L[t]})),[D,L]);return(0,c.jsxs)(`div`,{"data-gallery":``,className:(0,l.clsx)(`media-gallery--component`,x.gallery),children:[H.map(({file:e,url:n},r)=>(0,c.jsxs)(`div`,{className:x.tile,"data-dragging":O===r||void 0,"data-drop":A===r&&O!==null&&O!==r||void 0,onDragOver:e=>{O!==null&&(e.preventDefault(),j(r))},onDrop:e=>B(e,r),onDragEnd:()=>{k(null),j(null)},children:[!!n&&(0,c.jsx)(d,{src:n,fallback:(0,c.jsx)(o.ImageIcon,{"aria-hidden":!0,className:x.tileFallback}),className:x.tileImage}),(0,c.jsx)(`button`,{type:`button`,"data-gallery-tile":``,className:x.tileHandle,"aria-label":S.position(e.name,r+1,D.length),disabled:m,draggable:!m,onDragStart:e=>{k(r),e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,String(r));let t=e.currentTarget.closest(`[data-drop], div`);t&&e.dataTransfer.setDragImage(t,20,20)},onDragEnd:()=>{k(null),j(null)},onKeyDown:e=>z(e,r)}),r===0&&g&&(0,c.jsx)(i.t,{tone:`neutral`,className:x.tileCover,children:S.cover}),(0,c.jsx)(t.c,{tone:`neutral`,buttonStyle:`solid`,iconOnly:!0,className:x.tileRemove,"aria-label":S.remove(e.name),disabled:m,onClick:()=>M(D.filter((e,t)=>t!==r)),children:(0,c.jsx)(o.XIcon,{})})]},`${e.name}-${e.lastModified}-${r}`)),!V&&(0,c.jsxs)(`label`,{...F,"data-dragging":P||void 0,"data-disabled":m||void 0,"aria-invalid":h||void 0,className:x.galleryAdd,children:[(0,c.jsx)(`input`,{type:`file`,accept:v,multiple:!0,disabled:m,className:x.dropzoneInput,onChange:e=>{let t=e.target.files;t?.length&&N(Array.from(t)),e.target.value=``}}),(0,c.jsx)(o.ImagePlusIcon,{"aria-hidden":!0}),(0,c.jsx)(`span`,{children:S.add})]})]})}function B({value:e,onValueChange:n,onRejectedFiles:i,constraints:a={},disabled:u=!1,invalid:d=!1,name:f,strings:p,className:m,...h}){let g={...y,...p},_=(0,s.useRef)(null),[v,b]=(0,s.useState)(void 0),S=e===void 0?v:e??void 0,C=(0,s.useCallback)(t=>{let r=E({incoming:t,current:[],maxFiles:1,append:!1,...a});r.rejections.length>0&&i?.(r.rejections);let o=r.accepted[0];o&&(e===void 0&&b(o),n?.(o)),_.current&&(_.current.value=``)},[a,i,n,e]);return(0,c.jsxs)(`div`,{"data-field-shell":``,"data-disabled":u||void 0,"aria-invalid":d||void 0,className:(0,l.clsx)(`file-picker-input--component`,x.pickerShell,m),...h,children:[(0,c.jsx)(`input`,{ref:_,type:`file`,name:f,accept:a.accept,disabled:u,"aria-label":S?S.name:g.empty,className:x.dropzoneInput,onChange:e=>{let t=e.target.files;t?.length&&C(Array.from(t))}}),(0,c.jsx)(o.PaperclipIcon,{"aria-hidden":!0,className:x.pickerIcon}),(0,c.jsx)(`span`,{className:(0,l.clsx)(x.pickerLabel,!S&&x.pickerEmpty),children:S?S.name:g.empty}),!!S&&(0,c.jsx)(`span`,{className:x.pickerMeta,children:(0,c.jsx)(r.S,{value:S.size})}),!!S&&!u&&(0,c.jsx)(t.c,{tone:`neutral`,buttonStyle:`ghost`,iconOnly:!0,"aria-label":g.clear,className:x.pickerClear,onClick:()=>{e===void 0&&b(void 0),n?.(void 0)},children:(0,c.jsx)(o.XIcon,{})})]})}Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return d}});
@@ -1,9 +1,9 @@
1
1
  import "./css/upload.css";
2
2
  import { t as e } from "./cx--CBrhWH0.js";
3
- import { h as t } from "./feedback-BmquisO3.js";
4
- import { c as n } from "./buttons-Corm-KHK.js";
5
- import { d as r } from "./display-DVhYS75K.js";
6
- import { C as i, S as a } from "./primitives-B2aeaudR.js";
3
+ import { h as t } from "./feedback-C8QtkdHc.js";
4
+ import { c as n } from "./buttons-riLAPVQV.js";
5
+ import { d as r } from "./display-Dehpw83R.js";
6
+ import { C as i, S as a } from "./primitives-BnXNg-Kr.js";
7
7
  import { t as o } from "./badge-D34FkKLD.js";
8
8
  import { t as s } from "./strings-Co9_qArR.js";
9
9
  import { CheckIcon as c, CircleAlertIcon as l, ClockIcon as u, FileIcon as d, ImageIcon as f, ImagePlusIcon as p, Loader2Icon as m, PaperclipIcon as h, PencilIcon as g, RotateCwIcon as _, TrashIcon as v, UploadCloudIcon as y, UserIcon as b, XIcon as x } from "lucide-react";
@@ -1 +1 @@
1
- const e=require("./rolldown-runtime-BocRIvOZ.cjs"),t=require("./typography-LMez-POJ.cjs"),n=require("./display-BUiiuPS9.cjs"),r=require("./structure-CXTLV2t8.cjs"),i=require("./text-inputs-D4w3Z2-F.cjs"),a=require("./choice-inputs-CySnLjfA.cjs"),o=require("./date-pickers-C6rE7fLo.cjs");let s=require("lucide-react"),c=require("react");c=e.t(c,1);let l=require("react/jsx-runtime"),u=require("@base-ui/react/slider"),d=require("@base-ui/react/field"),f=require("culori"),p=require("clsx");var m={thumb:e=>e===0?`Minimum`:`Maximum`,label:`Value`},h={...i.d,picker:`Choose a colour`},g={...i.d,prefixPlaceholder:`Code`,prefix:`Country dial code`},_={...i.d,clearAll:`Clear all`,removeTag:e=>`Remove ${e}`,notAdded:e=>`Not added: ${e}.`,placeholder:`Add a tag…`},v={sliderRoot:`value-inputs__sliderRoot___TVz5X`,slider:`value-inputs__slider___Jn7Np`,sliderControl:`value-inputs__sliderControl___5mXkK`,sliderThumb:`value-inputs__sliderThumb___PA1oN`,sliderTrack:`value-inputs__sliderTrack___OZ4qQ`,sliderRange:`value-inputs__sliderRange___qgdN0`,sliderMd:`value-inputs__sliderMd___V1S23`,sliderValue:`value-inputs__sliderValue___Jcfq4`,tagsShell:`value-inputs__tagsShell___R-B11`,tag:`value-inputs__tag___6Ch0s`,tagRemove:`value-inputs__tagRemove___vPeFa`,tagsInput:`value-inputs__tagsInput___88_8P`,tagsFooter:`value-inputs__tagsFooter___dEqPc`,tagsOverLimit:`value-inputs__tagsOverLimit___i3u32`,tagsClear:`value-inputs__tagsClear___DpqXx`,colorRoot:`value-inputs__colorRoot___4TlRL`,colorPicker:`value-inputs__colorPicker___oCBbz`,colorNative:`value-inputs__colorNative___M0EBv`,colorSwatch:`value-inputs__colorSwatch___IKK_t`,colorText:`value-inputs__colorText___t1CW9`,phoneRoot:`value-inputs__phoneRoot___H2Jvj`,phonePrefix:`value-inputs__phonePrefix___f5PTY`,phoneNumber:`value-inputs__phoneNumber___vIwkj`},y=(0,c.forwardRef)(function({name:e,id:n,value:r,defaultValue:i,min:a=0,max:o=100,step:s=1,disabled:f=!1,invalid:h=!1,orientation:g=`horizontal`,size:_=`sm`,onChange:y,onValueChange:b,onValueCommitted:x,showValue:S=!1,formatValue:C,unit:w,className:T,"aria-label":E,"aria-labelledby":D,"aria-describedby":O,"aria-invalid":k,strings:A},j){let M={...m,...A},N=E??M.label,P=(0,c.useId)(),F=n??P,I=e??F,L=r??i,R=Array.isArray(L),z=((e,t)=>e===void 0?[t]:Array.isArray(e)?e:[e])(L,a),B=e=>C?C(e):w?`${e}${w}`:String(e);return(0,l.jsx)(d.Field.Root,{invalid:h||k!==void 0&&k!==!1&&k!==`false`,"data-size":_,className:(0,p.clsx)(`slider--component`,v.sliderRoot,_===`md`&&v.sliderMd,T),children:(0,l.jsxs)(u.Slider.Root,{ref:j,id:F,name:e,"aria-label":D?void 0:N,"aria-labelledby":D,"aria-describedby":O,"aria-invalid":h||k||void 0,value:r,defaultValue:i??a,min:a,max:o,step:s,disabled:f,orientation:g,onValueChange:e=>{b?.(e),y?.({target:{name:I,value:e}})},onValueCommitted:e=>x?.(e),className:v.slider,children:[(0,l.jsxs)(u.Slider.Control,{className:v.sliderControl,children:[(0,l.jsx)(u.Slider.Track,{className:v.sliderTrack,children:(0,l.jsx)(u.Slider.Indicator,{className:v.sliderRange})}),z.map((e,t)=>(0,l.jsx)(u.Slider.Thumb,{index:t,"aria-labelledby":R?void 0:D,"aria-describedby":O,"aria-invalid":h||k||void 0,getAriaLabel:()=>R?M.thumb(t):N??``,getAriaValueText:(e,t)=>B(t),className:v.sliderThumb},t))]}),S&&(0,l.jsx)(u.Slider.Value,{render:(0,l.jsx)(t.o,{tag:`span`,size:`inherit`,type:h?`error`:`secondary`,className:v.sliderValue}),children:(e,t)=>t.map(B).join(`–`)})]})})}),b=(0,c.forwardRef)(function(e,t){return(0,l.jsx)(y,{ref:t,...e})}),x=[];function S({value:e,defaultValue:t,onValueChange:r,placeholder:i,disabled:a=!1,invalid:o=!1,name:u,maxTags:d,showCount:f=!1,showClearAll:m=!1,strings:h,allowDuplicates:g=!1,caseSensitive:y=!1,sortTags:b=!1,minLength:S=1,maxLength:C,validate:w,delimiter:T=/[\n,]/,addOnBlur:E=!0,renderTag:D,className:O,id:k,"aria-label":A,"aria-labelledby":j,"aria-describedby":M,"aria-invalid":N,"aria-required":P}){let F={..._,...h},I=e!==void 0,[L,R]=(0,c.useState)(t??[]),z=I?e??x:L,[B,V]=(0,c.useState)(``),H=(0,c.useRef)(null),U=(0,c.useRef)(null),[W,G]=(0,c.useState)(null),[K,q]=(0,c.useState)(``),J=(0,c.useCallback)(e=>{I||R(e),r?.(e)},[I,r]),Y=(0,c.useCallback)((e,t)=>{if(y)return t.includes(e);let n=e.toLowerCase();return t.some(e=>e.toLowerCase()===n)},[y]),X=(0,c.useCallback)(e=>{let t=[...z],n=[];for(let r of e){let e=r.trim();if(e){if(e.length<S||C!==void 0&&e.length>C||d!==void 0&&t.length>=d||!g&&Y(e,t)||w&&!w(e)){n.push(e);continue}t.push(e)}}return t.length!==z.length&&(b&&(t=t.sort((e,t)=>e.localeCompare(t))),J(t)),n.join(typeof T==`string`?T:`, `)},[g,J,T,Y,C,d,S,b,z,w]),Z=(0,c.useCallback)(e=>J(z.filter((t,n)=>n!==e)),[J,z]),Q=e=>{let t=X(e);V(t),G(t||null),q(t?(F.notAdded??_.notAdded)(t):``)},$=e=>{Z(e),requestAnimationFrame(()=>{let t=U.current?.querySelectorAll(`[data-tag-remove]`);(t?.[Math.min(e,t.length-1)]??H.current)?.focus()})},ee=e=>{if(!(e.nativeEvent.isComposing||e.keyCode===229)){if(e.key===`Enter`){e.preventDefault(),Q(B.split(T));return}e.key===`Backspace`&&B===``&&z.length>0&&(e.preventDefault(),Z(z.length-1))}},te=e=>{let t=e.clipboardData.getData(`text`);if(!t)return;let n=e.currentTarget.selectionStart??B.length,r=e.currentTarget.selectionEnd??n,i=`${B.slice(0,n)}${t}${B.slice(r)}`.split(T);i.length<=1||(e.preventDefault(),Q(i))},ne=d!==void 0&&z.length>d,re=f&&d!==void 0||m&&z.length>0,ie=(0,c.useMemo)(()=>d===void 0?null:`${z.length} / ${d}`,[d,z.length]);return(0,l.jsxs)(`div`,{ref:U,className:(0,p.clsx)(`tags-input--component`,O),children:[(0,l.jsx)(n.d,{role:`status`,"aria-live":`polite`,children:K}),!!u&&z.map((e,t)=>(0,l.jsx)(`input`,{type:`hidden`,name:`${u}[]`,value:e,disabled:a},`${e}-${t}`)),(0,l.jsxs)(`div`,{"data-field-shell":``,"aria-invalid":o||N||void 0,className:v.tagsShell,onClick:()=>H.current?.focus(),children:[z.map((e,t)=>D?D(e,t,Z):(0,l.jsxs)(`span`,{className:v.tag,children:[e,(0,l.jsx)(`button`,{type:`button`,"data-hit-area":!0,className:v.tagRemove,"aria-label":F.removeTag(e),"data-tag-remove":``,disabled:a,onClick:e=>{e.stopPropagation(),$(t)},children:(0,l.jsx)(s.XIcon,{"aria-hidden":!0})})]},`${e}-${t}`)),(0,l.jsx)(`input`,{ref:H,id:k,"data-field-control":``,className:v.tagsInput,value:B,placeholder:z.length===0?i??F.placeholder:void 0,disabled:a,"aria-label":A,"aria-labelledby":j,"aria-describedby":M,"aria-invalid":o||N||W!==null||void 0,"aria-required":P,onChange:e=>{let t=e.target.value.split(T);if(t.length>1){Q(t);return}G(null),V(e.target.value)},onKeyDown:ee,onPaste:te,onBlur:()=>{!E||a||B===W||Q(B.split(T))}})]}),re&&(0,l.jsxs)(`div`,{className:v.tagsFooter,children:[(0,l.jsx)(`span`,{className:(0,p.clsx)(ne&&v.tagsOverLimit),children:f?ie:null}),m&&z.length>0&&(0,l.jsx)(`button`,{type:`button`,"data-hit-area":!0,className:v.tagsClear,onClick:()=>{J([]),H.current?.focus()},disabled:a,children:F.clearAll})]})]})}function C(e){let t=e.trim().toLowerCase();return/^#[0-9a-f]{6}$/.test(t)?t:/^#[0-9a-f]{3}$/.test(t)?`#${t.slice(1).split(``).map(e=>`${e}${e}`).join(``)}`:null}function w(e,t){let n=Number(e.toFixed(t));return Object.is(n,-0)?0:n}var T=(0,f.converter)(`oklch`);function E(e,t){if(t===`hex`)return e;let n=(0,f.parse)(e);if(!n)return e;if(t===`rgb`)return(0,f.formatRgb)(n)??e;if(t===`hsl`)return(0,f.formatHsl)(n)??e;let r=T(n);return r?`oklch(${w(r.l,4)} ${w(r.c,4)} ${w(r.h??0,2)})`:e}function D(e,t){let n=window.getComputedStyle(e).backgroundColor;if(!n)return t;let r=document.createElement(`canvas`);r.width=1,r.height=1;let i=r.getContext(`2d`,{willReadFrequently:!0});if(!i)return t;i.fillStyle=`#000000`,i.fillStyle=n;let a=i.fillStyle;if(i.fillStyle=`#ffffff`,i.fillStyle=n,a!==i.fillStyle)return t;i.clearRect(0,0,1,1),i.fillRect(0,0,1,1);let[o,s,c,l]=i.getImageData(0,0,1,1).data;if(l===0)return t;let u=e=>e.toString(16).padStart(2,`0`);return`#${u(o??0)}${u(s??0)}${u(c??0)}`}function O(e){return typeof CSS>`u`||typeof CSS.supports!=`function`||CSS.supports(`color`,e)}var k=c.forwardRef(function({className:e,value:t,defaultValue:n,onChange:r,onValueChange:a,previewValue:o,strings:s,format:u,emitHex:d=!1,disabled:f,readOnly:m,onFocus:g,onBlur:_,...y},b){let x={...h,...s},[S,w]=c.useState(String(n??``)),T=t===void 0?S:String(t),k=o??T,A=c.useId(),[j,M]=c.useState(!1),N=k.trim()!==``&&!O(k),P=y[`aria-invalid`]??(N&&!j?!0:void 0),F=c.useRef(null),[I,L]=c.useState(()=>C(T)??`#000000`);c.useLayoutEffect(()=>{let e=C(k);if(e){L(e);return}F.current&&L(e=>D(F.current,e))},[k]);let R=e=>{t===void 0&&w(e.target.value),r?.(e),a?.(e.target.value)},z=e=>{let n=e.currentTarget.value,r=E(C(n)??n,u??(d?`hex`:`oklch`));t===void 0&&w(r),a?.(r)},B=y[`aria-labelledby`]??(y[`aria-label`]?A:void 0);return(0,l.jsxs)(`div`,{className:(0,p.clsx)(`color-input--component`,v.colorRoot,e),children:[(0,l.jsxs)(`label`,{className:v.colorPicker,"data-disabled":f||m||void 0,"data-invalid":P===!0||P===`true`||void 0,children:[(0,l.jsx)(`span`,{ref:F,"aria-hidden":!0,className:v.colorSwatch,"data-empty":!k.trim()||N||void 0,"data-unreadable":N||void 0,style:{background:k.trim()&&!N?k:void 0}}),!!y[`aria-label`]&&!y[`aria-labelledby`]&&(0,l.jsx)(`span`,{id:A,hidden:!0,children:y[`aria-label`]}),(0,l.jsx)(`input`,{type:`color`,className:v.colorNative,value:I,disabled:f||m,"aria-label":x.picker,"aria-describedby":B,onInput:z})]}),(0,l.jsx)(i.l,{...y,ref:b,value:T,disabled:f,readOnly:m,"aria-invalid":P,onChange:R,onFocus:e=>{M(!0),g?.(e)},onBlur:e=>{M(!1),_?.(e)},className:v.colorText})]})}),A={US:{value:`+1`,label:`United States`,iso:`US`},CA:{value:`+1`,label:`Canada`,iso:`CA`},AU:{value:`+61`,label:`Australia`,iso:`AU`},BG:{value:`+359`,label:`Bulgaria`,iso:`BG`},GR:{value:`+30`,label:`Greece`,iso:`GR`},GB:{value:`+44`,label:`United Kingdom`,iso:`GB`},DE:{value:`+49`,label:`Germany`,iso:`DE`},FR:{value:`+33`,label:`France`,iso:`FR`},IT:{value:`+39`,label:`Italy`,iso:`IT`},ES:{value:`+34`,label:`Spain`,iso:`ES`},NL:{value:`+31`,label:`Netherlands`,iso:`NL`},BE:{value:`+32`,label:`Belgium`,iso:`BE`},AT:{value:`+43`,label:`Austria`,iso:`AT`},CH:{value:`+41`,label:`Switzerland`,iso:`CH`},PL:{value:`+48`,label:`Poland`,iso:`PL`},RO:{value:`+40`,label:`Romania`,iso:`RO`},RS:{value:`+381`,label:`Serbia`,iso:`RS`},HR:{value:`+385`,label:`Croatia`,iso:`HR`},SI:{value:`+386`,label:`Slovenia`,iso:`SI`},MK:{value:`+389`,label:`North Macedonia`,iso:`MK`},TR:{value:`+90`,label:`Turkey`,iso:`TR`},RU:{value:`+7`,label:`Russia`,iso:`RU`},UA:{value:`+380`,label:`Ukraine`,iso:`UA`},SK:{value:`+421`,label:`Slovakia`,iso:`SK`},CZ:{value:`+420`,label:`Czech Republic`,iso:`CZ`},HU:{value:`+36`,label:`Hungary`,iso:`HU`},PT:{value:`+351`,label:`Portugal`,iso:`PT`},IE:{value:`+353`,label:`Ireland`,iso:`IE`},SE:{value:`+46`,label:`Sweden`,iso:`SE`},NO:{value:`+47`,label:`Norway`,iso:`NO`},DK:{value:`+45`,label:`Denmark`,iso:`DK`},FI:{value:`+358`,label:`Finland`,iso:`FI`},CY:{value:`+357`,label:`Cyprus`,iso:`CY`},AL:{value:`+355`,label:`Albania`,iso:`AL`},ME:{value:`+382`,label:`Montenegro`,iso:`ME`},BA:{value:`+387`,label:`Bosnia and Herzegovina`,iso:`BA`},XK:{value:`+383`,label:`Kosovo`,iso:`XK`},MD:{value:`+373`,label:`Moldova`,iso:`MD`},BY:{value:`+375`,label:`Belarus`,iso:`BY`},LT:{value:`+370`,label:`Lithuania`,iso:`LT`},LV:{value:`+371`,label:`Latvia`,iso:`LV`},EE:{value:`+372`,label:`Estonia`,iso:`EE`}},j=[`US`,`CA`,`GB`,`DE`,`FR`,`IT`,`ES`,`AU`];function M(e){return typeof e==`string`?A[e.toUpperCase()]??null:e}var N=new Set([`+39`,`+378`,`+379`]);function P(e,t,n){let r=/\s*(?:ext\.?|extension|x|#)\s*(\d+)\s*$/i.exec(e),i=(r?e.slice(0,r.index):e).trim().replace(/\s+/g,` `).replace(/[^\d ()+-]/g,``);return t&&i.startsWith(t)&&(i=i.slice(t.length).replace(/^[\s-]+/,``)),t&&n&&!N.has(t)&&i.startsWith(`0`)&&(i=i.slice(1)),r?`${i} ext. ${r[1]}`:i}function F(e,t){let n=e.toUpperCase();return t.find(e=>e.iso.toUpperCase()===n)??A[n]}function I(e,t){return e?e.startsWith(`+`)?e:F(e,t)?.value??e:t[0]?.value??``}function L(e,t){return e?e.startsWith(`+`)?void 0:F(e,t)?.iso:t[0]?.iso}var R=(0,c.forwardRef)(function({prefix:e,defaultPrefix:t,onPrefixChange:n,prefixes:r=j,disablePrefixSelector:o=!1,strings:s,normalizeOnBlur:u=!0,showCountryName:d=!0,value:f,onChange:m,onBlur:h,disabled:_,readOnly:y,invalid:b,className:x,...S},C){let w={...g,...s},T=(0,c.useMemo)(()=>r.map(M).filter(e=>e!==null),[r]),E=e!==void 0,[D,O]=(0,c.useState)(()=>I(t,T)),k=E?I(e,T):D,[A,N]=(0,c.useState)(()=>L(t,T)),F=(0,c.useCallback)(e=>{let t=(e?T.find(t=>t.iso===e)?.value:void 0)??``;N(e),E||O(t),n?.(t)},[E,n,T]),R=(0,c.useMemo)(()=>T.map(e=>({value:e.iso,label:e.value,description:d?e.label:void 0})),[T,d]),z=(0,c.useMemo)(()=>{let t=E?L(e,T):void 0,n=T.filter(e=>e.value===k);return(n.find(e=>e.iso===t)??n.find(e=>e.iso===A)??n[0])?.iso},[E,T,A,e,k]),B=e=>{if(u&&!_&&!y){let t=P(e.target.value,k,!o);t!==e.target.value&&(e.target.value=t,m?.(e))}h?.(e)};return(0,l.jsxs)(`div`,{className:(0,p.clsx)(`phone-input--component`,v.phoneRoot,x),children:[!o&&(0,l.jsx)(`div`,{className:v.phonePrefix,children:(0,l.jsx)(a.s,{options:R,value:z??null,onValueChange:F,placeholder:w.prefixPlaceholder,disabled:_||y,invalid:b,"aria-label":w.prefix})}),(0,l.jsx)(i.l,{...S,ref:C,type:`tel`,inputMode:`tel`,value:f,onChange:m,onBlur:B,disabled:_,readOnly:y,"aria-invalid":b||S[`aria-invalid`]||void 0,className:v.phoneNumber})]})}),z=(0,c.forwardRef)(function({id:e,value:t,onValueChange:n,placeholder:i,displayFormat:a,minuteStep:s=15,withSeconds:u=!1,disabled:d,invalid:f,className:m,"aria-labelledby":h,"aria-describedby":g,"aria-invalid":_,"aria-required":v},y){let b=f||_===!0||_===`true`,x=t?new Date(t):void 0,S=x&&!Number.isNaN(x.getTime())?x:void 0,C={hours:S?.getHours()??0,minutes:S?.getMinutes()??0,seconds:S?.getSeconds()??0},w=(0,c.useCallback)(e=>{if(!(e instanceof Date)){n?.(void 0);return}let t=new Date(e);t.setHours(C.hours,C.minutes,C.seconds??0,0),n?.(t.toISOString())},[n,C.hours,C.minutes,C.seconds]),T=(0,c.useCallback)(e=>{let t=new Date(S??new Date);t.setHours(e.hours,e.minutes,e.seconds??0,0),n?.(t.toISOString())},[n,S]);return(0,l.jsxs)(r.o,{ref:y,direction:`horizontal`,gap:`sm`,align:`center`,className:(0,p.clsx)(`date-time-input--component`,m),children:[(0,l.jsx)(o.u,{id:e,value:S,onValueChange:w,placeholder:i,displayFormat:a,disabled:d,invalid:b,"aria-labelledby":h,"aria-describedby":g,"aria-required":v}),(0,l.jsx)(o.c,{value:C,onValueChange:T,minuteStep:s,withSeconds:u,disabled:d,invalid:b,"aria-labelledby":h,"aria-describedby":g,"aria-required":v})]})});Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return h}});
1
+ const e=require("./rolldown-runtime-BocRIvOZ.cjs"),t=require("./typography-Cf5zEv4y.cjs"),n=require("./display-CFj87iEn.cjs"),r=require("./structure-CXTLV2t8.cjs"),i=require("./text-inputs-D4w3Z2-F.cjs"),a=require("./choice-inputs-C8LMAkh8.cjs"),o=require("./date-pickers-DejXe5oe.cjs");let s=require("lucide-react"),c=require("react");c=e.t(c,1);let l=require("react/jsx-runtime"),u=require("@base-ui/react/slider"),d=require("@base-ui/react/field"),f=require("culori"),p=require("clsx");var m={thumb:e=>e===0?`Minimum`:`Maximum`,label:`Value`},h={...i.d,picker:`Choose a colour`},g={...i.d,prefixPlaceholder:`Code`,prefix:`Country dial code`},_={...i.d,clearAll:`Clear all`,removeTag:e=>`Remove ${e}`,notAdded:e=>`Not added: ${e}.`,placeholder:`Add a tag…`},v={sliderRoot:`value-inputs__sliderRoot___TVz5X`,slider:`value-inputs__slider___Jn7Np`,sliderControl:`value-inputs__sliderControl___5mXkK`,sliderThumb:`value-inputs__sliderThumb___PA1oN`,sliderTrack:`value-inputs__sliderTrack___OZ4qQ`,sliderRange:`value-inputs__sliderRange___qgdN0`,sliderMd:`value-inputs__sliderMd___V1S23`,sliderValue:`value-inputs__sliderValue___Jcfq4`,tagsShell:`value-inputs__tagsShell___R-B11`,tag:`value-inputs__tag___6Ch0s`,tagRemove:`value-inputs__tagRemove___vPeFa`,tagsInput:`value-inputs__tagsInput___88_8P`,tagsFooter:`value-inputs__tagsFooter___dEqPc`,tagsOverLimit:`value-inputs__tagsOverLimit___i3u32`,tagsClear:`value-inputs__tagsClear___DpqXx`,colorRoot:`value-inputs__colorRoot___4TlRL`,colorPicker:`value-inputs__colorPicker___oCBbz`,colorNative:`value-inputs__colorNative___M0EBv`,colorSwatch:`value-inputs__colorSwatch___IKK_t`,colorText:`value-inputs__colorText___t1CW9`,phoneRoot:`value-inputs__phoneRoot___H2Jvj`,phonePrefix:`value-inputs__phonePrefix___f5PTY`,phoneNumber:`value-inputs__phoneNumber___vIwkj`},y=(0,c.forwardRef)(function({name:e,id:n,value:r,defaultValue:i,min:a=0,max:o=100,step:s=1,disabled:f=!1,invalid:h=!1,orientation:g=`horizontal`,size:_=`sm`,onChange:y,onValueChange:b,onValueCommitted:x,showValue:S=!1,formatValue:C,unit:w,className:T,"aria-label":E,"aria-labelledby":D,"aria-describedby":O,"aria-invalid":k,strings:A},j){let M={...m,...A},N=E??M.label,P=(0,c.useId)(),F=n??P,I=e??F,L=r??i,R=Array.isArray(L),z=((e,t)=>e===void 0?[t]:Array.isArray(e)?e:[e])(L,a),B=e=>C?C(e):w?`${e}${w}`:String(e);return(0,l.jsx)(d.Field.Root,{invalid:h||k!==void 0&&k!==!1&&k!==`false`,"data-size":_,className:(0,p.clsx)(`slider--component`,v.sliderRoot,_===`md`&&v.sliderMd,T),children:(0,l.jsxs)(u.Slider.Root,{ref:j,id:F,name:e,"aria-label":D?void 0:N,"aria-labelledby":D,"aria-describedby":O,"aria-invalid":h||k||void 0,value:r,defaultValue:i??a,min:a,max:o,step:s,disabled:f,orientation:g,onValueChange:e=>{b?.(e),y?.({target:{name:I,value:e}})},onValueCommitted:e=>x?.(e),className:v.slider,children:[(0,l.jsxs)(u.Slider.Control,{className:v.sliderControl,children:[(0,l.jsx)(u.Slider.Track,{className:v.sliderTrack,children:(0,l.jsx)(u.Slider.Indicator,{className:v.sliderRange})}),z.map((e,t)=>(0,l.jsx)(u.Slider.Thumb,{index:t,"aria-labelledby":R?void 0:D,"aria-describedby":O,"aria-invalid":h||k||void 0,getAriaLabel:()=>R?M.thumb(t):N??``,getAriaValueText:(e,t)=>B(t),className:v.sliderThumb},t))]}),S&&(0,l.jsx)(u.Slider.Value,{render:(0,l.jsx)(t.o,{tag:`span`,size:`inherit`,type:h?`error`:`secondary`,className:v.sliderValue}),children:(e,t)=>t.map(B).join(`–`)})]})})}),b=(0,c.forwardRef)(function(e,t){return(0,l.jsx)(y,{ref:t,...e})}),x=[];function S({value:e,defaultValue:t,onValueChange:r,placeholder:i,disabled:a=!1,invalid:o=!1,name:u,maxTags:d,showCount:f=!1,showClearAll:m=!1,strings:h,allowDuplicates:g=!1,caseSensitive:y=!1,sortTags:b=!1,minLength:S=1,maxLength:C,validate:w,delimiter:T=/[\n,]/,addOnBlur:E=!0,renderTag:D,className:O,id:k,"aria-label":A,"aria-labelledby":j,"aria-describedby":M,"aria-invalid":N,"aria-required":P}){let F={..._,...h},I=e!==void 0,[L,R]=(0,c.useState)(t??[]),z=I?e??x:L,[B,V]=(0,c.useState)(``),H=(0,c.useRef)(null),U=(0,c.useRef)(null),[W,G]=(0,c.useState)(null),[K,q]=(0,c.useState)(``),J=(0,c.useCallback)(e=>{I||R(e),r?.(e)},[I,r]),Y=(0,c.useCallback)((e,t)=>{if(y)return t.includes(e);let n=e.toLowerCase();return t.some(e=>e.toLowerCase()===n)},[y]),X=(0,c.useCallback)(e=>{let t=[...z],n=[];for(let r of e){let e=r.trim();if(e){if(e.length<S||C!==void 0&&e.length>C||d!==void 0&&t.length>=d||!g&&Y(e,t)||w&&!w(e)){n.push(e);continue}t.push(e)}}return t.length!==z.length&&(b&&(t=t.sort((e,t)=>e.localeCompare(t))),J(t)),n.join(typeof T==`string`?T:`, `)},[g,J,T,Y,C,d,S,b,z,w]),Z=(0,c.useCallback)(e=>J(z.filter((t,n)=>n!==e)),[J,z]),Q=e=>{let t=X(e);V(t),G(t||null),q(t?(F.notAdded??_.notAdded)(t):``)},$=e=>{Z(e),requestAnimationFrame(()=>{let t=U.current?.querySelectorAll(`[data-tag-remove]`);(t?.[Math.min(e,t.length-1)]??H.current)?.focus()})},ee=e=>{if(!(e.nativeEvent.isComposing||e.keyCode===229)){if(e.key===`Enter`){e.preventDefault(),Q(B.split(T));return}e.key===`Backspace`&&B===``&&z.length>0&&(e.preventDefault(),Z(z.length-1))}},te=e=>{let t=e.clipboardData.getData(`text`);if(!t)return;let n=e.currentTarget.selectionStart??B.length,r=e.currentTarget.selectionEnd??n,i=`${B.slice(0,n)}${t}${B.slice(r)}`.split(T);i.length<=1||(e.preventDefault(),Q(i))},ne=d!==void 0&&z.length>d,re=f&&d!==void 0||m&&z.length>0,ie=(0,c.useMemo)(()=>d===void 0?null:`${z.length} / ${d}`,[d,z.length]);return(0,l.jsxs)(`div`,{ref:U,className:(0,p.clsx)(`tags-input--component`,O),children:[(0,l.jsx)(n.d,{role:`status`,"aria-live":`polite`,children:K}),!!u&&z.map((e,t)=>(0,l.jsx)(`input`,{type:`hidden`,name:`${u}[]`,value:e,disabled:a},`${e}-${t}`)),(0,l.jsxs)(`div`,{"data-field-shell":``,"aria-invalid":o||N||void 0,className:v.tagsShell,onClick:()=>H.current?.focus(),children:[z.map((e,t)=>D?D(e,t,Z):(0,l.jsxs)(`span`,{className:v.tag,children:[e,(0,l.jsx)(`button`,{type:`button`,"data-hit-area":!0,className:v.tagRemove,"aria-label":F.removeTag(e),"data-tag-remove":``,disabled:a,onClick:e=>{e.stopPropagation(),$(t)},children:(0,l.jsx)(s.XIcon,{"aria-hidden":!0})})]},`${e}-${t}`)),(0,l.jsx)(`input`,{ref:H,id:k,"data-field-control":``,className:v.tagsInput,value:B,placeholder:z.length===0?i??F.placeholder:void 0,disabled:a,"aria-label":A,"aria-labelledby":j,"aria-describedby":M,"aria-invalid":o||N||W!==null||void 0,"aria-required":P,onChange:e=>{let t=e.target.value.split(T);if(t.length>1){Q(t);return}G(null),V(e.target.value)},onKeyDown:ee,onPaste:te,onBlur:()=>{!E||a||B===W||Q(B.split(T))}})]}),re&&(0,l.jsxs)(`div`,{className:v.tagsFooter,children:[(0,l.jsx)(`span`,{className:(0,p.clsx)(ne&&v.tagsOverLimit),children:f?ie:null}),m&&z.length>0&&(0,l.jsx)(`button`,{type:`button`,"data-hit-area":!0,className:v.tagsClear,onClick:()=>{J([]),H.current?.focus()},disabled:a,children:F.clearAll})]})]})}function C(e){let t=e.trim().toLowerCase();return/^#[0-9a-f]{6}$/.test(t)?t:/^#[0-9a-f]{3}$/.test(t)?`#${t.slice(1).split(``).map(e=>`${e}${e}`).join(``)}`:null}function w(e,t){let n=Number(e.toFixed(t));return Object.is(n,-0)?0:n}var T=(0,f.converter)(`oklch`);function E(e,t){if(t===`hex`)return e;let n=(0,f.parse)(e);if(!n)return e;if(t===`rgb`)return(0,f.formatRgb)(n)??e;if(t===`hsl`)return(0,f.formatHsl)(n)??e;let r=T(n);return r?`oklch(${w(r.l,4)} ${w(r.c,4)} ${w(r.h??0,2)})`:e}function D(e,t){let n=window.getComputedStyle(e).backgroundColor;if(!n)return t;let r=document.createElement(`canvas`);r.width=1,r.height=1;let i=r.getContext(`2d`,{willReadFrequently:!0});if(!i)return t;i.fillStyle=`#000000`,i.fillStyle=n;let a=i.fillStyle;if(i.fillStyle=`#ffffff`,i.fillStyle=n,a!==i.fillStyle)return t;i.clearRect(0,0,1,1),i.fillRect(0,0,1,1);let[o,s,c,l]=i.getImageData(0,0,1,1).data;if(l===0)return t;let u=e=>e.toString(16).padStart(2,`0`);return`#${u(o??0)}${u(s??0)}${u(c??0)}`}function O(e){return typeof CSS>`u`||typeof CSS.supports!=`function`||CSS.supports(`color`,e)}var k=c.forwardRef(function({className:e,value:t,defaultValue:n,onChange:r,onValueChange:a,previewValue:o,strings:s,format:u,emitHex:d=!1,disabled:f,readOnly:m,onFocus:g,onBlur:_,...y},b){let x={...h,...s},[S,w]=c.useState(String(n??``)),T=t===void 0?S:String(t),k=o??T,A=c.useId(),[j,M]=c.useState(!1),N=k.trim()!==``&&!O(k),P=y[`aria-invalid`]??(N&&!j?!0:void 0),F=c.useRef(null),[I,L]=c.useState(()=>C(T)??`#000000`);c.useLayoutEffect(()=>{let e=C(k);if(e){L(e);return}F.current&&L(e=>D(F.current,e))},[k]);let R=e=>{t===void 0&&w(e.target.value),r?.(e),a?.(e.target.value)},z=e=>{let n=e.currentTarget.value,r=E(C(n)??n,u??(d?`hex`:`oklch`));t===void 0&&w(r),a?.(r)},B=y[`aria-labelledby`]??(y[`aria-label`]?A:void 0);return(0,l.jsxs)(`div`,{className:(0,p.clsx)(`color-input--component`,v.colorRoot,e),children:[(0,l.jsxs)(`label`,{className:v.colorPicker,"data-disabled":f||m||void 0,"data-invalid":P===!0||P===`true`||void 0,children:[(0,l.jsx)(`span`,{ref:F,"aria-hidden":!0,className:v.colorSwatch,"data-empty":!k.trim()||N||void 0,"data-unreadable":N||void 0,style:{background:k.trim()&&!N?k:void 0}}),!!y[`aria-label`]&&!y[`aria-labelledby`]&&(0,l.jsx)(`span`,{id:A,hidden:!0,children:y[`aria-label`]}),(0,l.jsx)(`input`,{type:`color`,className:v.colorNative,value:I,disabled:f||m,"aria-label":x.picker,"aria-describedby":B,onInput:z})]}),(0,l.jsx)(i.l,{...y,ref:b,value:T,disabled:f,readOnly:m,"aria-invalid":P,onChange:R,onFocus:e=>{M(!0),g?.(e)},onBlur:e=>{M(!1),_?.(e)},className:v.colorText})]})}),A={US:{value:`+1`,label:`United States`,iso:`US`},CA:{value:`+1`,label:`Canada`,iso:`CA`},AU:{value:`+61`,label:`Australia`,iso:`AU`},BG:{value:`+359`,label:`Bulgaria`,iso:`BG`},GR:{value:`+30`,label:`Greece`,iso:`GR`},GB:{value:`+44`,label:`United Kingdom`,iso:`GB`},DE:{value:`+49`,label:`Germany`,iso:`DE`},FR:{value:`+33`,label:`France`,iso:`FR`},IT:{value:`+39`,label:`Italy`,iso:`IT`},ES:{value:`+34`,label:`Spain`,iso:`ES`},NL:{value:`+31`,label:`Netherlands`,iso:`NL`},BE:{value:`+32`,label:`Belgium`,iso:`BE`},AT:{value:`+43`,label:`Austria`,iso:`AT`},CH:{value:`+41`,label:`Switzerland`,iso:`CH`},PL:{value:`+48`,label:`Poland`,iso:`PL`},RO:{value:`+40`,label:`Romania`,iso:`RO`},RS:{value:`+381`,label:`Serbia`,iso:`RS`},HR:{value:`+385`,label:`Croatia`,iso:`HR`},SI:{value:`+386`,label:`Slovenia`,iso:`SI`},MK:{value:`+389`,label:`North Macedonia`,iso:`MK`},TR:{value:`+90`,label:`Turkey`,iso:`TR`},RU:{value:`+7`,label:`Russia`,iso:`RU`},UA:{value:`+380`,label:`Ukraine`,iso:`UA`},SK:{value:`+421`,label:`Slovakia`,iso:`SK`},CZ:{value:`+420`,label:`Czech Republic`,iso:`CZ`},HU:{value:`+36`,label:`Hungary`,iso:`HU`},PT:{value:`+351`,label:`Portugal`,iso:`PT`},IE:{value:`+353`,label:`Ireland`,iso:`IE`},SE:{value:`+46`,label:`Sweden`,iso:`SE`},NO:{value:`+47`,label:`Norway`,iso:`NO`},DK:{value:`+45`,label:`Denmark`,iso:`DK`},FI:{value:`+358`,label:`Finland`,iso:`FI`},CY:{value:`+357`,label:`Cyprus`,iso:`CY`},AL:{value:`+355`,label:`Albania`,iso:`AL`},ME:{value:`+382`,label:`Montenegro`,iso:`ME`},BA:{value:`+387`,label:`Bosnia and Herzegovina`,iso:`BA`},XK:{value:`+383`,label:`Kosovo`,iso:`XK`},MD:{value:`+373`,label:`Moldova`,iso:`MD`},BY:{value:`+375`,label:`Belarus`,iso:`BY`},LT:{value:`+370`,label:`Lithuania`,iso:`LT`},LV:{value:`+371`,label:`Latvia`,iso:`LV`},EE:{value:`+372`,label:`Estonia`,iso:`EE`}},j=[`US`,`CA`,`GB`,`DE`,`FR`,`IT`,`ES`,`AU`];function M(e){return typeof e==`string`?A[e.toUpperCase()]??null:e}var N=new Set([`+39`,`+378`,`+379`]);function P(e,t,n){let r=/\s*(?:ext\.?|extension|x|#)\s*(\d+)\s*$/i.exec(e),i=(r?e.slice(0,r.index):e).trim().replace(/\s+/g,` `).replace(/[^\d ()+-]/g,``);return t&&i.startsWith(t)&&(i=i.slice(t.length).replace(/^[\s-]+/,``)),t&&n&&!N.has(t)&&i.startsWith(`0`)&&(i=i.slice(1)),r?`${i} ext. ${r[1]}`:i}function F(e,t){let n=e.toUpperCase();return t.find(e=>e.iso.toUpperCase()===n)??A[n]}function I(e,t){return e?e.startsWith(`+`)?e:F(e,t)?.value??e:t[0]?.value??``}function L(e,t){return e?e.startsWith(`+`)?void 0:F(e,t)?.iso:t[0]?.iso}var R=(0,c.forwardRef)(function({prefix:e,defaultPrefix:t,onPrefixChange:n,prefixes:r=j,disablePrefixSelector:o=!1,strings:s,normalizeOnBlur:u=!0,showCountryName:d=!0,value:f,onChange:m,onBlur:h,disabled:_,readOnly:y,invalid:b,className:x,...S},C){let w={...g,...s},T=(0,c.useMemo)(()=>r.map(M).filter(e=>e!==null),[r]),E=e!==void 0,[D,O]=(0,c.useState)(()=>I(t,T)),k=E?I(e,T):D,[A,N]=(0,c.useState)(()=>L(t,T)),F=(0,c.useCallback)(e=>{let t=(e?T.find(t=>t.iso===e)?.value:void 0)??``;N(e),E||O(t),n?.(t)},[E,n,T]),R=(0,c.useMemo)(()=>T.map(e=>({value:e.iso,label:e.value,description:d?e.label:void 0})),[T,d]),z=(0,c.useMemo)(()=>{let t=E?L(e,T):void 0,n=T.filter(e=>e.value===k);return(n.find(e=>e.iso===t)??n.find(e=>e.iso===A)??n[0])?.iso},[E,T,A,e,k]),B=e=>{if(u&&!_&&!y){let t=P(e.target.value,k,!o);t!==e.target.value&&(e.target.value=t,m?.(e))}h?.(e)};return(0,l.jsxs)(`div`,{className:(0,p.clsx)(`phone-input--component`,v.phoneRoot,x),children:[!o&&(0,l.jsx)(`div`,{className:v.phonePrefix,children:(0,l.jsx)(a.s,{options:R,value:z??null,onValueChange:F,placeholder:w.prefixPlaceholder,disabled:_||y,invalid:b,"aria-label":w.prefix})}),(0,l.jsx)(i.l,{...S,ref:C,type:`tel`,inputMode:`tel`,value:f,onChange:m,onBlur:B,disabled:_,readOnly:y,"aria-invalid":b||S[`aria-invalid`]||void 0,className:v.phoneNumber})]})}),z=(0,c.forwardRef)(function({id:e,value:t,onValueChange:n,placeholder:i,displayFormat:a,minuteStep:s=15,withSeconds:u=!1,disabled:d,invalid:f,className:m,"aria-labelledby":h,"aria-describedby":g,"aria-invalid":_,"aria-required":v},y){let b=f||_===!0||_===`true`,x=t?new Date(t):void 0,S=x&&!Number.isNaN(x.getTime())?x:void 0,C={hours:S?.getHours()??0,minutes:S?.getMinutes()??0,seconds:S?.getSeconds()??0},w=(0,c.useCallback)(e=>{if(!(e instanceof Date)){n?.(void 0);return}let t=new Date(e);t.setHours(C.hours,C.minutes,C.seconds??0,0),n?.(t.toISOString())},[n,C.hours,C.minutes,C.seconds]),T=(0,c.useCallback)(e=>{let t=new Date(S??new Date);t.setHours(e.hours,e.minutes,e.seconds??0,0),n?.(t.toISOString())},[n,S]);return(0,l.jsxs)(r.o,{ref:y,direction:`horizontal`,gap:`sm`,align:`center`,className:(0,p.clsx)(`date-time-input--component`,m),children:[(0,l.jsx)(o.u,{id:e,value:S,onValueChange:w,placeholder:i,displayFormat:a,disabled:d,invalid:b,"aria-labelledby":h,"aria-describedby":g,"aria-required":v}),(0,l.jsx)(o.c,{value:C,onValueChange:T,minuteStep:s,withSeconds:u,disabled:d,invalid:b,"aria-labelledby":h,"aria-describedby":g,"aria-required":v})]})});Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return h}});
@@ -1,11 +1,11 @@
1
1
  import "./css/value-inputs.css";
2
2
  import { t as e } from "./cx--CBrhWH0.js";
3
- import { o as t } from "./typography-B8Iurhy1.js";
4
- import { d as n } from "./display-DVhYS75K.js";
3
+ import { o as t } from "./typography-BkxEiwQ1.js";
4
+ import { d as n } from "./display-Dehpw83R.js";
5
5
  import { o as r } from "./structure-D0WGQAP3.js";
6
6
  import { d as i, l as a } from "./text-inputs-BBpgIQEI.js";
7
- import { s as o } from "./choice-inputs-Ca9PoQwa.js";
8
- import { c as s, u as c } from "./date-pickers-Dy9BVNnb.js";
7
+ import { s as o } from "./choice-inputs-BjZYCdzk.js";
8
+ import { c as s, u as c } from "./date-pickers-1_Ah7qWO.js";
9
9
  import { XIcon as l } from "lucide-react";
10
10
  import * as u from "react";
11
11
  import { forwardRef as d, useCallback as f, useId as p, useMemo as m, useRef as h, useState as g } from "react";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "note": "Generated by scripts/gen-consumer-docs.mjs. The machine surface: agent skills and component finders read this, not the prose. Every attributed live preview and recipe is indexed under its family.",
3
3
  "schemaVersion": 2,
4
- "packageVersion": "2.0.0",
4
+ "packageVersion": "2.0.1",
5
5
  "package": "themelia-ui",
6
6
  "profiles": [
7
7
  "general",
@@ -14474,7 +14474,6 @@
14474
14474
  "base/forms-numeric",
14475
14475
  "base/structure",
14476
14476
  "base/text-inputs",
14477
- "base/typography",
14478
14477
  "base/value-inputs"
14479
14478
  ],
14480
14479
  "documentation": "Schema form (/schema-form)",
@@ -52,8 +52,8 @@ Extends: `Omit<ComponentProps<"div">, "children">`.
52
52
  | member | required | type | description / documented default |
53
53
  | --- | :-: | --- | --- |
54
54
  | `value` | yes | `string` | What the code encodes — a URL, a payment string, a token. |
55
- | `foreground` | no | `string` | Overrides the dark modules. Defaults to the theme's foreground. |
56
- | `background` | no | `string` | Overrides the light modules. Defaults to the theme's background. |
55
+ | `foreground` | no | `string` | Overrides the dark modules. Defaults to the inverse background, dark in both themes. |
56
+ | `background` | no | `string` | Overrides the light modules. Defaults to the inverse foreground, light in both themes. |
57
57
  | `robustness` | no | `QRRobustness` | |
58
58
  | `placeholder` | no | `string` | Shown while encoding. Defaults to this component's own `generating` string. |
59
59
  | `strings` | no | `Partial<QRCodeStrings>` | Overrides this code's own copy — the two placeholder states and its name. |
@@ -105,7 +105,7 @@ Extends: `Omit<ComponentProps<"div">, "children" | "dangerouslySetInnerHTML" | "
105
105
  | `type` | no | `TextProps["type"]` | |
106
106
  | `align` | no | `TextProps["align"]` | |
107
107
  | `weight` | no | `TextProps["weight"]` | |
108
- | `lineHeight` | no | `TextProps["lineHeight"]` | |
108
+ | `lineHeight` | no | `TextProps["lineHeight"]` | Defaults to `relaxed`, the editor's prose leading, so a body does not reflow once posted. |
109
109
  | `tag` | no | `"div" \| "p"` | |
110
110
 
111
111
  ### `Text`
@@ -20,7 +20,7 @@ import "themelia-ui/features/schema-form.css"
20
20
 
21
21
  ## Composition
22
22
 
23
- This family composes `base/badge`, `base/buttons`, `base/choice-inputs`, `base/display`, `base/feedback`, `base/forms`, `base/forms-numeric`, `base/structure`, `base/text-inputs`, `base/typography`, `base/value-inputs`.
23
+ This family composes `base/badge`, `base/buttons`, `base/choice-inputs`, `base/display`, `base/feedback`, `base/forms`, `base/forms-numeric`, `base/structure`, `base/text-inputs`, `base/value-inputs`.
24
24
 
25
25
  Application policy—routing, fetching, persistence, permissions, and translation—stays
26
26
  outside the package and arrives through the public props, callbacks, slots, or accessors below.
@@ -119,7 +119,8 @@ UIConfigSettingsStrings
119
119
 
120
120
  Kind: callable.
121
121
 
122
- The whole shadow ladder from one intensity.
122
+ The whole shadow ladder from one intensity: the default theme's geometry and
123
+ `--shadow-ink`, with every layer's ink scaled so 0.8 reproduces it exactly.
123
124
 
124
125
  ```text
125
126
  ({ intensity }: ThemeElevationRecipe) => ThemeOverrides
@@ -221,7 +222,7 @@ Kind: interface.
221
222
 
222
223
  | member | required | type | description / documented default |
223
224
  | --- | :-: | --- | --- |
224
- | `intensity` | yes | `number` | 0 is flat, 1 is pronounced. |
225
+ | `intensity` | yes | `number` | 0 is flat, 1 is pronounced; 0.8 reproduces the default theme. |
225
226
 
226
227
  ### `ThemeExportArtifact`
227
228
 
@@ -30,7 +30,8 @@ outside the package and arrives through the public props, callbacks, slots, or a
30
30
 
31
31
  Kind: callable.
32
32
 
33
- The whole shadow ladder from one intensity.
33
+ The whole shadow ladder from one intensity: the default theme's geometry and
34
+ `--shadow-ink`, with every layer's ink scaled so 0.8 reproduces it exactly.
34
35
 
35
36
  ```text
36
37
  ({ intensity }: ThemeElevationRecipe) => ThemeOverrides
@@ -98,7 +99,7 @@ Kind: interface.
98
99
 
99
100
  | member | required | type | description / documented default |
100
101
  | --- | :-: | --- | --- |
101
- | `intensity` | yes | `number` | 0 is flat, 1 is pronounced. |
102
+ | `intensity` | yes | `number` | 0 is flat, 1 is pronounced; 0.8 reproduces the default theme. |
102
103
 
103
104
  ### `ThemeMode`
104
105
 
@@ -294,6 +294,7 @@ Semantic tokens a consumer may retheme. Values carry meaning, not raw colour.
294
294
  Kind: type.
295
295
 
296
296
  Step on the type scale. `inherit` lets the surrounding size flow through.
297
+ `xxs` is deprecated: it renders as `xs`, so write `xs`.
297
298
 
298
299
  ```text
299
300
  "inherit" | "xxs" | "xs" | "pxs" | "sm" | "base" | "lg" | "xl"
@@ -47,8 +47,8 @@
47
47
  "--switch-track-h": "--choice-size",
48
48
  "--menu-shadow": "--popover-shadow",
49
49
  "--menu-ring-width": "--border-width",
50
- "--sidebar-group-action-size": "--sidebar-action-size",
51
- "--sidebar-menu-action-size": "--sidebar-action-size",
50
+ "--sidebar-group-action-size": "--size-icon-lg",
51
+ "--sidebar-menu-action-size": "--size-icon-lg",
52
52
  "--button-px": "--control-px",
53
53
  "--button-px-icon": "--control-px-sm",
54
54
  "--button-gap": "--space-sm",
@@ -78,7 +78,32 @@
78
78
  "--calendar-months-gap": "--space-xl",
79
79
  "--skeleton-block-gap": "--space-xl",
80
80
  "--space-scale": "--density-scale",
81
- "--density-preset-scale": "--density-scale"
81
+ "--density-preset-scale": "--density-scale",
82
+ "--card-framed-bg": "--card",
83
+ "--alert-description-fg": "--text-role-secondary",
84
+ "--alert-link-hover": "--text-role-main",
85
+ "--alert-meta-label-fg": "--text-role-secondary",
86
+ "--mention-destructive-fg": "--destructive-accent",
87
+ "--menu-item-destructive-bg-hover": "--destructive-10",
88
+ "--segmented-chip-bg": "--popover",
89
+ "--aside-nav-item-h": "--control-h-sm",
90
+ "--avatar-group-ring-width": "--border-width-strong",
91
+ "--item-title-underline-offset": "--link-underline-offset",
92
+ "--product-thumb-size": "--size-medallion",
93
+ "--stepper-line": "--border-width-strong",
94
+ "--timeline-dot-icon": "--size-icon-sm",
95
+ "--tooltip-arrow-radius": null,
96
+ "--primary-12": "--primary-10",
97
+ "--success-15": "--success-10",
98
+ "--info-15": "--info-10",
99
+ "--info-40": "--info-30",
100
+ "--warning-50": "--warning-10",
101
+ "--muted-30": "--muted-50",
102
+ "--muted-35": "--muted-20",
103
+ "--border-50": "--border-60",
104
+ "--border-70": "--border",
105
+ "--sidebar-action-size": "--size-icon-lg",
106
+ "--picker-clear-size": "--size-icon"
82
107
  },
83
108
  "classes": {
84
109
  "rounded-surface": "rounded-(--radius)",