@eightshift/ui-components 1.0.5 → 1.1.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 (121) hide show
  1. package/README.md +9 -0
  2. package/dist/{Button-eebLs4cp.js → Button-CbFrFO04.js} +5 -5
  3. package/dist/{Checkbox-BN0TEda-.js → Checkbox-Cv3pZDHg.js} +12 -16
  4. package/dist/{ColorSwatch-BrowHhTG.js → ColorSwatch-CNQmCQV8.js} +6 -7
  5. package/dist/{FieldError-ILxgMZy5.js → FieldError-J1-YPbi6.js} +2 -2
  6. package/dist/{FocusScope-B9b0VMib.js → FocusScope-Bw-IatMO.js} +79 -153
  7. package/dist/{GridList-CzpWxJsS.js → GridList-CEzzyr-l.js} +62 -90
  8. package/dist/{Group-Dkdm2-E7.js → Group-D3Qa6PrV.js} +3 -3
  9. package/dist/{Input-BJA4rmIo.js → Input-CX_rocyZ.js} +8 -8
  10. package/dist/{Label-9x5iLJ-Y.js → Label-Bg5O81Wb.js} +1 -1
  11. package/dist/{ListBox-D3Vr4vvC.js → ListBox-CCWXTj0t.js} +391 -598
  12. package/dist/{LiveAnnouncer-IsokfWQ5.js → LiveAnnouncer-D8h-3GrG.js} +12 -22
  13. package/dist/{NumberFormatter-LzoKy975.js → NumberFormatter-U_Gx0UDq.js} +26 -44
  14. package/dist/{Select-49a62830.esm-CKPmlkza.js → Select-49a62830.esm-BnlXlUnT.js} +92 -166
  15. package/dist/{SelectionManager-sedvcM-1.js → SelectionManager-XOAt-Ekx.js} +219 -401
  16. package/dist/{Separator-B6rnDabE.js → Separator-DZeg0KOr.js} +41 -72
  17. package/dist/{Slider-C5U5N7uM.js → Slider-fULMI0gI.js} +51 -82
  18. package/dist/{Text-Cyxp9ewv.js → Text-WqetJduR.js} +1 -1
  19. package/dist/{VisuallyHidden-BPJVSUyp.js → VisuallyHidden-Di1zXprL.js} +8 -11
  20. package/dist/{ariaHideOutside-ByKBPHmX.js → ariaHideOutside-Zn64-frS.js} +20 -36
  21. package/dist/assets/style.css +1 -1
  22. package/dist/assets/wp-font-enhancements.css +1 -1
  23. package/dist/assets/wp-ui-enhancements.css +1 -1
  24. package/dist/{button-idVI4jmd.js → button-CD8Q1eok.js} +17 -29
  25. package/dist/components/animated-visibility/animated-visibility.js +125 -113
  26. package/dist/components/base-control/base-control.js +3 -9
  27. package/dist/components/breakpoint-preview/breakpoint-preview.js +51 -108
  28. package/dist/components/button/button.js +6 -6
  29. package/dist/components/checkbox/checkbox.js +2 -2
  30. package/dist/components/color-pickers/color-picker.js +2 -2
  31. package/dist/components/color-pickers/color-swatch.js +5 -9
  32. package/dist/components/color-pickers/gradient-editor.js +15 -29
  33. package/dist/components/color-pickers/solid-color-picker.js +81 -128
  34. package/dist/components/component-toggle/component-toggle.js +4 -4
  35. package/dist/components/container-panel/container-panel.js +4 -11
  36. package/dist/components/draggable-list/draggable-list-item.js +4 -4
  37. package/dist/components/draggable-list/draggable-list.js +5 -5
  38. package/dist/components/expandable/expandable.js +45 -57
  39. package/dist/components/index.js +3 -3
  40. package/dist/components/input-field/input-field.js +11 -26
  41. package/dist/components/layout/hstack.js +2 -12
  42. package/dist/components/layout/vstack.js +2 -12
  43. package/dist/components/link-input/link-input.js +36 -53
  44. package/dist/components/list-box/list-box.js +4 -4
  45. package/dist/components/matrix-align/matrix-align.js +6 -10
  46. package/dist/components/menu/menu.js +101 -170
  47. package/dist/components/notice/notice.js +1 -1
  48. package/dist/components/number-picker/number-picker.js +15 -15
  49. package/dist/components/option-select/option-select.js +52 -70
  50. package/dist/components/options-panel/options-panel.js +3 -3
  51. package/dist/components/placeholders/file-placeholder.js +2 -2
  52. package/dist/components/placeholders/image-placeholder.js +1 -1
  53. package/dist/components/placeholders/media-placeholder.js +1 -1
  54. package/dist/components/popover/popover.js +4 -4
  55. package/dist/components/radio/radio.js +25 -38
  56. package/dist/components/repeater/repeater-item.js +6 -17
  57. package/dist/components/repeater/repeater.js +6 -7
  58. package/dist/components/responsive/responsive-legacy.js +27 -15
  59. package/dist/components/responsive/responsive.js +53 -52
  60. package/dist/components/responsive-preview/responsive-preview.js +1 -1
  61. package/dist/components/rich-label/rich-label.js +2 -8
  62. package/dist/components/select/async-multi-select.js +3 -3
  63. package/dist/components/select/async-single-select.js +2 -2
  64. package/dist/components/select/custom-select-default-components.js +2 -2
  65. package/dist/components/select/multi-select-components.js +2 -2
  66. package/dist/components/select/multi-select.js +3 -3
  67. package/dist/components/select/react-select-component-wrappers.js +9 -9
  68. package/dist/components/select/single-select.js +2 -2
  69. package/dist/components/select/styles.js +3 -10
  70. package/dist/components/slider/column-config-slider.js +4 -4
  71. package/dist/components/slider/slider.js +5 -8
  72. package/dist/components/slider/utils.js +2 -6
  73. package/dist/components/spacer/spacer.js +2 -7
  74. package/dist/components/tabs/tabs.js +29 -50
  75. package/dist/components/toggle/switch.js +8 -8
  76. package/dist/components/toggle/toggle.js +1 -1
  77. package/dist/components/toggle-button/toggle-button.js +8 -22
  78. package/dist/components/tooltip/tooltip.js +4 -4
  79. package/dist/{context-BAcFg5GO.js → context-4oSz1ItD.js} +10 -16
  80. package/dist/{default-i18n-Bk1GxDHz.js → default-i18n-BqwLkgZv.js} +21 -22
  81. package/dist/{filterDOMProps-DG2RfOUr.js → filterDOMProps-EDDcM64A.js} +1 -3
  82. package/dist/{focusSafely-B0hyd-S4.js → focusSafely-BS4dllCW.js} +85 -143
  83. package/dist/icons/generic-color-swatch.js +105 -13
  84. package/dist/icons/icons.js +31010 -3447
  85. package/dist/icons/jsx-svg.js +591 -953
  86. package/dist/{index-BDk0TPWz.js → index-CAPcSs9K.js} +1504 -2087
  87. package/dist/{index-a301f526.esm-BzTuHLdr.js → index-a301f526.esm-ByOfDxiG.js} +111 -183
  88. package/dist/index.js +3 -3
  89. package/dist/{intlStrings-Ctkp0HDc.js → intlStrings-Dxaeitoh.js} +35 -60
  90. package/dist/{isScrollable-PcyglExV.js → isScrollable-Dh9D9IOd.js} +1 -2
  91. package/dist/lite-DVmmD_-j.js +7 -0
  92. package/dist/{multi-select-components-nORKdJ-2.js → multi-select-components-7vKCF8dG.js} +3 -3
  93. package/dist/{number-rWqELA8W.js → number-CHmNj-oR.js} +3 -6
  94. package/dist/{popover-o2Q28Ljn.js → popover-Dk2o4S7K.js} +70 -112
  95. package/dist/{react-select-async.esm-CLj9uZTq.js → react-select-async.esm-5zW9Dv9E.js} +7 -11
  96. package/dist/{react-select.esm-3tyTZmrx.js → react-select.esm-Bi6uzjbT.js} +3 -3
  97. package/dist/{textSelection-BRZdHY-4.js → textSelection-exP_9srp.js} +5 -9
  98. package/dist/{tooltip-T6H9uF-Z.js → tooltip-BRQ4tvZL.js} +64 -111
  99. package/dist/{useButton-D-xACzEY.js → useButton-DbjDV_33.js} +19 -22
  100. package/dist/{useEvent-XlYPKgwX.js → useEvent-zvxfEnmK.js} +2 -3
  101. package/dist/{useFocusRing-CRx_hYC4.js → useFocusRing-SPRI0-SN.js} +1 -1
  102. package/dist/{useFocusable-CHfpEdlE.js → useFocusable-CLmhO94g.js} +5 -8
  103. package/dist/{useFormReset-aHn6-wRk.js → useFormReset-BVWgcyGO.js} +2 -3
  104. package/dist/{useFormValidationState-CdYmOaXI.js → useFormValidationState-CthG9Fbc.js} +20 -38
  105. package/dist/{useHasTabbableChild-domoFB7A.js → useHasTabbableChild--gkWUICh.js} +2 -2
  106. package/dist/{useLabel-DVhXVhtH.js → useLabel-g836T8kL.js} +3 -4
  107. package/dist/{useLabels-C7E5SkOi.js → useLabels-CfOtyOe2.js} +3 -5
  108. package/dist/{useListData-BelKu4kx.js → useListData-BpYQj7kK.js} +18 -32
  109. package/dist/{useListState-BRsq7O1C.js → useListState-DnWZa__1.js} +6 -12
  110. package/dist/{useLocalizedStringFormatter-WsEL47qR.js → useLocalizedStringFormatter-BQCMno9k.js} +12 -21
  111. package/dist/{useNumberFieldState-ZH2Qyyxh.js → useNumberFieldState-BegO5X6F.js} +75 -132
  112. package/dist/{useNumberFormatter-mhdYLxWQ.js → useNumberFormatter-DhOGEsEK.js} +2 -2
  113. package/dist/{usePress-B42RawCH.js → usePress-CScNeV3V.js} +92 -175
  114. package/dist/{useToggle-CExfZM8x.js → useToggle-6LnpaJ7-.js} +6 -7
  115. package/dist/{useToggleState-DghG5ImG.js → useToggleState-Cymkpac8.js} +3 -5
  116. package/dist/utilities/array-helpers.js +1 -1
  117. package/dist/utilities/index.js +1 -1
  118. package/dist/utilities/text-helpers.js +20 -20
  119. package/dist/{utils-DIBzm1e4.js → utils-Dc35LwuT.js} +49 -90
  120. package/package.json +96 -90
  121. package/dist/lite-pbIeT7tm.js +0 -8
