@eightshift/ui-components 5.2.1 → 5.3.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-RTwMSBs-.js → Button-npzfSoYo.js} +3 -3
- package/dist/{Dialog-Xf6AsnV-.js → Dialog-CQ8H6Noi.js} +77 -50
- package/dist/{FocusScope-BnwM-e8R.js → FocusScope-DJApHXhY.js} +1 -1
- package/dist/Form-Cq3fu75_.js +5 -0
- package/dist/{Group-C4cXobNT.js → Input-ChJaTNa5.js} +39 -39
- package/dist/{List-CwJTORxj.js → List-BiAnh5G5.js} +5 -5
- package/dist/{ListBox-BeC97FZ4.js → ListBox-D0Stb4wr.js} +13 -23
- package/dist/{OverlayArrow-EZ0v_ljk.js → OverlayArrow-DivvkAVb.js} +46 -25
- package/dist/{Separator-Fl7qSeN-.js → SearchField-jVsbJe1O.js} +151 -475
- package/dist/{Select-DEQf8ZWI.js → Select-ciHB1pub.js} +12 -11
- package/dist/{Select-ef7c0426.esm-D6WOCaYm.js → Select-ef7c0426.esm-CmTkSxDx.js} +3 -3
- package/dist/{Collection-D_KhdLDC.js → SelectionManager-CabSdgMq.js} +1801 -1777
- package/dist/Separator-BPvqJny4.js +344 -0
- package/dist/{Slider-BQFSEhvk.js → Slider-ChP04COa.js} +4 -4
- package/dist/{VisuallyHidden-D9s7FTtC.js → VisuallyHidden-X6SggVVO.js} +1 -1
- package/dist/assets/style-admin.css +315 -79
- package/dist/assets/style-editor.css +315 -79
- package/dist/assets/style.css +315 -79
- package/dist/assets/wp-font-enhancements.css +1 -1
- package/dist/assets/wp-ui-enhancements.css +5 -14
- package/dist/components/animated-visibility/animated-visibility.js +16 -16
- package/dist/components/button/button.js +28 -23
- package/dist/components/checkbox/checkbox.js +11 -10
- package/dist/components/color-pickers/color-picker.js +5 -4
- package/dist/components/color-pickers/color-swatch.js +1 -1
- package/dist/components/color-pickers/gradient-editor.js +7 -7
- package/dist/components/color-pickers/solid-color-picker.js +8 -8
- package/dist/components/component-toggle/component-toggle.js +1 -1
- package/dist/components/draggable/draggable-handle.js +1 -1
- package/dist/components/draggable/draggable.js +34 -17
- package/dist/components/draggable-list/draggable-list-item.js +1 -1
- package/dist/components/draggable-list/draggable-list.js +6 -4
- package/dist/components/expandable/expandable.js +5 -5
- package/dist/components/index.js +2 -1
- package/dist/components/input-field/input-field.js +139 -3
- package/dist/components/item-collection/item-collection.js +1 -1
- package/dist/components/link-input/link-input.js +16 -15
- package/dist/components/matrix-align/matrix-align.js +1 -1
- package/dist/components/menu/menu.js +94 -24
- package/dist/components/modal/modal.js +4 -4
- package/dist/components/notice/notice.js +6 -5
- package/dist/components/number-picker/number-picker.js +5 -5
- package/dist/components/option-select/option-select.js +1 -1
- package/dist/components/placeholders/file-placeholder.js +1 -1
- package/dist/components/popover/popover.js +28 -21
- package/dist/components/radio/radio.js +7 -6
- package/dist/components/repeater/repeater-item.js +1 -1
- package/dist/components/repeater/repeater.js +2 -2
- package/dist/components/responsive/mini-responsive.js +1 -1
- package/dist/components/responsive/responsive-legacy.js +1 -1
- package/dist/components/responsive/responsive.js +21 -20
- package/dist/components/responsive-preview/responsive-preview.js +1 -1
- package/dist/components/rich-label/rich-label.js +28 -15
- package/dist/components/select/async-multi-select.js +3 -3
- package/dist/components/select/async-single-select.js +2 -2
- package/dist/components/select/custom-select-default-components.js +1 -1
- package/dist/components/select/multi-select-components.js +1 -1
- package/dist/components/select/multi-select.js +3 -3
- package/dist/components/select/react-select-component-wrappers.js +1 -1
- package/dist/components/select/single-select.js +2 -2
- package/dist/components/select/styles.js +1 -1
- package/dist/components/select/v2/async-multi-select.js +9 -9
- package/dist/components/select/v2/async-select.js +9 -9
- package/dist/components/select/v2/multi-select.js +8 -8
- package/dist/components/select/v2/shared.js +1 -1
- package/dist/components/select/v2/single-select.js +8 -8
- package/dist/components/slider/column-config-slider.js +2 -2
- package/dist/components/slider/slider.js +1 -1
- package/dist/components/slider/utils.js +1 -1
- package/dist/components/tabs/tabs.js +13 -9
- package/dist/components/toggle/switch.js +5 -5
- package/dist/components/toggle-button/toggle-button.js +7 -7
- package/dist/components/tooltip/tooltip.js +35 -35
- package/dist/context-DCAZLyDS.js +7 -0
- package/dist/{default-i18n-DY6EfUSA.js → default-i18n-CN_q3KUs.js} +15 -56
- package/dist/icons/icons.js +3347 -30273
- package/dist/{index-641ee5b8.esm-Bu-mgopl.js → index-641ee5b8.esm-DVp0njHa.js} +10 -8
- package/dist/{index-CBHA_HDD.js → index-D8-Zjpbd.js} +18 -18
- package/dist/index.js +2 -1
- package/dist/{multi-select-components-rCCyCaKO.js → multi-select-components-CT_W0Cy9.js} +1 -1
- package/dist/{react-select-async.esm-XYrsKYb2.js → react-select-async.esm-Zl1LPaPb.js} +3 -3
- package/dist/{react-select.esm-CCSPY6XR.js → react-select.esm-Bu36HujU.js} +3 -3
- package/dist/{textSelection-D5tWX1rJ.js → textSelection-k0u64dDA.js} +1 -1
- package/dist/{useAsyncList-ZqaIH2gh.js → useAsyncList-D52mQcrH.js} +30 -0
- package/dist/{useButton-BtJSiQi3.js → useButton-Bn4ZT295.js} +4 -3
- package/dist/{useDragAndDrop-CddFteYC.js → useDragAndDrop-DVLrIdEn.js} +18 -10
- package/dist/{useFilter-Cl2ggwwq.js → useFilter-C4wo8Iii.js} +1 -1
- package/dist/{useFocusRing-D5BfOWag.js → useFocusRing-CUxgjvAY.js} +1 -1
- package/dist/{Form-BeMxJA29.js → useFormValidation-CUtZcedF.js} +5 -7
- package/dist/{useHover-44IApaa2.js → useHover-LmGemtHE.js} +24 -24
- package/dist/{useListState-BSkHuB7-.js → useListState-Xsk-aOvN.js} +8 -5
- package/dist/{useNumberField-JhWPy1JY.js → useNumberField-BCjjZWaz.js} +100 -99
- package/dist/{usePress-BnrkvZ7e.js → usePress-CBQIDzpQ.js} +12 -12
- package/dist/{useSingleSelectListState-CzJFsSHr.js → useSingleSelectListState-DattSD7d.js} +2 -2
- package/dist/{useToggle-OaIBlwRu.js → useToggle-C8CedY6Z.js} +2 -2
- package/dist/{useToggleState-BF8hvidm.js → useToggleState-CiAradXs.js} +1 -1
- package/package.json +26 -26
- package/dist/TextField-x_eEa_qR.js +0 -143
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tailwindcss v4.1.
|
|
1
|
+
/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */
|
|
2
2
|
.edit-post-header, .components-popover, .edit-post-sidebar, .wp-block-post-title, .components-select-control__input, .components-base-control__field, .components-base-control__label, .components-combobox-control__suggestions-container, .components-input-control__label, .components-input-control__input, .components-checkbox-control__label, .components-menu-group__label, .components-menu-item__button, .components-notice .components-notice__content, .components-tooltip, .components-modal__header, .preferences-modal__section-title, .preferences-modal__section-description, .block-editor-inserter__tabs, .editor-list-view-sidebar, .edit-post-layout__footer, .components-snackbar, .components-text-control__input {
|
|
3
3
|
font-family: var(--es-font-sans, "Geist Variable", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tailwindcss v4.1.
|
|
1
|
+
/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties {
|
|
3
3
|
@supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
|
|
4
4
|
*, :before, :after, ::backdrop {
|
|
@@ -193,27 +193,18 @@
|
|
|
193
193
|
border-style: var(--tw-border-style);
|
|
194
194
|
border-width: 1px;
|
|
195
195
|
border-color: var(--es-color-gray-800, oklch(27.8% .033 256.848));
|
|
196
|
-
background-color: var(--es-color-gray-950, oklch(13% .028 261.692));
|
|
197
|
-
border-radius: var(--es-radius-md, .375rem) !important;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
201
|
-
.components-tooltip {
|
|
202
|
-
background-color: color-mix(in oklab, var(--es-color-gray-950, oklch(13% .028 261.692)) 70%, transparent);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.components-tooltip {
|
|
196
|
+
background-color: color-mix(in oklab, var(--es-color-gray-950, oklch(13% .028 261.692)) 70%, transparent);
|
|
207
197
|
padding-inline: calc(var(--es-spacing, .25rem) * 1);
|
|
208
198
|
padding-block: calc(var(--es-spacing, .25rem) * .5);
|
|
209
199
|
color: var(--es-color-white, #fff);
|
|
210
200
|
--tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, #0000001a), 0 2px 4px -2px var(--tw-shadow-color, #0000001a);
|
|
211
201
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
212
202
|
--tw-backdrop-blur: blur(var(--es-blur-xl, 24px));
|
|
213
|
-
-webkit-backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
|
|
214
|
-
backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
|
|
215
203
|
--tw-backdrop-brightness: brightness(105%);
|
|
216
204
|
--tw-backdrop-saturate: saturate(150%);
|
|
205
|
+
-webkit-backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
|
|
206
|
+
backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
|
|
207
|
+
border-radius: var(--es-radius-md, .375rem) !important;
|
|
217
208
|
}
|
|
218
209
|
|
|
219
210
|
.components-tooltip:has( > :first-child) {
|
|
@@ -45,36 +45,36 @@ const AnimatedVisibility = (props) => {
|
|
|
45
45
|
}, []);
|
|
46
46
|
const transitions = {
|
|
47
47
|
fade: {
|
|
48
|
-
inClassName: "es:motion-opacity-in es:motion-duration-
|
|
49
|
-
outClassName: "es:motion-opacity-out es:motion-duration-
|
|
48
|
+
inClassName: "es:motion-opacity-in es:motion-duration-500",
|
|
49
|
+
outClassName: "es:motion-opacity-out es:motion-duration-300"
|
|
50
50
|
},
|
|
51
51
|
slideFade: {
|
|
52
|
-
inClassName: "es:motion-safe:motion-translate-y-in-[-5%] es:motion-opacity-in es:motion-duration-
|
|
53
|
-
outClassName: "es:motion-safe:motion-translate-y-out-[-5%] es:motion-opacity-out es:motion-duration-
|
|
52
|
+
inClassName: "es:motion-safe:motion-translate-y-in-[-5%] es:motion-opacity-in es:motion-duration-500 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity",
|
|
53
|
+
outClassName: "es:motion-safe:motion-translate-y-out-[-5%] es:motion-opacity-out es:motion-duration-300 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity"
|
|
54
54
|
},
|
|
55
55
|
slideInFadeOut: {
|
|
56
|
-
inClassName: "es:motion-safe:motion-translate-y-in-[-5%] es:motion-opacity-in es:motion-duration-
|
|
57
|
-
outClassName: "es:motion-opacity-out es:motion-duration-
|
|
56
|
+
inClassName: "es:motion-safe:motion-translate-y-in-[-5%] es:motion-opacity-in es:motion-duration-500 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity",
|
|
57
|
+
outClassName: "es:motion-opacity-out es:motion-duration-300"
|
|
58
58
|
},
|
|
59
59
|
slideFadeUpSlight: {
|
|
60
|
-
inClassName: "es:motion-safe:motion-translate-y-in-[0.25rem] es:motion-opacity-in es:motion-duration-
|
|
61
|
-
outClassName: "es:motion-safe:motion-translate-y-out-[0.25rem] es:motion-opacity-out es:motion-duration-
|
|
60
|
+
inClassName: "es:motion-safe:motion-translate-y-in-[0.25rem] es:motion-opacity-in es:motion-duration-500 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity",
|
|
61
|
+
outClassName: "es:motion-safe:motion-translate-y-out-[0.25rem] es:motion-opacity-out es:motion-duration-300 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity"
|
|
62
62
|
},
|
|
63
63
|
slideFadeDownSlight: {
|
|
64
|
-
inClassName: "es:motion-safe:motion-translate-y-in-[-0.25rem] es:motion-opacity-in es:motion-duration-
|
|
65
|
-
outClassName: "es:motion-safe:motion-translate-y-out-[-0.25rem] es:motion-opacity-out es:motion-duration-
|
|
64
|
+
inClassName: "es:motion-safe:motion-translate-y-in-[-0.25rem] es:motion-opacity-in es:motion-duration-500 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity",
|
|
65
|
+
outClassName: "es:motion-safe:motion-translate-y-out-[-0.25rem] es:motion-opacity-out es:motion-duration-300 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity"
|
|
66
66
|
},
|
|
67
67
|
scaleFade: {
|
|
68
|
-
inClassName: "es:motion-safe:motion-scale-in-95 es:motion-opacity-in es:motion-duration-
|
|
69
|
-
outClassName: "es:motion-safe:motion-scale-out-90 es:motion-opacity-out es:motion-duration-
|
|
68
|
+
inClassName: "es:motion-safe:motion-scale-in-95 es:motion-opacity-in es:motion-duration-500 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity",
|
|
69
|
+
outClassName: "es:motion-safe:motion-scale-out-90 es:motion-opacity-out es:motion-duration-300 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity"
|
|
70
70
|
},
|
|
71
71
|
scaleSlideFade: {
|
|
72
|
-
inClassName: "es:motion-safe:motion-translate-y-in-[-5%] es:motion-safe:motion-scale-in-95 es:motion-opacity-in es:motion-duration-
|
|
73
|
-
outClassName: "es:motion-safe:motion-translate-y-out-[-5%] es:motion-safe:motion-scale-out-90 es:motion-opacity-out es:motion-duration-
|
|
72
|
+
inClassName: "es:motion-safe:motion-translate-y-in-[-5%] es:motion-safe:motion-scale-in-95 es:motion-opacity-in es:motion-duration-500 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity",
|
|
73
|
+
outClassName: "es:motion-safe:motion-translate-y-out-[-5%] es:motion-safe:motion-scale-out-90 es:motion-opacity-out es:motion-duration-300 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity"
|
|
74
74
|
},
|
|
75
75
|
scaleRotateFade: {
|
|
76
|
-
inClassName: "es:motion-rotate-in es:motion-safe:motion-scale-in-95 es:motion-opacity-in es:motion-duration-
|
|
77
|
-
outClassName: "es:motion-rotate-out es:motion-safe:motion-scale-out-90 es:motion-opacity-out es:motion-duration-
|
|
76
|
+
inClassName: "es:motion-rotate-in es:motion-safe:motion-scale-in-95 es:motion-opacity-in es:motion-duration-500 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity",
|
|
77
|
+
outClassName: "es:motion-rotate-out es:motion-safe:motion-scale-out-90 es:motion-opacity-out es:motion-duration-300 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity"
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
80
|
return /* @__PURE__ */ jsx(Fragment, { children: isVisibleInner && /* @__PURE__ */ jsx(
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1, b as $0393f8ab869a0f1a$export$c17561cb55d4db30 } from "../../Button-
|
|
2
|
+
import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1, b as $0393f8ab869a0f1a$export$c17561cb55d4db30 } from "../../Button-npzfSoYo.js";
|
|
3
3
|
import { k as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, a as $64fa3d84918910a7$export$29f1550f4b0d4415, h as $64fa3d84918910a7$export$4d86445c2cf5e3, b as $3ef42575df84b30b$export$9d1611c77c2fe928, l as $df56164dff5785e2$export$4338b53315abf666 } from "../../utils-cvK1vxO7.js";
|
|
4
|
-
import { $ as $9bf71ea28793e738$export$c5251b9e124bf29 } from "../../FocusScope-
|
|
4
|
+
import { $ as $9bf71ea28793e738$export$c5251b9e124bf29 } from "../../FocusScope-DJApHXhY.js";
|
|
5
5
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-D2C6R0DK.js";
|
|
6
6
|
import React__default, { useState, useRef, forwardRef, createContext, cloneElement } from "react";
|
|
7
7
|
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-DMOmz986.js";
|
|
8
8
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
9
9
|
import { c as cva } from "../../index-Dq3gT5pW.js";
|
|
10
10
|
import { Tooltip } from "../tooltip/tooltip.js";
|
|
11
|
-
import { _ as __ } from "../../default-i18n-
|
|
11
|
+
import { _ as __ } from "../../default-i18n-CN_q3KUs.js";
|
|
12
12
|
import { icons } from "../../icons/icons.js";
|
|
13
13
|
import "../../react-jsx-parser.min-LF707GK8.js";
|
|
14
14
|
function $2680b1829e803644$export$fa142eb1681c520(props, ref) {
|
|
@@ -89,30 +89,35 @@ const $13c3c67164f4d5be$export$4c260019440d418f = /* @__PURE__ */ forwardRef(fun
|
|
|
89
89
|
"data-orientation": props.orientation || "horizontal"
|
|
90
90
|
}, renderProps.children);
|
|
91
91
|
});
|
|
92
|
+
/**
|
|
93
|
+
* @typedef {Object} ButtonProps
|
|
94
|
+
* @property {JSX.Element} [props.icon] - Icon to display within the button.
|
|
95
|
+
* @property {ButtonSize} [props.size='default'] - The size of the button.
|
|
96
|
+
* @property {ButtonType} [props.type='default'] - The type of the button.
|
|
97
|
+
* @property {boolean} [props.disabled] - If `true`, the button is disabled.
|
|
98
|
+
* @property {string} [props.className] - Classes to pass to the button.
|
|
99
|
+
* @property {string|boolean} [props.tooltip] - Tooltip text to display on hover. If set to `true` and an `aria-label` is not provided, the tooltip text will be used as the `aria-label`.
|
|
100
|
+
* @property {Function} [props.onPress] - Function to run when the button is pressed.
|
|
101
|
+
* @property {React.Ref} [props.forwardedRef] - Ref to forward to the button. Use the same as the `ref` prop.
|
|
102
|
+
* @property {string} [props.wrapperClassName] - Classes to pass to the tooltip wrapper.
|
|
103
|
+
* @property {TooltipProps} [props.tooltipProps] - Props to pass to the tooltip.
|
|
104
|
+
* @property {boolean} [props.pending] - If `true`, the button is in a pending state, which can be used to indicate that an action is being processed.
|
|
105
|
+
* @property {string} [props.pendingAriaLabel='Loading'] - ARIA label for the pending state, used for screen readers.
|
|
106
|
+
* @property {boolean} [props.hidden] - If `true`, the component is not rendered.
|
|
107
|
+
*
|
|
108
|
+
* @typedef {'small' | 'default' | 'large'} ButtonSize
|
|
109
|
+
* @typedef {'default' | 'selected' | 'selectedGhost' | 'ghost' | 'danger' | 'dangerGhost'} ButtonType
|
|
110
|
+
*
|
|
111
|
+
* @preserve
|
|
112
|
+
*/
|
|
92
113
|
/**
|
|
93
114
|
* A simple button component.
|
|
94
115
|
*
|
|
95
116
|
* @component
|
|
96
|
-
* @param {
|
|
97
|
-
* @param {JSX.Element} [props.icon] - Icon to display within the button.
|
|
98
|
-
* @param {ButtonSize} [props.size='default'] - The size of the button.
|
|
99
|
-
* @param {ButtonType} [props.type='default'] - The type of the button.
|
|
100
|
-
* @param {boolean} [props.disabled] - If `true`, the button is disabled.
|
|
101
|
-
* @param {string} [props.className] - Classes to pass to the button.
|
|
102
|
-
* @param {string|boolean} [props.tooltip] - Tooltip text to display on hover. If set to `true` and an `aria-label` is not provided, the tooltip text will be used as the `aria-label`.
|
|
103
|
-
* @param {Function} [props.onPress] - Function to run when the button is pressed.
|
|
104
|
-
* @param {React.Ref} [props.forwardedRef] - Ref to forward to the button. Use the same as the `ref` prop.
|
|
105
|
-
* @param {string} [props.wrapperClassName] - Classes to pass to the tooltip wrapper.
|
|
106
|
-
* @param {Object} [props.tooltipProps] - Props to pass to the tooltip.
|
|
107
|
-
* @param {boolean} [props.pending] - If `true`, the button is in a pending state, which can be used to indicate that an action is being processed.
|
|
108
|
-
* @param {string} [props.pendingAriaLabel='Loading'] - ARIA label for the pending state, used for screen readers.
|
|
109
|
-
* @param {boolean} [props.hidden] - If `true`, the component is not rendered.
|
|
117
|
+
* @param {ButtonProps} props - Component props.
|
|
110
118
|
*
|
|
111
119
|
* @returns {JSX.Element} The Button component.
|
|
112
120
|
*
|
|
113
|
-
* @typedef {'small' | 'default' | 'large'} ButtonSize
|
|
114
|
-
* @typedef {'default' | 'selected' | 'selectedGhost' | 'ghost' | 'danger' | 'dangerGhost'} ButtonType
|
|
115
|
-
*
|
|
116
121
|
* @example
|
|
117
122
|
* <Button onPress={() => console.log('Hi!')} icon={icons.myIcon} />
|
|
118
123
|
*
|
|
@@ -166,8 +171,8 @@ const Button = (props) => {
|
|
|
166
171
|
{
|
|
167
172
|
variants: {
|
|
168
173
|
size: {
|
|
169
|
-
small: "es:icon:size-
|
|
170
|
-
default: "es:icon:size-5
|
|
174
|
+
small: "es:icon:size-5 es:rounded-7",
|
|
175
|
+
default: "es:icon:size-5 es:rounded-10",
|
|
171
176
|
large: "es:icon:size-6 es:rounded-xl"
|
|
172
177
|
},
|
|
173
178
|
type: {
|
|
@@ -198,7 +203,7 @@ const Button = (props) => {
|
|
|
198
203
|
disabled: false,
|
|
199
204
|
class: [
|
|
200
205
|
"es:text-black",
|
|
201
|
-
"es:from-
|
|
206
|
+
"es:from-white es:to-secondary-50",
|
|
202
207
|
"es:border-secondary-300",
|
|
203
208
|
"es:inset-ring-secondary-100",
|
|
204
209
|
"es:inset-shadow-secondary-100/50",
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { a as $4e85f108e88277b8$export$b085522c77523c51 } from "../../RSPContexts-2lR5GG9p.js";
|
|
3
3
|
import { b as $3ef42575df84b30b$export$9d1611c77c2fe928, a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, l as $df56164dff5785e2$export$4338b53315abf666, m as $5dc95899b306f630$export$c9058316764c140e, g as $64fa3d84918910a7$export$ef03459518577ad4, h as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "../../utils-cvK1vxO7.js";
|
|
4
|
-
import {
|
|
4
|
+
import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "../../Form-Cq3fu75_.js";
|
|
5
5
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-D2C6R0DK.js";
|
|
6
6
|
import React__default, { useEffect, useRef, forwardRef, useContext, createContext, useMemo } from "react";
|
|
7
|
-
import { $ as $
|
|
8
|
-
import { $ as $
|
|
9
|
-
import { $ as $
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
7
|
+
import { $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, a as $e93e671b31057976$export$b8473d3665f3a75a, b as $e5be200c675c3b3a$export$a763b9476acd3eb, c as $e5be200c675c3b3a$export$dad6ae84456c676a } from "../../useFormValidation-CUtZcedF.js";
|
|
8
|
+
import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "../../usePress-CBQIDzpQ.js";
|
|
9
|
+
import { $ as $d2c8e2b0480f3f34$export$cbe85ee05b554577 } from "../../useToggle-C8CedY6Z.js";
|
|
10
|
+
import { $ as $3017fa7ffdddec74$export$8042c6c013fd5226 } from "../../useToggleState-CiAradXs.js";
|
|
11
|
+
import { a as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-CUxgjvAY.js";
|
|
12
|
+
import { w as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-LmGemtHE.js";
|
|
13
|
+
import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "../../VisuallyHidden-X6SggVVO.js";
|
|
13
14
|
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-DWVaNd2E.js";
|
|
14
15
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
15
16
|
import { AnimatedVisibility } from "../animated-visibility/animated-visibility.js";
|
|
@@ -258,7 +259,7 @@ const Checkbox2 = (props) => {
|
|
|
258
259
|
icon,
|
|
259
260
|
label,
|
|
260
261
|
subtitle,
|
|
261
|
-
className:
|
|
262
|
+
className: labelClassName,
|
|
262
263
|
inlineSubtitle,
|
|
263
264
|
fullSizeSubtitle: true,
|
|
264
265
|
fullWidth: true,
|
|
@@ -298,7 +299,7 @@ const Checkbox2 = (props) => {
|
|
|
298
299
|
{
|
|
299
300
|
transition: "scaleRotateFade",
|
|
300
301
|
visible: !indeterminate && checked,
|
|
301
|
-
className: "es:transition-none es:icon:size-
|
|
302
|
+
className: "es:transition-none es:icon:size-4 es:icon:stroke-2",
|
|
302
303
|
noInitial: true,
|
|
303
304
|
children: icons.check
|
|
304
305
|
}
|
|
@@ -306,7 +307,7 @@ const Checkbox2 = (props) => {
|
|
|
306
307
|
]
|
|
307
308
|
}
|
|
308
309
|
),
|
|
309
|
-
!icon &&
|
|
310
|
+
!icon && (label || subtitle) && /* @__PURE__ */ jsx(
|
|
310
311
|
RichLabel,
|
|
311
312
|
{
|
|
312
313
|
label,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { _ as __ } from "../../default-i18n-
|
|
2
|
+
import { _ as __ } from "../../default-i18n-CN_q3KUs.js";
|
|
3
3
|
import { Menu, MenuItem, MenuSeparator, MenuSection } from "../menu/menu.js";
|
|
4
4
|
import { ColorSwatch } from "./color-swatch.js";
|
|
5
5
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
@@ -115,7 +115,7 @@ const ColorPicker = (props) => {
|
|
|
115
115
|
endIcon: /* @__PURE__ */ jsx(
|
|
116
116
|
ColorSwatch,
|
|
117
117
|
{
|
|
118
|
-
className: "es:size-5
|
|
118
|
+
className: "es:size-5!",
|
|
119
119
|
color
|
|
120
120
|
}
|
|
121
121
|
),
|
|
@@ -127,7 +127,8 @@ const ColorPicker = (props) => {
|
|
|
127
127
|
RichLabel,
|
|
128
128
|
{
|
|
129
129
|
label: name.replaceAll("-", " "),
|
|
130
|
-
subtitle: color.toUpperCase()
|
|
130
|
+
subtitle: color.toUpperCase(),
|
|
131
|
+
subtitleClassName: "es:font-mono"
|
|
131
132
|
}
|
|
132
133
|
)
|
|
133
134
|
]
|
|
@@ -216,7 +217,7 @@ const ColorPicker = (props) => {
|
|
|
216
217
|
{
|
|
217
218
|
onClick: () => onChange(void 0),
|
|
218
219
|
selected: typeof value === "undefined",
|
|
219
|
-
endIcon: /* @__PURE__ */ jsx(ColorSwatch, { className: "es:size-5
|
|
220
|
+
endIcon: /* @__PURE__ */ jsx(ColorSwatch, { className: "es:size-5!" }),
|
|
220
221
|
children: clearItemLabel
|
|
221
222
|
}
|
|
222
223
|
),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { $ as $251c695a52d94a8d$export$cae13e90592f246a } from "../../ColorSwatch-xVS3rMYS.js";
|
|
3
3
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
4
|
-
import { _ as __ } from "../../default-i18n-
|
|
4
|
+
import { _ as __ } from "../../default-i18n-CN_q3KUs.js";
|
|
5
5
|
import { $ as $799cddbef784668f$export$6e865ea70d7724f } from "../../Color-WxFE7lQB.js";
|
|
6
6
|
/**
|
|
7
7
|
* A simple color/gradient swatch.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { s as sprintf } from "../../sprintf-DmNrJSYG.js";
|
|
3
|
-
import { _ as __ } from "../../default-i18n-
|
|
3
|
+
import { _ as __ } from "../../default-i18n-CN_q3KUs.js";
|
|
4
4
|
import { useMemo, useState } from "react";
|
|
5
5
|
import { ButtonGroup, Button } from "../button/button.js";
|
|
6
6
|
import { icons } from "../../icons/icons.js";
|
|
@@ -31,14 +31,14 @@ function g(e) {
|
|
|
31
31
|
}
|
|
32
32
|
return o;
|
|
33
33
|
}
|
|
34
|
-
var u = /^(-?\d+\.?\d*)(%|vw|vh|px|em|rem|deg|rad|grad|turn)
|
|
34
|
+
var u = /^(-?\d+\.?\d*)(%|vw|vh|px|em|rem|deg|rad|grad|turn|ch|vmin|vmax)?$/;
|
|
35
35
|
function m(e) {
|
|
36
36
|
return u.test(e);
|
|
37
37
|
}
|
|
38
38
|
function l(e) {
|
|
39
39
|
if (!e) return;
|
|
40
40
|
let [, o, t] = e.trim().match(u) || [];
|
|
41
|
-
return { value: o, unit: t };
|
|
41
|
+
return { value: o, unit: t ?? "px" };
|
|
42
42
|
}
|
|
43
43
|
function P(e) {
|
|
44
44
|
if (!/^(repeating-)?linear-gradient/.test(e)) throw new SyntaxError(`could not find syntax for this item: ${e}`);
|
|
@@ -48,12 +48,12 @@ function P(e) {
|
|
|
48
48
|
function x(e) {
|
|
49
49
|
return e.startsWith("to ") ? { type: "directional", value: e.replace("to ", "") } : ["turn", "deg", "grad", "rad"].some((o) => e.endsWith(o)) ? { type: "angular", value: l(e) } : null;
|
|
50
50
|
}
|
|
51
|
-
var
|
|
51
|
+
var v = /* @__PURE__ */ new Set(["closest-corner", "closest-side", "farthest-corner", "farthest-side"]), w = /* @__PURE__ */ new Set(["center", "left", "top", "right", "bottom"]);
|
|
52
52
|
function d(e) {
|
|
53
|
-
return
|
|
53
|
+
return v.has(e);
|
|
54
54
|
}
|
|
55
55
|
function h(e) {
|
|
56
|
-
return
|
|
56
|
+
return w.has(e);
|
|
57
57
|
}
|
|
58
58
|
function R(e) {
|
|
59
59
|
let o = Array(2).fill("");
|
|
@@ -68,7 +68,7 @@ function K(e) {
|
|
|
68
68
|
return p ? n.shape = p : a.length === 1 && !d(a[0]) ? n.shape = "circle" : n.shape = "ellipse", a.length === 0 && a.push("farthest-corner"), n.size = a.map((f) => d(f) ? { type: "keyword", value: f } : { type: "length", value: l(f) }), n.position.x = h(s[0]) ? { type: "keyword", value: s[0] } : { type: "length", value: l(s[0]) }, n.position.y = h(s[1]) ? { type: "keyword", value: s[1] } : { type: "length", value: l(s[1]) }, (p || a.length > 0 || r[1]) && i.shift(), { ...n, stops: g(i) };
|
|
69
69
|
}
|
|
70
70
|
function S(e) {
|
|
71
|
-
return /(circle|ellipse|at)/.test(e) ? false : /^(rgba?|hwb|
|
|
71
|
+
return /(circle|ellipse|at)/.test(e) ? false : /^(rgba?|hwb|hsla?|lab|lch|oklab|color|#|[a-zA-Z]+)/.test(e);
|
|
72
72
|
}
|
|
73
73
|
var C = /* @__PURE__ */ new Set(["from", "in", "at"]);
|
|
74
74
|
function j(e) {
|
|
@@ -3,25 +3,25 @@ import React__default, { useState, useMemo, useRef, useCallback, forwardRef, cre
|
|
|
3
3
|
import { b as $4e85f108e88277b8$export$ebe63fadcdce34ed, c as $4e85f108e88277b8$export$44644b8a16031b5b, d as $4e85f108e88277b8$export$717b2c0a523a0b53 } from "../../RSPContexts-2lR5GG9p.js";
|
|
4
4
|
import { b as $3ef42575df84b30b$export$9d1611c77c2fe928, d as $bdb11010cef70236$export$f680877a34711e37, h as $64fa3d84918910a7$export$4d86445c2cf5e3, a as $64fa3d84918910a7$export$29f1550f4b0d4415, i as $64fa3d84918910a7$export$2881499e37b75b9a, f as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, g as $64fa3d84918910a7$export$ef03459518577ad4 } from "../../utils-cvK1vxO7.js";
|
|
5
5
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-D2C6R0DK.js";
|
|
6
|
-
import { $ as $9ab94262bd0047c7$export$420e68273165f4ec, a as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-
|
|
7
|
-
import { a as $458b0a5536c1a7cf$export$40bfa8c7b0832715,
|
|
6
|
+
import { $ as $9ab94262bd0047c7$export$420e68273165f4ec, a as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-CUxgjvAY.js";
|
|
7
|
+
import { a as $458b0a5536c1a7cf$export$40bfa8c7b0832715, e as $03deb23ff14920c4$export$4eaf04e54aa8eed6, z as $7215afc6de606d6b$export$de79e2c695e052f3, A as $46d819fcbaf35654$export$8f71654801c2f7cd, n as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6, b as $c87311424ea30a05$export$fedb369cb70207f1, s as $c87311424ea30a05$export$a11b0059900ceec8, w as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-LmGemtHE.js";
|
|
8
8
|
import { $ as $799cddbef784668f$export$6e865ea70d7724f, b as $799cddbef784668f$export$4cde5df63f53f473, a as $3493a52097159720$exports } from "../../Color-WxFE7lQB.js";
|
|
9
9
|
import { a as $9446cca9a3875146$export$cb6e0bb50bc19463, $ as $9446cca9a3875146$export$7d15b64cf5a3a4c4 } from "../../number-7sOvrqo0.js";
|
|
10
10
|
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "../../useLabels-Cdxi6JSa.js";
|
|
11
11
|
import { $ as $99facab73266f662$export$5add1d006293d136 } from "../../useFormReset-yV9VVy9R.js";
|
|
12
|
-
import { e as $28f99e3e86e6ec45$export$e5fda3247f5d67f9, f as $e8a7022cf87cba2a$export$36da96379f79f245, g as $bcca50147b47f54d$export$56b2c08e277f365, h as $47b897dc8cdb026b$export$8d15029008292ae, d as $6f909507e6374d18$export$1e7083018727fa60, i as $6f909507e6374d18$export$f1fce0420cc6d8ee, j as $6f909507e6374d18$export$6189c2744041d8f8, a as $6f909507e6374d18$export$105594979f116971 } from "../../Slider-
|
|
12
|
+
import { e as $28f99e3e86e6ec45$export$e5fda3247f5d67f9, f as $e8a7022cf87cba2a$export$36da96379f79f245, g as $bcca50147b47f54d$export$56b2c08e277f365, h as $47b897dc8cdb026b$export$8d15029008292ae, d as $6f909507e6374d18$export$1e7083018727fa60, i as $6f909507e6374d18$export$f1fce0420cc6d8ee, j as $6f909507e6374d18$export$6189c2744041d8f8, a as $6f909507e6374d18$export$105594979f116971 } from "../../Slider-ChP04COa.js";
|
|
13
13
|
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-DMOmz986.js";
|
|
14
14
|
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "../../useLocalizedStringFormatter-eaZiN2tE.js";
|
|
15
|
-
import { a as $5c3e21d68f1c4674$export$a966af930f325cab } from "../../VisuallyHidden-
|
|
15
|
+
import { a as $5c3e21d68f1c4674$export$a966af930f325cab } from "../../VisuallyHidden-X6SggVVO.js";
|
|
16
16
|
import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-B8BgFmIQ.js";
|
|
17
|
-
import { b as $3985021b0ad6602f$export$37fb8590cf2c088c, a as $a049562f99e7db0e$export$f9c6924e160136d1, $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../
|
|
17
|
+
import { b as $3985021b0ad6602f$export$37fb8590cf2c088c, a as $a049562f99e7db0e$export$f9c6924e160136d1, $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-ChJaTNa5.js";
|
|
18
18
|
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-DWVaNd2E.js";
|
|
19
19
|
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-AxKZjtFm.js";
|
|
20
|
-
import { $ as $de67e98908f0c6ee$export$7f629e9dc1ecf37c, b as $d2e8511e6f209edf$export$e908e06f4b8e3402, c as $7d0a636d7a4dcefd$export$2123ff2b87c81ca, d as $d841c8010a73d545$export$4f384c9210e583c3, a as $81397a9303501bda$export$23f548e970bdf099 } from "../../useNumberField-
|
|
21
|
-
import {
|
|
20
|
+
import { $ as $de67e98908f0c6ee$export$7f629e9dc1ecf37c, b as $d2e8511e6f209edf$export$e908e06f4b8e3402, c as $7d0a636d7a4dcefd$export$2123ff2b87c81ca, d as $d841c8010a73d545$export$4f384c9210e583c3, a as $81397a9303501bda$export$23f548e970bdf099 } from "../../useNumberField-BCjjZWaz.js";
|
|
21
|
+
import { $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, b as $e5be200c675c3b3a$export$a763b9476acd3eb } from "../../useFormValidation-CUtZcedF.js";
|
|
22
22
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
23
23
|
import { BaseControl } from "../base-control/base-control.js";
|
|
24
|
-
import { _ as __ } from "../../default-i18n-
|
|
24
|
+
import { _ as __ } from "../../default-i18n-CN_q3KUs.js";
|
|
25
25
|
import { TriggeredPopover } from "../popover/popover.js";
|
|
26
26
|
import { icons } from "../../icons/icons.js";
|
|
27
27
|
import { Tabs, TabList, Tab, TabPanel } from "../tabs/tabs.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { s as sprintf } from "../../sprintf-DmNrJSYG.js";
|
|
3
|
-
import { _ as __ } from "../../default-i18n-
|
|
3
|
+
import { _ as __ } from "../../default-i18n-CN_q3KUs.js";
|
|
4
4
|
import { Expandable } from "../expandable/expandable.js";
|
|
5
5
|
import { icons } from "../../icons/icons.js";
|
|
6
6
|
import { Switch } from "../toggle/switch.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
3
|
-
import "../../default-i18n-
|
|
3
|
+
import "../../default-i18n-CN_q3KUs.js";
|
|
4
4
|
import { DraggableContext } from "./draggable-context.js";
|
|
5
5
|
import { useContext } from "react";
|
|
6
6
|
import { icons } from "../../icons/icons.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef, useLayoutEffect, useMemo, useState, useCallback, startTransition, createContext, memo, forwardRef, useImperativeHandle, useContext, useId } from "react";
|
|
3
|
-
import { _ as __ } from "../../default-i18n-
|
|
3
|
+
import { _ as __ } from "../../default-i18n-CN_q3KUs.js";
|
|
4
4
|
import { DraggableContext } from "./draggable-context.js";
|
|
5
|
-
import { r as reactDomExports } from "../../index-
|
|
5
|
+
import { r as reactDomExports } from "../../index-D8-Zjpbd.js";
|
|
6
6
|
var i = Symbol.for("preact-signals");
|
|
7
7
|
function t() {
|
|
8
8
|
if (!(s > 1)) {
|
|
@@ -82,6 +82,7 @@ function u(i2, t2) {
|
|
|
82
82
|
this.t = void 0;
|
|
83
83
|
this.W = null == t2 ? void 0 : t2.watched;
|
|
84
84
|
this.Z = null == t2 ? void 0 : t2.unwatched;
|
|
85
|
+
this.name = null == t2 ? void 0 : t2.name;
|
|
85
86
|
}
|
|
86
87
|
u.prototype.brand = i;
|
|
87
88
|
u.prototype.h = function() {
|
|
@@ -130,7 +131,7 @@ u.prototype.subscribe = function(i2) {
|
|
|
130
131
|
} finally {
|
|
131
132
|
o = n2;
|
|
132
133
|
}
|
|
133
|
-
});
|
|
134
|
+
}, { name: "sub" });
|
|
134
135
|
};
|
|
135
136
|
u.prototype.valueOf = function() {
|
|
136
137
|
return this.value;
|
|
@@ -210,6 +211,7 @@ function y(i2, t2) {
|
|
|
210
211
|
this.f = 4;
|
|
211
212
|
this.W = null == t2 ? void 0 : t2.watched;
|
|
212
213
|
this.Z = null == t2 ? void 0 : t2.unwatched;
|
|
214
|
+
this.name = null == t2 ? void 0 : t2.name;
|
|
213
215
|
}
|
|
214
216
|
y.prototype = new u();
|
|
215
217
|
y.prototype.h = function() {
|
|
@@ -311,12 +313,13 @@ function g(i2) {
|
|
|
311
313
|
if (8 & this.f) b(this);
|
|
312
314
|
t();
|
|
313
315
|
}
|
|
314
|
-
function p(i2) {
|
|
316
|
+
function p(i2, t2) {
|
|
315
317
|
this.x = i2;
|
|
316
318
|
this.u = void 0;
|
|
317
319
|
this.s = void 0;
|
|
318
320
|
this.o = void 0;
|
|
319
321
|
this.f = 32;
|
|
322
|
+
this.name = null == t2 ? void 0 : t2.name;
|
|
320
323
|
}
|
|
321
324
|
p.prototype.c = function() {
|
|
322
325
|
var i2 = this.S();
|
|
@@ -354,17 +357,17 @@ p.prototype.d = function() {
|
|
|
354
357
|
p.prototype.dispose = function() {
|
|
355
358
|
this.d();
|
|
356
359
|
};
|
|
357
|
-
function E(i2) {
|
|
358
|
-
var
|
|
360
|
+
function E(i2, t2) {
|
|
361
|
+
var r2 = new p(i2, t2);
|
|
359
362
|
try {
|
|
360
|
-
|
|
363
|
+
r2.c();
|
|
361
364
|
} catch (i3) {
|
|
362
|
-
|
|
365
|
+
r2.d();
|
|
363
366
|
throw i3;
|
|
364
367
|
}
|
|
365
|
-
var
|
|
366
|
-
|
|
367
|
-
return
|
|
368
|
+
var o2 = r2.d.bind(r2);
|
|
369
|
+
o2[Symbol.dispose] = o2;
|
|
370
|
+
return o2;
|
|
368
371
|
}
|
|
369
372
|
var __create$5 = Object.create;
|
|
370
373
|
var __defProp$7 = Object.defineProperty;
|
|
@@ -3948,10 +3951,13 @@ var Cursor = class extends Plugin {
|
|
|
3948
3951
|
this.destroy = E(() => {
|
|
3949
3952
|
var _a4;
|
|
3950
3953
|
const { dragOperation } = this.manager;
|
|
3951
|
-
const { cursor = "grabbing" } = (_a4 = this.options) != null ? _a4 : {};
|
|
3954
|
+
const { cursor = "grabbing", nonce } = (_a4 = this.options) != null ? _a4 : {};
|
|
3952
3955
|
if (dragOperation.status.initialized) {
|
|
3953
3956
|
const document2 = doc.value;
|
|
3954
3957
|
const style = document2.createElement("style");
|
|
3958
|
+
if (nonce) {
|
|
3959
|
+
style.setAttribute("nonce", nonce);
|
|
3960
|
+
}
|
|
3955
3961
|
style.textContent = `* { cursor: ${cursor} !important; }`;
|
|
3956
3962
|
document2.head.appendChild(style);
|
|
3957
3963
|
return () => style.remove();
|
|
@@ -4549,17 +4555,21 @@ render_fn = function() {
|
|
|
4549
4555
|
};
|
|
4550
4556
|
};
|
|
4551
4557
|
injectStyles_fn = function() {
|
|
4552
|
-
var _a4, _b2;
|
|
4558
|
+
var _a4, _b2, _c3;
|
|
4553
4559
|
const { status, source, target } = this.manager.dragOperation;
|
|
4560
|
+
const { nonce } = (_a4 = this.options) != null ? _a4 : {};
|
|
4554
4561
|
if (status.initializing) {
|
|
4555
|
-
const sourceDocument = getDocument((
|
|
4556
|
-
const targetDocument = getDocument((
|
|
4562
|
+
const sourceDocument = getDocument((_b2 = source == null ? void 0 : source.element) != null ? _b2 : null);
|
|
4563
|
+
const targetDocument = getDocument((_c3 = target == null ? void 0 : target.element) != null ? _c3 : null);
|
|
4557
4564
|
const documents = /* @__PURE__ */ new Set([sourceDocument, targetDocument]);
|
|
4558
4565
|
for (const doc of documents) {
|
|
4559
4566
|
let registration = styleSheetRegistry.get(doc);
|
|
4560
4567
|
if (!registration) {
|
|
4561
4568
|
const style = document.createElement("style");
|
|
4562
4569
|
style.textContent = CSS_RULES;
|
|
4570
|
+
if (nonce) {
|
|
4571
|
+
style.setAttribute("nonce", nonce);
|
|
4572
|
+
}
|
|
4563
4573
|
doc.head.prepend(style);
|
|
4564
4574
|
const mutationObserver = new MutationObserver((entries) => {
|
|
4565
4575
|
for (const entry of entries) {
|
|
@@ -4925,13 +4935,18 @@ var ScrollListener = class extends CorePlugin {
|
|
|
4925
4935
|
};
|
|
4926
4936
|
_timeout = /* @__PURE__ */ new WeakMap();
|
|
4927
4937
|
var PreventSelection = class extends Plugin {
|
|
4928
|
-
constructor(manager) {
|
|
4929
|
-
super(manager);
|
|
4938
|
+
constructor(manager, options2) {
|
|
4939
|
+
super(manager, options2);
|
|
4930
4940
|
this.manager = manager;
|
|
4931
4941
|
this.destroy = E(() => {
|
|
4942
|
+
var _a4;
|
|
4932
4943
|
const { dragOperation } = this.manager;
|
|
4944
|
+
const { nonce } = (_a4 = this.options) != null ? _a4 : {};
|
|
4933
4945
|
if (dragOperation.status.initialized) {
|
|
4934
4946
|
const style = document.createElement("style");
|
|
4947
|
+
if (nonce) {
|
|
4948
|
+
style.setAttribute("nonce", nonce);
|
|
4949
|
+
}
|
|
4935
4950
|
style.textContent = `* { user-select: none !important; -webkit-user-select: none !important; }`;
|
|
4936
4951
|
document.head.appendChild(style);
|
|
4937
4952
|
removeSelection();
|
|
@@ -7238,6 +7253,7 @@ const SortableItem = ({ id, index, disabled, children, axis }) => {
|
|
|
7238
7253
|
* @param {Function} props.onChange - Function to run when the items change.
|
|
7239
7254
|
* @param {boolean} [props.hidden] - If `true`, the component is not rendered.
|
|
7240
7255
|
* @param {boolean} [props.noReorder] - If `true`, item reordering is disabled.
|
|
7256
|
+
* @param {Function} [props.onAfterItemRemove] - Function to run after an item is removed.
|
|
7241
7257
|
* @param {'both' | 'horizontal' | 'vertical'} [props.axis='both'] - Which axis to allow dragging on.
|
|
7242
7258
|
* @param {string} [props.className] - Classes to pass to the component.
|
|
7243
7259
|
*
|
|
@@ -7272,6 +7288,7 @@ const Draggable3 = (props) => {
|
|
|
7272
7288
|
noReorder,
|
|
7273
7289
|
axis = "both",
|
|
7274
7290
|
className,
|
|
7291
|
+
onAfterItemRemove,
|
|
7275
7292
|
hidden,
|
|
7276
7293
|
...rest
|
|
7277
7294
|
} = props;
|
|
@@ -1,6 +1,6 @@
|
|
|
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-CN_q3KUs.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";
|
|
@@ -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-CN_q3KUs.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-BiAnh5G5.js";
|
|
7
7
|
const fixIds = (items, itemIdBase) => {
|
|
8
8
|
return items?.map((item, i) => ({
|
|
9
9
|
...item,
|
|
@@ -24,6 +24,7 @@ const fixIds = (items, itemIdBase) => {
|
|
|
24
24
|
* @param {Function} props.onChange - Function to run when the items change.
|
|
25
25
|
* @param {boolean} [props.hidden] - If `true`, the component is not rendered.
|
|
26
26
|
* @param {boolean} [props.disabled] - If `true`, item reordering is disabled.
|
|
27
|
+
* @param {Function} [props.onAfterItemRemove] - Function to run after an item is removed.
|
|
27
28
|
* @param {string} [props.className] - Classes to pass to the item wrapper.
|
|
28
29
|
*
|
|
29
30
|
* @returns {JSX.Element} The DraggableList component.
|
|
@@ -69,6 +70,7 @@ const DraggableList = (props) => {
|
|
|
69
70
|
disabled,
|
|
70
71
|
className,
|
|
71
72
|
labelAsHandle,
|
|
73
|
+
onAfterItemRemove,
|
|
72
74
|
hidden,
|
|
73
75
|
...rest
|
|
74
76
|
} = props;
|
|
@@ -106,7 +108,7 @@ const DraggableList = (props) => {
|
|
|
106
108
|
key
|
|
107
109
|
);
|
|
108
110
|
},
|
|
109
|
-
renderItem: ({ value, index, isDisabled, isDragged, isSelected,
|
|
111
|
+
renderItem: ({ value, index, isDisabled, isDragged, isSelected, props: props2 }) => {
|
|
110
112
|
const { key, ...rest2 } = props2;
|
|
111
113
|
return /* @__PURE__ */ jsx(
|
|
112
114
|
"li",
|
|
@@ -132,7 +134,7 @@ const DraggableList = (props) => {
|
|
|
132
134
|
itemIndex: index,
|
|
133
135
|
deleteItem: () => {
|
|
134
136
|
onChange(items.filter((i) => i.id !== value.id));
|
|
135
|
-
if (
|
|
137
|
+
if (onAfterItemRemove) {
|
|
136
138
|
onAfterItemRemove(value);
|
|
137
139
|
}
|
|
138
140
|
}
|
|
@@ -5,14 +5,14 @@ import { AnimatedVisibility } from "../animated-visibility/animated-visibility.j
|
|
|
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-
|
|
8
|
+
import { _ as __ } from "../../default-i18n-CN_q3KUs.js";
|
|
9
|
+
import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "../../Button-npzfSoYo.js";
|
|
10
10
|
import { d as $bdb11010cef70236$export$f680877a34711e37, n as $b5e257d569688ac6$export$535bd6ca7f90a273, k as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, a as $64fa3d84918910a7$export$29f1550f4b0d4415, h as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a, o as $64fa3d84918910a7$export$c62b8e45d58ddad9, b as $3ef42575df84b30b$export$9d1611c77c2fe928, m as $5dc95899b306f630$export$c9058316764c140e } from "../../utils-cvK1vxO7.js";
|
|
11
11
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-D2C6R0DK.js";
|
|
12
|
-
import { a as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "../../useHover-
|
|
13
|
-
import { r as reactDomExports } from "../../index-
|
|
12
|
+
import { a as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "../../useHover-LmGemtHE.js";
|
|
13
|
+
import { r as reactDomExports } from "../../index-D8-Zjpbd.js";
|
|
14
14
|
import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "../../useEvent-BifIGnVS.js";
|
|
15
|
-
import { a as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-
|
|
15
|
+
import { a as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-CUxgjvAY.js";
|
|
16
16
|
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-DWVaNd2E.js";
|
|
17
17
|
function $5e910fae8e128ead$export$6e3e27031a30522f(props, state, ref) {
|
|
18
18
|
let { isDisabled } = props;
|