@midas-ds/components 10.1.1 → 10.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (373) hide show
  1. package/AccordionItem-DZT76sWu.js +320 -0
  2. package/AccordionItem-Z_c9MpAM.cjs +1 -0
  3. package/BadgeContainer-D3RtqcPF.js +37 -0
  4. package/BadgeContainer-DeUgqGqb.cjs +1 -0
  5. package/Breadcrumbs-CmZXtTiS.js +250 -0
  6. package/Breadcrumbs-Cx09jwZZ.cjs +1 -0
  7. package/Button-CbFRzRrF.js +38 -0
  8. package/Button-DnhqHU01.cjs +1 -0
  9. package/Button-ZOQy9Ivu.js +78 -0
  10. package/Button-iSiWjocA.cjs +1 -0
  11. package/Button.module-CMMhIrkn.js +14 -0
  12. package/Button.module-DO5s9hOk.cjs +1 -0
  13. package/ButtonGroup-DUqW5dzM.cjs +1 -0
  14. package/ButtonGroup-DvVvear6.js +22 -0
  15. package/CHANGELOG.md +48 -0
  16. package/Card-C0BFW3wJ.cjs +1 -0
  17. package/Card-CaKKKv9k.js +131 -0
  18. package/CharacterCounter-CPGdboVJ.js +22 -0
  19. package/CharacterCounter-CrY8QRuY.cjs +1 -0
  20. package/Checkbox-CvFsn_FL.js +380 -0
  21. package/Checkbox-DSxGAJX2.cjs +1 -0
  22. package/CheckboxGroup-Bk9DPq4I.cjs +1 -0
  23. package/CheckboxGroup-Dij9zKlF.js +54 -0
  24. package/Collection-C5ONNBqd.js +576 -0
  25. package/Collection-Csx3L9gh.cjs +1 -0
  26. package/ColorSchemeSwitch-CbAWIJCg.js +106 -0
  27. package/ColorSchemeSwitch-JRrCyYVv.cjs +16 -0
  28. package/ComboBox-BCaqPEIH.js +1375 -0
  29. package/ComboBox-gveQKHU3.cjs +1 -0
  30. package/DateField-CAQlzuDD.js +46 -0
  31. package/DateField-deVVFwKA.cjs +1 -0
  32. package/DateInputDivider-DnUxETEC.cjs +1 -0
  33. package/DateInputDivider-Dx8n1Lxp.js +2908 -0
  34. package/DateRangePicker-BmBvwqo6.js +881 -0
  35. package/DateRangePicker-BzfitoK0.cjs +6 -0
  36. package/Dialog-Bd5hK360.cjs +1 -0
  37. package/Dialog-Bxx8cBEq.js +208 -0
  38. package/Dialog-CYxThuMl.js +1609 -0
  39. package/Dialog-CwTEAujZ.cjs +1 -0
  40. package/DragAndDrop-CSwmPhxC.js +60 -0
  41. package/DragAndDrop-HvycSrKY.cjs +1 -0
  42. package/Dropdown-CaGon9OR.cjs +6 -0
  43. package/Dropdown-nkjzsVYX.js +84 -0
  44. package/FieldError-BZw8UzBk.cjs +1 -0
  45. package/FieldError-CZikNDxX.js +28 -0
  46. package/FieldError-DqdfJ3fs.cjs +1 -0
  47. package/FieldError-Dv3bBEjh.js +23 -0
  48. package/FileUpload-DYRZ0M9F.cjs +2 -0
  49. package/FileUpload-ULwcYDxs.js +2372 -0
  50. package/FocusScope-DwIqdYpQ.js +625 -0
  51. package/FocusScope-NaPbvuuS.cjs +1 -0
  52. package/Form-BuOomA4T.cjs +1 -0
  53. package/Form-CXcEMuBf.js +5 -0
  54. package/Grid--OhtgCo6.js +27 -0
  55. package/Grid-DVQtOcu9.cjs +1 -0
  56. package/GridItem-DlbSdRmB.js +246 -0
  57. package/GridItem-XgHmZWXY.cjs +1 -0
  58. package/Group-CeSsSQVC.js +44 -0
  59. package/Group-CgiqQHH1.cjs +1 -0
  60. package/Heading-BY5-QN4S.js +46 -0
  61. package/Heading-DoJAtYZf.cjs +1 -0
  62. package/Hidden-B5ir3Lei.js +34 -0
  63. package/Hidden-BxRZGdEW.cjs +1 -0
  64. package/InfoBanner-BS-dAfzO.cjs +1 -0
  65. package/InfoBanner-CVIBFSWx.js +82 -0
  66. package/Input-D8Ku_FQz.js +41 -0
  67. package/Input-DKSAYvsw.cjs +1 -0
  68. package/Label-C9ivwkAd.js +21 -0
  69. package/Label-CUV21CAv.cjs +1 -0
  70. package/Label-DkDOsmUF.js +16 -0
  71. package/Label-IMWAyoKb.cjs +1 -0
  72. package/Layout-BWeHHnqU.cjs +16 -0
  73. package/Layout-CCt_2L1k.js +468 -0
  74. package/Link-B-nus-FT.js +71 -0
  75. package/Link-DsnCtNeI.cjs +6 -0
  76. package/Link-SHMbeyIP.cjs +1 -0
  77. package/Link-uFowN4qv.js +59 -0
  78. package/LinkButton-CuBilDML.js +69 -0
  79. package/LinkButton-CymMrcGL.cjs +6 -0
  80. package/ListBox-CDOsQChA.cjs +1 -0
  81. package/ListBox-DOi_y_Lt.js +530 -0
  82. package/ListBoxButton-CFeNhJhr.cjs +1 -0
  83. package/ListBoxButton-O6zN3P4W.js +15 -0
  84. package/ListBoxSection-C1aLKL9p.js +1058 -0
  85. package/ListBoxSection-DGCP6xpf.cjs +1 -0
  86. package/ListKeyboardDelegate-BqMETvPv.cjs +1 -0
  87. package/ListKeyboardDelegate-DNOzQ8nc.js +158 -0
  88. package/LiveAnnouncer-B6177m92.js +51 -0
  89. package/LiveAnnouncer-CwEWPU8b.cjs +1 -0
  90. package/LocalizedStringFormatter-C0C54hjf.cjs +1 -0
  91. package/LocalizedStringFormatter-D-4Qyql0.js +77 -0
  92. package/Logo-BIrOEINM.js +133 -0
  93. package/Logo-DT2_2O43.cjs +1 -0
  94. package/NumberFormatter-DewVDY5w.cjs +1 -0
  95. package/NumberFormatter-DgOUVrge.js +119 -0
  96. package/OverlayArrow-D75k-EMl.cjs +1 -0
  97. package/OverlayArrow-DorA4Rbr.js +506 -0
  98. package/PressResponder-C06O3Z5P.cjs +1 -0
  99. package/PressResponder-CVEg5kND.js +33 -0
  100. package/ProgressBar-Bkw9zavs.cjs +1 -0
  101. package/ProgressBar-CEX2WNoW.js +77 -0
  102. package/ProgressBar-Dqh3ftSP.cjs +1 -0
  103. package/ProgressBar-gmAzSsrz.js +53 -0
  104. package/RSPContexts-BW2SEIqe.js +11 -0
  105. package/RSPContexts-D8hmBfGm.cjs +1 -0
  106. package/Radio-CDKrvQe4.cjs +1 -0
  107. package/Radio-_ukSkxPT.js +311 -0
  108. package/RangeCalendar-cbCKBPZv.cjs +11 -0
  109. package/RangeCalendar-uXwoBL-O.js +1685 -0
  110. package/SearchField-6yBGiojX.cjs +6 -0
  111. package/SearchField-DYl2uo7o.js +362 -0
  112. package/Select-CpHjd1tp.cjs +1 -0
  113. package/Select-PvCqY7Lp.js +646 -0
  114. package/SelectionManager-6H88Cv6B.js +1033 -0
  115. package/SelectionManager-C5NGBzvz.cjs +1 -0
  116. package/Separator-LYnFqh4L.js +60 -0
  117. package/Separator-nPra6kD-.cjs +1 -0
  118. package/Skeleton-BAwbfKBW.cjs +1 -0
  119. package/Skeleton-BePDRmrO.js +40 -0
  120. package/Spinner-D31SXm-U.js +41 -0
  121. package/Spinner-DAJtfxqJ.cjs +6 -0
  122. package/Table-B_N7wUmA.js +2451 -0
  123. package/Table-D9vNc_y-.cjs +16 -0
  124. package/Tabs-Ct6D83aR.js +404 -0
  125. package/Tabs-Dtcl2oK2.cjs +1 -0
  126. package/Tag-CVFkzg3s.cjs +1 -0
  127. package/Tag-g6HN-YCv.js +748 -0
  128. package/Text-3MNwRMpI.cjs +1 -0
  129. package/Text-B2K-BJKQ.cjs +1 -0
  130. package/Text-BN-g1iWi.js +32 -0
  131. package/Text-B_H68Tvq.js +15 -0
  132. package/TextArea-DSiQ578a.js +206 -0
  133. package/TextArea-cVyGBRbL.cjs +1 -0
  134. package/TextField-B70CL2qz.cjs +1 -0
  135. package/TextField-DBaRuNj7.js +119 -0
  136. package/TextField.module-BcpPBWnD.js +13 -0
  137. package/TextField.module-Dw5Rtn9y.cjs +1 -0
  138. package/Toast-CjpldAI8.js +988 -0
  139. package/Toast-DrkOGy4d.cjs +1 -0
  140. package/ToggleButtonGroup-BuU_6dYe.cjs +1 -0
  141. package/ToggleButtonGroup-Ceh9_yBM.js +210 -0
  142. package/Tooltip-BAIjaYax.js +283 -0
  143. package/Tooltip-CiWg4zIC.cjs +1 -0
  144. package/VisuallyHidden-CtXvK_Tw.cjs +1 -0
  145. package/VisuallyHidden-D-4z1VgU.js +40 -0
  146. package/accordion/index.cjs +1 -0
  147. package/accordion/index.js +5 -0
  148. package/arrow-right-Cw48o2oW.cjs +6 -0
  149. package/arrow-right-Dg8sttFO.js +14 -0
  150. package/assets/AccordionItem.css +1 -0
  151. package/assets/BadgeContainer.css +1 -0
  152. package/assets/Breadcrumbs.css +1 -0
  153. package/assets/Button.css +1 -0
  154. package/assets/ButtonGroup.css +1 -0
  155. package/assets/Card.css +1 -0
  156. package/assets/CharacterCounter.css +1 -0
  157. package/assets/Checkbox.css +1 -0
  158. package/assets/ColorSchemeSwitch.css +1 -0
  159. package/assets/ComboBox.css +1 -0
  160. package/assets/DateField.css +1 -0
  161. package/assets/DateInputDivider.css +1 -0
  162. package/assets/DateRangePicker.css +1 -0
  163. package/assets/Dialog.css +1 -0
  164. package/assets/Dropdown.css +1 -0
  165. package/assets/FieldError.css +1 -0
  166. package/assets/FileUpload.css +1 -0
  167. package/assets/GridItem.css +1 -0
  168. package/assets/Heading.css +1 -0
  169. package/assets/InfoBanner.css +1 -0
  170. package/assets/Label.css +1 -0
  171. package/assets/Layout.css +1 -0
  172. package/assets/Link.css +1 -0
  173. package/assets/LinkButton.css +1 -0
  174. package/assets/ListBoxSection.css +1 -0
  175. package/assets/Logo.css +1 -0
  176. package/assets/ProgressBar.css +1 -0
  177. package/assets/Radio.css +1 -0
  178. package/assets/RangeCalendar.css +1 -0
  179. package/assets/SearchField.css +1 -0
  180. package/assets/Select.css +1 -0
  181. package/assets/Skeleton.css +1 -0
  182. package/assets/Spinner.css +1 -0
  183. package/assets/Table.css +1 -0
  184. package/assets/Tabs.css +1 -0
  185. package/assets/Tag.css +1 -0
  186. package/assets/Text.css +1 -0
  187. package/assets/TextField.css +1 -0
  188. package/assets/Toast.css +1 -0
  189. package/assets/ToggleButtonGroup.css +1 -0
  190. package/assets/Tooltip.css +1 -0
  191. package/badge/index.cjs +1 -0
  192. package/badge/index.js +5 -0
  193. package/breadcrumbs/index.cjs +1 -0
  194. package/breadcrumbs/index.js +4 -0
  195. package/button/index.cjs +1 -0
  196. package/button/index.js +6 -0
  197. package/calendar/CalendarHeader.d.ts +2 -1
  198. package/calendar/index.cjs +1 -0
  199. package/calendar/index.js +5 -0
  200. package/card/index.cjs +1 -0
  201. package/card/index.js +10 -0
  202. package/character-counter/index.cjs +1 -0
  203. package/character-counter/index.js +4 -0
  204. package/check-CLF6Yxza.js +11 -0
  205. package/check-Dw9c62O4.cjs +6 -0
  206. package/checkbox/index.cjs +1 -0
  207. package/checkbox/index.js +6 -0
  208. package/chevron-down-C2E7aZ3N.cjs +6 -0
  209. package/chevron-down-Cd1bkzXT.js +13 -0
  210. package/clsx-C11secjj.cjs +1 -0
  211. package/clsx-OuTLNxxd.js +16 -0
  212. package/color-scheme-switch/index.cjs +1 -0
  213. package/color-scheme-switch/index.js +4 -0
  214. package/combobox/index.cjs +1 -0
  215. package/combobox/index.js +7 -0
  216. package/common/types.d.ts +2 -0
  217. package/context-B8cn10po.js +80 -0
  218. package/context-DjwhtgxQ.cjs +1 -0
  219. package/createLucideIcon-DAY4oS-S.cjs +21 -0
  220. package/createLucideIcon-DeWljiyi.js +79 -0
  221. package/date-field/index.cjs +1 -0
  222. package/date-field/index.js +8 -0
  223. package/date-picker/index.cjs +1 -0
  224. package/date-picker/index.js +5 -0
  225. package/dropdown/index.cjs +1 -0
  226. package/dropdown/index.js +5 -0
  227. package/field-error/FieldError.d.ts +4 -1
  228. package/field-error/index.cjs +1 -0
  229. package/field-error/index.js +4 -0
  230. package/file-upload/index.cjs +1 -0
  231. package/file-upload/index.js +4 -0
  232. package/filterDOMProps-BS2lrgFA.cjs +1 -0
  233. package/filterDOMProps-D6KHYVBX.js +24 -0
  234. package/focusSafely-Bqfo_DH7.cjs +1 -0
  235. package/focusSafely-C48ucRUz.js +56 -0
  236. package/getScrollParent-DuKmPmUa.cjs +1 -0
  237. package/getScrollParent-Ru2U2LlM.js +9 -0
  238. package/grid/Grid.d.ts +15 -4
  239. package/grid/GridItem.d.ts +31 -2
  240. package/grid/index.cjs +1 -0
  241. package/grid/index.d.ts +2 -2
  242. package/grid/index.js +8 -0
  243. package/heading/index.cjs +1 -0
  244. package/heading/index.js +4 -0
  245. package/index-BSMrH_Du.js +120 -0
  246. package/index-D97L3EBk.cjs +17 -0
  247. package/index.cjs +1 -169
  248. package/index.d.ts +0 -1
  249. package/index.js +127 -29979
  250. package/inertValue-B7loUihk.js +8 -0
  251. package/inertValue-BWmZ1afe.cjs +1 -0
  252. package/info-DkzVqB8I.js +38 -0
  253. package/info-DlzSeKbc.cjs +16 -0
  254. package/info-banner/index.cjs +1 -0
  255. package/info-banner/index.js +4 -0
  256. package/label/index.cjs +1 -0
  257. package/label/index.js +4 -0
  258. package/layout/index.cjs +1 -0
  259. package/layout/index.js +8 -0
  260. package/link/index.cjs +1 -0
  261. package/link/index.js +6 -0
  262. package/link-button/index.cjs +1 -0
  263. package/link-button/index.js +6 -0
  264. package/list-box/index.cjs +1 -0
  265. package/list-box/index.js +9 -0
  266. package/logo/index.cjs +1 -0
  267. package/logo/index.js +4 -0
  268. package/modal/index.cjs +1 -0
  269. package/modal/index.js +6 -0
  270. package/number-BE8InLgI.js +6 -0
  271. package/number-E0x3H9cL.cjs +1 -0
  272. package/package.json +4 -4
  273. package/progress-bar/index.cjs +1 -0
  274. package/progress-bar/index.js +4 -0
  275. package/radio/index.cjs +1 -0
  276. package/radio/index.js +5 -0
  277. package/scrollIntoView-ClEACHUk.js +57 -0
  278. package/scrollIntoView-DRSoJp89.cjs +1 -0
  279. package/search-field/index.cjs +1 -0
  280. package/search-field/index.js +4 -0
  281. package/select/index.cjs +1 -0
  282. package/select/index.js +4 -0
  283. package/skeleton/Skeleton.d.ts +5 -0
  284. package/skeleton/index.cjs +1 -0
  285. package/skeleton/index.js +4 -0
  286. package/spinner/index.cjs +1 -0
  287. package/spinner/index.js +4 -0
  288. package/square-arrow-out-up-right-BCAO2eJs.cjs +6 -0
  289. package/square-arrow-out-up-right-BkyqV2PN.js +15 -0
  290. package/table/Table.d.ts +7 -1
  291. package/table/index.cjs +1 -0
  292. package/table/index.js +9 -0
  293. package/tabs/index.cjs +1 -0
  294. package/tabs/index.js +4 -0
  295. package/tag/index.cjs +1 -0
  296. package/tag/index.js +5 -0
  297. package/text/index.cjs +1 -0
  298. package/text/index.js +4 -0
  299. package/textfield/index.cjs +1 -0
  300. package/textfield/index.js +7 -0
  301. package/theme/index.cjs +1 -0
  302. package/theme/index.d.ts +4 -0
  303. package/{theme.js → theme/index.js} +2 -2
  304. package/theme/tokens.d.ts +10 -0
  305. package/toast/index.cjs +1 -0
  306. package/toast/index.js +9 -0
  307. package/toggle-button/index.cjs +1 -0
  308. package/toggle-button/index.js +5 -0
  309. package/tokens-p6pg1Cea.cjs +1 -0
  310. package/{tokens-C0U7hdoO.js → tokens-xp-7KMK7.js} +18 -8
  311. package/tooltip/index.cjs +1 -0
  312. package/tooltip/index.js +5 -0
  313. package/triangle-alert-C0lvfCYH.cjs +6 -0
  314. package/triangle-alert-wxyxspAl.js +21 -0
  315. package/useButton-B1Fa-6qE.cjs +1 -0
  316. package/useButton-C-Lq7CNY.js +47 -0
  317. package/useCollator-C_ozeWLo.cjs +1 -0
  318. package/useCollator-CgZcHC8N.js +11 -0
  319. package/useControlledState-D0L6S_5r.cjs +1 -0
  320. package/useControlledState-u436Wbp1.js +30 -0
  321. package/useDateFormatter-C53Uxdli.js +1571 -0
  322. package/useDateFormatter-g2maMTGH.cjs +1 -0
  323. package/useDescription-CVKhFa3c.js +32 -0
  324. package/useDescription-DmQYSEES.cjs +1 -0
  325. package/useEvent-CjkbBniY.cjs +1 -0
  326. package/useEvent-Cyd2ZL0c.js +21 -0
  327. package/useField-B1RU0GKs.cjs +1 -0
  328. package/useField-BPMAlIbU.js +35 -0
  329. package/useFilter-ChIbnALW.js +35 -0
  330. package/useFilter-CtIwF2qW.cjs +1 -0
  331. package/useFocusRing-BDGH3lpn.js +82 -0
  332. package/useFocusRing-CbImDrwF.cjs +1 -0
  333. package/useFocusable-CaedRTpB.js +74 -0
  334. package/useFocusable-CuPQ7Cm5.cjs +1 -0
  335. package/useFormValidation-ClximP89.cjs +1 -0
  336. package/useFormValidation-R8hQIjWP.js +215 -0
  337. package/useHasTabbableChild-DgphNvnk.cjs +1 -0
  338. package/useHasTabbableChild-DsD9AJwE.js +34 -0
  339. package/useHighlightSelectionDescription-BizKjvPU.cjs +1 -0
  340. package/useHighlightSelectionDescription-DFfcgbUj.js +567 -0
  341. package/useHover-_mv5J4_q.cjs +1 -0
  342. package/useHover-qRAon4nS.js +490 -0
  343. package/useLabel-DDdAJ1JO.js +23 -0
  344. package/useLabel-m_S5xkHy.cjs +1 -0
  345. package/useLabels-BLOfc6Y-.cjs +1 -0
  346. package/useLabels-BZjoZA1Z.js +17 -0
  347. package/useListState-Ca2-uZMO.cjs +1 -0
  348. package/useListState-DFQ9d-uE.js +132 -0
  349. package/useLocalizedStringFormatter-D07YB2e1.js +22 -0
  350. package/useLocalizedStringFormatter-u9SJaOwk.cjs +1 -0
  351. package/useObserveElement-BdI4zgd7.js +27 -0
  352. package/useObserveElement-BzEr5D32.cjs +1 -0
  353. package/usePress-BFa6cT9o.cjs +7 -0
  354. package/usePress-CUJ3pMOw.js +542 -0
  355. package/useSingleSelectListState-C-nB8cug.js +34 -0
  356. package/useSingleSelectListState-MGNxUTum.cjs +1 -0
  357. package/useTextField-5OZQPyOW.js +86 -0
  358. package/useTextField-CtUDWsUl.cjs +1 -0
  359. package/useToggleState-Bz5rAf4C.js +18 -0
  360. package/useToggleState-DoIkSQdj.cjs +1 -0
  361. package/useUpdateEffect-CCDx8D4X.js +13 -0
  362. package/useUpdateEffect-sk3kiVGz.cjs +1 -0
  363. package/utils-BNtZbAib.cjs +1 -0
  364. package/utils-HNTsIwux.js +308 -0
  365. package/x-CvxiAZTW.cjs +6 -0
  366. package/x-JK7i-TQC.js +14 -0
  367. package/flex/Flex.d.ts +0 -17
  368. package/flex/FlexItem.d.ts +0 -15
  369. package/flex/index.d.ts +0 -2
  370. package/index.css +0 -1
  371. package/theme.cjs +0 -1
  372. package/tokens-COoF1t17.cjs +0 -1
  373. /package/{global.css → assets/global.css} +0 -0
