@arc-ui/components 11.5.0 → 11.7.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 (315) hide show
  1. package/dist/Alert/Alert.cjs.d.ts +1 -1
  2. package/dist/Alert/Alert.cjs.js +4 -4
  3. package/dist/Alert/Alert.esm.d.ts +1 -1
  4. package/dist/Alert/Alert.esm.js +4 -4
  5. package/dist/Badge/Badge.cjs.js +2 -2
  6. package/dist/Badge/Badge.esm.js +2 -2
  7. package/dist/Box/Box.cjs.d.ts +1 -0
  8. package/dist/Box/Box.cjs.js +13 -0
  9. package/dist/Box/Box.esm.d.ts +1 -0
  10. package/dist/Box/Box.esm.js +5 -0
  11. package/dist/Box/package.json +7 -0
  12. package/dist/BrandLogo/BrandLogo.cjs.d.ts +1 -1
  13. package/dist/BrandLogo/BrandLogo.cjs.js +2 -2
  14. package/dist/BrandLogo/BrandLogo.esm.d.ts +1 -1
  15. package/dist/BrandLogo/BrandLogo.esm.js +2 -2
  16. package/dist/Breadcrumbs/Breadcrumbs.cjs.d.ts +1 -61
  17. package/dist/Breadcrumbs/Breadcrumbs.cjs.js +10 -642
  18. package/dist/Breadcrumbs/Breadcrumbs.esm.d.ts +1 -61
  19. package/dist/Breadcrumbs/Breadcrumbs.esm.js +9 -641
  20. package/dist/Button/Button.cjs.d.ts +1 -1
  21. package/dist/Button/Button.cjs.js +4 -3
  22. package/dist/Button/Button.esm.d.ts +1 -1
  23. package/dist/Button/Button.esm.js +4 -3
  24. package/dist/Card/Card.cjs.d.ts +1 -130
  25. package/dist/Card/Card.cjs.js +12 -119
  26. package/dist/Card/Card.esm.d.ts +1 -130
  27. package/dist/Card/Card.esm.js +11 -118
  28. package/dist/Checkbox/Checkbox.cjs.d.ts +1 -64
  29. package/dist/Checkbox/Checkbox.cjs.js +11 -60
  30. package/dist/Checkbox/Checkbox.esm.d.ts +1 -64
  31. package/dist/Checkbox/Checkbox.esm.js +10 -59
  32. package/dist/Columns/Columns.cjs.d.ts +1 -76
  33. package/dist/Columns/Columns.cjs.js +6 -52
  34. package/dist/Columns/Columns.esm.d.ts +1 -76
  35. package/dist/Columns/Columns.esm.js +5 -51
  36. package/dist/Disclosure/Disclosure.cjs.d.ts +1 -1
  37. package/dist/Disclosure/Disclosure.cjs.js +2 -2
  38. package/dist/Disclosure/Disclosure.esm.d.ts +1 -1
  39. package/dist/Disclosure/Disclosure.esm.js +2 -2
  40. package/dist/DisclosureMini/DisclosureMini.cjs.d.ts +1 -1
  41. package/dist/DisclosureMini/DisclosureMini.cjs.js +3 -3
  42. package/dist/DisclosureMini/DisclosureMini.esm.d.ts +1 -1
  43. package/dist/DisclosureMini/DisclosureMini.esm.js +3 -3
  44. package/dist/Filter/Filter.cjs.d.ts +1 -0
  45. package/dist/Filter/Filter.cjs.js +13 -0
  46. package/dist/Filter/Filter.esm.d.ts +1 -0
  47. package/dist/Filter/Filter.esm.js +5 -0
  48. package/dist/Filter/package.json +7 -0
  49. package/dist/FormControl/FormControl.cjs.d.ts +1 -1
  50. package/dist/FormControl/FormControl.cjs.js +4 -5
  51. package/dist/FormControl/FormControl.esm.d.ts +1 -1
  52. package/dist/FormControl/FormControl.esm.js +4 -5
  53. package/dist/Group/Group.cjs.d.ts +1 -46
  54. package/dist/Group/Group.cjs.js +6 -43
  55. package/dist/Group/Group.esm.d.ts +1 -46
  56. package/dist/Group/Group.esm.js +5 -42
  57. package/dist/Heading/Heading.cjs.d.ts +1 -1
  58. package/dist/Heading/Heading.cjs.js +2 -2
  59. package/dist/Heading/Heading.esm.d.ts +1 -1
  60. package/dist/Heading/Heading.esm.js +2 -2
  61. package/dist/Icon/Icon.cjs.d.ts +1 -1
  62. package/dist/Icon/Icon.cjs.js +2 -2
  63. package/dist/Icon/Icon.esm.d.ts +1 -1
  64. package/dist/Icon/Icon.esm.js +2 -2
  65. package/dist/Image/Image.cjs.d.ts +1 -1
  66. package/dist/Image/Image.cjs.js +2 -1
  67. package/dist/Image/Image.esm.d.ts +1 -1
  68. package/dist/Image/Image.esm.js +1 -1
  69. package/dist/Markup/Markup.cjs.js +1 -1
  70. package/dist/Markup/Markup.esm.js +1 -1
  71. package/dist/MediaCard/MediaCard.cjs.d.ts +61 -0
  72. package/dist/MediaCard/MediaCard.cjs.js +31 -0
  73. package/dist/MediaCard/MediaCard.esm.d.ts +61 -0
  74. package/dist/MediaCard/MediaCard.esm.js +23 -0
  75. package/dist/MediaCard/package.json +7 -0
  76. package/dist/Modal/Modal.cjs.d.ts +31 -0
  77. package/dist/Modal/Modal.cjs.js +388 -0
  78. package/dist/Modal/Modal.esm.d.ts +31 -0
  79. package/dist/Modal/Modal.esm.js +380 -0
  80. package/dist/Modal/package.json +7 -0
  81. package/dist/Pagination/Pagination.cjs.d.ts +20 -0
  82. package/dist/Pagination/Pagination.cjs.js +87 -0
  83. package/dist/Pagination/Pagination.esm.d.ts +20 -0
  84. package/dist/Pagination/Pagination.esm.js +79 -0
  85. package/dist/Pagination/package.json +7 -0
  86. package/dist/PaginationSimple/PaginationSimple.cjs.d.ts +28 -0
  87. package/dist/PaginationSimple/PaginationSimple.cjs.js +47 -0
  88. package/dist/PaginationSimple/PaginationSimple.esm.d.ts +28 -0
  89. package/dist/PaginationSimple/PaginationSimple.esm.js +39 -0
  90. package/dist/PaginationSimple/package.json +7 -0
  91. package/dist/Poster/Poster.cjs.d.ts +1 -81
  92. package/dist/Poster/Poster.cjs.js +8 -45
  93. package/dist/Poster/Poster.esm.d.ts +1 -81
  94. package/dist/Poster/Poster.esm.js +7 -44
  95. package/dist/ProgressBar/ProgressBar.cjs.js +4 -4
  96. package/dist/ProgressBar/ProgressBar.esm.js +4 -4
  97. package/dist/ProgressStepper/ProgressStepper.cjs.d.ts +89 -0
  98. package/dist/ProgressStepper/ProgressStepper.cjs.js +152 -0
  99. package/dist/ProgressStepper/ProgressStepper.esm.d.ts +89 -0
  100. package/dist/ProgressStepper/ProgressStepper.esm.js +144 -0
  101. package/dist/ProgressStepper/package.json +7 -0
  102. package/dist/RadioGroup/RadioGroup.cjs.d.ts +1 -85
  103. package/dist/RadioGroup/RadioGroup.cjs.js +9 -68
  104. package/dist/RadioGroup/RadioGroup.esm.d.ts +1 -85
  105. package/dist/RadioGroup/RadioGroup.esm.js +8 -67
  106. package/dist/Rule/Rule.cjs.js +1 -1
  107. package/dist/Rule/Rule.esm.js +1 -1
  108. package/dist/ScrollToTop/ScrollToTop.cjs.d.ts +25 -0
  109. package/dist/ScrollToTop/ScrollToTop.cjs.js +68 -0
  110. package/dist/ScrollToTop/ScrollToTop.esm.d.ts +25 -0
  111. package/dist/ScrollToTop/ScrollToTop.esm.js +60 -0
  112. package/dist/ScrollToTop/package.json +7 -0
  113. package/dist/Select/Select.cjs.d.ts +2 -2
  114. package/dist/Select/Select.cjs.js +20 -1419
  115. package/dist/Select/Select.esm.d.ts +2 -2
  116. package/dist/Select/Select.esm.js +10 -1390
  117. package/dist/SiteFooter/SiteFooter.cjs.d.ts +2 -62
  118. package/dist/SiteFooter/SiteFooter.cjs.js +10 -65
  119. package/dist/SiteFooter/SiteFooter.esm.d.ts +2 -62
  120. package/dist/SiteFooter/SiteFooter.esm.js +12 -66
  121. package/dist/SiteHeader/SiteHeader.cjs.d.ts +2 -260
  122. package/dist/SiteHeader/SiteHeader.cjs.js +17 -669
  123. package/dist/SiteHeader/SiteHeader.esm.d.ts +2 -260
  124. package/dist/SiteHeader/SiteHeader.esm.js +15 -667
  125. package/dist/Surface/Surface.cjs.d.ts +1 -1
  126. package/dist/Surface/Surface.cjs.js +1 -1
  127. package/dist/Surface/Surface.esm.d.ts +1 -1
  128. package/dist/Surface/Surface.esm.js +1 -1
  129. package/dist/Switch/Switch.cjs.d.ts +2 -2
  130. package/dist/Switch/Switch.cjs.js +8 -7
  131. package/dist/Switch/Switch.esm.d.ts +2 -2
  132. package/dist/Switch/Switch.esm.js +7 -6
  133. package/dist/Tag/Tag.cjs.js +2 -2
  134. package/dist/Tag/Tag.esm.js +2 -2
  135. package/dist/Text/Text.cjs.d.ts +1 -1
  136. package/dist/Text/Text.cjs.js +2 -2
  137. package/dist/Text/Text.esm.d.ts +1 -1
  138. package/dist/Text/Text.esm.js +2 -2
  139. package/dist/TextArea/TextArea.cjs.d.ts +61 -0
  140. package/dist/TextArea/TextArea.cjs.js +87 -0
  141. package/dist/TextArea/TextArea.esm.d.ts +61 -0
  142. package/dist/TextArea/TextArea.esm.js +79 -0
  143. package/dist/TextArea/package.json +7 -0
  144. package/dist/TextInput/TextInput.cjs.d.ts +1 -75
  145. package/dist/TextInput/TextInput.cjs.js +10 -76
  146. package/dist/TextInput/TextInput.esm.d.ts +1 -75
  147. package/dist/TextInput/TextInput.esm.js +9 -75
  148. package/dist/UniversalHeader/UniversalHeader.cjs.d.ts +1 -26
  149. package/dist/UniversalHeader/UniversalHeader.cjs.js +5 -30
  150. package/dist/UniversalHeader/UniversalHeader.esm.d.ts +1 -26
  151. package/dist/UniversalHeader/UniversalHeader.esm.js +4 -29
  152. package/dist/_shared/cjs/Box-ebe2b7be.d.ts +39 -0
  153. package/dist/_shared/cjs/Box-ebe2b7be.js +30 -0
  154. package/dist/_shared/cjs/{BrandLogo-8008f0c4.js → BrandLogo-8107d59f.js} +1 -1
  155. package/dist/_shared/cjs/Breadcrumbs-9f580f69.d.ts +61 -0
  156. package/dist/_shared/cjs/Breadcrumbs-9f580f69.js +106 -0
  157. package/dist/_shared/cjs/BtIconChevronLeftMid-df952a3e.js +31 -0
  158. package/dist/_shared/cjs/{Button-5dff284a.js → Button-b4d6ccc8.js} +8 -29
  159. package/dist/_shared/cjs/Card-f1108bfe.d.ts +136 -0
  160. package/dist/_shared/cjs/Card-f1108bfe.js +124 -0
  161. package/dist/_shared/cjs/Checkbox-c927b62f.d.ts +64 -0
  162. package/dist/_shared/cjs/Checkbox-c927b62f.js +62 -0
  163. package/dist/_shared/cjs/Columns-e90798f8.d.ts +76 -0
  164. package/dist/_shared/cjs/Columns-e90798f8.js +57 -0
  165. package/dist/_shared/cjs/{DisclosureMini-5af13d3c.js → DisclosureMini-2a10006e.js} +5 -3
  166. package/dist/_shared/cjs/Filter-a7574fe7.d.ts +83 -0
  167. package/dist/_shared/cjs/Filter-a7574fe7.js +121 -0
  168. package/dist/_shared/{esm/FormControl-0744f93f.d.ts → cjs/FormControl-78b007b7.d.ts} +4 -0
  169. package/dist/_shared/cjs/{FormControl-42360ae8.js → FormControl-78b007b7.js} +10 -10
  170. package/dist/_shared/cjs/Group-f85dd4c0.d.ts +46 -0
  171. package/dist/_shared/cjs/Group-f85dd4c0.js +48 -0
  172. package/dist/_shared/cjs/{Heading-d45f6a7f.js → Heading-ed1cb455.js} +1 -1
  173. package/dist/_shared/cjs/{Icon-9ae8dbe1.js → Icon-e1dd45eb.js} +1 -1
  174. package/dist/_shared/cjs/{Image-3bf4b4f3.js → Image-0e393cbf.js} +2 -0
  175. package/dist/_shared/cjs/ItemGroup-5af4d600.d.ts +27 -0
  176. package/dist/_shared/cjs/NavItem-df20237c.d.ts +43 -0
  177. package/dist/_shared/cjs/NavItemWithSubNav-65f21828.d.ts +49 -0
  178. package/dist/_shared/cjs/Poster-faea1ad3.d.ts +81 -0
  179. package/dist/_shared/cjs/Poster-faea1ad3.js +50 -0
  180. package/dist/_shared/cjs/RadioGroup-8e17de70.d.ts +97 -0
  181. package/dist/_shared/cjs/RadioGroup-8e17de70.js +70 -0
  182. package/dist/_shared/cjs/SiteFooter-9f7f9c2d.d.ts +62 -0
  183. package/dist/_shared/cjs/SiteFooter-9f7f9c2d.js +73 -0
  184. package/dist/_shared/cjs/SiteHeader-c25ee36e.d.ts +78 -0
  185. package/dist/_shared/cjs/SiteHeader.rehydrator-ccbebde6.d.ts +78 -0
  186. package/dist/_shared/cjs/SiteHeader.rehydrator-ccbebde6.js +673 -0
  187. package/dist/_shared/cjs/SubNavItem-a84d1bf4.d.ts +48 -0
  188. package/dist/_shared/cjs/{Surface-6da0a78e.d.ts → Surface-b7c51b2b.d.ts} +3 -2
  189. package/dist/_shared/cjs/{Surface-6da0a78e.js → Surface-b7c51b2b.js} +1 -1
  190. package/dist/_shared/cjs/{Text-6f2827e6.js → Text-555a29a4.js} +1 -1
  191. package/dist/_shared/cjs/TextInput-7ed03a48.d.ts +75 -0
  192. package/dist/_shared/cjs/TextInput-b768e346.d.ts +10 -0
  193. package/dist/_shared/cjs/TextInput-b768e346.js +78 -0
  194. package/dist/_shared/cjs/UniversalHeader-da622e1a.d.ts +26 -0
  195. package/dist/_shared/cjs/UniversalHeader-da622e1a.js +35 -0
  196. package/dist/_shared/cjs/debounce-506538c5.js +544 -0
  197. package/dist/_shared/cjs/index-31fbb076.js +1416 -0
  198. package/dist/_shared/cjs/index-699086a7.d.ts +2 -0
  199. package/dist/_shared/cjs/index-74488a9f.d.ts +2 -0
  200. package/dist/_shared/cjs/index-c81c9401.d.ts +3 -3
  201. package/dist/_shared/cjs/index-e340924e.d.ts +2 -0
  202. package/dist/_shared/cjs/index-e6d20018.d.ts +3 -0
  203. package/dist/_shared/cjs/index-eb06f640.d.ts +2 -0
  204. package/dist/_shared/cjs/index-f419cf04.d.ts +2 -0
  205. package/dist/_shared/cjs/index.module-5ea728f4.js +23 -0
  206. package/dist/_shared/cjs/{index.module-af7c85f2.js → index.module-9b87a34d.js} +84 -103
  207. package/dist/_shared/esm/Box-06d99d8a.d.ts +39 -0
  208. package/dist/_shared/esm/Box-06d99d8a.js +24 -0
  209. package/dist/_shared/esm/{BrandLogo-56699561.js → BrandLogo-9ec620e8.js} +1 -1
  210. package/dist/_shared/esm/Breadcrumbs-5dc0afa7.d.ts +61 -0
  211. package/dist/_shared/esm/Breadcrumbs-5dc0afa7.js +100 -0
  212. package/dist/_shared/esm/BtIconChevronLeftMid-9f4f3a3d.js +25 -0
  213. package/dist/_shared/esm/{Button-61241dd0.js → Button-9c3b0b11.js} +4 -25
  214. package/dist/_shared/esm/Card-79b6eae0.d.ts +136 -0
  215. package/dist/_shared/esm/Card-79b6eae0.js +118 -0
  216. package/dist/_shared/esm/Checkbox-2d144384.d.ts +64 -0
  217. package/dist/_shared/esm/Checkbox-2d144384.js +56 -0
  218. package/dist/_shared/esm/Columns-8704515b.d.ts +76 -0
  219. package/dist/_shared/esm/Columns-8704515b.js +51 -0
  220. package/dist/_shared/esm/{DisclosureMini-322fccc0.js → DisclosureMini-78a8f392.js} +5 -3
  221. package/dist/_shared/esm/Filter-a01aed11.d.ts +83 -0
  222. package/dist/_shared/esm/Filter-a01aed11.js +115 -0
  223. package/dist/_shared/{cjs/FormControl-42360ae8.d.ts → esm/FormControl-2fa7aae5.d.ts} +4 -0
  224. package/dist/_shared/esm/{FormControl-0744f93f.js → FormControl-2fa7aae5.js} +10 -10
  225. package/dist/_shared/esm/Group-fb26fd32.d.ts +46 -0
  226. package/dist/_shared/esm/Group-fb26fd32.js +42 -0
  227. package/dist/_shared/esm/{Heading-b61432fb.js → Heading-ee6bec51.js} +1 -1
  228. package/dist/_shared/esm/{Icon-fd247973.js → Icon-c1af47bc.js} +1 -1
  229. package/dist/_shared/esm/{Image-3596ce55.js → Image-3ed3863c.js} +2 -1
  230. package/dist/_shared/esm/ItemGroup-5af4d600.d.ts +27 -0
  231. package/dist/_shared/esm/NavItem-df20237c.d.ts +43 -0
  232. package/dist/_shared/esm/NavItemWithSubNav-65f21828.d.ts +49 -0
  233. package/dist/_shared/esm/Poster-a83ae770.d.ts +81 -0
  234. package/dist/_shared/esm/Poster-a83ae770.js +44 -0
  235. package/dist/_shared/esm/RadioGroup-65b8c8bf.d.ts +97 -0
  236. package/dist/_shared/esm/RadioGroup-65b8c8bf.js +64 -0
  237. package/dist/_shared/esm/SiteFooter-51bdc7df.d.ts +62 -0
  238. package/dist/_shared/esm/SiteFooter-51bdc7df.js +67 -0
  239. package/dist/_shared/esm/SiteHeader-c25ee36e.d.ts +78 -0
  240. package/dist/_shared/esm/SiteHeader.rehydrator-382d1c03.d.ts +78 -0
  241. package/dist/_shared/esm/SiteHeader.rehydrator-382d1c03.js +666 -0
  242. package/dist/_shared/esm/SubNavItem-a84d1bf4.d.ts +48 -0
  243. package/dist/_shared/esm/{Surface-bb100ef8.d.ts → Surface-dde51789.d.ts} +3 -2
  244. package/dist/_shared/esm/{Surface-bb100ef8.js → Surface-dde51789.js} +1 -1
  245. package/dist/_shared/esm/{Text-00e9743b.js → Text-14deb70e.js} +1 -1
  246. package/dist/_shared/esm/TextInput-62bb7dee.d.ts +10 -0
  247. package/dist/_shared/esm/TextInput-62bb7dee.js +72 -0
  248. package/dist/_shared/esm/TextInput-7ed03a48.d.ts +75 -0
  249. package/dist/_shared/esm/UniversalHeader-1c5a886d.d.ts +26 -0
  250. package/dist/_shared/esm/UniversalHeader-1c5a886d.js +29 -0
  251. package/dist/_shared/esm/debounce-e228705f.js +542 -0
  252. package/dist/_shared/esm/index-4fa635bd.js +1386 -0
  253. package/dist/_shared/esm/index-699086a7.d.ts +2 -0
  254. package/dist/_shared/esm/index-74488a9f.d.ts +2 -0
  255. package/dist/_shared/esm/index-c81c9401.d.ts +3 -3
  256. package/dist/_shared/esm/index-e340924e.d.ts +2 -0
  257. package/dist/_shared/esm/index-e6d20018.d.ts +3 -0
  258. package/dist/_shared/esm/index-eb06f640.d.ts +2 -0
  259. package/dist/_shared/esm/index-f419cf04.d.ts +2 -0
  260. package/dist/_shared/esm/{index.module-599b86dd.js → index.module-216016b5.js} +86 -104
  261. package/dist/_shared/esm/index.module-88179159.js +21 -0
  262. package/dist/index.es.js +179 -28
  263. package/dist/index.es.js.map +1 -1
  264. package/dist/index.js +180 -27
  265. package/dist/index.js.map +1 -1
  266. package/dist/styles.css +1 -1
  267. package/dist/types/components/Box/Box.d.ts +36 -0
  268. package/dist/types/components/Box/index.d.ts +1 -0
  269. package/dist/types/components/Filter/Filter.d.ts +38 -0
  270. package/dist/types/components/Filter/FilterControls/FilterControl/FilterControl.d.ts +16 -0
  271. package/dist/types/components/Filter/FilterControls/FilterControls.d.ts +12 -0
  272. package/dist/types/components/Filter/FilterItems/FilterItem/FilterItem.d.ts +12 -0
  273. package/dist/types/components/Filter/FilterItems/FilterItems.d.ts +12 -0
  274. package/dist/types/components/Filter/index.d.ts +1 -0
  275. package/dist/types/components/FormControl/FormControl.d.ts +4 -0
  276. package/dist/types/components/Image/index.d.ts +1 -1
  277. package/dist/types/components/MediaCard/MediaCard.d.ts +57 -0
  278. package/dist/types/components/MediaCard/index.d.ts +1 -0
  279. package/dist/types/components/Modal/Modal.stories-wip.d.ts +9 -0
  280. package/dist/types/components/Pagination/Pagination.d.ts +19 -0
  281. package/dist/types/components/Pagination/index.d.ts +1 -0
  282. package/dist/types/components/PaginationSimple/PaginationSimple.d.ts +27 -0
  283. package/dist/types/components/PaginationSimple/index.d.ts +1 -0
  284. package/dist/types/components/ProgressStepper/ProgressStepper.d.ts +28 -0
  285. package/dist/types/components/ProgressStepper/ProgressStepperItem/ProgressStepperItem.d.ts +62 -0
  286. package/dist/types/components/ProgressStepper/index.d.ts +1 -0
  287. package/dist/types/components/ProgressStepper/progressStatus.d.ts +1 -0
  288. package/dist/types/components/RadioGroup/RadioGroup.d.ts +1 -1
  289. package/dist/types/components/ScrollToTop/ScrollToTop.d.ts +24 -0
  290. package/dist/types/components/ScrollToTop/index.d.ts +1 -0
  291. package/dist/types/components/Select/Select.d.ts +1 -1
  292. package/dist/types/components/Surface/Surface.d.ts +2 -1
  293. package/dist/types/components/Surface/index.d.ts +1 -1
  294. package/dist/types/components/Switch/Switch.d.ts +1 -1
  295. package/dist/types/components/TextArea/TextArea.d.ts +60 -0
  296. package/dist/types/components/TextArea/index.d.ts +1 -0
  297. package/dist/types/components/TextInput/TextInput.d.ts +1 -1
  298. package/dist/types/components/index.d.ts +2 -0
  299. package/dist/types/hooks/use-pagination.d.ts +1 -0
  300. package/dist/types/styles.d.ts +10 -0
  301. package/package.json +4 -4
  302. /package/dist/_shared/cjs/{BrandLogo-8008f0c4.d.ts → BrandLogo-8107d59f.d.ts} +0 -0
  303. /package/dist/_shared/cjs/{Button-5dff284a.d.ts → Button-b4d6ccc8.d.ts} +0 -0
  304. /package/dist/_shared/cjs/{DisclosureMini-5af13d3c.d.ts → DisclosureMini-2a10006e.d.ts} +0 -0
  305. /package/dist/_shared/cjs/{Heading-d45f6a7f.d.ts → Heading-ed1cb455.d.ts} +0 -0
  306. /package/dist/_shared/cjs/{Icon-9ae8dbe1.d.ts → Icon-e1dd45eb.d.ts} +0 -0
  307. /package/dist/_shared/cjs/{Image-3bf4b4f3.d.ts → Image-0e393cbf.d.ts} +0 -0
  308. /package/dist/_shared/cjs/{Text-6f2827e6.d.ts → Text-555a29a4.d.ts} +0 -0
  309. /package/dist/_shared/esm/{BrandLogo-56699561.d.ts → BrandLogo-9ec620e8.d.ts} +0 -0
  310. /package/dist/_shared/esm/{Button-61241dd0.d.ts → Button-9c3b0b11.d.ts} +0 -0
  311. /package/dist/_shared/esm/{DisclosureMini-322fccc0.d.ts → DisclosureMini-78a8f392.d.ts} +0 -0
  312. /package/dist/_shared/esm/{Heading-b61432fb.d.ts → Heading-ee6bec51.d.ts} +0 -0
  313. /package/dist/_shared/esm/{Icon-fd247973.d.ts → Icon-c1af47bc.d.ts} +0 -0
  314. /package/dist/_shared/esm/{Image-3596ce55.d.ts → Image-3ed3863c.d.ts} +0 -0
  315. /package/dist/_shared/esm/{Text-00e9743b.d.ts → Text-14deb70e.d.ts} +0 -0
