@eightshift/ui-components 1.0.6 → 1.1.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 +9 -0
- package/dist/{Button-eebLs4cp.js → Button-CbFrFO04.js} +5 -5
- package/dist/{Checkbox-BN0TEda-.js → Checkbox-Cv3pZDHg.js} +12 -16
- package/dist/{ColorSwatch-BrowHhTG.js → ColorSwatch-CNQmCQV8.js} +6 -7
- package/dist/{FieldError-ILxgMZy5.js → FieldError-J1-YPbi6.js} +2 -2
- package/dist/{FocusScope-B9b0VMib.js → FocusScope-Bw-IatMO.js} +79 -153
- package/dist/{GridList-CzpWxJsS.js → GridList-CEzzyr-l.js} +62 -90
- package/dist/{Group-Dkdm2-E7.js → Group-D3Qa6PrV.js} +3 -3
- package/dist/{Input-BJA4rmIo.js → Input-CX_rocyZ.js} +8 -8
- package/dist/{Label-9x5iLJ-Y.js → Label-Bg5O81Wb.js} +1 -1
- package/dist/{ListBox-D3Vr4vvC.js → ListBox-CCWXTj0t.js} +391 -598
- package/dist/{LiveAnnouncer-IsokfWQ5.js → LiveAnnouncer-D8h-3GrG.js} +12 -22
- package/dist/{NumberFormatter-LzoKy975.js → NumberFormatter-U_Gx0UDq.js} +26 -44
- package/dist/{Select-49a62830.esm-CKPmlkza.js → Select-49a62830.esm-BnlXlUnT.js} +92 -166
- package/dist/{SelectionManager-sedvcM-1.js → SelectionManager-XOAt-Ekx.js} +219 -401
- package/dist/{Separator-B6rnDabE.js → Separator-DZeg0KOr.js} +41 -72
- package/dist/{Slider-C5U5N7uM.js → Slider-fULMI0gI.js} +51 -82
- package/dist/{Text-Cyxp9ewv.js → Text-WqetJduR.js} +1 -1
- package/dist/{VisuallyHidden-BPJVSUyp.js → VisuallyHidden-Di1zXprL.js} +8 -11
- package/dist/{ariaHideOutside-ByKBPHmX.js → ariaHideOutside-Zn64-frS.js} +20 -36
- package/dist/assets/style.css +1 -1
- package/dist/assets/wp-font-enhancements.css +1 -1
- package/dist/assets/wp-ui-enhancements.css +1 -1
- package/dist/{button-idVI4jmd.js → button-CD8Q1eok.js} +17 -29
- package/dist/components/animated-visibility/animated-visibility.js +125 -113
- package/dist/components/base-control/base-control.js +3 -9
- package/dist/components/breakpoint-preview/breakpoint-preview.js +51 -108
- package/dist/components/button/button.js +6 -6
- package/dist/components/checkbox/checkbox.js +2 -2
- package/dist/components/color-pickers/color-picker.js +2 -2
- package/dist/components/color-pickers/color-swatch.js +5 -9
- package/dist/components/color-pickers/gradient-editor.js +15 -29
- package/dist/components/color-pickers/solid-color-picker.js +81 -128
- package/dist/components/component-toggle/component-toggle.js +4 -4
- package/dist/components/container-panel/container-panel.js +4 -11
- package/dist/components/draggable-list/draggable-list-item.js +4 -4
- package/dist/components/draggable-list/draggable-list.js +5 -5
- package/dist/components/expandable/expandable.js +45 -57
- package/dist/components/index.js +3 -3
- package/dist/components/input-field/input-field.js +11 -26
- package/dist/components/layout/hstack.js +2 -12
- package/dist/components/layout/vstack.js +2 -12
- package/dist/components/link-input/link-input.js +36 -53
- package/dist/components/list-box/list-box.js +4 -4
- package/dist/components/matrix-align/matrix-align.js +6 -10
- package/dist/components/menu/menu.js +101 -170
- package/dist/components/notice/notice.js +1 -1
- package/dist/components/number-picker/number-picker.js +15 -15
- package/dist/components/option-select/option-select.js +48 -64
- package/dist/components/options-panel/options-panel.js +3 -3
- package/dist/components/placeholders/file-placeholder.js +2 -2
- package/dist/components/placeholders/image-placeholder.js +1 -1
- package/dist/components/placeholders/media-placeholder.js +1 -1
- package/dist/components/popover/popover.js +4 -4
- package/dist/components/radio/radio.js +25 -38
- package/dist/components/repeater/repeater-item.js +6 -17
- package/dist/components/repeater/repeater.js +6 -7
- package/dist/components/responsive/responsive-legacy.js +6 -12
- package/dist/components/responsive/responsive.js +21 -48
- package/dist/components/responsive-preview/responsive-preview.js +1 -1
- package/dist/components/rich-label/rich-label.js +2 -8
- 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 +2 -2
- package/dist/components/select/multi-select-components.js +2 -2
- package/dist/components/select/multi-select.js +3 -3
- package/dist/components/select/react-select-component-wrappers.js +9 -9
- package/dist/components/select/single-select.js +2 -2
- package/dist/components/select/styles.js +3 -10
- package/dist/components/slider/column-config-slider.js +4 -4
- package/dist/components/slider/slider.js +5 -8
- package/dist/components/slider/utils.js +2 -6
- package/dist/components/spacer/spacer.js +2 -7
- package/dist/components/tabs/tabs.js +29 -50
- package/dist/components/toggle/switch.js +8 -8
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +8 -22
- package/dist/components/tooltip/tooltip.js +4 -4
- package/dist/{context-BAcFg5GO.js → context-4oSz1ItD.js} +10 -16
- package/dist/{default-i18n-Bk1GxDHz.js → default-i18n-BqwLkgZv.js} +21 -22
- package/dist/{filterDOMProps-DG2RfOUr.js → filterDOMProps-EDDcM64A.js} +1 -3
- package/dist/{focusSafely-B0hyd-S4.js → focusSafely-BS4dllCW.js} +85 -143
- package/dist/icons/generic-color-swatch.js +105 -13
- package/dist/icons/icons.js +31010 -3447
- package/dist/icons/jsx-svg.js +591 -953
- package/dist/{index-BDk0TPWz.js → index-CAPcSs9K.js} +1504 -2087
- package/dist/{index-a301f526.esm-BzTuHLdr.js → index-a301f526.esm-ByOfDxiG.js} +111 -183
- package/dist/index.js +3 -3
- package/dist/{intlStrings-Ctkp0HDc.js → intlStrings-Dxaeitoh.js} +35 -60
- package/dist/{isScrollable-PcyglExV.js → isScrollable-Dh9D9IOd.js} +1 -2
- package/dist/lite-DVmmD_-j.js +7 -0
- package/dist/{multi-select-components-nORKdJ-2.js → multi-select-components-7vKCF8dG.js} +3 -3
- package/dist/{number-rWqELA8W.js → number-CHmNj-oR.js} +3 -6
- package/dist/{popover-o2Q28Ljn.js → popover-Dk2o4S7K.js} +70 -112
- package/dist/{react-select-async.esm-CLj9uZTq.js → react-select-async.esm-5zW9Dv9E.js} +7 -11
- package/dist/{react-select.esm-3tyTZmrx.js → react-select.esm-Bi6uzjbT.js} +3 -3
- package/dist/{textSelection-BRZdHY-4.js → textSelection-exP_9srp.js} +5 -9
- package/dist/{tooltip-T6H9uF-Z.js → tooltip-BRQ4tvZL.js} +64 -111
- package/dist/{useButton-D-xACzEY.js → useButton-DbjDV_33.js} +19 -22
- package/dist/{useEvent-XlYPKgwX.js → useEvent-zvxfEnmK.js} +2 -3
- package/dist/{useFocusRing-CRx_hYC4.js → useFocusRing-SPRI0-SN.js} +1 -1
- package/dist/{useFocusable-CHfpEdlE.js → useFocusable-CLmhO94g.js} +5 -8
- package/dist/{useFormReset-aHn6-wRk.js → useFormReset-BVWgcyGO.js} +2 -3
- package/dist/{useFormValidationState-CdYmOaXI.js → useFormValidationState-CthG9Fbc.js} +20 -38
- package/dist/{useHasTabbableChild-domoFB7A.js → useHasTabbableChild--gkWUICh.js} +2 -2
- package/dist/{useLabel-DVhXVhtH.js → useLabel-g836T8kL.js} +3 -4
- package/dist/{useLabels-C7E5SkOi.js → useLabels-CfOtyOe2.js} +3 -5
- package/dist/{useListData-BelKu4kx.js → useListData-BpYQj7kK.js} +18 -32
- package/dist/{useListState-BRsq7O1C.js → useListState-DnWZa__1.js} +6 -12
- package/dist/{useLocalizedStringFormatter-WsEL47qR.js → useLocalizedStringFormatter-BQCMno9k.js} +12 -21
- package/dist/{useNumberFieldState-ZH2Qyyxh.js → useNumberFieldState-BegO5X6F.js} +75 -132
- package/dist/{useNumberFormatter-mhdYLxWQ.js → useNumberFormatter-DhOGEsEK.js} +2 -2
- package/dist/{usePress-B42RawCH.js → usePress-CScNeV3V.js} +92 -175
- package/dist/{useToggle-CExfZM8x.js → useToggle-6LnpaJ7-.js} +6 -7
- package/dist/{useToggleState-DghG5ImG.js → useToggleState-Cymkpac8.js} +3 -5
- package/dist/utilities/array-helpers.js +1 -1
- package/dist/utilities/index.js +1 -1
- package/dist/utilities/text-helpers.js +20 -20
- package/dist/{utils-DIBzm1e4.js → utils-Dc35LwuT.js} +49 -90
- package/package.json +96 -90
- package/dist/lite-pbIeT7tm.js +0 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Fragment as Fragment$1 } from "react";
|
|
3
|
-
import { c as clsx } from "../../lite-
|
|
3
|
+
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
4
4
|
import { upperFirst } from "../../utilities/es-dash.js";
|
|
5
5
|
/**
|
|
6
6
|
* Component that renders a preview of the breakpoints to help users visualize the options they set.
|
|
@@ -98,120 +98,63 @@ const BreakpointPreview = (props) => {
|
|
|
98
98
|
bg: "es-uic-bg-slate-600"
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
|
-
return /* @__PURE__ */ jsxs(
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
"
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
101
|
+
return /* @__PURE__ */ jsxs("div", { className: clsx("es-uic-mx-auto es-uic-grid es-uic-w-fit es-uic-shrink-0 es-uic-auto-cols-auto es-uic-grid-rows-[auto,_auto] es-uic-gap-x-2 es-uic-gap-y-0.5"), children: [
|
|
102
|
+
dotsStart && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
103
|
+
/* @__PURE__ */ jsx("div", { className: "es-uic-row-start-1 es-uic-flex es-uic-shrink-0 es-uic-translate-x-1 es-uic-items-center es-uic-gap-1 es-uic-justify-self-end es-uic-text-gray-400", children: /* @__PURE__ */ jsxs("div", { className: "es-uic-flex es-uic-gap-0.5 es-uic-text-gray-300", children: [
|
|
104
|
+
/* @__PURE__ */ jsx("div", { className: "es-uic-size-0.5 es-uic-rounded es-uic-bg-current" }),
|
|
105
|
+
/* @__PURE__ */ jsx("div", { className: "es-uic-size-0.5 es-uic-rounded es-uic-bg-current" }),
|
|
106
|
+
/* @__PURE__ */ jsx("div", { className: "es-uic-size-0.5 es-uic-rounded es-uic-bg-current" })
|
|
107
|
+
] }) }),
|
|
108
|
+
/* @__PURE__ */ jsx("div", { className: "es-uic-row-start-2 es-uic-size-px es-uic-justify-self-end" })
|
|
109
|
+
] }),
|
|
110
|
+
blocks.map(({ width, widthEnd, breakpoint, value, dotsStart: dotsStart2 = false, dotsEnd: dotsEnd2 = false, active = false, alignEnd = false, color }, i) => {
|
|
111
|
+
var _a, _b;
|
|
112
|
+
const activeTextColor = ((_a = activeColors == null ? void 0 : activeColors[color]) == null ? void 0 : _a.text) ?? activeColors.default.text;
|
|
113
|
+
const activeBgColor = ((_b = activeColors == null ? void 0 : activeColors[color]) == null ? void 0 : _b.bg) ?? activeColors.default.bg;
|
|
114
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
115
|
+
/* @__PURE__ */ jsxs("div", { className: "es-uic-row-start-1 es-uic-flex es-uic-min-w-28 es-uic-items-center es-uic-gap-1 es-uic-font-mono es-uic-font-medium es-uic-text-gray-400", children: [
|
|
116
|
+
dotsStart2 && /* @__PURE__ */ jsxs("div", { className: clsx("es-uic-flex es-uic-gap-0.5", active ? activeTextColor : "text-gray-300"), children: [
|
|
110
117
|
/* @__PURE__ */ jsx("div", { className: "es-uic-size-0.5 es-uic-rounded es-uic-bg-current" }),
|
|
111
118
|
/* @__PURE__ */ jsx("div", { className: "es-uic-size-0.5 es-uic-rounded es-uic-bg-current" }),
|
|
112
119
|
/* @__PURE__ */ jsx("div", { className: "es-uic-size-0.5 es-uic-rounded es-uic-bg-current" })
|
|
113
|
-
] })
|
|
114
|
-
/* @__PURE__ */ jsx("
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
({
|
|
118
|
-
width,
|
|
119
|
-
widthEnd,
|
|
120
|
-
breakpoint,
|
|
121
|
-
value,
|
|
122
|
-
dotsStart: dotsStart2 = false,
|
|
123
|
-
dotsEnd: dotsEnd2 = false,
|
|
124
|
-
active = false,
|
|
125
|
-
alignEnd = false,
|
|
126
|
-
color
|
|
127
|
-
}, i) => {
|
|
128
|
-
var _a, _b;
|
|
129
|
-
const activeTextColor = ((_a = activeColors == null ? void 0 : activeColors[color]) == null ? void 0 : _a.text) ?? activeColors.default.text;
|
|
130
|
-
const activeBgColor = ((_b = activeColors == null ? void 0 : activeColors[color]) == null ? void 0 : _b.bg) ?? activeColors.default.bg;
|
|
131
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
132
|
-
/* @__PURE__ */ jsxs("div", { className: "es-uic-row-start-1 es-uic-flex es-uic-min-w-28 es-uic-items-center es-uic-gap-1 es-uic-font-mono es-uic-font-medium es-uic-text-gray-400", children: [
|
|
133
|
-
dotsStart2 && /* @__PURE__ */ jsxs(
|
|
134
|
-
"div",
|
|
135
|
-
{
|
|
136
|
-
className: clsx(
|
|
137
|
-
"es-uic-flex es-uic-gap-0.5",
|
|
138
|
-
active ? activeTextColor : "text-gray-300"
|
|
139
|
-
),
|
|
140
|
-
children: [
|
|
141
|
-
/* @__PURE__ */ jsx("div", { className: "es-uic-size-0.5 es-uic-rounded es-uic-bg-current" }),
|
|
142
|
-
/* @__PURE__ */ jsx("div", { className: "es-uic-size-0.5 es-uic-rounded es-uic-bg-current" }),
|
|
143
|
-
/* @__PURE__ */ jsx("div", { className: "es-uic-size-0.5 es-uic-rounded es-uic-bg-current" })
|
|
144
|
-
]
|
|
145
|
-
}
|
|
146
|
-
),
|
|
147
|
-
width && /* @__PURE__ */ jsx("span", { children: width }),
|
|
148
|
-
/* @__PURE__ */ jsx(
|
|
149
|
-
"div",
|
|
150
|
-
{
|
|
151
|
-
className: clsx(
|
|
152
|
-
"es-uic-grow es-uic-rounded",
|
|
153
|
-
active ? "es-uic-h-0.5" : "es-uic-h-px es-uic-bg-gray-300",
|
|
154
|
-
active && activeBgColor
|
|
155
|
-
)
|
|
156
|
-
}
|
|
157
|
-
),
|
|
158
|
-
widthEnd && /* @__PURE__ */ jsx("span", { children: widthEnd }),
|
|
159
|
-
dotsEnd2 && /* @__PURE__ */ jsxs(
|
|
160
|
-
"div",
|
|
161
|
-
{
|
|
162
|
-
className: clsx(
|
|
163
|
-
"es-uic-flex es-uic-gap-0.5",
|
|
164
|
-
active ? activeTextColor : "es-uic-text-gray-300"
|
|
165
|
-
),
|
|
166
|
-
children: [
|
|
167
|
-
/* @__PURE__ */ jsx("div", { className: "es-uic-size-0.5 es-uic-rounded es-uic-bg-current" }),
|
|
168
|
-
/* @__PURE__ */ jsx("div", { className: "es-uic-size-0.5 es-uic-rounded es-uic-bg-current" }),
|
|
169
|
-
/* @__PURE__ */ jsx("div", { className: "es-uic-size-0.5 es-uic-rounded es-uic-bg-current" })
|
|
170
|
-
]
|
|
171
|
-
}
|
|
172
|
-
)
|
|
173
|
-
] }),
|
|
174
|
-
/* @__PURE__ */ jsxs("div", { className: "es-uic-row-start-2 es-uic-flex es-uic-w-full es-uic-min-w-28 es-uic-flex-col es-uic-items-start es-uic-gap-1", children: [
|
|
175
|
-
/* @__PURE__ */ jsx(
|
|
176
|
-
"span",
|
|
177
|
-
{
|
|
178
|
-
className: clsx(
|
|
179
|
-
"es-uic-rounded es-uic-px-1 es-uic-py-0.5",
|
|
180
|
-
hasActive && active && "es-uic-text-white",
|
|
181
|
-
hasActive && active && activeBgColor,
|
|
182
|
-
hasActive && !active && "es-uic-bg-gray-200 es-uic-text-gray-500",
|
|
183
|
-
!hasActive && "es-uic-bg-gray-600 es-uic-text-white",
|
|
184
|
-
alignEnd && "es-uic-ml-auto"
|
|
185
|
-
),
|
|
186
|
-
children: upperFirst(breakpoint)
|
|
187
|
-
}
|
|
188
|
-
),
|
|
189
|
-
value && /* @__PURE__ */ jsx(
|
|
190
|
-
"span",
|
|
191
|
-
{
|
|
192
|
-
className: clsx(
|
|
193
|
-
"-es-uic-mt-0.5 es-uic-px-1",
|
|
194
|
-
active ? "es-uic-text-gray-400" : "es-uic-text-gray-400",
|
|
195
|
-
alignEnd && "es-uic-ml-auto"
|
|
196
|
-
),
|
|
197
|
-
children: value
|
|
198
|
-
}
|
|
199
|
-
)
|
|
200
|
-
] })
|
|
201
|
-
] }, i);
|
|
202
|
-
}
|
|
203
|
-
),
|
|
204
|
-
dotsEnd && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
205
|
-
/* @__PURE__ */ jsx("div", { className: "es-uic-row-start-1 es-uic-flex es-uic-shrink-0 -es-uic-translate-x-1 es-uic-items-center es-uic-gap-1 es-uic-font-mono es-uic-font-medium es-uic-text-gray-400", children: /* @__PURE__ */ jsxs("div", { className: "es-uic-flex es-uic-gap-0.5 es-uic-text-gray-300", children: [
|
|
120
|
+
] }),
|
|
121
|
+
width && /* @__PURE__ */ jsx("span", { children: width }),
|
|
122
|
+
/* @__PURE__ */ jsx("div", { className: clsx("es-uic-grow es-uic-rounded", active ? "es-uic-h-0.5" : "es-uic-h-px es-uic-bg-gray-300", active && activeBgColor) }),
|
|
123
|
+
widthEnd && /* @__PURE__ */ jsx("span", { children: widthEnd }),
|
|
124
|
+
dotsEnd2 && /* @__PURE__ */ jsxs("div", { className: clsx("es-uic-flex es-uic-gap-0.5", active ? activeTextColor : "es-uic-text-gray-300"), children: [
|
|
206
125
|
/* @__PURE__ */ jsx("div", { className: "es-uic-size-0.5 es-uic-rounded es-uic-bg-current" }),
|
|
207
126
|
/* @__PURE__ */ jsx("div", { className: "es-uic-size-0.5 es-uic-rounded es-uic-bg-current" }),
|
|
208
127
|
/* @__PURE__ */ jsx("div", { className: "es-uic-size-0.5 es-uic-rounded es-uic-bg-current" })
|
|
209
|
-
] })
|
|
210
|
-
|
|
128
|
+
] })
|
|
129
|
+
] }),
|
|
130
|
+
/* @__PURE__ */ jsxs("div", { className: "es-uic-row-start-2 es-uic-flex es-uic-w-full es-uic-min-w-28 es-uic-flex-col es-uic-items-start es-uic-gap-1", children: [
|
|
131
|
+
/* @__PURE__ */ jsx(
|
|
132
|
+
"span",
|
|
133
|
+
{
|
|
134
|
+
className: clsx(
|
|
135
|
+
"es-uic-rounded es-uic-px-1 es-uic-py-0.5",
|
|
136
|
+
hasActive && active && "es-uic-text-white",
|
|
137
|
+
hasActive && active && activeBgColor,
|
|
138
|
+
hasActive && !active && "es-uic-bg-gray-200 es-uic-text-gray-500",
|
|
139
|
+
!hasActive && "es-uic-bg-gray-600 es-uic-text-white",
|
|
140
|
+
alignEnd && "es-uic-ml-auto"
|
|
141
|
+
),
|
|
142
|
+
children: upperFirst(breakpoint)
|
|
143
|
+
}
|
|
144
|
+
),
|
|
145
|
+
value && /* @__PURE__ */ jsx("span", { className: clsx("-es-uic-mt-0.5 es-uic-px-1", active ? "es-uic-text-gray-400" : "es-uic-text-gray-400", alignEnd && "es-uic-ml-auto"), children: value })
|
|
211
146
|
] })
|
|
212
|
-
]
|
|
213
|
-
}
|
|
214
|
-
|
|
147
|
+
] }, i);
|
|
148
|
+
}),
|
|
149
|
+
dotsEnd && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
150
|
+
/* @__PURE__ */ jsx("div", { className: "es-uic-row-start-1 es-uic-flex es-uic-shrink-0 -es-uic-translate-x-1 es-uic-items-center es-uic-gap-1 es-uic-font-mono es-uic-font-medium es-uic-text-gray-400", children: /* @__PURE__ */ jsxs("div", { className: "es-uic-flex es-uic-gap-0.5 es-uic-text-gray-300", children: [
|
|
151
|
+
/* @__PURE__ */ jsx("div", { className: "es-uic-size-0.5 es-uic-rounded es-uic-bg-current" }),
|
|
152
|
+
/* @__PURE__ */ jsx("div", { className: "es-uic-size-0.5 es-uic-rounded es-uic-bg-current" }),
|
|
153
|
+
/* @__PURE__ */ jsx("div", { className: "es-uic-size-0.5 es-uic-rounded es-uic-bg-current" })
|
|
154
|
+
] }) }),
|
|
155
|
+
/* @__PURE__ */ jsx("div", { className: "es-uic-row-start-2 es-uic-size-px" })
|
|
156
|
+
] })
|
|
157
|
+
] });
|
|
215
158
|
};
|
|
216
159
|
export {
|
|
217
160
|
BreakpointPreview
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import "../../Button-
|
|
3
|
-
import { B, a } from "../../button-
|
|
4
|
-
import "../../lite-
|
|
5
|
-
import "../../tooltip-
|
|
6
|
-
import "../../default-i18n-
|
|
7
|
-
import "../../utils-
|
|
2
|
+
import "../../Button-CbFrFO04.js";
|
|
3
|
+
import { B, a } from "../../button-CD8Q1eok.js";
|
|
4
|
+
import "../../lite-DVmmD_-j.js";
|
|
5
|
+
import "../../tooltip-BRQ4tvZL.js";
|
|
6
|
+
import "../../default-i18n-BqwLkgZv.js";
|
|
7
|
+
import "../../utils-Dc35LwuT.js";
|
|
8
8
|
export {
|
|
9
9
|
B as Button,
|
|
10
10
|
a as ButtonGroup
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { $ as $bc237834342dbd75$export$48513f6b9f8ce62d } from "../../Checkbox-
|
|
3
|
-
import { c as clsx } from "../../lite-
|
|
2
|
+
import { $ as $bc237834342dbd75$export$48513f6b9f8ce62d } from "../../Checkbox-Cv3pZDHg.js";
|
|
3
|
+
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
4
4
|
import { AnimatedVisibility } from "../animated-visibility/animated-visibility.js";
|
|
5
5
|
import { icons } from "../../icons/icons.js";
|
|
6
6
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { _ as __ } from "../../default-i18n-
|
|
2
|
+
import { _ as __ } from "../../default-i18n-BqwLkgZv.js";
|
|
3
3
|
import { Menu, MenuSection, MenuItem } from "../menu/menu.js";
|
|
4
4
|
import { ColorSwatch } from "./color-swatch.js";
|
|
5
5
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
6
6
|
import { BaseControl } from "../base-control/base-control.js";
|
|
7
|
-
import { c as clsx } from "../../lite-
|
|
7
|
+
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
8
8
|
import { icons } from "../../icons/icons.js";
|
|
9
9
|
/**
|
|
10
10
|
* Color picker.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { $ as $251c695a52d94a8d$export$cae13e90592f246a } from "../../ColorSwatch-
|
|
3
|
-
import { $ as $799cddbef784668f$export$6e865ea70d7724f } from "../../intlStrings-
|
|
4
|
-
import { c as clsx } from "../../lite-
|
|
5
|
-
import { _ as __ } from "../../default-i18n-
|
|
2
|
+
import { $ as $251c695a52d94a8d$export$cae13e90592f246a } from "../../ColorSwatch-CNQmCQV8.js";
|
|
3
|
+
import { $ as $799cddbef784668f$export$6e865ea70d7724f } from "../../intlStrings-Dxaeitoh.js";
|
|
4
|
+
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
5
|
+
import { _ as __ } from "../../default-i18n-BqwLkgZv.js";
|
|
6
6
|
/**
|
|
7
7
|
* A simple color/gradient swatch.
|
|
8
8
|
*
|
|
@@ -46,11 +46,7 @@ const ColorSwatch = (props) => {
|
|
|
46
46
|
style: {
|
|
47
47
|
background: (color || gradient) && backgroundGradient
|
|
48
48
|
},
|
|
49
|
-
className: () => clsx(
|
|
50
|
-
"es-uic-size-6 es-uic-rounded es-uic-border es-uic-border-gray-300 es-uic-shadow-sm",
|
|
51
|
-
!color && !gradient && "es-uic-bg-white",
|
|
52
|
-
className
|
|
53
|
-
),
|
|
49
|
+
className: () => clsx("es-uic-size-6 es-uic-rounded es-uic-border es-uic-border-gray-300 es-uic-shadow-sm", !color && !gradient && "es-uic-bg-white", className),
|
|
54
50
|
colorName: !color && !gradient ? __("No color", "eightshift-ui-components") : colorName,
|
|
55
51
|
color,
|
|
56
52
|
children: !color && !gradient && /* @__PURE__ */ jsx("div", { className: "es-uic-m-auto es-uic-h-full es-uic-w-px es-uic-rotate-45 es-uic-rounded es-uic-bg-red-500" })
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { _ as __, s as sprintf } from "../../default-i18n-
|
|
2
|
+
import { _ as __, s as sprintf } from "../../default-i18n-BqwLkgZv.js";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
|
-
import { a as ButtonGroup } from "../../button-
|
|
4
|
+
import { a as ButtonGroup } from "../../button-CD8Q1eok.js";
|
|
5
5
|
import { ToggleButton } from "../toggle-button/toggle-button.js";
|
|
6
6
|
import { Repeater } from "../repeater/repeater.js";
|
|
7
7
|
import { RepeaterItem } from "../repeater/repeater-item.js";
|
|
@@ -9,18 +9,17 @@ import { icons } from "../../icons/icons.js";
|
|
|
9
9
|
import { SolidColorPicker } from "./solid-color-picker.js";
|
|
10
10
|
import { Slider } from "../slider/slider.js";
|
|
11
11
|
import { NumberPicker } from "../number-picker/number-picker.js";
|
|
12
|
-
import { $ as $251c695a52d94a8d$export$cae13e90592f246a } from "../../ColorSwatch-
|
|
12
|
+
import { $ as $251c695a52d94a8d$export$cae13e90592f246a } from "../../ColorSwatch-CNQmCQV8.js";
|
|
13
13
|
import { Menu, MenuItem } from "../menu/menu.js";
|
|
14
14
|
import { BaseControl } from "../base-control/base-control.js";
|
|
15
15
|
import { MatrixAlign } from "../matrix-align/matrix-align.js";
|
|
16
16
|
import { Spacer } from "../spacer/spacer.js";
|
|
17
17
|
import { Toggle } from "../toggle/toggle.js";
|
|
18
|
-
import { c as clsx } from "../../lite-
|
|
18
|
+
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
19
19
|
function c(e, o = ",") {
|
|
20
20
|
let t = [], n = 0, i = 0;
|
|
21
21
|
o = new RegExp(o);
|
|
22
|
-
for (let r = 0; r < e.length; r++)
|
|
23
|
-
e[r] === "(" ? i++ : e[r] === ")" && i--, i === 0 && o.test(e[r]) && (t.push(e.slice(n, r).trim()), n = r + 1);
|
|
22
|
+
for (let r = 0; r < e.length; r++) e[r] === "(" ? i++ : e[r] === ")" && i--, i === 0 && o.test(e[r]) && (t.push(e.slice(n, r).trim()), n = r + 1);
|
|
24
23
|
return t.push(e.slice(n).trim()), t;
|
|
25
24
|
}
|
|
26
25
|
function g(e) {
|
|
@@ -36,14 +35,12 @@ function m(e) {
|
|
|
36
35
|
return u.test(e);
|
|
37
36
|
}
|
|
38
37
|
function l(e) {
|
|
39
|
-
if (!e)
|
|
40
|
-
return;
|
|
38
|
+
if (!e) return;
|
|
41
39
|
let [, o, t] = e.trim().match(u) || [];
|
|
42
40
|
return { value: o, unit: t };
|
|
43
41
|
}
|
|
44
42
|
function P(e) {
|
|
45
|
-
if (!/^(repeating-)?linear-gradient/.test(e))
|
|
46
|
-
throw new SyntaxError(`could not find syntax for this item: ${e}`);
|
|
43
|
+
if (!/^(repeating-)?linear-gradient/.test(e)) throw new SyntaxError(`could not find syntax for this item: ${e}`);
|
|
47
44
|
let [, o, t] = e.match(/(repeating-)?linear-gradient\((.+)\)/), n = { orientation: { type: "directional", value: "bottom" }, repeating: !!o, stops: [] }, i = c(t), r = x(i[0]);
|
|
48
45
|
return r && (n.orientation = r, i.shift()), { ...n, stops: g(i) };
|
|
49
46
|
}
|
|
@@ -59,16 +56,13 @@ function h(e) {
|
|
|
59
56
|
}
|
|
60
57
|
function R(e) {
|
|
61
58
|
let o = Array(2).fill("");
|
|
62
|
-
for (let t = 0; t < 2; t++)
|
|
63
|
-
e[t] ? o[t] = e[t] : o[t] = "center";
|
|
59
|
+
for (let t = 0; t < 2; t++) e[t] ? o[t] = e[t] : o[t] = "center";
|
|
64
60
|
return o;
|
|
65
61
|
}
|
|
66
62
|
function K(e) {
|
|
67
|
-
if (!/(repeating-)?radial-gradient/.test(e))
|
|
68
|
-
throw new SyntaxError(`could not find syntax for this item: ${e}`);
|
|
63
|
+
if (!/(repeating-)?radial-gradient/.test(e)) throw new SyntaxError(`could not find syntax for this item: ${e}`);
|
|
69
64
|
let [, o, t] = e.match(/(repeating-)?radial-gradient\((.+)\)/), n = { shape: "ellipse", repeating: !!o, size: [{ type: "keyword", value: "farthest-corner" }], position: { x: { type: "keyword", value: "center" }, y: { type: "keyword", value: "center" } }, stops: [] }, i = c(t);
|
|
70
|
-
if (S(i[0]))
|
|
71
|
-
return { ...n, stops: g(i) };
|
|
65
|
+
if (S(i[0])) return { ...n, stops: g(i) };
|
|
72
66
|
let r = i[0].split("at").map((f) => f.trim()), p = ((r[0] || "").match(/(circle|ellipse)/) || [])[1], a = (r[0] || "").match(/(-?\d+\.?\d*(vw|vh|px|em|rem|%|rad|grad|turn|deg)?|closest-corner|closest-side|farthest-corner|farthest-side)/g) || [], s = R((r[1] || "").split(" "));
|
|
73
67
|
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) };
|
|
74
68
|
}
|
|
@@ -77,11 +71,9 @@ function S(e) {
|
|
|
77
71
|
}
|
|
78
72
|
var C = /* @__PURE__ */ new Set(["from", "in", "at"]);
|
|
79
73
|
function j(e) {
|
|
80
|
-
if (!/(repeating-)?conic-gradient/.test(e))
|
|
81
|
-
throw new SyntaxError(`could not find syntax for this item: ${e}`);
|
|
74
|
+
if (!/(repeating-)?conic-gradient/.test(e)) throw new SyntaxError(`could not find syntax for this item: ${e}`);
|
|
82
75
|
let [, o, t] = e.match(/(repeating-)?conic-gradient\((.+)\)/), n = { angle: "0deg", repeating: !!o, position: "center", stops: [] }, i = c(t).map((s) => s.trim()), r = c(i[0], /\s+/), p = "", a = 0;
|
|
83
|
-
for (let s = 0, f = r.length; s < f; s++)
|
|
84
|
-
C.has(r[s]) && (s > 0 && Object.assign(n, y(p, r, a, s)), p = r[s], a = s + 1);
|
|
76
|
+
for (let s = 0, f = r.length; s < f; s++) C.has(r[s]) && (s > 0 && Object.assign(n, y(p, r, a, s)), p = r[s], a = s + 1);
|
|
85
77
|
return p && (Object.assign(n, y(p, r, a, r.length)), i.shift()), { ...n, stops: g(i) };
|
|
86
78
|
}
|
|
87
79
|
function y(e, o, t, n) {
|
|
@@ -236,10 +228,7 @@ const GradientEditor = (props) => {
|
|
|
236
228
|
const setGradientData = (data) => {
|
|
237
229
|
onChange(getGradientResult(data, gradientType));
|
|
238
230
|
};
|
|
239
|
-
const outputGradient = useMemo(
|
|
240
|
-
() => getGradientResult(gradientData, gradientType),
|
|
241
|
-
[gradientData, gradientType]
|
|
242
|
-
);
|
|
231
|
+
const outputGradient = useMemo(() => getGradientResult(gradientData, gradientType), [gradientData, gradientType]);
|
|
243
232
|
if (hidden) {
|
|
244
233
|
return null;
|
|
245
234
|
}
|
|
@@ -299,7 +288,7 @@ const GradientEditor = (props) => {
|
|
|
299
288
|
return /* @__PURE__ */ jsx(
|
|
300
289
|
MenuItem,
|
|
301
290
|
{
|
|
302
|
-
icon: /* @__PURE__ */ jsx("div", { className: clsx("es-uic-size-5 es-uic-from-gray-700 es-uic-to-gray-200
|
|
291
|
+
icon: /* @__PURE__ */ jsx("div", { className: clsx("es-uic-size-5 es-uic-rounded-sm es-uic-from-gray-700 es-uic-to-gray-200", iconClass) }),
|
|
303
292
|
onClick: () => {
|
|
304
293
|
setGradientData({
|
|
305
294
|
...gradientData,
|
|
@@ -503,10 +492,7 @@ const GradientEditor = (props) => {
|
|
|
503
492
|
},
|
|
504
493
|
thumbContent: (index) => /* @__PURE__ */ jsx("div", { className: "es-uic-pointer-events-none es-uic-absolute es-uic-inset-0 es-uic-flex es-uic-size-3 es-uic-items-center es-uic-justify-center es-uic-text-center es-uic-text-xs es-uic-font-semibold es-uic-text-white", children: index + 1 }),
|
|
505
494
|
trackStyle: {
|
|
506
|
-
backgroundImage: getGradientResult(
|
|
507
|
-
{ orientation: { type: "directional", value: "right" }, stops: gradientData.stops },
|
|
508
|
-
"linear"
|
|
509
|
-
),
|
|
495
|
+
backgroundImage: getGradientResult({ orientation: { type: "directional", value: "right" }, stops: gradientData.stops }, "linear"),
|
|
510
496
|
height: "1.125rem",
|
|
511
497
|
borderRadius: "0.5rem"
|
|
512
498
|
},
|