@@ -0,0 +1,988 @@
1
+ import { jsx as $, jsxs as y, Fragment as ge } from "react/jsx-runtime";
2
+ import { B as Te } from "./Button-CbFRzRrF.js";
3
+ import A, { useState as P, useCallback as L, useEffect as g, useRef as v, useMemo as ye } from "react";
4
+ import { createPortal as Le, flushSync as _e } from "react-dom";
5
+ import { c as I } from "./clsx-OuTLNxxd.js";
6
+ import { s as N } from "./index-BSMrH_Du.js";
7
+ import { $ as j, c as we, f as Be, g as Ie, d as Ce } from "./utils-HNTsIwux.js";
8
+ import { $ as Ae, r as _, s as E } from "./useHover-qRAon4nS.js";
9
+ import { a as Pe } from "./useFocusRing-BDGH3lpn.js";
10
+ import { $ as F } from "./useLocalizedStringFormatter-D07YB2e1.js";
11
+ import { $ as Ne } from "./filterDOMProps-D6KHYVBX.js";
12
+ import { T as je } from "./triangle-alert-wxyxspAl.js";
13
+ import { C as Fe, I as Se, a as De } from "./info-DkzVqB8I.js";
14
+ import { X as Re } from "./x-JK7i-TQC.js";
15
+ import './assets/Toast.css';const S = 1, w = Symbol.for("react-aria-landmark-manager");
16
+ function Me(t) {
17
+ return document.addEventListener("react-aria-landmark-manager-change", t), () => document.removeEventListener("react-aria-landmark-manager-change", t);
18
+ }
19
+ function C() {
20
+ if (typeof document > "u") return null;
21
+ let t = document[w];
22
+ return t && t.version >= S ? t : (document[w] = new He(), document.dispatchEvent(new CustomEvent("react-aria-landmark-manager-change")), document[w]);
23
+ }
24
+ function Oe() {
25
+ return N.useSyncExternalStore(Me, C, C);
26
+ }
27
+ class He {
28
+ setupIfNeeded() {
29
+ this.isListening || (document.addEventListener("keydown", this.f6Handler, {
30
+ capture: !0
31
+ }), document.addEventListener("focusin", this.focusinHandler, {
32
+ capture: !0
33
+ }), document.addEventListener("focusout", this.focusoutHandler, {
34
+ capture: !0
35
+ }), this.isListening = !0);
36
+ }
37
+ teardownIfNeeded() {
38
+ !this.isListening || this.landmarks.length > 0 || this.refCount > 0 || (document.removeEventListener("keydown", this.f6Handler, {
39
+ capture: !0
40
+ }), document.removeEventListener("focusin", this.focusinHandler, {
41
+ capture: !0
42
+ }), document.removeEventListener("focusout", this.focusoutHandler, {
43
+ capture: !0
44
+ }), this.isListening = !1);
45
+ }
46
+ focusLandmark(e, n) {
47
+ var i, o;
48
+ (o = this.landmarks.find((r) => r.ref.current === e)) === null || o === void 0 || (i = o.focus) === null || i === void 0 || i.call(o, n);
49
+ }
50
+ /**
51
+ * Return set of landmarks with a specific role.
52
+ */
53
+ getLandmarksByRole(e) {
54
+ return new Set(this.landmarks.filter((n) => n.role === e));
55
+ }
56
+ /**
57
+ * Return first landmark with a specific role.
58
+ */
59
+ getLandmarkByRole(e) {
60
+ return this.landmarks.find((n) => n.role === e);
61
+ }
62
+ addLandmark(e) {
63
+ if (this.setupIfNeeded(), this.landmarks.find((o) => o.ref === e.ref) || !e.ref.current) return;
64
+ if (this.landmarks.filter((o) => o.role === "main").length > 1 && process.env.NODE_ENV !== "production" && console.error('Page can contain no more than one landmark with the role "main".'), this.landmarks.length === 0) {
65
+ this.landmarks = [
66
+ e
67
+ ], this.checkLabels(e.role);
68
+ return;
69
+ }
70
+ let n = 0, i = this.landmarks.length - 1;
71
+ for (; n <= i; ) {
72
+ let o = Math.floor((n + i) / 2), r = e.ref.current.compareDocumentPosition(this.landmarks[o].ref.current);
73
+ !!(r & Node.DOCUMENT_POSITION_PRECEDING || r & Node.DOCUMENT_POSITION_CONTAINS) ? n = o + 1 : i = o - 1;
74
+ }
75
+ this.landmarks.splice(n, 0, e), this.checkLabels(e.role);
76
+ }
77
+ updateLandmark(e) {
78
+ let n = this.landmarks.findIndex((i) => i.ref === e.ref);
79
+ n >= 0 && (this.landmarks[n] = {
80
+ ...this.landmarks[n],
81
+ ...e
82
+ }, this.checkLabels(this.landmarks[n].role));
83
+ }
84
+ removeLandmark(e) {
85
+ this.landmarks = this.landmarks.filter((n) => n.ref !== e), this.teardownIfNeeded();
86
+ }
87
+ /**
88
+ * Warn if there are 2+ landmarks with the same role but no label.
89
+ * Labels for landmarks with the same role must also be unique.
90
+ *
91
+ * See https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/.
92
+ */
93
+ checkLabels(e) {
94
+ let n = this.getLandmarksByRole(e);
95
+ if (n.size > 1) {
96
+ let i = [
97
+ ...n
98
+ ].filter((o) => !o.label);
99
+ if (i.length > 0 && process.env.NODE_ENV !== "production") console.warn(`Page contains more than one landmark with the '${e}' role. If two or more landmarks on a page share the same role, all must be labeled with an aria-label or aria-labelledby attribute: `, i.map((o) => o.ref.current));
100
+ else if (process.env.NODE_ENV !== "production") {
101
+ let o = [
102
+ ...n
103
+ ].map((u) => u.label);
104
+ o.filter((u, a) => o.indexOf(u) !== a).forEach((u) => {
105
+ console.warn(`Page contains more than one landmark with the '${e}' role and '${u}' label. If two or more landmarks on a page share the same role, they must have unique labels: `, [
106
+ ...n
107
+ ].filter((a) => a.label === u).map((a) => a.ref.current));
108
+ });
109
+ }
110
+ }
111
+ }
112
+ /**
113
+ * Get the landmark that is the closest parent in the DOM.
114
+ * Returns undefined if no parent is a landmark.
115
+ */
116
+ closestLandmark(e) {
117
+ let n = new Map(this.landmarks.map((o) => [
118
+ o.ref.current,
119
+ o
120
+ ])), i = e;
121
+ for (; i && !n.has(i) && i !== document.body && i.parentElement; ) i = i.parentElement;
122
+ return n.get(i);
123
+ }
124
+ /**
125
+ * Gets the next landmark, in DOM focus order, or previous if backwards is specified.
126
+ * If last landmark, next should be the first landmark.
127
+ * If not inside a landmark, will return first landmark.
128
+ * Returns undefined if there are no landmarks.
129
+ */
130
+ getNextLandmark(e, { backward: n }) {
131
+ var i;
132
+ let o = this.closestLandmark(e), r = n ? this.landmarks.length - 1 : 0;
133
+ o && (r = this.landmarks.indexOf(o) + (n ? -1 : 1));
134
+ let u = () => {
135
+ if (r < 0) {
136
+ if (!e.dispatchEvent(new CustomEvent("react-aria-landmark-navigation", {
137
+ detail: {
138
+ direction: "backward"
139
+ },
140
+ bubbles: !0,
141
+ cancelable: !0
142
+ }))) return !0;
143
+ r = this.landmarks.length - 1;
144
+ } else if (r >= this.landmarks.length) {
145
+ if (!e.dispatchEvent(new CustomEvent("react-aria-landmark-navigation", {
146
+ detail: {
147
+ direction: "forward"
148
+ },
149
+ bubbles: !0,
150
+ cancelable: !0
151
+ }))) return !0;
152
+ r = 0;
153
+ }
154
+ return r < 0 || r >= this.landmarks.length;
155
+ };
156
+ if (u()) return;
157
+ let a = r;
158
+ for (; !((i = this.landmarks[r].ref.current) === null || i === void 0) && i.closest("[aria-hidden=true]"); ) {
159
+ if (r += n ? -1 : 1, u()) return;
160
+ if (r === a) break;
161
+ }
162
+ return this.landmarks[r];
163
+ }
164
+ /**
165
+ * Look at next landmark. If an element was previously focused inside, restore focus there.
166
+ * If not, focus the landmark itself.
167
+ * If no landmarks at all, or none with focusable elements, don't move focus.
168
+ */
169
+ f6Handler(e) {
170
+ e.key === "F6" && (e.altKey ? this.focusMain() : this.navigate(e.target, e.shiftKey)) && (e.preventDefault(), e.stopPropagation());
171
+ }
172
+ focusMain() {
173
+ let e = this.getLandmarkByRole("main");
174
+ return e && e.ref.current && document.contains(e.ref.current) ? (this.focusLandmark(e.ref.current, "forward"), !0) : !1;
175
+ }
176
+ navigate(e, n) {
177
+ let i = this.getNextLandmark(e, {
178
+ backward: n
179
+ });
180
+ if (!i) return !1;
181
+ if (i.lastFocused) {
182
+ let o = i.lastFocused;
183
+ if (document.body.contains(o))
184
+ return o.focus(), !0;
185
+ }
186
+ return i.ref.current && document.contains(i.ref.current) ? (this.focusLandmark(i.ref.current, n ? "backward" : "forward"), !0) : !1;
187
+ }
188
+ /**
189
+ * Sets lastFocused for a landmark, if focus is moved within that landmark.
190
+ * Lets the last focused landmark know it was blurred if something else is focused.
191
+ */
192
+ focusinHandler(e) {
193
+ let n = this.closestLandmark(e.target);
194
+ n && n.ref.current !== e.target && this.updateLandmark({
195
+ ref: n.ref,
196
+ lastFocused: e.target
197
+ });
198
+ let i = e.relatedTarget;
199
+ if (i) {
200
+ let o = this.closestLandmark(i);
201
+ o && o.ref.current === i && o.blur();
202
+ }
203
+ }
204
+ /**
205
+ * Track if the focus is lost to the body. If it is, do cleanup on the landmark that last had focus.
206
+ */
207
+ focusoutHandler(e) {
208
+ let n = e.target, i = e.relatedTarget;
209
+ if (!i || i === document) {
210
+ let o = this.closestLandmark(n);
211
+ o && o.ref.current === n && o.blur();
212
+ }
213
+ }
214
+ createLandmarkController() {
215
+ let e = this;
216
+ return e.refCount++, e.setupIfNeeded(), {
217
+ navigate(n, i) {
218
+ let o = (i == null ? void 0 : i.from) || document.activeElement;
219
+ return e.navigate(o, n === "backward");
220
+ },
221
+ focusNext(n) {
222
+ let i = (n == null ? void 0 : n.from) || document.activeElement;
223
+ return e.navigate(i, !1);
224
+ },
225
+ focusPrevious(n) {
226
+ let i = (n == null ? void 0 : n.from) || document.activeElement;
227
+ return e.navigate(i, !0);
228
+ },
229
+ focusMain() {
230
+ return e.focusMain();
231
+ },
232
+ dispose() {
233
+ e && (e.refCount--, e.teardownIfNeeded(), e = null);
234
+ }
235
+ };
236
+ }
237
+ registerLandmark(e) {
238
+ return this.landmarks.find((n) => n.ref === e.ref) ? this.updateLandmark(e) : this.addLandmark(e), () => this.removeLandmark(e.ref);
239
+ }
240
+ constructor() {
241
+ this.landmarks = [], this.isListening = !1, this.refCount = 0, this.version = S, this.f6Handler = this.f6Handler.bind(this), this.focusinHandler = this.focusinHandler.bind(this), this.focusoutHandler = this.focusoutHandler.bind(this);
242
+ }
243
+ }
244
+ function Ve(t, e) {
245
+ const { role: n, "aria-label": i, "aria-labelledby": o, focus: r } = t;
246
+ let u = Oe(), a = i || o, [p, d] = P(!1), f = L(() => {
247
+ d(!0);
248
+ }, [
249
+ d
250
+ ]), m = L(() => {
251
+ d(!1);
252
+ }, [
253
+ d
254
+ ]);
255
+ return j(() => {
256
+ if (u) return u.registerLandmark({
257
+ ref: e,
258
+ label: a,
259
+ role: n,
260
+ focus: r || f,
261
+ blur: m
262
+ });
263
+ }, [
264
+ u,
265
+ a,
266
+ e,
267
+ n,
268
+ r,
269
+ f,
270
+ m
271
+ ]), g(() => {
272
+ var s;
273
+ p && ((s = e.current) === null || s === void 0 || s.focus());
274
+ }, [
275
+ p,
276
+ e
277
+ ]), {
278
+ landmarkProps: {
279
+ role: n,
280
+ tabIndex: p ? -1 : void 0,
281
+ "aria-label": i,
282
+ "aria-labelledby": o
283
+ }
284
+ };
285
+ }
286
+ var D = {};
287
+ D = {
288
+ close: "إغلاق",
289
+ notifications: (t, e) => `${e.plural(t.count, {
290
+ one: () => `${e.number(t.count)} إشعار`,
291
+ other: () => `${e.number(t.count)} إشعارات`
292
+ })}.`
293
+ };
294
+ var R = {};
295
+ R = {
296
+ close: "Затвори",
297
+ notifications: (t, e) => `${e.plural(t.count, {
298
+ one: () => `${e.number(t.count)} известие`,
299
+ other: () => `${e.number(t.count)} известия`
300
+ })}.`
301
+ };
302
+ var M = {};
303
+ M = {
304
+ close: "Zavřít",
305
+ notifications: (t, e) => `${e.plural(t.count, {
306
+ one: () => `${e.number(t.count)} oznámení`,
307
+ other: () => `${e.number(t.count)} oznámení`
308
+ })}.`
309
+ };
310
+ var O = {};
311
+ O = {
312
+ close: "Luk",
313
+ notifications: (t, e) => `${e.plural(t.count, {
314
+ one: () => `${e.number(t.count)} besked`,
315
+ other: () => `${e.number(t.count)} beskeder`
316
+ })}.`
317
+ };
318
+ var H = {};
319
+ H = {
320
+ close: "Schließen",
321
+ notifications: (t, e) => `${e.plural(t.count, {
322
+ one: () => `${e.number(t.count)} Benachrichtigung`,
323
+ other: () => `${e.number(t.count)} Benachrichtigungen`
324
+ })}.`
325
+ };
326
+ var V = {};
327
+ V = {
328
+ close: "Κλείσιμο",
329
+ notifications: (t, e) => `${e.plural(t.count, {
330
+ one: () => `${e.number(t.count)} ειδοποίηση`,
331
+ other: () => `${e.number(t.count)} ειδοποιήσεις`
332
+ })}.`
333
+ };
334
+ var z = {};
335
+ z = {
336
+ close: "Close",
337
+ notifications: (t, e) => `${e.plural(t.count, {
338
+ one: () => `${e.number(t.count)} notification`,
339
+ other: () => `${e.number(t.count)} notifications`
340
+ })}.`
341
+ };
342
+ var U = {};
343
+ U = {
344
+ close: "Cerrar",
345
+ notifications: (t, e) => `${e.plural(t.count, {
346
+ one: () => `${e.number(t.count)} notificación`,
347
+ other: () => `${e.number(t.count)} notificaciones`
348
+ })}.`
349
+ };
350
+ var W = {};
351
+ W = {
352
+ close: "Sule",
353
+ notifications: (t, e) => `${e.plural(t.count, {
354
+ one: () => `${e.number(t.count)} teatis`,
355
+ other: () => `${e.number(t.count)} teatist`
356
+ })}.`
357
+ };
358
+ var K = {};
359
+ K = {
360
+ close: "Sulje",
361
+ notifications: (t, e) => `${e.plural(t.count, {
362
+ one: () => `${e.number(t.count)} ilmoitus`,
363
+ other: () => `${e.number(t.count)} ilmoitusta`
364
+ })}.`
365
+ };
366
+ var Z = {};
367
+ Z = {
368
+ close: "Fermer",
369
+ notifications: (t, e) => `${e.plural(t.count, {
370
+ one: () => `${e.number(t.count)} notification`,
371
+ other: () => `${e.number(t.count)} notifications`
372
+ })}.`
373
+ };
374
+ var G = {};
375
+ G = {
376
+ close: "סגור",
377
+ notifications: (t, e) => `${e.plural(t.count, {
378
+ one: () => `${e.number(t.count)} התראה`,
379
+ other: () => `${e.number(t.count)} התראות`
380
+ })}.`
381
+ };
382
+ var J = {};
383
+ J = {
384
+ close: "Zatvori",
385
+ notifications: (t, e) => `${e.plural(t.count, {
386
+ one: () => `${e.number(t.count)} obavijest`,
387
+ other: () => `${e.number(t.count)} obavijesti`
388
+ })}.`
389
+ };
390
+ var Q = {};
391
+ Q = {
392
+ close: "Bezárás",
393
+ notifications: (t, e) => `${e.plural(t.count, {
394
+ one: () => `${e.number(t.count)} értesítés`,
395
+ other: () => `${e.number(t.count)} értesítés`
396
+ })}.`
397
+ };
398
+ var X = {};
399
+ X = {
400
+ close: "Chiudi",
401
+ notifications: (t, e) => `${e.plural(t.count, {
402
+ one: () => `${e.number(t.count)} notifica`,
403
+ other: () => `${e.number(t.count)} notifiche`
404
+ })}.`
405
+ };
406
+ var q = {};
407
+ q = {
408
+ close: "閉じる",
409
+ notifications: (t, e) => `${e.plural(t.count, {
410
+ one: () => `${e.number(t.count)} 個の通知`,
411
+ other: () => `${e.number(t.count)} 個の通知`
412
+ })}。`
413
+ };
414
+ var Y = {};
415
+ Y = {
416
+ close: "닫기",
417
+ notifications: (t, e) => `${e.plural(t.count, {
418
+ one: () => `${e.number(t.count)}개 알림`,
419
+ other: () => `${e.number(t.count)}개 알림`
420
+ })}.`
421
+ };
422
+ var ee = {};
423
+ ee = {
424
+ close: "Uždaryti",
425
+ notifications: (t, e) => `${e.plural(t.count, {
426
+ one: () => `${e.number(t.count)} pranešimas`,
427
+ other: () => `${e.number(t.count)} pranešimai`
428
+ })}.`
429
+ };
430
+ var te = {};
431
+ te = {
432
+ close: "Aizvērt",
433
+ notifications: (t, e) => `${e.plural(t.count, {
434
+ one: () => `${e.number(t.count)} paziņojums`,
435
+ other: () => `${e.number(t.count)} paziņojumi`
436
+ })}.`
437
+ };
438
+ var ne = {};
439
+ ne = {
440
+ close: "Lukk",
441
+ notifications: (t, e) => `${e.plural(t.count, {
442
+ one: () => `${e.number(t.count)} varsling`,
443
+ other: () => `${e.number(t.count)} varsler`
444
+ })}.`
445
+ };
446
+ var ie = {};
447
+ ie = {
448
+ close: "Sluiten",
449
+ notifications: (t, e) => `${e.plural(t.count, {
450
+ one: () => `${e.number(t.count)} melding`,
451
+ other: () => `${e.number(t.count)} meldingen`
452
+ })}.`
453
+ };
454
+ var oe = {};
455
+ oe = {
456
+ close: "Zamknij",
457
+ notifications: (t, e) => `${e.plural(t.count, {
458
+ one: () => `${e.number(t.count)} powiadomienie`,
459
+ few: () => `${e.number(t.count)} powiadomienia`,
460
+ many: () => `${e.number(t.count)} powiadomień`,
461
+ other: () => `${e.number(t.count)} powiadomienia`
462
+ })}.`
463
+ };
464
+ var re = {};
465
+ re = {
466
+ close: "Fechar",
467
+ notifications: (t, e) => `${e.plural(t.count, {
468
+ one: () => `${e.number(t.count)} notificação`,
469
+ other: () => `${e.number(t.count)} notificações`
470
+ })}.`
471
+ };
472
+ var ue = {};
473
+ ue = {
474
+ close: "Fechar",
475
+ notifications: (t, e) => `${e.plural(t.count, {
476
+ one: () => `${e.number(t.count)} notificação`,
477
+ other: () => `${e.number(t.count)} notificações`
478
+ })}.`
479
+ };
480
+ var ae = {};
481
+ ae = {
482
+ close: "Închideţi",
483
+ notifications: (t, e) => `${e.plural(t.count, {
484
+ one: () => `${e.number(t.count)} notificare`,
485
+ other: () => `${e.number(t.count)} notificări`
486
+ })}.`
487
+ };
488
+ var se = {};
489
+ se = {
490
+ close: "Закрыть",
491
+ notifications: (t, e) => `${e.plural(t.count, {
492
+ one: () => `${e.number(t.count)} уведомление`,
493
+ other: () => `${e.number(t.count)} уведомления`
494
+ })}.`
495
+ };
496
+ var le = {};
497
+ le = {
498
+ close: "Zatvoriť",
499
+ notifications: (t, e) => `${e.plural(t.count, {
500
+ one: () => `${e.number(t.count)} oznámenie`,
501
+ few: () => `${e.number(t.count)} oznámenia`,
502
+ other: () => `${e.number(t.count)} oznámení`
503
+ })}.`
504
+ };
505
+ var ce = {};
506
+ ce = {
507
+ close: "Zapri",
508
+ notifications: (t, e) => `${e.plural(t.count, {
509
+ one: () => `${e.number(t.count)} obvestilo`,
510
+ two: () => `${e.number(t.count)} obvestili`,
511
+ few: () => `${e.number(t.count)} obvestila`,
512
+ other: () => `${e.number(t.count)} obvestil`
513
+ })}.`
514
+ };
515
+ var de = {};
516
+ de = {
517
+ close: "Zatvori",
518
+ notifications: (t, e) => `${e.plural(t.count, {
519
+ one: () => `${e.number(t.count)} obaveštenje`,
520
+ other: () => `${e.number(t.count)} obaveštenja`
521
+ })}.`
522
+ };
523
+ var fe = {};
524
+ fe = {
525
+ close: "Stäng",
526
+ notifications: (t, e) => `${e.plural(t.count, {
527
+ one: () => `${e.number(t.count)} meddelande`,
528
+ other: () => `${e.number(t.count)} meddelanden`
529
+ })}.`
530
+ };
531
+ var be = {};
532
+ be = {
533
+ close: "Kapat",
534
+ notifications: (t, e) => `${e.plural(t.count, {
535
+ one: () => `${e.number(t.count)} bildirim`,
536
+ other: () => `${e.number(t.count)} bildirim`
537
+ })}.`
538
+ };
539
+ var me = {};
540
+ me = {
541
+ close: "Закрити",
542
+ notifications: (t, e) => `${e.plural(t.count, {
543
+ one: () => `${e.number(t.count)} сповіщення`,
544
+ other: () => `${e.number(t.count)} сповіщення`
545
+ })}.`
546
+ };
547
+ var he = {};
548
+ he = {
549
+ close: "关闭",
550
+ notifications: (t, e) => `${e.plural(t.count, {
551
+ one: () => `${e.number(t.count)} 个通知`,
552
+ other: () => `${e.number(t.count)} 个通知`
553
+ })}。`
554
+ };
555
+ var $e = {};
556
+ $e = {
557
+ close: "關閉",
558
+ notifications: (t, e) => `${e.plural(t.count, {
559
+ one: () => `${e.number(t.count)} 個通知`,
560
+ other: () => `${e.number(t.count)} 個通知`
561
+ })}。`
562
+ };
563
+ var B = {};
564
+ B = {
565
+ "ar-AE": D,
566
+ "bg-BG": R,
567
+ "cs-CZ": M,
568
+ "da-DK": O,
569
+ "de-DE": H,
570
+ "el-GR": V,
571
+ "en-US": z,
572
+ "es-ES": U,
573
+ "et-EE": W,
574
+ "fi-FI": K,
575
+ "fr-FR": Z,
576
+ "he-IL": G,
577
+ "hr-HR": J,
578
+ "hu-HU": Q,
579
+ "it-IT": X,
580
+ "ja-JP": q,
581
+ "ko-KR": Y,
582
+ "lt-LT": ee,
583
+ "lv-LV": te,
584
+ "nb-NO": ne,
585
+ "nl-NL": ie,
586
+ "pl-PL": oe,
587
+ "pt-BR": re,
588
+ "pt-PT": ue,
589
+ "ro-RO": ae,
590
+ "ru-RU": se,
591
+ "sk-SK": le,
592
+ "sl-SI": ce,
593
+ "sr-SP": de,
594
+ "sv-SE": fe,
595
+ "tr-TR": be,
596
+ "uk-UA": me,
597
+ "zh-CN": he,
598
+ "zh-TW": $e
599
+ };
600
+ function ze(t) {
601
+ return t && t.__esModule ? t.default : t;
602
+ }
603
+ function Ue(t, e, n) {
604
+ let { key: i, timer: o, timeout: r } = t.toast;
605
+ g(() => {
606
+ if (!(o == null || r == null))
607
+ return o.reset(r), () => {
608
+ o.pause();
609
+ };
610
+ }, [
611
+ o,
612
+ r
613
+ ]);
614
+ let u = we(), a = Be(), p = F(ze(B), "@react-aria/toast"), [d, f] = P(!1);
615
+ return g(() => {
616
+ f(!0);
617
+ }, []), {
618
+ toastProps: {
619
+ ...Ne(t, {
620
+ labelable: !0
621
+ }),
622
+ role: "alertdialog",
623
+ "aria-modal": "false",
624
+ "aria-labelledby": t["aria-labelledby"] || u,
625
+ "aria-describedby": t["aria-describedby"] || a,
626
+ tabIndex: 0
627
+ },
628
+ contentProps: {
629
+ role: "alert",
630
+ "aria-atomic": "true",
631
+ "aria-hidden": d ? void 0 : "true"
632
+ },
633
+ titleProps: {
634
+ id: u
635
+ },
636
+ descriptionProps: {
637
+ id: a
638
+ },
639
+ closeButtonProps: {
640
+ "aria-label": p.format("close"),
641
+ onPress: () => e.close(i)
642
+ }
643
+ };
644
+ }
645
+ function We(t) {
646
+ return t && t.__esModule ? t.default : t;
647
+ }
648
+ function Ke(t, e, n) {
649
+ let i = F(We(B), "@react-aria/toast"), { landmarkProps: o } = Ve({
650
+ role: "region",
651
+ "aria-label": t["aria-label"] || i.format("notifications", {
652
+ count: e.visibleToasts.length
653
+ })
654
+ }, n), r = v(!1), u = v(!1), a = Ie(() => {
655
+ r.current || u.current ? e.pauseAll() : e.resumeAll();
656
+ }), { hoverProps: p } = Ae({
657
+ onHoverStart: () => {
658
+ r.current = !0, a();
659
+ },
660
+ onHoverEnd: () => {
661
+ r.current = !1, a();
662
+ }
663
+ }), d = v([]), f = v(e.visibleToasts), m = v(null);
664
+ j(() => {
665
+ if (m.current === -1 || e.visibleToasts.length === 0 || !n.current) {
666
+ d.current = [], f.current = e.visibleToasts;
667
+ return;
668
+ }
669
+ if (d.current = [
670
+ ...n.current.querySelectorAll('[role="alertdialog"]')
671
+ ], f.current.length === e.visibleToasts.length && e.visibleToasts.every((c, b) => c.key === f.current[b].key)) {
672
+ f.current = e.visibleToasts;
673
+ return;
674
+ }
675
+ let l = f.current.map((c, b) => ({
676
+ ...c,
677
+ i: b,
678
+ isRemoved: !e.visibleToasts.some((h) => c.key === h.key)
679
+ })), T = l.findIndex((c) => c.i === m.current && c.isRemoved);
680
+ if (T > -1) {
681
+ var k;
682
+ if (_() === "pointer" && (!((k = s.current) === null || k === void 0) && k.isConnected)) E(s.current);
683
+ else {
684
+ let c = 0, b, h;
685
+ for (; c <= T; )
686
+ l[c].isRemoved || (h = Math.max(0, c - 1)), c++;
687
+ for (; c < l.length; ) {
688
+ if (!l[c].isRemoved) {
689
+ b = c - 1;
690
+ break;
691
+ }
692
+ c++;
693
+ }
694
+ h === void 0 && b === void 0 && (h = 0), h >= 0 && h < d.current.length ? E(d.current[h]) : b >= 0 && b < d.current.length && E(d.current[b]);
695
+ }
696
+ }
697
+ f.current = e.visibleToasts;
698
+ }, [
699
+ e.visibleToasts,
700
+ n,
701
+ a
702
+ ]);
703
+ let s = v(null), { focusWithinProps: Ee } = Pe({
704
+ onFocusWithin: (l) => {
705
+ u.current = !0, s.current = l.relatedTarget, a();
706
+ },
707
+ onBlurWithin: () => {
708
+ u.current = !1, s.current = null, a();
709
+ }
710
+ });
711
+ return g(() => {
712
+ var l;
713
+ e.visibleToasts.length === 0 && (!((l = s.current) === null || l === void 0) && l.isConnected) && (_() === "pointer" ? E(s.current) : s.current.focus(), s.current = null);
714
+ }, [
715
+ n,
716
+ e.visibleToasts.length
717
+ ]), g(() => () => {
718
+ var l;
719
+ !((l = s.current) === null || l === void 0) && l.isConnected && (_() === "pointer" ? E(s.current) : s.current.focus(), s.current = null);
720
+ }, [
721
+ n
722
+ ]), {
723
+ regionProps: Ce(o, p, Ee, {
724
+ tabIndex: -1,
725
+ // Mark the toast region as a "top layer", so that it:
726
+ // - is not aria-hidden when opening an overlay
727
+ // - allows focus even outside a containing focus scope
728
+ // - doesn’t dismiss overlays when clicking on it, even though it is outside
729
+ // @ts-ignore
730
+ "data-react-aria-top-layer": !0,
731
+ // listen to focus events separate from focuswithin because that will only fire once
732
+ // and we need to follow all focus changes
733
+ onFocus: (l) => {
734
+ let T = l.target.closest('[role="alertdialog"]');
735
+ m.current = d.current.findIndex((k) => k === T);
736
+ },
737
+ onBlur: () => {
738
+ m.current = -1;
739
+ }
740
+ })
741
+ };
742
+ }
743
+ function pe(t) {
744
+ let e = L((o) => t.subscribe(o), [
745
+ t
746
+ ]), n = L(() => t.visibleToasts, [
747
+ t
748
+ ]);
749
+ return {
750
+ visibleToasts: N.useSyncExternalStore(e, n, n),
751
+ add: (o, r) => t.add(o, r),
752
+ close: (o) => t.close(o),
753
+ pauseAll: () => t.pauseAll(),
754
+ resumeAll: () => t.resumeAll()
755
+ };
756
+ }
757
+ class ve {
758
+ runWithWrapUpdate(e, n) {
759
+ this.wrapUpdate ? this.wrapUpdate(e, n) : e();
760
+ }
761
+ /** Subscribes to updates to the visible toasts. */
762
+ subscribe(e) {
763
+ return this.subscriptions.add(e), () => this.subscriptions.delete(e);
764
+ }
765
+ /** Adds a new toast to the queue. */
766
+ add(e, n = {}) {
767
+ let i = "_" + Math.random().toString(36).slice(2), o = {
768
+ ...n,
769
+ content: e,
770
+ key: i,
771
+ timer: n.timeout ? new Ze(() => this.close(i), n.timeout) : void 0
772
+ };
773
+ return this.queue.unshift(o), this.updateVisibleToasts("add"), i;
774
+ }
775
+ /**
776
+ * Closes a toast.
777
+ */
778
+ close(e) {
779
+ let n = this.queue.findIndex((r) => r.key === e);
780
+ if (n >= 0) {
781
+ var i, o;
782
+ (i = (o = this.queue[n]).onClose) === null || i === void 0 || i.call(o), this.queue.splice(n, 1);
783
+ }
784
+ this.updateVisibleToasts("remove");
785
+ }
786
+ updateVisibleToasts(e) {
787
+ this.visibleToasts = this.queue.slice(0, this.maxVisibleToasts), this.runWithWrapUpdate(() => {
788
+ for (let n of this.subscriptions) n();
789
+ }, e);
790
+ }
791
+ /** Pauses the timers for all visible toasts. */
792
+ pauseAll() {
793
+ for (let e of this.visibleToasts) e.timer && e.timer.pause();
794
+ }
795
+ /** Resumes the timers for all visible toasts. */
796
+ resumeAll() {
797
+ for (let e of this.visibleToasts) e.timer && e.timer.resume();
798
+ }
799
+ clear() {
800
+ this.queue = [], this.updateVisibleToasts("clear");
801
+ }
802
+ constructor(e) {
803
+ this.queue = [], this.subscriptions = /* @__PURE__ */ new Set(), this.visibleToasts = [];
804
+ var n;
805
+ this.maxVisibleToasts = (n = e == null ? void 0 : e.maxVisibleToasts) !== null && n !== void 0 ? n : 1 / 0, this.wrapUpdate = e == null ? void 0 : e.wrapUpdate;
806
+ }
807
+ }
808
+ class Ze {
809
+ reset(e) {
810
+ this.remaining = e, this.resume();
811
+ }
812
+ pause() {
813
+ this.timerId != null && (clearTimeout(this.timerId), this.timerId = null, this.remaining -= Date.now() - this.startTime);
814
+ }
815
+ resume() {
816
+ this.remaining <= 0 || (this.startTime = Date.now(), this.timerId = setTimeout(() => {
817
+ this.timerId = null, this.remaining = 0, this.callback();
818
+ }, this.remaining));
819
+ }
820
+ constructor(e, n) {
821
+ this.startTime = null, this.remaining = n, this.callback = e;
822
+ }
823
+ }
824
+ const Ge = '"../theme/tokens.css"', Je = "_toastRegion_jgjyx_52", Qe = "_toast_jgjyx_52", Xe = "_success_jgjyx_95", qe = "_info_jgjyx_103", Ye = "_important_jgjyx_111", et = "_warning_jgjyx_119", tt = "_icon_jgjyx_127", nt = "_toastContent_jgjyx_137", it = "_toastMessage_jgjyx_144", ot = "_slideInTop_jgjyx_1", rt = "_slideInEnd_jgjyx_1", ut = "_slideOutTop_jgjyx_1", at = "_slideOutEnd_jgjyx_1", x = {
825
+ tokens: Ge,
826
+ "--font-family": '"Inter", sans-serif',
827
+ "--text-primary": "light-dark(#171717, #f2f2f2)",
828
+ "--support-background-success": "light-dark(#d5f2d9, light-dark(#f2f2f2, #262626))",
829
+ "--support-border-success": "light-dark(#008d3c, #008d3c)",
830
+ "--support-background-info": "light-dark(#eaf2f6, light-dark(#f2f2f2, #262626))",
831
+ "--support-border-info": "light-dark(#0066cc, #0066cc)",
832
+ "--support-background-important": "light-dark(#fff8e1, light-dark(#f2f2f2, #262626))",
833
+ "--support-border-important": "light-dark(#fdb813, #fdb813)",
834
+ "--support-border-warning": "light-dark(#e62323, #e62323)",
835
+ "--support-background-warning": "light-dark(#ffdfdf, light-dark(#f2f2f2, #262626))",
836
+ "--breakpoint-md": "(min-width: 768px)",
837
+ "--focus": "0 0 0 2px light-dark(white, black), 0 0 0 4px light-dark(black, white)",
838
+ "--z-index-toast": "1100",
839
+ toastRegion: Je,
840
+ toast: Qe,
841
+ success: Xe,
842
+ info: qe,
843
+ important: Ye,
844
+ warning: et,
845
+ icon: tt,
846
+ toastContent: nt,
847
+ toastMessage: it,
848
+ slideInTop: ot,
849
+ slideInEnd: rt,
850
+ slideOutTop: ut,
851
+ slideOutEnd: at
852
+ }, st = {
853
+ success: De,
854
+ info: Se,
855
+ important: Fe,
856
+ warning: je
857
+ }, xe = {
858
+ wrapUpdate(t) {
859
+ "startViewTransition" in document ? document.startViewTransition(() => {
860
+ _e(t);
861
+ }) : t();
862
+ },
863
+ maxVisibleToasts: 5
864
+ };
865
+ function lt(t = {}) {
866
+ const { maxVisibleToasts: e = 1, wrapUpdate: n } = t, i = ye(
867
+ () => new ve({ maxVisibleToasts: e, wrapUpdate: n }),
868
+ [e, n]
869
+ );
870
+ return pe(i);
871
+ }
872
+ const ct = new ve(xe), _t = (t) => {
873
+ const e = pe(ct);
874
+ return e.visibleToasts.length > 0 ? Le(
875
+ /* @__PURE__ */ $(
876
+ ke,
877
+ {
878
+ ...t,
879
+ state: e
880
+ }
881
+ ),
882
+ document.body
883
+ ) : null;
884
+ }, wt = ({ children: t, ...e }) => {
885
+ const n = lt(xe);
886
+ return /* @__PURE__ */ y(ge, { children: [
887
+ typeof t == "function" ? t(n) : t,
888
+ n.visibleToasts.length > 0 && /* @__PURE__ */ $(
889
+ ke,
890
+ {
891
+ ...e,
892
+ state: n
893
+ }
894
+ )
895
+ ] });
896
+ };
897
+ function ke({
898
+ state: t,
899
+ ...e
900
+ }) {
901
+ const n = A.useRef(null), { regionProps: i } = Ke(e, t, n);
902
+ return /* @__PURE__ */ $(
903
+ "div",
904
+ {
905
+ ...i,
906
+ ref: n,
907
+ className: x.toastRegion,
908
+ children: t.visibleToasts.map((o) => /* @__PURE__ */ $(
909
+ dt,
910
+ {
911
+ toast: o,
912
+ state: t
913
+ },
914
+ o.key
915
+ ))
916
+ }
917
+ );
918
+ }
919
+ function dt({
920
+ state: t,
921
+ ...e
922
+ }) {
923
+ const n = A.useRef(null), { toastProps: i, contentProps: o, titleProps: r, closeButtonProps: u } = Ue(
924
+ e,
925
+ t
926
+ ), a = st[e.toast.content.type];
927
+ return /* @__PURE__ */ y(
928
+ "div",
929
+ {
930
+ ...i,
931
+ ref: n,
932
+ className: I(x.toast, x[e.toast.content.type]),
933
+ style: { viewTransitionName: e.toast.key },
934
+ children: [
935
+ /* @__PURE__ */ y(
936
+ "div",
937
+ {
938
+ ...o,
939
+ className: I(x.toastContent, o.className),
940
+ children: [
941
+ /* @__PURE__ */ $(
942
+ a,
943
+ {
944
+ className: x.icon,
945
+ size: 20,
946
+ "aria-hidden": !0
947
+ }
948
+ ),
949
+ /* @__PURE__ */ y("div", { children: [
950
+ /* @__PURE__ */ $(
951
+ "p",
952
+ {
953
+ className: x.toastMessage,
954
+ ...r,
955
+ children: e.toast.content.message
956
+ }
957
+ ),
958
+ e.toast.content.children
959
+ ] })
960
+ ]
961
+ }
962
+ ),
963
+ /* @__PURE__ */ $(
964
+ Te,
965
+ {
966
+ variant: "icon",
967
+ ...u,
968
+ children: /* @__PURE__ */ $(
969
+ Re,
970
+ {
971
+ size: 20,
972
+ "aria-hidden": !0
973
+ }
974
+ )
975
+ }
976
+ )
977
+ ]
978
+ }
979
+ );
980
+ }
981
+ export {
982
+ _t as G,
983
+ wt as T,
984
+ ke as a,
985
+ dt as b,
986
+ ct as t,
987
+ lt as u
988
+ };