@arc-ui/components 11.7.0 → 11.9.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 (249) hide show
  1. package/dist/Alert/Alert.cjs.d.ts +1 -1
  2. package/dist/Alert/Alert.cjs.js +10 -89
  3. package/dist/Alert/Alert.esm.d.ts +1 -1
  4. package/dist/Alert/Alert.esm.js +3 -82
  5. package/dist/Badge/Badge.cjs.d.ts +4 -0
  6. package/dist/Badge/Badge.cjs.js +4 -4
  7. package/dist/Badge/Badge.esm.d.ts +4 -0
  8. package/dist/Badge/Badge.esm.js +5 -5
  9. package/dist/Box/Box.cjs.d.ts +40 -1
  10. package/dist/Box/Box.cjs.js +25 -6
  11. package/dist/Box/Box.esm.d.ts +40 -1
  12. package/dist/Box/Box.esm.js +24 -5
  13. package/dist/Breadcrumbs/Breadcrumbs.cjs.d.ts +1 -1
  14. package/dist/Breadcrumbs/Breadcrumbs.cjs.js +2 -2
  15. package/dist/Breadcrumbs/Breadcrumbs.esm.d.ts +1 -1
  16. package/dist/Breadcrumbs/Breadcrumbs.esm.js +2 -2
  17. package/dist/Button/Button.cjs.d.ts +1 -1
  18. package/dist/Button/Button.cjs.js +1 -1
  19. package/dist/Button/Button.esm.d.ts +1 -1
  20. package/dist/Button/Button.esm.js +1 -1
  21. package/dist/Card/Card.cjs.d.ts +1 -1
  22. package/dist/Card/Card.cjs.js +2 -2
  23. package/dist/Card/Card.esm.d.ts +1 -1
  24. package/dist/Card/Card.esm.js +2 -2
  25. package/dist/Checkbox/Checkbox.cjs.d.ts +1 -1
  26. package/dist/Checkbox/Checkbox.cjs.js +4 -4
  27. package/dist/Checkbox/Checkbox.esm.d.ts +1 -1
  28. package/dist/Checkbox/Checkbox.esm.js +4 -4
  29. package/dist/Columns/Columns.cjs.d.ts +1 -1
  30. package/dist/Columns/Columns.esm.d.ts +1 -1
  31. package/dist/Curve/Curve.cjs.d.ts +1 -1
  32. package/dist/Curve/Curve.cjs.js +1 -1
  33. package/dist/Curve/Curve.esm.d.ts +1 -1
  34. package/dist/Curve/Curve.esm.js +1 -1
  35. package/dist/Disclosure/Disclosure.cjs.d.ts +1 -1
  36. package/dist/Disclosure/Disclosure.cjs.js +1 -1
  37. package/dist/Disclosure/Disclosure.esm.d.ts +1 -1
  38. package/dist/Disclosure/Disclosure.esm.js +1 -1
  39. package/dist/DisclosureMini/DisclosureMini.cjs.d.ts +1 -1
  40. package/dist/DisclosureMini/DisclosureMini.cjs.js +2 -2
  41. package/dist/DisclosureMini/DisclosureMini.esm.d.ts +1 -1
  42. package/dist/DisclosureMini/DisclosureMini.esm.js +2 -2
  43. package/dist/FormControl/FormControl.cjs.d.ts +1 -1
  44. package/dist/FormControl/FormControl.cjs.js +3 -3
  45. package/dist/FormControl/FormControl.esm.d.ts +1 -1
  46. package/dist/FormControl/FormControl.esm.js +3 -3
  47. package/dist/Heading/Heading.cjs.d.ts +1 -1
  48. package/dist/Heading/Heading.cjs.js +1 -1
  49. package/dist/Heading/Heading.esm.d.ts +1 -1
  50. package/dist/Heading/Heading.esm.js +1 -1
  51. package/dist/Modal/Modal.cjs.d.ts +31 -9
  52. package/dist/Modal/Modal.cjs.js +450 -161
  53. package/dist/Modal/Modal.esm.d.ts +31 -9
  54. package/dist/Modal/Modal.esm.js +423 -134
  55. package/dist/Pagination/Pagination.cjs.js +4 -4
  56. package/dist/Pagination/Pagination.esm.js +4 -4
  57. package/dist/PaginationSimple/PaginationSimple.cjs.js +4 -4
  58. package/dist/PaginationSimple/PaginationSimple.esm.js +4 -4
  59. package/dist/ProgressBar/ProgressBar.cjs.js +5 -5
  60. package/dist/ProgressBar/ProgressBar.esm.js +6 -6
  61. package/dist/ProgressStepper/ProgressStepper.cjs.d.ts +1 -89
  62. package/dist/ProgressStepper/ProgressStepper.cjs.js +10 -144
  63. package/dist/ProgressStepper/ProgressStepper.esm.d.ts +1 -89
  64. package/dist/ProgressStepper/ProgressStepper.esm.js +9 -143
  65. package/dist/RadioGroup/RadioGroup.cjs.d.ts +1 -1
  66. package/dist/RadioGroup/RadioGroup.cjs.js +4 -4
  67. package/dist/RadioGroup/RadioGroup.esm.d.ts +1 -1
  68. package/dist/RadioGroup/RadioGroup.esm.js +4 -4
  69. package/dist/Select/Select.cjs.d.ts +1 -1
  70. package/dist/Select/Select.cjs.js +995 -60
  71. package/dist/Select/Select.esm.d.ts +1 -1
  72. package/dist/Select/Select.esm.js +948 -32
  73. package/dist/SiteFooter/SiteFooter.cjs.d.ts +1 -1
  74. package/dist/SiteFooter/SiteFooter.cjs.js +2 -2
  75. package/dist/SiteFooter/SiteFooter.esm.d.ts +1 -1
  76. package/dist/SiteFooter/SiteFooter.esm.js +3 -3
  77. package/dist/SiteHeader/SiteHeader.cjs.d.ts +1 -1
  78. package/dist/SiteHeader/SiteHeader.cjs.js +3 -3
  79. package/dist/SiteHeader/SiteHeader.esm.d.ts +1 -1
  80. package/dist/SiteHeader/SiteHeader.esm.js +3 -3
  81. package/dist/Switch/Switch.cjs.d.ts +1 -1
  82. package/dist/Switch/Switch.cjs.js +241 -18
  83. package/dist/Switch/Switch.esm.d.ts +1 -1
  84. package/dist/Switch/Switch.esm.js +234 -11
  85. package/dist/Tabs/Tabs.cjs.d.ts +1 -0
  86. package/dist/Tabs/Tabs.cjs.js +20 -0
  87. package/dist/Tabs/Tabs.esm.d.ts +1 -0
  88. package/dist/Tabs/Tabs.esm.js +12 -0
  89. package/dist/Tabs/package.json +7 -0
  90. package/dist/Text/Text.cjs.d.ts +1 -1
  91. package/dist/Text/Text.cjs.js +1 -1
  92. package/dist/Text/Text.esm.d.ts +1 -1
  93. package/dist/Text/Text.esm.js +1 -1
  94. package/dist/TextArea/TextArea.cjs.d.ts +4 -1
  95. package/dist/TextArea/TextArea.cjs.js +30 -17
  96. package/dist/TextArea/TextArea.esm.d.ts +4 -1
  97. package/dist/TextArea/TextArea.esm.js +30 -17
  98. package/dist/TextInput/TextInput.cjs.d.ts +1 -1
  99. package/dist/TextInput/TextInput.cjs.js +4 -4
  100. package/dist/TextInput/TextInput.esm.d.ts +1 -1
  101. package/dist/TextInput/TextInput.esm.js +4 -4
  102. package/dist/Toast/Toast.cjs.d.ts +1 -0
  103. package/dist/Toast/Toast.cjs.js +23 -0
  104. package/dist/Toast/Toast.esm.d.ts +1 -0
  105. package/dist/Toast/Toast.esm.js +15 -0
  106. package/dist/Toast/package.json +7 -0
  107. package/dist/Truncate/Truncate.cjs.js +3 -2
  108. package/dist/Truncate/Truncate.esm.js +3 -2
  109. package/dist/_shared/cjs/{Breadcrumbs-9f580f69.js → Breadcrumbs-0906dd10.js} +9 -9
  110. package/dist/_shared/cjs/BtIconTick-42fcc5ec.js +91 -0
  111. package/dist/_shared/{esm/Button-9c3b0b11.d.ts → cjs/Button-5aaa6776.d.ts} +4 -0
  112. package/dist/_shared/cjs/{Button-b4d6ccc8.js → Button-5aaa6776.js} +2 -2
  113. package/dist/_shared/cjs/{Card-f1108bfe.js → Card-fd189ba8.js} +1 -1
  114. package/dist/_shared/cjs/{Checkbox-c927b62f.js → Checkbox-02c546ca.js} +1 -1
  115. package/dist/_shared/cjs/Columns-e90798f8.d.ts +1 -1
  116. package/dist/_shared/cjs/{Curve-b05589d8.d.ts → Curve-781ef633.d.ts} +5 -2
  117. package/dist/_shared/cjs/{Curve-b05589d8.js → Curve-781ef633.js} +5 -2
  118. package/dist/_shared/cjs/{DisclosureMini-2a10006e.js → DisclosureMini-52706ee6.js} +1 -1
  119. package/dist/_shared/cjs/{FormControl-78b007b7.js → FormControl-1e1bf2bf.js} +1 -1
  120. package/dist/_shared/cjs/{Heading-ed1cb455.d.ts → Heading-e3332dcf.d.ts} +4 -0
  121. package/dist/_shared/cjs/{Heading-ed1cb455.js → Heading-e3332dcf.js} +2 -2
  122. package/dist/{MediaCard/MediaCard.cjs.d.ts → _shared/cjs/MediaCard-9483ad5f.d.ts} +3 -4
  123. package/dist/_shared/cjs/ProgressStepper-f740d7bb.d.ts +89 -0
  124. package/dist/_shared/cjs/ProgressStepper-f740d7bb.js +149 -0
  125. package/dist/_shared/{esm/RadioGroup-65b8c8bf.d.ts → cjs/RadioGroup-d7664b0c.d.ts} +1 -1
  126. package/dist/_shared/cjs/{RadioGroup-8e17de70.js → RadioGroup-d7664b0c.js} +1 -1
  127. package/dist/_shared/cjs/{SiteFooter-9f7f9c2d.js → SiteFooter-5da774e1.js} +1 -1
  128. package/dist/_shared/cjs/SiteHeader-c25ee36e.d.ts +2 -2
  129. package/dist/_shared/cjs/{SiteHeader.rehydrator-ccbebde6.js → SiteHeader.rehydrator-acc9d8c4.js} +2 -2
  130. package/dist/_shared/cjs/Tabs-fda49692.d.ts +75 -0
  131. package/dist/_shared/cjs/Tabs-fda49692.js +510 -0
  132. package/dist/_shared/{esm/Text-14deb70e.d.ts → cjs/Text-fa447e2d.d.ts} +4 -0
  133. package/dist/_shared/cjs/{Text-555a29a4.js → Text-fa447e2d.js} +2 -2
  134. package/dist/_shared/cjs/{TextInput-7ed03a48.d.ts → TextInput-13050538.d.ts} +3 -1
  135. package/dist/_shared/{esm/TextInput-62bb7dee.d.ts → cjs/TextInput-f4549637.d.ts} +1 -1
  136. package/dist/_shared/cjs/{TextInput-b768e346.js → TextInput-f4549637.js} +1 -1
  137. package/dist/_shared/cjs/Toast-0cb23cae.d.ts +52 -0
  138. package/dist/_shared/cjs/Toast-0cb23cae.js +739 -0
  139. package/dist/_shared/cjs/extends-bb8ffacd.js +21 -0
  140. package/dist/_shared/cjs/index-27b53d49.js +174 -0
  141. package/dist/_shared/cjs/index-699086a7.d.ts +1 -1
  142. package/dist/_shared/cjs/index-74488a9f.d.ts +1 -1
  143. package/dist/_shared/cjs/{index.module-9b87a34d.js → index-952918c9.js} +141 -33
  144. package/dist/_shared/cjs/index-96c4d581.js +289 -0
  145. package/dist/_shared/cjs/index-c81c9401.d.ts +3 -3
  146. package/dist/_shared/cjs/index-e340924e.d.ts +1 -1
  147. package/dist/_shared/cjs/index-e6d20018.d.ts +1 -1
  148. package/dist/_shared/cjs/index-eb06f640.d.ts +1 -1
  149. package/dist/_shared/cjs/{index-31fbb076.js → index-ec260f5e.js} +0 -547
  150. package/dist/_shared/cjs/index-f419cf04.d.ts +1 -1
  151. package/dist/_shared/cjs/index-fb4b8fda.js +47 -0
  152. package/dist/_shared/cjs/index.module-bbcc4e18.js +126 -0
  153. package/dist/_shared/esm/{Breadcrumbs-5dc0afa7.js → Breadcrumbs-dafa8dde.js} +9 -9
  154. package/dist/_shared/esm/BtIconTick-5fe50cc7.js +83 -0
  155. package/dist/_shared/{cjs/Button-b4d6ccc8.d.ts → esm/Button-d1dbcf79.d.ts} +4 -0
  156. package/dist/_shared/esm/{Button-9c3b0b11.js → Button-d1dbcf79.js} +2 -2
  157. package/dist/_shared/esm/{Card-79b6eae0.js → Card-e62c3ff6.js} +1 -1
  158. package/dist/_shared/esm/{Checkbox-2d144384.js → Checkbox-d8891198.js} +1 -1
  159. package/dist/_shared/esm/Columns-8704515b.d.ts +1 -1
  160. package/dist/_shared/esm/{Curve-3e87b1bc.d.ts → Curve-bbc5589c.d.ts} +5 -2
  161. package/dist/_shared/esm/{Curve-3e87b1bc.js → Curve-bbc5589c.js} +5 -2
  162. package/dist/_shared/esm/{DisclosureMini-78a8f392.js → DisclosureMini-9b819941.js} +1 -1
  163. package/dist/_shared/esm/{FormControl-2fa7aae5.js → FormControl-f18e2f59.js} +1 -1
  164. package/dist/_shared/esm/{Heading-ee6bec51.d.ts → Heading-0f629151.d.ts} +4 -0
  165. package/dist/_shared/esm/{Heading-ee6bec51.js → Heading-0f629151.js} +2 -2
  166. package/dist/{MediaCard/MediaCard.esm.d.ts → _shared/esm/MediaCard-9483ad5f.d.ts} +3 -4
  167. package/dist/_shared/esm/ProgressStepper-7ab88f4c.d.ts +89 -0
  168. package/dist/_shared/esm/ProgressStepper-7ab88f4c.js +143 -0
  169. package/dist/_shared/{cjs/RadioGroup-8e17de70.d.ts → esm/RadioGroup-be16d5d3.d.ts} +1 -1
  170. package/dist/_shared/esm/{RadioGroup-65b8c8bf.js → RadioGroup-be16d5d3.js} +1 -1
  171. package/dist/_shared/esm/{SiteFooter-51bdc7df.js → SiteFooter-a182cb18.js} +1 -1
  172. package/dist/_shared/esm/SiteHeader-c25ee36e.d.ts +2 -2
  173. package/dist/_shared/esm/{SiteHeader.rehydrator-382d1c03.js → SiteHeader.rehydrator-023b7b76.js} +2 -2
  174. package/dist/_shared/esm/Tabs-5af0b940.d.ts +75 -0
  175. package/dist/_shared/esm/Tabs-5af0b940.js +504 -0
  176. package/dist/_shared/{cjs/Text-555a29a4.d.ts → esm/Text-40457811.d.ts} +4 -0
  177. package/dist/_shared/esm/{Text-14deb70e.js → Text-40457811.js} +2 -2
  178. package/dist/_shared/esm/{TextInput-7ed03a48.d.ts → TextInput-13050538.d.ts} +3 -1
  179. package/dist/_shared/{cjs/TextInput-b768e346.d.ts → esm/TextInput-4424c195.d.ts} +3 -3
  180. package/dist/_shared/esm/{TextInput-62bb7dee.js → TextInput-4424c195.js} +1 -1
  181. package/dist/_shared/esm/Toast-43795e91.d.ts +52 -0
  182. package/dist/_shared/esm/Toast-43795e91.js +733 -0
  183. package/dist/_shared/esm/extends-4575346e.js +19 -0
  184. package/dist/_shared/esm/{index.module-216016b5.js → index-22aad354.js} +138 -29
  185. package/dist/_shared/esm/{index-4fa635bd.js → index-369dce7f.js} +2 -541
  186. package/dist/_shared/esm/index-699086a7.d.ts +1 -1
  187. package/dist/_shared/esm/index-74488a9f.d.ts +1 -1
  188. package/dist/_shared/esm/index-8000d9e3.js +168 -0
  189. package/dist/_shared/esm/index-94ecc5f8.js +280 -0
  190. package/dist/_shared/esm/index-bed18a88.js +26 -0
  191. package/dist/_shared/esm/index-c81c9401.d.ts +3 -3
  192. package/dist/_shared/esm/index-e340924e.d.ts +1 -1
  193. package/dist/_shared/esm/index-e6d20018.d.ts +1 -1
  194. package/dist/_shared/esm/index-eb06f640.d.ts +1 -1
  195. package/dist/_shared/esm/index-f419cf04.d.ts +1 -1
  196. package/dist/_shared/esm/index.module-5ed90b21.js +122 -0
  197. package/dist/index.es.js +5036 -1358
  198. package/dist/index.es.js.map +1 -1
  199. package/dist/index.js +5358 -1668
  200. package/dist/index.js.map +1 -1
  201. package/dist/styles.css +1 -1
  202. package/dist/types/components/Badge/Badge.d.ts +4 -0
  203. package/dist/types/components/Button/Button.d.ts +4 -0
  204. package/dist/types/components/Columns/Columns.d.ts +1 -1
  205. package/dist/types/components/Columns/index.d.ts +1 -1
  206. package/dist/types/components/Curve/Curve.d.ts +5 -2
  207. package/dist/types/components/Heading/Heading.d.ts +4 -0
  208. package/dist/types/components/Modal/Modal.d.ts +31 -9
  209. package/dist/types/components/Tabs/Tab/Tab.d.ts +22 -0
  210. package/dist/types/components/Tabs/Tab/index.d.ts +1 -0
  211. package/dist/types/components/Tabs/TabContent/TabContent.d.ts +12 -0
  212. package/dist/types/components/Tabs/TabContent/index.d.ts +1 -0
  213. package/dist/types/components/Tabs/Tabs.d.ts +27 -0
  214. package/dist/types/components/Tabs/TabsList/TabsList.d.ts +20 -0
  215. package/dist/types/components/Tabs/TabsList/index.d.ts +1 -0
  216. package/dist/types/components/Tabs/index.d.ts +1 -0
  217. package/dist/types/components/Text/Text.d.ts +4 -0
  218. package/dist/types/components/TextArea/TextArea.d.ts +3 -0
  219. package/dist/types/components/TextInput/TextInput.d.ts +2 -0
  220. package/dist/types/components/Toast/Toast.d.ts +14 -0
  221. package/dist/types/components/Toast/ToastNotification.d.ts +39 -0
  222. package/dist/types/components/Toast/index.d.ts +1 -0
  223. package/dist/types/components/index.d.ts +18 -6
  224. package/dist/types/styles.d.ts +3 -2
  225. package/package.json +8 -6
  226. package/dist/MediaCard/MediaCard.cjs.js +0 -31
  227. package/dist/MediaCard/MediaCard.esm.js +0 -23
  228. package/dist/MediaCard/package.json +0 -7
  229. package/dist/_shared/cjs/Box-ebe2b7be.d.ts +0 -39
  230. package/dist/_shared/cjs/Box-ebe2b7be.js +0 -30
  231. package/dist/_shared/cjs/index.module-5ea728f4.js +0 -23
  232. package/dist/_shared/esm/Box-06d99d8a.d.ts +0 -39
  233. package/dist/_shared/esm/Box-06d99d8a.js +0 -24
  234. package/dist/_shared/esm/index.module-88179159.js +0 -21
  235. package/dist/types/components/Modal/Modal.stories-wip.d.ts +0 -9
  236. /package/dist/_shared/cjs/{Breadcrumbs-9f580f69.d.ts → Breadcrumbs-0906dd10.d.ts} +0 -0
  237. /package/dist/_shared/cjs/{Card-f1108bfe.d.ts → Card-fd189ba8.d.ts} +0 -0
  238. /package/dist/_shared/cjs/{Checkbox-c927b62f.d.ts → Checkbox-02c546ca.d.ts} +0 -0
  239. /package/dist/_shared/cjs/{DisclosureMini-2a10006e.d.ts → DisclosureMini-52706ee6.d.ts} +0 -0
  240. /package/dist/_shared/cjs/{FormControl-78b007b7.d.ts → FormControl-1e1bf2bf.d.ts} +0 -0
  241. /package/dist/_shared/cjs/{SiteFooter-9f7f9c2d.d.ts → SiteFooter-5da774e1.d.ts} +0 -0
  242. /package/dist/_shared/cjs/{SiteHeader.rehydrator-ccbebde6.d.ts → SiteHeader.rehydrator-acc9d8c4.d.ts} +0 -0
  243. /package/dist/_shared/esm/{Breadcrumbs-5dc0afa7.d.ts → Breadcrumbs-dafa8dde.d.ts} +0 -0
  244. /package/dist/_shared/esm/{Card-79b6eae0.d.ts → Card-e62c3ff6.d.ts} +0 -0
  245. /package/dist/_shared/esm/{Checkbox-2d144384.d.ts → Checkbox-d8891198.d.ts} +0 -0
  246. /package/dist/_shared/esm/{DisclosureMini-78a8f392.d.ts → DisclosureMini-9b819941.d.ts} +0 -0
  247. /package/dist/_shared/esm/{FormControl-2fa7aae5.d.ts → FormControl-f18e2f59.d.ts} +0 -0
  248. /package/dist/_shared/esm/{SiteFooter-51bdc7df.d.ts → SiteFooter-a182cb18.d.ts} +0 -0
  249. /package/dist/_shared/esm/{SiteHeader.rehydrator-382d1c03.d.ts → SiteHeader.rehydrator-023b7b76.d.ts} +0 -0