package/README.md CHANGED
@@ -4,6 +4,15 @@ A collection of commonly-used UI components, utilities and icons, meant to provi
4
4
 
5
5
  Built using [React Aria components](https://react-spectrum.adobe.com/react-aria/), styled using [TailwindCSS](https://tailwindcss.com/). Build process and library export is set up with [Vite](https://vitejs.dev/).
6
6
 
7
+ ## Local setup
8
+
9
+ > [!IMPORTANT]
10
+ > Uses [`pnpm`](https://pnpm.io/) for package management.
11
+
12
+ 1. Clone the repository
13
+ 2. `pnpm install`
14
+ 3. `pnpm start` to run the example
15
+
7
16
  ## Who do I talk to?
8
17
 
9
18
  If you have any questions or problems, please [open an issue](https://github.com/infinum/eightshift-ui-components/issues) on GitHub and we will do our best to give you a timely answer.
@@ -1,9 +1,9 @@
1
- import { b as $64fa3d84918910a7$export$86427a43e3e48ebb, a as $64fa3d84918910a7$export$29f1550f4b0d4415, c as $64fa3d84918910a7$export$4d86445c2cf5e3, d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-DIBzm1e4.js";
2
- import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-DG2RfOUr.js";
1
+ import { b as $64fa3d84918910a7$export$86427a43e3e48ebb, a as $64fa3d84918910a7$export$29f1550f4b0d4415, c as $64fa3d84918910a7$export$4d86445c2cf5e3, d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-Dc35LwuT.js";
2
+ import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.js";
3
3
  import React__default, { createContext } from "react";
4
- import { $ as $701a24aa0da5b062$export$ea18c227d4417cc3 } from "./useButton-D-xACzEY.js";
5
- import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-CRx_hYC4.js";
6
- import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "./focusSafely-B0hyd-S4.js";
4
+ import { $ as $701a24aa0da5b062$export$ea18c227d4417cc3 } from "./useButton-DbjDV_33.js";
5
+ import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-SPRI0-SN.js";
6
+ import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "./focusSafely-BS4dllCW.js";
7
7
  const $d2b4bc8c273e7be6$var$additionalButtonHTMLAttributes = /* @__PURE__ */ new Set([
8
8
  "form",
9
9
  "formAction",
@@ -1,14 +1,14 @@
1
1
  import { $ as $4e85f108e88277b8$export$b085522c77523c51 } from "./RSPContexts-CrNYmadY.js";
2
- import { a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, l as $df56164dff5785e2$export$4338b53315abf666, m as $5dc95899b306f630$export$c9058316764c140e, c as $64fa3d84918910a7$export$4d86445c2cf5e3, d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-DIBzm1e4.js";
2
+ import { a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, l as $df56164dff5785e2$export$4338b53315abf666, m as $5dc95899b306f630$export$c9058316764c140e, c as $64fa3d84918910a7$export$4d86445c2cf5e3, d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-Dc35LwuT.js";
3
3
  import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "./Form-Cq3fu75_.js";
4
- import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-DG2RfOUr.js";
4
+ import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.js";
5
5
  import React__default, { useEffect, useRef, forwardRef, useContext, createContext } from "react";
6
- import { $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, a as $e93e671b31057976$export$b8473d3665f3a75a, b as $e5be200c675c3b3a$export$dad6ae84456c676a, c as $e5be200c675c3b3a$export$a763b9476acd3eb } from "./useFormValidationState-CdYmOaXI.js";
7
- import { $ as $d2c8e2b0480f3f34$export$cbe85ee05b554577 } from "./useToggle-CExfZM8x.js";
8
- import { $ as $3017fa7ffdddec74$export$8042c6c013fd5226 } from "./useToggleState-DghG5ImG.js";
9
- import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-CRx_hYC4.js";
10
- import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "./focusSafely-B0hyd-S4.js";
11
- import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "./VisuallyHidden-BPJVSUyp.js";
6
+ import { $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, a as $e93e671b31057976$export$b8473d3665f3a75a, b as $e5be200c675c3b3a$export$dad6ae84456c676a, c as $e5be200c675c3b3a$export$a763b9476acd3eb } from "./useFormValidationState-CthG9Fbc.js";
7
+ import { $ as $d2c8e2b0480f3f34$export$cbe85ee05b554577 } from "./useToggle-6LnpaJ7-.js";
8
+ import { $ as $3017fa7ffdddec74$export$8042c6c013fd5226 } from "./useToggleState-Cymkpac8.js";
9
+ import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-SPRI0-SN.js";
10
+ import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "./focusSafely-BS4dllCW.js";
11
+ import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "./VisuallyHidden-Di1zXprL.js";
12
12
  function $406796ff087fe49b$export$e375f10ce42261c5(props, state, inputRef) {
13
13
  let validationState = $e5be200c675c3b3a$export$fc1a364ae1f3ff10({
14
14
  ...props,
@@ -22,8 +22,7 @@ function $406796ff087fe49b$export$e375f10ce42261c5(props, state, inputRef) {
22
22
  $e93e671b31057976$export$b8473d3665f3a75a(props, validationState, inputRef);
23
23
  let { isIndeterminate, isRequired, validationBehavior = "aria" } = props;
24
24
  useEffect(() => {
25
- if (inputRef.current)
26
- inputRef.current.indeterminate = !!isIndeterminate;
25
+ if (inputRef.current) inputRef.current.indeterminate = !!isIndeterminate;
27
26
  });
28
27
  return {
29
28
  labelProps,
@@ -48,12 +47,9 @@ function $fba3e38d5ca8983f$export$353b32fc6898d37d(props, state, inputRef) {
48
47
  isReadOnly: props.isReadOnly || state.isReadOnly,
49
48
  isSelected: state.isSelected(props.value),
50
49
  onChange(isSelected) {
51
- if (isSelected)
52
- state.addValue(props.value);
53
- else
54
- state.removeValue(props.value);
55
- if (props.onChange)
56
- props.onChange(isSelected);
50
+ if (isSelected) state.addValue(props.value);
51
+ else state.removeValue(props.value);
52
+ if (props.onChange) props.onChange(isSelected);
57
53
  }
58
54
  });
59
55
  let { name, descriptionId, errorMessageId, validationBehavior } = $1ae600c947479353$export$ec98120685d4f57d.get(state);
@@ -1,9 +1,9 @@
1
- import { e as $bdb11010cef70236$export$f680877a34711e37, a as $64fa3d84918910a7$export$29f1550f4b0d4415, c as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "./utils-DIBzm1e4.js";
2
- import { $ as $799cddbef784668f$export$6e865ea70d7724f, a as $3493a52097159720$exports } from "./intlStrings-Ctkp0HDc.js";
3
- import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-DG2RfOUr.js";
1
+ import { e as $bdb11010cef70236$export$f680877a34711e37, a as $64fa3d84918910a7$export$29f1550f4b0d4415, c as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "./utils-Dc35LwuT.js";
2
+ import { $ as $799cddbef784668f$export$6e865ea70d7724f, a as $3493a52097159720$exports } from "./intlStrings-Dxaeitoh.js";
3
+ import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.js";
4
4
  import React__default, { useMemo, forwardRef, createContext } from "react";
5
- import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-BAcFg5GO.js";
6
- import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-WsEL47qR.js";
5
+ import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-4oSz1ItD.js";
6
+ import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-BQCMno9k.js";
7
7
  function $parcel$interopDefault(a) {
8
8
  return a && a.__esModule ? a.default : a;
9
9
  }
@@ -19,8 +19,7 @@ function $2993fcad7650b98d$export$9060ae606178d849(props) {
19
19
  });
20
20
  let stringFormatter = $fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault($3493a52097159720$exports), "@react-aria/color");
21
21
  let id = $bdb11010cef70236$export$f680877a34711e37(props.id);
22
- if (!colorName)
23
- colorName = color.getChannelValue("alpha") === 0 ? stringFormatter.format("transparent") : color.getColorName(locale);
22
+ if (!colorName) colorName = color.getChannelValue("alpha") === 0 ? stringFormatter.format("transparent") : color.getColorName(locale);
24
23
  return {
25
24
  colorSwatchProps: {
26
25
  ...DOMProps,
@@ -1,5 +1,5 @@
1
- import { $ as $d191a55c9702f145$export$8467354a121f1b9f } from "./useLabel-DVhXVhtH.js";
2
- import { k as $bdb11010cef70236$export$b4cc09c592e8fdb8, d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-DIBzm1e4.js";
1
+ import { $ as $d191a55c9702f145$export$8467354a121f1b9f } from "./useLabel-g836T8kL.js";
2
+ import { k as $bdb11010cef70236$export$b4cc09c592e8fdb8, d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-Dc35LwuT.js";
3
3
  import { createContext } from "react";
4
4
  function $2baaea4c71418dea$export$294aa081a6c6f55d(props) {
5
5
  let { description, errorMessage, isInvalid, validationState } = props;
@@ -1,10 +1,9 @@
1
- import { f as $431fbd86ca7dc216$export$f21a1ffae260145a, g as $431fbd86ca7dc216$export$b204af158042fbac, h as $6a99195332edec8b$export$80f3e147d781571c } from "./focusSafely-B0hyd-S4.js";
2
- import { g as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c } from "./utils-DIBzm1e4.js";
1
+ import { f as $431fbd86ca7dc216$export$f21a1ffae260145a, g as $431fbd86ca7dc216$export$b204af158042fbac, h as $6a99195332edec8b$export$80f3e147d781571c } from "./focusSafely-BS4dllCW.js";
2
+ import { g as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c } from "./utils-Dc35LwuT.js";
3
3
  import React__default, { useRef, useContext, useMemo, useEffect } from "react";
4
4
  function $645f2e67b85a24c9$var$isStyleVisible(element) {
5
5
  const windowObject = $431fbd86ca7dc216$export$f21a1ffae260145a(element);
6
- if (!(element instanceof windowObject.HTMLElement) && !(element instanceof windowObject.SVGElement))
7
- return false;
6
+ if (!(element instanceof windowObject.HTMLElement) && !(element instanceof windowObject.SVGElement)) return false;
8
7
  let { display, visibility } = element.style;
9
8
  let isVisible = display !== "none" && visibility !== "hidden" && visibility !== "collapse";
10
9
  if (isVisible) {
@@ -38,8 +37,7 @@ function $9bf71ea28793e738$export$20e40289641fbbb6(props) {
38
37
  let parent = parentNode || $9bf71ea28793e738$export$d06fae2ee68b101e.root;
39
38
  if ($9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(parent.scopeRef) && $9bf71ea28793e738$var$activeScope && !$9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope, parent.scopeRef)) {
40
39
  let activeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);
41
- if (activeNode)
42
- parent = activeNode;
40
+ if (activeNode) parent = activeNode;
43
41
  }
44
42
  parent.addChild(node);
45
43
  $9bf71ea28793e738$export$d06fae2ee68b101e.addNode(node);
@@ -49,8 +47,7 @@ function $9bf71ea28793e738$export$20e40289641fbbb6(props) {
49
47
  ]);
50
48
  $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
51
49
  let node2 = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);
52
- if (node2)
53
- node2.contain = !!contain;
50
+ if (node2) node2.contain = !!contain;
54
51
  }, [
55
52
  contain
56
53
  ]);
@@ -74,11 +71,8 @@ function $9bf71ea28793e738$export$20e40289641fbbb6(props) {
74
71
  const activeElement = $431fbd86ca7dc216$export$b204af158042fbac(scopeRef.current ? scopeRef.current[0] : void 0).activeElement;
75
72
  let scope = null;
76
73
  if ($9bf71ea28793e738$var$isElementInScope(activeElement, scopeRef.current)) {
77
- for (let node2 of $9bf71ea28793e738$export$d06fae2ee68b101e.traverse())
78
- if (node2.scopeRef && $9bf71ea28793e738$var$isElementInScope(activeElement, node2.scopeRef.current))
79
- scope = node2;
80
- if (scope === $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef))
81
- $9bf71ea28793e738$var$activeScope = scope.scopeRef;
74
+ for (let node2 of $9bf71ea28793e738$export$d06fae2ee68b101e.traverse()) if (node2.scopeRef && $9bf71ea28793e738$var$isElementInScope(activeElement, node2.scopeRef.current)) scope = node2;
75
+ if (scope === $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef)) $9bf71ea28793e738$var$activeScope = scope.scopeRef;
82
76
  }
83
77
  }, [
84
78
  scopeRef
@@ -88,8 +82,7 @@ function $9bf71ea28793e738$export$20e40289641fbbb6(props) {
88
82
  var _focusScopeTree_getTreeNode_parent, _focusScopeTree_getTreeNode;
89
83
  var _focusScopeTree_getTreeNode_parent_scopeRef;
90
84
  let parentScope = (_focusScopeTree_getTreeNode_parent_scopeRef = (_focusScopeTree_getTreeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef)) === null || _focusScopeTree_getTreeNode === void 0 ? void 0 : (_focusScopeTree_getTreeNode_parent = _focusScopeTree_getTreeNode.parent) === null || _focusScopeTree_getTreeNode_parent === void 0 ? void 0 : _focusScopeTree_getTreeNode_parent.scopeRef) !== null && _focusScopeTree_getTreeNode_parent_scopeRef !== void 0 ? _focusScopeTree_getTreeNode_parent_scopeRef : null;
91
- if ((scopeRef === $9bf71ea28793e738$var$activeScope || $9bf71ea28793e738$var$isAncestorScope(scopeRef, $9bf71ea28793e738$var$activeScope)) && (!parentScope || $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(parentScope)))
92
- $9bf71ea28793e738$var$activeScope = parentScope;
85
+ if ((scopeRef === $9bf71ea28793e738$var$activeScope || $9bf71ea28793e738$var$isAncestorScope(scopeRef, $9bf71ea28793e738$var$activeScope)) && (!parentScope || $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(parentScope))) $9bf71ea28793e738$var$activeScope = parentScope;
93
86
  $9bf71ea28793e738$export$d06fae2ee68b101e.removeTreeNode(scopeRef);
94
87
  };
95
88
  }, [
@@ -133,8 +126,7 @@ function $9bf71ea28793e738$var$createFocusManagerForScope(scopeRef) {
133
126
  walker.currentNode = sentinel;
134
127
  nextNode = walker.nextNode();
135
128
  }
136
- if (nextNode)
137
- $9bf71ea28793e738$var$focusElement(nextNode, true);
129
+ if (nextNode) $9bf71ea28793e738$var$focusElement(nextNode, true);
138
130
  return nextNode;
139
131
  },
140
132
  focusPrevious(opts = {}) {
@@ -153,8 +145,7 @@ function $9bf71ea28793e738$var$createFocusManagerForScope(scopeRef) {
153
145
  walker.currentNode = sentinel;
154
146
  previousNode = walker.previousNode();
155
147
  }
156
- if (previousNode)
157
- $9bf71ea28793e738$var$focusElement(previousNode, true);
148
+ if (previousNode) $9bf71ea28793e738$var$focusElement(previousNode, true);
158
149
  return previousNode;
159
150
  },
160
151
  focusFirst(opts = {}) {
@@ -167,8 +158,7 @@ function $9bf71ea28793e738$var$createFocusManagerForScope(scopeRef) {
167
158
  }, scope);
168
159
  walker.currentNode = scope[0].previousElementSibling;
169
160
  let nextNode = walker.nextNode();
170
- if (nextNode)
171
- $9bf71ea28793e738$var$focusElement(nextNode, true);
161
+ if (nextNode) $9bf71ea28793e738$var$focusElement(nextNode, true);
172
162
  return nextNode;
173
163
  },
174
164
  focusLast(opts = {}) {
@@ -181,8 +171,7 @@ function $9bf71ea28793e738$var$createFocusManagerForScope(scopeRef) {
181
171
  }, scope);
182
172
  walker.currentNode = scope[scope.length - 1].nextElementSibling;
183
173
  let previousNode = walker.previousNode();
184
- if (previousNode)
185
- $9bf71ea28793e738$var$focusElement(previousNode, true);
174
+ if (previousNode) $9bf71ea28793e738$var$focusElement(previousNode, true);
186
175
  return previousNode;
187
176
  }
188
177
  };
@@ -211,8 +200,7 @@ function $9bf71ea28793e738$var$getScopeRoot(scope) {
211
200
  function $9bf71ea28793e738$var$shouldContainFocus(scopeRef) {
212
201
  let scope = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);
213
202
  while (scope && scope.scopeRef !== scopeRef) {
214
- if (scope.contain)
215
- return false;
203
+ if (scope.contain) return false;
216
204
  scope = scope.parent;
217
205
  }
218
206
  return true;
@@ -231,18 +219,15 @@ function $9bf71ea28793e738$var$useFocusContainment(scopeRef, contain) {
231
219
  }
232
220
  const ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(scope ? scope[0] : void 0);
233
221
  let onKeyDown = (e) => {
234
- if (e.key !== "Tab" || e.altKey || e.ctrlKey || e.metaKey || !$9bf71ea28793e738$var$shouldContainFocus(scopeRef) || e.isComposing)
235
- return;
222
+ if (e.key !== "Tab" || e.altKey || e.ctrlKey || e.metaKey || !$9bf71ea28793e738$var$shouldContainFocus(scopeRef) || e.isComposing) return;
236
223
  let focusedElement = ownerDocument.activeElement;
237
224
  let scope2 = scopeRef.current;
238
- if (!scope2 || !$9bf71ea28793e738$var$isElementInScope(focusedElement, scope2))
239
- return;
225
+ if (!scope2 || !$9bf71ea28793e738$var$isElementInScope(focusedElement, scope2)) return;
240
226
  let scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope2);
241
227
  let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {
242
228
  tabbable: true
243
229
  }, scope2);
244
- if (!focusedElement)
245
- return;
230
+ if (!focusedElement) return;
246
231
  walker.currentNode = focusedElement;
247
232
  let nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();
248
233
  if (!nextElement) {
@@ -250,24 +235,19 @@ function $9bf71ea28793e738$var$useFocusContainment(scopeRef, contain) {
250
235
  nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();
251
236
  }
252
237
  e.preventDefault();
253
- if (nextElement)
254
- $9bf71ea28793e738$var$focusElement(nextElement, true);
238
+ if (nextElement) $9bf71ea28793e738$var$focusElement(nextElement, true);
255
239
  };
256
240
  let onFocus = (e) => {
257
241
  if ((!$9bf71ea28793e738$var$activeScope || $9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope, scopeRef)) && $9bf71ea28793e738$var$isElementInScope(e.target, scopeRef.current)) {
258
242
  $9bf71ea28793e738$var$activeScope = scopeRef;
259
243
  focusedNode.current = e.target;
260
244
  } else if ($9bf71ea28793e738$var$shouldContainFocus(scopeRef) && !$9bf71ea28793e738$var$isElementInChildScope(e.target, scopeRef)) {
261
- if (focusedNode.current)
262
- focusedNode.current.focus();
263
- else if ($9bf71ea28793e738$var$activeScope && $9bf71ea28793e738$var$activeScope.current)
264
- $9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current);
265
- } else if ($9bf71ea28793e738$var$shouldContainFocus(scopeRef))
266
- focusedNode.current = e.target;
245
+ if (focusedNode.current) focusedNode.current.focus();
246
+ else if ($9bf71ea28793e738$var$activeScope && $9bf71ea28793e738$var$activeScope.current) $9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current);
247
+ } else if ($9bf71ea28793e738$var$shouldContainFocus(scopeRef)) focusedNode.current = e.target;
267
248
  };
268
249
  let onBlur = (e) => {
269
- if (raf.current)
270
- cancelAnimationFrame(raf.current);
250
+ if (raf.current) cancelAnimationFrame(raf.current);
271
251
  raf.current = requestAnimationFrame(() => {
272
252
  if (ownerDocument.activeElement && $9bf71ea28793e738$var$shouldContainFocus(scopeRef) && !$9bf71ea28793e738$var$isElementInChildScope(ownerDocument.activeElement, scopeRef)) {
273
253
  $9bf71ea28793e738$var$activeScope = scopeRef;
@@ -275,8 +255,7 @@ function $9bf71ea28793e738$var$useFocusContainment(scopeRef, contain) {
275
255
  var _focusedNode_current;
276
256
  focusedNode.current = e.target;
277
257
  (_focusedNode_current = focusedNode.current) === null || _focusedNode_current === void 0 ? void 0 : _focusedNode_current.focus();
278
- } else if ($9bf71ea28793e738$var$activeScope.current)
279
- $9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current);
258
+ } else if ($9bf71ea28793e738$var$activeScope.current) $9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current);
280
259
  }
281
260
  });
282
261
  };
@@ -296,8 +275,7 @@ function $9bf71ea28793e738$var$useFocusContainment(scopeRef, contain) {
296
275
  ]);
297
276
  $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
298
277
  return () => {
299
- if (raf.current)
300
- cancelAnimationFrame(raf.current);
278
+ if (raf.current) cancelAnimationFrame(raf.current);
301
279
  };
302
280
  }, [
303
281
  raf
@@ -307,18 +285,14 @@ function $9bf71ea28793e738$var$isElementInAnyScope(element) {
307
285
  return $9bf71ea28793e738$var$isElementInChildScope(element);
308
286
  }
309
287
  function $9bf71ea28793e738$var$isElementInScope(element, scope) {
310
- if (!element)
311
- return false;
312
- if (!scope)
313
- return false;
288
+ if (!element) return false;
289
+ if (!scope) return false;
314
290
  return scope.some((node) => node.contains(element));
315
291
  }
316
292
  function $9bf71ea28793e738$var$isElementInChildScope(element, scope = null) {
317
- if (element instanceof Element && element.closest("[data-react-aria-top-layer]"))
318
- return true;
293
+ if (element instanceof Element && element.closest("[data-react-aria-top-layer]")) return true;
319
294
  for (let { scopeRef: s } of $9bf71ea28793e738$export$d06fae2ee68b101e.traverse($9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scope))) {
320
- if (s && $9bf71ea28793e738$var$isElementInScope(element, s.current))
321
- return true;
295
+ if (s && $9bf71ea28793e738$var$isElementInScope(element, s.current)) return true;
322
296
  }
323
297
  return false;
324
298
  }
