@eightshift/ui-components 6.0.12 → 6.1.0
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-JRIu2BnS.js → Button-BTCA69Lt.js} +9 -9
- package/dist/{Dialog-Dd1yqNus.js → Dialog-BbNWvB5_.js} +76 -57
- package/dist/{FieldError-DmVwL6Dj.js → FieldError-BPG0hKfB.js} +2 -2
- package/dist/{FocusScope-Dri1oBcH.js → FocusScope-BxT4xfe9.js} +6 -7
- package/dist/{Heading-eA6LXIKB.js → Heading-CY-_gt-U.js} +2 -2
- package/dist/{Input-Cuw9UbNb.js → Input-Wrnm2nxy.js} +8 -8
- package/dist/{Label-DPWyf-gp.js → Label-BDlf9vIY.js} +3 -2
- package/dist/{ListBox-DT1sFY3e.js → ListBox-yHUyUAAH.js} +28 -26
- package/dist/{OverlayArrow-DVJTTfZM.js → OverlayArrow-NzRV9wsn.js} +7 -7
- package/dist/{RadioGroup-Cp5cdBI_.js → RadioGroup-BFDueqHz.js} +14 -14
- package/dist/{SearchField-CLhr5PGZ.js → SearchField-CmRhtrQf.js} +12 -12
- package/dist/{SelectionManager-DbBiF5M8.js → SelectionManager-VgpR-1Ri.js} +33 -29
- package/dist/{Slider-CZV3HhHY.js → Slider-Bl5G0ZHE.js} +16 -15
- package/dist/{Text-Dae33gHp.js → Text-CjFEHSfr.js} +3 -2
- package/dist/{VisuallyHidden-eaCBtXhE.js → VisuallyHidden-DXVaR_RC.js} +2 -2
- package/dist/{animation-DY7CNkr6.js → animation-B2sADg3I.js} +1 -1
- package/dist/assets/style-admin.css +1438 -1448
- package/dist/assets/style-editor.css +1438 -1448
- package/dist/assets/style.css +1438 -1448
- package/dist/assets/wp-overrides/fix-label-text-case.css +7 -7
- package/dist/assets/wp-overrides/make-block-messages-nicer.css +36 -36
- package/dist/assets/wp-overrides/restyle-tooltips.css +56 -56
- package/dist/assets/wp-overrides/round-corners.css +43 -43
- package/dist/{color-swatch-CZj0jHZd.js → color-swatch-DtaLObbd.js} +4 -4
- package/dist/components/base-control/base-control.js +1 -1
- package/dist/components/button/button.js +9 -9
- package/dist/components/checkbox/checkbox.js +10 -10
- package/dist/components/color-pickers/color-picker.js +1 -1
- package/dist/components/color-pickers/color-swatch.js +1 -1
- package/dist/components/color-pickers/gradient-editor.js +1 -1
- package/dist/components/color-pickers/solid-color-picker.js +26 -22
- package/dist/components/draggable/draggable.js +4 -5
- package/dist/components/expandable/expandable.js +8 -8
- package/dist/components/index.js +4 -2
- package/dist/components/input-field/input-field.js +10 -10
- package/dist/components/link-input/link-input.js +24 -23
- package/dist/components/matrix-align/matrix-align.js +1 -1
- package/dist/components/menu/menu.js +1 -1
- package/dist/components/modal/modal.js +19 -20
- 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-picker-shell.js +48 -42
- package/dist/components/popover/popover.js +1 -1
- package/dist/components/radio/radio.js +2 -2
- package/dist/components/responsive/mini-responsive.js +1 -1
- package/dist/components/select/async-multi-select.js +7 -7
- package/dist/components/select/async-select.js +7 -7
- package/dist/components/select/multi-select.js +8 -8
- package/dist/components/select/shared.js +3 -3
- package/dist/components/select/single-select.js +8 -8
- package/dist/components/slider/column-config-slider.js +3 -3
- package/dist/components/slider/slider.js +3 -3
- package/dist/components/smart-image/image-analysis-worker-next.js +144 -0
- package/dist/components/smart-image/smart-image-next.js +294 -0
- package/dist/components/tabs/tabs.js +15 -14
- package/dist/components/toggle/switch.js +7 -7
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +10 -7
- package/dist/components/tooltip/tooltip.js +5 -5
- package/dist/{context-DYYO3Ns3.js → context-iUFQCK8m.js} +1 -1
- package/dist/icons/icons.js +2 -2
- package/dist/index.js +3 -1
- package/dist/{proxy-CcjltLEW.js → proxy-CgLBbUpw.js} +4189 -3959
- package/dist/{shared-Bg9lx3pE.js → shared-DSTKnPjF.js} +27 -24
- package/dist/{textSelection-Cq_Br7RW.js → textSelection-D_BSbtab.js} +1 -1
- package/dist/{useButton-CeuyDay5.js → useButton-DofKjCES.js} +3 -3
- package/dist/{useEvent-DoWvho2u.js → useEvent-ADVZr4I3.js} +1 -1
- package/dist/{useFilter-DYtfYPua.js → useFilter-Cqw0-KoB.js} +1 -1
- package/dist/{useFocusRing-WEswknAY.js → useFocusRing-Ct2N5S1b.js} +10 -5
- package/dist/{useFormReset-BDF1K4E4.js → useFormReset-KT27O1en.js} +1 -1
- package/dist/{useFormValidation-Dqzjv4jX.js → useFormValidation-DwbcW-pN.js} +2 -2
- package/dist/{useHover-CG39Ci3A.js → useHover-VPZwb-1l.js} +15 -14
- package/dist/{useLabel--3fT2XKM.js → useLabel-DzXzKZZZ.js} +2 -2
- package/dist/{useLabels-vzdDMGCX.js → useLabels-D8O3gOdV.js} +1 -1
- package/dist/{useListState-Bya9g7W8.js → useListState-jHobZH6F.js} +1 -1
- package/dist/{useLocalizedStringFormatter-M3L6Ge2c.js → useLocalizedStringFormatter-CEDs0LsA.js} +1 -1
- package/dist/{useNumberField-D6lsi3Vu.js → useNumberField-CrLevIP3.js} +50 -40
- package/dist/{useNumberFormatter-BWOyCamK.js → useNumberFormatter-CG_IQXp9.js} +1 -1
- package/dist/{usePress-B9w0X4Ur.js → usePress-BPCda-AF.js} +13 -7
- package/dist/{useSingleSelectListState-D9SqGLJ0.js → useSingleSelectListState-sLg_MnX8.js} +2 -2
- package/dist/{useToggle-Deq2xxQV.js → useToggle-D0-c9HPm.js} +4 -4
- package/dist/{useToggleState-j3o1PvdS.js → useToggleState-BhJn-Dz7.js} +1 -1
- package/dist/{utils-HC9_3Crc.js → utils-Cr3pLd9c.js} +77 -38
- package/package.json +24 -24
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import $dbSRa$react__default, { useState, useRef, useCallback, useContext, useEffect, useMemo } from "react";
|
|
1
|
+
import $dbSRa$react__default, { useState, useRef, useCallback, useContext, useEffect, useMemo, forwardRef } from "react";
|
|
2
2
|
import { c as clsx } from "./clsx-DgYk2OaC.js";
|
|
3
3
|
const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== "undefined" ? $dbSRa$react__default.useLayoutEffect : () => {
|
|
4
4
|
};
|
|
@@ -164,26 +164,6 @@ function $ff5963eb1fccf552$export$e08e3b67e392101e(...callbacks) {
|
|
|
164
164
|
for (let callback of callbacks) if (typeof callback === "function") callback(...args);
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
|
-
function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
|
|
168
|
-
let result = {
|
|
169
|
-
...args[0]
|
|
170
|
-
};
|
|
171
|
-
for (let i = 1; i < args.length; i++) {
|
|
172
|
-
let props = args[i];
|
|
173
|
-
for (let key in props) {
|
|
174
|
-
let a = result[key];
|
|
175
|
-
let b = props[key];
|
|
176
|
-
if (typeof a === "function" && typeof b === "function" && // This is a lot faster than a regex.
|
|
177
|
-
key[0] === "o" && key[1] === "n" && key.charCodeAt(2) >= /* 'A' */
|
|
178
|
-
65 && key.charCodeAt(2) <= /* 'Z' */
|
|
179
|
-
90) result[key] = $ff5963eb1fccf552$export$e08e3b67e392101e(a, b);
|
|
180
|
-
else if ((key === "className" || key === "UNSAFE_className") && typeof a === "string" && typeof b === "string") result[key] = clsx(a, b);
|
|
181
|
-
else if (key === "id" && a && b) result.id = $bdb11010cef70236$export$cd8c9cb68f842629(a, b);
|
|
182
|
-
else result[key] = b !== void 0 ? b : a;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
return result;
|
|
186
|
-
}
|
|
187
167
|
function $5dc95899b306f630$export$c9058316764c140e(...refs) {
|
|
188
168
|
if (refs.length === 1 && refs[0]) return refs[0];
|
|
189
169
|
return (value) => {
|
|
@@ -205,6 +185,27 @@ function $5dc95899b306f630$var$setRef(ref, value) {
|
|
|
205
185
|
if (typeof ref === "function") return ref(value);
|
|
206
186
|
else if (ref != null) ref.current = value;
|
|
207
187
|
}
|
|
188
|
+
function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
|
|
189
|
+
let result = {
|
|
190
|
+
...args[0]
|
|
191
|
+
};
|
|
192
|
+
for (let i = 1; i < args.length; i++) {
|
|
193
|
+
let props = args[i];
|
|
194
|
+
for (let key in props) {
|
|
195
|
+
let a = result[key];
|
|
196
|
+
let b = props[key];
|
|
197
|
+
if (typeof a === "function" && typeof b === "function" && // This is a lot faster than a regex.
|
|
198
|
+
key[0] === "o" && key[1] === "n" && key.charCodeAt(2) >= /* 'A' */
|
|
199
|
+
65 && key.charCodeAt(2) <= /* 'Z' */
|
|
200
|
+
90) result[key] = $ff5963eb1fccf552$export$e08e3b67e392101e(a, b);
|
|
201
|
+
else if ((key === "className" || key === "UNSAFE_className") && typeof a === "string" && typeof b === "string") result[key] = clsx(a, b);
|
|
202
|
+
else if (key === "id" && a && b) result.id = $bdb11010cef70236$export$cd8c9cb68f842629(a, b);
|
|
203
|
+
else if (key === "ref" && a && b) result.ref = $5dc95899b306f630$export$c9058316764c140e(a, b);
|
|
204
|
+
else result[key] = b !== void 0 ? b : a;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return result;
|
|
208
|
+
}
|
|
208
209
|
function $df56164dff5785e2$export$4338b53315abf666(ref) {
|
|
209
210
|
const objRef = useRef(null);
|
|
210
211
|
const cleanupRef = useRef(void 0);
|
|
@@ -250,7 +251,7 @@ function $64fa3d84918910a7$export$2881499e37b75b9a({ values, children }) {
|
|
|
250
251
|
return children;
|
|
251
252
|
}
|
|
252
253
|
function $64fa3d84918910a7$export$4d86445c2cf5e3(props) {
|
|
253
|
-
let { className, style, children, defaultClassName, defaultChildren, defaultStyle, values } = props;
|
|
254
|
+
let { className, style, children, defaultClassName, defaultChildren, defaultStyle, values, render } = props;
|
|
254
255
|
return useMemo(() => {
|
|
255
256
|
let computedClassName;
|
|
256
257
|
let computedStyle;
|
|
@@ -278,7 +279,8 @@ function $64fa3d84918910a7$export$4d86445c2cf5e3(props) {
|
|
|
278
279
|
...computedStyle
|
|
279
280
|
} : void 0,
|
|
280
281
|
children: computedChildren !== null && computedChildren !== void 0 ? computedChildren : defaultChildren,
|
|
281
|
-
"data-rac": ""
|
|
282
|
+
"data-rac": "",
|
|
283
|
+
render: render ? (props2) => render(props2, values) : void 0
|
|
282
284
|
};
|
|
283
285
|
}, [
|
|
284
286
|
className,
|
|
@@ -287,7 +289,8 @@ function $64fa3d84918910a7$export$4d86445c2cf5e3(props) {
|
|
|
287
289
|
defaultClassName,
|
|
288
290
|
defaultChildren,
|
|
289
291
|
defaultStyle,
|
|
290
|
-
values
|
|
292
|
+
values,
|
|
293
|
+
render
|
|
291
294
|
]);
|
|
292
295
|
}
|
|
293
296
|
function $64fa3d84918910a7$export$fabf2dc03a41866e(context, slot) {
|
|
@@ -362,20 +365,56 @@ function $64fa3d84918910a7$export$ef03459518577ad4(props) {
|
|
|
362
365
|
for (const prop in props) if (!prefix.test(prop)) filteredProps[prop] = props[prop];
|
|
363
366
|
return filteredProps;
|
|
364
367
|
}
|
|
368
|
+
function $64fa3d84918910a7$var$DOMElement(ElementType, props, forwardedRef) {
|
|
369
|
+
let { render, ...otherProps } = props;
|
|
370
|
+
let elementRef = useRef(null);
|
|
371
|
+
let ref = useMemo(() => $5dc95899b306f630$export$c9058316764c140e(forwardedRef, elementRef), [
|
|
372
|
+
forwardedRef,
|
|
373
|
+
elementRef
|
|
374
|
+
]);
|
|
375
|
+
$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
|
|
376
|
+
if (process.env.NODE_ENV !== "production" && render) {
|
|
377
|
+
if (!elementRef.current) console.warn("Ref was not connected to DOM element returned by custom `render` function. Did you forget to pass through or merge the `ref`?");
|
|
378
|
+
else if (elementRef.current.localName !== ElementType) console.warn(`Unexpected DOM element returned by custom \`render\` function. Expected <${ElementType}>, got <${elementRef.current.localName}>. This may break the component behavior and accessibility.`);
|
|
379
|
+
}
|
|
380
|
+
}, [
|
|
381
|
+
ElementType,
|
|
382
|
+
render
|
|
383
|
+
]);
|
|
384
|
+
let domProps = {
|
|
385
|
+
...otherProps,
|
|
386
|
+
ref
|
|
387
|
+
};
|
|
388
|
+
if (render) return render(domProps, void 0);
|
|
389
|
+
return /* @__PURE__ */ $dbSRa$react__default.createElement(ElementType, domProps);
|
|
390
|
+
}
|
|
391
|
+
const $64fa3d84918910a7$var$domComponentCache = {};
|
|
392
|
+
const $64fa3d84918910a7$export$df3a06d6289f983e = new Proxy({}, {
|
|
393
|
+
get(target, elementType) {
|
|
394
|
+
if (typeof elementType !== "string") return void 0;
|
|
395
|
+
let res = $64fa3d84918910a7$var$domComponentCache[elementType];
|
|
396
|
+
if (!res) {
|
|
397
|
+
res = /* @__PURE__ */ forwardRef($64fa3d84918910a7$var$DOMElement.bind(null, elementType));
|
|
398
|
+
$64fa3d84918910a7$var$domComponentCache[elementType] = res;
|
|
399
|
+
}
|
|
400
|
+
return res;
|
|
401
|
+
}
|
|
402
|
+
});
|
|
365
403
|
export {
|
|
366
404
|
$64fa3d84918910a7$export$29f1550f4b0d4415 as $,
|
|
367
|
-
$
|
|
368
|
-
$
|
|
369
|
-
$
|
|
370
|
-
$
|
|
371
|
-
$64fa3d84918910a7$export$
|
|
372
|
-
$64fa3d84918910a7$export$
|
|
373
|
-
$64fa3d84918910a7$export$
|
|
374
|
-
$64fa3d84918910a7$export$
|
|
375
|
-
$
|
|
376
|
-
$
|
|
377
|
-
$
|
|
378
|
-
$
|
|
379
|
-
$
|
|
380
|
-
$
|
|
405
|
+
$64fa3d84918910a7$export$df3a06d6289f983e as a,
|
|
406
|
+
$3ef42575df84b30b$export$9d1611c77c2fe928 as b,
|
|
407
|
+
$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c as c,
|
|
408
|
+
$bdb11010cef70236$export$f680877a34711e37 as d,
|
|
409
|
+
$64fa3d84918910a7$export$fabf2dc03a41866e as e,
|
|
410
|
+
$64fa3d84918910a7$export$9d4c57ee4c6ffdd8 as f,
|
|
411
|
+
$64fa3d84918910a7$export$ef03459518577ad4 as g,
|
|
412
|
+
$64fa3d84918910a7$export$4d86445c2cf5e3 as h,
|
|
413
|
+
$64fa3d84918910a7$export$2881499e37b75b9a as i,
|
|
414
|
+
$bdb11010cef70236$export$b4cc09c592e8fdb8 as j,
|
|
415
|
+
$df56164dff5785e2$export$4338b53315abf666 as k,
|
|
416
|
+
$5dc95899b306f630$export$c9058316764c140e as l,
|
|
417
|
+
$b5e257d569688ac6$export$535bd6ca7f90a273 as m,
|
|
418
|
+
$64fa3d84918910a7$export$c62b8e45d58ddad9 as n,
|
|
419
|
+
$ff5963eb1fccf552$export$e08e3b67e392101e as o
|
|
381
420
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eightshift/ui-components",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -48,33 +48,33 @@
|
|
|
48
48
|
"react-dom": "^18.3.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@adobe/react-spectrum": "^3.46.
|
|
51
|
+
"@adobe/react-spectrum": "^3.46.1",
|
|
52
52
|
"@atom-universe/use-web-worker": "^2.2.1",
|
|
53
|
-
"@dnd-kit/abstract": "^0.2.
|
|
54
|
-
"@dnd-kit/dom": "^0.2.
|
|
55
|
-
"@dnd-kit/helpers": "^0.2.
|
|
56
|
-
"@dnd-kit/react": "^0.2.
|
|
57
|
-
"@eslint/compat": "^2.0.
|
|
58
|
-
"@react-stately/collections": "^3.12.
|
|
53
|
+
"@dnd-kit/abstract": "^0.2.3",
|
|
54
|
+
"@dnd-kit/dom": "^0.2.3",
|
|
55
|
+
"@dnd-kit/helpers": "^0.2.3",
|
|
56
|
+
"@dnd-kit/react": "^0.2.3",
|
|
57
|
+
"@eslint/compat": "^2.0.2",
|
|
58
|
+
"@react-stately/collections": "^3.12.9",
|
|
59
59
|
"@stylistic/eslint-plugin-js": "^4.4.1",
|
|
60
60
|
"@tailwindcss/vite": "^4.1.18",
|
|
61
|
-
"@thi.ng/color": "^5.8.
|
|
62
|
-
"@thi.ng/pixel": "^7.5.
|
|
63
|
-
"@thi.ng/pixel-analysis": "^2.0.
|
|
64
|
-
"@thi.ng/pixel-dominant-colors": "^2.0.
|
|
65
|
-
"@types/react": "^18.3.
|
|
61
|
+
"@thi.ng/color": "^5.8.9",
|
|
62
|
+
"@thi.ng/pixel": "^7.5.22",
|
|
63
|
+
"@thi.ng/pixel-analysis": "^2.0.24",
|
|
64
|
+
"@thi.ng/pixel-dominant-colors": "^2.0.28",
|
|
65
|
+
"@types/react": "^18.3.28",
|
|
66
66
|
"@types/react-dom": "^18.3.7",
|
|
67
|
-
"@vitejs/plugin-react-swc": "^4.2.
|
|
68
|
-
"@wordpress/i18n": "^6.
|
|
69
|
-
"autoprefixer": "^10.4.
|
|
67
|
+
"@vitejs/plugin-react-swc": "^4.2.3",
|
|
68
|
+
"@wordpress/i18n": "^6.12.0",
|
|
69
|
+
"autoprefixer": "^10.4.24",
|
|
70
70
|
"class-variance-authority": "^0.7.1",
|
|
71
71
|
"clsx": "^2.1.1",
|
|
72
72
|
"css-gradient-parser": "^0.0.18",
|
|
73
73
|
"eslint": "^9.39.2",
|
|
74
74
|
"eslint-config-prettier": "^10.1.8",
|
|
75
75
|
"eslint-plugin-jsdoc": "^61.7.1",
|
|
76
|
-
"eslint-plugin-prettier": "^5.5.
|
|
77
|
-
"glob": "^13.0.
|
|
76
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
77
|
+
"glob": "^13.0.1",
|
|
78
78
|
"globals": "^16.5.0",
|
|
79
79
|
"just-camel-case": "^6.2.0",
|
|
80
80
|
"just-debounce-it": "^3.2.0",
|
|
@@ -82,17 +82,17 @@
|
|
|
82
82
|
"just-is-empty": "^3.4.1",
|
|
83
83
|
"just-kebab-case": "^4.2.0",
|
|
84
84
|
"just-throttle": "^4.2.0",
|
|
85
|
-
"lightningcss": "^1.
|
|
85
|
+
"lightningcss": "^1.31.1",
|
|
86
86
|
"postcss": "^8.5.6",
|
|
87
|
-
"prettier": "^3.
|
|
87
|
+
"prettier": "^3.8.1",
|
|
88
88
|
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
89
89
|
"react": "^18.3.1",
|
|
90
|
-
"react-aria": "^3.
|
|
91
|
-
"react-aria-components": "^1.
|
|
90
|
+
"react-aria": "^3.46.0",
|
|
91
|
+
"react-aria-components": "^1.15.0",
|
|
92
92
|
"react-dom": "^18.3.1",
|
|
93
93
|
"react-jsx-parser": "^2.4.1",
|
|
94
94
|
"react-movable": "^3.4.1",
|
|
95
|
-
"react-stately": "^3.
|
|
95
|
+
"react-stately": "^3.44.0",
|
|
96
96
|
"svg-to-jsx-string": "^0.1.1",
|
|
97
97
|
"tailwindcss": "^4.1.18",
|
|
98
98
|
"tailwindcss-motion": "^1.1.1",
|
|
@@ -103,6 +103,6 @@
|
|
|
103
103
|
"dependencies": {
|
|
104
104
|
"@fontsource-variable/geist-mono": "^5.2.7",
|
|
105
105
|
"@fontsource-variable/roboto-flex": "^5.2.8",
|
|
106
|
-
"motion": "^12.
|
|
106
|
+
"motion": "^12.31.2"
|
|
107
107
|
}
|
|
108
108
|
}
|