@@ -1,20 +1,20 @@
1
1
  import { c as classNames } from '../_shared/esm/index-2ae58626.js';
2
- import * as React$1 from 'react';
3
- import React__default, { useContext, createContext, useEffect, forwardRef, useState, createElement, useRef, useCallback, Fragment, useMemo, useId } from 'react';
4
- import { $ as $c512c27ab02ef895$export$50c7b4e9d9f19c1, a as $6ed0406888f73fc4$export$c7b2cbe3552a0d05, b as $5e63c961fc1ce211$export$8c6ed5c666ac1360, c as $b1b2314f5f9a1d84$export$25bec8c6f54ee79a, d as $8927f6f2acc4f386$export$250ffa63cdc0d034, _ as _extends, e as $e42e1063c40fb3ef$export$b9ecd428b558ff10, f as $8927f6f2acc4f386$export$6d1a0317bde7de7f, g as $9f79659886946c16$export$e5c5a5f917a5871c, h as $71cd76cc60e0454e$export$6f32135080cb4c3, i as $010c2913dbd2fe3d$export$5cae361ad82dce8b } from '../_shared/esm/index.module-599b86dd.js';
5
- import $7SXl2$reactdom, { createPortal } from 'react-dom';
2
+ import React__default, { useContext, createContext, forwardRef, createElement, useState, useRef, useCallback, Fragment, useEffect, useMemo, useId } from 'react';
3
+ import { b as $c512c27ab02ef895$export$50c7b4e9d9f19c1, $ as $6ed0406888f73fc4$export$c7b2cbe3552a0d05, d as $5e63c961fc1ce211$export$8c6ed5c666ac1360, e as $8927f6f2acc4f386$export$250ffa63cdc0d034, _ as _extends, c as $71cd76cc60e0454e$export$6f32135080cb4c3, f as $e42e1063c40fb3ef$export$b9ecd428b558ff10, a as $9f79659886946c16$export$e5c5a5f917a5871c, g as $b1b2314f5f9a1d84$export$25bec8c6f54ee79a } from '../_shared/esm/index.module-216016b5.js';
4
+ import { createPortal } from 'react-dom';
5
+ import { $ as $1746a345f3d73bb7$export$f680877a34711e37, a as $f1701beae083dbae$export$602eac185826482c, h as hideOthers, c as $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c, b as $01b9c$RemoveScroll, d as $d3863c46a17e8a28$export$20e40289641fbbb6, e as $5cb92bef7577960e$export$177fb62ff3ec1f22 } from '../_shared/esm/index-4fa635bd.js';
6
+ import { $ as $010c2913dbd2fe3d$export$5cae361ad82dce8b } from '../_shared/esm/index.module-88179159.js';
6
7
  import { B as BtIconChevronDown2Px_2 } from '../_shared/esm/BtIconChevronDown2Px-782876e2.js';