@@ -329,23 +303,20 @@ function $9bf71ea28793e738$var$isAncestorScope(ancestor, scope) {
329
303
  var _focusScopeTree_getTreeNode;
330
304
  let parent = (_focusScopeTree_getTreeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scope)) === null || _focusScopeTree_getTreeNode === void 0 ? void 0 : _focusScopeTree_getTreeNode.parent;
331
305
  while (parent) {
332
- if (parent.scopeRef === ancestor)
333
- return true;
306
+ if (parent.scopeRef === ancestor) return true;
334
307
  parent = parent.parent;
335
308
  }
336
309
  return false;
337
310
  }
338
311
  function $9bf71ea28793e738$var$focusElement(element, scroll = false) {
339
- if (element != null && !scroll)
340
- try {
341
- (0, $6a99195332edec8b$export$80f3e147d781571c)(element);
342
- } catch (err) {
343
- }
344
- else if (element != null)
345
- try {
346
- element.focus();
347
- } catch (err) {
348
- }
312
+ if (element != null && !scroll) try {
313
+ (0, $6a99195332edec8b$export$80f3e147d781571c)(element);
314
+ } catch (err) {
315
+ }
316
+ else if (element != null) try {
317
+ element.focus();
318
+ } catch (err) {
319
+ }
349
320
  }
