@eightshift/ui-components 2.0.2 → 3.0.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/{Button-OQ5EIPvt.js → Button-D7c-vzAt.js} +5 -5
- package/dist/{Collection-CJM_asJz.js → Collection-CDEKDgvV.js} +234 -128
- 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-BL1hyP4p.js} +42 -21
- package/dist/{Dialog-CIh-hX93.js → Dialog-s3fX5lSh.js} +199 -88
- package/dist/{FieldError-D7A6s7O5.js → FieldError-52GVSGgC.js} +2 -2
- package/dist/{FocusScope-Cs5_OoeA.js → FocusScope-DbqfVa2Z.js} +206 -43
- package/dist/{Group-D6tr3U_n.js → Group-DMRt6g_N.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-CTTTeCpo.js} +10 -10
- package/dist/{Label-Ca9uelsn.js → Label-icmbmNdI.js} +2 -2
- package/dist/{List-Br274SP1.js → List-UdOhiW-i.js} +2 -0
- package/dist/{ListBox-D9dFEh5A.js → ListBox-CfdzmefC.js} +28 -27
- package/dist/{OverlayArrow-1jx-ZyCR.js → OverlayArrow-CMh-7gEM.js} +3 -3
- package/dist/{Separator-BhZycTUp.js → Separator-BxbOoGIK.js} +4 -4
- package/dist/{Slider-BZNaJylD.js → Slider-BZO0Tvut.js} +13 -14
- package/dist/{Text-aOUPPvTO.js → Text-DVSAPY-K.js} +1 -1
- package/dist/{VisuallyHidden-ClTQo25k.js → VisuallyHidden-ooItkWYR.js} +2 -2
- package/dist/assets/style-admin.css +1290 -1335
- package/dist/assets/style-editor.css +433 -478
- package/dist/assets/style.css +433 -478
- 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 +5 -5
- package/dist/components/checkbox/checkbox.js +8 -8
- package/dist/components/color-pickers/color-swatch.js +2 -2
- package/dist/components/color-pickers/gradient-editor.js +2 -2
- package/dist/components/color-pickers/solid-color-picker.js +20 -22
- package/dist/components/container-panel/container-panel.js +9 -3
- package/dist/components/draggable/draggable-handle.js +1 -1
- package/dist/components/draggable/draggable.js +1162 -865
- package/dist/components/draggable-list/draggable-list-item.js +1 -1
- package/dist/components/draggable-list/draggable-list.js +1 -1
- package/dist/components/expandable/expandable.js +7 -7
- package/dist/components/input-field/input-field.js +10 -9
- package/dist/components/link-input/link-input.js +8 -9
- package/dist/components/menu/menu.js +2 -2
- package/dist/components/modal/modal.js +5 -5
- package/dist/components/number-picker/number-picker.js +13 -11
- package/dist/components/options-panel/options-panel.js +1 -1
- package/dist/components/placeholders/image-placeholder.js +1 -1
- package/dist/components/popover/popover.js +1 -1
- package/dist/components/radio/radio.js +16 -15
- package/dist/components/repeater/repeater-item.js +9 -2
- package/dist/components/repeater/repeater.js +32 -3
- package/dist/components/responsive/mini-responsive.js +7 -4
- package/dist/components/responsive/responsive.js +7 -4
- package/dist/components/rich-label/rich-label.js +4 -3
- package/dist/components/select/v2/async-select.js +9 -9
- package/dist/components/select/v2/shared.js +2 -2
- package/dist/components/select/v2/single-select.js +22 -21
- package/dist/components/slider/column-config-slider.js +2 -2
- package/dist/components/slider/slider.js +3 -3
- package/dist/components/tabs/tabs.js +43 -23
- 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 +17 -23
- package/dist/{context-CDOs-GuR.js → context-D2KUdwNL.js} +1 -1
- 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-CcCn9HWX.js → index-BKGQ6jGS.js} +1 -1
- package/dist/{react-jsx-parser.min-CVit0rZn.js → react-jsx-parser.min-DZCiis5V.js} +48 -20
- package/dist/{textSelection-BlTDSskG.js → textSelection-CrrUNX-B.js} +8 -47
- package/dist/{useButton-CmLbE5vg.js → useButton-Dl1C1478.js} +5 -5
- package/dist/{useEvent-cLDJlznQ.js → useEvent-B0b-6KBr.js} +1 -1
- package/dist/useFocusRing-CxlVCVpL.js +107 -0
- package/dist/{useFormReset-NpLM2e3G.js → useFormReset-C5OggHsw.js} +1 -1
- package/dist/{useFormValidation-BWwmZQE2.js → useFormValidation-BgSHI8kQ.js} +2 -2
- package/dist/{focusSafely-CiqTTjWy.js → useHover-B-8Wji4B.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-BXnC0mNr.js} +28 -13
- package/dist/{useLocalizedStringFormatter-BQ4TF72x.js → useLocalizedStringFormatter-CFP1YZWQ.js} +1 -1
- package/dist/{useNumberField-Bm6_BVl9.js → useNumberField-ecr8uK6_.js} +10 -10
- package/dist/{useNumberFormatter-DlUVKkO7.js → useNumberFormatter-321rAb4J.js} +1 -1
- package/dist/{usePress-rg_OQIGW.js → usePress-C3dxzVyi.js} +69 -63
- package/dist/{useSingleSelectListState-Cu3xtEJS.js → useSingleSelectListState-Dgbuzw5o.js} +2 -2
- package/dist/{useToggle-DzlgBLAJ.js → useToggle-DyZydSPy.js} +9 -7
- package/dist/{useToggleState-DhSBQxkp.js → useToggleState-BZoo5qt_.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
|
-
};
|