7
8
  import { B as BtIconTickAlt2Px_2 } from '../_shared/esm/BtIconTickAlt2Px-da97e9ae.js';
8
- import { I as Icon } from '../_shared/esm/Icon-fd247973.js';
9
- import { F as FormControl } from '../_shared/esm/FormControl-0744f93f.js';
10
- import { C as Context } from '../_shared/esm/Surface-bb100ef8.js';
9
+ import { I as Icon } from '../_shared/esm/Icon-c1af47bc.js';
10
+ import { F as FormControl } from '../_shared/esm/FormControl-2fa7aae5.js';
11
+ import { C as Context } from '../_shared/esm/Surface-dde51789.js';
11
12
  import { A as ArcRootElementContext } from '../_shared/esm/Base-6c01e0ec.js';
12
13
  import '../_shared/esm/filter-data-attrs-afdb7d32.js';
13
14
  import '../_shared/esm/suffix-modifier-7e640670.js';
14
15
  import '../_shared/esm/BtIconAlert-55a6ed5c.js';
15
- import '../_shared/esm/DisclosureMini-322fccc0.js';
16
- import '../_shared/esm/Text-00e9743b.js';
17
- import '../_shared/esm/VerticalSpace-93980c9c.js';
16
+ import '../_shared/esm/DisclosureMini-78a8f392.js';
17
+ import '../_shared/esm/Text-14deb70e.js';
18
18
 