350
321
  function $9bf71ea28793e738$var$focusFirstInScope(scope, tabbable = true) {
351
322
  let sentinel = scope[0].previousElementSibling;
@@ -371,8 +342,7 @@ function $9bf71ea28793e738$var$useAutoFocus(scopeRef, autoFocus) {
371
342
  if (autoFocusRef.current) {
372
343
  $9bf71ea28793e738$var$activeScope = scopeRef;
373
344
  const ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(scopeRef.current ? scopeRef.current[0] : void 0);
374
- if (!$9bf71ea28793e738$var$isElementInScope(ownerDocument.activeElement, $9bf71ea28793e738$var$activeScope.current) && scopeRef.current)
375
- $9bf71ea28793e738$var$focusFirstInScope(scopeRef.current);
345
+ if (!$9bf71ea28793e738$var$isElementInScope(ownerDocument.activeElement, $9bf71ea28793e738$var$activeScope.current) && scopeRef.current) $9bf71ea28793e738$var$focusFirstInScope(scopeRef.current);
376
346
  }
377
347
  autoFocusRef.current = false;
378
348
  }, [
@@ -381,16 +351,13 @@ function $9bf71ea28793e738$var$useAutoFocus(scopeRef, autoFocus) {
381
351
  }
382
352
  function $9bf71ea28793e738$var$useActiveScopeTracker(scopeRef, restore, contain) {
383
353
  $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
384
- if (restore || contain)
385
- return;
354
+ if (restore || contain) return;
386
355
  let scope = scopeRef.current;
387
356
  const ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(scope ? scope[0] : void 0);
388
357
  let onFocus = (e) => {
389
358
  let target = e.target;
390
- if ($9bf71ea28793e738$var$isElementInScope(target, scopeRef.current))
391
- $9bf71ea28793e738$var$activeScope = scopeRef;
392
- else if (!$9bf71ea28793e738$var$isElementInAnyScope(target))
393
- $9bf71ea28793e738$var$activeScope = null;
359
+ if ($9bf71ea28793e738$var$isElementInScope(target, scopeRef.current)) $9bf71ea28793e738$var$activeScope = scopeRef;
360
+ else if (!$9bf71ea28793e738$var$isElementInAnyScope(target)) $9bf71ea28793e738$var$activeScope = null;
394
361
  };
395
362
  ownerDocument.addEventListener("focusin", onFocus, false);
396
363
  scope === null || scope === void 0 ? void 0 : scope.forEach((element) => element.addEventListener("focusin", onFocus, false));
@@ -407,8 +374,7 @@ function $9bf71ea28793e738$var$useActiveScopeTracker(scopeRef, restore, contain)
407
374
  function $9bf71ea28793e738$var$shouldRestoreFocus(scopeRef) {
408
375
  let scope = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);
409
376
  while (scope && scope.scopeRef !== scopeRef) {
410
- if (scope.nodeToRestore)
411
- return false;
377
+ if (scope.nodeToRestore) return false;
412
378
  scope = scope.parent;
413
379
  }
414
380
  return (scope === null || scope === void 0 ? void 0 : scope.scopeRef) === scopeRef;
@@ -418,11 +384,9 @@ function $9bf71ea28793e738$var$useRestoreFocus(scopeRef, restoreFocus, contain)
418
384
  $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
419
385
  let scope = scopeRef.current;
420
386
  const ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(scope ? scope[0] : void 0);
421
- if (!restoreFocus || contain)
422
- return;
387
+ if (!restoreFocus || contain) return;
423
388
  let onFocus = () => {
424
- if ((!$9bf71ea28793e738$var$activeScope || $9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope, scopeRef)) && $9bf71ea28793e738$var$isElementInScope(ownerDocument.activeElement, scopeRef.current))
425
- $9bf71ea28793e738$var$activeScope = scopeRef;
389
+ if ((!$9bf71ea28793e738$var$activeScope || $9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope, scopeRef)) && $9bf71ea28793e738$var$isElementInScope(ownerDocument.activeElement, scopeRef.current)) $9bf71ea28793e738$var$activeScope = scopeRef;
426
390
  };
427
391
  ownerDocument.addEventListener("focusin", onFocus, false);
428
392
  scope === null || scope === void 0 ? void 0 : scope.forEach((element) => element.addEventListener("focusin", onFocus, false));
@@ -436,17 +400,13 @@ function $9bf71ea28793e738$var$useRestoreFocus(scopeRef, restoreFocus, contain)
436
400
  ]);
