@eightshift/ui-components 7.2.1 → 7.3.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.
- package/dist/Autocomplete-pLMPWMFq.js +451 -0
- package/dist/Button-Biwg7zwt.js +223 -0
- package/dist/Dialog-C1sh8jbh.js +2474 -0
- package/dist/{Disclosure-NYWFw9RJ.js → Disclosure-B_SHgiUz.js} +50 -51
- package/dist/FocusScope-lGkM8AO8.js +734 -0
- package/dist/Form-BxIJCHYd.js +5 -0
- package/dist/Heading-B2EsUuu6.js +16 -0
- package/dist/{Hidden-8TB37dpK.js → Hidden-DYY00jLm.js} +10 -10
- package/dist/I18nProvider-Cm6dj5jY.js +93 -0
- package/dist/Label-B1TkoVOG.js +17 -0
- package/dist/ListBox-BquE0m8z.js +584 -0
- package/dist/{NumberFormatter-m5VW6MTK.js → NumberFormatter-JHF0Tadk.js} +24 -26
- package/dist/PortalProvider-BYcv24il.js +13 -0
- package/dist/RadioGroup-BxjLooWU.js +324 -0
- package/dist/SearchField-BkAU0HLm.js +322 -0
- package/dist/SelectionIndicator-Bx_EYBXD.js +13 -0
- package/dist/{Slider-DW1RuMVp.js → Slider-DSv6fyZ6.js} +321 -363
- package/dist/Text-C8pfwn0W.js +16 -0
- package/dist/{VisuallyHidden-CfsnJHZb.js → VisuallyHidden-KcXlGa5p.js} +12 -12
- package/dist/{animation-Bd2peown.js → animation-BJ-2VKdB.js} +12 -12
- package/dist/assets/style-admin.css +1 -1
- package/dist/assets/style-editor.css +1 -1
- package/dist/assets/style.css +1 -1
- package/dist/{button-D9cbyHeZ.js → button-CawAzlko.js} +21 -73
- package/dist/{checkbox-BO5RZmO8.js → checkbox-t7VrqXv2.js} +59 -62
- package/dist/{color-swatch-D2ZBkuTt.js → color-swatch-gU09x9Ga.js} +417 -414
- package/dist/components/base-control/base-control.js +2 -2
- package/dist/components/base-control/container.js +1 -1
- package/dist/components/breakpoint-preview/breakpoint-preview.js +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/color-pickers/color-picker.js +2 -2
- package/dist/components/color-pickers/color-swatch.js +1 -1
- package/dist/components/color-pickers/gradient-editor.js +1 -1
- package/dist/components/color-pickers/solid-color-picker.js +1 -1
- package/dist/components/component-toggle/component-toggle.js +4 -4
- package/dist/components/container-panel/container-panel.js +5 -5
- package/dist/components/draggable/draggable-handle.js +1 -1
- package/dist/components/draggable/draggable.js +1 -1
- package/dist/components/draggable-list/draggable-list-item.js +1 -1
- package/dist/components/draggable-list/draggable-list.js +2 -2
- package/dist/components/expandable/expandable.js +7 -7
- package/dist/components/index.js +15 -15
- package/dist/components/input-field/input-field.js +1 -1
- package/dist/components/item-collection/item-collection.js +1 -1
- package/dist/components/link-input/link-input.js +1 -1
- package/dist/components/matrix-align/matrix-align.js +5 -5
- package/dist/components/menu/menu.js +11 -11
- package/dist/components/modal/modal.js +1 -1
- package/dist/components/number-picker/number-picker.js +1 -1
- package/dist/components/option-select/option-select.js +3 -3
- package/dist/components/options-panel/options-panel.js +3 -3
- package/dist/components/placeholders/file-picker-shell.js +1 -1
- package/dist/components/placeholders/file-placeholder.js +1 -1
- package/dist/components/popover/popover.js +6 -6
- package/dist/components/portal-provider/portal-provider.js +2 -2
- package/dist/components/radio/radio.js +9 -9
- package/dist/components/repeater/repeater-item.js +2 -2
- package/dist/components/repeater/repeater.js +3 -3
- package/dist/components/responsive/mini-responsive.js +6 -6
- package/dist/components/responsive/responsive-legacy.js +5 -5
- package/dist/components/responsive/responsive.js +5 -5
- package/dist/components/responsive-preview/responsive-preview.js +2 -2
- package/dist/components/select/async-multi-select.js +27 -26
- package/dist/components/select/async-select.js +27 -26
- package/dist/components/select/multi-select.js +33 -32
- package/dist/components/select/shared.js +1 -1
- package/dist/components/select/single-select.js +33 -32
- package/dist/components/select/styles.js +1 -1
- package/dist/components/slider/column-config-slider.js +8 -8
- package/dist/components/slider/slider.js +8 -8
- package/dist/components/slider/utils.js +1 -1
- package/dist/components/smart-image/smart-image.js +1 -1
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/toggle/switch.js +1 -1
- package/dist/components/toggle/toggle.js +3 -3
- package/dist/components/toggle-button/toggle-button.js +1 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/{draggable-CTDVJ4zd.js → draggable-Cxv-OueQ.js} +1 -1
- package/dist/filterDOMProps-BfW758QC.js +69 -0
- package/dist/{gradient-editor-CD5Sho6A.js → gradient-editor-CInqVF8v.js} +6 -6
- package/dist/icons/index.js +1 -1
- package/dist/icons/jsx-svg.js +1 -1
- package/dist/index.js +15 -15
- package/dist/{input-field-_OCWbftf.js → input-field-BdFrxQ-R.js} +46 -47
- package/dist/keyboard-CT41mQzR.js +55 -0
- package/dist/{link-input-BnjtzMbF.js → link-input-BDFhSSvH.js} +324 -356
- package/dist/{modal-snrElwty.js → modal-CJDaBdPh.js} +100 -92
- package/dist/{number-ZZIxJukn.js → number-MWRvGfyE.js} +10 -10
- package/dist/{number-picker-Dhtx4409.js → number-picker-BrxrB-xq.js} +43 -42
- package/dist/{shared-BpAYSi3F.js → shared-CI4kcnm8.js} +482 -502
- package/dist/{smart-image-CBNbxJ57.js → smart-image-eGdMu9s9.js} +2 -2
- package/dist/{solid-color-picker-DukArNH-.js → solid-color-picker-DXgX-OAm.js} +926 -935
- package/dist/{switch-DmsvyQPa.js → switch-DNHFoCCx.js} +28 -28
- package/dist/{tabs-Cy6gB0RL.js → tabs-C2tPOEYr.js} +145 -149
- package/dist/textSelection-BhX_2zV9.js +45 -0
- package/dist/{toggle-button-BlzUGfGy.js → toggle-button-DYDp11rq.js} +35 -35
- package/dist/{tooltip-BzJzYlcc.js → tooltip-C-hT6tN9.js} +162 -162
- package/dist/{useAsyncList-BNzwKoX4.js → useAsyncList-DsOh1xIx.js} +54 -74
- package/dist/{useButton-ra1ZSZ4z.js → useButton-BMZc4fTX.js} +11 -11
- package/dist/{SelectionManager-B8lLv6Ue.js → useCollection-CBVYSuGz.js} +1689 -1777
- package/dist/{useEvent-DkZVfgsS.js → useEvent-ypAU33vv.js} +5 -5
- package/dist/useField-BXf__jxy.js +32 -0
- package/dist/{useFilter-OiMnf6sb.js → useFilter-CfKEbIwL.js} +5 -5
- package/dist/{useFocusRing-DuYL4cdO.js → useFocusRing-BgYY-7ko.js} +23 -23
- package/dist/useFormReset-BuMc_O4y.js +17 -0
- package/dist/{FieldError-BWDbP5Db.js → useFormValidation-BcME9D0E.js} +63 -66
- package/dist/useHover-lyApu3ba.js +975 -0
- package/dist/{useLabel-2EohW5l6.js → useLabel-Rv8cIIKk.js} +8 -8
- package/dist/{useLabels-B2p7RXi5.js → useLabels-xOYtkA8o.js} +5 -5
- package/dist/useListState-u6DfeXHi.js +135 -0
- package/dist/{useLocalizedStringFormatter-Dv2diN3k.js → useLocalizedStringFormatter-CR-bmorj.js} +45 -45
- package/dist/{useNumberField-2xbi3jRV.js → useNumberFieldState-xL-ecwNz.js} +665 -619
- package/dist/useNumberFormatter-CR1PAFPG.js +10 -0
- package/dist/useOverlayTriggerState-AeCx45Gv.js +551 -0
- package/dist/usePress-Dnx5rBoD.js +593 -0
- package/dist/useTextField-BW3ZwGyz.js +159 -0
- package/dist/{useToggle-ecIirvIM.js → useToggle-BF5wptMP.js} +19 -20
- package/dist/useToggleState-D5P01lch.js +22 -0
- package/dist/useToolbar-BT25-MJg.js +55 -0
- package/dist/utilities/debounce-throttle.js +1 -1
- package/dist/utilities/es-dash.js +1 -1
- package/dist/utilities/index.js +3 -3
- package/dist/{utils-B_uiqNa4.js → utils-JFcCNFzy.js} +121 -122
- package/package.json +13 -13
- package/dist/Button-h6xF_WrP.js +0 -225
- package/dist/Dialog-i5VLQw1o.js +0 -2488
- package/dist/FocusScope-CgwbGOBB.js +0 -746
- package/dist/Form-DTMkbrQY.js +0 -5
- package/dist/Heading-Hol-wS_B.js +0 -16
- package/dist/Input-BURqyJXW.js +0 -161
- package/dist/Label-DFXXxMKY.js +0 -17
- package/dist/ListBox-BHUJxpwh.js +0 -600
- package/dist/OverlayArrow-BoloUPQM.js +0 -573
- package/dist/PortalProvider-DinZZCKX.js +0 -14
- package/dist/RSPContexts-C_z0bI8W.js +0 -12
- package/dist/RadioGroup-BwlGtCja.js +0 -329
- package/dist/SearchField-Cm1i5mLj.js +0 -764
- package/dist/SelectionIndicator-31L6EI9F.js +0 -13
- package/dist/Text-O6VBBDlP.js +0 -16
- package/dist/context-C-XNeJ_l.js +0 -93
- package/dist/filterDOMProps-_2_3GD-K.js +0 -69
- package/dist/textSelection-Dv6WPj0Z.js +0 -45
- package/dist/useField-D0WrzR2F.js +0 -32
- package/dist/useFormReset-DdkykzAn.js +0 -18
- package/dist/useHover-qaMm3XFO.js +0 -982
- package/dist/useListState-CD_5vfyy.js +0 -147
- package/dist/useNumberFormatter-C2Cm2mNj.js +0 -10
- package/dist/usePress-ZP1TjkFf.js +0 -678
- package/dist/useToggleState-IIDbiKPl.js +0 -23
- /package/dist/{List-DWlgW2Ex.js → List---tsVJlI.js} +0 -0
- /package/dist/{build-module-Bsx62nlm.js → build-module-K6vi4xE0.js} +0 -0
- /package/dist/{debounce-throttle-DXxSAKpq.js → debounce-throttle-LSPAPFtq.js} +0 -0
- /package/dist/{dist-2gkv7_1U.js → dist-jw8wvxoG.js} +0 -0
- /package/dist/{es-dash-HqXWZZ3_.js → es-dash-BuShf_ht.js} +0 -0
- /package/dist/{jsx-svg-DgKbriN1.js → jsx-svg-DT1SBWuP.js} +0 -0
- /package/dist/{utilities-lwX686oD.js → utilities-DV0KKJNR.js} +0 -0
|
@@ -1,114 +1,122 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-BUU5J41u.js";
|
|
2
2
|
import React, { forwardRef, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
3
|
-
//#region node_modules
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
let effect = useRef(null);
|
|
11
|
-
let nextRef = useRef(() => {
|
|
12
|
-
if (!effect.current) return;
|
|
13
|
-
let newValue = effect.current.next();
|
|
14
|
-
if (newValue.done) {
|
|
15
|
-
effect.current = null;
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
if (currValue.current === newValue.value) nextRef.current();
|
|
19
|
-
else setValue(newValue.value);
|
|
20
|
-
});
|
|
21
|
-
$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
|
|
22
|
-
currValue.current = value;
|
|
23
|
-
if (effect.current) nextRef.current();
|
|
24
|
-
});
|
|
25
|
-
return [value, useCallback((fn) => {
|
|
26
|
-
effect.current = fn(currValue.current);
|
|
27
|
-
nextRef.current();
|
|
28
|
-
}, [nextRef])];
|
|
3
|
+
//#region node_modules/react-aria/dist/private/utils/chain.mjs
|
|
4
|
+
/**
|
|
5
|
+
* Calls all functions in the order they were chained with the same arguments.
|
|
6
|
+
*/ function $a4e76a5424781910$export$e08e3b67e392101e(...callbacks) {
|
|
7
|
+
return (...args) => {
|
|
8
|
+
for (let callback of callbacks) if (typeof callback === "function") callback(...args);
|
|
9
|
+
};
|
|
29
10
|
}
|
|
30
11
|
//#endregion
|
|
31
|
-
//#region node_modules
|
|
32
|
-
var $
|
|
12
|
+
//#region node_modules/react-aria/dist/private/utils/useLayoutEffect.mjs
|
|
13
|
+
var $c4867b2f328c2698$export$e5c5a5f917a5871c = typeof document !== "undefined" ? React.useLayoutEffect : () => {};
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region node_modules/react-aria/dist/private/ssr/SSRProvider.mjs
|
|
16
|
+
var $c7eafbbe1ea5834e$var$defaultContext = {
|
|
33
17
|
prefix: String(Math.round(Math.random() * 1e10)),
|
|
34
18
|
current: 0
|
|
35
19
|
};
|
|
36
|
-
var $
|
|
37
|
-
var $
|
|
38
|
-
var $
|
|
39
|
-
var $
|
|
40
|
-
function $
|
|
41
|
-
let ctx = useContext($
|
|
20
|
+
var $c7eafbbe1ea5834e$var$SSRContext = React.createContext($c7eafbbe1ea5834e$var$defaultContext);
|
|
21
|
+
var $c7eafbbe1ea5834e$var$IsSSRContext = React.createContext(false);
|
|
22
|
+
var $c7eafbbe1ea5834e$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
23
|
+
var $c7eafbbe1ea5834e$var$componentIds = new WeakMap();
|
|
24
|
+
function $c7eafbbe1ea5834e$var$useCounter(isDisabled = false) {
|
|
25
|
+
let ctx = useContext($c7eafbbe1ea5834e$var$SSRContext);
|
|
42
26
|
let ref = useRef(null);
|
|
43
27
|
if (ref.current === null && !isDisabled) {
|
|
44
|
-
|
|
45
|
-
let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = React.__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;
|
|
28
|
+
let currentOwner = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;
|
|
46
29
|
if (currentOwner) {
|
|
47
|
-
let prevComponentValue = $
|
|
48
|
-
if (prevComponentValue == null) $
|
|
30
|
+
let prevComponentValue = $c7eafbbe1ea5834e$var$componentIds.get(currentOwner);
|
|
31
|
+
if (prevComponentValue == null) $c7eafbbe1ea5834e$var$componentIds.set(currentOwner, {
|
|
49
32
|
id: ctx.current,
|
|
50
33
|
state: currentOwner.memoizedState
|
|
51
34
|
});
|
|
52
35
|
else if (currentOwner.memoizedState !== prevComponentValue.state) {
|
|
53
36
|
ctx.current = prevComponentValue.id;
|
|
54
|
-
$
|
|
37
|
+
$c7eafbbe1ea5834e$var$componentIds.delete(currentOwner);
|
|
55
38
|
}
|
|
56
39
|
}
|
|
57
40
|
ref.current = ++ctx.current;
|
|
58
41
|
}
|
|
59
42
|
return ref.current;
|
|
60
43
|
}
|
|
61
|
-
function $
|
|
62
|
-
let ctx = useContext($
|
|
63
|
-
if (ctx === $
|
|
64
|
-
let counter = $
|
|
65
|
-
let prefix = ctx === $
|
|
44
|
+
function $c7eafbbe1ea5834e$var$useLegacySSRSafeId(defaultId) {
|
|
45
|
+
let ctx = useContext($c7eafbbe1ea5834e$var$SSRContext);
|
|
46
|
+
if (ctx === $c7eafbbe1ea5834e$var$defaultContext && !$c7eafbbe1ea5834e$var$canUseDOM && process.env.NODE_ENV !== "production") console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
|
47
|
+
let counter = $c7eafbbe1ea5834e$var$useCounter(!!defaultId);
|
|
48
|
+
let prefix = ctx === $c7eafbbe1ea5834e$var$defaultContext && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${ctx.prefix}`;
|
|
66
49
|
return defaultId || `${prefix}-${counter}`;
|
|
67
50
|
}
|
|
68
|
-
function $
|
|
51
|
+
function $c7eafbbe1ea5834e$var$useModernSSRSafeId(defaultId) {
|
|
69
52
|
let id = React.useId();
|
|
70
|
-
let [didSSR] = useState($
|
|
71
|
-
let prefix = didSSR || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${$
|
|
53
|
+
let [didSSR] = useState($c7eafbbe1ea5834e$export$535bd6ca7f90a273());
|
|
54
|
+
let prefix = didSSR || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${$c7eafbbe1ea5834e$var$defaultContext.prefix}`;
|
|
72
55
|
return defaultId || `${prefix}-${id}`;
|
|
73
56
|
}
|
|
74
|
-
var $
|
|
75
|
-
function $
|
|
57
|
+
var $c7eafbbe1ea5834e$export$619500959fc48b26 = typeof React["useId"] === "function" ? $c7eafbbe1ea5834e$var$useModernSSRSafeId : $c7eafbbe1ea5834e$var$useLegacySSRSafeId;
|
|
58
|
+
function $c7eafbbe1ea5834e$var$getSnapshot() {
|
|
76
59
|
return false;
|
|
77
60
|
}
|
|
78
|
-
function $
|
|
61
|
+
function $c7eafbbe1ea5834e$var$getServerSnapshot() {
|
|
79
62
|
return true;
|
|
80
63
|
}
|
|
81
|
-
function $
|
|
64
|
+
function $c7eafbbe1ea5834e$var$subscribe(onStoreChange) {
|
|
82
65
|
return () => {};
|
|
83
66
|
}
|
|
84
|
-
function $
|
|
85
|
-
if (typeof React["useSyncExternalStore"] === "function") return React["useSyncExternalStore"]($
|
|
86
|
-
return useContext($
|
|
67
|
+
function $c7eafbbe1ea5834e$export$535bd6ca7f90a273() {
|
|
68
|
+
if (typeof React["useSyncExternalStore"] === "function") return React["useSyncExternalStore"]($c7eafbbe1ea5834e$var$subscribe, $c7eafbbe1ea5834e$var$getSnapshot, $c7eafbbe1ea5834e$var$getServerSnapshot);
|
|
69
|
+
return useContext($c7eafbbe1ea5834e$var$IsSSRContext);
|
|
70
|
+
}
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region node_modules/react-aria/dist/private/utils/useValueEffect.mjs
|
|
73
|
+
function $1a716630a9e3a599$export$14d238f342723f25(defaultValue) {
|
|
74
|
+
let [value, setValue] = useState(defaultValue);
|
|
75
|
+
let currValue = useRef(value);
|
|
76
|
+
let effect = useRef(null);
|
|
77
|
+
let nextRef = useRef(() => {
|
|
78
|
+
if (!effect.current) return;
|
|
79
|
+
let newValue = effect.current.next();
|
|
80
|
+
if (newValue.done) {
|
|
81
|
+
effect.current = null;
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
if (currValue.current === newValue.value) nextRef.current();
|
|
85
|
+
else setValue(newValue.value);
|
|
86
|
+
});
|
|
87
|
+
$c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
|
|
88
|
+
currValue.current = value;
|
|
89
|
+
if (effect.current) nextRef.current();
|
|
90
|
+
});
|
|
91
|
+
return [value, useCallback((fn) => {
|
|
92
|
+
effect.current = fn(currValue.current);
|
|
93
|
+
nextRef.current();
|
|
94
|
+
}, [nextRef])];
|
|
87
95
|
}
|
|
88
96
|
//#endregion
|
|
89
|
-
//#region node_modules
|
|
90
|
-
var $
|
|
91
|
-
var $
|
|
92
|
-
var $
|
|
93
|
-
if (typeof FinalizationRegistry !== "undefined") $
|
|
94
|
-
$
|
|
97
|
+
//#region node_modules/react-aria/dist/private/utils/useId.mjs
|
|
98
|
+
var $390e54f620492c70$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
99
|
+
var $390e54f620492c70$export$d41a04c74483c6ef = new Map();
|
|
100
|
+
var $390e54f620492c70$var$registry;
|
|
101
|
+
if (typeof FinalizationRegistry !== "undefined") $390e54f620492c70$var$registry = new FinalizationRegistry((heldValue) => {
|
|
102
|
+
$390e54f620492c70$export$d41a04c74483c6ef.delete(heldValue);
|
|
95
103
|
});
|
|
96
|
-
function $
|
|
104
|
+
function $390e54f620492c70$export$f680877a34711e37(defaultId) {
|
|
97
105
|
let [value, setValue] = useState(defaultId);
|
|
98
106
|
let nextId = useRef(null);
|
|
99
|
-
let res = $
|
|
107
|
+
let res = $c7eafbbe1ea5834e$export$619500959fc48b26(value);
|
|
100
108
|
let cleanupRef = useRef(null);
|
|
101
|
-
if ($
|
|
102
|
-
if ($
|
|
103
|
-
const cacheIdRef = $
|
|
109
|
+
if ($390e54f620492c70$var$registry) $390e54f620492c70$var$registry.register(cleanupRef, res);
|
|
110
|
+
if ($390e54f620492c70$var$canUseDOM) {
|
|
111
|
+
const cacheIdRef = $390e54f620492c70$export$d41a04c74483c6ef.get(res);
|
|
104
112
|
if (cacheIdRef && !cacheIdRef.includes(nextId)) cacheIdRef.push(nextId);
|
|
105
|
-
else $
|
|
113
|
+
else $390e54f620492c70$export$d41a04c74483c6ef.set(res, [nextId]);
|
|
106
114
|
}
|
|
107
|
-
$
|
|
115
|
+
$c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
|
|
108
116
|
let r = res;
|
|
109
117
|
return () => {
|
|
110
|
-
if ($
|
|
111
|
-
$
|
|
118
|
+
if ($390e54f620492c70$var$registry) $390e54f620492c70$var$registry.unregister(cleanupRef);
|
|
119
|
+
$390e54f620492c70$export$d41a04c74483c6ef.delete(r);
|
|
112
120
|
};
|
|
113
121
|
}, [res]);
|
|
114
122
|
useEffect(() => {
|
|
@@ -120,30 +128,30 @@ function $bdb11010cef70236$export$f680877a34711e37(defaultId) {
|
|
|
120
128
|
});
|
|
121
129
|
return res;
|
|
122
130
|
}
|
|
123
|
-
function $
|
|
131
|
+
function $390e54f620492c70$export$cd8c9cb68f842629(idA, idB) {
|
|
124
132
|
if (idA === idB) return idA;
|
|
125
|
-
let setIdsA = $
|
|
133
|
+
let setIdsA = $390e54f620492c70$export$d41a04c74483c6ef.get(idA);
|
|
126
134
|
if (setIdsA) {
|
|
127
135
|
setIdsA.forEach((ref) => ref.current = idB);
|
|
128
136
|
return idB;
|
|
129
137
|
}
|
|
130
|
-
let setIdsB = $
|
|
138
|
+
let setIdsB = $390e54f620492c70$export$d41a04c74483c6ef.get(idB);
|
|
131
139
|
if (setIdsB) {
|
|
132
140
|
setIdsB.forEach((ref) => ref.current = idA);
|
|
133
141
|
return idA;
|
|
134
142
|
}
|
|
135
143
|
return idB;
|
|
136
144
|
}
|
|
137
|
-
function $
|
|
138
|
-
let id = $
|
|
139
|
-
let [resolvedId, setResolvedId] = $
|
|
145
|
+
function $390e54f620492c70$export$b4cc09c592e8fdb8(depArray = []) {
|
|
146
|
+
let id = $390e54f620492c70$export$f680877a34711e37();
|
|
147
|
+
let [resolvedId, setResolvedId] = $1a716630a9e3a599$export$14d238f342723f25(id);
|
|
140
148
|
let updateId = useCallback(() => {
|
|
141
149
|
setResolvedId(function* () {
|
|
142
150
|
yield id;
|
|
143
151
|
yield document.getElementById(id) ? id : void 0;
|
|
144
152
|
});
|
|
145
153
|
}, [id, setResolvedId]);
|
|
146
|
-
$
|
|
154
|
+
$c4867b2f328c2698$export$e5c5a5f917a5871c(updateId, [
|
|
147
155
|
id,
|
|
148
156
|
updateId,
|
|
149
157
|
...depArray
|
|
@@ -151,58 +159,49 @@ function $bdb11010cef70236$export$b4cc09c592e8fdb8(depArray = []) {
|
|
|
151
159
|
return resolvedId;
|
|
152
160
|
}
|
|
153
161
|
//#endregion
|
|
154
|
-
//#region node_modules
|
|
155
|
-
|
|
156
|
-
* Calls all functions in the order they were chained with the same arguments.
|
|
157
|
-
*/ function $ff5963eb1fccf552$export$e08e3b67e392101e(...callbacks) {
|
|
158
|
-
return (...args) => {
|
|
159
|
-
for (let callback of callbacks) if (typeof callback === "function") callback(...args);
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
//#endregion
|
|
163
|
-
//#region node_modules/@react-aria/utils/dist/mergeRefs.mjs
|
|
164
|
-
function $5dc95899b306f630$export$c9058316764c140e(...refs) {
|
|
162
|
+
//#region node_modules/react-aria/dist/private/utils/mergeRefs.mjs
|
|
163
|
+
function $4064df0d6f9620e1$export$c9058316764c140e(...refs) {
|
|
165
164
|
if (refs.length === 1 && refs[0]) return refs[0];
|
|
166
165
|
return (value) => {
|
|
167
166
|
let hasCleanup = false;
|
|
168
167
|
const cleanups = refs.map((ref) => {
|
|
169
|
-
const cleanup = $
|
|
170
|
-
hasCleanup
|
|
168
|
+
const cleanup = $4064df0d6f9620e1$var$setRef(ref, value);
|
|
169
|
+
hasCleanup ||= typeof cleanup == "function";
|
|
171
170
|
return cleanup;
|
|
172
171
|
});
|
|
173
172
|
if (hasCleanup) return () => {
|
|
174
173
|
cleanups.forEach((cleanup, i) => {
|
|
175
174
|
if (typeof cleanup === "function") cleanup();
|
|
176
|
-
else $
|
|
175
|
+
else $4064df0d6f9620e1$var$setRef(refs[i], null);
|
|
177
176
|
});
|
|
178
177
|
};
|
|
179
178
|
};
|
|
180
179
|
}
|
|
181
|
-
function $
|
|
180
|
+
function $4064df0d6f9620e1$var$setRef(ref, value) {
|
|
182
181
|
if (typeof ref === "function") return ref(value);
|
|
183
182
|
else if (ref != null) ref.current = value;
|
|
184
183
|
}
|
|
185
184
|
//#endregion
|
|
186
|
-
//#region node_modules
|
|
187
|
-
function $
|
|
185
|
+
//#region node_modules/react-aria/dist/private/utils/mergeProps.mjs
|
|
186
|
+
function $bbaa08b3cd72f041$export$9d1611c77c2fe928(...args) {
|
|
188
187
|
let result = { ...args[0] };
|
|
189
188
|
for (let i = 1; i < args.length; i++) {
|
|
190
189
|
let props = args[i];
|
|
191
190
|
for (let key in props) {
|
|
192
191
|
let a = result[key];
|
|
193
192
|
let b = props[key];
|
|
194
|
-
if (typeof a === "function" && typeof b === "function" && key[0] === "o" && key[1] === "n" && key.charCodeAt(2) >= 65 && key.charCodeAt(2) <= 90) result[key] = $
|
|
193
|
+
if (typeof a === "function" && typeof b === "function" && key[0] === "o" && key[1] === "n" && key.charCodeAt(2) >= 65 && key.charCodeAt(2) <= 90) result[key] = $a4e76a5424781910$export$e08e3b67e392101e(a, b);
|
|
195
194
|
else if ((key === "className" || key === "UNSAFE_className") && typeof a === "string" && typeof b === "string") result[key] = clsx(a, b);
|
|
196
|
-
else if (key === "id" && a && b) result.id = $
|
|
197
|
-
else if (key === "ref" && a && b) result.ref = $
|
|
195
|
+
else if (key === "id" && a && b) result.id = $390e54f620492c70$export$cd8c9cb68f842629(a, b);
|
|
196
|
+
else if (key === "ref" && a && b) result.ref = $4064df0d6f9620e1$export$c9058316764c140e(a, b);
|
|
198
197
|
else result[key] = b !== void 0 ? b : a;
|
|
199
198
|
}
|
|
200
199
|
}
|
|
201
200
|
return result;
|
|
202
201
|
}
|
|
203
202
|
//#endregion
|
|
204
|
-
//#region node_modules
|
|
205
|
-
function $
|
|
203
|
+
//#region node_modules/react-aria/dist/private/utils/useObjectRef.mjs
|
|
204
|
+
function $03e8ab2d84d7657a$export$4338b53315abf666(ref) {
|
|
206
205
|
const objRef = useRef(null);
|
|
207
206
|
const cleanupRef = useRef(void 0);
|
|
208
207
|
const refEffect = useCallback((instance) => {
|
|
@@ -235,13 +234,13 @@ function $df56164dff5785e2$export$4338b53315abf666(ref) {
|
|
|
235
234
|
}), [refEffect]);
|
|
236
235
|
}
|
|
237
236
|
//#endregion
|
|
238
|
-
//#region node_modules/react-aria-components/dist/utils.mjs
|
|
239
|
-
var $
|
|
240
|
-
function $
|
|
237
|
+
//#region node_modules/react-aria-components/dist/private/utils.mjs
|
|
238
|
+
var $7230ffa83bc0c2cf$export$c62b8e45d58ddad9 = Symbol("default");
|
|
239
|
+
function $7230ffa83bc0c2cf$export$2881499e37b75b9a({ values, children }) {
|
|
241
240
|
for (let [Context, value] of values) children = React.createElement(Context.Provider, { value }, children);
|
|
242
241
|
return children;
|
|
243
242
|
}
|
|
244
|
-
function $
|
|
243
|
+
function $7230ffa83bc0c2cf$export$4d86445c2cf5e3(props) {
|
|
245
244
|
let { className, style, children, defaultClassName, defaultChildren, defaultStyle, values, render } = props;
|
|
246
245
|
return useMemo(() => {
|
|
247
246
|
let computedClassName;
|
|
@@ -264,12 +263,12 @@ function $64fa3d84918910a7$export$4d86445c2cf5e3(props) {
|
|
|
264
263
|
else if (children == null) computedChildren = defaultChildren;
|
|
265
264
|
else computedChildren = children;
|
|
266
265
|
return {
|
|
267
|
-
className: computedClassName
|
|
266
|
+
className: computedClassName ?? defaultClassName,
|
|
268
267
|
style: computedStyle || defaultStyle ? {
|
|
269
268
|
...defaultStyle,
|
|
270
269
|
...computedStyle
|
|
271
270
|
} : void 0,
|
|
272
|
-
children: computedChildren
|
|
271
|
+
children: computedChildren ?? defaultChildren,
|
|
273
272
|
"data-rac": "",
|
|
274
273
|
render: render ? (props) => render(props, values) : void 0
|
|
275
274
|
};
|
|
@@ -284,11 +283,11 @@ function $64fa3d84918910a7$export$4d86445c2cf5e3(props) {
|
|
|
284
283
|
render
|
|
285
284
|
]);
|
|
286
285
|
}
|
|
287
|
-
function $
|
|
286
|
+
function $7230ffa83bc0c2cf$export$fabf2dc03a41866e(context, slot) {
|
|
288
287
|
let ctx = useContext(context);
|
|
289
288
|
if (slot === null) return null;
|
|
290
289
|
if (ctx && typeof ctx === "object" && "slots" in ctx && ctx.slots) {
|
|
291
|
-
let slotKey = slot || $
|
|
290
|
+
let slotKey = slot || $7230ffa83bc0c2cf$export$c62b8e45d58ddad9;
|
|
292
291
|
if (!ctx.slots[slotKey]) {
|
|
293
292
|
let availableSlots = new Intl.ListFormat().format(Object.keys(ctx.slots).map((p) => `"${p}"`));
|
|
294
293
|
let errorMessage = slot ? `Invalid slot "${slot}".` : "A slot prop is required.";
|
|
@@ -298,10 +297,10 @@ function $64fa3d84918910a7$export$fabf2dc03a41866e(context, slot) {
|
|
|
298
297
|
}
|
|
299
298
|
return ctx;
|
|
300
299
|
}
|
|
301
|
-
function $
|
|
302
|
-
let { ref: contextRef, ...contextProps } = $
|
|
303
|
-
let mergedRef = $
|
|
304
|
-
let mergedProps = $
|
|
300
|
+
function $7230ffa83bc0c2cf$export$29f1550f4b0d4415(props, ref, context) {
|
|
301
|
+
let { ref: contextRef, ...contextProps } = $7230ffa83bc0c2cf$export$fabf2dc03a41866e(context, props.slot) || {};
|
|
302
|
+
let mergedRef = $03e8ab2d84d7657a$export$4338b53315abf666(useMemo(() => $4064df0d6f9620e1$export$c9058316764c140e(ref, contextRef), [ref, contextRef]));
|
|
303
|
+
let mergedProps = $bbaa08b3cd72f041$export$9d1611c77c2fe928(contextProps, props);
|
|
305
304
|
if ("style" in contextProps && contextProps.style && "style" in props && props.style) if (typeof contextProps.style === "function" || typeof props.style === "function") mergedProps.style = (renderProps) => {
|
|
306
305
|
let contextStyle = typeof contextProps.style === "function" ? contextProps.style(renderProps) : contextProps.style;
|
|
307
306
|
let defaultStyle = {
|
|
@@ -323,29 +322,29 @@ function $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, context) {
|
|
|
323
322
|
};
|
|
324
323
|
return [mergedProps, mergedRef];
|
|
325
324
|
}
|
|
326
|
-
function $
|
|
325
|
+
function $7230ffa83bc0c2cf$export$9d4c57ee4c6ffdd8(initialState = true) {
|
|
327
326
|
let [hasSlot, setHasSlot] = useState(initialState);
|
|
328
327
|
let hasRun = useRef(false);
|
|
329
328
|
let ref = useCallback((el) => {
|
|
330
329
|
hasRun.current = true;
|
|
331
330
|
setHasSlot(!!el);
|
|
332
331
|
}, []);
|
|
333
|
-
$
|
|
332
|
+
$c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
|
|
334
333
|
if (!hasRun.current) setHasSlot(false);
|
|
335
334
|
}, []);
|
|
336
335
|
return [ref, hasSlot];
|
|
337
336
|
}
|
|
338
|
-
function $
|
|
337
|
+
function $7230ffa83bc0c2cf$export$ef03459518577ad4(props) {
|
|
339
338
|
const prefix = /^(data-.*)$/;
|
|
340
339
|
let filteredProps = {};
|
|
341
340
|
for (const prop in props) if (!prefix.test(prop)) filteredProps[prop] = props[prop];
|
|
342
341
|
return filteredProps;
|
|
343
342
|
}
|
|
344
|
-
function $
|
|
343
|
+
function $7230ffa83bc0c2cf$var$DOMElement(ElementType, props, forwardedRef) {
|
|
345
344
|
let { render, ...otherProps } = props;
|
|
346
345
|
let elementRef = useRef(null);
|
|
347
|
-
let ref = useMemo(() => $
|
|
348
|
-
$
|
|
346
|
+
let ref = useMemo(() => $4064df0d6f9620e1$export$c9058316764c140e(forwardedRef, elementRef), [forwardedRef, elementRef]);
|
|
347
|
+
$c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
|
|
349
348
|
if (process.env.NODE_ENV !== "production" && render) {
|
|
350
349
|
if (!elementRef.current) console.warn("Ref was not connected to DOM element returned by custom `render` function. Did you forget to pass through or merge the `ref`?");
|
|
351
350
|
else if (elementRef.current.localName !== ElementType) console.warn(`Unexpected DOM element returned by custom \`render\` function. Expected <${ElementType}>, got <${elementRef.current.localName}>. This may break the component behavior and accessibility.`);
|
|
@@ -358,15 +357,15 @@ function $64fa3d84918910a7$var$DOMElement(ElementType, props, forwardedRef) {
|
|
|
358
357
|
if (render) return render(domProps, void 0);
|
|
359
358
|
return React.createElement(ElementType, domProps);
|
|
360
359
|
}
|
|
361
|
-
var $
|
|
362
|
-
var $
|
|
360
|
+
var $7230ffa83bc0c2cf$var$domComponentCache = {};
|
|
361
|
+
var $7230ffa83bc0c2cf$export$df3a06d6289f983e = new Proxy({}, { get(target, elementType) {
|
|
363
362
|
if (typeof elementType !== "string") return void 0;
|
|
364
|
-
let res = $
|
|
363
|
+
let res = $7230ffa83bc0c2cf$var$domComponentCache[elementType];
|
|
365
364
|
if (!res) {
|
|
366
|
-
res = forwardRef($
|
|
367
|
-
$
|
|
365
|
+
res = forwardRef($7230ffa83bc0c2cf$var$DOMElement.bind(null, elementType));
|
|
366
|
+
$7230ffa83bc0c2cf$var$domComponentCache[elementType] = res;
|
|
368
367
|
}
|
|
369
368
|
return res;
|
|
370
369
|
} });
|
|
371
370
|
//#endregion
|
|
372
|
-
export { $
|
|
371
|
+
export { $7230ffa83bc0c2cf$export$c62b8e45d58ddad9 as a, $7230ffa83bc0c2cf$export$fabf2dc03a41866e as c, $4064df0d6f9620e1$export$c9058316764c140e as d, $390e54f620492c70$export$b4cc09c592e8fdb8 as f, $a4e76a5424781910$export$e08e3b67e392101e as g, $c4867b2f328c2698$export$e5c5a5f917a5871c as h, $7230ffa83bc0c2cf$export$9d4c57ee4c6ffdd8 as i, $03e8ab2d84d7657a$export$4338b53315abf666 as l, $c7eafbbe1ea5834e$export$535bd6ca7f90a273 as m, $7230ffa83bc0c2cf$export$29f1550f4b0d4415 as n, $7230ffa83bc0c2cf$export$df3a06d6289f983e as o, $390e54f620492c70$export$f680877a34711e37 as p, $7230ffa83bc0c2cf$export$4d86445c2cf5e3 as r, $7230ffa83bc0c2cf$export$ef03459518577ad4 as s, $7230ffa83bc0c2cf$export$2881499e37b75b9a as t, $bbaa08b3cd72f041$export$9d1611c77c2fe928 as u };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eightshift/ui-components",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -58,22 +58,22 @@
|
|
|
58
58
|
"react-dom": "^18.3.1"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@adobe/react-spectrum": "^3.
|
|
61
|
+
"@adobe/react-spectrum": "^3.47.0",
|
|
62
62
|
"@atom-universe/use-web-worker": "^2.2.1",
|
|
63
63
|
"@dnd-kit/abstract": "^0.3.2",
|
|
64
64
|
"@dnd-kit/dom": "^0.3.2",
|
|
65
65
|
"@dnd-kit/helpers": "^0.3.2",
|
|
66
66
|
"@dnd-kit/react": "^0.3.2",
|
|
67
67
|
"@eslint/compat": "^2.0.5",
|
|
68
|
-
"@react-stately/collections": "^3.
|
|
68
|
+
"@react-stately/collections": "^3.13.0",
|
|
69
69
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
70
70
|
"@tailwindcss/vite": "^4.2.2",
|
|
71
|
-
"@thi.ng/color": "^5.8.
|
|
71
|
+
"@thi.ng/color": "^5.8.20",
|
|
72
72
|
"@types/react": "^18.3.28",
|
|
73
73
|
"@types/react-dom": "^18.3.7",
|
|
74
74
|
"@vitejs/plugin-react": "^6.0.1",
|
|
75
|
-
"@wordpress/i18n": "^6.
|
|
76
|
-
"autoprefixer": "^10.
|
|
75
|
+
"@wordpress/i18n": "^6.17.0",
|
|
76
|
+
"autoprefixer": "^10.5.0",
|
|
77
77
|
"class-variance-authority": "^0.7.1",
|
|
78
78
|
"clsx": "^2.1.1",
|
|
79
79
|
"css-gradient-parser": "^0.0.18",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"eslint-plugin-jsdoc": "^62.9.0",
|
|
83
83
|
"eslint-plugin-prettier": "^5.5.5",
|
|
84
84
|
"glob": "^13.0.6",
|
|
85
|
-
"globals": "^17.
|
|
85
|
+
"globals": "^17.5.0",
|
|
86
86
|
"just-camel-case": "^6.2.0",
|
|
87
87
|
"just-debounce-it": "^3.2.0",
|
|
88
88
|
"just-has": "^2.3.0",
|
|
@@ -90,20 +90,20 @@
|
|
|
90
90
|
"just-kebab-case": "^4.2.0",
|
|
91
91
|
"just-throttle": "^4.2.0",
|
|
92
92
|
"lightningcss": "^1.32.0",
|
|
93
|
-
"postcss": "^8.5.
|
|
94
|
-
"prettier": "^3.8.
|
|
93
|
+
"postcss": "^8.5.10",
|
|
94
|
+
"prettier": "^3.8.3",
|
|
95
95
|
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
96
96
|
"react": "^18.3.1",
|
|
97
|
-
"react-aria": "^3.
|
|
98
|
-
"react-aria-components": "^1.
|
|
97
|
+
"react-aria": "^3.48.0",
|
|
98
|
+
"react-aria-components": "^1.17.0",
|
|
99
99
|
"react-dom": "^18.3.1",
|
|
100
100
|
"react-jsx-parser": "^2.4.1",
|
|
101
101
|
"react-movable": "^3.4.1",
|
|
102
|
-
"react-stately": "^3.
|
|
102
|
+
"react-stately": "^3.46.0",
|
|
103
103
|
"svg-to-jsx-string": "^0.1.1",
|
|
104
104
|
"tailwindcss": "^4.2.2",
|
|
105
105
|
"tailwindcss-motion": "^1.1.1",
|
|
106
|
-
"tailwindcss-react-aria-components": "^2.0
|
|
106
|
+
"tailwindcss-react-aria-components": "^2.1.0",
|
|
107
107
|
"vite": "^8.0.8",
|
|
108
108
|
"vite-plugin-lib-inject-css": "^2.2.2"
|
|
109
109
|
},
|