@arc-ui/components 11.24.1 → 12.0.0-beta.3

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 (408) hide show
  1. package/dist/Alert/Alert.cjs.js +18 -29
  2. package/dist/Alert/Alert.esm.js +17 -28
  3. package/dist/Align/Align.cjs.js +6 -6
  4. package/dist/Align/Align.esm.js +2 -2
  5. package/dist/AppButton/AppButton.cjs.js +73 -0
  6. package/dist/AppButton/AppButton.esm.js +65 -0
  7. package/dist/AppButton/package.json +7 -0
  8. package/dist/Avatar/Avatar.cjs.js +7 -7
  9. package/dist/Avatar/Avatar.esm.js +7 -7
  10. package/dist/AvatarGroup/AvatarGroup.cjs.js +14 -14
  11. package/dist/AvatarGroup/AvatarGroup.esm.js +7 -7
  12. package/dist/Badge/Badge.cjs.js +5 -22
  13. package/dist/Badge/Badge.esm.js +5 -22
  14. package/dist/Box/Box.cjs.js +6 -6
  15. package/dist/Box/Box.esm.js +3 -3
  16. package/dist/BrandLogo/BrandLogo.cjs.js +4 -4
  17. package/dist/BrandLogo/BrandLogo.esm.js +4 -4
  18. package/dist/Breadcrumbs/Breadcrumbs.cjs.js +7 -7
  19. package/dist/Breadcrumbs/Breadcrumbs.esm.js +7 -7
  20. package/dist/Button/Button.cjs.js +7 -8
  21. package/dist/Button/Button.esm.js +7 -8
  22. package/dist/ButtonV2/ButtonV2.cjs.js +16 -0
  23. package/dist/ButtonV2/ButtonV2.esm.js +8 -0
  24. package/dist/ButtonV2/package.json +7 -0
  25. package/dist/Calendar/Calendar.cjs.js +11 -10
  26. package/dist/Calendar/Calendar.esm.js +11 -10
  27. package/dist/Checkbox/Checkbox.cjs.js +8 -10
  28. package/dist/Checkbox/Checkbox.esm.js +8 -10
  29. package/dist/Columns/Columns.cjs.js +3 -3
  30. package/dist/Columns/Columns.esm.js +3 -3
  31. package/dist/DatePicker/DatePicker.cjs.js +35 -563
  32. package/dist/DatePicker/DatePicker.esm.js +26 -554
  33. package/dist/Disclosure/Disclosure.cjs.js +10 -10
  34. package/dist/Disclosure/Disclosure.esm.js +6 -6
  35. package/dist/DisclosureMini/DisclosureMini.cjs.js +6 -6
  36. package/dist/DisclosureMini/DisclosureMini.esm.js +6 -6
  37. package/dist/Elevation/Elevation.cjs.js +5 -5
  38. package/dist/Elevation/Elevation.esm.js +1 -1
  39. package/dist/Filter/Filter.cjs.js +3 -3
  40. package/dist/Filter/Filter.esm.js +3 -3
  41. package/dist/FormControl/FormControl.cjs.js +7 -8
  42. package/dist/FormControl/FormControl.esm.js +7 -8
  43. package/dist/Grid/Grid.cjs.js +3 -3
  44. package/dist/Grid/Grid.esm.js +3 -3
  45. package/dist/Group/Group.cjs.js +3 -3
  46. package/dist/Group/Group.esm.js +3 -3
  47. package/dist/Heading/Heading.cjs.js +4 -4
  48. package/dist/Heading/Heading.esm.js +4 -4
  49. package/dist/HeroButton/HeroButton.cjs.js +16 -0
  50. package/dist/HeroButton/HeroButton.esm.js +8 -0
  51. package/dist/HeroButton/package.json +7 -0
  52. package/dist/Hidden/Hidden.cjs.js +5 -5
  53. package/dist/Hidden/Hidden.esm.js +1 -1
  54. package/dist/Icon/Icon.cjs.js +5 -5
  55. package/dist/Icon/Icon.esm.js +5 -5
  56. package/dist/Image/Image.cjs.js +3 -3
  57. package/dist/Image/Image.esm.js +3 -3
  58. package/dist/ImpactCard/ImpactCard.cjs.js +18 -16
  59. package/dist/ImpactCard/ImpactCard.esm.js +14 -12
  60. package/dist/InformationCard/InformationCard.cjs.js +28 -26
  61. package/dist/InformationCard/InformationCard.esm.js +20 -18
  62. package/dist/Link/Link.cjs.js +13 -13
  63. package/dist/Link/Link.esm.js +6 -6
  64. package/dist/Markup/Markup.cjs.js +6 -6
  65. package/dist/Markup/Markup.esm.js +2 -2
  66. package/dist/MediaCard/MediaCard.cjs.js +19 -47
  67. package/dist/MediaCard/MediaCard.esm.js +18 -46
  68. package/dist/Modal/Modal.cjs.js +1496 -250
  69. package/dist/Modal/Modal.esm.js +1475 -248
  70. package/dist/Pagination/Pagination.cjs.js +15 -20
  71. package/dist/Pagination/Pagination.esm.js +8 -13
  72. package/dist/PaginationSimple/PaginationSimple.cjs.js +12 -16
  73. package/dist/PaginationSimple/PaginationSimple.esm.js +7 -11
  74. package/dist/Poster/Poster.cjs.js +5 -5
  75. package/dist/Poster/Poster.esm.js +5 -5
  76. package/dist/ProgressBar/ProgressBar.cjs.js +17 -43
  77. package/dist/ProgressBar/ProgressBar.esm.js +13 -39
  78. package/dist/ProgressStepper/ProgressStepper.cjs.js +5 -5
  79. package/dist/ProgressStepper/ProgressStepper.esm.js +5 -5
  80. package/dist/RadioGroup/RadioGroup.cjs.js +8 -9
  81. package/dist/RadioGroup/RadioGroup.esm.js +8 -9
  82. package/dist/Rule/Rule.cjs.js +5 -5
  83. package/dist/Rule/Rule.esm.js +2 -2
  84. package/dist/ScrollToTop/ScrollToTop.cjs.js +14 -28
  85. package/dist/ScrollToTop/ScrollToTop.esm.js +10 -24
  86. package/dist/Section/Section.cjs.js +2 -2
  87. package/dist/Section/Section.esm.js +2 -2
  88. package/dist/Select/Select.cjs.js +58 -96
  89. package/dist/Select/Select.esm.js +25 -63
  90. package/dist/SiteFooter/SiteFooter.cjs.js +10 -34
  91. package/dist/SiteFooter/SiteFooter.esm.js +10 -34
  92. package/dist/SiteHeaderV2/SiteHeaderV2.cjs.js +14 -13
  93. package/dist/SiteHeaderV2/SiteHeaderV2.esm.js +14 -13
  94. package/dist/SkipLink/SkipLink.cjs.js +3 -3
  95. package/dist/SkipLink/SkipLink.esm.js +1 -1
  96. package/dist/Surface/Surface.cjs.js +2 -2
  97. package/dist/Surface/Surface.esm.js +2 -2
  98. package/dist/Switch/Switch.cjs.js +26 -399
  99. package/dist/Switch/Switch.esm.js +13 -386
  100. package/dist/Tabs/Tabs.cjs.js +10 -11
  101. package/dist/Tabs/Tabs.esm.js +10 -11
  102. package/dist/Tag/Tag.cjs.js +6 -5
  103. package/dist/Tag/Tag.esm.js +6 -5
  104. package/dist/Text/Text.cjs.js +4 -4
  105. package/dist/Text/Text.esm.js +4 -4
  106. package/dist/TextArea/TextArea.cjs.js +62 -57
  107. package/dist/TextArea/TextArea.esm.js +58 -53
  108. package/dist/TextInput/TextInput.cjs.js +9 -10
  109. package/dist/TextInput/TextInput.esm.js +9 -10
  110. package/dist/Theme/Theme.cjs.js +30 -0
  111. package/dist/Theme/Theme.esm.js +21 -0
  112. package/dist/Theme/package.json +7 -0
  113. package/dist/ThemeIcon/ThemeIcon.cjs.js +14 -0
  114. package/dist/ThemeIcon/ThemeIcon.esm.js +6 -0
  115. package/dist/ThemeIcon/package.json +7 -0
  116. package/dist/Toast/Toast.cjs.js +10 -14
  117. package/dist/Toast/Toast.esm.js +10 -14
  118. package/dist/Truncate/Truncate.cjs.js +3 -3
  119. package/dist/Truncate/Truncate.esm.js +1 -1
  120. package/dist/TypographyCard/TypographyCard.cjs.js +16 -14
  121. package/dist/TypographyCard/TypographyCard.esm.js +13 -11
  122. package/dist/UniversalHeader/UniversalHeader.cjs.js +3 -3
  123. package/dist/UniversalHeader/UniversalHeader.esm.js +3 -3
  124. package/dist/VerticalSpace/VerticalSpace.cjs.js +2 -2
  125. package/dist/VerticalSpace/VerticalSpace.esm.js +2 -2
  126. package/dist/VideoPlayer/VideoPlayer.cjs.js +3013 -0
  127. package/dist/VideoPlayer/VideoPlayer.esm.js +3005 -0
  128. package/dist/VideoPlayer/package.json +7 -0
  129. package/dist/Visible/Visible.cjs.js +5 -5
  130. package/dist/Visible/Visible.esm.js +1 -1
  131. package/dist/_shared/cjs/ArcIconEclipse.esm-ac777a76.js +28 -0
  132. package/dist/_shared/cjs/Avatar-fc0d9b8b.js +49 -0
  133. package/dist/_shared/cjs/{BrandLogo-aea340c8.js → BrandLogo-1d2ca2c7.js} +7 -7
  134. package/dist/_shared/cjs/{Breadcrumbs-c6eaf5c4.js → Breadcrumbs-7af0af2c.js} +15 -16
  135. package/dist/_shared/cjs/BtIconArrowRight.esm-5989f2ca.js +38 -0
  136. package/dist/_shared/cjs/{BtIconAlert.esm-1a0ff9f0.js → BtIconPlayFill.esm-b8997cfc.js} +4 -8
  137. package/dist/_shared/cjs/{Button-6ba21d3b.js → Button-7d891a89.js} +13 -16
  138. package/dist/_shared/cjs/ButtonV2-b2db3f46.js +48 -0
  139. package/dist/_shared/cjs/Calendar-780bb071.js +1927 -0
  140. package/dist/_shared/cjs/{CardFooter-ff015d7d.js → CardFooter-5414bc4f.js} +9 -12
  141. package/dist/_shared/cjs/Checkbox-0e423653.js +65 -0
  142. package/dist/_shared/cjs/{Columns-ae4f8cef.js → Columns-1224bdff.js} +9 -16
  143. package/dist/_shared/cjs/{index-77ab5c6a.js → Combination-3a639f6d.js} +877 -83
  144. package/dist/_shared/cjs/DatePicker-e27ea988.js +550 -0
  145. package/dist/_shared/cjs/{DisclosureMini-09c749e5.js → DisclosureMini-c01ecce0.js} +12 -14
  146. package/dist/_shared/cjs/{Filter-f9506dfa.js → Filter-3b897d92.js} +13 -13
  147. package/dist/_shared/cjs/{FormControl-68258ce1.js → FormControl-88d48f42.js} +21 -18
  148. package/dist/_shared/cjs/Grid-9e91fb3d.js +46 -0
  149. package/dist/_shared/cjs/{Group-0429741a.js → Group-3d5ea240.js} +9 -16
  150. package/dist/_shared/cjs/{Heading-27cba320.js → Heading-fb63844f.js} +7 -7
  151. package/dist/_shared/cjs/HeroButton-0586a7c4.js +126 -0
  152. package/dist/_shared/cjs/Icon-0ec0c1fb.js +37 -0
  153. package/dist/_shared/cjs/Image-e9a5a326.js +56 -0
  154. package/dist/_shared/cjs/MediaCard-e1648705.js +65 -0
  155. package/dist/_shared/cjs/{Poster-9b48fd61.js → Poster-b7242b37.js} +15 -15
  156. package/dist/_shared/cjs/Preview-0bf3f6e8.js +167 -0
  157. package/dist/_shared/cjs/{ProgressStepper-491f0286.js → ProgressStepper-fb8405c2.js} +40 -19
  158. package/dist/_shared/cjs/{RadioGroup-26dc00fc.js → RadioGroup-a4186267.js} +14 -14
  159. package/dist/_shared/cjs/{Section-59804166.js → Section-ecfc659b.js} +5 -5
  160. package/dist/_shared/cjs/{SiteFooter-20d5a9fa.js → SiteFooter-b4247527.js} +14 -15
  161. package/dist/_shared/cjs/{SiteHeaderV2-ce1c8737.js → SiteHeaderV2-c2d651bc.js} +115 -83
  162. package/dist/_shared/cjs/{Surface-038db6e1.js → Surface-8599dbe4.js} +23 -23
  163. package/dist/_shared/cjs/{Tabs-bc9fac46.js → Tabs-75c34f43.js} +31 -49
  164. package/dist/_shared/cjs/{Tag-73a59171.js → Tag-452048f6.js} +9 -49
  165. package/dist/_shared/cjs/{Text-606ca3a2.js → Text-1c1110a4.js} +7 -7
  166. package/dist/_shared/cjs/{TextInput-8d139489.js → TextInput-762e2309.js} +11 -11
  167. package/dist/_shared/cjs/ThemeIcon-ee814862.js +27 -0
  168. package/dist/_shared/cjs/{Toast-26207fef.js → Toast-d06a89e0.js} +34 -38
  169. package/dist/_shared/cjs/{UniversalHeader-b8389447.js → UniversalHeader-f6d9c63a.js} +7 -14
  170. package/dist/_shared/cjs/{VerticalSpace-dc53bb70.js → VerticalSpace-e128ec68.js} +5 -5
  171. package/dist/_shared/cjs/_commonjsHelpers-56412ec5.js +21 -0
  172. package/dist/_shared/cjs/component-df82bc05.js +505 -0
  173. package/dist/_shared/cjs/{debounce-123468fb.js → debounce-a74c28cf.js} +2 -2
  174. package/dist/_shared/cjs/{index-74004a9c.js → index-039a9d35.js} +1 -1
  175. package/dist/_shared/cjs/{index-9f99d686.js → index-0c6319ec.js} +1 -1
  176. package/dist/_shared/cjs/index-28447df0.js +23 -0
  177. package/dist/_shared/cjs/{index-a31e64a9.js → index-3d629205.js} +2 -3
  178. package/dist/_shared/cjs/{index-dd1d18ea.js → index-3dd54df1.js} +21 -6
  179. package/dist/_shared/cjs/index-41b09e85.js +53 -0
  180. package/dist/_shared/cjs/{index-6eb396a3.js → index-7aa7f96a.js} +1 -1
  181. package/dist/_shared/{esm/Calendar-ea232839.js → cjs/index-7e31a45b.js} +54 -1942
  182. package/dist/_shared/cjs/{index-d38f1bd0.js → index-996dec94.js} +3 -3
  183. package/dist/_shared/cjs/{filter-data-attrs-1c9a530c.js → index-df60851b.js} +17 -57
  184. package/dist/_shared/cjs/index.es-8b018b0d.js +13 -0
  185. package/dist/_shared/cjs/{suffix-modifier-64dcd338.js → suffix-modifier-c8a34402.js} +2 -2
  186. package/dist/_shared/cjs/{use-media-query-e61881d8.js → use-media-query-d34c83b9.js} +0 -11
  187. package/dist/_shared/esm/ArcIconEclipse.esm-bb48b82a.js +22 -0
  188. package/dist/_shared/esm/{Avatar-320313f0.js → Avatar-38cc0595.js} +6 -23
  189. package/dist/_shared/esm/{BrandLogo-1af78f76.js → BrandLogo-7ed8aeda.js} +3 -3
  190. package/dist/_shared/esm/{Breadcrumbs-7d55e1a6.js → Breadcrumbs-9078b68e.js} +5 -6
  191. package/dist/_shared/esm/BtIconArrowRight.esm-6a17d0ce.js +31 -0
  192. package/dist/_shared/esm/BtIconPlayFill.esm-05fc0344.js +24 -0
  193. package/dist/_shared/esm/{Button-a7d134c6.js → Button-dde2b46a.js} +7 -10
  194. package/dist/_shared/esm/ButtonV2-49cd0615.js +42 -0
  195. package/dist/_shared/esm/Calendar-f81052f4.js +1918 -0
  196. package/dist/_shared/esm/{CardFooter-e13f77b0.js → CardFooter-c79fb2db.js} +7 -10
  197. package/dist/_shared/esm/{Checkbox-588619c7.js → Checkbox-0baca464.js} +15 -12
  198. package/dist/_shared/esm/{Columns-d96b7425.js → Columns-6a8f6fbb.js} +3 -10
  199. package/dist/_shared/esm/{index-b84a20c6.js → Combination-ae3a3f08.js} +853 -66
  200. package/dist/_shared/esm/DatePicker-2260f260.js +539 -0
  201. package/dist/_shared/esm/{DisclosureMini-56719716.js → DisclosureMini-38f4c459.js} +8 -10
  202. package/dist/_shared/esm/{Filter-258ba675.js → Filter-49dcf5ce.js} +2 -2
  203. package/dist/_shared/esm/{FormControl-8e836656.js → FormControl-d873f7fa.js} +14 -11
  204. package/dist/_shared/esm/{Grid-07dbf4bd.js → Grid-fb9fc522.js} +5 -4
  205. package/dist/_shared/esm/{Group-73fdb896.js → Group-66196f07.js} +3 -10
  206. package/dist/_shared/esm/{Heading-d16e0e53.js → Heading-906c7c7c.js} +3 -3
  207. package/dist/_shared/esm/HeroButton-7ea692bf.js +120 -0
  208. package/dist/_shared/esm/{Icon-15799695.js → Icon-512f834f.js} +6 -23
  209. package/dist/_shared/esm/{Image-12fbd327.js → Image-57d08939.js} +15 -5
  210. package/dist/_shared/esm/MediaCard-01250268.js +59 -0
  211. package/dist/_shared/esm/{Poster-4ec2f679.js → Poster-e05a8b45.js} +7 -7
  212. package/dist/_shared/esm/Preview-43b2a75d.js +161 -0
  213. package/dist/_shared/esm/{ProgressStepper-7eba3a6a.js → ProgressStepper-189ed0f9.js} +33 -12
  214. package/dist/_shared/esm/{RadioGroup-427652ac.js → RadioGroup-8ff17cbb.js} +5 -5
  215. package/dist/_shared/esm/{Section-73781b56.js → Section-1acbc06a.js} +1 -1
  216. package/dist/_shared/esm/{SiteFooter-86f910b4.js → SiteFooter-ef6f0cdc.js} +11 -12
  217. package/dist/_shared/esm/{SiteHeaderV2-a7c1b1cb.js → SiteHeaderV2-a041b889.js} +64 -32
  218. package/dist/_shared/esm/{Surface-0ca6817d.js → Surface-71d21a9e.js} +17 -17
  219. package/dist/_shared/esm/{Tabs-9485cab6.js → Tabs-21ac7dfe.js} +11 -29
  220. package/dist/_shared/esm/{Tag-cb35d57b.js → Tag-2513c185.js} +6 -46
  221. package/dist/_shared/esm/{Text-14f586ac.js → Text-a46fb76b.js} +3 -3
  222. package/dist/_shared/esm/{TextInput-c0388103.js → TextInput-94c7b1a4.js} +4 -4
  223. package/dist/_shared/esm/ThemeIcon-c2dc41a6.js +21 -0
  224. package/dist/_shared/esm/{Toast-fcbfc194.js → Toast-de6ca2f3.js} +15 -19
  225. package/dist/_shared/esm/{UniversalHeader-80c7313f.js → UniversalHeader-456ad60c.js} +4 -11
  226. package/dist/_shared/esm/{VerticalSpace-43cd9138.js → VerticalSpace-b07cd8e6.js} +1 -1
  227. package/dist/_shared/esm/_commonjsHelpers-0109d574.js +18 -0
  228. package/dist/_shared/esm/component-d0a555cf.js +476 -0
  229. package/dist/_shared/esm/{debounce-6fed6b84.js → debounce-c8e41002.js} +1 -1
  230. package/dist/_shared/esm/{filter-data-attrs-ea8f4ed4.js → index-288c66b5.js} +17 -55
  231. package/dist/_shared/esm/index-4e58de24.js +51 -0
  232. package/dist/_shared/esm/{index-25a5b393.js → index-5113ed53.js} +1 -2
  233. package/dist/_shared/esm/{index-2cfab9f2.js → index-6028d797.js} +1 -1
  234. package/dist/_shared/{cjs/Calendar-b022545c.js → esm/index-605031ca.js} +44 -1954
  235. package/dist/_shared/esm/index-69089474.js +21 -0
  236. package/dist/_shared/esm/{index-efa9be1a.js → index-7740883c.js} +1 -1
  237. package/dist/_shared/esm/{index-7b531fa7.js → index-cace3545.js} +16 -2
  238. package/dist/_shared/esm/{index-044da8d0.js → index-f97466e9.js} +1 -1
  239. package/dist/_shared/esm/{index-ca72c9d5.js → index-fa93ec97.js} +1 -1
  240. package/dist/_shared/esm/index.es-3139cf9e.js +9 -0
  241. package/dist/_shared/esm/{suffix-modifier-3d548e45.js → suffix-modifier-1ce05abe.js} +2 -2
  242. package/dist/_shared/esm/{use-media-query-4c807227.js → use-media-query-d3622da8.js} +1 -9
  243. package/dist/index.es.js +17418 -40573
  244. package/dist/index.es.js.map +1 -1
  245. package/dist/index.js +17825 -40979
  246. package/dist/index.js.map +1 -1
  247. package/dist/styles.css +13 -11
  248. package/dist/types/components/Alert/Alert.d.ts +3 -5
  249. package/dist/types/components/AppButton/AppButton.d.ts +9 -0
  250. package/dist/types/components/AppButton/icons/AppStore.d.ts +2 -0
  251. package/dist/types/components/AppButton/icons/GooglePlay.d.ts +2 -0
  252. package/dist/types/components/AppButton/index.d.ts +1 -0
  253. package/dist/types/components/Avatar/types/avatar-image.d.ts +1 -1
  254. package/dist/types/components/Badge/Badge.d.ts +0 -8
  255. package/dist/types/components/BrandLogo/BrandLogo.d.ts +2 -2
  256. package/dist/types/components/ButtonV2/ButtonV2.d.ts +79 -0
  257. package/dist/types/components/ButtonV2/index.d.ts +1 -0
  258. package/dist/types/components/Checkbox/Checkbox.d.ts +7 -4
  259. package/dist/types/components/DatePicker/DatePicker.d.ts +1 -1
  260. package/dist/types/components/FormControl/FormControl.d.ts +1 -1
  261. package/dist/types/components/Grid/Grid.types.d.ts +2 -0
  262. package/dist/types/components/Grid/components/Col/Col.d.ts +2 -1
  263. package/dist/types/components/Grid/components/Row/Row.d.ts +2 -1
  264. package/dist/types/components/Grid/index.d.ts +1 -1
  265. package/dist/types/components/HeroButton/HeroButton.d.ts +66 -0
  266. package/dist/types/components/HeroButton/index.d.ts +1 -0
  267. package/dist/types/components/Image/Image.d.ts +4 -0
  268. package/dist/types/components/ImpactCard/ImpactCard.d.ts +8 -3
  269. package/dist/types/components/InformationCard/InformationCard.d.ts +5 -5
  270. package/dist/types/components/MediaCard/MediaCard.d.ts +7 -6
  271. package/dist/types/components/MediaCard/types/index.d.ts +2 -0
  272. package/dist/types/components/MediaCard/types/media-card-image.d.ts +4 -0
  273. package/dist/types/components/MediaCard/types/media-card-video.d.ts +4 -0
  274. package/dist/types/components/Modal/Modal.d.ts +2 -2
  275. package/dist/types/components/Poster/Poster.d.ts +2 -2
  276. package/dist/types/components/ProgressBar/constants/progress-bar-icon-map.d.ts +2 -2
  277. package/dist/types/components/RadioGroup/RadioGroup.d.ts +9 -1
  278. package/dist/types/components/SiteFooter/SiteFooter.d.ts +0 -4
  279. package/dist/types/components/SiteFooter/index.d.ts +0 -1
  280. package/dist/types/components/SiteHeaderV2/components/Panel/Panel.d.ts +1 -1
  281. package/dist/types/components/SiteHeaderV2/components/VerticalDivider/VerticalDivider.d.ts +1 -0
  282. package/dist/types/components/Surface/Surface.d.ts +3 -3
  283. package/dist/types/components/Switch/Switch.d.ts +1 -1
  284. package/dist/types/components/TextArea/TextArea.d.ts +8 -0
  285. package/dist/types/components/TextInput/TextInput.d.ts +4 -2
  286. package/dist/types/components/Theme/Theme.d.ts +21 -0
  287. package/dist/types/components/Theme/index.d.ts +1 -0
  288. package/dist/types/components/ThemeIcon/ThemeIcon.d.ts +18 -0
  289. package/dist/types/components/ThemeIcon/icon-names.d.ts +1 -0
  290. package/dist/types/components/ThemeIcon/index.d.ts +1 -0
  291. package/dist/types/components/TypographyCard/TypographyCard.d.ts +9 -4
  292. package/dist/types/components/VideoPlayer/VideoPlayer.d.ts +18 -0
  293. package/dist/types/components/VideoPlayer/index.d.ts +1 -0
  294. package/dist/types/components/index.d.ts +8 -6
  295. package/dist/types/helpers/get-theme-img.d.ts +6 -0
  296. package/dist/types/helpers/index.d.ts +1 -0
  297. package/dist/types/hooks/index.d.ts +2 -4
  298. package/dist/types/hooks/private/index.d.ts +5 -0
  299. package/dist/types/hooks/private/use-aria-describedby/index.d.ts +1 -0
  300. package/dist/types/hooks/private/use-interaction-mode/index.d.ts +1 -0
  301. package/dist/types/hooks/private/use-numeric-input/index.d.ts +1 -0
  302. package/dist/types/hooks/{use-numeric-input.d.ts → private/use-numeric-input/use-numeric-input.d.ts} +3 -3
  303. package/dist/types/hooks/private/use-pagination/index.d.ts +1 -0
  304. package/dist/types/hooks/private/use-theme-element/index.d.ts +1 -0
  305. package/dist/types/hooks/public/index.d.ts +1 -0
  306. package/dist/types/hooks/public/use-media-query/index.d.ts +1 -0
  307. package/dist/types/hooks/{use-media-query.d.ts → public/use-media-query/use-media-query.d.ts} +1 -1
  308. package/dist/types/index.d.ts +1 -0
  309. package/dist/types/private-components/CardFooter/CardFooter.d.ts +1 -1
  310. package/dist/types/private-components/CardFooter/index.d.ts +1 -1
  311. package/dist/types/private-components/CardHeading/CardHeading.d.ts +3 -3
  312. package/dist/types/private-components/index.d.ts +1 -2
  313. package/dist/types/styles.d.ts +7 -30
  314. package/dist/use-media-query/package.json +7 -0
  315. package/dist/use-media-query/use-media-query.cjs.js +10 -0
  316. package/dist/use-media-query/use-media-query.esm.js +2 -0
  317. package/package.json +48 -38
  318. package/dist/Base/Base.cjs.js +0 -11
  319. package/dist/Base/Base.esm.js +0 -3
  320. package/dist/Base/package.json +0 -7
  321. package/dist/Card/Card.cjs.js +0 -19
  322. package/dist/Card/Card.esm.js +0 -11
  323. package/dist/Card/package.json +0 -7
  324. package/dist/Clock/Clock.cjs.js +0 -48
  325. package/dist/Clock/Clock.esm.js +0 -39
  326. package/dist/Clock/package.json +0 -7
  327. package/dist/Curve/Curve.cjs.js +0 -13
  328. package/dist/Curve/Curve.esm.js +0 -5
  329. package/dist/Curve/package.json +0 -7
  330. package/dist/SiteHeader/SiteHeader.cjs.js +0 -25
  331. package/dist/SiteHeader/SiteHeader.esm.js +0 -16
  332. package/dist/SiteHeader/package.json +0 -7
  333. package/dist/_shared/cjs/Avatar-f1b1c129.js +0 -66
  334. package/dist/_shared/cjs/Base-f5a86eed.js +0 -22
  335. package/dist/_shared/cjs/BtIconArrowRight.esm-50d96943.js +0 -54
  336. package/dist/_shared/cjs/BtIconArrowRightFill.esm-435cf4bd.js +0 -26
  337. package/dist/_shared/cjs/BtIconChevronDown2Px.esm-39030ee0.js +0 -26
  338. package/dist/_shared/cjs/BtIconChevronLeftMid.esm-0aaa6770.js +0 -28
  339. package/dist/_shared/cjs/BtIconChevronRight2Px.esm-dbf8cbee.js +0 -44
  340. package/dist/_shared/cjs/BtIconCrossAlt2Px.esm-1452b14b.js +0 -26
  341. package/dist/_shared/cjs/BtIconTick.esm-844eac6c.js +0 -80
  342. package/dist/_shared/cjs/BtIconTickAlt2Px.esm-57c89acc.js +0 -26
  343. package/dist/_shared/cjs/Card-78a70e63.js +0 -126
  344. package/dist/_shared/cjs/Checkbox-0253327b.js +0 -62
  345. package/dist/_shared/cjs/Combination-9974f2e2.js +0 -1330
  346. package/dist/_shared/cjs/Curve-b5117889.js +0 -33
  347. package/dist/_shared/cjs/Grid-da776e77.js +0 -45
  348. package/dist/_shared/cjs/Icon-b46897a3.js +0 -54
  349. package/dist/_shared/cjs/Image-e873b8fc.js +0 -46
  350. package/dist/_shared/cjs/SiteHeader.rehydrator-9d8f3dad.js +0 -669
  351. package/dist/_shared/cjs/extends-8c5e4b48.js +0 -18
  352. package/dist/_shared/esm/Base-f200653c.js +0 -15
  353. package/dist/_shared/esm/BtIconAlert.esm-a4608d47.js +0 -28
  354. package/dist/_shared/esm/BtIconArrowRight.esm-9b181878.js +0 -46
  355. package/dist/_shared/esm/BtIconArrowRightFill.esm-99019d1a.js +0 -20
  356. package/dist/_shared/esm/BtIconChevronDown2Px.esm-217276c2.js +0 -20
  357. package/dist/_shared/esm/BtIconChevronLeftMid.esm-1ed8330b.js +0 -22
  358. package/dist/_shared/esm/BtIconChevronRight2Px.esm-75e92636.js +0 -37
  359. package/dist/_shared/esm/BtIconCrossAlt2Px.esm-7165ab1a.js +0 -20
  360. package/dist/_shared/esm/BtIconTick.esm-e265098f.js +0 -72
  361. package/dist/_shared/esm/BtIconTickAlt2Px.esm-0bc2ded0.js +0 -20
  362. package/dist/_shared/esm/Card-a4b78406.js +0 -120
  363. package/dist/_shared/esm/Combination-e9f7e64e.js +0 -1301
  364. package/dist/_shared/esm/Curve-e05b3c3f.js +0 -27
  365. package/dist/_shared/esm/SiteHeader.rehydrator-2ec02ee7.js +0 -662
  366. package/dist/_shared/esm/extends-8cc61aad.js +0 -16
  367. package/dist/types/components/Base/Base.d.ts +0 -16
  368. package/dist/types/components/Base/index.d.ts +0 -1
  369. package/dist/types/components/Card/Card.d.ts +0 -132
  370. package/dist/types/components/Card/index.d.ts +0 -1
  371. package/dist/types/components/Clock/Clock.d.ts +0 -17
  372. package/dist/types/components/Clock/Clock.rehydrator.d.ts +0 -2
  373. package/dist/types/components/Clock/index.d.ts +0 -2
  374. package/dist/types/components/Curve/Curve.d.ts +0 -34
  375. package/dist/types/components/Curve/index.d.ts +0 -1
  376. package/dist/types/components/SiteFooter/SiteFooter.rehydrator.d.ts +0 -2
  377. package/dist/types/components/SiteHeader/SiteHeader.d.ts +0 -79
  378. package/dist/types/components/SiteHeader/SiteHeader.rehydrator.d.ts +0 -8
  379. package/dist/types/components/SiteHeader/components/BackButton/BackButton.d.ts +0 -5
  380. package/dist/types/components/SiteHeader/components/BackButton/index.d.ts +0 -1
  381. package/dist/types/components/SiteHeader/components/Column/Column.d.ts +0 -8
  382. package/dist/types/components/SiteHeader/components/Column/index.d.ts +0 -1
  383. package/dist/types/components/SiteHeader/components/Item/Item.d.ts +0 -20
  384. package/dist/types/components/SiteHeader/components/Item/index.d.ts +0 -1
  385. package/dist/types/components/SiteHeader/components/ItemGroup/ItemGroup.d.ts +0 -26
  386. package/dist/types/components/SiteHeader/components/ItemGroup/ItemGroup.rehydrator.d.ts +0 -2
  387. package/dist/types/components/SiteHeader/components/ItemGroup/index.d.ts +0 -2
  388. package/dist/types/components/SiteHeader/components/MenuButton/MenuButton.d.ts +0 -6
  389. package/dist/types/components/SiteHeader/components/MenuButton/index.d.ts +0 -1
  390. package/dist/types/components/SiteHeader/components/NavItem/NavItem.d.ts +0 -42
  391. package/dist/types/components/SiteHeader/components/NavItem/NavItem.rehydrator.d.ts +0 -2
  392. package/dist/types/components/SiteHeader/components/NavItem/NavItemWithSubNav.d.ts +0 -47
  393. package/dist/types/components/SiteHeader/components/NavItem/NavItemWithSubNav.rehydrator.d.ts +0 -2
  394. package/dist/types/components/SiteHeader/components/NavItem/index.d.ts +0 -4
  395. package/dist/types/components/SiteHeader/components/NodeItem/NodeItem.d.ts +0 -8
  396. package/dist/types/components/SiteHeader/components/Panel/Panel.d.ts +0 -22
  397. package/dist/types/components/SiteHeader/components/Panel/index.d.ts +0 -1
  398. package/dist/types/components/SiteHeader/components/SubNavItem/SubNavItem.d.ts +0 -47
  399. package/dist/types/components/SiteHeader/components/SubNavItem/SubNavItem.rehydrator.d.ts +0 -2
  400. package/dist/types/components/SiteHeader/components/SubNavItem/index.d.ts +0 -2
  401. package/dist/types/components/SiteHeader/index.d.ts +0 -2
  402. package/dist/types/private-components/CardLabel/CardLabel.d.ts +0 -10
  403. package/dist/types/private-components/CardLabel/index.d.ts +0 -1
  404. /package/dist/_shared/cjs/{BtIconChevronRightMid.esm-d01ebbd4.js → BtIconChevronRightMid.esm-3e8d18a9.js} +0 -0
  405. /package/dist/_shared/esm/{BtIconChevronRightMid.esm-32268f1a.js → BtIconChevronRightMid.esm-4764708f.js} +0 -0
  406. /package/dist/types/hooks/{use-aria-describedby.d.ts → private/use-aria-describedby/use-aria-describedby.d.ts} +0 -0
  407. /package/dist/types/hooks/{use-interaction-mode.d.ts → private/use-interaction-mode/use-interaction-mode.d.ts} +0 -0
  408. /package/dist/types/hooks/{use-pagination.d.ts → private/use-pagination/use-pagination.d.ts} +0 -0