437
401
  $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
438
402
  const ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(scopeRef.current ? scopeRef.current[0] : void 0);
439
- if (!restoreFocus)
440
- return;
403
+ if (!restoreFocus) return;
441
404
  let onKeyDown = (e) => {
442
- if (e.key !== "Tab" || e.altKey || e.ctrlKey || e.metaKey || !$9bf71ea28793e738$var$shouldContainFocus(scopeRef) || e.isComposing)
443
- return;
405
+ if (e.key !== "Tab" || e.altKey || e.ctrlKey || e.metaKey || !$9bf71ea28793e738$var$shouldContainFocus(scopeRef) || e.isComposing) return;
444
406
  let focusedElement = ownerDocument.activeElement;
445
- if (!$9bf71ea28793e738$var$isElementInScope(focusedElement, scopeRef.current))
446
- return;
407
+ if (!$9bf71ea28793e738$var$isElementInScope(focusedElement, scopeRef.current)) return;
447
408
  let treeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);
448
- if (!treeNode)
449
- return;
409
+ if (!treeNode) return;
450
410
  let nodeToRestore = treeNode.nodeToRestore;
451
411
  let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(ownerDocument.body, {
452
412
  tabbable: true
@@ -464,19 +424,14 @@ function $9bf71ea28793e738$var$useRestoreFocus(scopeRef, restoreFocus, contain)
464
424
  while ($9bf71ea28793e738$var$isElementInScope(nextElement, scopeRef.current));
465
425
  e.preventDefault();
466
426
  e.stopPropagation();
467
- if (nextElement)
468
- $9bf71ea28793e738$var$focusElement(nextElement, true);
469
- else if (!$9bf71ea28793e738$var$isElementInAnyScope(nodeToRestore))
470
- focusedElement.blur();
471
- else
472
- $9bf71ea28793e738$var$focusElement(nodeToRestore, true);
427
+ if (nextElement) $9bf71ea28793e738$var$focusElement(nextElement, true);
428
+ else if (!$9bf71ea28793e738$var$isElementInAnyScope(nodeToRestore)) focusedElement.blur();
429
+ else $9bf71ea28793e738$var$focusElement(nodeToRestore, true);
473
430
  }
474
431
  };
