@eightshift/ui-components 2.0.2 → 3.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.
- package/dist/{Button-OQ5EIPvt.js → Button-BPLceDeW.js} +5 -5
- package/dist/{Collection-CJM_asJz.js → Collection-CZxddMZS.js} +241 -135
- package/dist/{Color-B0HgM8f4.js → Color-MV5kBVXr.js} +1 -1
- package/dist/{ColorSwatch-Dv3Wxdl_.js → ColorSwatch-BqQfVu4L.js} +5 -5
- package/dist/{ComboBox-BnlZjJ3T.js → ComboBox-_RfyhwZw.js} +42 -21
- package/dist/{Dialog-CIh-hX93.js → Dialog-8tYeQ9n4.js} +202 -91
- package/dist/{FieldError-D7A6s7O5.js → FieldError-52GVSGgC.js} +2 -2
- package/dist/{FocusScope-Cs5_OoeA.js → FocusScope-Cri5BFRz.js} +206 -43
- package/dist/{Group-D6tr3U_n.js → Group-_emcIVxI.js} +3 -3
- package/dist/{Heading-DiYTXoIW.js → Heading-B2153VXe.js} +1 -1
- package/dist/{Hidden-DnOd_jPX.js → Hidden-rE6uR-lr.js} +2 -6
- package/dist/{Input-Se0m3ubj.js → Input-BxpFEIXV.js} +10 -10
- package/dist/{Label-Ca9uelsn.js → Label-icmbmNdI.js} +2 -2
- package/dist/{List-Br274SP1.js → List-CZMUbkFU.js} +3 -1
- package/dist/{ListBox-D9dFEh5A.js → ListBox-Ca6hiCqz.js} +29 -28
- package/dist/{OverlayArrow-1jx-ZyCR.js → OverlayArrow-CYXQSlEU.js} +7 -7
- package/dist/{Select-aab027f3.esm-HFNIFFya.js → Select-aab027f3.esm-PDJCDE95.js} +2 -2
- package/dist/{Separator-BhZycTUp.js → Separator-4IIDRlV_.js} +4 -4
- package/dist/{Slider-BZNaJylD.js → Slider-rz2XRMGm.js} +15 -16
- package/dist/{Text-aOUPPvTO.js → Text-DVSAPY-K.js} +1 -1
- package/dist/{VisuallyHidden-ClTQo25k.js → VisuallyHidden-f9zX67a_.js} +2 -2
- package/dist/assets/style-admin.css +1289 -1338
- package/dist/assets/style-editor.css +433 -482
- package/dist/assets/style.css +433 -482
- package/dist/assets/wp-font-enhancements.css +3 -3
- package/dist/assets/wp-ui-enhancements.css +45 -45
- package/dist/components/base-control/base-control.js +1 -1
- package/dist/components/button/button.js +6 -6
- package/dist/components/checkbox/checkbox.js +13 -10
- package/dist/components/color-pickers/color-picker.js +1 -1
- package/dist/components/color-pickers/color-swatch.js +3 -3
- package/dist/components/color-pickers/gradient-editor.js +4 -4
- package/dist/components/color-pickers/solid-color-picker.js +22 -24
- package/dist/components/component-toggle/component-toggle.js +1 -1
- package/dist/components/container-panel/container-panel.js +9 -3
- package/dist/components/draggable/draggable-handle.js +2 -2
- package/dist/components/draggable/draggable.js +1167 -871
- package/dist/components/draggable-list/draggable-list-item.js +2 -2
- package/dist/components/draggable-list/draggable-list.js +2 -2
- package/dist/components/expandable/expandable.js +9 -9
- package/dist/components/input-field/input-field.js +10 -9
- package/dist/components/item-collection/item-collection.js +1 -1
- package/dist/components/link-input/link-input.js +9 -10
- package/dist/components/matrix-align/matrix-align.js +2 -2
- package/dist/components/menu/menu.js +3 -3
- package/dist/components/modal/modal.js +7 -7
- package/dist/components/number-picker/number-picker.js +15 -13
- package/dist/components/option-select/option-select.js +1 -1
- package/dist/components/options-panel/options-panel.js +1 -1
- package/dist/components/placeholders/file-placeholder.js +1 -1
- package/dist/components/placeholders/image-placeholder.js +1 -1
- package/dist/components/popover/popover.js +2 -2
- package/dist/components/radio/radio.js +20 -17
- package/dist/components/repeater/repeater-item.js +10 -3
- package/dist/components/repeater/repeater.js +34 -5
- package/dist/components/responsive/mini-responsive.js +8 -5
- package/dist/components/responsive/responsive-legacy.js +2 -2
- package/dist/components/responsive/responsive.js +10 -7
- package/dist/components/responsive-preview/responsive-preview.js +1 -1
- package/dist/components/rich-label/rich-label.js +4 -3
- package/dist/components/select/async-multi-select.js +4 -4
- package/dist/components/select/async-single-select.js +3 -3
- package/dist/components/select/custom-select-default-components.js +1 -1
- package/dist/components/select/multi-select-components.js +3 -3
- package/dist/components/select/multi-select.js +4 -4
- package/dist/components/select/react-select-component-wrappers.js +1 -1
- package/dist/components/select/single-select.js +3 -3
- package/dist/components/select/v2/async-select.js +10 -10
- package/dist/components/select/v2/shared.js +2 -2
- package/dist/components/select/v2/single-select.js +24 -23
- package/dist/components/slider/column-config-slider.js +3 -3
- package/dist/components/slider/slider.js +3 -3
- package/dist/components/slider/utils.js +1 -1
- package/dist/components/tabs/tabs.js +46 -26
- package/dist/components/toggle/switch.js +7 -7
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +6 -6
- package/dist/components/tooltip/tooltip.js +18 -24
- package/dist/{context-CDOs-GuR.js → context-D2KUdwNL.js} +1 -1
- package/dist/{default-i18n-CM1-Xvzf.js → default-i18n-CT_oS1Fy.js} +22 -3
- package/dist/icons/icons.js +229 -1629
- package/dist/icons/index.js +2 -3
- package/dist/icons/jsx-svg.js +1 -1
- package/dist/{index-641ee5b8.esm-DbdaYaxR.js → index-641ee5b8.esm-DIuJijyT.js} +31 -31
- package/dist/{index-CcCn9HWX.js → index-BKGQ6jGS.js} +1 -1
- package/dist/{index-BRp93Yfa.js → index-CFozsmNS.js} +4 -1
- package/dist/{multi-select-components-DJfz929p.js → multi-select-components-Sp-JEFEX.js} +4 -4
- package/dist/{react-jsx-parser.min-CVit0rZn.js → react-jsx-parser.min-DZCiis5V.js} +48 -20
- package/dist/{react-select-async.esm-DcVLw9X5.js → react-select-async.esm-Bql4G5iV.js} +3 -3
- package/dist/{react-select.esm-OZ0cmTjg.js → react-select.esm-B_TudhTU.js} +3 -3
- package/dist/{textSelection-BlTDSskG.js → textSelection-0UUS8Yfg.js} +8 -47
- package/dist/{useButton-CmLbE5vg.js → useButton-Cg474OYB.js} +5 -5
- package/dist/{useEvent-cLDJlznQ.js → useEvent-B0b-6KBr.js} +1 -1
- package/dist/useFocusRing-CV5l3lf6.js +107 -0
- package/dist/{useFormReset-NpLM2e3G.js → useFormReset-C5OggHsw.js} +1 -1
- package/dist/{useFormValidation-BWwmZQE2.js → useFormValidation-DhDNSjws.js} +3 -3
- package/dist/{focusSafely-CiqTTjWy.js → useHover-DwDr6ozG.js} +305 -98
- package/dist/{useLabel-C85N3Hzw.js → useLabel-D7HkNEHT.js} +2 -2
- package/dist/{useLabels-C_2wWraB.js → useLabels-D8cxd1Z8.js} +1 -1
- package/dist/{useListState-Z7FB_NzO.js → useListState-DVr6aYd_.js} +28 -13
- package/dist/{useLocalizedStringFormatter-BQ4TF72x.js → useLocalizedStringFormatter-CFP1YZWQ.js} +1 -1
- package/dist/{useNumberField-Bm6_BVl9.js → useNumberField-TwM0Z9D1.js} +10 -10
- package/dist/{useNumberFormatter-DlUVKkO7.js → useNumberFormatter-321rAb4J.js} +1 -1
- package/dist/{usePress-rg_OQIGW.js → usePress-Cucx-xSA.js} +69 -63
- package/dist/{useSingleSelectListState-Cu3xtEJS.js → useSingleSelectListState-CMGsRHHh.js} +2 -2
- package/dist/{useToggle-DzlgBLAJ.js → useToggle-C0I3vs0g.js} +9 -7
- package/dist/{useToggleState-DhSBQxkp.js → useToggleState-CmQX3SoX.js} +1 -1
- package/dist/{utils-39D0mStj.js → utils-DkCSC521.js} +38 -35
- package/package.json +32 -32
- package/dist/useFocusRing-CGp3guTX.js +0 -41
- package/dist/useFocusable-087cO5Ct.js +0 -81
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { a as $507fabe10e71c6fb$export$b9b3dfddab17db27, b as $507fabe10e71c6fb$export$ec71b4b83ac08ec3, c as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6, d as $9ab94262bd0047c7$export$420e68273165f4ec } from "./focusSafely-CiqTTjWy.js";
|
|
2
|
-
import { useRef, useState, useCallback } from "react";
|
|
3
|
-
function $f7dceffc5ad7768b$export$4e328f61c538687f(props = {}) {
|
|
4
|
-
let { autoFocus = false, isTextInput, within } = props;
|
|
5
|
-
let state = useRef({
|
|
6
|
-
isFocused: false,
|
|
7
|
-
isFocusVisible: autoFocus || $507fabe10e71c6fb$export$b9b3dfddab17db27()
|
|
8
|
-
});
|
|
9
|
-
let [isFocused, setFocused] = useState(false);
|
|
10
|
-
let [isFocusVisibleState, setFocusVisible] = useState(() => state.current.isFocused && state.current.isFocusVisible);
|
|
11
|
-
let updateState = useCallback(() => setFocusVisible(state.current.isFocused && state.current.isFocusVisible), []);
|
|
12
|
-
let onFocusChange = useCallback((isFocused2) => {
|
|
13
|
-
state.current.isFocused = isFocused2;
|
|
14
|
-
setFocused(isFocused2);
|
|
15
|
-
updateState();
|
|
16
|
-
}, [
|
|
17
|
-
updateState
|
|
18
|
-
]);
|
|
19
|
-
$507fabe10e71c6fb$export$ec71b4b83ac08ec3((isFocusVisible) => {
|
|
20
|
-
state.current.isFocusVisible = isFocusVisible;
|
|
21
|
-
updateState();
|
|
22
|
-
}, [], {
|
|
23
|
-
isTextInput
|
|
24
|
-
});
|
|
25
|
-
let { focusProps } = $a1ea59d68270f0dd$export$f8168d8dd8fd66e6({
|
|
26
|
-
isDisabled: within,
|
|
27
|
-
onFocusChange
|
|
28
|
-
});
|
|
29
|
-
let { focusWithinProps } = $9ab94262bd0047c7$export$420e68273165f4ec({
|
|
30
|
-
isDisabled: !within,
|
|
31
|
-
onFocusWithinChange: onFocusChange
|
|
32
|
-
});
|
|
33
|
-
return {
|
|
34
|
-
isFocused,
|
|
35
|
-
isFocusVisible: isFocusVisibleState,
|
|
36
|
-
focusProps: within ? focusWithinProps : focusProps
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
export {
|
|
40
|
-
$f7dceffc5ad7768b$export$4e328f61c538687f as $
|
|
41
|
-
};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { c as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6, h as $6a99195332edec8b$export$80f3e147d781571c, o as $e7801be82b4b2a53$export$4debdb1a3f0fa79e } from "./focusSafely-CiqTTjWy.js";
|
|
2
|
-
import { m as $df56164dff5785e2$export$4338b53315abf666, d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-39D0mStj.js";
|
|
3
|
-
import React__default, { useRef, useEffect, useContext } from "react";
|
|
4
|
-
function $93925083ecbb358c$export$48d1ea6320830260(handler) {
|
|
5
|
-
if (!handler) return void 0;
|
|
6
|
-
let shouldStopPropagation = true;
|
|
7
|
-
return (e) => {
|
|
8
|
-
let event = {
|
|
9
|
-
...e,
|
|
10
|
-
preventDefault() {
|
|
11
|
-
e.preventDefault();
|
|
12
|
-
},
|
|
13
|
-
isDefaultPrevented() {
|
|
14
|
-
return e.isDefaultPrevented();
|
|
15
|
-
},
|
|
16
|
-
stopPropagation() {
|
|
17
|
-
if (shouldStopPropagation) console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.");
|
|
18
|
-
else shouldStopPropagation = true;
|
|
19
|
-
},
|
|
20
|
-
continuePropagation() {
|
|
21
|
-
shouldStopPropagation = false;
|
|
22
|
-
},
|
|
23
|
-
isPropagationStopped() {
|
|
24
|
-
return shouldStopPropagation;
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
handler(event);
|
|
28
|
-
if (shouldStopPropagation) e.stopPropagation();
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
function $46d819fcbaf35654$export$8f71654801c2f7cd(props) {
|
|
32
|
-
return {
|
|
33
|
-
keyboardProps: props.isDisabled ? {} : {
|
|
34
|
-
onKeyDown: $93925083ecbb358c$export$48d1ea6320830260(props.onKeyDown),
|
|
35
|
-
onKeyUp: $93925083ecbb358c$export$48d1ea6320830260(props.onKeyUp)
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
let $e6afbd83fe6ebbd2$var$FocusableContext = /* @__PURE__ */ React__default.createContext(null);
|
|
40
|
-
function $e6afbd83fe6ebbd2$var$useFocusableContext(ref) {
|
|
41
|
-
let context = useContext($e6afbd83fe6ebbd2$var$FocusableContext) || {};
|
|
42
|
-
$e7801be82b4b2a53$export$4debdb1a3f0fa79e(context, ref);
|
|
43
|
-
let { ref: _, ...otherProps } = context;
|
|
44
|
-
return otherProps;
|
|
45
|
-
}
|
|
46
|
-
const $e6afbd83fe6ebbd2$export$13f3202a3e5ddd5 = /* @__PURE__ */ React__default.forwardRef(function FocusableProvider(props, ref) {
|
|
47
|
-
let { children, ...otherProps } = props;
|
|
48
|
-
let objRef = $df56164dff5785e2$export$4338b53315abf666(ref);
|
|
49
|
-
let context = {
|
|
50
|
-
...otherProps,
|
|
51
|
-
ref: objRef
|
|
52
|
-
};
|
|
53
|
-
return /* @__PURE__ */ React__default.createElement($e6afbd83fe6ebbd2$var$FocusableContext.Provider, {
|
|
54
|
-
value: context
|
|
55
|
-
}, children);
|
|
56
|
-
});
|
|
57
|
-
function $e6afbd83fe6ebbd2$export$4c014de7c8940b4c(props, domRef) {
|
|
58
|
-
let { focusProps } = $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props);
|
|
59
|
-
let { keyboardProps } = $46d819fcbaf35654$export$8f71654801c2f7cd(props);
|
|
60
|
-
let interactions = $3ef42575df84b30b$export$9d1611c77c2fe928(focusProps, keyboardProps);
|
|
61
|
-
let domProps = $e6afbd83fe6ebbd2$var$useFocusableContext(domRef);
|
|
62
|
-
let interactionProps = props.isDisabled ? {} : domProps;
|
|
63
|
-
let autoFocusRef = useRef(props.autoFocus);
|
|
64
|
-
useEffect(() => {
|
|
65
|
-
if (autoFocusRef.current && domRef.current) $6a99195332edec8b$export$80f3e147d781571c(domRef.current);
|
|
66
|
-
autoFocusRef.current = false;
|
|
67
|
-
}, [
|
|
68
|
-
domRef
|
|
69
|
-
]);
|
|
70
|
-
return {
|
|
71
|
-
focusableProps: $3ef42575df84b30b$export$9d1611c77c2fe928({
|
|
72
|
-
...interactions,
|
|
73
|
-
tabIndex: props.excludeFromTabOrder && !props.isDisabled ? -1 : void 0
|
|
74
|
-
}, interactionProps)
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
export {
|
|
78
|
-
$e6afbd83fe6ebbd2$export$4c014de7c8940b4c as $,
|
|
79
|
-
$e6afbd83fe6ebbd2$export$13f3202a3e5ddd5 as a,
|
|
80
|
-
$46d819fcbaf35654$export$8f71654801c2f7cd as b
|
|
81
|
-
};
|