19
19
  function $ae6933e535247d3d$export$7d15b64cf5a3a4c4(value, [min, max]) {
20
20
  return Math.min(max, Math.max(min, value));
@@ -113,543 +113,6 @@ const $f631663db3294ace$var$DirectionContext = /*#__PURE__*/ createContext(undef
113
113
  return localDir || globalDir || 'ltr';
114
114
  }
115
115
 
116
- /**
117
- * Listens for when the escape key is down
118
- */ function $addc16e1bbe58fd0$export$3a72a57244d6e765(onEscapeKeyDownProp, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
119
- const onEscapeKeyDown = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEscapeKeyDownProp);
120
- useEffect(()=>{
121
- const handleKeyDown = (event)=>{
122
- if (event.key === 'Escape') onEscapeKeyDown(event);
123
- };
124
- ownerDocument.addEventListener('keydown', handleKeyDown);
125
- return ()=>ownerDocument.removeEventListener('keydown', handleKeyDown)
126
- ;
127
- }, [
128
- onEscapeKeyDown,
129
- ownerDocument
130
- ]);
131
- }
132
-
133
- const $5cb92bef7577960e$var$CONTEXT_UPDATE = 'dismissableLayer.update';
134
- const $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';
135
- const $5cb92bef7577960e$var$FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';
136
- let $5cb92bef7577960e$var$originalBodyPointerEvents;
137
- const $5cb92bef7577960e$var$DismissableLayerContext = /*#__PURE__*/ createContext({
138
- layers: new Set(),
139
- layersWithOutsidePointerEventsDisabled: new Set(),
140
- branches: new Set()
141
- });
142
- const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
143
- var _node$ownerDocument;
144
- const { disableOutsidePointerEvents: disableOutsidePointerEvents = false , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , onDismiss: onDismiss , ...layerProps } = props;
145
- const context = useContext($5cb92bef7577960e$var$DismissableLayerContext);
146
- const [node1, setNode] = useState(null);
147
- const ownerDocument = (_node$ownerDocument = node1 === null || node1 === void 0 ? void 0 : node1.ownerDocument) !== null && _node$ownerDocument !== void 0 ? _node$ownerDocument : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;
148
- const [, force] = useState({});
149
- const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setNode(node)
150
- );
151
- const layers = Array.from(context.layers);
152
- const [highestLayerWithOutsidePointerEventsDisabled] = [
153
- ...context.layersWithOutsidePointerEventsDisabled
154
- ].slice(-1); // prettier-ignore
155
- const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled); // prettier-ignore
156
- const index = node1 ? layers.indexOf(node1) : -1;
157
- const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
158
- const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
159
- const pointerDownOutside = $5cb92bef7577960e$var$usePointerDownOutside((event)=>{
160
- const target = event.target;
161
- const isPointerDownOnBranch = [
162
- ...context.branches
163
- ].some((branch)=>branch.contains(target)
164
- );
165
- if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
166
- onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event);
167
- onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
168
- if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
169
- }, ownerDocument);
170
- const focusOutside = $5cb92bef7577960e$var$useFocusOutside((event)=>{
171
- const target = event.target;
172
- const isFocusInBranch = [
173
- ...context.branches
174
- ].some((branch)=>branch.contains(target)
175
- );
176
- if (isFocusInBranch) return;
177
- onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event);
178
- onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
179
- if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
180
- }, ownerDocument);
181
- $addc16e1bbe58fd0$export$3a72a57244d6e765((event)=>{
182
- const isHighestLayer = index === context.layers.size - 1;
183
- if (!isHighestLayer) return;
184
- onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event);
185
- if (!event.defaultPrevented && onDismiss) {
186
- event.preventDefault();
187
- onDismiss();
188
- }
189
- }, ownerDocument);
190
- useEffect(()=>{
191
- if (!node1) return;
192
- if (disableOutsidePointerEvents) {
193
- if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
194
- $5cb92bef7577960e$var$originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
195
- ownerDocument.body.style.pointerEvents = 'none';
196
- }
197
- context.layersWithOutsidePointerEventsDisabled.add(node1);
198
- }
199
- context.layers.add(node1);
200
- $5cb92bef7577960e$var$dispatchUpdate();
201
- return ()=>{
202
- if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) ownerDocument.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents;
203
- };
204
- }, [
205
- node1,
206
- ownerDocument,
207
- disableOutsidePointerEvents,
208
- context
209
- ]);
210
- /**
211
- * We purposefully prevent combining this effect with the `disableOutsidePointerEvents` effect
212
- * because a change to `disableOutsidePointerEvents` would remove this layer from the stack
213
- * and add it to the end again so the layering order wouldn't be _creation order_.
214
- * We only want them to be removed from context stacks when unmounted.
215
- */ useEffect(()=>{
216
- return ()=>{
217
- if (!node1) return;
218
- context.layers.delete(node1);
219
- context.layersWithOutsidePointerEventsDisabled.delete(node1);
220
- $5cb92bef7577960e$var$dispatchUpdate();
221
- };
222
- }, [
223
- node1,
224
- context
225
- ]);
226
- useEffect(()=>{
227
- const handleUpdate = ()=>force({})
228
- ;
229
- document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
230
- return ()=>document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate)
231
- ;
232
- }, []);
233
- return /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, layerProps, {
234
- ref: composedRefs,
235
- style: {
236
- pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? 'auto' : 'none' : undefined,
237
- ...props.style
238
- },
239
- onFocusCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusCapture, focusOutside.onFocusCapture),
240
- onBlurCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlurCapture, focusOutside.onBlurCapture),
241
- onPointerDownCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
242
- }));
243
- });
244
- /* -----------------------------------------------------------------------------------------------*/ /**
245
- * Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup`
246
- * to mimic layer dismissing behaviour present in OS.
247
- * Returns props to pass to the node we want to check for outside events.
248
- */ function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
249
- const handlePointerDownOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPointerDownOutside);
250
- const isPointerInsideReactTreeRef = useRef(false);
251
- const handleClickRef = useRef(()=>{});
252
- useEffect(()=>{
253
- const handlePointerDown = (event)=>{
254
- if (event.target && !isPointerInsideReactTreeRef.current) {
255
- const eventDetail = {
256
- originalEvent: event
257
- };
258
- function handleAndDispatchPointerDownOutsideEvent() {
259
- $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {
260
- discrete: true
261
- });
262
- }
263
- /**
264
- * On touch devices, we need to wait for a click event because browsers implement
265
- * a ~350ms delay between the time the user stops touching the display and when the
266
- * browser executres events. We need to ensure we don't reactivate pointer-events within
267
- * this timeframe otherwise the browser may execute events that should have been prevented.
268
- *
269
- * Additionally, this also lets us deal automatically with cancellations when a click event
270
- * isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc.
271
- *
272
- * This is why we also continuously remove the previous listener, because we cannot be
273
- * certain that it was raised, and therefore cleaned-up.
274
- */ if (event.pointerType === 'touch') {
275
- ownerDocument.removeEventListener('click', handleClickRef.current);
276
- handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;
277
- ownerDocument.addEventListener('click', handleClickRef.current, {
278
- once: true
279
- });
280
- } else handleAndDispatchPointerDownOutsideEvent();
281
- }
282
- isPointerInsideReactTreeRef.current = false;
283
- };
284
- /**
285
- * if this hook executes in a component that mounts via a `pointerdown` event, the event
286
- * would bubble up to the document and trigger a `pointerDownOutside` event. We avoid
287
- * this by delaying the event listener registration on the document.
288
- * This is not React specific, but rather how the DOM works, ie:
289
- * ```
290
- * button.addEventListener('pointerdown', () => {
291
- * console.log('I will log');
292
- * document.addEventListener('pointerdown', () => {
293
- * console.log('I will also log');
294
- * })
295
- * });
296
- */ const timerId = window.setTimeout(()=>{
297
- ownerDocument.addEventListener('pointerdown', handlePointerDown);
298
- }, 0);
299
- return ()=>{
300
- window.clearTimeout(timerId);
301
- ownerDocument.removeEventListener('pointerdown', handlePointerDown);
302
- ownerDocument.removeEventListener('click', handleClickRef.current);
303
- };
304
- }, [
305
- ownerDocument,
306
- handlePointerDownOutside
307
- ]);
308
- return {
309
- // ensures we check React component tree (not just DOM tree)
310
- onPointerDownCapture: ()=>isPointerInsideReactTreeRef.current = true
311
- };
312
- }
313
- /**
314
- * Listens for when focus happens outside a react subtree.
315
- * Returns props to pass to the root (node) of the subtree we want to check.
316
- */ function $5cb92bef7577960e$var$useFocusOutside(onFocusOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
317
- const handleFocusOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onFocusOutside);
318
- const isFocusInsideReactTreeRef = useRef(false);
319
- useEffect(()=>{
320
- const handleFocus = (event)=>{
321
- if (event.target && !isFocusInsideReactTreeRef.current) {
322
- const eventDetail = {
323
- originalEvent: event
324
- };
325
- $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
326
- discrete: false
327
- });
328
- }
329
- };
330
- ownerDocument.addEventListener('focusin', handleFocus);
331
- return ()=>ownerDocument.removeEventListener('focusin', handleFocus)
332
- ;
333
- }, [
334
- ownerDocument,
335
- handleFocusOutside
336
- ]);
337
- return {
338
- onFocusCapture: ()=>isFocusInsideReactTreeRef.current = true
339
- ,
340
- onBlurCapture: ()=>isFocusInsideReactTreeRef.current = false
341
- };
342
- }
343
- function $5cb92bef7577960e$var$dispatchUpdate() {
344
- const event = new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE);
345
- document.dispatchEvent(event);
346
- }
347
- function $5cb92bef7577960e$var$handleAndDispatchCustomEvent(name, handler, detail, { discrete: discrete }) {
348
- const target = detail.originalEvent.target;
349
- const event = new CustomEvent(name, {
350
- bubbles: false,
351
- cancelable: true,
352
- detail: detail
353
- });
354
- if (handler) target.addEventListener(name, handler, {
355
- once: true
356
- });
357
- if (discrete) $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event);
358
- else target.dispatchEvent(event);
359
- }
360
-
361
- /** Number of components which have requested interest to have focus guards */ let $3db38b7d1fb3fe6a$var$count = 0;
362
- /**
363
- * Injects a pair of focus guards at the edges of the whole DOM tree
364
- * to ensure `focusin` & `focusout` events can be caught consistently.
365
- */ function $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c() {
366
- useEffect(()=>{
367
- var _edgeGuards$, _edgeGuards$2;
368
- const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]');
369
- document.body.insertAdjacentElement('afterbegin', (_edgeGuards$ = edgeGuards[0]) !== null && _edgeGuards$ !== void 0 ? _edgeGuards$ : $3db38b7d1fb3fe6a$var$createFocusGuard());
370
- document.body.insertAdjacentElement('beforeend', (_edgeGuards$2 = edgeGuards[1]) !== null && _edgeGuards$2 !== void 0 ? _edgeGuards$2 : $3db38b7d1fb3fe6a$var$createFocusGuard());
371
- $3db38b7d1fb3fe6a$var$count++;
372
- return ()=>{
373
- if ($3db38b7d1fb3fe6a$var$count === 1) document.querySelectorAll('[data-radix-focus-guard]').forEach((node)=>node.remove()
374
- );
375
- $3db38b7d1fb3fe6a$var$count--;
376
- };
377
- }, []);
378
- }
379
- function $3db38b7d1fb3fe6a$var$createFocusGuard() {
380
- const element = document.createElement('span');
381
- element.setAttribute('data-radix-focus-guard', '');
382
- element.tabIndex = 0;
383
- element.style.cssText = 'outline: none; opacity: 0; position: fixed; pointer-events: none';
384
- return element;
385
- }
386
-
387
- const $d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT = 'focusScope.autoFocusOnMount';
388
- const $d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT = 'focusScope.autoFocusOnUnmount';
389
- const $d3863c46a17e8a28$var$EVENT_OPTIONS = {
390
- bubbles: false,
391
- cancelable: true
392
- };
393
- const $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
394
- const { loop: loop = false , trapped: trapped = false , onMountAutoFocus: onMountAutoFocusProp , onUnmountAutoFocus: onUnmountAutoFocusProp , ...scopeProps } = props;
395
- const [container1, setContainer] = useState(null);
396
- const onMountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onMountAutoFocusProp);
397
- const onUnmountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onUnmountAutoFocusProp);
398
- const lastFocusedElementRef = useRef(null);
399
- const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setContainer(node)
400
- );
401
- const focusScope = useRef({
402
- paused: false,
403
- pause () {
404
- this.paused = true;
405
- },
406
- resume () {
407
- this.paused = false;
408
- }
409
- }).current; // Takes care of trapping focus if focus is moved outside programmatically for example
410
- useEffect(()=>{
411
- if (trapped) {
412
- function handleFocusIn(event) {
413
- if (focusScope.paused || !container1) return;
414
- const target = event.target;
415
- if (container1.contains(target)) lastFocusedElementRef.current = target;
416
- else $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, {
417
- select: true
418
- });
419
- }
420
- function handleFocusOut(event) {
421
- if (focusScope.paused || !container1) return;
422
- if (!container1.contains(event.relatedTarget)) $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, {
423
- select: true
424
- });
425
- }
426
- document.addEventListener('focusin', handleFocusIn);
427
- document.addEventListener('focusout', handleFocusOut);
428
- return ()=>{
429
- document.removeEventListener('focusin', handleFocusIn);
430
- document.removeEventListener('focusout', handleFocusOut);
431
- };
432
- }
433
- }, [
434
- trapped,
435
- container1,
436
- focusScope.paused
437
- ]);
438
- useEffect(()=>{
439
- if (container1) {
440
- $d3863c46a17e8a28$var$focusScopesStack.add(focusScope);
441
- const previouslyFocusedElement = document.activeElement;
442
- const hasFocusedCandidate = container1.contains(previouslyFocusedElement);
443
- if (!hasFocusedCandidate) {
444
- const mountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);
445
- container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
446
- container1.dispatchEvent(mountEvent);
447
- if (!mountEvent.defaultPrevented) {
448
- $d3863c46a17e8a28$var$focusFirst($d3863c46a17e8a28$var$removeLinks($d3863c46a17e8a28$var$getTabbableCandidates(container1)), {
449
- select: true
450
- });
451
- if (document.activeElement === previouslyFocusedElement) $d3863c46a17e8a28$var$focus(container1);
452
- }
453
- }
454
- return ()=>{
455
- container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus); // We hit a react bug (fixed in v17) with focusing in unmount.
456
- // We need to delay the focus a little to get around it for now.
457
- // See: https://github.com/facebook/react/issues/17894
458
- setTimeout(()=>{
459
- const unmountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);
460
- container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
461
- container1.dispatchEvent(unmountEvent);
462
- if (!unmountEvent.defaultPrevented) $d3863c46a17e8a28$var$focus(previouslyFocusedElement !== null && previouslyFocusedElement !== void 0 ? previouslyFocusedElement : document.body, {
463
- select: true
464
- });
465
- // we need to remove the listener after we `dispatchEvent`
466
- container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
467
- $d3863c46a17e8a28$var$focusScopesStack.remove(focusScope);
468
- }, 0);
469
- };
470
- }
471
- }, [
472
- container1,
473
- onMountAutoFocus,
474
- onUnmountAutoFocus,
475
- focusScope
476
- ]); // Takes care of looping focus (when tabbing whilst at the edges)
477
- const handleKeyDown = useCallback((event)=>{
478
- if (!loop && !trapped) return;
479
- if (focusScope.paused) return;
480
- const isTabKey = event.key === 'Tab' && !event.altKey && !event.ctrlKey && !event.metaKey;
481
- const focusedElement = document.activeElement;
482
- if (isTabKey && focusedElement) {
483
- const container = event.currentTarget;
484
- const [first, last] = $d3863c46a17e8a28$var$getTabbableEdges(container);
485
- const hasTabbableElementsInside = first && last; // we can only wrap focus if we have tabbable edges
486
- if (!hasTabbableElementsInside) {
487
- if (focusedElement === container) event.preventDefault();
488
- } else {
489
- if (!event.shiftKey && focusedElement === last) {
490
- event.preventDefault();
491
- if (loop) $d3863c46a17e8a28$var$focus(first, {
492
- select: true
493
- });
494
- } else if (event.shiftKey && focusedElement === first) {
495
- event.preventDefault();
496
- if (loop) $d3863c46a17e8a28$var$focus(last, {
497
- select: true
498
- });
499
- }
500
- }
501
- }
502
- }, [
503
- loop,
504
- trapped,
505
- focusScope.paused
506
- ]);
507
- return /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
508
- tabIndex: -1
509
- }, scopeProps, {
510
- ref: composedRefs,
511
- onKeyDown: handleKeyDown
512
- }));
513
- });
514
- /* -------------------------------------------------------------------------------------------------
515
- * Utils
516
- * -----------------------------------------------------------------------------------------------*/ /**
517
- * Attempts focusing the first element in a list of candidates.
518
- * Stops when focus has actually moved.
519
- */ function $d3863c46a17e8a28$var$focusFirst(candidates, { select: select = false } = {}) {
520
- const previouslyFocusedElement = document.activeElement;
521
- for (const candidate of candidates){
522
- $d3863c46a17e8a28$var$focus(candidate, {
523
- select: select
524
- });
525
- if (document.activeElement !== previouslyFocusedElement) return;
526
- }
527
- }
528
- /**
529
- * Returns the first and last tabbable elements inside a container.
530
- */ function $d3863c46a17e8a28$var$getTabbableEdges(container) {
531
- const candidates = $d3863c46a17e8a28$var$getTabbableCandidates(container);
532
- const first = $d3863c46a17e8a28$var$findVisible(candidates, container);
533
- const last = $d3863c46a17e8a28$var$findVisible(candidates.reverse(), container);
534
- return [
535
- first,
536
- last
537
- ];
538
- }
539
- /**
540
- * Returns a list of potential tabbable candidates.
541
- *
542
- * NOTE: This is only a close approximation. For example it doesn't take into account cases like when
543
- * elements are not visible. This cannot be worked out easily by just reading a property, but rather
544
- * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.
545
- *
546
- * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker
547
- * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1
548
- */ function $d3863c46a17e8a28$var$getTabbableCandidates(container) {
549
- const nodes = [];
550
- const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
551
- acceptNode: (node)=>{
552
- const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden';
553
- if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP; // `.tabIndex` is not the same as the `tabindex` attribute. It works on the
554
- // runtime's understanding of tabbability, so this automatically accounts
555
- // for any kind of element that could be tabbed to.
556
- return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
557
- }
558
- });
559
- while(walker.nextNode())nodes.push(walker.currentNode); // we do not take into account the order of nodes with positive `tabIndex` as it
560
- // hinders accessibility to have tab order different from visual order.
561
- return nodes;
562
- }
563
- /**
564
- * Returns the first visible element in a list.
565
- * NOTE: Only checks visibility up to the `container`.
566
- */ function $d3863c46a17e8a28$var$findVisible(elements, container) {
567
- for (const element of elements){
568
- // we stop checking if it's hidden at the `container` level (excluding)
569
- if (!$d3863c46a17e8a28$var$isHidden(element, {
570
- upTo: container
571
- })) return element;
572
- }
573
- }
574
- function $d3863c46a17e8a28$var$isHidden(node, { upTo: upTo }) {
575
- if (getComputedStyle(node).visibility === 'hidden') return true;
576
- while(node){
577
- // we stop at `upTo` (excluding it)
578
- if (upTo !== undefined && node === upTo) return false;
579
- if (getComputedStyle(node).display === 'none') return true;
580
- node = node.parentElement;
581
- }
582
- return false;
583
- }
584
- function $d3863c46a17e8a28$var$isSelectableInput(element) {
585
- return element instanceof HTMLInputElement && 'select' in element;
586
- }
587
- function $d3863c46a17e8a28$var$focus(element, { select: select = false } = {}) {
588
- // only focus if that element is focusable
589
- if (element && element.focus) {
590
- const previouslyFocusedElement = document.activeElement; // NOTE: we prevent scrolling on focus, to minimize jarring transitions for users
591
- element.focus({
592
- preventScroll: true
593
- }); // only select if its not the same element, it supports selection and we need to select
594
- if (element !== previouslyFocusedElement && $d3863c46a17e8a28$var$isSelectableInput(element) && select) element.select();
595
- }
596
- }
597
- /* -------------------------------------------------------------------------------------------------
598
- * FocusScope stack
599
- * -----------------------------------------------------------------------------------------------*/ const $d3863c46a17e8a28$var$focusScopesStack = $d3863c46a17e8a28$var$createFocusScopesStack();
600
- function $d3863c46a17e8a28$var$createFocusScopesStack() {
601
- /** A stack of focus scopes, with the active one at the top */ let stack = [];
602
- return {
603
- add (focusScope) {
604
- // pause the currently active focus scope (at the top of the stack)
605
- const activeFocusScope = stack[0];
606
- if (focusScope !== activeFocusScope) activeFocusScope === null || activeFocusScope === void 0 || activeFocusScope.pause();
607
- // remove in case it already exists (because we'll re-add it at the top of the stack)
608
- stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope);
609
- stack.unshift(focusScope);
610
- },
611
- remove (focusScope) {
612
- var _stack$;
613
- stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope);
614
- (_stack$ = stack[0]) === null || _stack$ === void 0 || _stack$.resume();
615
- }
616
- };
617
- }
618
- function $d3863c46a17e8a28$var$arrayRemove(array, item) {
619
- const updatedArray = [
620
- ...array
621
- ];
622
- const index = updatedArray.indexOf(item);
623
- if (index !== -1) updatedArray.splice(index, 1);
624
- return updatedArray;
625
- }
626
- function $d3863c46a17e8a28$var$removeLinks(items) {
627
- return items.filter((item)=>item.tagName !== 'A'
628
- );
629
- }
630
-
631
- const $1746a345f3d73bb7$var$useReactId = React$1['useId'.toString()] || (()=>undefined
632
- );
633
- let $1746a345f3d73bb7$var$count = 0;
634
- function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
635
- const [id, setId] = React$1.useState($1746a345f3d73bb7$var$useReactId()); // React versions older than 18 will have client-side ids only.
636
- $9f79659886946c16$export$e5c5a5f917a5871c(()=>{
637
- if (!deterministicId) setId((reactId)=>reactId !== null && reactId !== void 0 ? reactId : String($1746a345f3d73bb7$var$count++)
638
- );
639
- }, [
640
- deterministicId
641
- ]);
642
- return deterministicId || (id ? `radix-${id}` : '');
643
- }
644
-
645
- const $f1701beae083dbae$export$602eac185826482c = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
646
- var _globalThis$document;
647
- const { container: container = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.body , ...portalProps } = props;
648
- return container ? /*#__PURE__*/ $7SXl2$reactdom.createPortal(/*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, portalProps, {
649
- ref: forwardedRef
650
- })), container) : null;
651
- });
652
-
653
116
  const $ea1ef594cf570d83$export$439d29a4e110a164 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
654
117
  return /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({}, props, {
655
118
  ref: forwardedRef,
@@ -670,849 +133,6 @@ const $ea1ef594cf570d83$export$439d29a4e110a164 = /*#__PURE__*/ forwardRef((prop
670
133
  }));