475
- if (!contain)
476
- ownerDocument.addEventListener("keydown", onKeyDown, true);
432
+ if (!contain) ownerDocument.addEventListener("keydown", onKeyDown, true);
477
433
  return () => {
478
- if (!contain)
479
- ownerDocument.removeEventListener("keydown", onKeyDown, true);
434
+ if (!contain) ownerDocument.removeEventListener("keydown", onKeyDown, true);
480
435
  };
481
436
  }, [
482
437
  scopeRef,
@@ -485,17 +440,14 @@ function $9bf71ea28793e738$var$useRestoreFocus(scopeRef, restoreFocus, contain)
485
440
  ]);
486
441
  $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
487
442
  const ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(scopeRef.current ? scopeRef.current[0] : void 0);
488
- if (!restoreFocus)
489
- return;
443
+ if (!restoreFocus) return;
490
444
  let treeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);
491
- if (!treeNode)
492
- return;
445
+ if (!treeNode) return;
493
446
  var _nodeToRestoreRef_current;
494
447
  treeNode.nodeToRestore = (_nodeToRestoreRef_current = nodeToRestoreRef.current) !== null && _nodeToRestoreRef_current !== void 0 ? _nodeToRestoreRef_current : void 0;
495
448
  return () => {
496
449
  let treeNode2 = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);
