@eightshift/ui-components 0.0.1

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 (112) hide show
  1. package/README.md +27 -0
  2. package/dist/Checkbox-BLcVbhiO.js +178 -0
  3. package/dist/ColorSwatch-Cmlex_kT.js +66 -0
  4. package/dist/FieldError-wtMA4667.js +42 -0
  5. package/dist/FocusScope-1u9yyfIN.js +725 -0
  6. package/dist/Form-Cq3fu75_.js +5 -0
  7. package/dist/GridList-BZPXp3_O.js +1256 -0
  8. package/dist/Group-DyqpTRPe.js +49 -0
  9. package/dist/Input-jsbb4ugq.js +130 -0
  10. package/dist/Label-BPzS-sR7.js +17 -0
  11. package/dist/ListBox-w9gDaJkV.js +4423 -0
  12. package/dist/LiveAnnouncer-IsokfWQ5.js +73 -0
  13. package/dist/NumberFormatter-LzoKy975.js +160 -0
  14. package/dist/RSPContexts-CrNYmadY.js +14 -0
  15. package/dist/Select-49a62830.esm-C-RFtLiD.js +2541 -0
  16. package/dist/SelectionManager-mefd0ThJ.js +2155 -0
  17. package/dist/Separator-DHn0CwdK.js +325 -0
  18. package/dist/Slider-Pyh2V4bY.js +885 -0
  19. package/dist/Text-BM136LvS.js +17 -0
  20. package/dist/VisuallyHidden-BYRI1Lfo.js +51 -0
  21. package/dist/_commonjsHelpers-CUmg6egw.js +6 -0
  22. package/dist/ariaHideOutside-ByKBPHmX.js +113 -0
  23. package/dist/assets/style.css +1 -0
  24. package/dist/button-BkkdyHfJ.js +307 -0
  25. package/dist/components/animated-visibility/animated-visibility.js +7165 -0
  26. package/dist/components/base-control/base-control.js +97 -0
  27. package/dist/components/breakpoint-preview/breakpoint-preview.js +218 -0
  28. package/dist/components/button/button.js +10 -0
  29. package/dist/components/checkbox/checkbox.js +119 -0
  30. package/dist/components/color-pickers/color-picker.js +242 -0
  31. package/dist/components/color-pickers/color-swatch.js +62 -0
  32. package/dist/components/color-pickers/gradient-editor.js +516 -0
  33. package/dist/components/color-pickers/solid-color-picker.js +1633 -0
  34. package/dist/components/component-toggle/component-toggle.js +71 -0
  35. package/dist/components/container-panel/container-panel.js +39 -0
  36. package/dist/components/expandable/expandable.js +144 -0
  37. package/dist/components/input-field/input-field.js +224 -0
  38. package/dist/components/link-input/link-input.js +937 -0
  39. package/dist/components/list-box/list-box.js +152 -0
  40. package/dist/components/matrix-align/matrix-align.js +185 -0
  41. package/dist/components/menu/menu.js +1608 -0
  42. package/dist/components/notice/notice.js +119 -0
  43. package/dist/components/number-picker/number-picker.js +277 -0
  44. package/dist/components/popover/popover.js +9 -0
  45. package/dist/components/radio/radio.js +552 -0
  46. package/dist/components/repeater/repeater-item.js +127 -0
  47. package/dist/components/repeater/repeater.js +248 -0
  48. package/dist/components/responsive/responsive-legacy.js +326 -0
  49. package/dist/components/responsive/responsive.js +499 -0
  50. package/dist/components/responsive-preview/responsive-preview.js +119 -0
  51. package/dist/components/rich-label/rich-label.js +56 -0
  52. package/dist/components/select/async-multi-select.js +144 -0
  53. package/dist/components/select/async-single-select.js +126 -0
  54. package/dist/components/select/custom-select-default-components.js +38 -0
  55. package/dist/components/select/multi-select-components.js +8 -0
  56. package/dist/components/select/multi-select.js +134 -0
  57. package/dist/components/select/react-select-component-wrappers.js +90 -0
  58. package/dist/components/select/shared.js +45 -0
  59. package/dist/components/select/single-select.js +116 -0
  60. package/dist/components/select/styles.js +55 -0
  61. package/dist/components/slider/column-config-slider.js +225 -0
  62. package/dist/components/slider/slider.js +362 -0
  63. package/dist/components/slider/utils.js +45 -0
  64. package/dist/components/spacer/spacer.js +93 -0
  65. package/dist/components/tabs/tabs.js +626 -0
  66. package/dist/components/toggle/switch.js +140 -0
  67. package/dist/components/toggle/toggle.js +58 -0
  68. package/dist/components/toggle-button/toggle-button.js +206 -0
  69. package/dist/components/tooltip/tooltip.js +10 -0
  70. package/dist/context-jMy6xdVq.js +98 -0
  71. package/dist/default-i18n-BhE-OUmt.js +873 -0
  72. package/dist/filterDOMProps-DG2RfOUr.js +30 -0
  73. package/dist/focusSafely-C3K8zAKj.js +743 -0
  74. package/dist/hooks/use-cell-edit-mode.js +35 -0
  75. package/dist/icons/block-icon.js +42 -0
  76. package/dist/icons/generic-color-swatch.js +21 -0
  77. package/dist/icons/icons.js +3636 -0
  78. package/dist/index-Bfb9bWcb.js +28844 -0
  79. package/dist/index-a301f526.esm-Bioi4cGX.js +3576 -0
  80. package/dist/index.js +109 -0
  81. package/dist/intlStrings-CUhoK9EN.js +2484 -0
  82. package/dist/isScrollable-PcyglExV.js +10 -0
  83. package/dist/modifiers.esm-BuJQPI1X.js +31 -0
  84. package/dist/multi-select-components-CjVpCNko.js +3677 -0
  85. package/dist/number-rWqELA8W.js +39 -0
  86. package/dist/popover-Dx3vKXUX.js +1061 -0
  87. package/dist/react-select-async.esm-TFb_ZX6C.js +111 -0
  88. package/dist/react-select.esm-BjRWqf0E.js +15 -0
  89. package/dist/style.js +1 -0
  90. package/dist/textSelection-BosCCRVE.js +89 -0
  91. package/dist/tooltip-CkCndvTI.js +1094 -0
  92. package/dist/useButton-CuG5UzUw.js +74 -0
  93. package/dist/useEvent-DHv-yhOH.js +24 -0
  94. package/dist/useFocusRing-Cc-4eouh.js +41 -0
  95. package/dist/useFocusable-5q1Gek1J.js +81 -0
  96. package/dist/useFormReset-Buc9YJcv.js +23 -0
  97. package/dist/useFormValidationState-BAPPNXic.js +238 -0
  98. package/dist/useHasTabbableChild-D3uUNhJ0.js +37 -0
  99. package/dist/useLabel-CGlkoFG0.js +28 -0
  100. package/dist/useLabels-Dg62M_3P.js +25 -0
  101. package/dist/useListData-BelKu4kx.js +211 -0
  102. package/dist/useListState-Domq0blV.js +137 -0
  103. package/dist/useLocalizedStringFormatter-Prmz0h0A.js +130 -0
  104. package/dist/useNumberFieldState-BLU3uhSR.js +1253 -0
  105. package/dist/useNumberFormatter-BLc2xjZn.js +13 -0
  106. package/dist/usePress-BQgVor4T.js +698 -0
  107. package/dist/useToggle-C9ETOBaZ.js +58 -0
  108. package/dist/useToggleState-DJ_z5E2S.js +21 -0
  109. package/dist/utilities/classnames.js +16 -0
  110. package/dist/utilities/text-helpers.js +79 -0
  111. package/dist/utils-BsiH7-5Y.js +488 -0
  112. package/package.json +71 -0
