@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,10 +1,10 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
3
|
-
import "../../default-i18n-
|
|
3
|
+
import "../../default-i18n-CT_oS1Fy.js";
|
|
4
4
|
import { BaseControl } from "../base-control/base-control.js";
|
|
5
5
|
import { icons } from "../../icons/icons.js";
|
|
6
6
|
import { cloneElement } from "react";
|
|
7
|
-
import "../../react-jsx-parser.min-
|
|
7
|
+
import "../../react-jsx-parser.min-DZCiis5V.js";
|
|
8
8
|
/**
|
|
9
9
|
* A DraggableList item.
|
|
10
10
|
*
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useId } from "react";
|
|
3
|
-
import { _ as __ } from "../../default-i18n-
|
|
3
|
+
import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
|
|
4
4
|
import { BaseControl } from "../base-control/base-control.js";
|
|
5
5
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
6
|
-
import { L as List, a as arrayRemove, b as arrayMove } from "../../List-
|
|
6
|
+
import { L as List, a as arrayRemove, b as arrayMove } from "../../List-CZMUbkFU.js";
|
|
7
7
|
const fixIds = (items, itemIdBase) => {
|
|
8
8
|
return items == null ? void 0 : items.map((item, i) => ({
|
|
9
9
|
...item,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import React__default, { useRef, useCallback, useEffect, forwardRef,
|
|
2
|
+
import React__default, { useRef, useCallback, useEffect, forwardRef, createContext, useContext } from "react";
|
|
3
3
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
4
4
|
import { AnimatedVisibility } from "../animated-visibility/animated-visibility.js";
|
|
5
5
|
import { Button } from "../button/button.js";
|
|
6
6
|
import { icons } from "../../icons/icons.js";
|
|
7
7
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
8
|
-
import { _ as __ } from "../../default-i18n-
|
|
9
|
-
import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "../../Button-
|
|
10
|
-
import {
|
|
11
|
-
import { r as reactDomExports } from "../../index-BRp93Yfa.js";
|
|
12
|
-
import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "../../useEvent-cLDJlznQ.js";
|
|
13
|
-
import { e as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "../../focusSafely-CiqTTjWy.js";
|
|
8
|
+
import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
|
|
9
|
+
import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "../../Button-BPLceDeW.js";
|
|
10
|
+
import { e as $bdb11010cef70236$export$f680877a34711e37, n as $b5e257d569688ac6$export$535bd6ca7f90a273, k as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, a as $64fa3d84918910a7$export$29f1550f4b0d4415, b as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a, o as $64fa3d84918910a7$export$c62b8e45d58ddad9, d as $3ef42575df84b30b$export$9d1611c77c2fe928, m as $5dc95899b306f630$export$c9058316764c140e } from "../../utils-DkCSC521.js";
|
|
14
11
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
12
|
+
import { b as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "../../useHover-DwDr6ozG.js";
|
|
13
|
+
import { r as reactDomExports } from "../../index-CFozsmNS.js";
|
|
14
|
+
import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "../../useEvent-B0b-6KBr.js";
|
|
15
|
+
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-CV5l3lf6.js";
|
|
16
|
+
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-icmbmNdI.js";
|
|
17
17
|
function $5e910fae8e128ead$export$6e3e27031a30522f(props, state, ref) {
|
|
18
18
|
let { isDisabled } = props;
|
|
19
19
|
let triggerId = $bdb11010cef70236$export$f680877a34711e37();
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { a as $3985021b0ad6602f$export$37fb8590cf2c088c, b as $2d73ec29415bd339$export$712718f7aec83d5, $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-
|
|
3
|
-
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-
|
|
4
|
-
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415, b as $64fa3d84918910a7$export$4d86445c2cf5e3, d as $3ef42575df84b30b$export$9d1611c77c2fe928, $ as $64fa3d84918910a7$export$fabf2dc03a41866e,
|
|
2
|
+
import { a as $3985021b0ad6602f$export$37fb8590cf2c088c, b as $2d73ec29415bd339$export$712718f7aec83d5, $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-BxpFEIXV.js";
|
|
3
|
+
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-icmbmNdI.js";
|
|
4
|
+
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415, b as $64fa3d84918910a7$export$4d86445c2cf5e3, d as $3ef42575df84b30b$export$9d1611c77c2fe928, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, g as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, h as $64fa3d84918910a7$export$ef03459518577ad4, i as $64fa3d84918910a7$export$2881499e37b75b9a } from "../../utils-DkCSC521.js";
|
|
5
5
|
import React__default, { forwardRef, createContext, useRef, useState, useCallback } from "react";
|
|
6
|
-
import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../
|
|
7
|
-
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-
|
|
8
|
-
import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-
|
|
6
|
+
import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-DwDr6ozG.js";
|
|
7
|
+
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-CV5l3lf6.js";
|
|
8
|
+
import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-52GVSGgC.js";
|
|
9
9
|
import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "../../Form-Cq3fu75_.js";
|
|
10
|
-
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-
|
|
10
|
+
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-DVSAPY-K.js";
|
|
11
|
+
import { $ as $f39a9eba43920ace$export$86427a43e3e48ebb } from "../../Hidden-rE6uR-lr.js";
|
|
11
12
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
|
|
12
13
|
import { BaseControl } from "../base-control/base-control.js";
|
|
13
14
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
@@ -47,14 +48,14 @@ const $216918bed6669f72$export$f5c9f3c2c4054eec = /* @__PURE__ */ forwardRef(fun
|
|
|
47
48
|
});
|
|
48
49
|
});
|
|
49
50
|
const $bcdf0525bf22703d$export$2129e27b3ef0d483 = /* @__PURE__ */ createContext(null);
|
|
50
|
-
const $bcdf0525bf22703d$export$2c73285ae9390cec = /* @__PURE__ */
|
|
51
|
+
const $bcdf0525bf22703d$export$2c73285ae9390cec = /* @__PURE__ */ $f39a9eba43920ace$export$86427a43e3e48ebb(function TextField(props, ref) {
|
|
51
52
|
[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $bcdf0525bf22703d$export$2129e27b3ef0d483);
|
|
52
53
|
let { validationBehavior: formValidationBehavior } = $64fa3d84918910a7$export$fabf2dc03a41866e($d3e0e05bdfcf66bd$export$c24727297075ec6a) || {};
|
|
53
54
|
var _props_validationBehavior, _ref;
|
|
54
55
|
let validationBehavior = (_ref = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : formValidationBehavior) !== null && _ref !== void 0 ? _ref : "native";
|
|
55
56
|
let inputRef = useRef(null);
|
|
56
57
|
let [inputContextProps, mergedInputRef] = $64fa3d84918910a7$export$29f1550f4b0d4415({}, inputRef, $3985021b0ad6602f$export$37fb8590cf2c088c);
|
|
57
|
-
let [labelRef, label] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8();
|
|
58
|
+
let [labelRef, label] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8(!props["aria-label"] && !props["aria-labelledby"]);
|
|
58
59
|
let [inputElementType, setInputElementType] = useState("input");
|
|
59
60
|
let { labelProps, inputProps, descriptionProps, errorMessageProps, ...validation } = $2d73ec29415bd339$export$712718f7aec83d5({
|
|
60
61
|
...$64fa3d84918910a7$export$ef03459518577ad4(props),
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../Button-
|
|
3
|
-
import { $ as $f86e6c1ec7da6ebb$export$bc3384a35de93d66, a as $d01f2c01039c0eec$export$72b9695b8216309a } from "../../ComboBox-
|
|
4
|
-
import { $ as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4 } from "../../Group-
|
|
5
|
-
import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-
|
|
6
|
-
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-
|
|
7
|
-
import { $ as $eed445e0843c11d0$export$41f133550aa26f48, a as $eed445e0843c11d0$export$a11e76429ed99b4 } from "../../ListBox-
|
|
8
|
-
import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../Dialog-
|
|
9
|
-
import { _ as __ } from "../../default-i18n-
|
|
2
|
+
import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../Button-BPLceDeW.js";
|
|
3
|
+
import { $ as $f86e6c1ec7da6ebb$export$bc3384a35de93d66, a as $d01f2c01039c0eec$export$72b9695b8216309a } from "../../ComboBox-_RfyhwZw.js";
|
|
4
|
+
import { $ as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4 } from "../../Group-_emcIVxI.js";
|
|
5
|
+
import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-BxpFEIXV.js";
|
|
6
|
+
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-icmbmNdI.js";
|
|
7
|
+
import { $ as $eed445e0843c11d0$export$41f133550aa26f48, a as $eed445e0843c11d0$export$a11e76429ed99b4 } from "../../ListBox-Ca6hiCqz.js";
|
|
8
|
+
import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../Dialog-8tYeQ9n4.js";
|
|
9
|
+
import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
|
|
10
10
|
import { icons } from "../../icons/icons.js";
|
|
11
11
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
12
12
|
import { useRef, useState, useEffect, cloneElement } from "react";
|
|
@@ -83,7 +83,6 @@ const LinkInput = (props) => {
|
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
85
|
const [shouldShowSuggestions, setShouldShowSuggestions] = useState(false);
|
|
86
|
-
useState(false);
|
|
87
86
|
useEffect(() => {
|
|
88
87
|
suggestionList.setFilterText(url);
|
|
89
88
|
if (!canShowSuggestions) {
|
|
@@ -133,7 +132,7 @@ const LinkInput = (props) => {
|
|
|
133
132
|
/* @__PURE__ */ jsx(
|
|
134
133
|
$3985021b0ad6602f$export$f5b8910cec6cf069,
|
|
135
134
|
{
|
|
136
|
-
placeholder:
|
|
135
|
+
placeholder: disabled ? null : placeholder,
|
|
137
136
|
className: clsx(
|
|
138
137
|
"es:min-h-10 es:w-full es:rounded-t-lg es:border es:border-secondary-300 es:py-2 es:pl-2 es:pr-1 es:text-sm es:shadow-xs es:transition es:selection:bg-accent-500/20 es:selection:text-accent-950",
|
|
139
138
|
"es:any-focus:outline-hidden",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { _ as __ } from "../../default-i18n-
|
|
2
|
+
import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
|
|
3
3
|
import { icons } from "../../icons/icons.js";
|
|
4
|
-
import { upperFirst, camelCase
|
|
4
|
+
import { pascalCase, upperFirst, camelCase } from "../../utilities/es-dash.js";
|
|
5
5
|
import { Menu, MenuItem } from "../menu/menu.js";
|
|
6
6
|
import { BaseControl } from "../base-control/base-control.js";
|
|
7
7
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { $ as $72a5793c14baf454$export$8b251419efc915eb, a as $431f98aba6844401$export$1ff3c3f08ae963c0 } from "../../Separator-
|
|
3
|
-
import { a as $3674c52c6b3c5bce$export$27d2ad3c5815583e, b as $3674c52c6b3c5bce$export$d9b273488cd8ce6f, c as $3674c52c6b3c5bce$export$
|
|
2
|
+
import { $ as $72a5793c14baf454$export$8b251419efc915eb, a as $431f98aba6844401$export$1ff3c3f08ae963c0 } from "../../Separator-4IIDRlV_.js";
|
|
3
|
+
import { a as $3674c52c6b3c5bce$export$27d2ad3c5815583e, b as $3674c52c6b3c5bce$export$d9b273488cd8ce6f, c as $3674c52c6b3c5bce$export$2ce376c2cc3355c8, d as $3674c52c6b3c5bce$export$4b1545b4f2016d26, e as $3674c52c6b3c5bce$export$ecabc99eeffab7ca } from "../../Dialog-8tYeQ9n4.js";
|
|
4
4
|
import { icons } from "../../icons/icons.js";
|
|
5
5
|
import { Button } from "../button/button.js";
|
|
6
6
|
import { Popover } from "../popover/popover.js";
|
|
7
7
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
8
8
|
import { cloneElement } from "react";
|
|
9
|
-
import { _ as __ } from "../../default-i18n-
|
|
9
|
+
import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
|
|
10
10
|
/**
|
|
11
11
|
* A simple menu component.
|
|
12
12
|
*
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { h as $a11501f3d1d39e6c$export$ea8f71083e90600f, i as $49c51c25361d4cd2$export$ee0f7cc6afcd1c18, j as $337b884510726a0d$export$14c98a7594375490, k as $5e3802645cc19319$export$1c3ebcada18427bf, l as $de32f1b87079253c$export$d2f961adcb0afbe, m as $86ea4cb521eb2e37$export$2317d149ed6f78c4, n as $337b884510726a0d$export$c6fdb837b070b4ff, g as $de32f1b87079253c$export$2e1e1122cf0cba88, f as $de32f1b87079253c$export$3ddf2d174ce01153 } from "../../Dialog-
|
|
3
|
-
import { $ as $5cb03073d3f54797$export$a8a3e93435678ff9 } from "../../Heading-
|
|
4
|
-
import {
|
|
2
|
+
import { h as $a11501f3d1d39e6c$export$ea8f71083e90600f, i as $49c51c25361d4cd2$export$ee0f7cc6afcd1c18, j as $337b884510726a0d$export$14c98a7594375490, k as $5e3802645cc19319$export$1c3ebcada18427bf, l as $de32f1b87079253c$export$d2f961adcb0afbe, m as $86ea4cb521eb2e37$export$2317d149ed6f78c4, n as $337b884510726a0d$export$c6fdb837b070b4ff, g as $de32f1b87079253c$export$2e1e1122cf0cba88, f as $de32f1b87079253c$export$3ddf2d174ce01153 } from "../../Dialog-8tYeQ9n4.js";
|
|
3
|
+
import { $ as $5cb03073d3f54797$export$a8a3e93435678ff9 } from "../../Heading-B2153VXe.js";
|
|
4
|
+
import { n as $b5e257d569688ac6$export$535bd6ca7f90a273, d as $3ef42575df84b30b$export$9d1611c77c2fe928, a as $64fa3d84918910a7$export$29f1550f4b0d4415, l as $df56164dff5785e2$export$4338b53315abf666, m as $5dc95899b306f630$export$c9058316764c140e, b as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a } from "../../utils-DkCSC521.js";
|
|
5
5
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
|
|
6
|
-
import React__default, { useState, useEffect, forwardRef, useContext,
|
|
7
|
-
import { $ as $
|
|
6
|
+
import React__default, { useState, useEffect, forwardRef, useContext, createContext, useRef, useMemo } from "react";
|
|
7
|
+
import { $ as $fc909762b330b746$export$61c6a8c84e605fb6, a as $d3f049242431219c$export$45fda7c47f93fd48, b as $d3f049242431219c$export$6d3443f2c48bfc20 } from "../../OverlayArrow-CYXQSlEU.js";
|
|
8
8
|
import { Button } from "../button/button.js";
|
|
9
|
-
import { _ as __ } from "../../default-i18n-
|
|
9
|
+
import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
|
|
10
10
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
11
11
|
import { icons } from "../../icons/icons.js";
|
|
12
|
-
import "../../react-jsx-parser.min-
|
|
12
|
+
import "../../react-jsx-parser.min-DZCiis5V.js";
|
|
13
13
|
import { HStack } from "../layout/hstack.js";
|
|
14
14
|
let $5df64b3807dc15ee$var$visualViewport = typeof document !== "undefined" && window.visualViewport;
|
|
15
15
|
function $5df64b3807dc15ee$export$d699905dd57c73ca() {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import React__default, { forwardRef,
|
|
3
|
-
import { _ as __ } from "../../default-i18n-
|
|
4
|
-
import { a as $a049562f99e7db0e$export$f9c6924e160136d1, $ as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4 } from "../../Group-
|
|
5
|
-
import { a as $3985021b0ad6602f$export$37fb8590cf2c088c, $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-
|
|
6
|
-
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-
|
|
7
|
-
import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "../../Button-
|
|
8
|
-
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e,
|
|
9
|
-
import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-
|
|
2
|
+
import React__default, { forwardRef, createContext, useRef, useState, cloneElement } from "react";
|
|
3
|
+
import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
|
|
4
|
+
import { a as $a049562f99e7db0e$export$f9c6924e160136d1, $ as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4 } from "../../Group-_emcIVxI.js";
|
|
5
|
+
import { a as $3985021b0ad6602f$export$37fb8590cf2c088c, $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-BxpFEIXV.js";
|
|
6
|
+
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-icmbmNdI.js";
|
|
7
|
+
import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "../../Button-BPLceDeW.js";
|
|
8
|
+
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, g as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, h as $64fa3d84918910a7$export$ef03459518577ad4, b as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a } from "../../utils-DkCSC521.js";
|
|
9
|
+
import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-52GVSGgC.js";
|
|
10
10
|
import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "../../Form-Cq3fu75_.js";
|
|
11
|
-
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-
|
|
11
|
+
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-DVSAPY-K.js";
|
|
12
12
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
|
|
13
|
-
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-
|
|
14
|
-
import { $ as $de67e98908f0c6ee$export$7f629e9dc1ecf37c, a as $81397a9303501bda$export$23f548e970bdf099 } from "../../useNumberField-
|
|
13
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-D2KUdwNL.js";
|
|
14
|
+
import { $ as $de67e98908f0c6ee$export$7f629e9dc1ecf37c, a as $81397a9303501bda$export$23f548e970bdf099 } from "../../useNumberField-TwM0Z9D1.js";
|
|
15
15
|
import { Button } from "../button/button.js";
|
|
16
16
|
import { icons } from "../../icons/icons.js";
|
|
17
17
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
@@ -30,7 +30,7 @@ const $b91743d66a0ed188$export$63c5fa0b2fdccd2e = /* @__PURE__ */ forwardRef(fun
|
|
|
30
30
|
validationBehavior
|
|
31
31
|
});
|
|
32
32
|
let inputRef = useRef(null);
|
|
33
|
-
let [labelRef, label] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8();
|
|
33
|
+
let [labelRef, label] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8(!props["aria-label"] && !props["aria-labelledby"]);
|
|
34
34
|
let { labelProps, groupProps, inputProps, incrementButtonProps, decrementButtonProps, descriptionProps, errorMessageProps, ...validation } = $81397a9303501bda$export$23f548e970bdf099({
|
|
35
35
|
...$64fa3d84918910a7$export$ef03459518577ad4(props),
|
|
36
36
|
label,
|
|
@@ -41,7 +41,8 @@ const $b91743d66a0ed188$export$63c5fa0b2fdccd2e = /* @__PURE__ */ forwardRef(fun
|
|
|
41
41
|
values: {
|
|
42
42
|
state,
|
|
43
43
|
isDisabled: props.isDisabled || false,
|
|
44
|
-
isInvalid: validation.isInvalid || false
|
|
44
|
+
isInvalid: validation.isInvalid || false,
|
|
45
|
+
isRequired: props.isRequired || false
|
|
45
46
|
},
|
|
46
47
|
defaultClassName: "react-aria-NumberField"
|
|
47
48
|
});
|
|
@@ -100,6 +101,7 @@ const $b91743d66a0ed188$export$63c5fa0b2fdccd2e = /* @__PURE__ */ forwardRef(fun
|
|
|
100
101
|
ref,
|
|
101
102
|
slot: props.slot || void 0,
|
|
102
103
|
"data-disabled": props.isDisabled || void 0,
|
|
104
|
+
"data-required": props.isRequired || void 0,
|
|
103
105
|
"data-invalid": validation.isInvalid || void 0
|
|
104
106
|
}), props.name && /* @__PURE__ */ React__default.createElement("input", {
|
|
105
107
|
type: "hidden",
|
|
@@ -7,7 +7,7 @@ import { Menu, MenuSeparator, MenuItem } from "../menu/menu.js";
|
|
|
7
7
|
import { RadioButtonGroup, RadioButton } from "../radio/radio.js";
|
|
8
8
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
9
9
|
import { ToggleButton } from "../toggle-button/toggle-button.js";
|
|
10
|
-
import { _ as __ } from "../../default-i18n-
|
|
10
|
+
import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
|
|
11
11
|
/**
|
|
12
12
|
* A component that allows the user to select an option from a list of options.
|
|
13
13
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
3
3
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
4
|
-
import { $ as $5cb03073d3f54797$export$a8a3e93435678ff9 } from "../../Heading-
|
|
4
|
+
import { $ as $5cb03073d3f54797$export$a8a3e93435678ff9 } from "../../Heading-B2153VXe.js";
|
|
5
5
|
/**
|
|
6
6
|
* Component that provides a container panel for options, with an optional title.
|
|
7
7
|
* Best used within the Gutenberg sidebar, instead of the default `PanelBody` component.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { _ as __ } from "../../default-i18n-
|
|
2
|
+
import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
|
|
3
3
|
import { icons } from "../../icons/icons.js";
|
|
4
4
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
5
5
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
@@ -59,7 +59,7 @@ const ImagePlaceholder = (props) => {
|
|
|
59
59
|
"img",
|
|
60
60
|
{
|
|
61
61
|
className: clsx(
|
|
62
|
-
"es:size-full es:select-none es:fill-mode-forwards",
|
|
62
|
+
"es:size-full! es:select-none es:fill-mode-forwards",
|
|
63
63
|
imageMode === "cover" && "es:object-cover",
|
|
64
64
|
imageMode === "contain" && "es:object-contain",
|
|
65
65
|
imageMode === "fill" && "es:object-fill",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d, f as $de32f1b87079253c$export$3ddf2d174ce01153, g as $de32f1b87079253c$export$2e1e1122cf0cba88 } from "../../Dialog-
|
|
2
|
+
import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d, f as $de32f1b87079253c$export$3ddf2d174ce01153, g as $de32f1b87079253c$export$2e1e1122cf0cba88 } from "../../Dialog-8tYeQ9n4.js";
|
|
3
3
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
4
|
-
import { _ as __ } from "../../default-i18n-
|
|
4
|
+
import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
|
|
5
5
|
import { Button } from "../button/button.js";
|
|
6
6
|
/**
|
|
7
7
|
* A popover component.
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-
|
|
3
|
-
import { d as $3ef42575df84b30b$export$9d1611c77c2fe928,
|
|
4
|
-
import { a as $2baaea4c71418dea$export$294aa081a6c6f55d, $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-
|
|
2
|
+
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-icmbmNdI.js";
|
|
3
|
+
import { d as $3ef42575df84b30b$export$9d1611c77c2fe928, e as $bdb11010cef70236$export$f680877a34711e37, a as $64fa3d84918910a7$export$29f1550f4b0d4415, l as $df56164dff5785e2$export$4338b53315abf666, m as $5dc95899b306f630$export$c9058316764c140e, h as $64fa3d84918910a7$export$ef03459518577ad4, b as $64fa3d84918910a7$export$4d86445c2cf5e3, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, g as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, i as $64fa3d84918910a7$export$2881499e37b75b9a } from "../../utils-DkCSC521.js";
|
|
4
|
+
import { a as $2baaea4c71418dea$export$294aa081a6c6f55d, $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-52GVSGgC.js";
|
|
5
5
|
import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "../../Form-Cq3fu75_.js";
|
|
6
|
-
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-
|
|
6
|
+
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-DVSAPY-K.js";
|
|
7
7
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
|
|
8
8
|
import React__default, { useMemo, useState, forwardRef, createContext, cloneElement } from "react";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { a as $
|
|
12
|
-
import { $ as $
|
|
13
|
-
import {
|
|
14
|
-
import { $ as $
|
|
15
|
-
import { $ as $
|
|
16
|
-
import { $ as $
|
|
17
|
-
import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "../../VisuallyHidden-ClTQo25k.js";
|
|
9
|
+
import { $ as $99facab73266f662$export$5add1d006293d136 } from "../../useFormReset-C5OggHsw.js";
|
|
10
|
+
import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "../../usePress-Cucx-xSA.js";
|
|
11
|
+
import { a as $f645667febf57a63$export$4c014de7c8940b4c, b as $458b0a5536c1a7cf$export$40bfa8c7b0832715, $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-DwDr6ozG.js";
|
|
12
|
+
import { a as $e93e671b31057976$export$b8473d3665f3a75a, $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10 } from "../../useFormValidation-DhDNSjws.js";
|
|
13
|
+
import { a as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "../../FocusScope-Cri5BFRz.js";
|
|
14
|
+
import { a as $9ab94262bd0047c7$export$420e68273165f4ec, $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-CV5l3lf6.js";
|
|
15
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-D2KUdwNL.js";
|
|
16
|
+
import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "../../VisuallyHidden-f9zX67a_.js";
|
|
18
17
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
19
18
|
import { AnimatedVisibility } from "../animated-visibility/animated-visibility.js";
|
|
20
19
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
@@ -37,10 +36,12 @@ function $0d5c49892c1215da$export$37b0961d2f4751e2(props, state, ref) {
|
|
|
37
36
|
let { pressProps: labelProps, isPressed: isLabelPressed } = $f6c31cce2adf654f$export$45712eceda6fad21({
|
|
38
37
|
isDisabled,
|
|
39
38
|
onPress() {
|
|
39
|
+
var _ref_current;
|
|
40
40
|
state.setSelectedValue(value);
|
|
41
|
+
(_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();
|
|
41
42
|
}
|
|
42
43
|
});
|
|
43
|
-
let { focusableProps } = $
|
|
44
|
+
let { focusableProps } = $f645667febf57a63$export$4c014de7c8940b4c($3ef42575df84b30b$export$9d1611c77c2fe928(props, {
|
|
44
45
|
onFocus: () => state.setLastFocusedValue(value)
|
|
45
46
|
}), ref);
|
|
46
47
|
let interactions = $3ef42575df84b30b$export$9d1611c77c2fe928(pressProps, focusableProps);
|
|
@@ -224,7 +225,7 @@ const $b6c3ddc6086f204d$export$a98f0dcb43a68a25 = /* @__PURE__ */ forwardRef(fun
|
|
|
224
225
|
...props,
|
|
225
226
|
validationBehavior
|
|
226
227
|
});
|
|
227
|
-
let [labelRef, label] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8();
|
|
228
|
+
let [labelRef, label] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8(!props["aria-label"] && !props["aria-labelledby"]);
|
|
228
229
|
let { radioGroupProps, labelProps, descriptionProps, errorMessageProps, ...validation } = $430f30ed08ec25fa$export$62b9571f283ff5c2({
|
|
229
230
|
...props,
|
|
230
231
|
label,
|
|
@@ -405,7 +406,8 @@ const RadioButton = (props) => {
|
|
|
405
406
|
className: clsx("es:ml-1", labelClassName),
|
|
406
407
|
inlineSubtitle,
|
|
407
408
|
fullWidth: true,
|
|
408
|
-
fullSizeSubtitle: true
|
|
409
|
+
fullSizeSubtitle: true,
|
|
410
|
+
as: $01b77f81d0f07f68$export$b04be29aa201d4f5
|
|
409
411
|
}
|
|
410
412
|
),
|
|
411
413
|
/* @__PURE__ */ jsx(
|
|
@@ -447,7 +449,8 @@ const RadioButton = (props) => {
|
|
|
447
449
|
subtitle,
|
|
448
450
|
className: clsx(labelClassName, subtitle && "es:mt-0.5", "es:[&_>_span_>_svg]:size-5 es:ml-0.5 es:*:space-y-0.5", disabled && "es:opacity-55"),
|
|
449
451
|
inlineSubtitle,
|
|
450
|
-
fullSizeSubtitle: true
|
|
452
|
+
fullSizeSubtitle: true,
|
|
453
|
+
as: $01b77f81d0f07f68$export$b04be29aa201d4f5
|
|
451
454
|
}
|
|
452
455
|
),
|
|
453
456
|
!(icon || label || subtitle) && children
|
|
@@ -5,7 +5,7 @@ import { icons } from "../../icons/icons.js";
|
|
|
5
5
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
6
6
|
import { useContext } from "react";
|
|
7
7
|
import { Expandable } from "../expandable/expandable.js";
|
|
8
|
-
import { _ as __ } from "../../default-i18n-
|
|
8
|
+
import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
|
|
9
9
|
import { RepeaterContext } from "./repeater-context.js";
|
|
10
10
|
/**
|
|
11
11
|
* A Repeater item.
|
|
@@ -30,7 +30,7 @@ import { RepeaterContext } from "./repeater-context.js";
|
|
|
30
30
|
*/
|
|
31
31
|
const RepeaterItem = (props) => {
|
|
32
32
|
const { children, icon, label, subtitle, "aria-label": ariaLabel, className, actions, textValue, expandDisabled, menuOptions, noMenuButton, ...rest } = props;
|
|
33
|
-
const { deleteItem, duplicateItem, isDragged, isOutOfBounds, isSelected, canDelete, canAdd } = useContext(RepeaterContext);
|
|
33
|
+
const { deleteItem, duplicateItem, isDragged, isOutOfBounds, isSelected, canDelete, canAdd, allOpen, setAllOpen } = useContext(RepeaterContext);
|
|
34
34
|
return /* @__PURE__ */ jsx(
|
|
35
35
|
Expandable,
|
|
36
36
|
{
|
|
@@ -48,6 +48,12 @@ const RepeaterItem = (props) => {
|
|
|
48
48
|
isSelected && "es:bg-accent-50 es:border-accent-100",
|
|
49
49
|
"es:group-focus:outline-hidden es:group-focus:border-accent-500 es:group-focus:ring-2 es:group-focus:ring-accent-500/50"
|
|
50
50
|
),
|
|
51
|
+
open: allOpen,
|
|
52
|
+
onOpenChange: (open) => {
|
|
53
|
+
if (allOpen && !open) {
|
|
54
|
+
setAllOpen(false);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
51
57
|
customOpenButton: ({ open, toggleOpen, tooltip, disabled }) => {
|
|
52
58
|
return /* @__PURE__ */ jsxs("div", { className: "es:flex es:items-center es:gap-px", children: [
|
|
53
59
|
/* @__PURE__ */ jsxs(
|
|
@@ -104,7 +110,8 @@ const RepeaterItem = (props) => {
|
|
|
104
110
|
noFocusHandling: true,
|
|
105
111
|
...rest,
|
|
106
112
|
children
|
|
107
|
-
}
|
|
113
|
+
},
|
|
114
|
+
allOpen
|
|
108
115
|
);
|
|
109
116
|
};
|
|
110
117
|
export {
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { jsxs,
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useId, useState } from "react";
|
|
3
|
+
import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
|
|
3
4
|
import { Button } from "../button/button.js";
|
|
4
5
|
import { icons } from "../../icons/icons.js";
|
|
5
|
-
import { useId } from "react";
|
|
6
6
|
import { BaseControl } from "../base-control/base-control.js";
|
|
7
7
|
import { AnimatedVisibility } from "../animated-visibility/animated-visibility.js";
|
|
8
8
|
import { RepeaterContext } from "./repeater-context.js";
|
|
9
9
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
10
|
-
import { L as List, a as arrayRemove, b as arrayMove } from "../../List-
|
|
10
|
+
import { L as List, a as arrayRemove, b as arrayMove } from "../../List-CZMUbkFU.js";
|
|
11
|
+
import { Menu, MenuItem, MenuSeparator } from "../menu/menu.js";
|
|
11
12
|
const fixIds = (items, itemIdBase) => {
|
|
12
13
|
return items == null ? void 0 : items.map((item, i) => ({
|
|
13
14
|
...item,
|
|
@@ -36,6 +37,8 @@ const fixIds = (items, itemIdBase) => {
|
|
|
36
37
|
* @param {boolean} [props.hidden] - If `true`, the component is not rendered.
|
|
37
38
|
* @param {JSX.Element} [props.addButton] - If provided, overrides the default add button. `(props: { addItem: (additional: Object<string, any>?) => void, disabled: Boolean }) => JSX.Element`.
|
|
38
39
|
* @param {string} [props.className] - Classes to pass to the item wrapper.
|
|
40
|
+
* @param {boolean} [props.noExpandAllButton] - If `true`, the "Expand all"/"Collapse all" button is not displayed.
|
|
41
|
+
* @param {JSX.Element|JSX.Element[]} [props.moreOptions] - Options to add in the "More options" menu.
|
|
39
42
|
* @param {JSX.Element} [props.emptyState] - Allows overriding the default empty state.
|
|
40
43
|
*
|
|
41
44
|
* @returns {JSX.Element} The Repeater component.
|
|
@@ -88,8 +91,11 @@ const Repeater = (props) => {
|
|
|
88
91
|
addButton,
|
|
89
92
|
className,
|
|
90
93
|
emptyState,
|
|
94
|
+
noExpandAllButton,
|
|
95
|
+
moreOptions,
|
|
91
96
|
hidden
|
|
92
97
|
} = props;
|
|
98
|
+
const [allOpen, setAllOpen] = useState(false);
|
|
93
99
|
if (typeof rawItems === "undefined" || rawItems === null || !Array.isArray(rawItems)) {
|
|
94
100
|
console.warn(__("Repeater: 'items' are not an array or are undefined!", "eightshift-ui-components"));
|
|
95
101
|
}
|
|
@@ -108,6 +114,27 @@ const Repeater = (props) => {
|
|
|
108
114
|
help,
|
|
109
115
|
actions: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
110
116
|
actions,
|
|
117
|
+
/* @__PURE__ */ jsxs(
|
|
118
|
+
Menu,
|
|
119
|
+
{
|
|
120
|
+
tooltip: __("More options", "eightshift-ui-components"),
|
|
121
|
+
triggerIcon: icons.moreH,
|
|
122
|
+
triggerProps: { type: "ghost", size: "small" },
|
|
123
|
+
hidden: (items == null ? void 0 : items.length) < 1 || noExpandAllButton && !moreOptions,
|
|
124
|
+
children: [
|
|
125
|
+
!noExpandAllButton && /* @__PURE__ */ jsx(
|
|
126
|
+
MenuItem,
|
|
127
|
+
{
|
|
128
|
+
endIcon: allOpen ? icons.panelCollapse : icons.panelExpand,
|
|
129
|
+
onClick: () => setAllOpen(!allOpen),
|
|
130
|
+
children: allOpen ? __("Collapse all", "eightshift-ui-components") : __("Expand all", "eightshift-ui-components")
|
|
131
|
+
}
|
|
132
|
+
),
|
|
133
|
+
moreOptions && /* @__PURE__ */ jsx(MenuSeparator, {}),
|
|
134
|
+
moreOptions
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
),
|
|
111
138
|
!addButton && /* @__PURE__ */ jsx(
|
|
112
139
|
Button,
|
|
113
140
|
{
|
|
@@ -185,7 +212,9 @@ const Repeater = (props) => {
|
|
|
185
212
|
isOutOfBounds,
|
|
186
213
|
isSelected,
|
|
187
214
|
canDelete,
|
|
188
|
-
canAdd
|
|
215
|
+
canAdd,
|
|
216
|
+
allOpen,
|
|
217
|
+
setAllOpen
|
|
189
218
|
},
|
|
190
219
|
children: children({
|
|
191
220
|
...item,
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import { cloneElement } from "react";
|
|
3
3
|
import { DecorativeTooltip } from "../tooltip/tooltip.js";
|
|
4
4
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
5
|
-
import { _ as __, s as sprintf } from "../../default-i18n-
|
|
5
|
+
import { _ as __, s as sprintf } from "../../default-i18n-CT_oS1Fy.js";
|
|
6
6
|
import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
|
|
7
7
|
import { upperFirst } from "../../utilities/es-dash.js";
|
|
8
8
|
import { icons } from "../../icons/icons.js";
|
|
@@ -12,7 +12,7 @@ import { Spacer } from "../spacer/spacer.js";
|
|
|
12
12
|
import { BaseControl } from "../base-control/base-control.js";
|
|
13
13
|
import { TriggeredPopover } from "../popover/popover.js";
|
|
14
14
|
import { OptionSelect } from "../option-select/option-select.js";
|
|
15
|
-
import { $ as $514c0188e459b4c0$export$5f1af8db9871e1d6 } from "../../Text-
|
|
15
|
+
import { $ as $514c0188e459b4c0$export$5f1af8db9871e1d6 } from "../../Text-DVSAPY-K.js";
|
|
16
16
|
/**
|
|
17
17
|
* A compact, inline version of `Responsive`. Allows the user to set different values for different breakpoints.
|
|
18
18
|
*
|
|
@@ -40,6 +40,7 @@ import { $ as $514c0188e459b4c0$export$5f1af8db9871e1d6 } from "../../Text-aOUPP
|
|
|
40
40
|
* @param {Object<string, number>} [props.breakpointUiData] - Allows overriding breakpoint names and icons. `{ [breakpoint: string]: { label: string, icon: JSX.Element|string } }`.
|
|
41
41
|
* @param {boolean} [props.noModeSelect] - If `true`, the mode selection (desktop-first/mobile-first) is hidden.
|
|
42
42
|
* @param {boolean} [props.hidden] - If `true`, the component is not rendered.
|
|
43
|
+
* @param {boolean} [props.useLegacyDesktopFirst] - If `true`, the legacy desktop-first mode is used. This is only for backwards compatibility.
|
|
43
44
|
* @param {'start' | 'center' | 'end' | 'stretch'} [props.innerContentAlign='start'] - Determines inner content alignment
|
|
44
45
|
*
|
|
45
46
|
* @returns {JSX.Element} The MiniResponsive component.
|
|
@@ -86,6 +87,7 @@ const MiniResponsive = (props) => {
|
|
|
86
87
|
noModeSelect,
|
|
87
88
|
children,
|
|
88
89
|
hidden,
|
|
90
|
+
useLegacyDesktopFirst,
|
|
89
91
|
innerContentAlign = "start"
|
|
90
92
|
} = props;
|
|
91
93
|
if (typeof rawBreakpoints === "undefined" || !Array.isArray(rawBreakpoints)) {
|
|
@@ -93,9 +95,10 @@ const MiniResponsive = (props) => {
|
|
|
93
95
|
return null;
|
|
94
96
|
}
|
|
95
97
|
const breakpoints = rawBreakpoints.slice(1);
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
let desktopFirstBreakpoints = (rawDesktopFirstBreakpoints ?? rawBreakpoints.slice(1)).map((breakpoint) => breakpoint.startsWith("max-") ? breakpoint : `max-${breakpoint}`);
|
|
99
|
+
if (useLegacyDesktopFirst) {
|
|
100
|
+
desktopFirstBreakpoints = (rawDesktopFirstBreakpoints ?? rawBreakpoints.slice(0, -1)).map((breakpoint) => breakpoint.startsWith("max-") ? breakpoint : `max-${breakpoint}`);
|
|
101
|
+
}
|
|
99
102
|
const isDesktopFirst = (value == null ? void 0 : value["_desktopFirst"]) === true;
|
|
100
103
|
const firstMobileFirstOverride = breakpoints.find((breakpoint) => typeof (value == null ? void 0 : value[breakpoint]) !== "undefined");
|
|
101
104
|
const lastDesktopFirstOverride = desktopFirstBreakpoints.toReversed().find((breakpoint) => typeof (value == null ? void 0 : value[breakpoint]) !== "undefined");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs,
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { DecorativeTooltip } from "../tooltip/tooltip.js";
|
|
4
4
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
5
|
-
import {
|
|
5
|
+
import { s as sprintf, _ as __ } from "../../default-i18n-CT_oS1Fy.js";
|
|
6
6
|
import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
|
|
7
7
|
import { upperFirst } from "../../utilities/es-dash.js";
|
|
8
8
|
import { icons } from "../../icons/icons.js";
|