497
- if (!treeNode2)
498
- return;
450
+ if (!treeNode2) return;
499
451
  let nodeToRestore = treeNode2.nodeToRestore;
500
452
  if (restoreFocus && nodeToRestore && // eslint-disable-next-line react-hooks/exhaustive-deps
501
453
  ($9bf71ea28793e738$var$isElementInScope(ownerDocument.activeElement, scopeRef.current) || ownerDocument.activeElement === ownerDocument.body && $9bf71ea28793e738$var$shouldRestoreFocus(scopeRef))) {
@@ -532,56 +484,47 @@ function $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, opts, scope) {
532
484
  let walker = $431fbd86ca7dc216$export$b204af158042fbac(root).createTreeWalker(root, NodeFilter.SHOW_ELEMENT, {
533
485
  acceptNode(node) {
534
486
  var _opts_from;
535
- if (opts === null || opts === void 0 ? void 0 : (_opts_from = opts.from) === null || _opts_from === void 0 ? void 0 : _opts_from.contains(node))
536
- return NodeFilter.FILTER_REJECT;
537
- if (node.matches(selector) && $645f2e67b85a24c9$export$e989c0fffaa6b27a(node) && (!scope || $9bf71ea28793e738$var$isElementInScope(node, scope)) && (!(opts === null || opts === void 0 ? void 0 : opts.accept) || opts.accept(node)))
538
- return NodeFilter.FILTER_ACCEPT;
487
+ if (opts === null || opts === void 0 ? void 0 : (_opts_from = opts.from) === null || _opts_from === void 0 ? void 0 : _opts_from.contains(node)) return NodeFilter.FILTER_REJECT;
488
+ if (node.matches(selector) && $645f2e67b85a24c9$export$e989c0fffaa6b27a(node) && (!scope || $9bf71ea28793e738$var$isElementInScope(node, scope)) && (!(opts === null || opts === void 0 ? void 0 : opts.accept) || opts.accept(node))) return NodeFilter.FILTER_ACCEPT;
539
489
  return NodeFilter.FILTER_SKIP;
540
490
  }
541
491
  });
542
- if (opts === null || opts === void 0 ? void 0 : opts.from)
543
- walker.currentNode = opts.from;
492
+ if (opts === null || opts === void 0 ? void 0 : opts.from) walker.currentNode = opts.from;
544
493
  return walker;
545
494
  }
546
495
  function $9bf71ea28793e738$export$c5251b9e124bf29(ref, defaultOptions = {}) {
547
496
  return {
548
497
  focusNext(opts = {}) {
549
498
  let root = ref.current;
550
- if (!root)
551
- return null;
499
+ if (!root) return null;
552
500
  let { from, tabbable = defaultOptions.tabbable, wrap = defaultOptions.wrap, accept = defaultOptions.accept } = opts;
553
501
  let node = from || $431fbd86ca7dc216$export$b204af158042fbac(root).activeElement;
554
502
  let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, {
555
503
  tabbable,
556
504
  accept
557
505
  });
558
- if (root.contains(node))
559
- walker.currentNode = node;
506
+ if (root.contains(node)) walker.currentNode = node;
560
507
  let nextNode = walker.nextNode();
561
508
  if (!nextNode && wrap) {
562
509
  walker.currentNode = root;
563
510
  nextNode = walker.nextNode();
564
511
  }
565
- if (nextNode)
566
- $9bf71ea28793e738$var$focusElement(nextNode, true);
512
+ if (nextNode) $9bf71ea28793e738$var$focusElement(nextNode, true);
567
513
  return nextNode;
568
514
  },
569
515
  focusPrevious(opts = defaultOptions) {
570
516
  let root = ref.current;
571
- if (!root)
572
- return null;
517
+ if (!root) return null;
573
518
  let { from, tabbable = defaultOptions.tabbable, wrap = defaultOptions.wrap, accept = defaultOptions.accept } = opts;
574
519
  let node = from || $431fbd86ca7dc216$export$b204af158042fbac(root).activeElement;
575
520
  let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, {
576
521
  tabbable,
577
522
  accept
578
523
  });
579
- if (root.contains(node))
580
- walker.currentNode = node;
524
+ if (root.contains(node)) walker.currentNode = node;
581
525
  else {
582
526
  let next = $9bf71ea28793e738$var$last(walker);
583
- if (next)
584
- $9bf71ea28793e738$var$focusElement(next, true);
527
+ if (next) $9bf71ea28793e738$var$focusElement(next, true);
585
528
  return next !== null && next !== void 0 ? next : null;
586
529
  }
587
530
  let previousNode = walker.previousNode();
@@ -592,36 +535,31 @@ function $9bf71ea28793e738$export$c5251b9e124bf29(ref, defaultOptions = {}) {
592
535
  return null;
593
536
  previousNode = lastNode;
594
537
  }
595
- if (previousNode)
596
- $9bf71ea28793e738$var$focusElement(previousNode, true);
538
+ if (previousNode) $9bf71ea28793e738$var$focusElement(previousNode, true);
597
539
  return previousNode !== null && previousNode !== void 0 ? previousNode : null;
598
540
  },