@@ -0,0 +1,58 @@
1
+ import { d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-BsiH7-5Y.js";
2
+ import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-DG2RfOUr.js";
3
+ import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-Buc9YJcv.js";
4
+ import { $ as $e6afbd83fe6ebbd2$export$4c014de7c8940b4c } from "./useFocusable-5q1Gek1J.js";
5
+ import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "./usePress-BQgVor4T.js";
6
+ function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
7
+ let { isDisabled = false, isReadOnly = false, value, name, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, validationState = "valid", isInvalid } = props;
8
+ let onChange = (e) => {
9
+ e.stopPropagation();
10
+ state.setSelected(e.target.checked);
11
+ };
12
+ let hasChildren = children != null;
13
+ let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;
14
+ if (!hasChildren && !hasAriaLabel)
15
+ console.warn("If you do not provide children, you must specify an aria-label for accessibility");
16
+ let { pressProps, isPressed } = $f6c31cce2adf654f$export$45712eceda6fad21({
17
+ isDisabled
18
+ });
19
+ let { pressProps: labelProps, isPressed: isLabelPressed } = $f6c31cce2adf654f$export$45712eceda6fad21({
20
+ isDisabled: isDisabled || isReadOnly,
21
+ onPress() {
22
+ state.toggle();
23
+ }
24
+ });
25
+ let { focusableProps } = $e6afbd83fe6ebbd2$export$4c014de7c8940b4c(props, ref);
26
+ let interactions = $3ef42575df84b30b$export$9d1611c77c2fe928(pressProps, focusableProps);
27
+ let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
28
+ labelable: true
29
+ });
30
+ $99facab73266f662$export$5add1d006293d136(ref, state.isSelected, state.setSelected);
31
+ return {
32
+ labelProps: $3ef42575df84b30b$export$9d1611c77c2fe928(labelProps, {
33
+ onClick: (e) => e.preventDefault()
34
+ }),
35
+ inputProps: $3ef42575df84b30b$export$9d1611c77c2fe928(domProps, {
36
+ "aria-invalid": isInvalid || validationState === "invalid" || void 0,
37
+ "aria-errormessage": props["aria-errormessage"],
38
+ "aria-controls": props["aria-controls"],
39
+ "aria-readonly": isReadOnly || void 0,
40
+ onChange,
41
+ disabled: isDisabled,
42
+ ...value == null ? {} : {
43
+ value
44
+ },
45
+ name,
46
+ type: "checkbox",
47
+ ...interactions
48
+ }),
49
+ isSelected: state.isSelected,
50
+ isPressed: isPressed || isLabelPressed,
51
+ isDisabled,
52
+ isReadOnly,
53
+ isInvalid: isInvalid || validationState === "invalid"
54
+ };
55
+ }
56
+ export {
57
+ $d2c8e2b0480f3f34$export$cbe85ee05b554577 as $
58
+ };
@@ -0,0 +1,21 @@
1
+ import { e as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./focusSafely-C3K8zAKj.js";
2
+ function $3017fa7ffdddec74$export$8042c6c013fd5226(props = {}) {
3
+ let { isReadOnly } = props;
4
+ let [isSelected, setSelected] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(props.isSelected, props.defaultSelected || false, props.onChange);
5
+ function updateSelected(value) {
6
+ if (!isReadOnly)
7
+ setSelected(value);
8
+ }
9
+ function toggleState() {
10
+ if (!isReadOnly)
11
+ setSelected(!isSelected);
12
+ }
13
+ return {
14
+ isSelected,
15
+ setSelected: updateSelected,
16
+ toggle: toggleState
17
+ };
18
+ }
19
+ export {
20
+ $3017fa7ffdddec74$export$8042c6c013fd5226 as $
21
+ };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Filters out falsy items and returns everything joined with a string.
3
+ * @since 8.0.0
4
+ *
5
+ * @param {...string} args - Classnames to process.
6
+ *
7
+ * @returns Filtered classnames separated with a space.
8
+ *
9
+ * @preserve
10
+ */
11
+ const classnames = (...args) => {
12
+ return args.filter(Boolean).join(" ");
13
+ };
14
+ export {
15
+ classnames
16
+ };
@@ -0,0 +1,79 @@
1
+ var stringCamelCase = camelCase$1;
2
+ var wordSeparatorsRegEx = /[\s\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,\-.\/:;<=>?@\[\]^_`{|}~]+/;
3
+ var basicCamelRegEx = /^[a-z\u00E0-\u00FCA-Z\u00C0-\u00DC][\d|a-z\u00E0-\u00FCA-Z\u00C0-\u00DC]*$/;
4
+ var fourOrMoreConsecutiveCapsRegEx = /([A-Z\u00C0-\u00DC]{4,})/g;
5
+ var allCapsRegEx = /^[A-Z\u00C0-\u00DC]+$/;
6
+ function camelCase$1(str) {
7
+ var words = str.split(wordSeparatorsRegEx);
8
+ var len = words.length;
9
+ var mappedWords = new Array(len);
10
+ for (var i = 0; i < len; i++) {
11
+ var word = words[i];
12
+ if (word === "") {
13
+ continue;
14
+ }
15
+ var isCamelCase = basicCamelRegEx.test(word) && !allCapsRegEx.test(word);
16
+ if (isCamelCase) {
17
+ word = word.replace(fourOrMoreConsecutiveCapsRegEx, function(match, p1, offset) {
18
+ return deCap(match, word.length - offset - match.length == 0);
19
+ });
20
+ }
21
+ var firstLetter = word[0];
22
+ firstLetter = i > 0 ? firstLetter.toUpperCase() : firstLetter.toLowerCase();
23
+ mappedWords[i] = firstLetter + (!isCamelCase ? word.slice(1).toLowerCase() : word.slice(1));
24
+ }
25
+ return mappedWords.join("");
26
+ }
27
+ function deCap(match, endOfWord) {
28
+ var arr = match.split("");
29
+ var first = arr.shift().toUpperCase();
30
+ var last = endOfWord ? arr.pop().toLowerCase() : arr.pop();
31
+ return first + arr.join("").toLowerCase() + last;
32
+ }
33
+ /**
34
+ * Returns the string with its first character converted to uppercase.
35
+ *
36
+ * @param {string} string - String to convert.
37
+ *
38
+ * @return {string} string with its first character converted to uppercase.
39
+ *
40
+ * @example
41
+ * upperFirst('new super Test-title') // => 'New super Test-title'
42
+ *
43
+ * @preserve
44
+ */
45
+ const upperFirst = (string) => string ? string.charAt(0).toUpperCase() + string.slice(1) : "";
46
+ /**
47
+ * Returns a camelCase-formatted string.
48
+ *
49
+ * @param {string} input - String to convert.
50
+ *
51
+ * @access public
52
+ *
53
+ * @return {string} *camelCase*-formatted string.
54
+ *
55
+ * @example
56
+ * camelCase('New super Test-title') // => 'newSuperTestTitle'
57
+ * camelCase(null) // => ''
58
+ *
59
+ * @preserve
60
+ */
61
+ const camelCase = (input) => lowerFirst(stringCamelCase(input ?? ""));
62
+ /**
63
+ * Returns the string with its first character converted to lowercase.
64
+ *
65
+ * @param {string} string - String to convert.
66
+ *
67
+ * @return {string} string with its first character converted to lowercase.
68
+ *
69
+ * @example
70
+ * lowerFirst('New super Test-title') // => 'new super Test-title'
71
+ *
72
+ * @preserve
73
+ */
74
+ const lowerFirst = (string) => string ? string.charAt(0).toLowerCase() + string.slice(1) : "";
75
+ export {
76
+ camelCase,
77
+ lowerFirst,
78
+ upperFirst
79
+ };
@@ -0,0 +1,488 @@
1
+ import React__default, { useRef, useCallback, useState, useContext, useEffect, useMemo, createContext } from "react";
2
+ import { $ as $dbSRa$reactdom } from "./index-Bfb9bWcb.js";
3
+ const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== "undefined" ? React__default.useLayoutEffect : () => {
4
+ };
5
+ function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {
6
+ const ref = useRef(null);
7
+ $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
8
+ ref.current = fn;
9
+ }, [
10
+ fn
11
+ ]);
12
+ return useCallback((...args) => {
13
+ const f = ref.current;
14
+ return f === null || f === void 0 ? void 0 : f(...args);
15
+ }, []);
16
+ }
17
+ function $1dbecbe27a04f9af$export$14d238f342723f25(defaultValue) {
18
+ let [value, setValue] = useState(defaultValue);
19
+ let effect = useRef(null);
20
+ let nextRef = $8ae05eaa5c114e9c$export$7f54fc3180508a52(() => {
21
+ if (!effect.current)
22
+ return;
23
+ let newValue = effect.current.next();
24
+ if (newValue.done) {
25
+ effect.current = null;
26
+ return;
27
+ }
28
+ if (value === newValue.value)
29
+ nextRef();
30
+ else
31
+ setValue(newValue.value);
32
+ });
33
+ $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
34
+ if (effect.current)
35
+ nextRef();
36
+ });
37
+ let queue = $8ae05eaa5c114e9c$export$7f54fc3180508a52((fn) => {
38
+ effect.current = fn(value);
39
+ nextRef();
40
+ });
41
+ return [
42
+ value,
43
+ queue
44
+ ];
45
+ }
46
+ const $b5e257d569688ac6$var$defaultContext = {
47
+ prefix: String(Math.round(Math.random() * 1e10)),
48
+ current: 0
49
+ };
50
+ const $b5e257d569688ac6$var$SSRContext = /* @__PURE__ */ React__default.createContext($b5e257d569688ac6$var$defaultContext);
51
+ const $b5e257d569688ac6$var$IsSSRContext = /* @__PURE__ */ React__default.createContext(false);
52
+ let $b5e257d569688ac6$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
53
+ let $b5e257d569688ac6$var$componentIds = /* @__PURE__ */ new WeakMap();
54
+ function $b5e257d569688ac6$var$useCounter(isDisabled = false) {
55
+ let ctx = useContext($b5e257d569688ac6$var$SSRContext);
56
+ let ref = useRef(null);
57
+ if (ref.current === null && !isDisabled) {
58
+ var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
59
+ let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = React__default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === void 0 ? void 0 : (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner = _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner === void 0 ? void 0 : _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner.current;
60
+ if (currentOwner) {
61
+ let prevComponentValue = $b5e257d569688ac6$var$componentIds.get(currentOwner);
62
+ if (prevComponentValue == null)
63
+ $b5e257d569688ac6$var$componentIds.set(currentOwner, {
64
+ id: ctx.current,
65
+ state: currentOwner.memoizedState
66
+ });
67
+ else if (currentOwner.memoizedState !== prevComponentValue.state) {
68
+ ctx.current = prevComponentValue.id;
69
+ $b5e257d569688ac6$var$componentIds.delete(currentOwner);
70
+ }
71
+ }
72
+ ref.current = ++ctx.current;
73
+ }
74
+ return ref.current;
75
+ }
76
+ function $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {
77
+ let ctx = useContext($b5e257d569688ac6$var$SSRContext);
78
+ if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM)
79
+ console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
80
+ let counter = $b5e257d569688ac6$var$useCounter(!!defaultId);
81
+ let prefix = ctx === $b5e257d569688ac6$var$defaultContext && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${ctx.prefix}`;
82
+ return defaultId || `${prefix}-${counter}`;
83
+ }
84
+ function $b5e257d569688ac6$var$useModernSSRSafeId(defaultId) {
85
+ let id = React__default.useId();
86
+ let [didSSR] = useState($b5e257d569688ac6$export$535bd6ca7f90a273());
87
+ let prefix = didSSR || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;
88
+ return defaultId || `${prefix}-${id}`;
89
+ }
90
+ const $b5e257d569688ac6$export$619500959fc48b26 = typeof React__default["useId"] === "function" ? $b5e257d569688ac6$var$useModernSSRSafeId : $b5e257d569688ac6$var$useLegacySSRSafeId;
91
+ function $b5e257d569688ac6$var$getSnapshot() {
92
+ return false;
93
+ }
94
+ function $b5e257d569688ac6$var$getServerSnapshot() {
95
+ return true;
96
+ }
97
+ function $b5e257d569688ac6$var$subscribe(onStoreChange) {
98
+ return () => {
99
+ };
100
+ }
101
+ function $b5e257d569688ac6$export$535bd6ca7f90a273() {
102
+ if (typeof React__default["useSyncExternalStore"] === "function")
103
+ return React__default["useSyncExternalStore"]($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot);
104
+ return useContext($b5e257d569688ac6$var$IsSSRContext);
105
+ }
106
+ let $bdb11010cef70236$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
107
+ let $bdb11010cef70236$var$idsUpdaterMap = /* @__PURE__ */ new Map();
108
+ function $bdb11010cef70236$export$f680877a34711e37(defaultId) {
109
+ let [value, setValue] = useState(defaultId);
110
+ let nextId = useRef(null);
111
+ let res = $b5e257d569688ac6$export$619500959fc48b26(value);
112
+ let updateValue = useCallback((val) => {
113
+ nextId.current = val;
114
+ }, []);
115
+ if ($bdb11010cef70236$var$canUseDOM)
116
+ $bdb11010cef70236$var$idsUpdaterMap.set(res, updateValue);
117
+ $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
118
+ let r2 = res;
119
+ return () => {
120
+ $bdb11010cef70236$var$idsUpdaterMap.delete(r2);
121
+ };
122
+ }, [
123
+ res
124
+ ]);
125
+ useEffect(() => {
126
+ let newId = nextId.current;
127
+ if (newId) {
128
+ nextId.current = null;
129
+ setValue(newId);
130
+ }
131
+ });
132
+ return res;
133
+ }
134
+ function $bdb11010cef70236$export$cd8c9cb68f842629(idA, idB) {
135
+ if (idA === idB)
136
+ return idA;
137
+ let setIdA = $bdb11010cef70236$var$idsUpdaterMap.get(idA);
138
+ if (setIdA) {
139
+ setIdA(idB);
140
+ return idB;
141
+ }
142
+ let setIdB = $bdb11010cef70236$var$idsUpdaterMap.get(idB);
143
+ if (setIdB) {
144
+ setIdB(idA);
145
+ return idA;
146
+ }
147
+ return idB;
148
+ }
149
+ function $bdb11010cef70236$export$b4cc09c592e8fdb8(depArray = []) {
150
+ let id = $bdb11010cef70236$export$f680877a34711e37();
151
+ let [resolvedId, setResolvedId] = $1dbecbe27a04f9af$export$14d238f342723f25(id);
152
+ let updateId = useCallback(() => {
153
+ setResolvedId(function* () {
154
+ yield id;
155
+ yield document.getElementById(id) ? id : void 0;
156
+ });
157
+ }, [
158
+ id,
159
+ setResolvedId
160
+ ]);
161
+ $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(updateId, [
162
+ id,
163
+ updateId,
164
+ ...depArray
165
+ ]);
166
+ return resolvedId;
167
+ }
168
+ function $ff5963eb1fccf552$export$e08e3b67e392101e(...callbacks) {
169
+ return (...args) => {
170
+ for (let callback of callbacks)
171
+ if (typeof callback === "function")
172
+ callback(...args);
173
+ };
174
+ }
175
+ function r(e) {
176
+ var t, f, n = "";
177
+ if ("string" == typeof e || "number" == typeof e)
178
+ n += e;
179
+ else if ("object" == typeof e)
180
+ if (Array.isArray(e)) {
181
+ var o = e.length;
182
+ for (t = 0; t < o; t++)
183
+ e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
184
+ } else
185
+ for (f in e)
186
+ e[f] && (n && (n += " "), n += f);
187
+ return n;
188
+ }
189
+ function clsx() {
190
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++)
191
+ (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
192
+ return n;
193
+ }
194
+ function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
195
+ let result = {
196
+ ...args[0]
197
+ };
198
+ for (let i = 1; i < args.length; i++) {
199
+ let props = args[i];
200
+ for (let key in props) {
201
+ let a = result[key];
202
+ let b = props[key];
203
+ if (typeof a === "function" && typeof b === "function" && // This is a lot faster than a regex.
204
+ key[0] === "o" && key[1] === "n" && key.charCodeAt(2) >= /* 'A' */
205
+ 65 && key.charCodeAt(2) <= /* 'Z' */
206
+ 90)
207
+ result[key] = $ff5963eb1fccf552$export$e08e3b67e392101e(a, b);
208
+ else if ((key === "className" || key === "UNSAFE_className") && typeof a === "string" && typeof b === "string")
209
+ result[key] = clsx(a, b);
210
+ else if (key === "id" && a && b)
211
+ result.id = $bdb11010cef70236$export$cd8c9cb68f842629(a, b);
212
+ else
213
+ result[key] = b !== void 0 ? b : a;
214
+ }
215
+ }
216
+ return result;
217
+ }
218
+ function $5dc95899b306f630$export$c9058316764c140e(...refs) {
219
+ if (refs.length === 1)
220
+ return refs[0];
221
+ return (value) => {
222
+ for (let ref of refs) {
223
+ if (typeof ref === "function")
224
+ ref(value);
225
+ else if (ref != null)
226
+ ref.current = value;
227
+ }
228
+ };
229
+ }
230
+ function $df56164dff5785e2$export$4338b53315abf666(forwardedRef) {
231
+ const objRef = useRef(null);
232
+ return useMemo(() => ({
233
+ get current() {
234
+ return objRef.current;
235
+ },
236
+ set current(value) {
237
+ objRef.current = value;
238
+ if (typeof forwardedRef === "function")
239
+ forwardedRef(value);
240
+ else if (forwardedRef)
241
+ forwardedRef.current = value;
242
+ }
243
+ }), [
244
+ forwardedRef
245
+ ]);
246
+ }
247
+ const $64fa3d84918910a7$export$c62b8e45d58ddad9 = Symbol("default");
248
+ function $64fa3d84918910a7$export$2881499e37b75b9a({ values, children }) {
249
+ for (let [Context, value] of values)
250
+ children = /* @__PURE__ */ React__default.createElement(Context.Provider, {
251
+ value
252
+ }, children);
253
+ return children;
254
+ }
255
+ function $64fa3d84918910a7$export$4d86445c2cf5e3(props) {
256
+ let { className, style, children, defaultClassName, defaultChildren, defaultStyle, values } = props;
257
+ return useMemo(() => {
258
+ let computedClassName;
259
+ let computedStyle;
260
+ let computedChildren;
261
+ if (typeof className === "function")
262
+ computedClassName = className({
263
+ ...values,
264
+ defaultClassName
265
+ });
266
+ else
267
+ computedClassName = className;
268
+ if (typeof style === "function")
269
+ computedStyle = style({
270
+ ...values,
271
+ defaultStyle: defaultStyle || {}
272
+ });
273
+ else
274
+ computedStyle = style;
275
+ if (typeof children === "function")
276
+ computedChildren = children({
277
+ ...values,
278
+ defaultChildren
279
+ });
280
+ else if (children == null)
281
+ computedChildren = defaultChildren;
282
+ else
283
+ computedChildren = children;
284
+ return {
285
+ className: computedClassName !== null && computedClassName !== void 0 ? computedClassName : defaultClassName,
286
+ style: computedStyle || defaultStyle ? {
287
+ ...defaultStyle,
288
+ ...computedStyle
289
+ } : void 0,
290
+ children: computedChildren !== null && computedChildren !== void 0 ? computedChildren : defaultChildren,
291
+ "data-rac": ""
292
+ };
293
+ }, [
294
+ className,
295
+ style,
296
+ children,
297
+ defaultClassName,
298
+ defaultChildren,
299
+ defaultStyle,
300
+ values
301
+ ]);
302
+ }
303
+ function $64fa3d84918910a7$export$fabf2dc03a41866e(context, slot) {
304
+ let ctx = useContext(context);
305
+ if (slot === null)
306
+ return null;
307
+ if (ctx && typeof ctx === "object" && "slots" in ctx && ctx.slots) {
308
+ let availableSlots = new Intl.ListFormat().format(Object.keys(ctx.slots).map((p) => `"${p}"`));
309
+ if (!slot && !ctx.slots[$64fa3d84918910a7$export$c62b8e45d58ddad9])
310
+ throw new Error(`A slot prop is required. Valid slot names are ${availableSlots}.`);
311
+ let slotKey = slot || $64fa3d84918910a7$export$c62b8e45d58ddad9;
312
+ if (!ctx.slots[slotKey])
313
+ throw new Error(`Invalid slot "${slot}". Valid slot names are ${availableSlots}.`);
314
+ return ctx.slots[slotKey];
315
+ }
316
+ return ctx;
317
+ }
318
+ function $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, context) {
319
+ let ctx = $64fa3d84918910a7$export$fabf2dc03a41866e(context, props.slot) || {};
320
+ let { ref: contextRef, ...contextProps } = ctx;
321
+ let mergedRef = $df56164dff5785e2$export$4338b53315abf666(useMemo(() => $5dc95899b306f630$export$c9058316764c140e(ref, contextRef), [
322
+ ref,
323
+ contextRef
324
+ ]));
325
+ let mergedProps = $3ef42575df84b30b$export$9d1611c77c2fe928(contextProps, props);
326
+ if ("style" in contextProps && contextProps.style && "style" in props && props.style) {
327
+ if (typeof contextProps.style === "function" || typeof props.style === "function")
328
+ mergedProps.style = (renderProps) => {
329
+ let contextStyle = typeof contextProps.style === "function" ? contextProps.style(renderProps) : contextProps.style;
330
+ let defaultStyle = {
331
+ ...renderProps.defaultStyle,
332
+ ...contextStyle
333
+ };
334
+ let style = typeof props.style === "function" ? props.style({
335
+ ...renderProps,
336
+ defaultStyle
337
+ }) : props.style;
338
+ return {
339
+ ...defaultStyle,
340
+ ...style
341
+ };
342
+ };
343
+ else
344
+ mergedProps.style = {
345
+ ...contextProps.style,
346
+ ...props.style
347
+ };
348
+ }
349
+ return [
350
+ mergedProps,
351
+ mergedRef
352
+ ];
353
+ }
354
+ function $64fa3d84918910a7$export$9d4c57ee4c6ffdd8() {
355
+ let [hasSlot, setHasSlot] = useState(true);
356
+ let hasRun = useRef(false);
357
+ let ref = useCallback((el) => {
358
+ hasRun.current = true;
359
+ setHasSlot(!!el);
360
+ }, []);
361
+ $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
362
+ if (!hasRun.current)
363
+ setHasSlot(false);
364
+ }, []);
365
+ return [
366
+ ref,
367
+ hasSlot
368
+ ];
369
+ }
370
+ function $64fa3d84918910a7$export$6d3443f2c48bfc20(ref, isReady = true) {
371
+ let [isEntering, setEntering] = useState(true);
372
+ $64fa3d84918910a7$var$useAnimation(ref, isEntering && isReady, useCallback(() => setEntering(false), []));
373
+ return isEntering && isReady;
374
+ }
375
+ function $64fa3d84918910a7$export$45fda7c47f93fd48(ref, isOpen) {
376
+ let [isExiting, setExiting] = useState(false);
377
+ let [exitState, setExitState] = useState("idle");
378
+ if (!isOpen && ref.current && exitState === "idle") {
379
+ isExiting = true;
380
+ setExiting(true);
381
+ setExitState("exiting");
382
+ }
383
+ if (!ref.current && exitState === "exited")
384
+ setExitState("idle");
385
+ $64fa3d84918910a7$var$useAnimation(ref, isExiting, useCallback(() => {
386
+ setExitState("exited");
387
+ setExiting(false);
388
+ }, []));
389
+ return isExiting;
390
+ }
391
+ function $64fa3d84918910a7$var$useAnimation(ref, isActive, onEnd) {
392
+ let prevAnimation = useRef(null);
393
+ if (isActive && ref.current)
394
+ prevAnimation.current = window.getComputedStyle(ref.current).animation;
395
+ $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
396
+ if (isActive && ref.current) {
397
+ let computedStyle = window.getComputedStyle(ref.current);
398
+ if (computedStyle.animationName && computedStyle.animationName !== "none" && computedStyle.animation !== prevAnimation.current) {
399
+ let onAnimationEnd = (e) => {
400
+ if (e.target === ref.current) {
401
+ element.removeEventListener("animationend", onAnimationEnd);
402
+ $dbSRa$reactdom.flushSync(() => {
403
+ onEnd();
404
+ });
405
+ }
406
+ };
407
+ let element = ref.current;
408
+ element.addEventListener("animationend", onAnimationEnd);
409
+ return () => {
410
+ element.removeEventListener("animationend", onAnimationEnd);
411
+ };
412
+ } else
413
+ onEnd();
414
+ }
415
+ }, [
416
+ ref,
417
+ isActive,
418
+ onEnd
419
+ ]);
420
+ }
421
+ if (typeof HTMLTemplateElement !== "undefined") {
422
+ const getFirstChild = Object.getOwnPropertyDescriptor(Node.prototype, "firstChild").get;
423
+ Object.defineProperty(HTMLTemplateElement.prototype, "firstChild", {
424
+ configurable: true,
425
+ enumerable: true,
426
+ get: function() {
427
+ if (this.dataset.reactAriaHidden)
428
+ return this.content.firstChild;
429
+ else
430
+ return getFirstChild.call(this);
431
+ }
432
+ });
433
+ }
434
+ const $64fa3d84918910a7$export$94b6d0abf7d33e8c = /* @__PURE__ */ createContext(false);
435
+ const $64fa3d84918910a7$var$hiddenFragment = typeof DocumentFragment !== "undefined" ? new DocumentFragment() : null;
436
+ function $64fa3d84918910a7$export$8dc98ba7eadeaa56(props) {
437
+ let isHidden = useContext($64fa3d84918910a7$export$94b6d0abf7d33e8c);
438
+ let isSSR = $b5e257d569688ac6$export$535bd6ca7f90a273();
439
+ if (isHidden)
440
+ return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, props.children);
441
+ let children = /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$94b6d0abf7d33e8c.Provider, {
442
+ value: true
443
+ }, props.children);
444
+ return isSSR ? /* @__PURE__ */ React__default.createElement("template", {
445
+ "data-react-aria-hidden": true
446
+ }, children) : /* @__PURE__ */ $dbSRa$reactdom.createPortal(children, $64fa3d84918910a7$var$hiddenFragment);
447
+ }
448
+ function $64fa3d84918910a7$export$86427a43e3e48ebb(fn) {
449
+ let Wrapper = (props, ref) => {
450
+ let isHidden = useContext($64fa3d84918910a7$export$94b6d0abf7d33e8c);
451
+ if (isHidden)
452
+ return null;
453
+ return fn(props, ref);
454
+ };
455
+ Wrapper.displayName = fn.displayName || fn.name;
456
+ return React__default.forwardRef(Wrapper);
457
+ }
458
+ function $64fa3d84918910a7$export$ef03459518577ad4(props) {
459
+ const prefix = /^(data-.*)$/;
460
+ let filteredProps = {};
461
+ for (const prop in props)
462
+ if (!prefix.test(prop))
463
+ filteredProps[prop] = props[prop];
464
+ return filteredProps;
465
+ }
466
+ export {
467
+ $64fa3d84918910a7$export$fabf2dc03a41866e as $,
468
+ $64fa3d84918910a7$export$29f1550f4b0d4415 as a,
469
+ $64fa3d84918910a7$export$86427a43e3e48ebb as b,
470
+ $64fa3d84918910a7$export$4d86445c2cf5e3 as c,
471
+ $3ef42575df84b30b$export$9d1611c77c2fe928 as d,
472
+ $bdb11010cef70236$export$f680877a34711e37 as e,
473
+ $8ae05eaa5c114e9c$export$7f54fc3180508a52 as f,
474
+ $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c as g,
475
+ $64fa3d84918910a7$export$9d4c57ee4c6ffdd8 as h,
476
+ $64fa3d84918910a7$export$ef03459518577ad4 as i,
477
+ $64fa3d84918910a7$export$2881499e37b75b9a as j,
478
+ $bdb11010cef70236$export$b4cc09c592e8fdb8 as k,
479
+ $df56164dff5785e2$export$4338b53315abf666 as l,
480
+ $5dc95899b306f630$export$c9058316764c140e as m,
481
+ $ff5963eb1fccf552$export$e08e3b67e392101e as n,
482
+ $b5e257d569688ac6$export$535bd6ca7f90a273 as o,
483
+ $64fa3d84918910a7$export$8dc98ba7eadeaa56 as p,
484
+ $64fa3d84918910a7$export$45fda7c47f93fd48 as q,
485
+ $64fa3d84918910a7$export$6d3443f2c48bfc20 as r,
486
+ $64fa3d84918910a7$export$c62b8e45d58ddad9 as s,
487
+ $64fa3d84918910a7$export$94b6d0abf7d33e8c as t
488
+ };