@eightshift/ui-components 5.0.1 → 5.0.3
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-wERNNG0T.js → Button-BpwTmkAe.js} +4 -4
- package/dist/{Collection-CKsHTyhc.js → Collection-n5d0zIgb.js} +66 -31
- package/dist/{Color-BhgbJF5x.js → Color-lVhk8V_G.js} +1 -1
- package/dist/{ColorSwatch-Bcn6oRSg.js → ColorSwatch-DntWEAC3.js} +4 -4
- package/dist/{ComboBox-D1LPUwWP.js → ComboBox-BJpTEATT.js} +31 -22
- package/dist/{Dialog-D190gMbE.js → Dialog-O9uw63D7.js} +46 -27
- package/dist/{FieldError-DeUh5Wkw.js → FieldError-DHrSdE_Q.js} +2 -2
- package/dist/{FocusScope-C-plSxbS.js → FocusScope-BEPI2m7u.js} +2 -2
- package/dist/{Group-C5iZpSAM.js → Group-DDPhPPTQ.js} +3 -3
- package/dist/{Heading-D-Pboe4p.js → Heading-ba38ScjJ.js} +1 -1
- package/dist/{Input--mF4XVE1.js → Input-BmDS8Juy.js} +6 -6
- package/dist/{Label-Fp6AwSRn.js → Label-JS_ob-kh.js} +1 -1
- package/dist/{ListBox-4oW9kh3R.js → ListBox-BTxlCGcc.js} +97 -15
- package/dist/{OverlayArrow-BpB9uB_I.js → OverlayArrow-5aDgmImj.js} +3 -3
- package/dist/{Separator-B88tj5YD.js → Separator-CaTBkETC.js} +21 -12
- package/dist/{Slider-CyJzC1bp.js → Slider-C-S1oEH9.js} +10 -10
- package/dist/{Text-DRpwWot2.js → Text-BuJgePCv.js} +1 -1
- package/dist/{VisuallyHidden-DsKYcRQ_.js → VisuallyHidden-BYi0pekx.js} +2 -2
- package/dist/assets/style-admin.css +398 -142
- package/dist/assets/style-editor.css +398 -142
- package/dist/assets/style.css +398 -142
- package/dist/assets/wp-font-enhancements.css +1 -1
- package/dist/assets/wp-ui-enhancements.css +29 -10
- package/dist/components/base-control/base-control.js +1 -1
- package/dist/components/button/button.js +18 -18
- package/dist/components/checkbox/checkbox.js +17 -14
- package/dist/components/color-pickers/color-swatch.js +4 -4
- package/dist/components/color-pickers/gradient-editor.js +3 -3
- package/dist/components/color-pickers/solid-color-picker.js +21 -21
- package/dist/components/component-toggle/component-toggle.js +0 -1
- package/dist/components/draggable/draggable.js +694 -353
- package/dist/components/expandable/expandable.js +65 -58
- package/dist/components/input-field/input-field.js +10 -10
- package/dist/components/link-input/link-input.js +22 -27
- package/dist/components/menu/menu.js +5 -5
- package/dist/components/modal/modal.js +5 -5
- package/dist/components/notice/notice.js +16 -16
- package/dist/components/number-picker/number-picker.js +10 -10
- package/dist/components/options-panel/options-panel.js +1 -1
- package/dist/components/placeholders/file-placeholder.js +13 -6
- package/dist/components/placeholders/image-placeholder.js +2 -2
- package/dist/components/placeholders/media-placeholder.js +2 -2
- package/dist/components/popover/popover.js +2 -2
- package/dist/components/radio/radio.js +19 -16
- package/dist/components/repeater/repeater-item.js +6 -5
- package/dist/components/repeater/repeater.js +8 -3
- package/dist/components/responsive/mini-responsive.js +1 -1
- package/dist/components/select/async-multi-select.js +1 -0
- package/dist/components/select/async-single-select.js +1 -0
- package/dist/components/select/multi-select.js +1 -0
- package/dist/components/select/single-select.js +1 -0
- package/dist/components/select/styles.js +1 -1
- package/dist/components/select/v2/async-select.js +9 -9
- package/dist/components/select/v2/shared.js +2 -2
- package/dist/components/select/v2/single-select.js +35 -22
- package/dist/components/slider/column-config-slider.js +3 -3
- package/dist/components/slider/slider.js +4 -4
- package/dist/components/tabs/tabs.js +22 -23
- package/dist/components/toggle/switch.js +8 -8
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +18 -17
- package/dist/components/tooltip/tooltip.js +3 -3
- package/dist/{context-BYWrbm1z.js → context-BbYZoHvX.js} +1 -1
- package/dist/icons/icons.js +124 -0
- package/dist/{index-wl5606BX.js → index-BljRBEr_.js} +1 -1
- package/dist/{textSelection-CCcyjiRP.js → textSelection-8DpK8fJl.js} +1 -1
- package/dist/{useButton-BOHxkGQF.js → useButton-Bt3BffJm.js} +3 -3
- package/dist/{useEvent-D5o_CqDH.js → useEvent-ICdlokG-.js} +1 -1
- package/dist/{useFocusRing-nMG2uzxS.js → useFocusRing-Bv0UJQl8.js} +1 -1
- package/dist/{useFormReset-DlmRL87g.js → useFormReset-D2YaWRIA.js} +1 -1
- package/dist/{useFormValidation-D0_aaK-e.js → useFormValidation-Dy0PXJg5.js} +2 -2
- package/dist/{useHover-VO5tcIli.js → useHover-C2SkI1Fn.js} +7 -2
- package/dist/{useLabel-BKH4fVA4.js → useLabel-BPCd5c7-.js} +2 -2
- package/dist/{useLabels-ntF3rFY0.js → useLabels-B7-lUnAF.js} +1 -1
- package/dist/{useListState-Cq2Nvr-v.js → useListState-DkyH7elT.js} +10 -3
- package/dist/{useLocalizedStringFormatter-CGzwx1a0.js → useLocalizedStringFormatter-C9GO0IDB.js} +1 -1
- package/dist/{useNumberField-C9dmERhP.js → useNumberField-CU1_u8ze.js} +18 -10
- package/dist/{useNumberFormatter-MrRLgvhj.js → useNumberFormatter-CZ9QUnRt.js} +1 -1
- package/dist/{usePress-DjNo5790.js → usePress-BrJylgPR.js} +21 -10
- package/dist/{useSingleSelectListState--r3AAhRj.js → useSingleSelectListState-C4sorv2p.js} +2 -2
- package/dist/{useToggle-CQaXLe-O.js → useToggle-CDa3YAZI.js} +4 -4
- package/dist/{useToggleState-C3DLdez5.js → useToggleState-ibcBUHnB.js} +1 -1
- package/dist/{utils-B94NDG0v.js → utils-CZt7LCbO.js} +41 -8
- package/package.json +24 -24
|
@@ -6,14 +6,14 @@ 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
8
|
import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
|
|
9
|
-
import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "../../Button-
|
|
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-
|
|
9
|
+
import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "../../Button-BpwTmkAe.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-CZt7LCbO.js";
|
|
11
11
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
|
|
12
|
-
import { b as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "../../useHover-
|
|
12
|
+
import { b as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "../../useHover-C2SkI1Fn.js";
|
|
13
13
|
import { r as reactDomExports } from "../../index-CFozsmNS.js";
|
|
14
|
-
import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "../../useEvent-
|
|
15
|
-
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-
|
|
16
|
-
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-
|
|
14
|
+
import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "../../useEvent-ICdlokG-.js";
|
|
15
|
+
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-Bv0UJQl8.js";
|
|
16
|
+
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-JS_ob-kh.js";
|
|
17
17
|
function $5e910fae8e128ead$export$6e3e27031a30522f(props, state, ref) {
|
|
18
18
|
let { isDisabled } = props;
|
|
19
19
|
let triggerId = $bdb11010cef70236$export$f680877a34711e37();
|
|
@@ -269,59 +269,66 @@ const Expandable = (props) => {
|
|
|
269
269
|
className: clsx("es:w-full es:rounded-xl es:border es:border-secondary-300/0 es:text-sm es:transition", isOpen && "es:border-secondary-300/100 es:shadow-lg", className),
|
|
270
270
|
...other,
|
|
271
271
|
children: [
|
|
272
|
-
/* @__PURE__ */ jsxs(
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
toggleOpen: () => {
|
|
298
|
-
setIsOpen(!isOpen);
|
|
299
|
-
if (onOpenChange) {
|
|
300
|
-
onOpenChange(!isOpen);
|
|
301
|
-
}
|
|
302
|
-
},
|
|
303
|
-
tooltip: isOpen ? __("Close", "eightshift-ui-components") : __("Open", "eightshift-ui-components"),
|
|
304
|
-
disabled
|
|
305
|
-
}),
|
|
306
|
-
!customOpenButton && /* @__PURE__ */ jsx(
|
|
307
|
-
Button,
|
|
308
|
-
{
|
|
309
|
-
slot: "trigger",
|
|
310
|
-
type: "ghost",
|
|
311
|
-
icon: isOpen ? icons.caretDownFill : icons.caretDown,
|
|
312
|
-
onPress: () => {
|
|
313
|
-
setIsOpen(!isOpen);
|
|
314
|
-
if (onOpenChange) {
|
|
315
|
-
onOpenChange(!isOpen);
|
|
272
|
+
/* @__PURE__ */ jsxs(
|
|
273
|
+
"div",
|
|
274
|
+
{
|
|
275
|
+
className: clsx("es:flex es:h-10 es:items-center es:gap-1 es:transition-[padding]", isOpen && "es:py-1 es:pl-2 es:pr-1", headerClassName),
|
|
276
|
+
...headerProps,
|
|
277
|
+
children: [
|
|
278
|
+
/* @__PURE__ */ jsx(
|
|
279
|
+
RichLabel,
|
|
280
|
+
{
|
|
281
|
+
icon,
|
|
282
|
+
label,
|
|
283
|
+
subtitle,
|
|
284
|
+
className: labelClassName,
|
|
285
|
+
as: $01b77f81d0f07f68$export$b04be29aa201d4f5,
|
|
286
|
+
fullWidth: true
|
|
287
|
+
}
|
|
288
|
+
),
|
|
289
|
+
actions && !keepActionsOnExpand && /* @__PURE__ */ jsx(
|
|
290
|
+
AnimatedVisibility,
|
|
291
|
+
{
|
|
292
|
+
visible: !isOpen,
|
|
293
|
+
className: "es:ml-auto es:flex es:gap-2",
|
|
294
|
+
transition: "slideFadeDownSlight",
|
|
295
|
+
noInitial: true,
|
|
296
|
+
children: actions
|
|
316
297
|
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
298
|
+
),
|
|
299
|
+
actions && keepActionsOnExpand && /* @__PURE__ */ jsx("div", { className: "es:ml-auto es:flex es:gap-2", children: actions }),
|
|
300
|
+
customOpenButton && customOpenButton({
|
|
301
|
+
open: isOpen,
|
|
302
|
+
toggleOpen: () => {
|
|
303
|
+
setIsOpen(!isOpen);
|
|
304
|
+
if (onOpenChange) {
|
|
305
|
+
onOpenChange(!isOpen);
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
tooltip: isOpen ? __("Close", "eightshift-ui-components") : __("Open", "eightshift-ui-components"),
|
|
309
|
+
disabled
|
|
310
|
+
}),
|
|
311
|
+
!customOpenButton && /* @__PURE__ */ jsx(
|
|
312
|
+
Button,
|
|
313
|
+
{
|
|
314
|
+
slot: "trigger",
|
|
315
|
+
type: "ghost",
|
|
316
|
+
icon: isOpen ? icons.caretDownFill : icons.caretDown,
|
|
317
|
+
onPress: () => {
|
|
318
|
+
setIsOpen(!isOpen);
|
|
319
|
+
if (onOpenChange) {
|
|
320
|
+
onOpenChange(!isOpen);
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
tooltip: isOpen ? __("Close", "eightshift-ui-components") : __("Open", "eightshift-ui-components"),
|
|
324
|
+
disabled,
|
|
325
|
+
className: clsx("es:icon:size-5 es:icon:transition-transform", isOpen && "es:icon:-scale-y-100"),
|
|
326
|
+
size: "small"
|
|
327
|
+
}
|
|
328
|
+
)
|
|
329
|
+
]
|
|
330
|
+
}
|
|
331
|
+
),
|
|
325
332
|
/* @__PURE__ */ jsx(
|
|
326
333
|
$28f4fd908f0de97f$export$feabaa331e1d464c,
|
|
327
334
|
{
|
|
@@ -1,13 +1,13 @@
|
|
|
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, g as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, h as $64fa3d84918910a7$export$ef03459518577ad4, i as $64fa3d84918910a7$export$2881499e37b75b9a } from "../../utils-
|
|
2
|
+
import { a as $3985021b0ad6602f$export$37fb8590cf2c088c, b as $2d73ec29415bd339$export$712718f7aec83d5, $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-BmDS8Juy.js";
|
|
3
|
+
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-JS_ob-kh.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-CZt7LCbO.js";
|
|
5
5
|
import React__default, { forwardRef, createContext, useRef, useState, useCallback } from "react";
|
|
6
|
-
import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-
|
|
7
|
-
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-
|
|
8
|
-
import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-
|
|
6
|
+
import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-C2SkI1Fn.js";
|
|
7
|
+
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-Bv0UJQl8.js";
|
|
8
|
+
import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-DHrSdE_Q.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-BuJgePCv.js";
|
|
11
11
|
import { $ as $f39a9eba43920ace$export$86427a43e3e48ebb } from "../../Hidden-rE6uR-lr.js";
|
|
12
12
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
|
|
13
13
|
import { BaseControl } from "../base-control/base-control.js";
|
|
@@ -194,7 +194,7 @@ const InputField = (props) => {
|
|
|
194
194
|
...other,
|
|
195
195
|
type,
|
|
196
196
|
className: clsx(
|
|
197
|
-
"es:min-h-10 es:w-full es:rounded-
|
|
197
|
+
"es:min-h-10 es:w-full es:rounded-10 es:border es:border-secondary-300 es:p-2 es:text-sm es:shadow-sm es:not-readonly:focus:shadow-md es:transition es:selection:bg-accent-500/20 es:selection:text-accent-950",
|
|
198
198
|
"es:any-focus:outline-hidden",
|
|
199
199
|
"es:focus-visible:ring-2 es:focus-visible:ring-accent-500/50",
|
|
200
200
|
"es:focus-visible:border-accent-500",
|
|
@@ -210,12 +210,12 @@ const InputField = (props) => {
|
|
|
210
210
|
{
|
|
211
211
|
...other,
|
|
212
212
|
className: clsx(
|
|
213
|
-
"es:min-h-10 es:w-full es:rounded-
|
|
213
|
+
"es:min-h-10 es:w-full es:rounded-10 es:border es:border-secondary-300 es:p-2 es:text-sm es:shadow-sm es:not-readonly:focus:shadow-md es:transition es:selection:bg-accent-500/20 es:selection:text-accent-950",
|
|
214
214
|
"es:any-focus:outline-hidden",
|
|
215
215
|
"es:focus-visible:ring-2 es:focus-visible:ring-accent-500/50",
|
|
216
216
|
"es:focus-visible:border-accent-500",
|
|
217
217
|
"es:inset-ring es:inset-ring-secondary-100",
|
|
218
|
-
"es:disabled:shadow-none! es:disabled:border-secondary-200 es:disabled:bg-secondary-50 es:disabled:text-secondary-500 es:disabled:cursor-default es:readonly:bg-secondary-50",
|
|
218
|
+
"es:disabled:shadow-none! es:readonly:shadow-xs! es:disabled:border-secondary-200 es:disabled:bg-secondary-50 es:disabled:text-secondary-500 es:disabled:cursor-default es:readonly:bg-secondary-50",
|
|
219
219
|
className
|
|
220
220
|
)
|
|
221
221
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
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-
|
|
2
|
+
import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../Button-BpwTmkAe.js";
|
|
3
|
+
import { $ as $f86e6c1ec7da6ebb$export$bc3384a35de93d66, a as $d01f2c01039c0eec$export$72b9695b8216309a } from "../../ComboBox-BJpTEATT.js";
|
|
4
|
+
import { $ as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4 } from "../../Group-DDPhPPTQ.js";
|
|
5
|
+
import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-BmDS8Juy.js";
|
|
6
|
+
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-JS_ob-kh.js";
|
|
7
|
+
import { $ as $eed445e0843c11d0$export$41f133550aa26f48, a as $eed445e0843c11d0$export$a11e76429ed99b4 } from "../../ListBox-BTxlCGcc.js";
|
|
8
|
+
import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../Dialog-O9uw63D7.js";
|
|
9
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
|
-
import { useRef,
|
|
12
|
+
import { useRef, useEffect, cloneElement } from "react";
|
|
13
13
|
import { Spacer } from "../spacer/spacer.js";
|
|
14
14
|
import { Tooltip } from "../tooltip/tooltip.js";
|
|
15
15
|
import { AnimatedVisibility } from "../animated-visibility/animated-visibility.js";
|
|
@@ -68,10 +68,16 @@ const LinkInput = (props) => {
|
|
|
68
68
|
} = props;
|
|
69
69
|
const canShowSuggestions = typeof fetchSuggestions !== "undefined";
|
|
70
70
|
const triggerRef = useRef(null);
|
|
71
|
+
let shouldShowSuggestions = true;
|
|
72
|
+
if (!canShowSuggestions || !showSuggestionsWhenEmpty && url.length < 1) {
|
|
73
|
+
shouldShowSuggestions = false;
|
|
74
|
+
} else {
|
|
75
|
+
shouldShowSuggestions = !(showSuggestionsWhenEmpty !== true && url.trim().length < 3 || url.startsWith("#") || url.startsWith(":") || url.startsWith("mailto") || url.startsWith("tel") || url.startsWith("http") || url.startsWith("www"));
|
|
76
|
+
}
|
|
71
77
|
const suggestionList = $f86e6c1ec7da6ebb$export$bc3384a35de93d66({
|
|
72
78
|
initialFilterText: url,
|
|
73
79
|
async load({ signal, filterText }) {
|
|
74
|
-
if (!canShowSuggestions) {
|
|
80
|
+
if (disabled || !canShowSuggestions || !shouldShowSuggestions || !filterText || filterText.length < 3) {
|
|
75
81
|
return {
|
|
76
82
|
items: []
|
|
77
83
|
};
|
|
@@ -82,20 +88,8 @@ const LinkInput = (props) => {
|
|
|
82
88
|
};
|
|
83
89
|
}
|
|
84
90
|
});
|
|
85
|
-
const [shouldShowSuggestions, setShouldShowSuggestions] = useState(false);
|
|
86
91
|
useEffect(() => {
|
|
87
92
|
suggestionList.setFilterText(url);
|
|
88
|
-
if (!canShowSuggestions) {
|
|
89
|
-
setShouldShowSuggestions(false);
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
if (!showSuggestionsWhenEmpty && url.length < 1) {
|
|
93
|
-
setShouldShowSuggestions(false);
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
setShouldShowSuggestions(
|
|
97
|
-
!(showSuggestionsWhenEmpty !== true && url.trim().length < 3 || url.startsWith("#") || url.startsWith(":") || url.startsWith("mailto") || url.startsWith("tel") || url.startsWith("http") || url.startsWith("www"))
|
|
98
|
-
);
|
|
99
93
|
}, [url]);
|
|
100
94
|
if (hidden) {
|
|
101
95
|
return null;
|
|
@@ -107,7 +101,6 @@ const LinkInput = (props) => {
|
|
|
107
101
|
inputValue: suggestionList.filterText,
|
|
108
102
|
onInputChange: (value) => {
|
|
109
103
|
onChange({ url: value, isAnchor: value == null ? void 0 : value.includes("#") });
|
|
110
|
-
suggestionList.setFilterText(value);
|
|
111
104
|
},
|
|
112
105
|
allowsCustomValue: true,
|
|
113
106
|
allowsEmptyCollection: true,
|
|
@@ -134,7 +127,7 @@ const LinkInput = (props) => {
|
|
|
134
127
|
{
|
|
135
128
|
placeholder: disabled ? null : placeholder,
|
|
136
129
|
className: clsx(
|
|
137
|
-
"es:min-h-10 es:w-full es:rounded-
|
|
130
|
+
"es:min-h-10 es:w-full es:rounded-10 es:border es:border-secondary-300 es:py-2 es:pl-2 es:pr-1 es:text-sm es:shadow-sm es:transition es:selection:bg-accent-500/20 es:selection:text-accent-950 es:bg-white",
|
|
138
131
|
"es:any-focus:outline-hidden",
|
|
139
132
|
"es:focus-visible:ring-2 es:focus-visible:ring-accent-500/50",
|
|
140
133
|
"es:focus-visible:border-accent-500",
|
|
@@ -188,7 +181,7 @@ const LinkInput = (props) => {
|
|
|
188
181
|
{
|
|
189
182
|
"aria-label": __("URL suggestions", "eightshift-ui-components"),
|
|
190
183
|
className: ({ isEntering, isExiting }) => clsx(
|
|
191
|
-
"es:border es:rounded-
|
|
184
|
+
"es:border es:rounded-xl es:border-secondary-300 es:bg-white es:shadow-lg es:outline-hidden es:min-w-72",
|
|
192
185
|
isEntering || !(suggestionList.isLoading || !shouldShowSuggestions) && "es:not-motion-reduce:motion-preset-slide-down-sm es:motion-reduce:motion-preset-fade es:motion-duration-300",
|
|
193
186
|
isExiting && "es:not-motion-reduce:motion-translate-y-out-[-2.5%] es:motion-opacity-out-0 es:motion-duration-200",
|
|
194
187
|
(suggestionList.isLoading || !shouldShowSuggestions) && "es:invisible"
|
|
@@ -203,8 +196,10 @@ const LinkInput = (props) => {
|
|
|
203
196
|
{
|
|
204
197
|
icon: icons.searchEmpty,
|
|
205
198
|
label: __("No results", "eightshift-ui-components"),
|
|
206
|
-
subtitle: __("Try a different search term
|
|
207
|
-
className: "es:min-h-
|
|
199
|
+
subtitle: __("Try a different search term", "eightshift-ui-components"),
|
|
200
|
+
className: "es:min-h-14 es:p-2 es:w-fit es:mx-auto",
|
|
201
|
+
iconClassName: "es:text-accent-700 es:icon:size-7!",
|
|
202
|
+
noColor: true
|
|
208
203
|
}
|
|
209
204
|
),
|
|
210
205
|
suggestionList.items.length > 0 && !suggestionList.isLoading && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -238,7 +233,7 @@ const LinkInput = (props) => {
|
|
|
238
233
|
{
|
|
239
234
|
id: item.value,
|
|
240
235
|
className: clsx(
|
|
241
|
-
"es:rounded es:p-1 es:text-sm es:transition",
|
|
236
|
+
"es:rounded-10 es:p-1 es:text-sm es:transition",
|
|
242
237
|
"es:hover:border-secondary-300 es:hover:bg-secondary-100",
|
|
243
238
|
"es:focus-visible:border-secondary-300 es:focus-visible:bg-secondary-100",
|
|
244
239
|
"selected:es:bg-accent-600/10 selected:es:text-accent-900 selected:focus-visible:es:bg-accent-600/15"
|
|
@@ -1,6 +1,6 @@
|
|
|
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$2ce376c2cc3355c8, d as $3674c52c6b3c5bce$export$4b1545b4f2016d26, e as $3674c52c6b3c5bce$export$ecabc99eeffab7ca } from "../../Dialog-
|
|
2
|
+
import { $ as $72a5793c14baf454$export$8b251419efc915eb, a as $431f98aba6844401$export$1ff3c3f08ae963c0 } from "../../Separator-CaTBkETC.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-O9uw63D7.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";
|
|
@@ -173,7 +173,7 @@ const MenuSection = (props) => {
|
|
|
173
173
|
* @preserve
|
|
174
174
|
*/
|
|
175
175
|
const MenuSeparator = () => {
|
|
176
|
-
return /* @__PURE__ */ jsx($431f98aba6844401$export$1ff3c3f08ae963c0, { className: "es:mb-1 es:border-b es:border-secondary-200
|
|
176
|
+
return /* @__PURE__ */ jsx($431f98aba6844401$export$1ff3c3f08ae963c0, { className: "es:mb-1 es:border-b es:border-secondary-200" });
|
|
177
177
|
};
|
|
178
178
|
/**
|
|
179
179
|
* A menu item.
|
|
@@ -215,9 +215,9 @@ const MenuItem = (props) => {
|
|
|
215
215
|
"aria-label": ariaLabel,
|
|
216
216
|
isDisabled: disabled,
|
|
217
217
|
className: clsx(
|
|
218
|
-
"es:mx-1 es:mb-1 es:flex es:min-w-44 es:min-h-
|
|
218
|
+
"es:mx-1 es:mb-1 es:flex es:min-w-44 es:min-h-9 es:items-center es:gap-1.5",
|
|
219
219
|
"es:first:mt-1 es:icon:size-5 es:icon:text-secondary-500",
|
|
220
|
-
"es:select-none es:rounded-
|
|
220
|
+
"es:select-none es:rounded-xl es:py-1.5 es:px-2.5 es:text-sm es:transition",
|
|
221
221
|
"es:any-focus:outline-hidden",
|
|
222
222
|
!disabled && "es:hover:bg-secondary-100 es:focus-visible:inset-ring es:focus-visible:inset-ring-secondary-100/30 es:focus-visible:bg-secondary-100 es:contrast-more:focus-visible:bg-accent-500/15",
|
|
223
223
|
disabled ? "es:text-secondary-400" : "es:text-secondary-800",
|
|
@@ -1,10 +1,10 @@
|
|
|
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 { 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-
|
|
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-O9uw63D7.js";
|
|
3
|
+
import { $ as $5cb03073d3f54797$export$a8a3e93435678ff9 } from "../../Heading-ba38ScjJ.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-CZt7LCbO.js";
|
|
5
5
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
|
|
6
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-
|
|
7
|
+
import { $ as $fc909762b330b746$export$61c6a8c84e605fb6, a as $d3f049242431219c$export$45fda7c47f93fd48, b as $d3f049242431219c$export$6d3443f2c48bfc20 } from "../../OverlayArrow-5aDgmImj.js";
|
|
8
8
|
import { Button } from "../button/button.js";
|
|
9
9
|
import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
|
|
10
10
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
@@ -258,7 +258,7 @@ const Modal2 = (props) => {
|
|
|
258
258
|
$f3f84453ead64de5$export$2b77a92f1a5ad772,
|
|
259
259
|
{
|
|
260
260
|
className: ({ isEntering, isExiting }) => clsx(
|
|
261
|
-
"es:w-full es:max-w-lg es:overflow-hidden es:rounded-
|
|
261
|
+
"es:w-full es:max-w-lg es:overflow-hidden es:rounded-2xl es:border es:border-secondary-100 es:bg-white es:p-5 es:text-left es:align-middle es:shadow-xl es:inset-ring es:inset-ring-secondary-50",
|
|
262
262
|
isEntering && "es:motion-safe:motion-scale-in-95 es:motion-fade-in es:motion-duration-300 es:motion-ease-spring-smooth/scale",
|
|
263
263
|
isExiting && "es:motion-safe:motion-scale-out-95 es:motion-fade-out es:motion-duration-250 es:motion-ease-spring-smooth/scale",
|
|
264
264
|
className
|
|
@@ -31,30 +31,30 @@ const Notice = (props) => {
|
|
|
31
31
|
const styles = {
|
|
32
32
|
info: {
|
|
33
33
|
icon: icons.infoCircle,
|
|
34
|
-
className: "es:border-blue-400 es:shadow-blue-500/15 es:bg-blue-
|
|
34
|
+
className: "es:border-blue-400/75 es:shadow-blue-500/15 es:bg-blue-200/5",
|
|
35
35
|
iconColor: "es:text-blue-400",
|
|
36
|
-
textColor: "es:text-blue-
|
|
36
|
+
textColor: "es:text-blue-500 es:saturate-75",
|
|
37
37
|
subtitleColor: "es:text-blue-950/60"
|
|
38
38
|
},
|
|
39
39
|
success: {
|
|
40
40
|
icon: icons.checkSquare,
|
|
41
|
-
className: "es:border-
|
|
42
|
-
iconColor: "es:text-
|
|
43
|
-
textColor: "es:text-
|
|
44
|
-
subtitleColor: "es:text-
|
|
41
|
+
className: "es:border-emerald-500/75 es:shadow-emerald-500/15 es:bg-emerald-200/5",
|
|
42
|
+
iconColor: "es:text-emerald-500",
|
|
43
|
+
textColor: "es:text-emerald-600",
|
|
44
|
+
subtitleColor: "es:text-emerald-950/60"
|
|
45
45
|
},
|
|
46
46
|
warning: {
|
|
47
47
|
icon: icons.warning,
|
|
48
|
-
className: "es:border-
|
|
49
|
-
iconColor: "es:text-
|
|
50
|
-
textColor: "es:text-
|
|
51
|
-
subtitleColor: "es:text-
|
|
48
|
+
className: "es:border-orange-500/75 es:shadow-orange-500/15 es:bg-orange-200/5",
|
|
49
|
+
iconColor: "es:text-orange-500",
|
|
50
|
+
textColor: "es:text-orange-700",
|
|
51
|
+
subtitleColor: "es:text-orange-950/60"
|
|
52
52
|
},
|
|
53
53
|
error: {
|
|
54
54
|
icon: icons.errorCircle,
|
|
55
|
-
className: "es:border-red-
|
|
56
|
-
iconColor: "es:text-red-
|
|
57
|
-
textColor: "es:text-red-
|
|
55
|
+
className: "es:border-red-300 es:shadow-red-500/15 es:bg-red-200/5",
|
|
56
|
+
iconColor: "es:text-red-500",
|
|
57
|
+
textColor: "es:text-red-700",
|
|
58
58
|
subtitleColor: "es:text-red-950/60"
|
|
59
59
|
},
|
|
60
60
|
placeholder: {
|
|
@@ -75,9 +75,9 @@ const Notice = (props) => {
|
|
|
75
75
|
"div",
|
|
76
76
|
{
|
|
77
77
|
className: clsx(
|
|
78
|
-
"es:grid es:grid-cols-[auto_1fr] es:grid-rows-[auto_auto] es:rounded-
|
|
78
|
+
"es:grid es:grid-cols-[auto_1fr] es:grid-rows-[auto_auto] es:rounded-xl es:border es:bg-linear-to-tr es:shadow-sm",
|
|
79
79
|
styles[type].className,
|
|
80
|
-
icon || styles[type].icon ? "es:gap-x-1.5 es:p-
|
|
80
|
+
icon || styles[type].icon ? "es:gap-x-1.5 es:p-2" : "es:px-2 es:py-2",
|
|
81
81
|
className
|
|
82
82
|
),
|
|
83
83
|
children: [
|
|
@@ -85,7 +85,7 @@ const Notice = (props) => {
|
|
|
85
85
|
"span",
|
|
86
86
|
{
|
|
87
87
|
className: clsx(
|
|
88
|
-
"es:col-span-1 es:col-start-1 es:row-span-2 es:row-start-1 es:shrink-0 es:icon:size-
|
|
88
|
+
"es:col-span-1 es:col-start-1 es:row-span-2 es:row-start-1 es:shrink-0 es:icon:size-6",
|
|
89
89
|
alignIconToTitle ? "es:self-baseline" : "es:self-center",
|
|
90
90
|
styles[type].iconColor
|
|
91
91
|
),
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import React__default, { forwardRef, createContext, useRef, useState, cloneElement } from "react";
|
|
3
3
|
import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
|
|
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, g as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, h as $64fa3d84918910a7$export$ef03459518577ad4, b as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a } from "../../utils-
|
|
9
|
-
import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-
|
|
4
|
+
import { a as $a049562f99e7db0e$export$f9c6924e160136d1, $ as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4 } from "../../Group-DDPhPPTQ.js";
|
|
5
|
+
import { a as $3985021b0ad6602f$export$37fb8590cf2c088c, $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-BmDS8Juy.js";
|
|
6
|
+
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-JS_ob-kh.js";
|
|
7
|
+
import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "../../Button-BpwTmkAe.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-CZt7LCbO.js";
|
|
9
|
+
import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-DHrSdE_Q.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-BuJgePCv.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-BbYZoHvX.js";
|
|
14
|
+
import { $ as $de67e98908f0c6ee$export$7f629e9dc1ecf37c, a as $81397a9303501bda$export$23f548e970bdf099 } from "../../useNumberField-CU1_u8ze.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";
|
|
@@ -218,7 +218,7 @@ const NumberPicker = ({
|
|
|
218
218
|
$a049562f99e7db0e$export$eb2fcfdbd7ba97d4,
|
|
219
219
|
{
|
|
220
220
|
className: clsx(
|
|
221
|
-
"es:group es:flex es:w-fit es:items-center es:rounded-
|
|
221
|
+
"es:group es:flex es:w-fit es:items-center es:rounded-10 es:border es:border-secondary-300 es:pl-1 es:pr-0.5 es:shadow-sm es:focus-within:shadow-md es:transition",
|
|
222
222
|
"es:inset-ring es:inset-ring-secondary-100",
|
|
223
223
|
isInputFocused && "es:outline-hidden es:focus-visible:border-accent-500 es:focus-visible:ring-2 es:focus-visible:ring-accent-500/50",
|
|
224
224
|
!prefix && (((_a = sizes == null ? void 0 : sizes[size]) == null ? void 0 : _a.noPrefixPadding) ?? sizes.default.noPrefixPadding),
|
|
@@ -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-ba38ScjJ.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.
|
|
@@ -27,13 +27,20 @@ const FilePlaceholder = (props) => {
|
|
|
27
27
|
return /* @__PURE__ */ jsx(
|
|
28
28
|
RichLabel,
|
|
29
29
|
{
|
|
30
|
-
icon:
|
|
30
|
+
icon: /* @__PURE__ */ jsx(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
className: clsx(
|
|
34
|
+
"es:w-fit es:rounded-xl es:border es:border-secondary-300 es:p-2",
|
|
35
|
+
fileName && "es:shadow-sm es:bg-gradient-to-br es:from-secondary-50 es:to-secondary-100 es:text-secondary-600",
|
|
36
|
+
!fileName && "es:border-dashed es:text-secondary-500"
|
|
37
|
+
),
|
|
38
|
+
children: icon ?? icons.file
|
|
39
|
+
}
|
|
40
|
+
),
|
|
31
41
|
label: (fileName ? fileName : children) ?? __("No file selected", "eightshift-ui-components"),
|
|
32
|
-
className: clsx(
|
|
33
|
-
|
|
34
|
-
fileName && "es:font-mono",
|
|
35
|
-
className
|
|
36
|
-
)
|
|
42
|
+
className: clsx(fileName && "es:font-mono", className),
|
|
43
|
+
noColor: true
|
|
37
44
|
}
|
|
38
45
|
);
|
|
39
46
|
};
|
|
@@ -32,8 +32,8 @@ const ImagePlaceholder = (props) => {
|
|
|
32
32
|
return null;
|
|
33
33
|
}
|
|
34
34
|
const styleClassName = {
|
|
35
|
-
default: "es:rounded-
|
|
36
|
-
simple: "es:rounded-
|
|
35
|
+
default: "es:rounded-2xl es:border es:border-secondary-300 es:bg-gradient-to-br es:from-white es:to-secondary-50 es:text-secondary-300 es:shadow-sm",
|
|
36
|
+
simple: "es:rounded-2xl es:border es:border-secondary-300 es:border-dashed es:text-secondary-300"
|
|
37
37
|
};
|
|
38
38
|
const sizeClassName = {
|
|
39
39
|
auto: "",
|
|
@@ -29,8 +29,8 @@ const MediaPlaceholder = (props) => {
|
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
31
31
|
const styleClassName = {
|
|
32
|
-
default: "es:rounded-
|
|
33
|
-
simple: "es:rounded-
|
|
32
|
+
default: "es:rounded-2xl es:border es:border-secondary-300 es:bg-secondary-50 es:text-secondary-400 es:shadow-sm",
|
|
33
|
+
simple: "es:rounded-2xl es:border es:border-secondary-300 es:border-dashed es:text-secondary-400"
|
|
34
34
|
};
|
|
35
35
|
const sizeClassName = {
|
|
36
36
|
auto: "",
|
|
@@ -1,5 +1,5 @@
|
|
|
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-O9uw63D7.js";
|
|
3
3
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
4
4
|
import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
|
|
5
5
|
import { Button } from "../button/button.js";
|
|
@@ -102,7 +102,7 @@ const Popover = (props) => {
|
|
|
102
102
|
crossOffset,
|
|
103
103
|
containerPadding,
|
|
104
104
|
className: ({ isEntering, isExiting }) => clsx(
|
|
105
|
-
"es:rounded-
|
|
105
|
+
"es:rounded-2xl es:border es:border-secondary-300 es:bg-white es:inset-ring es:inset-ring-secondary-100 es:shadow-xl es:outline-hidden",
|
|
106
106
|
"es:motion-safe:motion-ease-spring-smooth",
|
|
107
107
|
isEntering && "es:motion-safe:motion-preset-slide-down-sm es:motion-safe:motion-duration-300 es:motion-reduce:motion-preset-fade-md",
|
|
108
108
|
isExiting && "es:not-motion-reduce:motion-translate-y-out-[-2.5%] es:motion-opacity-out-0 es:motion-duration-200",
|
|
@@ -1,19 +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, 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-
|
|
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-JS_ob-kh.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-CZt7LCbO.js";
|
|
4
|
+
import { a as $2baaea4c71418dea$export$294aa081a6c6f55d, $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-DHrSdE_Q.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-BuJgePCv.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 { $ as $99facab73266f662$export$5add1d006293d136 } from "../../useFormReset-
|
|
10
|
-
import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "../../usePress-
|
|
11
|
-
import { a as $f645667febf57a63$export$4c014de7c8940b4c, b as $458b0a5536c1a7cf$export$40bfa8c7b0832715, $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-
|
|
12
|
-
import { a as $e93e671b31057976$export$b8473d3665f3a75a, $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10 } from "../../useFormValidation-
|
|
13
|
-
import { a as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "../../FocusScope-
|
|
14
|
-
import { a as $9ab94262bd0047c7$export$420e68273165f4ec, $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-
|
|
15
|
-
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-
|
|
16
|
-
import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "../../VisuallyHidden-
|
|
9
|
+
import { $ as $99facab73266f662$export$5add1d006293d136 } from "../../useFormReset-D2YaWRIA.js";
|
|
10
|
+
import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "../../usePress-BrJylgPR.js";
|
|
11
|
+
import { a as $f645667febf57a63$export$4c014de7c8940b4c, b as $458b0a5536c1a7cf$export$40bfa8c7b0832715, $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-C2SkI1Fn.js";
|
|
12
|
+
import { a as $e93e671b31057976$export$b8473d3665f3a75a, $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10 } from "../../useFormValidation-Dy0PXJg5.js";
|
|
13
|
+
import { a as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "../../FocusScope-BEPI2m7u.js";
|
|
14
|
+
import { a as $9ab94262bd0047c7$export$420e68273165f4ec, $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-Bv0UJQl8.js";
|
|
15
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-BbYZoHvX.js";
|
|
16
|
+
import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "../../VisuallyHidden-BYi0pekx.js";
|
|
17
17
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
18
18
|
import { AnimatedVisibility } from "../animated-visibility/animated-visibility.js";
|
|
19
19
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
@@ -287,7 +287,10 @@ const $b6c3ddc6086f204d$export$d7b12c4107be0d61 = /* @__PURE__ */ forwardRef(fun
|
|
|
287
287
|
let { inputRef: userProvidedInputRef = null, ...otherProps } = props;
|
|
288
288
|
[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(otherProps, ref, $b6c3ddc6086f204d$export$b118023277d4a5c3);
|
|
289
289
|
let state = React__default.useContext($b6c3ddc6086f204d$export$29d84393af70866c);
|
|
290
|
-
let inputRef = $df56164dff5785e2$export$4338b53315abf666($5dc95899b306f630$export$c9058316764c140e(userProvidedInputRef, props.inputRef !== void 0 ? props.inputRef : null)
|
|
290
|
+
let inputRef = $df56164dff5785e2$export$4338b53315abf666(useMemo(() => $5dc95899b306f630$export$c9058316764c140e(userProvidedInputRef, props.inputRef !== void 0 ? props.inputRef : null), [
|
|
291
|
+
userProvidedInputRef,
|
|
292
|
+
props.inputRef
|
|
293
|
+
]));
|
|
291
294
|
let { labelProps, inputProps, isSelected, isDisabled, isPressed } = $0d5c49892c1215da$export$37b0961d2f4751e2({
|
|
292
295
|
...$64fa3d84918910a7$export$ef03459518577ad4(props),
|
|
293
296
|
// ReactNode type doesn't allow function children.
|
|
@@ -379,14 +382,14 @@ const RadioButton = (props) => {
|
|
|
379
382
|
"es:cursor-pointer es:py-1 es:px-1.5 es:border es:border-secondary-300 es:hover:bg-secondary-100/75 es:transition es:min-h-10",
|
|
380
383
|
"es:first:rounded-t-xl es:last:rounded-b-xl",
|
|
381
384
|
"es:focus-visible:ring-2 es:focus-visible:border-accent-500 es:focus-visible:ring-accent-500/50 es:focus-visible:z-10",
|
|
382
|
-
"es:shadow-
|
|
385
|
+
"es:shadow-sm es:inset-ring es:inset-shadow-xs",
|
|
383
386
|
"es:inset-ring-secondary-100 es:inset-shadow-secondary-100/50"
|
|
384
387
|
),
|
|
385
388
|
segmentedHorizontal: clsx(
|
|
386
389
|
"es:cursor-pointer es:py-1 es:px-1.5 es:border es:border-secondary-300 es:hover:bg-secondary-100/75 es:transition es:grow es:min-h-10",
|
|
387
390
|
"es:first:rounded-l-xl es:last:rounded-r-xl",
|
|
388
391
|
"es:focus-visible:ring-2 es:focus-visible:border-accent-500 es:focus-visible:ring-accent-500/50 es:focus-visible:z-10",
|
|
389
|
-
"es:shadow-
|
|
392
|
+
"es:shadow-sm es:inset-ring es:inset-shadow-xs",
|
|
390
393
|
"es:inset-ring-secondary-100 es:inset-shadow-secondary-100/50"
|
|
391
394
|
)
|
|
392
395
|
};
|
|
@@ -417,7 +420,7 @@ const RadioButton = (props) => {
|
|
|
417
420
|
"es:size-5 es:flex es:items-center es:justify-center",
|
|
418
421
|
"es:transition es:cursor-pointer",
|
|
419
422
|
"es:bg-radial es:border es:rounded-full",
|
|
420
|
-
"es:shadow-
|
|
423
|
+
"es:shadow-sm es:inset-ring es:inset-shadow-xs",
|
|
421
424
|
"es:any-focus:outline-hidden",
|
|
422
425
|
!isSelected && "es:border-secondary-300 es:inset-ring-secondary-100 es:inset-shadow-secondary-100/50",
|
|
423
426
|
!isSelected && "es:from-secondary-50 es:to-white es:text-secondary-600 es:hover:text-accent-950",
|