599
541
  focusFirst(opts = defaultOptions) {
600
542
  let root = ref.current;
601
- if (!root)
602
- return null;
543
+ if (!root) return null;
603
544
  let { tabbable = defaultOptions.tabbable, accept = defaultOptions.accept } = opts;
604
545
  let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, {
605
546
  tabbable,
606
547
  accept
607
548
  });
608
549
  let nextNode = walker.nextNode();
609
- if (nextNode)
610
- $9bf71ea28793e738$var$focusElement(nextNode, true);
550
+ if (nextNode) $9bf71ea28793e738$var$focusElement(nextNode, true);
611
551
  return nextNode;
612
552
  },
613
553
  focusLast(opts = defaultOptions) {
614
554
  let root = ref.current;
615
- if (!root)
616
- return null;
555
+ if (!root) return null;
617
556
  let { tabbable = defaultOptions.tabbable, accept = defaultOptions.accept } = opts;
618
557
  let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, {
619
558
  tabbable,
620
559
  accept
621
560
  });
622
561
  let next = $9bf71ea28793e738$var$last(walker);
623
- if (next)
624
- $9bf71ea28793e738$var$focusElement(next, true);
562
+ if (next) $9bf71ea28793e738$var$focusElement(next, true);
625
563
  return next !== null && next !== void 0 ? next : null;
626
564
  }
627
565
  };
@@ -631,8 +569,7 @@ function $9bf71ea28793e738$var$last(walker) {
631
569
  let last;
632
570
  do {
633
571
  last = walker.lastChild();
634
- if (last)
635
- next = last;
572
+ if (last) next = last;
636
573
  } while (last);
637
574
  return next;
638
575
  }
@@ -645,52 +582,41 @@ class $9bf71ea28793e738$var$Tree {
645
582
  }
646
583
  addTreeNode(scopeRef, parent, nodeToRestore) {
647
584
  let parentNode = this.fastMap.get(parent !== null && parent !== void 0 ? parent : null);
648
- if (!parentNode)
649
- return;
585
+ if (!parentNode) return;
650
586
  let node = new $9bf71ea28793e738$var$TreeNode({
651
587
  scopeRef
652
588
  });
653
589
  parentNode.addChild(node);
654
590
  node.parent = parentNode;
655
591
  this.fastMap.set(scopeRef, node);
656
- if (nodeToRestore)
657
- node.nodeToRestore = nodeToRestore;
592
+ if (nodeToRestore) node.nodeToRestore = nodeToRestore;
658
593
  }
659
594
  addNode(node) {
660
595
  this.fastMap.set(node.scopeRef, node);
661
596
  }
662
597
  removeTreeNode(scopeRef) {
663
- if (scopeRef === null)
664
- return;
598
+ if (scopeRef === null) return;
665
599
  let node = this.fastMap.get(scopeRef);
666
- if (!node)
667
- return;
600
+ if (!node) return;
668
601
  let parentNode = node.parent;
669
- for (let current of this.traverse())
670
- if (current !== node && node.nodeToRestore && current.nodeToRestore && node.scopeRef && node.scopeRef.current && $9bf71ea28793e738$var$isElementInScope(current.nodeToRestore, node.scopeRef.current))
671
- current.nodeToRestore = node.nodeToRestore;
602
+ for (let current of this.traverse()) if (current !== node && node.nodeToRestore && current.nodeToRestore && node.scopeRef && node.scopeRef.current && $9bf71ea28793e738$var$isElementInScope(current.nodeToRestore, node.scopeRef.current)) current.nodeToRestore = node.nodeToRestore;
672
603
  let children = node.children;
673
604
  if (parentNode) {
674
605
  parentNode.removeChild(node);
675
- if (children.size > 0)
676
- children.forEach((child) => parentNode && parentNode.addChild(child));
606
+ if (children.size > 0) children.forEach((child) => parentNode && parentNode.addChild(child));
677
607
  }
678
608
  this.fastMap.delete(node.scopeRef);
679
609
  }
680
610
  // Pre Order Depth First
681
611
  *traverse(node = this.root) {
682
- if (node.scopeRef != null)
683
- yield node;
684
- if (node.children.size > 0)
685
- for (let child of node.children)
686
- yield* this.traverse(child);
612
+ if (node.scopeRef != null) yield node;
613
+ if (node.children.size > 0) for (let child of node.children) yield* this.traverse(child);
687
614
  }
688
615
  clone() {
689
616
  var _node_parent;
690
617
  let newTree = new $9bf71ea28793e738$var$Tree();
691
618
  var _node_parent_scopeRef;
692
- for (let node of this.traverse())
693
- newTree.addTreeNode(node.scopeRef, (_node_parent_scopeRef = (_node_parent = node.parent) === null || _node_parent === void 0 ? void 0 : _node_parent.scopeRef) !== null && _node_parent_scopeRef !== void 0 ? _node_parent_scopeRef : null, node.nodeToRestore);
619
+ for (let node of this.traverse()) newTree.addTreeNode(node.scopeRef, (_node_parent_scopeRef = (_node_parent = node.parent) === null || _node_parent === void 0 ? void 0 : _node_parent.scopeRef) !== null && _node_parent_scopeRef !== void 0 ? _node_parent_scopeRef : null, node.nodeToRestore);
694
620
  return newTree;
695
621
  }
696
622
  constructor() {