@@ -1,8 +1,537 @@
1
- import { _ as _extends } from './extends-8cc61aad.js';
1
+ import { b as $6ed0406888f73fc4$export$c7b2cbe3552a0d05, e as $8927f6f2acc4f386$export$250ffa63cdc0d034, _ as _extends, d as $e42e1063c40fb3ef$export$b9ecd428b558ff10, f as $b1b2314f5f9a1d84$export$25bec8c6f54ee79a, g as $8927f6f2acc4f386$export$6d1a0317bde7de7f, $ as $c512c27ab02ef895$export$50c7b4e9d9f19c1, h as $9f79659886946c16$export$e5c5a5f917a5871c } from './index-cace3545.js';
2
2
  import * as React from 'react';
3
- import { useLayoutEffect, useEffect, useState, createElement, forwardRef, useRef } from 'react';
4
- import * as $7SXl2$reactdom from 'react-dom';
5
- import { h as $9f79659886946c16$export$e5c5a5f917a5871c, $ as $c512c27ab02ef895$export$50c7b4e9d9f19c1, b as $6ed0406888f73fc4$export$c7b2cbe3552a0d05, e as $8927f6f2acc4f386$export$250ffa63cdc0d034, f as $b1b2314f5f9a1d84$export$25bec8c6f54ee79a } from './index-7b531fa7.js';
3
+ import { forwardRef, useContext, useState, useEffect, createElement, useRef, createContext, useCallback, useLayoutEffect } from 'react';
4
+ import { $ as $addc16e1bbe58fd0$export$3a72a57244d6e765 } from './index-6028d797.js';
5
+ import * as ReactDOM from 'react-dom';
6
+ import ReactDOM__default from 'react-dom';
7
+ import { $ as $db6c3485150b8e66$export$1ab7ae714698c4b8 } from './index-4e58de24.js';
8
+ import { _ as __rest, a as __assign, b as __spreadArray } from './index-288c66b5.js';
9
+ import { c as createSidecarMedium, a as useMergeRefs, f as fullWidthClassName, z as zeroRightClassName, s as styleSingleton, R as RemoveScrollBar, e as exportSidecar } from './component-d0a555cf.js';
10
+
11
+ const $5cb92bef7577960e$var$CONTEXT_UPDATE = 'dismissableLayer.update';
12
+ const $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';
13
+ const $5cb92bef7577960e$var$FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';
14
+ let $5cb92bef7577960e$var$originalBodyPointerEvents;
15
+ const $5cb92bef7577960e$var$DismissableLayerContext = /*#__PURE__*/ createContext({
16
+ layers: new Set(),
17
+ layersWithOutsidePointerEventsDisabled: new Set(),
18
+ branches: new Set()
19
+ });
20
+ const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
21
+ var _node$ownerDocument;
22
+ const { disableOutsidePointerEvents: disableOutsidePointerEvents = false , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , onDismiss: onDismiss , ...layerProps } = props;
23
+ const context = useContext($5cb92bef7577960e$var$DismissableLayerContext);
24
+ const [node1, setNode] = useState(null);
25
+ 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;
26
+ const [, force] = useState({});
27
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setNode(node)
28
+ );
29
+ const layers = Array.from(context.layers);
30
+ const [highestLayerWithOutsidePointerEventsDisabled] = [
31
+ ...context.layersWithOutsidePointerEventsDisabled
32
+ ].slice(-1); // prettier-ignore
33
+ const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled); // prettier-ignore
34
+ const index = node1 ? layers.indexOf(node1) : -1;
35
+ const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
36
+ const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
37
+ const pointerDownOutside = $5cb92bef7577960e$var$usePointerDownOutside((event)=>{
38
+ const target = event.target;
39
+ const isPointerDownOnBranch = [
40
+ ...context.branches
41
+ ].some((branch)=>branch.contains(target)
42
+ );
43
+ if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
44
+ onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event);
45
+ onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
46
+ if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
47
+ }, ownerDocument);
48
+ const focusOutside = $5cb92bef7577960e$var$useFocusOutside((event)=>{
49
+ const target = event.target;
50
+ const isFocusInBranch = [
51
+ ...context.branches
52
+ ].some((branch)=>branch.contains(target)
53
+ );
54
+ if (isFocusInBranch) return;
55
+ onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event);
56
+ onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
57
+ if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
58
+ }, ownerDocument);
59
+ $addc16e1bbe58fd0$export$3a72a57244d6e765((event)=>{
60
+ const isHighestLayer = index === context.layers.size - 1;
61
+ if (!isHighestLayer) return;
62
+ onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event);
63
+ if (!event.defaultPrevented && onDismiss) {
64
+ event.preventDefault();
65
+ onDismiss();
66
+ }
67
+ }, ownerDocument);
68
+ useEffect(()=>{
69
+ if (!node1) return;
70
+ if (disableOutsidePointerEvents) {
71
+ if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
72
+ $5cb92bef7577960e$var$originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
73
+ ownerDocument.body.style.pointerEvents = 'none';
74
+ }
75
+ context.layersWithOutsidePointerEventsDisabled.add(node1);
76
+ }
77
+ context.layers.add(node1);
78
+ $5cb92bef7577960e$var$dispatchUpdate();
79
+ return ()=>{
80
+ if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) ownerDocument.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents;
81
+ };
82
+ }, [
83
+ node1,
84
+ ownerDocument,
85
+ disableOutsidePointerEvents,
86
+ context
87
+ ]);
88
+ /**
89
+ * We purposefully prevent combining this effect with the `disableOutsidePointerEvents` effect
90
+ * because a change to `disableOutsidePointerEvents` would remove this layer from the stack
91
+ * and add it to the end again so the layering order wouldn't be _creation order_.
92
+ * We only want them to be removed from context stacks when unmounted.
93
+ */ useEffect(()=>{
94
+ return ()=>{
95
+ if (!node1) return;
96
+ context.layers.delete(node1);
97
+ context.layersWithOutsidePointerEventsDisabled.delete(node1);
98
+ $5cb92bef7577960e$var$dispatchUpdate();
99
+ };
100
+ }, [
101
+ node1,
102
+ context
103
+ ]);
104
+ useEffect(()=>{
105
+ const handleUpdate = ()=>force({})
106
+ ;
107
+ document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
108
+ return ()=>document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate)
109
+ ;
110
+ }, []);
111
+ return /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, layerProps, {
112
+ ref: composedRefs,
113
+ style: {
114
+ pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? 'auto' : 'none' : undefined,
115
+ ...props.style
116
+ },
117
+ onFocusCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusCapture, focusOutside.onFocusCapture),
118
+ onBlurCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlurCapture, focusOutside.onBlurCapture),
119
+ onPointerDownCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
120
+ }));
121
+ });
122
+ /* -----------------------------------------------------------------------------------------------*/ /**
123
+ * Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup`
124
+ * to mimic layer dismissing behaviour present in OS.
125
+ * Returns props to pass to the node we want to check for outside events.
126
+ */ function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
127
+ const handlePointerDownOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPointerDownOutside);
128
+ const isPointerInsideReactTreeRef = useRef(false);
129
+ const handleClickRef = useRef(()=>{});
130
+ useEffect(()=>{
131
+ const handlePointerDown = (event)=>{
132
+ if (event.target && !isPointerInsideReactTreeRef.current) {
133
+ const eventDetail = {
134
+ originalEvent: event
135
+ };
136
+ function handleAndDispatchPointerDownOutsideEvent() {
137
+ $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {
138
+ discrete: true
139
+ });
140
+ }
141
+ /**
142
+ * On touch devices, we need to wait for a click event because browsers implement
143
+ * a ~350ms delay between the time the user stops touching the display and when the
144
+ * browser executres events. We need to ensure we don't reactivate pointer-events within
145
+ * this timeframe otherwise the browser may execute events that should have been prevented.
146
+ *
147
+ * Additionally, this also lets us deal automatically with cancellations when a click event
148
+ * isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc.
149
+ *
150
+ * This is why we also continuously remove the previous listener, because we cannot be
151
+ * certain that it was raised, and therefore cleaned-up.
152
+ */ if (event.pointerType === 'touch') {
153
+ ownerDocument.removeEventListener('click', handleClickRef.current);
154
+ handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;
155
+ ownerDocument.addEventListener('click', handleClickRef.current, {
156
+ once: true
157
+ });
158
+ } else handleAndDispatchPointerDownOutsideEvent();
159
+ } else // We need to remove the event listener in case the outside click has been canceled.
160
+ // See: https://github.com/radix-ui/primitives/issues/2171
161
+ ownerDocument.removeEventListener('click', handleClickRef.current);
162
+ isPointerInsideReactTreeRef.current = false;
163
+ };
164
+ /**
165
+ * if this hook executes in a component that mounts via a `pointerdown` event, the event
166
+ * would bubble up to the document and trigger a `pointerDownOutside` event. We avoid
167
+ * this by delaying the event listener registration on the document.
168
+ * This is not React specific, but rather how the DOM works, ie:
169
+ * ```
170
+ * button.addEventListener('pointerdown', () => {
171
+ * console.log('I will log');
172
+ * document.addEventListener('pointerdown', () => {
173
+ * console.log('I will also log');
174
+ * })
175
+ * });
176
+ */ const timerId = window.setTimeout(()=>{
177
+ ownerDocument.addEventListener('pointerdown', handlePointerDown);
178
+ }, 0);
179
+ return ()=>{
180
+ window.clearTimeout(timerId);
181
+ ownerDocument.removeEventListener('pointerdown', handlePointerDown);
182
+ ownerDocument.removeEventListener('click', handleClickRef.current);
183
+ };
184
+ }, [
185
+ ownerDocument,
186
+ handlePointerDownOutside
187
+ ]);
188
+ return {
189
+ // ensures we check React component tree (not just DOM tree)
190
+ onPointerDownCapture: ()=>isPointerInsideReactTreeRef.current = true
191
+ };
192
+ }
193
+ /**
194
+ * Listens for when focus happens outside a react subtree.
195
+ * Returns props to pass to the root (node) of the subtree we want to check.
196
+ */ function $5cb92bef7577960e$var$useFocusOutside(onFocusOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
197
+ const handleFocusOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onFocusOutside);
198
+ const isFocusInsideReactTreeRef = useRef(false);
199
+ useEffect(()=>{
200
+ const handleFocus = (event)=>{
201
+ if (event.target && !isFocusInsideReactTreeRef.current) {
202
+ const eventDetail = {
203
+ originalEvent: event
204
+ };
205
+ $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
206
+ discrete: false
207
+ });
208
+ }
209
+ };
210
+ ownerDocument.addEventListener('focusin', handleFocus);
211
+ return ()=>ownerDocument.removeEventListener('focusin', handleFocus)
212
+ ;
213
+ }, [
214
+ ownerDocument,
215
+ handleFocusOutside
216
+ ]);
217
+ return {
218
+ onFocusCapture: ()=>isFocusInsideReactTreeRef.current = true
219
+ ,
220
+ onBlurCapture: ()=>isFocusInsideReactTreeRef.current = false
221
+ };
222
+ }
223
+ function $5cb92bef7577960e$var$dispatchUpdate() {
224
+ const event = new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE);
225
+ document.dispatchEvent(event);
226
+ }
227
+ function $5cb92bef7577960e$var$handleAndDispatchCustomEvent(name, handler, detail, { discrete: discrete }) {
228
+ const target = detail.originalEvent.target;
229
+ const event = new CustomEvent(name, {
230
+ bubbles: false,
231
+ cancelable: true,
232
+ detail: detail
233
+ });
234
+ if (handler) target.addEventListener(name, handler, {
235
+ once: true
236
+ });
237
+ if (discrete) $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event);
238
+ else target.dispatchEvent(event);
239
+ }
240
+
241
+ /** Number of components which have requested interest to have focus guards */ let $3db38b7d1fb3fe6a$var$count = 0;
242
+ /**
243
+ * Injects a pair of focus guards at the edges of the whole DOM tree
244
+ * to ensure `focusin` & `focusout` events can be caught consistently.
245
+ */ function $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c() {
246
+ useEffect(()=>{
247
+ var _edgeGuards$, _edgeGuards$2;
248
+ const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]');
249
+ document.body.insertAdjacentElement('afterbegin', (_edgeGuards$ = edgeGuards[0]) !== null && _edgeGuards$ !== void 0 ? _edgeGuards$ : $3db38b7d1fb3fe6a$var$createFocusGuard());
250
+ document.body.insertAdjacentElement('beforeend', (_edgeGuards$2 = edgeGuards[1]) !== null && _edgeGuards$2 !== void 0 ? _edgeGuards$2 : $3db38b7d1fb3fe6a$var$createFocusGuard());
251
+ $3db38b7d1fb3fe6a$var$count++;
252
+ return ()=>{
253
+ if ($3db38b7d1fb3fe6a$var$count === 1) document.querySelectorAll('[data-radix-focus-guard]').forEach((node)=>node.remove()
254
+ );
255
+ $3db38b7d1fb3fe6a$var$count--;
256
+ };
257
+ }, []);
258
+ }
259
+ function $3db38b7d1fb3fe6a$var$createFocusGuard() {
260
+ const element = document.createElement('span');
261
+ element.setAttribute('data-radix-focus-guard', '');
262
+ element.tabIndex = 0;
263
+ element.style.cssText = 'outline: none; opacity: 0; position: fixed; pointer-events: none';
264
+ return element;
265
+ }
266
+
267
+ const $d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT = 'focusScope.autoFocusOnMount';
268
+ const $d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT = 'focusScope.autoFocusOnUnmount';
269
+ const $d3863c46a17e8a28$var$EVENT_OPTIONS = {
270
+ bubbles: false,
271
+ cancelable: true
272
+ };
273
+ const $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
274
+ const { loop: loop = false , trapped: trapped = false , onMountAutoFocus: onMountAutoFocusProp , onUnmountAutoFocus: onUnmountAutoFocusProp , ...scopeProps } = props;
275
+ const [container1, setContainer] = useState(null);
276
+ const onMountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onMountAutoFocusProp);
277
+ const onUnmountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onUnmountAutoFocusProp);
278
+ const lastFocusedElementRef = useRef(null);
279
+ const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setContainer(node)
280
+ );
281
+ const focusScope = useRef({
282
+ paused: false,
283
+ pause () {
284
+ this.paused = true;
285
+ },
286
+ resume () {
287
+ this.paused = false;
288
+ }
289
+ }).current; // Takes care of trapping focus if focus is moved outside programmatically for example
290
+ useEffect(()=>{
291
+ if (trapped) {
292
+ function handleFocusIn(event) {
293
+ if (focusScope.paused || !container1) return;
294
+ const target = event.target;
295
+ if (container1.contains(target)) lastFocusedElementRef.current = target;
296
+ else $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, {
297
+ select: true
298
+ });
299
+ }
300
+ function handleFocusOut(event) {
301
+ if (focusScope.paused || !container1) return;
302
+ const relatedTarget = event.relatedTarget; // A `focusout` event with a `null` `relatedTarget` will happen in at least two cases:
303
+ //
304
+ // 1. When the user switches app/tabs/windows/the browser itself loses focus.
305
+ // 2. In Google Chrome, when the focused element is removed from the DOM.
306
+ //
307
+ // We let the browser do its thing here because:
308
+ //
309
+ // 1. The browser already keeps a memory of what's focused for when the page gets refocused.
310
+ // 2. In Google Chrome, if we try to focus the deleted focused element (as per below), it
311
+ // throws the CPU to 100%, so we avoid doing anything for this reason here too.
312
+ if (relatedTarget === null) return; // If the focus has moved to an actual legitimate element (`relatedTarget !== null`)
313
+ // that is outside the container, we move focus to the last valid focused element inside.
314
+ if (!container1.contains(relatedTarget)) $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, {
315
+ select: true
316
+ });
317
+ } // When the focused element gets removed from the DOM, browsers move focus
318
+ // back to the document.body. In this case, we move focus to the container
319
+ // to keep focus trapped correctly.
320
+ function handleMutations(mutations) {
321
+ const focusedElement = document.activeElement;
322
+ if (focusedElement !== document.body) return;
323
+ for (const mutation of mutations)if (mutation.removedNodes.length > 0) $d3863c46a17e8a28$var$focus(container1);
324
+ }
325
+ document.addEventListener('focusin', handleFocusIn);
326
+ document.addEventListener('focusout', handleFocusOut);
327
+ const mutationObserver = new MutationObserver(handleMutations);
328
+ if (container1) mutationObserver.observe(container1, {
329
+ childList: true,
330
+ subtree: true
331
+ });
332
+ return ()=>{
333
+ document.removeEventListener('focusin', handleFocusIn);
334
+ document.removeEventListener('focusout', handleFocusOut);
335
+ mutationObserver.disconnect();
336
+ };
337
+ }
338
+ }, [
339
+ trapped,
340
+ container1,
341
+ focusScope.paused
342
+ ]);
343
+ useEffect(()=>{
344
+ if (container1) {
345
+ $d3863c46a17e8a28$var$focusScopesStack.add(focusScope);
346
+ const previouslyFocusedElement = document.activeElement;
347
+ const hasFocusedCandidate = container1.contains(previouslyFocusedElement);
348
+ if (!hasFocusedCandidate) {
349
+ const mountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);
350
+ container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
351
+ container1.dispatchEvent(mountEvent);
352
+ if (!mountEvent.defaultPrevented) {
353
+ $d3863c46a17e8a28$var$focusFirst($d3863c46a17e8a28$var$removeLinks($d3863c46a17e8a28$var$getTabbableCandidates(container1)), {
354
+ select: true
355
+ });
356
+ if (document.activeElement === previouslyFocusedElement) $d3863c46a17e8a28$var$focus(container1);
357
+ }
358
+ }
359
+ return ()=>{
360
+ container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus); // We hit a react bug (fixed in v17) with focusing in unmount.
361
+ // We need to delay the focus a little to get around it for now.
362
+ // See: https://github.com/facebook/react/issues/17894
363
+ setTimeout(()=>{
364
+ const unmountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);
365
+ container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
366
+ container1.dispatchEvent(unmountEvent);
367
+ if (!unmountEvent.defaultPrevented) $d3863c46a17e8a28$var$focus(previouslyFocusedElement !== null && previouslyFocusedElement !== void 0 ? previouslyFocusedElement : document.body, {
368
+ select: true
369
+ });
370
+ // we need to remove the listener after we `dispatchEvent`
371
+ container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
372
+ $d3863c46a17e8a28$var$focusScopesStack.remove(focusScope);
373
+ }, 0);
374
+ };
375
+ }
376
+ }, [
377
+ container1,
378
+ onMountAutoFocus,
379
+ onUnmountAutoFocus,
380
+ focusScope
381
+ ]); // Takes care of looping focus (when tabbing whilst at the edges)
382
+ const handleKeyDown = useCallback((event)=>{
383
+ if (!loop && !trapped) return;
384
+ if (focusScope.paused) return;
385
+ const isTabKey = event.key === 'Tab' && !event.altKey && !event.ctrlKey && !event.metaKey;
386
+ const focusedElement = document.activeElement;
387
+ if (isTabKey && focusedElement) {
388
+ const container = event.currentTarget;
389
+ const [first, last] = $d3863c46a17e8a28$var$getTabbableEdges(container);
390
+ const hasTabbableElementsInside = first && last; // we can only wrap focus if we have tabbable edges
391
+ if (!hasTabbableElementsInside) {
392
+ if (focusedElement === container) event.preventDefault();
393
+ } else {
394
+ if (!event.shiftKey && focusedElement === last) {
395
+ event.preventDefault();
396
+ if (loop) $d3863c46a17e8a28$var$focus(first, {
397
+ select: true
398
+ });
399
+ } else if (event.shiftKey && focusedElement === first) {
400
+ event.preventDefault();
401
+ if (loop) $d3863c46a17e8a28$var$focus(last, {
402
+ select: true
403
+ });
404
+ }
405
+ }
406
+ }
407
+ }, [
408
+ loop,
409
+ trapped,
410
+ focusScope.paused
411
+ ]);
412
+ return /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
413
+ tabIndex: -1
414
+ }, scopeProps, {
415
+ ref: composedRefs,
416
+ onKeyDown: handleKeyDown
417
+ }));
418
+ });
419
+ /* -------------------------------------------------------------------------------------------------
420
+ * Utils
421
+ * -----------------------------------------------------------------------------------------------*/ /**
422
+ * Attempts focusing the first element in a list of candidates.
423
+ * Stops when focus has actually moved.
424
+ */ function $d3863c46a17e8a28$var$focusFirst(candidates, { select: select = false } = {}) {
425
+ const previouslyFocusedElement = document.activeElement;
426
+ for (const candidate of candidates){
427
+ $d3863c46a17e8a28$var$focus(candidate, {
428
+ select: select
429
+ });
430
+ if (document.activeElement !== previouslyFocusedElement) return;
431
+ }
432
+ }
433
+ /**
434
+ * Returns the first and last tabbable elements inside a container.
435
+ */ function $d3863c46a17e8a28$var$getTabbableEdges(container) {
436
+ const candidates = $d3863c46a17e8a28$var$getTabbableCandidates(container);
437
+ const first = $d3863c46a17e8a28$var$findVisible(candidates, container);
438
+ const last = $d3863c46a17e8a28$var$findVisible(candidates.reverse(), container);
439
+ return [
440
+ first,
441
+ last
442
+ ];
443
+ }
444
+ /**
445
+ * Returns a list of potential tabbable candidates.
446
+ *
447
+ * NOTE: This is only a close approximation. For example it doesn't take into account cases like when
448
+ * elements are not visible. This cannot be worked out easily by just reading a property, but rather
449
+ * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.
450
+ *
451
+ * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker
452
+ * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1
453
+ */ function $d3863c46a17e8a28$var$getTabbableCandidates(container) {
454
+ const nodes = [];
455
+ const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
456
+ acceptNode: (node)=>{
457
+ const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden';
458
+ if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP; // `.tabIndex` is not the same as the `tabindex` attribute. It works on the
459
+ // runtime's understanding of tabbability, so this automatically accounts
460
+ // for any kind of element that could be tabbed to.
461
+ return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
462
+ }
463
+ });
464
+ while(walker.nextNode())nodes.push(walker.currentNode); // we do not take into account the order of nodes with positive `tabIndex` as it
465
+ // hinders accessibility to have tab order different from visual order.
466
+ return nodes;
467
+ }
468
+ /**
469
+ * Returns the first visible element in a list.
470
+ * NOTE: Only checks visibility up to the `container`.
471
+ */ function $d3863c46a17e8a28$var$findVisible(elements, container) {
472
+ for (const element of elements){
473
+ // we stop checking if it's hidden at the `container` level (excluding)
474
+ if (!$d3863c46a17e8a28$var$isHidden(element, {
475
+ upTo: container
476
+ })) return element;
477
+ }
478
+ }
479
+ function $d3863c46a17e8a28$var$isHidden(node, { upTo: upTo }) {
480
+ if (getComputedStyle(node).visibility === 'hidden') return true;
481
+ while(node){
482
+ // we stop at `upTo` (excluding it)
483
+ if (upTo !== undefined && node === upTo) return false;
484
+ if (getComputedStyle(node).display === 'none') return true;
485
+ node = node.parentElement;
486
+ }
487
+ return false;
488
+ }
489
+ function $d3863c46a17e8a28$var$isSelectableInput(element) {
490
+ return element instanceof HTMLInputElement && 'select' in element;
491
+ }
492
+ function $d3863c46a17e8a28$var$focus(element, { select: select = false } = {}) {
493
+ // only focus if that element is focusable
494
+ if (element && element.focus) {
495
+ const previouslyFocusedElement = document.activeElement; // NOTE: we prevent scrolling on focus, to minimize jarring transitions for users
496
+ element.focus({
497
+ preventScroll: true
498
+ }); // only select if its not the same element, it supports selection and we need to select
499
+ if (element !== previouslyFocusedElement && $d3863c46a17e8a28$var$isSelectableInput(element) && select) element.select();
500
+ }
501
+ }
502
+ /* -------------------------------------------------------------------------------------------------
503
+ * FocusScope stack
504
+ * -----------------------------------------------------------------------------------------------*/ const $d3863c46a17e8a28$var$focusScopesStack = $d3863c46a17e8a28$var$createFocusScopesStack();
505
+ function $d3863c46a17e8a28$var$createFocusScopesStack() {
506
+ /** A stack of focus scopes, with the active one at the top */ let stack = [];
507
+ return {
508
+ add (focusScope) {
509
+ // pause the currently active focus scope (at the top of the stack)
510
+ const activeFocusScope = stack[0];
511
+ if (focusScope !== activeFocusScope) activeFocusScope === null || activeFocusScope === void 0 || activeFocusScope.pause();
512
+ // remove in case it already exists (because we'll re-add it at the top of the stack)
513
+ stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope);
514
+ stack.unshift(focusScope);
515
+ },
516
+ remove (focusScope) {
517
+ var _stack$;
518
+ stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope);
519
+ (_stack$ = stack[0]) === null || _stack$ === void 0 || _stack$.resume();
520
+ }
521
+ };
522
+ }
523
+ function $d3863c46a17e8a28$var$arrayRemove(array, item) {
524
+ const updatedArray = [
525
+ ...array
526
+ ];
527
+ const index = updatedArray.indexOf(item);
528
+ if (index !== -1) updatedArray.splice(index, 1);
529
+ return updatedArray;
530
+ }
531
+ function $d3863c46a17e8a28$var$removeLinks(items) {
532
+ return items.filter((item)=>item.tagName !== 'A'
533
+ );
534
+ }
6
535
 
