@eightshift/ui-components 1.9.1 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -7
- package/dist/{Button-BEIi9mB_.js → Button-OQ5EIPvt.js} +8 -8
- package/dist/{SelectionManager-DGbP8Ntl.js → Collection-CJM_asJz.js} +345 -197
- package/dist/{Color-CZxTZUqH.js → Color-B0HgM8f4.js} +1 -1
- package/dist/{ColorSwatch-Iijp9hzP.js → ColorSwatch-Dv3Wxdl_.js} +6 -7
- package/dist/{ComboBox-DVPU5XzU.js → ComboBox-BnlZjJ3T.js} +21 -22
- package/dist/{Dialog-17uxPRe5.js → Dialog-CIh-hX93.js} +77 -65
- package/dist/{FieldError-huHsqqMP.js → FieldError-D7A6s7O5.js} +2 -2
- package/dist/{FocusScope-7r2_SUa9.js → FocusScope-Cs5_OoeA.js} +6 -4
- package/dist/{Group-k_oyd3Te.js → Group-D6tr3U_n.js} +5 -6
- package/dist/{Heading-DRBzKYHb.js → Heading-DiYTXoIW.js} +3 -4
- package/dist/{Hidden-5cXbU70C.js → Hidden-DnOd_jPX.js} +2 -2
- package/dist/{Input-DCmTv_Qw.js → Input-Se0m3ubj.js} +13 -11
- package/dist/{Label-D8G0GMsc.js → Label-Ca9uelsn.js} +4 -5
- package/dist/{List-C7L49CxW.js → List-Br274SP1.js} +16 -8
- package/dist/{ListBox-BxZwDp9o.js → ListBox-D9dFEh5A.js} +36 -23
- package/dist/{OverlayArrow-Dca2JXYU.js → OverlayArrow-1jx-ZyCR.js} +75 -13
- package/dist/{Select-aab027f3.esm-OvJ8lZs8.js → Select-aab027f3.esm-HFNIFFya.js} +4 -4
- package/dist/{Separator-B_VdRHCf.js → Separator-BhZycTUp.js} +9 -7
- package/dist/{Slider-CgEZmlNY.js → Slider-BZNaJylD.js} +20 -24
- package/dist/{Text-Cld9rkzJ.js → Text-aOUPPvTO.js} +3 -4
- package/dist/{VisuallyHidden-D0lsNfi4.js → VisuallyHidden-ClTQo25k.js} +2 -2
- package/dist/assets/index.css +37 -0
- package/dist/assets/style-admin.css +5287 -0
- package/dist/assets/style-editor.css +5287 -0
- package/dist/assets/style.css +5293 -1
- package/dist/assets/wp-font-enhancements.css +8 -1
- package/dist/assets/wp-ui-enhancements.css +299 -1
- package/dist/components/animated-visibility/animated-visibility.js +17 -21
- package/dist/components/base-control/base-control.js +7 -7
- package/dist/components/breakpoint-preview/breakpoint-preview.js +50 -50
- package/dist/components/button/button.js +190 -86
- package/dist/components/checkbox/checkbox.js +44 -27
- package/dist/components/color-pickers/color-picker.js +13 -9
- package/dist/components/color-pickers/color-swatch.js +4 -4
- package/dist/components/color-pickers/gradient-editor.js +25 -24
- package/dist/components/color-pickers/solid-color-picker.js +197 -229
- package/dist/components/component-toggle/component-toggle.js +3 -3
- package/dist/components/container-panel/container-panel.js +17 -17
- package/dist/components/draggable/draggable-handle.js +6 -6
- package/dist/components/draggable/draggable.js +1414 -699
- package/dist/components/draggable-list/draggable-list-item.js +3 -3
- package/dist/components/draggable-list/draggable-list.js +12 -12
- package/dist/components/expandable/expandable.js +66 -78
- package/dist/components/index.js +2 -3
- package/dist/components/input-field/input-field.js +35 -22
- package/dist/components/layout/hstack.js +1 -1
- package/dist/components/layout/vstack.js +1 -1
- package/dist/components/link-input/link-input.js +69 -57
- package/dist/components/matrix-align/matrix-align.js +34 -86
- package/dist/components/menu/menu.js +22 -23
- package/dist/components/modal/modal.js +24 -25
- package/dist/components/notice/notice.js +32 -32
- package/dist/components/number-picker/number-picker.js +41 -40
- package/dist/components/option-select/option-select.js +9 -4
- package/dist/components/options-panel/options-panel.js +63 -28
- package/dist/components/placeholders/file-placeholder.js +6 -17
- package/dist/components/placeholders/image-placeholder.js +17 -17
- package/dist/components/placeholders/media-placeholder.js +12 -12
- package/dist/components/popover/popover.js +6 -5
- package/dist/components/radio/radio.js +60 -43
- package/dist/components/repeater/repeater-item.js +10 -10
- package/dist/components/repeater/repeater.js +8 -8
- package/dist/components/responsive/mini-responsive.js +41 -41
- package/dist/components/responsive/responsive-legacy.js +33 -33
- package/dist/components/responsive/responsive.js +48 -48
- package/dist/components/responsive-preview/responsive-preview.js +4 -4
- package/dist/components/rich-label/rich-label.js +13 -11
- 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 +3 -3
- 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 +21 -21
- package/dist/components/select/v2/async-select.js +37 -47
- package/dist/components/select/v2/shared.js +8 -8
- package/dist/components/select/v2/single-select.js +44 -48
- package/dist/components/slider/column-config-slider.js +25 -25
- package/dist/components/slider/slider.js +173 -182
- package/dist/components/spacer/spacer.js +21 -21
- package/dist/components/tabs/tabs.js +111 -63
- package/dist/components/toggle/switch.js +27 -21
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +160 -83
- package/dist/components/tooltip/tooltip.js +25 -28
- package/dist/{context-DtrQ3I5U.js → context-CDOs-GuR.js} +1 -1
- package/dist/{focusSafely-ChK5oW-0.js → focusSafely-CiqTTjWy.js} +18 -17
- package/dist/icons/icons.js +52 -0
- package/dist/{index-641ee5b8.esm-DRaWil7u.js → index-641ee5b8.esm-DbdaYaxR.js} +45 -45
- package/dist/{index-D0mHceYg.js → index-BRp93Yfa.js} +24 -31
- package/dist/index-CcCn9HWX.js +44 -0
- package/dist/index.js +2 -3
- package/dist/{multi-select-components-2Ax71j9a.js → multi-select-components-CkF3LyTF.js} +4 -4
- package/dist/{react-select-async.esm-BZwl7Ddb.js → react-select-async.esm-DcVLw9X5.js} +3 -3
- package/dist/{react-select.esm-DI0eSkd8.js → react-select.esm-OZ0cmTjg.js} +3 -3
- package/dist/style-admin.js +1 -0
- package/dist/style-editor.js +1 -0
- package/dist/style.js +1 -1
- package/dist/{textSelection-CdZPiDxh.js → textSelection-BlTDSskG.js} +2 -2
- package/dist/{useButton-C5e_EJlC.js → useButton-CmLbE5vg.js} +3 -3
- package/dist/{useEvent-BW_vevRp.js → useEvent-cLDJlznQ.js} +1 -1
- package/dist/{useFocusRing-Dbj6MsFR.js → useFocusRing-CGp3guTX.js} +1 -1
- package/dist/{useFocusable-C2xrPFl6.js → useFocusable-087cO5Ct.js} +9 -6
- package/dist/{useFormReset-DDCE2RPv.js → useFormReset-NpLM2e3G.js} +1 -1
- package/dist/{useFormValidation-BxnASugK.js → useFormValidation-BWwmZQE2.js} +3 -3
- package/dist/{useLabel-C3sAYsiC.js → useLabel-C85N3Hzw.js} +2 -2
- package/dist/{useLabels-WnPbJUyQ.js → useLabels-C_2wWraB.js} +1 -1
- package/dist/{useListState-BmTFGt2_.js → useListState-Z7FB_NzO.js} +1 -1
- package/dist/{useLocalizedStringFormatter-BurzRhbk.js → useLocalizedStringFormatter-BQ4TF72x.js} +1 -1
- package/dist/{useNumberField-D_Azw6A1.js → useNumberField-Bm6_BVl9.js} +10 -10
- package/dist/{useNumberFormatter-B58dTQ-c.js → useNumberFormatter-DlUVKkO7.js} +1 -1
- package/dist/{usePress-DZ9pn6Jl.js → usePress-rg_OQIGW.js} +15 -14
- package/dist/{useSingleSelectListState-Dr843geC.js → useSingleSelectListState-Cu3xtEJS.js} +2 -2
- package/dist/{useToggle-Dq9VpeCd.js → useToggle-DzlgBLAJ.js} +4 -4
- package/dist/{useToggleState-DA_b3LG_.js → useToggleState-DhSBQxkp.js} +1 -1
- package/dist/{utils-BmaSD6gC.js → utils-39D0mStj.js} +41 -93
- package/package.json +41 -38
- package/dist/GeistMonoVF.woff2 +0 -0
- package/dist/GeistVF.woff2 +0 -0
- package/dist/assets/fonts.css +0 -1
- package/dist/components/list-box/list-box.js +0 -157
- package/dist/fonts.js +0 -1
|
@@ -31,53 +31,53 @@ const Notice = (props) => {
|
|
|
31
31
|
const styles = {
|
|
32
32
|
info: {
|
|
33
33
|
icon: icons.infoCircle,
|
|
34
|
-
className: "es
|
|
35
|
-
iconColor: "es
|
|
36
|
-
textColor: "es
|
|
37
|
-
subtitleColor: "es
|
|
34
|
+
className: "es:border-blue-400 es:shadow-blue-500/15 es:bg-blue-100/5",
|
|
35
|
+
iconColor: "es:text-blue-400",
|
|
36
|
+
textColor: "es:text-blue-900",
|
|
37
|
+
subtitleColor: "es:text-blue-950/60"
|
|
38
38
|
},
|
|
39
39
|
success: {
|
|
40
40
|
icon: icons.checkSquare,
|
|
41
|
-
className: "es
|
|
42
|
-
iconColor: "es
|
|
43
|
-
textColor: "es
|
|
44
|
-
subtitleColor: "es
|
|
41
|
+
className: "es:border-green-500 es:shadow-green-500/15 es:bg-green-100/5",
|
|
42
|
+
iconColor: "es:text-green-500",
|
|
43
|
+
textColor: "es:text-green-900",
|
|
44
|
+
subtitleColor: "es:text-green-950/60"
|
|
45
45
|
},
|
|
46
46
|
warning: {
|
|
47
47
|
icon: icons.warning,
|
|
48
|
-
className: "es
|
|
49
|
-
iconColor: "es
|
|
50
|
-
textColor: "es
|
|
51
|
-
subtitleColor: "es
|
|
48
|
+
className: "es:border-amber-500 es:shadow-amber-500/15 es:bg-amber-100/5",
|
|
49
|
+
iconColor: "es:text-amber-500",
|
|
50
|
+
textColor: "es:text-amber-900",
|
|
51
|
+
subtitleColor: "es:text-amber-950/60"
|
|
52
52
|
},
|
|
53
53
|
error: {
|
|
54
54
|
icon: icons.errorCircle,
|
|
55
|
-
className: "es
|
|
56
|
-
iconColor: "es
|
|
57
|
-
textColor: "es
|
|
58
|
-
subtitleColor: "es
|
|
55
|
+
className: "es:border-red-400 es:shadow-red-500/15 es:bg-red-100/5",
|
|
56
|
+
iconColor: "es:text-red-400",
|
|
57
|
+
textColor: "es:text-red-900",
|
|
58
|
+
subtitleColor: "es:text-red-950/60"
|
|
59
59
|
},
|
|
60
60
|
placeholder: {
|
|
61
61
|
icon: icons.componentGeneric,
|
|
62
|
-
className: "es
|
|
63
|
-
iconColor: "es
|
|
64
|
-
textColor: "es
|
|
65
|
-
subtitleColor: "es
|
|
62
|
+
className: "es:border-secondary-400 es:shadow-secondary-300/25 es:border-dashed es:bg-secondary-200/5",
|
|
63
|
+
iconColor: "es:text-secondary-400",
|
|
64
|
+
textColor: "es:text-secondary-900",
|
|
65
|
+
subtitleColor: "es:text-secondary-500"
|
|
66
66
|
},
|
|
67
67
|
default: {
|
|
68
|
-
className: "es
|
|
69
|
-
iconColor: "es
|
|
70
|
-
textColor: "es
|
|
71
|
-
subtitleColor: "es
|
|
68
|
+
className: "es:border-secondary-300 es:shadow-secondary-300/25 es:bg-secondary-200/5",
|
|
69
|
+
iconColor: "es:text-secondary-400",
|
|
70
|
+
textColor: "es:text-secondary-900",
|
|
71
|
+
subtitleColor: "es:text-secondary-500"
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
74
|
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
|
|
75
75
|
"div",
|
|
76
76
|
{
|
|
77
77
|
className: clsx(
|
|
78
|
-
"es
|
|
78
|
+
"es:grid es:grid-cols-[auto_1fr] es:grid-rows-[auto_auto] es:rounded-md es:border es:bg-linear-to-tr es:shadow-sm",
|
|
79
79
|
styles[type].className,
|
|
80
|
-
icon || styles[type].icon ? "es
|
|
80
|
+
icon || styles[type].icon ? "es:gap-x-1.5 es:p-1.5" : "es:px-2 es:py-1.5",
|
|
81
81
|
className
|
|
82
82
|
),
|
|
83
83
|
children: [
|
|
@@ -85,8 +85,8 @@ const Notice = (props) => {
|
|
|
85
85
|
"span",
|
|
86
86
|
{
|
|
87
87
|
className: clsx(
|
|
88
|
-
"es
|
|
89
|
-
alignIconToTitle ? "es
|
|
88
|
+
"es:col-span-1 es:col-start-1 es:row-span-2 es:row-start-1 es:shrink-0 es:self-center es:icon:size-7",
|
|
89
|
+
alignIconToTitle ? "es:self-baseline" : "es:self-center",
|
|
90
90
|
styles[type].iconColor
|
|
91
91
|
),
|
|
92
92
|
children: icon ?? styles[type].icon
|
|
@@ -96,8 +96,8 @@ const Notice = (props) => {
|
|
|
96
96
|
"span",
|
|
97
97
|
{
|
|
98
98
|
className: clsx(
|
|
99
|
-
"es
|
|
100
|
-
subtitle ? "es
|
|
99
|
+
"es:col-span-2 es:col-start-2 es:text-balance es:text-sm es:leading-tight",
|
|
100
|
+
subtitle ? "es:self-end" : "es:row-span-2 es:self-center",
|
|
101
101
|
styles[type].textColor
|
|
102
102
|
),
|
|
103
103
|
children: label
|
|
@@ -107,9 +107,9 @@ const Notice = (props) => {
|
|
|
107
107
|
"span",
|
|
108
108
|
{
|
|
109
109
|
className: clsx(
|
|
110
|
-
"es
|
|
110
|
+
"es:col-span-2 es:col-start-2 es:text-balance es:text-xs es:leading-tight",
|
|
111
111
|
styles[type].subtitleColor,
|
|
112
|
-
label ? "es
|
|
112
|
+
label ? "es:self-start" : "es:row-span-2 es:self-center"
|
|
113
113
|
),
|
|
114
114
|
children: subtitle
|
|
115
115
|
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import React__default, { forwardRef, useRef, createContext, useState, cloneElement } from "react";
|
|
3
3
|
import { _ as __ } from "../../default-i18n-CM1-Xvzf.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, h as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, i as $64fa3d84918910a7$export$ef03459518577ad4, b as $64fa3d84918910a7$export$4d86445c2cf5e3, j 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-D6tr3U_n.js";
|
|
5
|
+
import { a as $3985021b0ad6602f$export$37fb8590cf2c088c, $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-Se0m3ubj.js";
|
|
6
|
+
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-Ca9uelsn.js";
|
|
7
|
+
import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "../../Button-OQ5EIPvt.js";
|
|
8
|
+
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, h as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, i as $64fa3d84918910a7$export$ef03459518577ad4, b as $64fa3d84918910a7$export$4d86445c2cf5e3, j as $64fa3d84918910a7$export$2881499e37b75b9a } from "../../utils-39D0mStj.js";
|
|
9
|
+
import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-D7A6s7O5.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-aOUPPvTO.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-CDOs-GuR.js";
|
|
14
|
+
import { $ as $de67e98908f0c6ee$export$7f629e9dc1ecf37c, a as $81397a9303501bda$export$23f548e970bdf099 } from "../../useNumberField-Bm6_BVl9.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";
|
|
18
18
|
import { BaseControl } from "../base-control/base-control.js";
|
|
19
19
|
const $b91743d66a0ed188$export$b414a48cf5dcbc11 = /* @__PURE__ */ createContext(null);
|
|
20
20
|
const $b91743d66a0ed188$export$6cc906c6cff9bec5 = /* @__PURE__ */ createContext(null);
|
|
21
|
-
|
|
21
|
+
const $b91743d66a0ed188$export$63c5fa0b2fdccd2e = /* @__PURE__ */ forwardRef(function NumberField(props, ref) {
|
|
22
22
|
[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $b91743d66a0ed188$export$b414a48cf5dcbc11);
|
|
23
23
|
let { validationBehavior: formValidationBehavior } = $64fa3d84918910a7$export$fabf2dc03a41866e($d3e0e05bdfcf66bd$export$c24727297075ec6a) || {};
|
|
24
24
|
var _props_validationBehavior, _ref;
|
|
@@ -106,8 +106,7 @@ function $b91743d66a0ed188$var$NumberField(props, ref) {
|
|
|
106
106
|
name: props.name,
|
|
107
107
|
value: isNaN(state.numberValue) ? "" : state.numberValue
|
|
108
108
|
}));
|
|
109
|
-
}
|
|
110
|
-
const $b91743d66a0ed188$export$63c5fa0b2fdccd2e = /* @__PURE__ */ forwardRef($b91743d66a0ed188$var$NumberField);
|
|
109
|
+
});
|
|
111
110
|
/**
|
|
112
111
|
* A number picker component.
|
|
113
112
|
*
|
|
@@ -176,19 +175,19 @@ const NumberPicker = ({
|
|
|
176
175
|
}
|
|
177
176
|
const sizes = {
|
|
178
177
|
compact: {
|
|
179
|
-
field: "es
|
|
180
|
-
noPrefixPadding: "es
|
|
181
|
-
extraContentSeparator: "es
|
|
178
|
+
field: "es:min-h-5",
|
|
179
|
+
noPrefixPadding: "es:pl-1.5",
|
|
180
|
+
extraContentSeparator: "es:h-[1.875rem]"
|
|
182
181
|
},
|
|
183
182
|
small: {
|
|
184
|
-
field: "es
|
|
185
|
-
noPrefixPadding: "es
|
|
186
|
-
extraContentSeparator: "es
|
|
183
|
+
field: "es:min-h-9",
|
|
184
|
+
noPrefixPadding: "es:pl-2",
|
|
185
|
+
extraContentSeparator: "es:h-[2.125rem]"
|
|
187
186
|
},
|
|
188
187
|
default: {
|
|
189
|
-
field: "es
|
|
190
|
-
noPrefixPadding: "es
|
|
191
|
-
extraContentSeparator: "es
|
|
188
|
+
field: "es:min-h-10",
|
|
189
|
+
noPrefixPadding: "es:pl-2",
|
|
190
|
+
extraContentSeparator: "es:h-[2.375rem]"
|
|
192
191
|
}
|
|
193
192
|
};
|
|
194
193
|
return /* @__PURE__ */ jsx(
|
|
@@ -212,22 +211,24 @@ const NumberPicker = ({
|
|
|
212
211
|
subtitle,
|
|
213
212
|
help,
|
|
214
213
|
inline,
|
|
215
|
-
className: "text-sm",
|
|
214
|
+
className: "es:text-sm",
|
|
216
215
|
children: /* @__PURE__ */ jsxs(
|
|
217
216
|
$a049562f99e7db0e$export$eb2fcfdbd7ba97d4,
|
|
218
217
|
{
|
|
219
218
|
className: clsx(
|
|
220
|
-
"es
|
|
221
|
-
|
|
219
|
+
"es:group es:flex es:w-fit es:items-center es:rounded-lg es:border es:border-secondary-300 es:pl-1 es:pr-0.5 es:shadow-xs es:transition",
|
|
220
|
+
"es:inset-ring es:inset-ring-secondary-100",
|
|
221
|
+
isInputFocused && "es:outline-hidden es:focus-visible:border-accent-500 es:focus-visible:ring-2 es:focus-visible:ring-accent-500/50",
|
|
222
222
|
!prefix && (((_a = sizes == null ? void 0 : sizes[size]) == null ? void 0 : _a.noPrefixPadding) ?? sizes.default.noPrefixPadding),
|
|
223
|
-
((_b = sizes == null ? void 0 : sizes[size]) == null ? void 0 : _b.field) ?? sizes.default.field
|
|
223
|
+
((_b = sizes == null ? void 0 : sizes[size]) == null ? void 0 : _b.field) ?? sizes.default.field,
|
|
224
|
+
"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"
|
|
224
225
|
),
|
|
225
226
|
children: [
|
|
226
227
|
prefix && /* @__PURE__ */ jsx(
|
|
227
228
|
"span",
|
|
228
229
|
{
|
|
229
230
|
slot: "prefix",
|
|
230
|
-
className: "es
|
|
231
|
+
className: "es:col-start-1 es:row-span-2 es:mr-0.5 es:select-none es:self-center es:text-sm es:text-secondary-400",
|
|
231
232
|
children: prefix
|
|
232
233
|
}
|
|
233
234
|
),
|
|
@@ -236,7 +237,7 @@ const NumberPicker = ({
|
|
|
236
237
|
{
|
|
237
238
|
onFocus: () => setIsInputFocused(true),
|
|
238
239
|
onBlur: () => setIsInputFocused(false),
|
|
239
|
-
className: "es
|
|
240
|
+
className: "es:col-start-2 es:row-span-2 es:border-none! es:bg-transparent es:px-0! es:py-1! es:text-sm es:tabular-nums es:shadow-none! es:outline-hidden! es:selection:bg-accent-500/20 es:selection:text-accent-950 es:focus:shadow-none! es:focus:outline-hidden",
|
|
240
241
|
placeholder,
|
|
241
242
|
style: {
|
|
242
243
|
width: fixedWidth ? `${fixedWidth}ch` : `calc(${min < 0 ? "0.75ch + " : ""}${(_d = (_c = max ?? 1e3) == null ? void 0 : _c.toString()) == null ? void 0 : _d.length} * 1ch)`
|
|
@@ -244,20 +245,12 @@ const NumberPicker = ({
|
|
|
244
245
|
"aria-label": ariaLabel ?? __("Enter a number", "eightshift-ui-components")
|
|
245
246
|
}
|
|
246
247
|
),
|
|
247
|
-
|
|
248
|
-
"span",
|
|
249
|
-
{
|
|
250
|
-
slot: "suffix",
|
|
251
|
-
className: "es-uic-col-start-3 es-uic-row-span-2 es-uic-select-none es-uic-self-center es-uic-text-xs es-uic-text-gray-500",
|
|
252
|
-
children: suffix
|
|
253
|
-
}
|
|
254
|
-
),
|
|
255
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
248
|
+
/* @__PURE__ */ jsxs("div", { className: clsx("es:opacity-0 es:group-hover:opacity-100 es:group-focus-visible:opacity-100 es:transition-opacity", disabled && "es:invisible"), children: [
|
|
256
249
|
/* @__PURE__ */ jsx(
|
|
257
250
|
Button,
|
|
258
251
|
{
|
|
259
252
|
type: "ghost",
|
|
260
|
-
className: "es
|
|
253
|
+
className: "es:col-start-4 es:h-3 es:w-4 es:text-secondary-500! es:disabled:text-secondary-300! es:icon:size-[0.8rem]",
|
|
261
254
|
slot: "increment",
|
|
262
255
|
icon: icons.caretUpFill
|
|
263
256
|
}
|
|
@@ -266,15 +259,23 @@ const NumberPicker = ({
|
|
|
266
259
|
Button,
|
|
267
260
|
{
|
|
268
261
|
type: "ghost",
|
|
269
|
-
className: "es
|
|
262
|
+
className: "es:col-start-4 es:h-3 es:w-4 es:text-secondary-500! es:disabled:text-secondary-300! es:icon:size-[0.8rem]",
|
|
270
263
|
slot: "decrement",
|
|
271
264
|
icon: icons.caretDownFill
|
|
272
265
|
}
|
|
273
266
|
)
|
|
274
267
|
] }),
|
|
268
|
+
suffix && /* @__PURE__ */ jsx(
|
|
269
|
+
"span",
|
|
270
|
+
{
|
|
271
|
+
slot: "suffix",
|
|
272
|
+
className: "es:col-start-3 es:row-span-2 es:select-none es:self-center es:text-sm es:text-secondary-400 es:mr-0.5",
|
|
273
|
+
children: suffix
|
|
274
|
+
}
|
|
275
|
+
),
|
|
275
276
|
children && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
276
|
-
/* @__PURE__ */ jsx("div", { className: clsx("es
|
|
277
|
-
/* @__PURE__ */ jsx("div", { className: "es
|
|
277
|
+
/* @__PURE__ */ jsx("div", { className: clsx("es:w-px es:bg-secondary-300", ((_e = sizes == null ? void 0 : sizes[size]) == null ? void 0 : _e.extraContentSeparator) ?? sizes.default.extraContentSeparator) }),
|
|
278
|
+
/* @__PURE__ */ jsx("div", { className: "es:p-0.5 es:pr-0", children: Array.isArray(children) ? children.map((child) => cloneElement(child, { slot: null })) : cloneElement(children, { slot: null }) })
|
|
278
279
|
] })
|
|
279
280
|
]
|
|
280
281
|
}
|
|
@@ -38,7 +38,7 @@ import { _ as __ } from "../../default-i18n-CM1-Xvzf.js";
|
|
|
38
38
|
*
|
|
39
39
|
* @returns {JSX.Element} The OptionSelect component.
|
|
40
40
|
*
|
|
41
|
-
* @typedef {'toggleButtons' | 'radios' | 'radiosSegmented' | 'menu'} OptionSelectType
|
|
41
|
+
* @typedef {'toggleButtons' | 'toggleButtonsSplit' | 'radios' | 'radiosSegmented' | 'menu'} OptionSelectType
|
|
42
42
|
*
|
|
43
43
|
* @example
|
|
44
44
|
* <OptionSelect
|
|
@@ -91,7 +91,11 @@ const OptionSelect = (props) => {
|
|
|
91
91
|
tooltip = ariaLabel;
|
|
92
92
|
}
|
|
93
93
|
const currentItem = options == null ? void 0 : options.find(({ value: optionValue }) => optionValue === value);
|
|
94
|
-
const notSetLabel = /* @__PURE__ */ jsx("span", { className: "es
|
|
94
|
+
const notSetLabel = /* @__PURE__ */ jsx("span", { className: "es:leading-3 es:opacity-50", children: __("Not set", "eightshift-ui-components") });
|
|
95
|
+
let radioDesign = "default";
|
|
96
|
+
if (type === "radiosSegmented") {
|
|
97
|
+
radioDesign = "segmented";
|
|
98
|
+
}
|
|
95
99
|
return /* @__PURE__ */ jsxs(
|
|
96
100
|
BaseControl,
|
|
97
101
|
{
|
|
@@ -104,11 +108,12 @@ const OptionSelect = (props) => {
|
|
|
104
108
|
className,
|
|
105
109
|
...rest,
|
|
106
110
|
children: [
|
|
107
|
-
|
|
111
|
+
["toggleButtons", "toggleButtonsSplit"].includes(type) && /* @__PURE__ */ jsx(
|
|
108
112
|
ButtonGroup,
|
|
109
113
|
{
|
|
110
114
|
vertical,
|
|
111
115
|
"aria-label": typeof label !== "undefined" ? null : ariaLabel,
|
|
116
|
+
type: type === "toggleButtonsSplit" ? "split" : "segmented",
|
|
112
117
|
...wrapperProps,
|
|
113
118
|
children: options.map(
|
|
114
119
|
({
|
|
@@ -155,7 +160,7 @@ const OptionSelect = (props) => {
|
|
|
155
160
|
{
|
|
156
161
|
orientation: vertical ? "vertical" : "horizontal",
|
|
157
162
|
onChange: (v) => onChange(v),
|
|
158
|
-
design:
|
|
163
|
+
design: radioDesign,
|
|
159
164
|
"aria-label": typeof label !== "undefined" ? null : ariaLabel,
|
|
160
165
|
value,
|
|
161
166
|
...wrapperProps,
|
|
@@ -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-DiYTXoIW.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.
|
|
@@ -30,18 +30,24 @@ const OptionsPanel = (props) => {
|
|
|
30
30
|
if (hidden) {
|
|
31
31
|
return null;
|
|
32
32
|
}
|
|
33
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
33
|
+
return /* @__PURE__ */ jsxs("div", { className: "es:not-last:mb-10", children: [
|
|
34
|
+
/* @__PURE__ */ jsxs("div", { className: clsx("es:bg-white es:rounded-xl es:border es:border-secondary-300 es:overflow-clip es:max-w-lg es:shadow-xs", className), children: [
|
|
35
|
+
title && /* @__PURE__ */ jsx(
|
|
36
|
+
RichLabel,
|
|
37
|
+
{
|
|
38
|
+
icon,
|
|
39
|
+
label: title,
|
|
40
|
+
subtitle,
|
|
41
|
+
className: clsx(
|
|
42
|
+
"es:bg-secondary-50 es:shrink-0 es:text-secondary-700 es:px-4 es:**:first:text-base! es:border-b es:border-b-secondary-200",
|
|
43
|
+
subtitle ? "es:py-3" : "es:pt-2.25 es:pb-1.75"
|
|
44
|
+
),
|
|
45
|
+
noColor: true
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
/* @__PURE__ */ jsx("div", { className: "es:divide-y es:divide-secondary-200/75 es:py-4", children })
|
|
49
|
+
] }),
|
|
50
|
+
help && /* @__PURE__ */ jsx("span", { className: "es:mx-0.5 es:mt-1 es:block es:text-sm es:text-secondary-400", children: help })
|
|
45
51
|
] });
|
|
46
52
|
};
|
|
47
53
|
/**
|
|
@@ -65,16 +71,7 @@ const OptionsPanelSection = ({ children, className, hidden }) => {
|
|
|
65
71
|
if (hidden) {
|
|
66
72
|
return null;
|
|
67
73
|
}
|
|
68
|
-
return /* @__PURE__ */ jsx(
|
|
69
|
-
"div",
|
|
70
|
-
{
|
|
71
|
-
className: clsx(
|
|
72
|
-
"last:rounded-b-lg es-uic-space-y-2.5 es-uic-px-3 es-uic-py-4 first:es-uic-rounded-t-lg first:es-uic-pt-3.5 last:es-uic-pb-3.5 only:es-uic-rounded-lg",
|
|
73
|
-
className
|
|
74
|
-
),
|
|
75
|
-
children
|
|
76
|
-
}
|
|
77
|
-
);
|
|
74
|
+
return /* @__PURE__ */ jsx("div", { className: clsx("es:space-y-2.5 es:not-last:pb-4 es:not-first:pt-4 es:px-4", className), children });
|
|
78
75
|
};
|
|
79
76
|
/**
|
|
80
77
|
* Component that provides a header for the top of an options page.
|
|
@@ -85,6 +82,7 @@ const OptionsPanelSection = ({ children, className, hidden }) => {
|
|
|
85
82
|
* @param {string} [props.title] - Title to show.
|
|
86
83
|
* @param {Number} [props.level=2] - Heading level of the title.
|
|
87
84
|
* @param {string} [props.className] - Classes to pass to the container.
|
|
85
|
+
* @param {boolean} [props.limitWidth] - If `true`, the width is limited.
|
|
88
86
|
* @param {JSX.Element|JSX.Element[]} [props.actions] - Controls to show on the right side of the header.
|
|
89
87
|
* @param {boolean} [props.hidden] - If `true`, the component is not rendered.
|
|
90
88
|
*
|
|
@@ -97,27 +95,64 @@ const OptionsPanelSection = ({ children, className, hidden }) => {
|
|
|
97
95
|
*
|
|
98
96
|
* @preserve
|
|
99
97
|
*/
|
|
100
|
-
const OptionsPanelHeader = ({ children, sticky, title, className, actions, level = 2, hidden }) => {
|
|
98
|
+
const OptionsPanelHeader = ({ children, sticky, title, className, actions, level = 2, limitWidth, hidden }) => {
|
|
101
99
|
if (hidden) {
|
|
102
100
|
return null;
|
|
103
101
|
}
|
|
104
|
-
return /* @__PURE__ */ jsxs("div", { className: clsx("es
|
|
105
|
-
/* @__PURE__ */ jsxs("div", { className: "es
|
|
102
|
+
return /* @__PURE__ */ jsxs("div", { className: clsx("es:space-y-2.5", limitWidth && "es:max-w-md", sticky && "es:sticky es:top-0 es:z-10 es:bg-white", className), children: [
|
|
103
|
+
/* @__PURE__ */ jsxs("div", { className: "es:flex es:flex-wrap es:items-center es:justify-between es:gap-x-8 es:gap-y-4", children: [
|
|
106
104
|
/* @__PURE__ */ jsx(
|
|
107
105
|
$5cb03073d3f54797$export$a8a3e93435678ff9,
|
|
108
106
|
{
|
|
109
|
-
className: "es
|
|
107
|
+
className: "es:text-2xl es:font-medium es:tracking-tight",
|
|
110
108
|
level,
|
|
111
109
|
children: title
|
|
112
110
|
}
|
|
113
111
|
),
|
|
114
|
-
/* @__PURE__ */ jsx("div", { className: "es
|
|
112
|
+
/* @__PURE__ */ jsx("div", { className: "es:flex es:items-center es:gap-2", children: actions })
|
|
115
113
|
] }),
|
|
116
114
|
children
|
|
117
115
|
] });
|
|
118
116
|
};
|
|
117
|
+
/**
|
|
118
|
+
* Component that provides an intro for an options page.
|
|
119
|
+
*
|
|
120
|
+
* @component
|
|
121
|
+
* @param {Object} props - Component props.
|
|
122
|
+
* @param {string} [props.title] - Title to show.
|
|
123
|
+
* @param {string} [props.subtitle] - Subtitle to show.
|
|
124
|
+
* @param {Number} [props.level=2] - Heading level of the title.
|
|
125
|
+
* @param {string} [props.className] - Classes to pass to the container.
|
|
126
|
+
* @param {JSX.Element|JSX.Element[]} [props.actions] - Controls to show on the right side of the header.
|
|
127
|
+
* @param {boolean} [props.border] - If `true`, a border is shown below the text.
|
|
128
|
+
* @param {boolean} [props.hidden] - If `true`, the component is not rendered.
|
|
129
|
+
*
|
|
130
|
+
* @returns {JSX.Element} The OptionsPanelIntro component.
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* <OptionsPanelIntro title='Theme options' />
|
|
134
|
+
*
|
|
135
|
+
* @preserve
|
|
136
|
+
*/
|
|
137
|
+
const OptionsPanelIntro = ({ title, subtitle, className, level = 3, border, hidden }) => {
|
|
138
|
+
if (hidden) {
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
return /* @__PURE__ */ jsxs("div", { className: clsx("es:pb-2.5", border && "es:mb-5 es:border-b es:border-b-secondary-200", className), children: [
|
|
142
|
+
/* @__PURE__ */ jsx(
|
|
143
|
+
$5cb03073d3f54797$export$a8a3e93435678ff9,
|
|
144
|
+
{
|
|
145
|
+
className: "es:text-lg es:tracking-tight es:text-secondary-800",
|
|
146
|
+
level,
|
|
147
|
+
children: title
|
|
148
|
+
}
|
|
149
|
+
),
|
|
150
|
+
subtitle && /* @__PURE__ */ jsx("p", { className: "es:text-sm es:text-secondary-500 es:mt-0.5", children: subtitle })
|
|
151
|
+
] });
|
|
152
|
+
};
|
|
119
153
|
export {
|
|
120
154
|
OptionsPanel,
|
|
121
155
|
OptionsPanelHeader,
|
|
156
|
+
OptionsPanelIntro,
|
|
122
157
|
OptionsPanelSection
|
|
123
158
|
};
|
|
@@ -24,27 +24,16 @@ import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
|
24
24
|
*/
|
|
25
25
|
const FilePlaceholder = (props) => {
|
|
26
26
|
const { icon, fileName, className, children } = props;
|
|
27
|
-
const commonClassName = clsx(
|
|
28
|
-
"es-uic-w-fit es-uic-rounded-lg es-uic-border es-uic-border-gray-300 es-uic-bg-gray-50 es-uic-p-2 es-uic-pr-3 es-uic-text-xs es-uic-text-gray-300 es-uic-shadow",
|
|
29
|
-
fileName && "es-uic-font-mono",
|
|
30
|
-
className
|
|
31
|
-
);
|
|
32
|
-
if (!fileName) {
|
|
33
|
-
return /* @__PURE__ */ jsx(
|
|
34
|
-
RichLabel,
|
|
35
|
-
{
|
|
36
|
-
icon: icon ?? icons.file,
|
|
37
|
-
label: children ?? __("No file selected", "eightshift-ui-components"),
|
|
38
|
-
className: commonClassName
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
27
|
return /* @__PURE__ */ jsx(
|
|
43
28
|
RichLabel,
|
|
44
29
|
{
|
|
45
30
|
icon: icon ?? icons.file,
|
|
46
|
-
label: fileName ?? __("No file selected", "eightshift-ui-components"),
|
|
47
|
-
className:
|
|
31
|
+
label: (fileName ? fileName : children) ?? __("No file selected", "eightshift-ui-components"),
|
|
32
|
+
className: clsx(
|
|
33
|
+
"es:w-fit es:rounded-xl es:border es:border-secondary-300 es:bg-secondary-50 es:p-2 es:pr-3 es:text-xs es:text-secondary-300 es:shadow-xs",
|
|
34
|
+
fileName && "es:font-mono",
|
|
35
|
+
className
|
|
36
|
+
)
|
|
48
37
|
}
|
|
49
38
|
);
|
|
50
39
|
};
|
|
@@ -32,24 +32,24 @@ const ImagePlaceholder = (props) => {
|
|
|
32
32
|
return null;
|
|
33
33
|
}
|
|
34
34
|
const styleClassName = {
|
|
35
|
-
default: "es
|
|
36
|
-
simple: "es
|
|
35
|
+
default: "es:rounded-xl es:border es:border-secondary-300 es:bg-secondary-50 es:text-secondary-300 es:shadow-xs",
|
|
36
|
+
simple: "es:rounded-xl es:border es:border-secondary-300 es:border-dashed es:text-secondary-300"
|
|
37
37
|
};
|
|
38
38
|
const sizeClassName = {
|
|
39
39
|
auto: "",
|
|
40
|
-
default: "es
|
|
41
|
-
large: "es
|
|
42
|
-
fullWidth: "es
|
|
43
|
-
fullHeight: "es
|
|
44
|
-
full: "es
|
|
45
|
-
video: "es
|
|
40
|
+
default: "es:size-20",
|
|
41
|
+
large: "es:size-40",
|
|
42
|
+
fullWidth: "es:w-full",
|
|
43
|
+
fullHeight: "es:h-full",
|
|
44
|
+
full: "es:size-full",
|
|
45
|
+
video: "es:w-full es:aspect-video"
|
|
46
46
|
};
|
|
47
47
|
return /* @__PURE__ */ jsxs(
|
|
48
48
|
"div",
|
|
49
49
|
{
|
|
50
50
|
className: clsx(
|
|
51
|
-
"es
|
|
52
|
-
"
|
|
51
|
+
"es:grid es:grid-cols-1 es:grid-rows-1 es:overflow-hidden",
|
|
52
|
+
"es:*:col-start-1 es:*:col-end-1 es:*:row-start-1 es:*:row-end-1",
|
|
53
53
|
styleClassName[style] ?? (styleClassName == null ? void 0 : styleClassName.default),
|
|
54
54
|
sizeClassName[size] ?? (sizeClassName == null ? void 0 : sizeClassName.default),
|
|
55
55
|
className
|
|
@@ -59,11 +59,11 @@ const ImagePlaceholder = (props) => {
|
|
|
59
59
|
"img",
|
|
60
60
|
{
|
|
61
61
|
className: clsx(
|
|
62
|
-
"es
|
|
63
|
-
imageMode === "cover" && "es
|
|
64
|
-
imageMode === "contain" && "es
|
|
65
|
-
imageMode === "fill" && "es
|
|
66
|
-
(url == null ? void 0 : url.length) > 0 ? "es-
|
|
62
|
+
"es:size-full es:select-none es:fill-mode-forwards",
|
|
63
|
+
imageMode === "cover" && "es:object-cover",
|
|
64
|
+
imageMode === "contain" && "es:object-contain",
|
|
65
|
+
imageMode === "fill" && "es:object-fill",
|
|
66
|
+
(url == null ? void 0 : url.length) > 0 ? "es:motion-opacity-in es:motion-scale-in-125 es:motion-blur-in-xs es:motion-delay-300/blur es:motion-duration-300 es:motion-ease-spring-snappy/scale" : "es:hidden"
|
|
67
67
|
),
|
|
68
68
|
src: url,
|
|
69
69
|
alt
|
|
@@ -73,8 +73,8 @@ const ImagePlaceholder = (props) => {
|
|
|
73
73
|
"div",
|
|
74
74
|
{
|
|
75
75
|
className: clsx(
|
|
76
|
-
"es
|
|
77
|
-
!url ? "es-
|
|
76
|
+
"es:place-self-center es:justify-self-center es:transition es:fill-mode-forwards es:icon:size-7",
|
|
77
|
+
!url ? "es:motion-opacity-in es:motion-scale-in-90 es:motion-duration-300 es:motion-ease-spring-snappy/scale" : "es:invisible"
|
|
78
78
|
),
|
|
79
79
|
children: icons.image
|
|
80
80
|
}
|
|
@@ -29,31 +29,31 @@ const MediaPlaceholder = (props) => {
|
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
31
31
|
const styleClassName = {
|
|
32
|
-
default: "es
|
|
33
|
-
simple: "es
|
|
32
|
+
default: "es:rounded-xl es:border es:border-secondary-300 es:bg-secondary-50 es:text-secondary-400 es:shadow-xs",
|
|
33
|
+
simple: "es:rounded-xl es:border es:border-secondary-300 es:border-dashed es:text-secondary-400"
|
|
34
34
|
};
|
|
35
35
|
const sizeClassName = {
|
|
36
36
|
auto: "",
|
|
37
|
-
default: "es
|
|
38
|
-
large: "es
|
|
39
|
-
fullWidth: "es
|
|
40
|
-
fullHeight: "es
|
|
41
|
-
full: "es
|
|
42
|
-
video: "es
|
|
37
|
+
default: "es:size-20",
|
|
38
|
+
large: "es:size-40",
|
|
39
|
+
fullWidth: "es:w-full",
|
|
40
|
+
fullHeight: "es:h-full",
|
|
41
|
+
full: "es:size-full",
|
|
42
|
+
video: "es:w-full es:aspect-video"
|
|
43
43
|
};
|
|
44
44
|
return /* @__PURE__ */ jsxs(
|
|
45
45
|
"div",
|
|
46
46
|
{
|
|
47
47
|
className: clsx(
|
|
48
|
-
"es
|
|
48
|
+
"es:flex es:flex-col es:items-center es:justify-center es:gap-2 es:overflow-hidden es:p-2",
|
|
49
49
|
styleClassName[style] ?? (styleClassName == null ? void 0 : styleClassName.default),
|
|
50
50
|
sizeClassName[size] ?? (sizeClassName == null ? void 0 : sizeClassName.default),
|
|
51
51
|
className
|
|
52
52
|
),
|
|
53
53
|
children: [
|
|
54
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
55
|
-
helpText && /* @__PURE__ */ jsx("div", { className: "es
|
|
56
|
-
children && /* @__PURE__ */ jsx("div", { className: "es
|
|
54
|
+
/* @__PURE__ */ jsx("div", { className: "es:icon:size-7", children: icon ?? icons.image }),
|
|
55
|
+
helpText && /* @__PURE__ */ jsx("div", { className: "es:text-sm es:text-secondary-500", children: helpText }),
|
|
56
|
+
children && /* @__PURE__ */ jsx("div", { className: "es:mt-2 es:flex es:items-center es:gap-x-2 es:gap-y-2.5 es:text-sm", children })
|
|
57
57
|
]
|
|
58
58
|
}
|
|
59
59
|
);
|