671
134
  });
672
135
 
673
- var getDefaultParent = function (originalTarget) {
674
- if (typeof document === 'undefined') {
675
- return null;
676
- }
677
- var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
678
- return sampleTarget.ownerDocument.body;
679
- };
680
- var counterMap = new WeakMap();
681
- var uncontrolledNodes = new WeakMap();
682
- var markerMap = {};
683
- var lockCount = 0;
684
- var unwrapHost = function (node) {
685
- return node && (node.host || unwrapHost(node.parentNode));
686
- };
687
- var correctTargets = function (parent, targets) {
688
- return targets.map(function (target) {
689
- if (parent.contains(target)) {
690
- return target;
691
- }
692
- var correctedTarget = unwrapHost(target);
693
- if (correctedTarget && parent.contains(correctedTarget)) {
694
- return correctedTarget;
695
- }
696
- console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');
697
- return null;
698
- }).filter(function (x) { return Boolean(x); });
699
- };
700
- /**
701
- * Marks everything except given node(or nodes) as aria-hidden
702
- * @param {Element | Element[]} originalTarget - elements to keep on the page
703
- * @param [parentNode] - top element, defaults to document.body
704
- * @param {String} [markerName] - a special attribute to mark every node
705
- * @param {String} [controlAttribute] - html Attribute to control
706
- * @return {Undo} undo command
707
- */
708
- var applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {
709
- var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
710
- if (!markerMap[markerName]) {
711
- markerMap[markerName] = new WeakMap();
712
- }
713
- var markerCounter = markerMap[markerName];
714
- var hiddenNodes = [];
715
- var elementsToKeep = new Set();
716
- var elementsToStop = new Set(targets);
717
- var keep = function (el) {
718
- if (!el || elementsToKeep.has(el)) {
719
- return;
720
- }
721
- elementsToKeep.add(el);
722
- keep(el.parentNode);
723
- };
724
- targets.forEach(keep);
725
- var deep = function (parent) {
726
- if (!parent || elementsToStop.has(parent)) {
727
- return;
728
- }
729
- Array.prototype.forEach.call(parent.children, function (node) {
730
- if (elementsToKeep.has(node)) {
731
- deep(node);
732
- }
733
- else {
734
- var attr = node.getAttribute(controlAttribute);
735
- var alreadyHidden = attr !== null && attr !== 'false';
736
- var counterValue = (counterMap.get(node) || 0) + 1;
737
- var markerValue = (markerCounter.get(node) || 0) + 1;
738
- counterMap.set(node, counterValue);
739
- markerCounter.set(node, markerValue);
740
- hiddenNodes.push(node);
741
- if (counterValue === 1 && alreadyHidden) {
742
- uncontrolledNodes.set(node, true);
743
- }
744
- if (markerValue === 1) {
745
- node.setAttribute(markerName, 'true');
746
- }
747
- if (!alreadyHidden) {
748
- node.setAttribute(controlAttribute, 'true');
749
- }
750
- }
751
- });
752
- };
753
- deep(parentNode);
754
- elementsToKeep.clear();
755
- lockCount++;
756
- return function () {
757
- hiddenNodes.forEach(function (node) {
758
- var counterValue = counterMap.get(node) - 1;
759
- var markerValue = markerCounter.get(node) - 1;
760
- counterMap.set(node, counterValue);
761
- markerCounter.set(node, markerValue);
762
- if (!counterValue) {
763
- if (!uncontrolledNodes.has(node)) {
764
- node.removeAttribute(controlAttribute);
765
- }
766
- uncontrolledNodes.delete(node);
767
- }
768
- if (!markerValue) {
769
- node.removeAttribute(markerName);
770
- }
771
- });
772
- lockCount--;
773
- if (!lockCount) {
774
- // clear
775
- counterMap = new WeakMap();
776
- counterMap = new WeakMap();
777
- uncontrolledNodes = new WeakMap();
778
- markerMap = {};
779
- }
780
- };
781
- };
782
- /**
783
- * Marks everything except given node(or nodes) as aria-hidden
784
- * @param {Element | Element[]} originalTarget - elements to keep on the page
785
- * @param [parentNode] - top element, defaults to document.body
786
- * @param {String} [markerName] - a special attribute to mark every node
787
- * @return {Undo} undo command
788
- */
789
- var hideOthers = function (originalTarget, parentNode, markerName) {
790
- if (markerName === void 0) { markerName = 'data-aria-hidden'; }
791
- var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
792
- var activeParentNode = parentNode || getDefaultParent(originalTarget);
793
- if (!activeParentNode) {
794
- return function () { return null; };
795
- }
796
- // we should not hide ariaLive elements - https://github.com/theKashey/aria-hidden/issues/10
797
- targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live]')));
798
- return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');
799
- };
800
-
801
- /******************************************************************************
802
- Copyright (c) Microsoft Corporation.
803
-
804
- Permission to use, copy, modify, and/or distribute this software for any
805
- purpose with or without fee is hereby granted.
806
-
807
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
808
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
809
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
810
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
811
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
812
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
813
- PERFORMANCE OF THIS SOFTWARE.
814
- ***************************************************************************** */
815
-
816
- var __assign$1 = function() {
817
- __assign$1 = Object.assign || function __assign(t) {
818
- for (var s, i = 1, n = arguments.length; i < n; i++) {
819
- s = arguments[i];
820
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
821
- }
822
- return t;
823
- };
824
- return __assign$1.apply(this, arguments);
825
- };
826
-
827
- function __rest$1(s, e) {
828
- var t = {};
829
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
830
- t[p] = s[p];
831
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
832
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
833
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
834
- t[p[i]] = s[p[i]];
835
- }
836
- return t;
837
- }
838
-
839
- function __spreadArray(to, from, pack) {
840
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
841
- if (ar || !(i in from)) {
842
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
843
- ar[i] = from[i];
844
- }
845
- }
846
- return to.concat(ar || Array.prototype.slice.call(from));
847
- }
848
-
849
- var zeroRightClassName = 'right-scroll-bar-position';
850
- var fullWidthClassName = 'width-before-scroll-bar';
851
- var noScrollbarsClassName = 'with-scroll-bars-hidden';
852
- /**
853
- * Name of a CSS variable containing the amount of "hidden" scrollbar
854
- * ! might be undefined ! use will fallback!
855
- */
856
- var removedBarSizeVariable = '--removed-body-scroll-bar-size';
857
-
858
- /**
859
- * Assigns a value for a given ref, no matter of the ref format
860
- * @param {RefObject} ref - a callback function or ref object
861
- * @param value - a new value
862
- *
863
- * @see https://github.com/theKashey/use-callback-ref#assignref
864
- * @example
865
- * const refObject = useRef();
866
- * const refFn = (ref) => {....}
867
- *
868
- * assignRef(refObject, "refValue");
869
- * assignRef(refFn, "refValue");
870
- */
871
- function assignRef(ref, value) {
872
- if (typeof ref === 'function') {
873
- ref(value);
874
- }
875
- else if (ref) {
876
- ref.current = value;
877
- }
878
- return ref;
879
- }
880
-
881
- /**
882
- * creates a MutableRef with ref change callback
883
- * @param initialValue - initial ref value
884
- * @param {Function} callback - a callback to run when value changes
885
- *
886
- * @example
887
- * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);
888
- * ref.current = 1;
889
- * // prints 0 -> 1
890
- *
891
- * @see https://reactjs.org/docs/hooks-reference.html#useref
892
- * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref
893
- * @returns {MutableRefObject}
894
- */
895
- function useCallbackRef(initialValue, callback) {
896
- var ref = useState(function () { return ({
897
- // value
898
- value: initialValue,
899
- // last callback
900
- callback: callback,
901
- // "memoized" public interface
902
- facade: {
903
- get current() {
904
- return ref.value;
905
- },
906
- set current(value) {
907
- var last = ref.value;
908
- if (last !== value) {
909
- ref.value = value;
910
- ref.callback(value, last);
911
- }
912
- },
913
- },
914
- }); })[0];
915
- // update callback
916
- ref.callback = callback;
917
- return ref.facade;
918
- }
919
-
920
- /**
921
- * Merges two or more refs together providing a single interface to set their value
922
- * @param {RefObject|Ref} refs
923
- * @returns {MutableRefObject} - a new ref, which translates all changes to {refs}
924
- *
925
- * @see {@link mergeRefs} a version without buit-in memoization
926
- * @see https://github.com/theKashey/use-callback-ref#usemergerefs
927
- * @example
928
- * const Component = React.forwardRef((props, ref) => {
929
- * const ownRef = useRef();
930
- * const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together
931
- * return <div ref={domRef}>...</div>
932
- * }
933
- */
934
- function useMergeRefs(refs, defaultValue) {
935
- return useCallbackRef(defaultValue || null, function (newValue) { return refs.forEach(function (ref) { return assignRef(ref, newValue); }); });
936
- }
937
-
938
- /*! *****************************************************************************
939
- Copyright (c) Microsoft Corporation.
940
-
941
- Permission to use, copy, modify, and/or distribute this software for any
942
- purpose with or without fee is hereby granted.
943
-
944
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
945
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
946
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
947
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
948
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
949
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
950
- PERFORMANCE OF THIS SOFTWARE.
951
- ***************************************************************************** */
952
-
953
- var __assign = function() {
954
- __assign = Object.assign || function __assign(t) {
955
- for (var s, i = 1, n = arguments.length; i < n; i++) {
956
- s = arguments[i];
957
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
958
- }
959
- return t;
960
- };
961
- return __assign.apply(this, arguments);
962
- };
963
-
964
- function __rest(s, e) {
965
- var t = {};
966
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
967
- t[p] = s[p];
968
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
969
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
970
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
971
- t[p[i]] = s[p[i]];
972
- }
973
- return t;
974
- }
975
-
976
- function ItoI(a) {
977
- return a;
978
- }
979
- function innerCreateMedium(defaults, middleware) {
980
- if (middleware === void 0) { middleware = ItoI; }
981
- var buffer = [];
982
- var assigned = false;
983
- var medium = {
984
- read: function () {
985
- if (assigned) {
986
- throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');
987
- }
988
- if (buffer.length) {
989
- return buffer[buffer.length - 1];
990
- }
991
- return defaults;
992
- },
993
- useMedium: function (data) {
994
- var item = middleware(data, assigned);
995
- buffer.push(item);
996
- return function () {
997
- buffer = buffer.filter(function (x) { return x !== item; });
998
- };
999
- },
1000
- assignSyncMedium: function (cb) {
1001
- assigned = true;
1002
- while (buffer.length) {
1003
- var cbs = buffer;
1004
- buffer = [];
1005
- cbs.forEach(cb);
1006
- }
1007
- buffer = {
1008
- push: function (x) { return cb(x); },
1009
- filter: function () { return buffer; },
1010
- };
1011
- },
1012
- assignMedium: function (cb) {
1013
- assigned = true;
1014
- var pendingQueue = [];
1015
- if (buffer.length) {
1016
- var cbs = buffer;
1017
- buffer = [];
1018
- cbs.forEach(cb);
1019
- pendingQueue = buffer;
1020
- }
1021
- var executeQueue = function () {
1022
- var cbs = pendingQueue;
1023
- pendingQueue = [];
1024
- cbs.forEach(cb);
1025
- };
1026
- var cycle = function () { return Promise.resolve().then(executeQueue); };
1027
- cycle();
1028
- buffer = {
1029
- push: function (x) {
1030
- pendingQueue.push(x);
1031
- cycle();
1032
- },
1033
- filter: function (filter) {
1034
- pendingQueue = pendingQueue.filter(filter);
1035
- return buffer;
1036
- },
1037
- };
1038
- },
1039
- };
1040
- return medium;
1041
- }
1042
- // eslint-disable-next-line @typescript-eslint/ban-types
1043
- function createSidecarMedium(options) {
1044
- if (options === void 0) { options = {}; }
1045
- var medium = innerCreateMedium(null);
1046
- medium.options = __assign({ async: true, ssr: false }, options);
1047
- return medium;
1048
- }
1049
-
1050
- var SideCar$1 = function (_a) {
1051
- var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
1052
- if (!sideCar) {
1053
- throw new Error('Sidecar: please provide `sideCar` property to import the right car');
1054
- }
1055
- var Target = sideCar.read();
1056
- if (!Target) {
1057
- throw new Error('Sidecar medium not found');
1058
- }
1059
- return React$1.createElement(Target, __assign({}, rest));
1060
- };
1061
- SideCar$1.isSideCarExport = true;
1062
- function exportSidecar(medium, exported) {
1063
- medium.useMedium(exported);
1064
- return SideCar$1;
1065
- }
1066
-
1067
- var effectCar = createSidecarMedium();
1068
-
1069
- var nothing = function () {
1070
- return;
1071
- };
1072
- /**
1073
- * Removes scrollbar from the page and contain the scroll within the Lock
1074
- */
1075
- var RemoveScroll = React$1.forwardRef(function (props, parentRef) {
1076
- var ref = React$1.useRef(null);
1077
- var _a = React$1.useState({
1078
- onScrollCapture: nothing,
1079
- onWheelCapture: nothing,
1080
- onTouchMoveCapture: nothing,
1081
- }), callbacks = _a[0], setCallbacks = _a[1];
1082
- var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? 'div' : _b, rest = __rest$1(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]);
1083
- var SideCar = sideCar;
1084
- var containerRef = useMergeRefs([ref, parentRef]);
1085
- var containerProps = __assign$1(__assign$1({}, rest), callbacks);
1086
- return (React$1.createElement(React$1.Fragment, null,
1087
- enabled && (React$1.createElement(SideCar, { sideCar: effectCar, removeScrollBar: removeScrollBar, shards: shards, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref })),
1088
- forwardProps ? (React$1.cloneElement(React$1.Children.only(children), __assign$1(__assign$1({}, containerProps), { ref: containerRef }))) : (React$1.createElement(Container, __assign$1({}, containerProps, { className: className, ref: containerRef }), children))));
1089
- });
1090
- RemoveScroll.defaultProps = {
1091
- enabled: true,
1092
- removeScrollBar: true,
1093
- inert: false,
1094
- };
1095
- RemoveScroll.classNames = {
1096
- fullWidth: fullWidthClassName,
1097
- zeroRight: zeroRightClassName,
1098
- };
1099
-
1100
- var getNonce = function () {
1101
- if (typeof __webpack_nonce__ !== 'undefined') {
1102
- return __webpack_nonce__;
1103
- }
1104
- return undefined;
1105
- };
1106
-
1107
- function makeStyleTag() {
1108
- if (!document)
1109
- return null;
1110
- var tag = document.createElement('style');
1111
- tag.type = 'text/css';
1112
- var nonce = getNonce();
1113
- if (nonce) {
1114
- tag.setAttribute('nonce', nonce);
1115
- }
1116
- return tag;
1117
- }
1118
- function injectStyles(tag, css) {
1119
- // @ts-ignore
1120
- if (tag.styleSheet) {
1121
- // @ts-ignore
1122
- tag.styleSheet.cssText = css;
1123
- }
1124
- else {
1125
- tag.appendChild(document.createTextNode(css));
1126
- }
1127
- }
1128
- function insertStyleTag(tag) {
1129
- var head = document.head || document.getElementsByTagName('head')[0];
1130
- head.appendChild(tag);
1131
- }
1132
- var stylesheetSingleton = function () {
1133
- var counter = 0;
1134
- var stylesheet = null;
1135
- return {
1136
- add: function (style) {
1137
- if (counter == 0) {
1138
- if ((stylesheet = makeStyleTag())) {
1139
- injectStyles(stylesheet, style);
1140
- insertStyleTag(stylesheet);
1141
- }
1142
- }
1143
- counter++;
1144
- },
1145
- remove: function () {
1146
- counter--;
1147
- if (!counter && stylesheet) {
1148
- stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
1149
- stylesheet = null;
1150
- }
1151
- },
1152
- };
1153
- };
1154
-
1155
- /**
1156
- * creates a hook to control style singleton
1157
- * @see {@link styleSingleton} for a safer component version
1158
- * @example
1159
- * ```tsx
1160
- * const useStyle = styleHookSingleton();
1161
- * ///
1162
- * useStyle('body { overflow: hidden}');
1163
- */
1164
- var styleHookSingleton = function () {
1165
- var sheet = stylesheetSingleton();
1166
- return function (styles, isDynamic) {
1167
- React$1.useEffect(function () {
1168
- sheet.add(styles);
1169
- return function () {
1170
- sheet.remove();
1171
- };
1172
- }, [styles && isDynamic]);
1173
- };
1174
- };
1175
-
1176
- /**
1177
- * create a Component to add styles on demand
1178
- * - styles are added when first instance is mounted
1179
- * - styles are removed when the last instance is unmounted
1180
- * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior
1181
- */
1182
- var styleSingleton = function () {
1183
- var useStyle = styleHookSingleton();
1184
- var Sheet = function (_a) {
1185
- var styles = _a.styles, dynamic = _a.dynamic;
1186
- useStyle(styles, dynamic);
1187
- return null;
1188
- };
1189
- return Sheet;
1190
- };
1191
-
1192
- var zeroGap = {
1193
- left: 0,
1194
- top: 0,
1195
- right: 0,
1196
- gap: 0,
1197
- };
1198
- var parse = function (x) { return parseInt(x || '', 10) || 0; };
1199
- var getOffset = function (gapMode) {
1200
- var cs = window.getComputedStyle(document.body);
1201
- var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];
1202
- var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];
1203
- var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];
1204
- return [parse(left), parse(top), parse(right)];
1205
- };
1206
- var getGapWidth = function (gapMode) {
1207
- if (gapMode === void 0) { gapMode = 'margin'; }
1208
- if (typeof window === 'undefined') {
1209
- return zeroGap;
1210
- }
1211
- var offsets = getOffset(gapMode);
1212
- var documentWidth = document.documentElement.clientWidth;
1213
- var windowWidth = window.innerWidth;
1214
- return {
1215
- left: offsets[0],
1216
- top: offsets[1],
1217
- right: offsets[2],
1218
- gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]),
1219
- };
1220
- };
1221
-
1222
- var Style = styleSingleton();
1223
- // important tip - once we measure scrollBar width and remove them
1224
- // we could not repeat this operation
1225
- // thus we are using style-singleton - only the first "yet correct" style will be applied.
1226
- var getStyles = function (_a, allowRelative, gapMode, important) {
1227
- var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;
1228
- if (gapMode === void 0) { gapMode = 'margin'; }
1229
- return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([
1230
- allowRelative && "position: relative ".concat(important, ";"),
1231
- gapMode === 'margin' &&
1232
- "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "),
1233
- gapMode === 'padding' && "padding-right: ".concat(gap, "px ").concat(important, ";"),
1234
- ]
1235
- .filter(Boolean)
1236
- .join(''), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n");
1237
- };
1238
- /**
1239
- * Removes page scrollbar and blocks page scroll when mounted
1240
- */
1241
- var RemoveScrollBar = function (props) {
1242
- var noRelative = props.noRelative, noImportant = props.noImportant, _a = props.gapMode, gapMode = _a === void 0 ? 'margin' : _a;
1243
- /*
1244
- gap will be measured on every component mount
1245
- however it will be used only by the "first" invocation
1246
- due to singleton nature of <Style
1247
- */
1248
- var gap = React$1.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]);
1249
- return React$1.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') });
1250
- };
1251
-
1252
- var passiveSupported = false;
1253
- if (typeof window !== 'undefined') {
1254
- try {
1255
- var options = Object.defineProperty({}, 'passive', {
1256
- get: function () {
1257
- passiveSupported = true;
1258
- return true;
1259
- },
1260
- });
1261
- // @ts-ignore
1262
- window.addEventListener('test', options, options);
1263
- // @ts-ignore
1264
- window.removeEventListener('test', options, options);
1265
- }
1266
- catch (err) {
1267
- passiveSupported = false;
1268
- }
1269
- }
1270
- var nonPassive = passiveSupported ? { passive: false } : false;
1271
-
1272
- var alwaysContainsScroll = function (node) {
1273
- // textarea will always _contain_ scroll inside self. It only can be hidden
1274
- return node.tagName === 'TEXTAREA';
1275
- };
1276
- var elementCanBeScrolled = function (node, overflow) {
1277
- var styles = window.getComputedStyle(node);
1278
- return (
1279
- // not-not-scrollable
1280
- styles[overflow] !== 'hidden' &&
1281
- // contains scroll inside self
1282
- !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible'));
1283
- };
1284
- var elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); };
1285
- var elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); };
1286
- var locationCouldBeScrolled = function (axis, node) {
1287
- var current = node;
1288
- do {
1289
- // Skip over shadow root
1290
- if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {
1291
- current = current.host;
1292
- }
1293
- var isScrollable = elementCouldBeScrolled(axis, current);
1294
- if (isScrollable) {
1295
- var _a = getScrollVariables(axis, current), s = _a[1], d = _a[2];
1296
- if (s > d) {
1297
- return true;
1298
- }
1299
- }
1300
- current = current.parentNode;
1301
- } while (current && current !== document.body);
1302
- return false;
1303
- };
1304
- var getVScrollVariables = function (_a) {
1305
- var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
1306
- return [
1307
- scrollTop,
1308
- scrollHeight,
1309
- clientHeight,
1310
- ];
1311
- };
1312
- var getHScrollVariables = function (_a) {
1313
- var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
1314
- return [
1315
- scrollLeft,
1316
- scrollWidth,
1317
- clientWidth,
1318
- ];
1319
- };
1320
- var elementCouldBeScrolled = function (axis, node) {
1321
- return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
1322
- };
1323
- var getScrollVariables = function (axis, node) {
1324
- return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);
1325
- };
1326
- var getDirectionFactor = function (axis, direction) {
1327
- /**
1328
- * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,
1329
- * and then increasingly negative as you scroll towards the end of the content.
1330
- * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft
1331
- */
1332
- return axis === 'h' && direction === 'rtl' ? -1 : 1;
1333
- };
1334
- var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {
1335
- var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
1336
- var delta = directionFactor * sourceDelta;
1337
- // find scrollable target
1338
- var target = event.target;
1339
- var targetInLock = endTarget.contains(target);
1340
- var shouldCancelScroll = false;
1341
- var isDeltaPositive = delta > 0;
1342
- var availableScroll = 0;
1343
- var availableScrollTop = 0;
1344
- do {
1345
- var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];
1346
- var elementScroll = scroll_1 - capacity - directionFactor * position;
1347
- if (position || elementScroll) {
1348
- if (elementCouldBeScrolled(axis, target)) {
1349
- availableScroll += elementScroll;
1350
- availableScrollTop += position;
1351
- }
1352
- }
1353
- target = target.parentNode;
1354
- } while (
1355
- // portaled content
1356
- (!targetInLock && target !== document.body) ||
1357
- // self content
1358
- (targetInLock && (endTarget.contains(target) || endTarget === target)));
1359
- if (isDeltaPositive && ((noOverscroll && availableScroll === 0) || (!noOverscroll && delta > availableScroll))) {
1360
- shouldCancelScroll = true;
1361
- }
1362
- else if (!isDeltaPositive &&
1363
- ((noOverscroll && availableScrollTop === 0) || (!noOverscroll && -delta > availableScrollTop))) {
1364
- shouldCancelScroll = true;
1365
- }
1366
- return shouldCancelScroll;
1367
- };
1368
-
1369
- var getTouchXY = function (event) {
1370
- return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
1371
- };
1372
- var getDeltaXY = function (event) { return [event.deltaX, event.deltaY]; };
1373
- var extractRef = function (ref) {
1374
- return ref && 'current' in ref ? ref.current : ref;
1375
- };
1376
- var deltaCompare = function (x, y) { return x[0] === y[0] && x[1] === y[1]; };
1377
- var generateStyle = function (id) { return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n"); };
1378
- var idCounter = 0;
1379
- var lockStack = [];
1380
- function RemoveScrollSideCar(props) {
1381
- var shouldPreventQueue = React$1.useRef([]);
1382
- var touchStartRef = React$1.useRef([0, 0]);
1383
- var activeAxis = React$1.useRef();
1384
- var id = React$1.useState(idCounter++)[0];
1385
- var Style = React$1.useState(function () { return styleSingleton(); })[0];
1386
- var lastProps = React$1.useRef(props);
1387
- React$1.useEffect(function () {
1388
- lastProps.current = props;
1389
- }, [props]);
1390
- React$1.useEffect(function () {
1391
- if (props.inert) {
1392
- document.body.classList.add("block-interactivity-".concat(id));
1393
- var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
1394
- allow_1.forEach(function (el) { return el.classList.add("allow-interactivity-".concat(id)); });
1395
- return function () {
1396
- document.body.classList.remove("block-interactivity-".concat(id));
1397
- allow_1.forEach(function (el) { return el.classList.remove("allow-interactivity-".concat(id)); });
1398
- };
1399
- }
1400
- return;
1401
- }, [props.inert, props.lockRef.current, props.shards]);
1402
- var shouldCancelEvent = React$1.useCallback(function (event, parent) {
1403
- if ('touches' in event && event.touches.length === 2) {
1404
- return !lastProps.current.allowPinchZoom;
1405
- }
1406
- var touch = getTouchXY(event);
1407
- var touchStart = touchStartRef.current;
1408
- var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0];
1409
- var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1];
1410
- var currentAxis;
1411
- var target = event.target;
1412
- var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v';
1413
- // allow horizontal touch move on Range inputs. They will not cause any scroll
1414
- if ('touches' in event && moveDirection === 'h' && target.type === 'range') {
1415
- return false;
1416
- }
1417
- var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
1418
- if (!canBeScrolledInMainDirection) {
1419
- return true;
1420
- }
1421
- if (canBeScrolledInMainDirection) {
1422
- currentAxis = moveDirection;
1423
- }
1424
- else {
1425
- currentAxis = moveDirection === 'v' ? 'h' : 'v';
1426
- canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
1427
- // other axis might be not scrollable
1428
- }
1429
- if (!canBeScrolledInMainDirection) {
1430
- return false;
1431
- }
1432
- if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) {
1433
- activeAxis.current = currentAxis;
1434
- }
1435
- if (!currentAxis) {
1436
- return true;
1437
- }
1438
- var cancelingAxis = activeAxis.current || currentAxis;
1439
- return handleScroll(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true);
1440
- }, []);
1441
- var shouldPrevent = React$1.useCallback(function (_event) {
1442
- var event = _event;
1443
- if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {
1444
- // not the last active
1445
- return;
1446
- }
1447
- var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);
1448
- var sourceEvent = shouldPreventQueue.current.filter(function (e) { return e.name === event.type && e.target === event.target && deltaCompare(e.delta, delta); })[0];
1449
- // self event, and should be canceled
1450
- if (sourceEvent && sourceEvent.should) {
1451
- if (event.cancelable) {
1452
- event.preventDefault();
1453
- }
1454
- return;
1455
- }
1456
- // outside or shard event
1457
- if (!sourceEvent) {
1458
- var shardNodes = (lastProps.current.shards || [])
1459
- .map(extractRef)
1460
- .filter(Boolean)
1461
- .filter(function (node) { return node.contains(event.target); });
1462
- var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
1463
- if (shouldStop) {
1464
- if (event.cancelable) {
1465
- event.preventDefault();
1466
- }
1467
- }
1468
- }
1469
- }, []);
1470
- var shouldCancel = React$1.useCallback(function (name, delta, target, should) {
1471
- var event = { name: name, delta: delta, target: target, should: should };
1472
- shouldPreventQueue.current.push(event);
1473
- setTimeout(function () {
1474
- shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { return e !== event; });
1475
- }, 1);
1476
- }, []);
1477
- var scrollTouchStart = React$1.useCallback(function (event) {
1478
- touchStartRef.current = getTouchXY(event);
1479
- activeAxis.current = undefined;
1480
- }, []);
1481
- var scrollWheel = React$1.useCallback(function (event) {
1482
- shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
1483
- }, []);
1484
- var scrollTouchMove = React$1.useCallback(function (event) {
1485
- shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
1486
- }, []);
1487
- React$1.useEffect(function () {
1488
- lockStack.push(Style);
1489
- props.setCallbacks({
1490
- onScrollCapture: scrollWheel,
1491
- onWheelCapture: scrollWheel,
1492
- onTouchMoveCapture: scrollTouchMove,
1493
- });
1494
- document.addEventListener('wheel', shouldPrevent, nonPassive);
1495
- document.addEventListener('touchmove', shouldPrevent, nonPassive);
1496
- document.addEventListener('touchstart', scrollTouchStart, nonPassive);
1497
- return function () {
1498
- lockStack = lockStack.filter(function (inst) { return inst !== Style; });
1499
- document.removeEventListener('wheel', shouldPrevent, nonPassive);
1500
- document.removeEventListener('touchmove', shouldPrevent, nonPassive);
1501
- document.removeEventListener('touchstart', scrollTouchStart, nonPassive);
1502
- };
1503
- }, []);
1504
- var removeScrollBar = props.removeScrollBar, inert = props.inert;
1505
- return (React$1.createElement(React$1.Fragment, null,
1506
- inert ? React$1.createElement(Style, { styles: generateStyle(id) }) : null,
1507
- removeScrollBar ? React$1.createElement(RemoveScrollBar, { gapMode: "margin" }) : null));
1508
- }
1509
-
1510
- var SideCar = exportSidecar(effectCar, RemoveScrollSideCar);
1511
-
1512
- var ReactRemoveScroll = React$1.forwardRef(function (props, ref) { return (React$1.createElement(RemoveScroll, __assign$1({}, props, { ref: ref, sideCar: SideCar }))); });
1513
- ReactRemoveScroll.classNames = RemoveScroll.classNames;
1514
- var $01b9c$RemoveScroll = ReactRemoveScroll;
1515
-
1516
136
  const $cc7e05a45900e73f$var$OPEN_KEYS = [
1517
137
  ' ',
1518
138
  'Enter',