@eightshift/ui-components 6.0.3 → 6.0.5
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/assets/style-admin.css +116 -37
- package/dist/assets/style-editor.css +80 -37
- package/dist/assets/style.css +80 -37
- package/dist/{color-swatch-CFIuSPcO.js → color-swatch-BEBLRxTy.js} +1 -1
- package/dist/components/animated-visibility/animated-visibility.js +1 -1
- package/dist/components/base-control/base-control.js +1 -1
- package/dist/components/base-control/container.js +1 -1
- package/dist/components/breakpoint-preview/breakpoint-preview.js +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/color-pickers/color-picker.js +2 -2
- package/dist/components/color-pickers/color-swatch.js +2 -2
- package/dist/components/color-pickers/gradient-editor.js +4 -4
- package/dist/components/color-pickers/solid-color-picker.js +4 -3
- package/dist/components/component-toggle/component-toggle.js +1 -1
- package/dist/components/container-panel/container-panel.js +1 -1
- package/dist/components/draggable/draggable-handle.js +2 -2
- package/dist/components/draggable/draggable.js +2 -2
- package/dist/components/draggable-list/draggable-list-item.js +2 -2
- package/dist/components/expandable/expandable.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/input-field/input-field.js +3 -3
- package/dist/components/layout/hstack.js +1 -1
- package/dist/components/layout/vstack.js +1 -1
- package/dist/components/link-input/link-input.js +13 -8
- package/dist/components/matrix-align/matrix-align.js +1 -1
- package/dist/components/menu/menu.js +1 -1
- package/dist/components/modal/modal.js +1 -1
- package/dist/components/notice/notice.js +1 -1
- package/dist/components/number-picker/number-picker.js +2 -2
- package/dist/components/options-panel/options-panel.js +1 -1
- package/dist/components/placeholders/file-picker-shell.js +12 -9
- package/dist/components/placeholders/file-placeholder.js +1 -2
- package/dist/components/popover/popover.js +1 -1
- package/dist/components/radio/radio.js +5 -5
- package/dist/components/repeater/repeater-item.js +1 -1
- package/dist/components/repeater/repeater.js +2 -2
- package/dist/components/responsive/mini-responsive.js +1 -1
- package/dist/components/responsive/responsive-legacy.js +1 -1
- package/dist/components/responsive/responsive.js +1 -1
- package/dist/components/rich-label/rich-label.js +1 -1
- package/dist/components/select/async-multi-select.js +22 -14
- package/dist/components/select/async-select.js +22 -14
- package/dist/components/select/multi-select.js +23 -15
- package/dist/components/select/shared.js +2 -2
- package/dist/components/select/single-select.js +23 -15
- package/dist/components/slider/column-config-slider.js +8 -5
- package/dist/components/smart-image/smart-image.js +30 -4
- package/dist/components/spacer/spacer.js +1 -1
- package/dist/components/tabs/tabs.js +2 -2
- package/dist/components/toggle/switch.js +1 -1
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +0 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/{general-lYMgCPqJ.js → general-ChNQK6O9.js} +4 -4
- package/dist/icons/spinner.js +1 -1
- package/dist/index.js +1 -1
- package/dist/utilities/general.js +5 -5
- package/dist/utilities/hash.js +9 -0
- package/dist/utilities/index.js +14 -8
- package/dist/workers/image-analysis.worker.js +1 -1
- package/package.json +7 -7
- package/dist/lite-DVmmD_-j.js +0 -7
- package/dist/{shared-DwjRce5e.js → shared-DOxXagm0.js} +1 -1
|
@@ -7,13 +7,14 @@ import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-CNNk
|
|
|
7
7
|
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-D8a3eYb-.js";
|
|
8
8
|
import { $ as $eed445e0843c11d0$export$41f133550aa26f48 } from "../../ListBox-Dd37zMvs.js";
|
|
9
9
|
import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../Dialog-D8bjn-nh.js";
|
|
10
|
-
import { $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, S as SelectClearButton, O as OptionItemBase } from "../../shared-
|
|
10
|
+
import { $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, S as SelectClearButton, O as OptionItemBase } from "../../shared-DOxXagm0.js";
|
|
11
11
|
import { useRef, cloneElement } from "react";
|
|
12
12
|
import { icons } from "../../icons/icons.js";
|
|
13
13
|
import "../../react-jsx-parser.min-B_hvYYa1.js";
|
|
14
|
-
import { c as clsx } from "../../
|
|
14
|
+
import { c as clsx } from "../../clsx-DgYk2OaC.js";
|
|
15
15
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
16
16
|
import { c as cva } from "../../index-BHpUy2Ix.js";
|
|
17
|
+
import { randomId } from "../../utilities/hash.js";
|
|
17
18
|
import { $ as $bb77f239b46e8c72$export$3274cf84b703fff } from "../../useFilter-bhxeEDg8.js";
|
|
18
19
|
/**
|
|
19
20
|
* Select menu.
|
|
@@ -97,6 +98,19 @@ const Select = (props) => {
|
|
|
97
98
|
if (hidden) {
|
|
98
99
|
return null;
|
|
99
100
|
}
|
|
101
|
+
const buttonClass = cva("es:any-focus:outline-hidden es:text-start es:size-full es:inline-block es:group es:overflow-x-clip", {
|
|
102
|
+
variants: {
|
|
103
|
+
size: {
|
|
104
|
+
small: ["es:min-h-8", "es:px-2.5"],
|
|
105
|
+
medium: ["es:min-h-9", "es:px-3"],
|
|
106
|
+
default: ["es:min-h-10", "es:px-3"],
|
|
107
|
+
large: ["es:min-h-12", "es:px-4"]
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
defaultVariants: {
|
|
111
|
+
size: "default"
|
|
112
|
+
}
|
|
113
|
+
});
|
|
100
114
|
const selectClass = cva(
|
|
101
115
|
[
|
|
102
116
|
"es:relative",
|
|
@@ -116,12 +130,6 @@ const Select = (props) => {
|
|
|
116
130
|
],
|
|
117
131
|
{
|
|
118
132
|
variants: {
|
|
119
|
-
size: {
|
|
120
|
-
small: ["es:min-h-8", "es:px-2.5"],
|
|
121
|
-
medium: ["es:min-h-9", "es:px-3"],
|
|
122
|
-
default: ["es:min-h-10", "es:px-3"],
|
|
123
|
-
large: ["es:min-h-12", "es:px-4"]
|
|
124
|
-
},
|
|
125
133
|
disabled: {
|
|
126
134
|
false: "es:selection:bg-surface-100 es:selection:text-accent-800",
|
|
127
135
|
true: "es:selection:bg-secondary-200 es:selection:text-secondary-600"
|
|
@@ -209,8 +217,8 @@ const Select = (props) => {
|
|
|
209
217
|
className: selectClass({ disabled, flat, size }),
|
|
210
218
|
ref,
|
|
211
219
|
children: [
|
|
212
|
-
/* @__PURE__ */ jsxs($d2b4bc8c273e7be6$export$353f5b6fc5456de1, { className:
|
|
213
|
-
/* @__PURE__ */ jsx($82d7e5349645de74$export$e288731fd71264f0, { children: ({ isPlaceholder, selectedItems }) => {
|
|
220
|
+
/* @__PURE__ */ jsxs($d2b4bc8c273e7be6$export$353f5b6fc5456de1, { className: buttonClass({ size }), children: [
|
|
221
|
+
/* @__PURE__ */ jsx($82d7e5349645de74$export$e288731fd71264f0, { className: "es:pointer-events-none", children: ({ isPlaceholder, selectedItems }) => {
|
|
214
222
|
const [selectedItem] = selectedItems;
|
|
215
223
|
if (!isPlaceholder && currentValue && customValueDisplay) {
|
|
216
224
|
return customValueDisplay(selectedItem);
|
|
@@ -301,9 +309,9 @@ const Select = (props) => {
|
|
|
301
309
|
{
|
|
302
310
|
placeholder: __("Search...", "eightshift-ui-components"),
|
|
303
311
|
className: clsx(
|
|
304
|
-
"es:peer es:size-full es:h-9.5 es:outline-hidden es:pl-3.5 es:pr-9 es:shadow-none es:text-13 es:placeholder:text-surface-500 es:[&::-webkit-search-cancel-button]:hidden",
|
|
305
|
-
"es:bg-accent-900/8 es:m-1.5 es:rounded-3xl es:border-none",
|
|
306
|
-
"es:inset-ring es:inset-ring-accent-950/7 es:focus:inset-ring-accent-950/20",
|
|
312
|
+
"es:peer es:size-full es:h-9.5 es:outline-hidden! es:pl-3.5 es:pr-9 es:shadow-none! es:text-13! es:placeholder:text-surface-500 es:[&::-webkit-search-cancel-button]:hidden",
|
|
313
|
+
"es:bg-accent-900/8 es:m-1.5 es:rounded-3xl es:border-none!",
|
|
314
|
+
"es:inset-ring! es:inset-ring-accent-950/7 es:focus:inset-ring-accent-950/20",
|
|
307
315
|
"es:text-accent-950 es:placeholder:text-accent-700/50",
|
|
308
316
|
"es:transition"
|
|
309
317
|
)
|
|
@@ -315,7 +323,7 @@ const Select = (props) => {
|
|
|
315
323
|
"aria-label": __("Clear", "eightshift-ui-components"),
|
|
316
324
|
className: clsx(
|
|
317
325
|
"es:absolute es:right-3 es:top-0 es:bottom-0 es:my-auto es:border-none es:bg-transparent",
|
|
318
|
-
"es:flex es:size-7 es:items-center es:justify-center es:rounded-3xl es:text-sm es:text-surface-700 es:transition es:hover:bg-accent-50 es:hover:text-accent-800 es:any-focus:outline-hidden es:focus:ring-2 es:focus:ring-accent-500/50 es:disabled:text-secondary-300
|
|
326
|
+
"es:flex es:size-7 es:items-center es:justify-center es:rounded-3xl es:text-sm es:text-surface-700 es:transition es:hover:bg-accent-50 es:hover:text-accent-800 es:any-focus:outline-hidden es:focus:ring-2 es:focus:ring-accent-500/50 es:disabled:text-secondary-300",
|
|
319
327
|
"es:peer-placeholder-shown:opacity-0"
|
|
320
328
|
),
|
|
321
329
|
children: icons.clearAlt
|
|
@@ -348,7 +356,7 @@ const Select = (props) => {
|
|
|
348
356
|
return /* @__PURE__ */ jsxs(
|
|
349
357
|
OptionItemBase,
|
|
350
358
|
{
|
|
351
|
-
id: item
|
|
359
|
+
id: item?.value ?? randomId(8),
|
|
352
360
|
className: item?.className,
|
|
353
361
|
selectIndicator: true,
|
|
354
362
|
children: [
|
|
@@ -141,8 +141,8 @@ const ColumnConfigSlider = (props) => {
|
|
|
141
141
|
"es:transition es:duration-300",
|
|
142
142
|
!flat && !disabled && "es:shadow-xs es:shadow-black/5",
|
|
143
143
|
"es:mx-1.25",
|
|
144
|
-
value[0] === 1 && "es:ml-
|
|
145
|
-
value[1] === columns && "es:mr-
|
|
144
|
+
value[0] === 1 && "es:ml-1.75",
|
|
145
|
+
value[1] === columns && "es:mr-1.75",
|
|
146
146
|
!disabled && [
|
|
147
147
|
"es:bg-accent-500 es:bg-linear-to-b es:from-accent-100/15 es:to-accent-100/0 es:from-25%",
|
|
148
148
|
"es:inset-ring es:inset-ring-accent-700/10",
|
|
@@ -165,8 +165,8 @@ const ColumnConfigSlider = (props) => {
|
|
|
165
165
|
"es:transition es:duration-300 es:ease-spring-smooth",
|
|
166
166
|
marker >= value[0] - 1 && marker < value[1] ? "es:text-accent-900" : "es:text-surface-400",
|
|
167
167
|
disabled && "es:opacity-0",
|
|
168
|
-
!disableOffset && index === 0 && value[0] === 2 && "es:-translate-x-
|
|
169
|
-
!disableWidth && index === columns - 1 && value[1] === columns - 1 && "es:translate-x-
|
|
168
|
+
!disableOffset && index === 0 && value[0] === 2 && "es:-translate-x-px",
|
|
169
|
+
!disableWidth && index === columns - 1 && value[1] === columns - 1 && "es:translate-x-px",
|
|
170
170
|
!disableOffset && index === 0 && value[0] === 1 && "es:opacity-0 es:scale-50",
|
|
171
171
|
!disableWidth && index === columns - 1 && value[1] === columns && "es:opacity-0 es:scale-50"
|
|
172
172
|
),
|
|
@@ -221,7 +221,10 @@ const ColumnConfigSlider = (props) => {
|
|
|
221
221
|
!disabled && "es:hover:not-dragging:cursor-grab",
|
|
222
222
|
i === 0 && disableOffset && "es:hidden",
|
|
223
223
|
i === 1 && disableWidth && "es:hidden",
|
|
224
|
-
"es:justify-self-
|
|
224
|
+
i === 0 && state.values[0] === 1 && "es:justify-self-start",
|
|
225
|
+
i === 0 && state.values[0] > 1 && "es:justify-self-center",
|
|
226
|
+
i === 1 && state.values[1] < columns && "es:justify-self-center",
|
|
227
|
+
i === 1 && state.values[1] === columns && "es:justify-self-end",
|
|
225
228
|
!flat && !disabled && "es:shadow-xs es:shadow-black/5"
|
|
226
229
|
),
|
|
227
230
|
style: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { _ as __ } from "../../default-i18n-CnQeC5Pl.js";
|
|
3
|
-
import { c as clsx } from "../../
|
|
3
|
+
import { c as clsx } from "../../clsx-DgYk2OaC.js";
|
|
4
4
|
import { useState, useRef, useEffect, cloneElement } from "react";
|
|
5
5
|
import { icons } from "../../icons/icons.js";
|
|
6
6
|
import "../../react-jsx-parser.min-B_hvYYa1.js";
|
|
@@ -8,7 +8,7 @@ import { DecorativeTooltip } from "../tooltip/tooltip.js";
|
|
|
8
8
|
import { useImageAnalysisWorker } from "../../utilities/web-workers.js";
|
|
9
9
|
import workerInline from "./worker-inline.js";
|
|
10
10
|
import { cyrb64Hash } from "../../utilities/hash.js";
|
|
11
|
-
import {
|
|
11
|
+
import { b as analyzeImage } from "../../general-ChNQK6O9.js";
|
|
12
12
|
/**
|
|
13
13
|
* @typedef {Object} CustomImageProps
|
|
14
14
|
* @property {JSX.Element} [props.renderError] - Component to render if image analysis fails. `(error) => JSX:Element`.
|
|
@@ -167,7 +167,33 @@ const SmartImage = (props) => {
|
|
|
167
167
|
if (error && renderError) {
|
|
168
168
|
return renderError(error);
|
|
169
169
|
} else if (error) {
|
|
170
|
-
return /* @__PURE__ */
|
|
170
|
+
return /* @__PURE__ */ jsxs(
|
|
171
|
+
"div",
|
|
172
|
+
{
|
|
173
|
+
className: clsx(
|
|
174
|
+
typeof children !== "function" && "es:flex es:flex-col es:gap-2 es:items-center-safe es:justify-center-safe es:p-2",
|
|
175
|
+
"es:motion-preset-fade",
|
|
176
|
+
errorClassName
|
|
177
|
+
),
|
|
178
|
+
children: [
|
|
179
|
+
typeof children !== "function" && /* @__PURE__ */ jsx(DecorativeTooltip, { text: __("Error loading image", "eightshift-ui-components"), children: cloneElement(icons.imageError, { className: "es:text-secondary-500 es:size-8" }) }),
|
|
180
|
+
typeof children === "function" ? children({
|
|
181
|
+
image: cloneElement(imageElement, { crossOrigin: null }),
|
|
182
|
+
hasAnalysed: true,
|
|
183
|
+
isTransparent: false,
|
|
184
|
+
hasError: true,
|
|
185
|
+
errorBadge: /* @__PURE__ */ jsx(
|
|
186
|
+
DecorativeTooltip,
|
|
187
|
+
{
|
|
188
|
+
wrapperClassName: "es:size-8 es:-translate-y-4 es:m-auto",
|
|
189
|
+
text: __("Error loading image", "eightshift-ui-components"),
|
|
190
|
+
children: cloneElement(icons.imageError, { className: "es:text-secondary-500 es:size-8" })
|
|
191
|
+
}
|
|
192
|
+
)
|
|
193
|
+
}) : cloneElement(imageElement, { crossOrigin: null })
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
);
|
|
171
197
|
}
|
|
172
198
|
if (!children) {
|
|
173
199
|
return imageElement;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { c as clsx } from "../../
|
|
2
|
+
import { c as clsx } from "../../clsx-DgYk2OaC.js";
|
|
3
3
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
4
4
|
/**
|
|
5
5
|
* A simple spacer/divider component, with optional text or icon.
|
|
@@ -16,7 +16,7 @@ import { a as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRi
|
|
|
16
16
|
import { $ as $a0d645289fe9b86b$export$e7f05e985daf4b5f } from "../../useSingleSelectListState-BBTu4shO.js";
|
|
17
17
|
import { s as sprintf } from "../../sprintf-DmNrJSYG.js";
|
|
18
18
|
import { _ as __ } from "../../default-i18n-CnQeC5Pl.js";
|
|
19
|
-
import { c as clsx } from "../../
|
|
19
|
+
import { c as clsx } from "../../clsx-DgYk2OaC.js";
|
|
20
20
|
import { c as cva } from "../../index-BHpUy2Ix.js";
|
|
21
21
|
import { Notice } from "../notice/notice.js";
|
|
22
22
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
@@ -691,7 +691,7 @@ const Tab = (props) => {
|
|
|
691
691
|
[
|
|
692
692
|
"es:group es:relative es:shrink-0",
|
|
693
693
|
"es:flex es:items-center es:gap-1.5",
|
|
694
|
-
"es:select-none
|
|
694
|
+
"es:select-none",
|
|
695
695
|
"es:transition-plus es:text-center es:text-12 es:leading-[1.15] es:text-box-trim",
|
|
696
696
|
"es:any-focus:outline-hidden",
|
|
697
697
|
"es:contrast-more:inset-ring es:contrast-more:inset-ring-accent-500/0 es:contrast-more:focus-visible:inset-ring-accent-500",
|
|
@@ -125,7 +125,7 @@ const Switch2 = (props) => {
|
|
|
125
125
|
default: "es:h-6 es:w-10 es:p-1"
|
|
126
126
|
},
|
|
127
127
|
disabled: {
|
|
128
|
-
false: [!flat && "es:shadow-xs es:shadow-black/5"
|
|
128
|
+
false: [!flat && "es:shadow-xs es:shadow-black/5"]
|
|
129
129
|
}
|
|
130
130
|
},
|
|
131
131
|
compoundVariants: [
|
|
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-D8a3eYb-.js";
|
|
3
3
|
import { Switch } from "./switch.js";
|
|
4
4
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
5
|
-
import { c as clsx } from "../../
|
|
5
|
+
import { c as clsx } from "../../clsx-DgYk2OaC.js";
|
|
6
6
|
/**
|
|
7
7
|
* A toggle switch with a label and optional icon and subtitle.
|
|
8
8
|
*
|
|
@@ -6,7 +6,7 @@ import { w as $6179b936705e76d3$export$ae780daf29e6d456, $ as $f645667febf57a63$
|
|
|
6
6
|
import $dbSRa$react__default, { useContext, useState, useMemo, useRef, useEffect, forwardRef, createContext } from "react";
|
|
7
7
|
import { a as $96b38030c423d352$export$9fc1347d4195ccb3 } from "../../PortalProvider-CHPnqDSH.js";
|
|
8
8
|
import { $ as $dbSRa$reactdom } from "../../index-oFgxU4zs.js";
|
|
9
|
-
import { c as clsx } from "../../
|
|
9
|
+
import { c as clsx } from "../../clsx-DgYk2OaC.js";
|
|
10
10
|
const $f57aed4a881a3485$var$Context = /* @__PURE__ */ $dbSRa$react__default.createContext(null);
|
|
11
11
|
function $f57aed4a881a3485$export$178405afcd8c5eb(props) {
|
|
12
12
|
let { children } = props;
|
|
@@ -4367,10 +4367,10 @@ const analyzeImageData = ({ buffer, imageData, width, height, settings, skipTran
|
|
|
4367
4367
|
};
|
|
4368
4368
|
export {
|
|
4369
4369
|
FLOAT_RGBA as F,
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4370
|
+
analyzeImageData as a,
|
|
4371
|
+
analyzeImage as b,
|
|
4372
|
+
analyzeImageAsync as c,
|
|
4373
|
+
checkTransparency as d,
|
|
4374
4374
|
floatBufferFromCanvas as f,
|
|
4375
4375
|
getFileExtension as g,
|
|
4376
4376
|
isColorDark as i,
|
package/dist/icons/spinner.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { Button, ButtonGroup } from "./components/button/button.js";
|
|
|
5
5
|
import { Checkbox } from "./components/checkbox/checkbox.js";
|
|
6
6
|
import { ComponentToggle } from "./components/component-toggle/component-toggle.js";
|
|
7
7
|
import { ContainerPanel } from "./components/container-panel/container-panel.js";
|
|
8
|
-
import { C } from "./color-swatch-
|
|
8
|
+
import { C } from "./color-swatch-BEBLRxTy.js";
|
|
9
9
|
import { ColorPicker } from "./components/color-pickers/color-picker.js";
|
|
10
10
|
import { ColumnConfigSlider, ColumnConfigSliderOutput } from "./components/slider/column-config-slider.js";
|
|
11
11
|
import { Container, ContainerGroup } from "./components/base-control/container.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "./hash.js";
|
|
2
|
-
import {
|
|
2
|
+
import { b, c, a, d, g, i } from "../general-ChNQK6O9.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
b as analyzeImage,
|
|
5
|
+
c as analyzeImageAsync,
|
|
6
|
+
a as analyzeImageData,
|
|
7
|
+
d as checkTransparency,
|
|
8
8
|
g as getFileExtension,
|
|
9
9
|
i as isColorDark
|
|
10
10
|
};
|
package/dist/utilities/hash.js
CHANGED
|
@@ -24,7 +24,16 @@ const cyrb64Hash = (str, seed = 0) => {
|
|
|
24
24
|
const [h2, h1] = cyrb64(str, seed);
|
|
25
25
|
return h2.toString(36).padStart(7, "0") + h1.toString(36).padStart(7, "0");
|
|
26
26
|
};
|
|
27
|
+
const randomId = (length) => {
|
|
28
|
+
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
29
|
+
let result = "";
|
|
30
|
+
for (let i = 0; i < length; i++) {
|
|
31
|
+
result += chars.charAt(Math.floor(Math.random() * chars.length));
|
|
32
|
+
}
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
27
35
|
export {
|
|
28
36
|
cyrb64Hash,
|
|
37
|
+
randomId,
|
|
29
38
|
simpleHash
|
|
30
39
|
};
|
package/dist/utilities/index.js
CHANGED
|
@@ -2,17 +2,22 @@ import { arrayMoveMultiple, fixIds } from "./array-helpers.js";
|
|
|
2
2
|
import { camelCase, has, isEmpty, isEqual, isObject, isPlainObject, isString, kebabCase, lowerFirst, pascalCase, snakeCase, upperFirst } from "./es-dash.js";
|
|
3
3
|
import { truncate, truncateEnd, truncateMiddle, unescapeHTML } from "./text-helpers.js";
|
|
4
4
|
import { debounce, throttle } from "./debounce-throttle.js";
|
|
5
|
-
import {
|
|
6
|
-
import { c as c2 } from "../
|
|
7
|
-
import { cyrb64Hash, simpleHash } from "./hash.js";
|
|
5
|
+
import { b, c, a, d, g, i } from "../general-ChNQK6O9.js";
|
|
6
|
+
import { c as c2 } from "../clsx-DgYk2OaC.js";
|
|
7
|
+
import { cyrb64Hash, randomId, simpleHash } from "./hash.js";
|
|
8
|
+
function clsx() {
|
|
9
|
+
for (var t, r = 0, e = "", n = arguments.length; r < n; r++) (t = arguments[r]) && "string" == typeof t && (e += (e && " ") + t);
|
|
10
|
+
return e;
|
|
11
|
+
}
|
|
8
12
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
13
|
+
b as analyzeImage,
|
|
14
|
+
c as analyzeImageAsync,
|
|
15
|
+
a as analyzeImageData,
|
|
12
16
|
arrayMoveMultiple,
|
|
13
17
|
camelCase,
|
|
14
|
-
|
|
15
|
-
|
|
18
|
+
d as checkTransparency,
|
|
19
|
+
clsx,
|
|
20
|
+
c2 as clsxFull,
|
|
16
21
|
cyrb64Hash,
|
|
17
22
|
debounce,
|
|
18
23
|
fixIds,
|
|
@@ -27,6 +32,7 @@ export {
|
|
|
27
32
|
kebabCase,
|
|
28
33
|
lowerFirst,
|
|
29
34
|
pascalCase,
|
|
35
|
+
randomId,
|
|
30
36
|
simpleHash,
|
|
31
37
|
snakeCase,
|
|
32
38
|
throttle,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as floatBufferFromCanvas,
|
|
1
|
+
import { f as floatBufferFromCanvas, a as analyzeImageData, F as FLOAT_RGBA } from "../general-ChNQK6O9.js";
|
|
2
2
|
self.onmessage = async (event) => {
|
|
3
3
|
const { imageBitmap, settings } = event.data;
|
|
4
4
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eightshift/ui-components",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -62,14 +62,14 @@
|
|
|
62
62
|
"@react-stately/collections": "^3.12.8",
|
|
63
63
|
"@stylistic/eslint-plugin-js": "^4.4.1",
|
|
64
64
|
"@tailwindcss/vite": "^4.1.17",
|
|
65
|
-
"@thi.ng/color": "^5.8.
|
|
66
|
-
"@thi.ng/pixel": "^7.5.
|
|
67
|
-
"@thi.ng/pixel-analysis": "^2.0.
|
|
68
|
-
"@thi.ng/pixel-dominant-colors": "^2.0.
|
|
65
|
+
"@thi.ng/color": "^5.8.4",
|
|
66
|
+
"@thi.ng/pixel": "^7.5.18",
|
|
67
|
+
"@thi.ng/pixel-analysis": "^2.0.19",
|
|
68
|
+
"@thi.ng/pixel-dominant-colors": "^2.0.23",
|
|
69
69
|
"@types/react": "^18.3.27",
|
|
70
70
|
"@types/react-dom": "^18.3.7",
|
|
71
71
|
"@vitejs/plugin-react-swc": "^4.2.2",
|
|
72
|
-
"@wordpress/i18n": "^6.
|
|
72
|
+
"@wordpress/i18n": "^6.9.0",
|
|
73
73
|
"autoprefixer": "^10.4.22",
|
|
74
74
|
"class-variance-authority": "^0.7.1",
|
|
75
75
|
"clsx": "^2.1.1",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"just-throttle": "^4.2.0",
|
|
89
89
|
"lightningcss": "^1.30.2",
|
|
90
90
|
"postcss": "^8.5.6",
|
|
91
|
-
"prettier": "^3.
|
|
91
|
+
"prettier": "^3.7.0",
|
|
92
92
|
"prettier-plugin-tailwindcss": "^0.7.1",
|
|
93
93
|
"react": "^18.3.1",
|
|
94
94
|
"react-aria": "^3.44.0",
|
package/dist/lite-DVmmD_-j.js
DELETED
|
@@ -23,8 +23,8 @@ import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-W
|
|
|
23
23
|
import { a as $5c3e21d68f1c4674$export$a966af930f325cab } from "./VisuallyHidden-DTUuKFiI.js";
|
|
24
24
|
import { icons } from "./icons/icons.js";
|
|
25
25
|
import "./react-jsx-parser.min-B_hvYYa1.js";
|
|
26
|
-
import { AnimatedVisibility } from "./components/animated-visibility/animated-visibility.js";
|
|
27
26
|
import { c as clsx } from "./clsx-DgYk2OaC.js";
|
|
27
|
+
import { AnimatedVisibility } from "./components/animated-visibility/animated-visibility.js";
|
|
28
28
|
function $33bf17300c498528$export$a2f47a3d2973640(options = {}) {
|
|
29
29
|
let { locale } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
|
|
30
30
|
return useMemo(() => new Intl.ListFormat(locale, options), [
|