@@ -1,544 +1,5 @@
1
1
  import * as React from 'react';
2
- import { useEffect, forwardRef, useContext, useState, createElement, useRef, createContext, useCallback } from 'react';
3
- import { a as $9f79659886946c16$export$e5c5a5f917a5871c, g as $b1b2314f5f9a1d84$export$25bec8c6f54ee79a, $ as $6ed0406888f73fc4$export$c7b2cbe3552a0d05, e as $8927f6f2acc4f386$export$250ffa63cdc0d034, _ as _extends, f as $e42e1063c40fb3ef$export$b9ecd428b558ff10, h as $8927f6f2acc4f386$export$6d1a0317bde7de7f } from './index.module-216016b5.js';
4
- import $7SXl2$reactdom from 'react-dom';
5
-
6
- const $1746a345f3d73bb7$var$useReactId = React['useId'.toString()] || (()=>undefined
7
- );
8
- let $1746a345f3d73bb7$var$count = 0;
9
- function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
10
- const [id, setId] = React.useState($1746a345f3d73bb7$var$useReactId()); // React versions older than 18 will have client-side ids only.
11
- $9f79659886946c16$export$e5c5a5f917a5871c(()=>{
12
- if (!deterministicId) setId((reactId)=>reactId !== null && reactId !== void 0 ? reactId : String($1746a345f3d73bb7$var$count++)
13
- );
14
- }, [
15
- deterministicId
16
- ]);
17
- return deterministicId || (id ? `radix-${id}` : '');
18
- }
19
-
20
- /**
21
- * Listens for when the escape key is down
22
- */ function $addc16e1bbe58fd0$export$3a72a57244d6e765(onEscapeKeyDownProp, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
23
- const onEscapeKeyDown = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEscapeKeyDownProp);
24
- useEffect(()=>{
25
- const handleKeyDown = (event)=>{
26
- if (event.key === 'Escape') onEscapeKeyDown(event);
27
- };
28
- ownerDocument.addEventListener('keydown', handleKeyDown);
29
- return ()=>ownerDocument.removeEventListener('keydown', handleKeyDown)
30
- ;
31
- }, [
32
- onEscapeKeyDown,
33
- ownerDocument
34
- ]);
35
- }
36
-
37
- const $5cb92bef7577960e$var$CONTEXT_UPDATE = 'dismissableLayer.update';
38
- const $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';
39
- const $5cb92bef7577960e$var$FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';
40
- let $5cb92bef7577960e$var$originalBodyPointerEvents;
41
- const $5cb92bef7577960e$var$DismissableLayerContext = /*#__PURE__*/ createContext({
42
- layers: new Set(),
43
- layersWithOutsidePointerEventsDisabled: new Set(),
44
- branches: new Set()
45
- });
46
- const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
47
- var _node$ownerDocument;
48
- const { disableOutsidePointerEvents: disableOutsidePointerEvents = false , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , onDismiss: onDismiss , ...layerProps } = props;
49
- const context = useContext($5cb92bef7577960e$var$DismissableLayerContext);
50
- const [node1, setNode] = useState(null);
51
- 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;
52
- const [, force] = useState({});
53
- const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setNode(node)
54
- );
55
- const layers = Array.from(context.layers);
56
- const [highestLayerWithOutsidePointerEventsDisabled] = [
57
- ...context.layersWithOutsidePointerEventsDisabled
58
- ].slice(-1); // prettier-ignore
59
- const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled); // prettier-ignore
60
- const index = node1 ? layers.indexOf(node1) : -1;
61
- const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
62
- const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
63
- const pointerDownOutside = $5cb92bef7577960e$var$usePointerDownOutside((event)=>{
64
- const target = event.target;
65
- const isPointerDownOnBranch = [
66
- ...context.branches
67
- ].some((branch)=>branch.contains(target)
68
- );
69
- if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
70
- onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event);
71
- onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
72
- if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
73
- }, ownerDocument);
74
- const focusOutside = $5cb92bef7577960e$var$useFocusOutside((event)=>{
75
- const target = event.target;
76
- const isFocusInBranch = [
77
- ...context.branches
78
- ].some((branch)=>branch.contains(target)
79
- );
80
- if (isFocusInBranch) return;
81
- onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event);
82
- onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
83
- if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
84
- }, ownerDocument);
85
- $addc16e1bbe58fd0$export$3a72a57244d6e765((event)=>{
86
- const isHighestLayer = index === context.layers.size - 1;
87
- if (!isHighestLayer) return;
88
- onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event);
89
- if (!event.defaultPrevented && onDismiss) {
90
- event.preventDefault();
91
- onDismiss();
92
- }
93
- }, ownerDocument);
94
- useEffect(()=>{
95
- if (!node1) return;
96
- if (disableOutsidePointerEvents) {
97
- if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
98
- $5cb92bef7577960e$var$originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
99
- ownerDocument.body.style.pointerEvents = 'none';
100
- }
101
- context.layersWithOutsidePointerEventsDisabled.add(node1);
102
- }
103
- context.layers.add(node1);
104
- $5cb92bef7577960e$var$dispatchUpdate();
105
- return ()=>{
106
- if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) ownerDocument.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents;
107
- };
108
- }, [
109
- node1,
110
- ownerDocument,
111
- disableOutsidePointerEvents,
112
- context
113
- ]);
114
- /**
115
- * We purposefully prevent combining this effect with the `disableOutsidePointerEvents` effect
116
- * because a change to `disableOutsidePointerEvents` would remove this layer from the stack
117
- * and add it to the end again so the layering order wouldn't be _creation order_.
118
- * We only want them to be removed from context stacks when unmounted.
119
- */ useEffect(()=>{
120
- return ()=>{
121
- if (!node1) return;
122
- context.layers.delete(node1);
123
- context.layersWithOutsidePointerEventsDisabled.delete(node1);
124
- $5cb92bef7577960e$var$dispatchUpdate();
125
- };
126
- }, [
127
- node1,
128
- context
129
- ]);
130
- useEffect(()=>{
131
- const handleUpdate = ()=>force({})
132
- ;
133
- document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
134
- return ()=>document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate)
135
- ;
136
- }, []);
137
- return /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, layerProps, {
138
- ref: composedRefs,
139
- style: {
140
- pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? 'auto' : 'none' : undefined,
141
- ...props.style
142
- },
143
- onFocusCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusCapture, focusOutside.onFocusCapture),
144
- onBlurCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlurCapture, focusOutside.onBlurCapture),
145
- onPointerDownCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
146
- }));
147
- });
148
- /* -----------------------------------------------------------------------------------------------*/ /**
149
- * Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup`
150
- * to mimic layer dismissing behaviour present in OS.
151
- * Returns props to pass to the node we want to check for outside events.
152
- */ function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
153
- const handlePointerDownOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPointerDownOutside);
154
- const isPointerInsideReactTreeRef = useRef(false);
155
- const handleClickRef = useRef(()=>{});
156
- useEffect(()=>{
157
- const handlePointerDown = (event)=>{
158
- if (event.target && !isPointerInsideReactTreeRef.current) {
159
- const eventDetail = {
160
- originalEvent: event
161
- };
162
- function handleAndDispatchPointerDownOutsideEvent() {
163
- $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {
164
- discrete: true
165
- });
166
- }
167
- /**
168
- * On touch devices, we need to wait for a click event because browsers implement
169
- * a ~350ms delay between the time the user stops touching the display and when the
170
- * browser executres events. We need to ensure we don't reactivate pointer-events within
171
- * this timeframe otherwise the browser may execute events that should have been prevented.
172
- *
173
- * Additionally, this also lets us deal automatically with cancellations when a click event
174
- * isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc.
175
- *
176
- * This is why we also continuously remove the previous listener, because we cannot be
177
- * certain that it was raised, and therefore cleaned-up.
178
- */ if (event.pointerType === 'touch') {
179
- ownerDocument.removeEventListener('click', handleClickRef.current);
180
- handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;
181
- ownerDocument.addEventListener('click', handleClickRef.current, {
182
- once: true
183
- });
184
- } else handleAndDispatchPointerDownOutsideEvent();
185
- }
186
- isPointerInsideReactTreeRef.current = false;
187
- };
188
- /**
189
- * if this hook executes in a component that mounts via a `pointerdown` event, the event
190
- * would bubble up to the document and trigger a `pointerDownOutside` event. We avoid
191
- * this by delaying the event listener registration on the document.
192
- * This is not React specific, but rather how the DOM works, ie:
193
- * ```
194
- * button.addEventListener('pointerdown', () => {
195
- * console.log('I will log');
196
- * document.addEventListener('pointerdown', () => {
197
- * console.log('I will also log');
198
- * })
199
- * });
200
- */ const timerId = window.setTimeout(()=>{
201
- ownerDocument.addEventListener('pointerdown', handlePointerDown);
202
- }, 0);
203
- return ()=>{
204
- window.clearTimeout(timerId);
205
- ownerDocument.removeEventListener('pointerdown', handlePointerDown);
206
- ownerDocument.removeEventListener('click', handleClickRef.current);
207
- };
208
- }, [
209
- ownerDocument,
210
- handlePointerDownOutside
211
- ]);
212
- return {
213
- // ensures we check React component tree (not just DOM tree)
214
- onPointerDownCapture: ()=>isPointerInsideReactTreeRef.current = true
215
- };
216
- }
217
- /**
218
- * Listens for when focus happens outside a react subtree.
219
- * Returns props to pass to the root (node) of the subtree we want to check.
220
- */ function $5cb92bef7577960e$var$useFocusOutside(onFocusOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
221
- const handleFocusOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onFocusOutside);
222
- const isFocusInsideReactTreeRef = useRef(false);
223
- useEffect(()=>{
224
- const handleFocus = (event)=>{
225
- if (event.target && !isFocusInsideReactTreeRef.current) {
226
- const eventDetail = {
227
- originalEvent: event
228
- };
229
- $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
230
- discrete: false
231
- });
232
- }
233
- };
234
- ownerDocument.addEventListener('focusin', handleFocus);
235
- return ()=>ownerDocument.removeEventListener('focusin', handleFocus)
236
- ;
237
- }, [
238
- ownerDocument,
239
- handleFocusOutside
240
- ]);
241
- return {
242
- onFocusCapture: ()=>isFocusInsideReactTreeRef.current = true
243
- ,
244
- onBlurCapture: ()=>isFocusInsideReactTreeRef.current = false
245
- };
246
- }
247
- function $5cb92bef7577960e$var$dispatchUpdate() {
248
- const event = new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE);
249
- document.dispatchEvent(event);
250
- }
251
- function $5cb92bef7577960e$var$handleAndDispatchCustomEvent(name, handler, detail, { discrete: discrete }) {
252
- const target = detail.originalEvent.target;
253
- const event = new CustomEvent(name, {
254
- bubbles: false,
255
- cancelable: true,
256
- detail: detail
257
- });
258
- if (handler) target.addEventListener(name, handler, {
259
- once: true
260
- });
261
- if (discrete) $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event);
262
- else target.dispatchEvent(event);
263
- }
264
-
265
- const $d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT = 'focusScope.autoFocusOnMount';
266
- const $d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT = 'focusScope.autoFocusOnUnmount';
267
- const $d3863c46a17e8a28$var$EVENT_OPTIONS = {
268
- bubbles: false,
269
- cancelable: true
270
- };
271
- const $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
272
- const { loop: loop = false , trapped: trapped = false , onMountAutoFocus: onMountAutoFocusProp , onUnmountAutoFocus: onUnmountAutoFocusProp , ...scopeProps } = props;
273
- const [container1, setContainer] = useState(null);
274
- const onMountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onMountAutoFocusProp);
275
- const onUnmountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onUnmountAutoFocusProp);
276
- const lastFocusedElementRef = useRef(null);
277
- const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setContainer(node)
278
- );
279
- const focusScope = useRef({
280
- paused: false,
281
- pause () {
282
- this.paused = true;
283
- },
284
- resume () {
285
- this.paused = false;
286
- }
287
- }).current; // Takes care of trapping focus if focus is moved outside programmatically for example
288
- useEffect(()=>{
289
- if (trapped) {
290
- function handleFocusIn(event) {
291
- if (focusScope.paused || !container1) return;
292
- const target = event.target;
293
- if (container1.contains(target)) lastFocusedElementRef.current = target;
294
- else $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, {
295
- select: true
296
- });
297
- }
298
- function handleFocusOut(event) {
299
- if (focusScope.paused || !container1) return;
300
- if (!container1.contains(event.relatedTarget)) $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, {
301
- select: true
302
- });
303
- }
304
- document.addEventListener('focusin', handleFocusIn);
305
- document.addEventListener('focusout', handleFocusOut);
306
- return ()=>{
307
- document.removeEventListener('focusin', handleFocusIn);
308
- document.removeEventListener('focusout', handleFocusOut);
309
- };
310
- }
311
- }, [
312
- trapped,
313
- container1,
314
- focusScope.paused
315
- ]);
316
- useEffect(()=>{
317
- if (container1) {
318
- $d3863c46a17e8a28$var$focusScopesStack.add(focusScope);
319
- const previouslyFocusedElement = document.activeElement;
320
- const hasFocusedCandidate = container1.contains(previouslyFocusedElement);
321
- if (!hasFocusedCandidate) {
322
- const mountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);
323
- container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
324
- container1.dispatchEvent(mountEvent);
325
- if (!mountEvent.defaultPrevented) {
326
- $d3863c46a17e8a28$var$focusFirst($d3863c46a17e8a28$var$removeLinks($d3863c46a17e8a28$var$getTabbableCandidates(container1)), {
327
- select: true
328
- });
329
- if (document.activeElement === previouslyFocusedElement) $d3863c46a17e8a28$var$focus(container1);
330
- }
331
- }
332
- return ()=>{
333
- container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus); // We hit a react bug (fixed in v17) with focusing in unmount.
334
- // We need to delay the focus a little to get around it for now.
335
- // See: https://github.com/facebook/react/issues/17894
336
- setTimeout(()=>{
337
- const unmountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);
338
- container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
339
- container1.dispatchEvent(unmountEvent);
340
- if (!unmountEvent.defaultPrevented) $d3863c46a17e8a28$var$focus(previouslyFocusedElement !== null && previouslyFocusedElement !== void 0 ? previouslyFocusedElement : document.body, {
341
- select: true
342
- });
343
- // we need to remove the listener after we `dispatchEvent`
344
- container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
345
- $d3863c46a17e8a28$var$focusScopesStack.remove(focusScope);
346
- }, 0);
347
- };
348
- }
349
- }, [
350
- container1,
351
- onMountAutoFocus,
352
- onUnmountAutoFocus,
353
- focusScope
354
- ]); // Takes care of looping focus (when tabbing whilst at the edges)
355
- const handleKeyDown = useCallback((event)=>{
356
- if (!loop && !trapped) return;
357
- if (focusScope.paused) return;
358
- const isTabKey = event.key === 'Tab' && !event.altKey && !event.ctrlKey && !event.metaKey;
359
- const focusedElement = document.activeElement;
360
- if (isTabKey && focusedElement) {
361
- const container = event.currentTarget;
362
- const [first, last] = $d3863c46a17e8a28$var$getTabbableEdges(container);
363
- const hasTabbableElementsInside = first && last; // we can only wrap focus if we have tabbable edges
364
- if (!hasTabbableElementsInside) {
365
- if (focusedElement === container) event.preventDefault();
366
- } else {
367
- if (!event.shiftKey && focusedElement === last) {
368
- event.preventDefault();
369
- if (loop) $d3863c46a17e8a28$var$focus(first, {
370
- select: true
371
- });
372
- } else if (event.shiftKey && focusedElement === first) {
373
- event.preventDefault();
374
- if (loop) $d3863c46a17e8a28$var$focus(last, {
375
- select: true
376
- });
377
- }
378
- }
379
- }
380
- }, [
381
- loop,
382
- trapped,
383
- focusScope.paused
384
- ]);
385
- return /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
386
- tabIndex: -1
387
- }, scopeProps, {
388
- ref: composedRefs,
389
- onKeyDown: handleKeyDown
390
- }));
391
- });
392
- /* -------------------------------------------------------------------------------------------------
393
- * Utils
394
- * -----------------------------------------------------------------------------------------------*/ /**
395
- * Attempts focusing the first element in a list of candidates.
396
- * Stops when focus has actually moved.
397
- */ function $d3863c46a17e8a28$var$focusFirst(candidates, { select: select = false } = {}) {
398
- const previouslyFocusedElement = document.activeElement;
399
- for (const candidate of candidates){
400
- $d3863c46a17e8a28$var$focus(candidate, {
401
- select: select
402
- });
403
- if (document.activeElement !== previouslyFocusedElement) return;
404
- }
405
- }
406
- /**
407
- * Returns the first and last tabbable elements inside a container.
408
- */ function $d3863c46a17e8a28$var$getTabbableEdges(container) {
409
- const candidates = $d3863c46a17e8a28$var$getTabbableCandidates(container);
410
- const first = $d3863c46a17e8a28$var$findVisible(candidates, container);
411
- const last = $d3863c46a17e8a28$var$findVisible(candidates.reverse(), container);
412
- return [
413
- first,
414
- last
415
- ];
416
- }
417
- /**
418
- * Returns a list of potential tabbable candidates.
419
- *
420
- * NOTE: This is only a close approximation. For example it doesn't take into account cases like when
421
- * elements are not visible. This cannot be worked out easily by just reading a property, but rather
422
- * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.
423
- *
424
- * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker
425
- * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1
426
- */ function $d3863c46a17e8a28$var$getTabbableCandidates(container) {
427
- const nodes = [];
428
- const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
429
- acceptNode: (node)=>{
430
- const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden';
431
- if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP; // `.tabIndex` is not the same as the `tabindex` attribute. It works on the
432
- // runtime's understanding of tabbability, so this automatically accounts
433
- // for any kind of element that could be tabbed to.
434
- return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
435
- }
436
- });
437
- while(walker.nextNode())nodes.push(walker.currentNode); // we do not take into account the order of nodes with positive `tabIndex` as it
438
- // hinders accessibility to have tab order different from visual order.
439
- return nodes;
440
- }
441
- /**
442
- * Returns the first visible element in a list.
443
- * NOTE: Only checks visibility up to the `container`.
444
- */ function $d3863c46a17e8a28$var$findVisible(elements, container) {
445
- for (const element of elements){
446
- // we stop checking if it's hidden at the `container` level (excluding)
447
- if (!$d3863c46a17e8a28$var$isHidden(element, {
448
- upTo: container
449
- })) return element;
450
- }
451
- }
452
- function $d3863c46a17e8a28$var$isHidden(node, { upTo: upTo }) {
453
- if (getComputedStyle(node).visibility === 'hidden') return true;
454
- while(node){
455
- // we stop at `upTo` (excluding it)
456
- if (upTo !== undefined && node === upTo) return false;
457
- if (getComputedStyle(node).display === 'none') return true;
458
- node = node.parentElement;
459
- }
460
- return false;
461
- }
462
- function $d3863c46a17e8a28$var$isSelectableInput(element) {
463
- return element instanceof HTMLInputElement && 'select' in element;
464
- }
465
- function $d3863c46a17e8a28$var$focus(element, { select: select = false } = {}) {
466
- // only focus if that element is focusable
467
- if (element && element.focus) {
468
- const previouslyFocusedElement = document.activeElement; // NOTE: we prevent scrolling on focus, to minimize jarring transitions for users
469
- element.focus({
470
- preventScroll: true
471
- }); // only select if its not the same element, it supports selection and we need to select
472
- if (element !== previouslyFocusedElement && $d3863c46a17e8a28$var$isSelectableInput(element) && select) element.select();
473
- }
474
- }
475
- /* -------------------------------------------------------------------------------------------------
476
- * FocusScope stack
477
- * -----------------------------------------------------------------------------------------------*/ const $d3863c46a17e8a28$var$focusScopesStack = $d3863c46a17e8a28$var$createFocusScopesStack();
478
- function $d3863c46a17e8a28$var$createFocusScopesStack() {
479
- /** A stack of focus scopes, with the active one at the top */ let stack = [];
480
- return {
481
- add (focusScope) {
482
- // pause the currently active focus scope (at the top of the stack)
483
- const activeFocusScope = stack[0];
484
- if (focusScope !== activeFocusScope) activeFocusScope === null || activeFocusScope === void 0 || activeFocusScope.pause();
485
- // remove in case it already exists (because we'll re-add it at the top of the stack)
486
- stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope);
487
- stack.unshift(focusScope);
488
- },
489
- remove (focusScope) {
490
- var _stack$;
491
- stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope);
492
- (_stack$ = stack[0]) === null || _stack$ === void 0 || _stack$.resume();
493
- }
494
- };
495
- }
496
- function $d3863c46a17e8a28$var$arrayRemove(array, item) {
497
- const updatedArray = [
498
- ...array
499
- ];
500
- const index = updatedArray.indexOf(item);
501
- if (index !== -1) updatedArray.splice(index, 1);
502
- return updatedArray;
503
- }
504
- function $d3863c46a17e8a28$var$removeLinks(items) {
505
- return items.filter((item)=>item.tagName !== 'A'
506
- );
507
- }
508
-
509
- const $f1701beae083dbae$export$602eac185826482c = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
510
- var _globalThis$document;
511
- 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;
512
- return container ? /*#__PURE__*/ $7SXl2$reactdom.createPortal(/*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, portalProps, {
513
- ref: forwardedRef
514
- })), container) : null;
515
- });
516
-
517
- /** Number of components which have requested interest to have focus guards */ let $3db38b7d1fb3fe6a$var$count = 0;
518
- /**
519
- * Injects a pair of focus guards at the edges of the whole DOM tree
520
- * to ensure `focusin` & `focusout` events can be caught consistently.
521
- */ function $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c() {
522
- useEffect(()=>{
523
- var _edgeGuards$, _edgeGuards$2;
524
- const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]');
525
- document.body.insertAdjacentElement('afterbegin', (_edgeGuards$ = edgeGuards[0]) !== null && _edgeGuards$ !== void 0 ? _edgeGuards$ : $3db38b7d1fb3fe6a$var$createFocusGuard());
526
- document.body.insertAdjacentElement('beforeend', (_edgeGuards$2 = edgeGuards[1]) !== null && _edgeGuards$2 !== void 0 ? _edgeGuards$2 : $3db38b7d1fb3fe6a$var$createFocusGuard());
527
- $3db38b7d1fb3fe6a$var$count++;
528
- return ()=>{
529
- if ($3db38b7d1fb3fe6a$var$count === 1) document.querySelectorAll('[data-radix-focus-guard]').forEach((node)=>node.remove()
530
- );
531
- $3db38b7d1fb3fe6a$var$count--;
532
- };
533
- }, []);
534
- }
535
- function $3db38b7d1fb3fe6a$var$createFocusGuard() {
536
- const element = document.createElement('span');
537
- element.setAttribute('data-radix-focus-guard', '');
538
- element.tabIndex = 0;
539
- element.style.cssText = 'outline: none; opacity: 0; position: fixed; pointer-events: none';
540
- return element;
541
- }
2
+ import { useState } from 'react';
542
3
 
543
4
  /******************************************************************************
544
5
  Copyright (c) Microsoft Corporation.
@@ -1383,4 +844,4 @@ var hideOthers = function (originalTarget, parentNode, markerName) {
1383
844
  return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');
1384
845
  };
1385
846
 
1386
- export { $1746a345f3d73bb7$export$f680877a34711e37 as $, $f1701beae083dbae$export$602eac185826482c as a, $01b9c$RemoveScroll as b, $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c as c, $d3863c46a17e8a28$export$20e40289641fbbb6 as d, $5cb92bef7577960e$export$177fb62ff3ec1f22 as e, hideOthers as h };
847
+ export { $01b9c$RemoveScroll as $, hideOthers as h };
@@ -1,2 +1,2 @@
1
- export { Item } from "./SiteHeader.rehydrator-382d1c03";
1
+ export { Item } from "./SiteHeader.rehydrator-023b7b76";
2
2
  export {};
@@ -1,2 +1,2 @@
1
1
  export { SubNavItem } from "./SubNavItem-a84d1bf4";
2
- export { default as SubNavItemRehydrator } from "./SiteHeader.rehydrator-382d1c03";
2
+ export { default as SubNavItemRehydrator } from "./SiteHeader.rehydrator-023b7b76";