7
536
  const sides = ['top', 'right', 'bottom', 'left'];
8
537
  const min = Math.min;
@@ -937,7 +1466,7 @@ function isOverflowElement(element) {
937
1466
  overflowX,
938
1467
  overflowY,
939
1468
  display
940
- } = getComputedStyle(element);
1469
+ } = getComputedStyle$1(element);
941
1470
  return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
942
1471
  }
943
1472
  function isTableElement(element) {
@@ -945,7 +1474,7 @@ function isTableElement(element) {
945
1474
  }
946
1475
  function isContainingBlock(element) {
947
1476
  const webkit = isWebKit();
948
- const css = getComputedStyle(element);
1477
+ const css = getComputedStyle$1(element);
949
1478
 
950
1479
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
951
1480
  return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
@@ -968,7 +1497,7 @@ function isWebKit() {
968
1497
  function isLastTraversableNode(node) {
969
1498
  return ['html', 'body', '#document'].includes(getNodeName(node));
970
1499
  }
971
- function getComputedStyle(element) {
1500
+ function getComputedStyle$1(element) {
972
1501
  return getWindow(element).getComputedStyle(element);
973
1502
  }
974
1503
  function getNodeScroll(element) {
@@ -1026,7 +1555,7 @@ function getOverflowAncestors(node, list, traverseIframes) {
1026
1555
  }
1027
1556
 
1028
1557
  function getCssDimensions(element) {
1029
- const css = getComputedStyle(element);
1558
+ const css = getComputedStyle$1(element);
1030
1559
  // In testing environments, the `width` and `height` properties are empty
1031
1560
  // strings for SVG elements, returning NaN. Fallback to `0` in this case.
1032
1561
  let width = parseFloat(css.width) || 0;
@@ -1130,7 +1659,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
1130
1659
  while (currentIFrame && offsetParent && offsetWin !== win) {
1131
1660
  const iframeScale = getScale(currentIFrame);
1132
1661
  const iframeRect = currentIFrame.getBoundingClientRect();
1133
- const css = getComputedStyle(currentIFrame);
1662
+ const css = getComputedStyle$1(currentIFrame);
1134
1663
  const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
1135
1664
  const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
1136
1665
  x *= iframeScale.x;
@@ -1206,7 +1735,7 @@ function getDocumentRect(element) {
1206
1735
  const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
1207
1736
  let x = -scroll.scrollLeft + getWindowScrollBarX(element);
1208
1737
  const y = -scroll.scrollTop;
1209
- if (getComputedStyle(body).direction === 'rtl') {
1738
+ if (getComputedStyle$1(body).direction === 'rtl') {
1210
1739
  x += max(html.clientWidth, body.clientWidth) - width;
1211
1740
  }
1212
1741
  return {
@@ -1282,7 +1811,7 @@ function hasFixedPositionAncestor(element, stopNode) {
1282
1811
  if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
1283
1812
  return false;
1284
1813
  }
1285
- return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
1814
+ return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
1286
1815
  }
1287
1816
 
1288
1817
  // A "clipping ancestor" is an `overflow` element with the characteristic of
@@ -1295,12 +1824,12 @@ function getClippingElementAncestors(element, cache) {
1295
1824
  }
1296
1825
  let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
1297
1826
  let currentContainingBlockComputedStyle = null;
1298
- const elementIsFixed = getComputedStyle(element).position === 'fixed';
1827
+ const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
1299
1828
  let currentNode = elementIsFixed ? getParentNode(element) : element;
1300
1829
 
1301
1830
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1302
1831
  while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
1303
- const computedStyle = getComputedStyle(currentNode);
1832
+ const computedStyle = getComputedStyle$1(currentNode);
1304
1833
  const currentNodeIsContaining = isContainingBlock(currentNode);
1305
1834
  if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
1306
1835
  currentContainingBlockComputedStyle = null;
@@ -1382,7 +1911,7 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1382
1911
  }
1383
1912
 
1384
1913
  function getTrueOffsetParent(element, polyfill) {
1385
- if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {
1914
+ if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
1386
1915
  return null;
1387
1916
  }
1388
1917
  if (polyfill) {
@@ -1399,10 +1928,10 @@ function getOffsetParent(element, polyfill) {
1399
1928
  return window;
1400
1929
  }
1401
1930
  let offsetParent = getTrueOffsetParent(element, polyfill);
1402
- while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {
1931
+ while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {
1403
1932
  offsetParent = getTrueOffsetParent(offsetParent, polyfill);
1404
1933
  }
1405
- if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
1934
+ if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
1406
1935
  return window;
1407
1936
  }
1408
1937
  return offsetParent || getContainingBlock(element) || window;
@@ -1427,7 +1956,7 @@ const getElementRects = async function (_ref) {
1427
1956
  };
1428
1957
 
1429
1958
  function isRTL(element) {
1430
- return getComputedStyle(element).direction === 'rtl';
1959
+ return getComputedStyle$1(element).direction === 'rtl';
1431
1960
  }
1432
1961
 
1433
1962
  const platform = {
@@ -1799,7 +2328,7 @@ function useFloating(options) {
1799
2328
  };
1800
2329
  if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
1801
2330
  dataRef.current = fullData;
1802
- $7SXl2$reactdom.flushSync(() => {
2331
+ ReactDOM.flushSync(() => {
1803
2332
  setData(fullData);
1804
2333
  });
1805
2334
  }
@@ -1877,53 +2406,6 @@ function useFloating(options) {
1877
2406
  }), [data, update, refs, elements, floatingStyles]);
1878
2407
  }
1879
2408
 
1880
- function $db6c3485150b8e66$export$1ab7ae714698c4b8(element) {
1881
- const [size, setSize] = useState(undefined);
1882
- $9f79659886946c16$export$e5c5a5f917a5871c(()=>{
1883
- if (element) {
1884
- // provide size as early as possible
1885
- setSize({
1886
- width: element.offsetWidth,
1887
- height: element.offsetHeight
1888
- });
1889
- const resizeObserver = new ResizeObserver((entries)=>{
1890
- if (!Array.isArray(entries)) return;
1891
- // Since we only observe the one element, we don't need to loop over the
1892
- // array
1893
- if (!entries.length) return;
1894
- const entry = entries[0];
1895
- let width;
1896
- let height;
1897
- if ('borderBoxSize' in entry) {
1898
- const borderSizeEntry = entry['borderBoxSize']; // iron out differences between browsers
1899
- const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
1900
- width = borderSize['inlineSize'];
1901
- height = borderSize['blockSize'];
1902
- } else {
1903
- // for browsers that don't support `borderBoxSize`
1904
- // we calculate it ourselves to get the correct border box.
1905
- width = element.offsetWidth;
1906
- height = element.offsetHeight;
1907
- }
1908
- setSize({
1909
- width: width,
1910
- height: height
1911
- });
1912
- });
1913
- resizeObserver.observe(element, {
1914
- box: 'border-box'
1915
- });
1916
- return ()=>resizeObserver.unobserve(element)
1917
- ;
1918
- } else // We only want to reset to `undefined` when the element becomes `null`,
1919
- // not if it changes to another element.
1920
- setSize(undefined);
1921
- }, [
1922
- element
1923
- ]);
1924
- return size;
1925
- }
1926
-
1927
2409
  /* -------------------------------------------------------------------------------------------------
1928
2410
  * Popper
1929
2411
  * -----------------------------------------------------------------------------------------------*/ const $cf1ac5d9fe0e8206$var$POPPER_NAME = 'Popper';
@@ -2152,4 +2634,309 @@ const $cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9 = $cf1ac5d9fe0e8206$export$badac
2152
2634
  const $cf1ac5d9fe0e8206$export$b688253958b8dfe7 = $cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d;
2153
2635
  const $cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2 = $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc;
2154
2636
 
2155
- export { $cf1ac5d9fe0e8206$export$722aac194ae923 as $, $cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9 as a, $cf1ac5d9fe0e8206$export$b688253958b8dfe7 as b, $cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2 as c };
2637
+ const $f1701beae083dbae$export$602eac185826482c = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
2638
+ var _globalThis$document;
2639
+ 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;
2640
+ return container ? /*#__PURE__*/ ReactDOM__default.createPortal(/*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, portalProps, {
2641
+ ref: forwardedRef
2642
+ })), container) : null;
2643
+ });
2644
+
2645
+ var effectCar = createSidecarMedium();
2646
+
2647
+ var nothing = function () {
2648
+ return;
2649
+ };
2650
+ /**
2651
+ * Removes scrollbar from the page and contain the scroll within the Lock
2652
+ */
2653
+ var RemoveScroll = React.forwardRef(function (props, parentRef) {
2654
+ var ref = React.useRef(null);
2655
+ var _a = React.useState({
2656
+ onScrollCapture: nothing,
2657
+ onWheelCapture: nothing,
2658
+ onTouchMoveCapture: nothing,
2659
+ }), callbacks = _a[0], setCallbacks = _a[1];
2660
+ 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(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]);
2661
+ var SideCar = sideCar;
2662
+ var containerRef = useMergeRefs([ref, parentRef]);
2663
+ var containerProps = __assign(__assign({}, rest), callbacks);
2664
+ return (React.createElement(React.Fragment, null,
2665
+ enabled && (React.createElement(SideCar, { sideCar: effectCar, removeScrollBar: removeScrollBar, shards: shards, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref })),
2666
+ forwardProps ? (React.cloneElement(React.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef }))) : (React.createElement(Container, __assign({}, containerProps, { className: className, ref: containerRef }), children))));
2667
+ });
2668
+ RemoveScroll.defaultProps = {
2669
+ enabled: true,
2670
+ removeScrollBar: true,
2671
+ inert: false,
2672
+ };
2673
+ RemoveScroll.classNames = {
2674
+ fullWidth: fullWidthClassName,
2675
+ zeroRight: zeroRightClassName,
2676
+ };
2677
+
2678
+ var passiveSupported = false;
2679
+ if (typeof window !== 'undefined') {
2680
+ try {
2681
+ var options = Object.defineProperty({}, 'passive', {
2682
+ get: function () {
2683
+ passiveSupported = true;
2684
+ return true;
2685
+ },
2686
+ });
2687
+ // @ts-ignore
2688
+ window.addEventListener('test', options, options);
2689
+ // @ts-ignore
2690
+ window.removeEventListener('test', options, options);
2691
+ }
2692
+ catch (err) {
2693
+ passiveSupported = false;
2694
+ }
2695
+ }
2696
+ var nonPassive = passiveSupported ? { passive: false } : false;
2697
+
2698
+ var alwaysContainsScroll = function (node) {
2699
+ // textarea will always _contain_ scroll inside self. It only can be hidden
2700
+ return node.tagName === 'TEXTAREA';
2701
+ };
2702
+ var elementCanBeScrolled = function (node, overflow) {
2703
+ var styles = window.getComputedStyle(node);
2704
+ return (
2705
+ // not-not-scrollable
2706
+ styles[overflow] !== 'hidden' &&
2707
+ // contains scroll inside self
2708
+ !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible'));
2709
+ };
2710
+ var elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); };
2711
+ var elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); };
2712
+ var locationCouldBeScrolled = function (axis, node) {
2713
+ var current = node;
2714
+ do {
2715
+ // Skip over shadow root
2716
+ if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {
2717
+ current = current.host;
2718
+ }
2719
+ var isScrollable = elementCouldBeScrolled(axis, current);
2720
+ if (isScrollable) {
2721
+ var _a = getScrollVariables(axis, current), s = _a[1], d = _a[2];
2722
+ if (s > d) {
2723
+ return true;
2724
+ }
2725
+ }
2726
+ current = current.parentNode;
2727
+ } while (current && current !== document.body);
2728
+ return false;
2729
+ };
2730
+ var getVScrollVariables = function (_a) {
2731
+ var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
2732
+ return [
2733
+ scrollTop,
2734
+ scrollHeight,
2735
+ clientHeight,
2736
+ ];
2737
+ };
2738
+ var getHScrollVariables = function (_a) {
2739
+ var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
2740
+ return [
2741
+ scrollLeft,
2742
+ scrollWidth,
2743
+ clientWidth,
2744
+ ];
2745
+ };
2746
+ var elementCouldBeScrolled = function (axis, node) {
2747
+ return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
2748
+ };
2749
+ var getScrollVariables = function (axis, node) {
2750
+ return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);
2751
+ };
2752
+ var getDirectionFactor = function (axis, direction) {
2753
+ /**
2754
+ * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,
2755
+ * and then increasingly negative as you scroll towards the end of the content.
2756
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft
2757
+ */
2758
+ return axis === 'h' && direction === 'rtl' ? -1 : 1;
2759
+ };
2760
+ var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {
2761
+ var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
2762
+ var delta = directionFactor * sourceDelta;
2763
+ // find scrollable target
2764
+ var target = event.target;
2765
+ var targetInLock = endTarget.contains(target);
2766
+ var shouldCancelScroll = false;
2767
+ var isDeltaPositive = delta > 0;
2768
+ var availableScroll = 0;
2769
+ var availableScrollTop = 0;
2770
+ do {
2771
+ var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];
2772
+ var elementScroll = scroll_1 - capacity - directionFactor * position;
2773
+ if (position || elementScroll) {
2774
+ if (elementCouldBeScrolled(axis, target)) {
2775
+ availableScroll += elementScroll;
2776
+ availableScrollTop += position;
2777
+ }
2778
+ }
2779
+ target = target.parentNode;
2780
+ } while (
2781
+ // portaled content
2782
+ (!targetInLock && target !== document.body) ||
2783
+ // self content
2784
+ (targetInLock && (endTarget.contains(target) || endTarget === target)));
2785
+ if (isDeltaPositive && ((noOverscroll && availableScroll === 0) || (!noOverscroll && delta > availableScroll))) {
2786
+ shouldCancelScroll = true;
2787
+ }
2788
+ else if (!isDeltaPositive &&
2789
+ ((noOverscroll && availableScrollTop === 0) || (!noOverscroll && -delta > availableScrollTop))) {
2790
+ shouldCancelScroll = true;
2791
+ }
2792
+ return shouldCancelScroll;
2793
+ };
2794
+
2795
+ var getTouchXY = function (event) {
2796
+ return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
2797
+ };
2798
+ var getDeltaXY = function (event) { return [event.deltaX, event.deltaY]; };
2799
+ var extractRef = function (ref) {
2800
+ return ref && 'current' in ref ? ref.current : ref;
2801
+ };
2802
+ var deltaCompare = function (x, y) { return x[0] === y[0] && x[1] === y[1]; };
2803
+ var generateStyle = function (id) { return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n"); };
2804
+ var idCounter = 0;
2805
+ var lockStack = [];
2806
+ function RemoveScrollSideCar(props) {
2807
+ var shouldPreventQueue = React.useRef([]);
2808
+ var touchStartRef = React.useRef([0, 0]);
2809
+ var activeAxis = React.useRef();
2810
+ var id = React.useState(idCounter++)[0];
2811
+ var Style = React.useState(function () { return styleSingleton(); })[0];
2812
+ var lastProps = React.useRef(props);
2813
+ React.useEffect(function () {
2814
+ lastProps.current = props;
2815
+ }, [props]);
2816
+ React.useEffect(function () {
2817
+ if (props.inert) {
2818
+ document.body.classList.add("block-interactivity-".concat(id));
2819
+ var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
2820
+ allow_1.forEach(function (el) { return el.classList.add("allow-interactivity-".concat(id)); });
2821
+ return function () {
2822
+ document.body.classList.remove("block-interactivity-".concat(id));
2823
+ allow_1.forEach(function (el) { return el.classList.remove("allow-interactivity-".concat(id)); });
2824
+ };
2825
+ }
2826
+ return;
2827
+ }, [props.inert, props.lockRef.current, props.shards]);
2828
+ var shouldCancelEvent = React.useCallback(function (event, parent) {
2829
+ if ('touches' in event && event.touches.length === 2) {
2830
+ return !lastProps.current.allowPinchZoom;
2831
+ }
2832
+ var touch = getTouchXY(event);
2833
+ var touchStart = touchStartRef.current;
2834
+ var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0];
2835
+ var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1];
2836
+ var currentAxis;
2837
+ var target = event.target;
2838
+ var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v';
2839
+ // allow horizontal touch move on Range inputs. They will not cause any scroll
2840
+ if ('touches' in event && moveDirection === 'h' && target.type === 'range') {
2841
+ return false;
2842
+ }
2843
+ var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
2844
+ if (!canBeScrolledInMainDirection) {
2845
+ return true;
2846
+ }
2847
+ if (canBeScrolledInMainDirection) {
2848
+ currentAxis = moveDirection;
2849
+ }
2850
+ else {
2851
+ currentAxis = moveDirection === 'v' ? 'h' : 'v';
2852
+ canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
2853
+ // other axis might be not scrollable
2854
+ }
2855
+ if (!canBeScrolledInMainDirection) {
2856
+ return false;
2857
+ }
2858
+ if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) {
2859
+ activeAxis.current = currentAxis;
2860
+ }
2861
+ if (!currentAxis) {
2862
+ return true;
2863
+ }
2864
+ var cancelingAxis = activeAxis.current || currentAxis;
2865
+ return handleScroll(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true);
2866
+ }, []);
2867
+ var shouldPrevent = React.useCallback(function (_event) {
2868
+ var event = _event;
2869
+ if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {
2870
+ // not the last active
2871
+ return;
2872
+ }
2873
+ var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);
2874
+ var sourceEvent = shouldPreventQueue.current.filter(function (e) { return e.name === event.type && e.target === event.target && deltaCompare(e.delta, delta); })[0];
2875
+ // self event, and should be canceled
2876
+ if (sourceEvent && sourceEvent.should) {
2877
+ if (event.cancelable) {
2878
+ event.preventDefault();
2879
+ }
2880
+ return;
2881
+ }
2882
+ // outside or shard event
2883
+ if (!sourceEvent) {
2884
+ var shardNodes = (lastProps.current.shards || [])
2885
+ .map(extractRef)
2886
+ .filter(Boolean)
2887
+ .filter(function (node) { return node.contains(event.target); });
2888
+ var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
2889
+ if (shouldStop) {
2890
+ if (event.cancelable) {
2891
+ event.preventDefault();
2892
+ }
2893
+ }
2894
+ }
2895
+ }, []);
2896
+ var shouldCancel = React.useCallback(function (name, delta, target, should) {
2897
+ var event = { name: name, delta: delta, target: target, should: should };
2898
+ shouldPreventQueue.current.push(event);
2899
+ setTimeout(function () {
2900
+ shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { return e !== event; });
2901
+ }, 1);
2902
+ }, []);
2903
+ var scrollTouchStart = React.useCallback(function (event) {
2904
+ touchStartRef.current = getTouchXY(event);
2905
+ activeAxis.current = undefined;
2906
+ }, []);
2907
+ var scrollWheel = React.useCallback(function (event) {
2908
+ shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
2909
+ }, []);
2910
+ var scrollTouchMove = React.useCallback(function (event) {
2911
+ shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
2912
+ }, []);
2913
+ React.useEffect(function () {
2914
+ lockStack.push(Style);
2915
+ props.setCallbacks({
2916
+ onScrollCapture: scrollWheel,
2917
+ onWheelCapture: scrollWheel,
2918
+ onTouchMoveCapture: scrollTouchMove,
2919
+ });
2920
+ document.addEventListener('wheel', shouldPrevent, nonPassive);
2921
+ document.addEventListener('touchmove', shouldPrevent, nonPassive);
2922
+ document.addEventListener('touchstart', scrollTouchStart, nonPassive);
2923
+ return function () {
2924
+ lockStack = lockStack.filter(function (inst) { return inst !== Style; });
2925
+ document.removeEventListener('wheel', shouldPrevent, nonPassive);
2926
+ document.removeEventListener('touchmove', shouldPrevent, nonPassive);
2927
+ document.removeEventListener('touchstart', scrollTouchStart, nonPassive);
2928
+ };
2929
+ }, []);
2930
+ var removeScrollBar = props.removeScrollBar, inert = props.inert;
2931
+ return (React.createElement(React.Fragment, null,
2932
+ inert ? React.createElement(Style, { styles: generateStyle(id) }) : null,
2933
+ removeScrollBar ? React.createElement(RemoveScrollBar, { gapMode: "margin" }) : null));
2934
+ }
2935
+
2936
+ var SideCar = exportSidecar(effectCar, RemoveScrollSideCar);
2937
+
2938
+ var ReactRemoveScroll = React.forwardRef(function (props, ref) { return (React.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: SideCar }))); });
2939
+ ReactRemoveScroll.classNames = RemoveScroll.classNames;
2940
+ var $01b9c$RemoveScroll = ReactRemoveScroll;
2941
+
2942
+ export { $cf1ac5d9fe0e8206$export$722aac194ae923 as $, $cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9 as a, $cf1ac5d9fe0e8206$export$b688253958b8dfe7 as b, $f1701beae083dbae$export$602eac185826482c as c, $01b9c$RemoveScroll as d, $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c as e, $d3863c46a17e8a28$export$20e40289641fbbb6 as f, $5cb92bef7577960e$export$177fb62ff3ec1f22 as g, $cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2 as h };