@eightshift/ui-components 1.0.5 → 1.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/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 +52 -70
- 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 +27 -15
- package/dist/components/responsive/responsive.js +53 -52
- 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
|
@@ -35,26 +35,26 @@ const truncateMiddle = (input, maxLength, separator = "...") => {
|
|
|
35
35
|
return `${leftPart}${separator}${rightPart}`;
|
|
36
36
|
};
|
|
37
37
|
/**
|
|
38
|
-
* Un-escapes HTML entities.
|
|
39
|
-
*
|
|
40
|
-
* @param {string} input - Input string.
|
|
41
|
-
*
|
|
42
|
-
* @access public
|
|
43
|
-
*
|
|
44
|
-
* @returns {string} String with HTML entities unescaped.
|
|
45
|
-
*
|
|
46
|
-
* Usage:
|
|
47
|
-
* ```js
|
|
48
|
-
* unescapeHTML('Test&Up');
|
|
49
|
-
* ```
|
|
50
|
-
*
|
|
51
|
-
* Output:
|
|
52
|
-
* ```js
|
|
53
|
-
* Test&Up
|
|
54
|
-
* ```
|
|
55
|
-
*
|
|
56
|
-
* @preserve
|
|
57
|
-
*/
|
|
38
|
+
* Un-escapes HTML entities.
|
|
39
|
+
*
|
|
40
|
+
* @param {string} input - Input string.
|
|
41
|
+
*
|
|
42
|
+
* @access public
|
|
43
|
+
*
|
|
44
|
+
* @returns {string} String with HTML entities unescaped.
|
|
45
|
+
*
|
|
46
|
+
* Usage:
|
|
47
|
+
* ```js
|
|
48
|
+
* unescapeHTML('Test&Up');
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* Output:
|
|
52
|
+
* ```js
|
|
53
|
+
* Test&Up
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* @preserve
|
|
57
|
+
*/
|
|
58
58
|
const unescapeHTML = (input = "") => new DOMParser().parseFromString(input, "text/html").documentElement.textContent;
|
|
59
59
|
/**
|
|
60
60
|
* Limits the string to the maximum length and adds the provided separator in case the string is longer.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default, { useRef, useCallback, useState, useContext, useEffect, useMemo, createContext } from "react";
|
|
2
|
-
import { $ as $dbSRa$reactdom } from "./index-
|
|
2
|
+
import { $ as $dbSRa$reactdom } from "./index-CAPcSs9K.js";
|
|
3
3
|
const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== "undefined" ? React__default.useLayoutEffect : () => {
|
|
4
4
|
};
|
|
5
5
|
function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {
|
|
@@ -18,21 +18,17 @@ function $1dbecbe27a04f9af$export$14d238f342723f25(defaultValue) {
|
|
|
18
18
|
let [value, setValue] = useState(defaultValue);
|
|
19
19
|
let effect = useRef(null);
|
|
20
20
|
let nextRef = $8ae05eaa5c114e9c$export$7f54fc3180508a52(() => {
|
|
21
|
-
if (!effect.current)
|
|
22
|
-
return;
|
|
21
|
+
if (!effect.current) return;
|
|
23
22
|
let newValue = effect.current.next();
|
|
24
23
|
if (newValue.done) {
|
|
25
24
|
effect.current = null;
|
|
26
25
|
return;
|
|
27
26
|
}
|
|
28
|
-
if (value === newValue.value)
|
|
29
|
-
|
|
30
|
-
else
|
|
31
|
-
setValue(newValue.value);
|
|
27
|
+
if (value === newValue.value) nextRef();
|
|
28
|
+
else setValue(newValue.value);
|
|
32
29
|
});
|
|
33
30
|
$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
|
|
34
|
-
if (effect.current)
|
|
35
|
-
nextRef();
|
|
31
|
+
if (effect.current) nextRef();
|
|
36
32
|
});
|
|
37
33
|
let queue = $8ae05eaa5c114e9c$export$7f54fc3180508a52((fn) => {
|
|
38
34
|
effect.current = fn(value);
|
|
@@ -75,8 +71,7 @@ function $b5e257d569688ac6$var$useCounter(isDisabled = false) {
|
|
|
75
71
|
}
|
|
76
72
|
function $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {
|
|
77
73
|
let ctx = useContext($b5e257d569688ac6$var$SSRContext);
|
|
78
|
-
if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM)
|
|
79
|
-
console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
|
74
|
+
if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM) console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
|
80
75
|
let counter = $b5e257d569688ac6$var$useCounter(!!defaultId);
|
|
81
76
|
let prefix = ctx === $b5e257d569688ac6$var$defaultContext && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${ctx.prefix}`;
|
|
82
77
|
return defaultId || `${prefix}-${counter}`;
|
|
@@ -99,8 +94,7 @@ function $b5e257d569688ac6$var$subscribe(onStoreChange) {
|
|
|
99
94
|
};
|
|
100
95
|
}
|
|
101
96
|
function $b5e257d569688ac6$export$535bd6ca7f90a273() {
|
|
102
|
-
if (typeof React__default["useSyncExternalStore"] === "function")
|
|
103
|
-
return React__default["useSyncExternalStore"]($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot);
|
|
97
|
+
if (typeof React__default["useSyncExternalStore"] === "function") return React__default["useSyncExternalStore"]($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot);
|
|
104
98
|
return useContext($b5e257d569688ac6$var$IsSSRContext);
|
|
105
99
|
}
|
|
106
100
|
let $bdb11010cef70236$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
@@ -112,8 +106,7 @@ function $bdb11010cef70236$export$f680877a34711e37(defaultId) {
|
|
|
112
106
|
let updateValue = useCallback((val) => {
|
|
113
107
|
nextId.current = val;
|
|
114
108
|
}, []);
|
|
115
|
-
if ($bdb11010cef70236$var$canUseDOM)
|
|
116
|
-
$bdb11010cef70236$var$idsUpdaterMap.set(res, updateValue);
|
|
109
|
+
if ($bdb11010cef70236$var$canUseDOM) $bdb11010cef70236$var$idsUpdaterMap.set(res, updateValue);
|
|
117
110
|
$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
|
|
118
111
|
let r2 = res;
|
|
119
112
|
return () => {
|
|
@@ -132,8 +125,7 @@ function $bdb11010cef70236$export$f680877a34711e37(defaultId) {
|
|
|
132
125
|
return res;
|
|
133
126
|
}
|
|
134
127
|
function $bdb11010cef70236$export$cd8c9cb68f842629(idA, idB) {
|
|
135
|
-
if (idA === idB)
|
|
136
|
-
return idA;
|
|
128
|
+
if (idA === idB) return idA;
|
|
137
129
|
let setIdA = $bdb11010cef70236$var$idsUpdaterMap.get(idA);
|
|
138
130
|
if (setIdA) {
|
|
139
131
|
setIdA(idB);
|
|
@@ -167,28 +159,20 @@ function $bdb11010cef70236$export$b4cc09c592e8fdb8(depArray = []) {
|
|
|
167
159
|
}
|
|
168
160
|
function $ff5963eb1fccf552$export$e08e3b67e392101e(...callbacks) {
|
|
169
161
|
return (...args) => {
|
|
170
|
-
for (let callback of callbacks)
|
|
171
|
-
if (typeof callback === "function")
|
|
172
|
-
callback(...args);
|
|
162
|
+
for (let callback of callbacks) if (typeof callback === "function") callback(...args);
|
|
173
163
|
};
|
|
174
164
|
}
|
|
175
165
|
function r(e) {
|
|
176
166
|
var t, f, n = "";
|
|
177
|
-
if ("string" == typeof e || "number" == typeof e)
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
for (t = 0; t < o; t++)
|
|
183
|
-
e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
184
|
-
} else
|
|
185
|
-
for (f in e)
|
|
186
|
-
e[f] && (n && (n += " "), n += f);
|
|
167
|
+
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
168
|
+
else if ("object" == typeof e) if (Array.isArray(e)) {
|
|
169
|
+
var o = e.length;
|
|
170
|
+
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
171
|
+
} else for (f in e) e[f] && (n && (n += " "), n += f);
|
|
187
172
|
return n;
|
|
188
173
|
}
|
|
189
174
|
function clsx() {
|
|
190
|
-
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++)
|
|
191
|
-
(e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
175
|
+
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
192
176
|
return n;
|
|
193
177
|
}
|
|
194
178
|
function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
|
|
@@ -203,27 +187,20 @@ function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
|
|
|
203
187
|
if (typeof a === "function" && typeof b === "function" && // This is a lot faster than a regex.
|
|
204
188
|
key[0] === "o" && key[1] === "n" && key.charCodeAt(2) >= /* 'A' */
|
|
205
189
|
65 && key.charCodeAt(2) <= /* 'Z' */
|
|
206
|
-
90)
|
|
207
|
-
|
|
208
|
-
else if (
|
|
209
|
-
|
|
210
|
-
else if (key === "id" && a && b)
|
|
211
|
-
result.id = $bdb11010cef70236$export$cd8c9cb68f842629(a, b);
|
|
212
|
-
else
|
|
213
|
-
result[key] = b !== void 0 ? b : a;
|
|
190
|
+
90) result[key] = $ff5963eb1fccf552$export$e08e3b67e392101e(a, b);
|
|
191
|
+
else if ((key === "className" || key === "UNSAFE_className") && typeof a === "string" && typeof b === "string") result[key] = clsx(a, b);
|
|
192
|
+
else if (key === "id" && a && b) result.id = $bdb11010cef70236$export$cd8c9cb68f842629(a, b);
|
|
193
|
+
else result[key] = b !== void 0 ? b : a;
|
|
214
194
|
}
|
|
215
195
|
}
|
|
216
196
|
return result;
|
|
217
197
|
}
|
|
218
198
|
function $5dc95899b306f630$export$c9058316764c140e(...refs) {
|
|
219
|
-
if (refs.length === 1)
|
|
220
|
-
return refs[0];
|
|
199
|
+
if (refs.length === 1) return refs[0];
|
|
221
200
|
return (value) => {
|
|
222
201
|
for (let ref of refs) {
|
|
223
|
-
if (typeof ref === "function")
|
|
224
|
-
|
|
225
|
-
else if (ref != null)
|
|
226
|
-
ref.current = value;
|
|
202
|
+
if (typeof ref === "function") ref(value);
|
|
203
|
+
else if (ref != null) ref.current = value;
|
|
227
204
|
}
|
|
228
205
|
};
|
|
229
206
|
}
|
|
@@ -235,10 +212,8 @@ function $df56164dff5785e2$export$4338b53315abf666(forwardedRef) {
|
|
|
235
212
|
},
|
|
236
213
|
set current(value) {
|
|
237
214
|
objRef.current = value;
|
|
238
|
-
if (typeof forwardedRef === "function")
|
|
239
|
-
|
|
240
|
-
else if (forwardedRef)
|
|
241
|
-
forwardedRef.current = value;
|
|
215
|
+
if (typeof forwardedRef === "function") forwardedRef(value);
|
|
216
|
+
else if (forwardedRef) forwardedRef.current = value;
|
|
242
217
|
}
|
|
243
218
|
}), [
|
|
244
219
|
forwardedRef
|
|
@@ -258,29 +233,22 @@ function $64fa3d84918910a7$export$4d86445c2cf5e3(props) {
|
|
|
258
233
|
let computedClassName;
|
|
259
234
|
let computedStyle;
|
|
260
235
|
let computedChildren;
|
|
261
|
-
if (typeof className === "function")
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
if (
|
|
276
|
-
|
|
277
|
-
...values,
|
|
278
|
-
defaultChildren
|
|
279
|
-
});
|
|
280
|
-
else if (children == null)
|
|
281
|
-
computedChildren = defaultChildren;
|
|
282
|
-
else
|
|
283
|
-
computedChildren = children;
|
|
236
|
+
if (typeof className === "function") computedClassName = className({
|
|
237
|
+
...values,
|
|
238
|
+
defaultClassName
|
|
239
|
+
});
|
|
240
|
+
else computedClassName = className;
|
|
241
|
+
if (typeof style === "function") computedStyle = style({
|
|
242
|
+
...values,
|
|
243
|
+
defaultStyle: defaultStyle || {}
|
|
244
|
+
});
|
|
245
|
+
else computedStyle = style;
|
|
246
|
+
if (typeof children === "function") computedChildren = children({
|
|
247
|
+
...values,
|
|
248
|
+
defaultChildren
|
|
249
|
+
});
|
|
250
|
+
else if (children == null) computedChildren = defaultChildren;
|
|
251
|
+
else computedChildren = children;
|
|
284
252
|
return {
|
|
285
253
|
className: computedClassName !== null && computedClassName !== void 0 ? computedClassName : defaultClassName,
|
|
286
254
|
style: computedStyle || defaultStyle ? {
|
|
@@ -306,8 +274,7 @@ function $64fa3d84918910a7$export$fabf2dc03a41866e(context, slot) {
|
|
|
306
274
|
return null;
|
|
307
275
|
if (ctx && typeof ctx === "object" && "slots" in ctx && ctx.slots) {
|
|
308
276
|
let availableSlots = new Intl.ListFormat().format(Object.keys(ctx.slots).map((p) => `"${p}"`));
|
|
309
|
-
if (!slot && !ctx.slots[$64fa3d84918910a7$export$c62b8e45d58ddad9])
|
|
310
|
-
throw new Error(`A slot prop is required. Valid slot names are ${availableSlots}.`);
|
|
277
|
+
if (!slot && !ctx.slots[$64fa3d84918910a7$export$c62b8e45d58ddad9]) throw new Error(`A slot prop is required. Valid slot names are ${availableSlots}.`);
|
|
311
278
|
let slotKey = slot || $64fa3d84918910a7$export$c62b8e45d58ddad9;
|
|
312
279
|
if (!ctx.slots[slotKey])
|
|
313
280
|
throw new Error(`Invalid slot "${slot}". Valid slot names are ${availableSlots}.`);
|
|
@@ -359,8 +326,7 @@ function $64fa3d84918910a7$export$9d4c57ee4c6ffdd8() {
|
|
|
359
326
|
setHasSlot(!!el);
|
|
360
327
|
}, []);
|
|
361
328
|
$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
|
|
362
|
-
if (!hasRun.current)
|
|
363
|
-
setHasSlot(false);
|
|
329
|
+
if (!hasRun.current) setHasSlot(false);
|
|
364
330
|
}, []);
|
|
365
331
|
return [
|
|
366
332
|
ref,
|
|
@@ -380,8 +346,7 @@ function $64fa3d84918910a7$export$45fda7c47f93fd48(ref, isOpen) {
|
|
|
380
346
|
setExiting(true);
|
|
381
347
|
setExitState("exiting");
|
|
382
348
|
}
|
|
383
|
-
if (!ref.current && exitState === "exited")
|
|
384
|
-
setExitState("idle");
|
|
349
|
+
if (!ref.current && exitState === "exited") setExitState("idle");
|
|
385
350
|
$64fa3d84918910a7$var$useAnimation(ref, isExiting, useCallback(() => {
|
|
386
351
|
setExitState("exited");
|
|
387
352
|
setExiting(false);
|
|
@@ -409,8 +374,7 @@ function $64fa3d84918910a7$var$useAnimation(ref, isActive, onEnd) {
|
|
|
409
374
|
return () => {
|
|
410
375
|
element.removeEventListener("animationend", onAnimationEnd);
|
|
411
376
|
};
|
|
412
|
-
} else
|
|
413
|
-
onEnd();
|
|
377
|
+
} else onEnd();
|
|
414
378
|
}
|
|
415
379
|
}, [
|
|
416
380
|
ref,
|
|
@@ -424,10 +388,8 @@ if (typeof HTMLTemplateElement !== "undefined") {
|
|
|
424
388
|
configurable: true,
|
|
425
389
|
enumerable: true,
|
|
426
390
|
get: function() {
|
|
427
|
-
if (this.dataset.reactAriaHidden)
|
|
428
|
-
|
|
429
|
-
else
|
|
430
|
-
return getFirstChild.call(this);
|
|
391
|
+
if (this.dataset.reactAriaHidden) return this.content.firstChild;
|
|
392
|
+
else return getFirstChild.call(this);
|
|
431
393
|
}
|
|
432
394
|
});
|
|
433
395
|
}
|
|
@@ -448,8 +410,7 @@ function $64fa3d84918910a7$export$8dc98ba7eadeaa56(props) {
|
|
|
448
410
|
function $64fa3d84918910a7$export$86427a43e3e48ebb(fn) {
|
|
449
411
|
let Wrapper = (props, ref) => {
|
|
450
412
|
let isHidden = useContext($64fa3d84918910a7$export$94b6d0abf7d33e8c);
|
|
451
|
-
if (isHidden)
|
|
452
|
-
return null;
|
|
413
|
+
if (isHidden) return null;
|
|
453
414
|
return fn(props, ref);
|
|
454
415
|
};
|
|
455
416
|
Wrapper.displayName = fn.displayName || fn.name;
|
|
@@ -458,9 +419,7 @@ function $64fa3d84918910a7$export$86427a43e3e48ebb(fn) {
|
|
|
458
419
|
function $64fa3d84918910a7$export$ef03459518577ad4(props) {
|
|
459
420
|
const prefix = /^(data-.*)$/;
|
|
460
421
|
let filteredProps = {};
|
|
461
|
-
for (const prop in props)
|
|
462
|
-
if (!prefix.test(prop))
|
|
463
|
-
filteredProps[prop] = props[prop];
|
|
422
|
+
for (const prop in props) if (!prefix.test(prop)) filteredProps[prop] = props[prop];
|
|
464
423
|
return filteredProps;
|
|
465
424
|
}
|
|
466
425
|
export {
|
package/package.json
CHANGED
|
@@ -1,91 +1,97 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
2
|
+
"name": "@eightshift/ui-components",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.js",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/infinum/eightshift-ui-components.git"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"sideEffects": [
|
|
15
|
+
"./dist/assets/*.css"
|
|
16
|
+
],
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"import": "./dist/index.js",
|
|
20
|
+
"require": "./dist/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./icons": "./dist/icons/index.js",
|
|
23
|
+
"./utilities": "./dist/utilities/index.js",
|
|
24
|
+
"./dist/assets/style.css": "./dist/assets/style.css",
|
|
25
|
+
"./dist/assets/fonts.css": "./dist/assets/fonts.css",
|
|
26
|
+
"./dist/assets/wp-font-enhancements.css": "./dist/assets/wp-font-enhancements.css",
|
|
27
|
+
"./dist/assets/wp-ui-enhancements.css": "./dist/assets/wp-ui-enhancements.css",
|
|
28
|
+
"./styles": "./dist/assets/style.css",
|
|
29
|
+
"./fonts": "./dist/assets/fonts.css",
|
|
30
|
+
"./wp-font-enhancements": "./dist/assets/wp-font-enhancements.css",
|
|
31
|
+
"./wp-ui-enhancements": "./dist/assets/wp-ui-enhancements.css",
|
|
32
|
+
"./wp-overrides": "./dist/assets/wp.css"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"react": "^18.3.1",
|
|
36
|
+
"react-dom": "^18.3.1"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"react": "^18.3.1",
|
|
40
|
+
"react-dom": "^18.3.1",
|
|
41
|
+
"react-jsx-parser": "^1.29.0",
|
|
42
|
+
"svg-to-jsx-string": "^0.1.1"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@adobe/react-spectrum": "^3.35.1",
|
|
46
|
+
"@dnd-kit/core": "^6.1.0",
|
|
47
|
+
"@dnd-kit/modifiers": "^7.0.0",
|
|
48
|
+
"@dnd-kit/sortable": "^8.0.0",
|
|
49
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
50
|
+
"@eslint/compat": "^1.1.0",
|
|
51
|
+
"@react-stately/collections": "^3.10.7",
|
|
52
|
+
"@stylistic/eslint-plugin-js": "^2.3.0",
|
|
53
|
+
"@types/react": "^18.3.3",
|
|
54
|
+
"@types/react-dom": "^18.3.0",
|
|
55
|
+
"@vitejs/plugin-react-swc": "^3.7.0",
|
|
56
|
+
"@wordpress/i18n": "^5.1.0",
|
|
57
|
+
"autoprefixer": "^10.4.19",
|
|
58
|
+
"clsx": "^2.1.1",
|
|
59
|
+
"css-gradient-parser": "^0.0.16",
|
|
60
|
+
"eslint": "^9.5.0",
|
|
61
|
+
"eslint-config-prettier": "^9.1.0",
|
|
62
|
+
"eslint-plugin-jsdoc": "^48.4.0",
|
|
63
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
64
|
+
"eslint-plugin-react": "^7.34.3",
|
|
65
|
+
"eslint-plugin-react-hooks": "^4.6.2",
|
|
66
|
+
"framer-motion": "^11.2.12",
|
|
67
|
+
"glob": "^10.4.2",
|
|
68
|
+
"globals": "^15.6.0",
|
|
69
|
+
"just-camel-case": "^6.2.0",
|
|
70
|
+
"just-debounce-it": "^3.2.0",
|
|
71
|
+
"just-has": "^2.3.0",
|
|
72
|
+
"just-is-empty": "^3.4.1",
|
|
73
|
+
"just-kebab-case": "^4.2.0",
|
|
74
|
+
"just-throttle": "^4.2.0",
|
|
75
|
+
"lightningcss": "^1.25.1",
|
|
76
|
+
"postcss": "^8.4.38",
|
|
77
|
+
"prettier": "^3.3.2",
|
|
78
|
+
"prettier-plugin-tailwindcss": "^0.6.5",
|
|
79
|
+
"react-aria": "^3.33.1",
|
|
80
|
+
"react-aria-components": "^1.2.1",
|
|
81
|
+
"react-select": "^5.8.0",
|
|
82
|
+
"react-stately": "^3.31.1",
|
|
83
|
+
"tailwindcss": "^3.4.4",
|
|
84
|
+
"tailwindcss-animate": "^1.0.7",
|
|
85
|
+
"tailwindcss-react-aria-components": "^1.1.3",
|
|
86
|
+
"use-debounce": "^10.0.1",
|
|
87
|
+
"vite": "^5.3.1",
|
|
88
|
+
"vite-plugin-lib-inject-css": "^2.1.1"
|
|
89
|
+
},
|
|
90
|
+
"scripts": {
|
|
91
|
+
"dev": "vite",
|
|
92
|
+
"start": "vite",
|
|
93
|
+
"build": "vite build",
|
|
94
|
+
"lint": "npx eslint",
|
|
95
|
+
"preview": "vite preview"
|
|
96
|
+
}
|
|
97
|
+
}
|