@eightshift/ui-components 7.2.1 → 7.3.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/Autocomplete-pLMPWMFq.js +451 -0
- package/dist/Button-Biwg7zwt.js +223 -0
- package/dist/Dialog-C1sh8jbh.js +2474 -0
- package/dist/{Disclosure-NYWFw9RJ.js → Disclosure-B_SHgiUz.js} +50 -51
- package/dist/FocusScope-lGkM8AO8.js +734 -0
- package/dist/Form-BxIJCHYd.js +5 -0
- package/dist/Heading-B2EsUuu6.js +16 -0
- package/dist/{Hidden-8TB37dpK.js → Hidden-DYY00jLm.js} +10 -10
- package/dist/I18nProvider-Cm6dj5jY.js +93 -0
- package/dist/Label-B1TkoVOG.js +17 -0
- package/dist/ListBox-BquE0m8z.js +584 -0
- package/dist/{NumberFormatter-m5VW6MTK.js → NumberFormatter-JHF0Tadk.js} +24 -26
- package/dist/PortalProvider-BYcv24il.js +13 -0
- package/dist/RadioGroup-BxjLooWU.js +324 -0
- package/dist/SearchField-BkAU0HLm.js +322 -0
- package/dist/SelectionIndicator-Bx_EYBXD.js +13 -0
- package/dist/{Slider-DW1RuMVp.js → Slider-DSv6fyZ6.js} +321 -363
- package/dist/Text-C8pfwn0W.js +16 -0
- package/dist/{VisuallyHidden-CfsnJHZb.js → VisuallyHidden-KcXlGa5p.js} +12 -12
- package/dist/{animation-Bd2peown.js → animation-BJ-2VKdB.js} +12 -12
- package/dist/assets/style-admin.css +1 -1
- package/dist/assets/style-editor.css +1 -1
- package/dist/assets/style.css +1 -1
- package/dist/{button-D9cbyHeZ.js → button-CawAzlko.js} +21 -73
- package/dist/{checkbox-BO5RZmO8.js → checkbox-t7VrqXv2.js} +59 -62
- package/dist/{color-swatch-D2ZBkuTt.js → color-swatch-gU09x9Ga.js} +417 -414
- package/dist/components/base-control/base-control.js +2 -2
- 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 +1 -1
- package/dist/components/color-pickers/gradient-editor.js +1 -1
- package/dist/components/color-pickers/solid-color-picker.js +1 -1
- package/dist/components/component-toggle/component-toggle.js +4 -4
- package/dist/components/container-panel/container-panel.js +5 -5
- package/dist/components/draggable/draggable-handle.js +1 -1
- package/dist/components/draggable/draggable.js +1 -1
- package/dist/components/draggable-list/draggable-list-item.js +1 -1
- package/dist/components/draggable-list/draggable-list.js +2 -2
- package/dist/components/expandable/expandable.js +7 -7
- package/dist/components/index.js +15 -15
- package/dist/components/input-field/input-field.js +1 -1
- package/dist/components/item-collection/item-collection.js +1 -1
- package/dist/components/link-input/link-input.js +1 -1
- package/dist/components/matrix-align/matrix-align.js +5 -5
- package/dist/components/menu/menu.js +11 -11
- package/dist/components/modal/modal.js +1 -1
- package/dist/components/number-picker/number-picker.js +1 -1
- package/dist/components/option-select/option-select.js +3 -3
- package/dist/components/options-panel/options-panel.js +3 -3
- package/dist/components/placeholders/file-picker-shell.js +1 -1
- package/dist/components/placeholders/file-placeholder.js +1 -1
- package/dist/components/popover/popover.js +6 -6
- package/dist/components/portal-provider/portal-provider.js +2 -2
- package/dist/components/radio/radio.js +9 -9
- package/dist/components/repeater/repeater-item.js +2 -2
- package/dist/components/repeater/repeater.js +3 -3
- package/dist/components/responsive/mini-responsive.js +6 -6
- package/dist/components/responsive/responsive-legacy.js +5 -5
- package/dist/components/responsive/responsive.js +5 -5
- package/dist/components/responsive-preview/responsive-preview.js +2 -2
- package/dist/components/select/async-multi-select.js +27 -26
- package/dist/components/select/async-select.js +27 -26
- package/dist/components/select/multi-select.js +33 -32
- package/dist/components/select/shared.js +1 -1
- package/dist/components/select/single-select.js +33 -32
- package/dist/components/select/styles.js +1 -1
- package/dist/components/slider/column-config-slider.js +8 -8
- package/dist/components/slider/slider.js +8 -8
- package/dist/components/slider/utils.js +1 -1
- package/dist/components/smart-image/smart-image.js +1 -1
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/toggle/switch.js +1 -1
- package/dist/components/toggle/toggle.js +3 -3
- package/dist/components/toggle-button/toggle-button.js +1 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/{draggable-CTDVJ4zd.js → draggable-Cxv-OueQ.js} +1 -1
- package/dist/filterDOMProps-BfW758QC.js +69 -0
- package/dist/{gradient-editor-CD5Sho6A.js → gradient-editor-CInqVF8v.js} +6 -6
- package/dist/icons/index.js +1 -1
- package/dist/icons/jsx-svg.js +1 -1
- package/dist/index.js +15 -15
- package/dist/{input-field-_OCWbftf.js → input-field-BdFrxQ-R.js} +46 -47
- package/dist/keyboard-CT41mQzR.js +55 -0
- package/dist/{link-input-BnjtzMbF.js → link-input-BDFhSSvH.js} +324 -356
- package/dist/{modal-snrElwty.js → modal-CJDaBdPh.js} +100 -92
- package/dist/{number-ZZIxJukn.js → number-MWRvGfyE.js} +10 -10
- package/dist/{number-picker-Dhtx4409.js → number-picker-BrxrB-xq.js} +43 -42
- package/dist/{shared-BpAYSi3F.js → shared-CI4kcnm8.js} +482 -502
- package/dist/{smart-image-CBNbxJ57.js → smart-image-eGdMu9s9.js} +2 -2
- package/dist/{solid-color-picker-DukArNH-.js → solid-color-picker-DXgX-OAm.js} +926 -935
- package/dist/{switch-DmsvyQPa.js → switch-DNHFoCCx.js} +28 -28
- package/dist/{tabs-Cy6gB0RL.js → tabs-C2tPOEYr.js} +145 -149
- package/dist/textSelection-BhX_2zV9.js +45 -0
- package/dist/{toggle-button-BlzUGfGy.js → toggle-button-DYDp11rq.js} +35 -35
- package/dist/{tooltip-BzJzYlcc.js → tooltip-C-hT6tN9.js} +162 -162
- package/dist/{useAsyncList-BNzwKoX4.js → useAsyncList-DsOh1xIx.js} +54 -74
- package/dist/{useButton-ra1ZSZ4z.js → useButton-BMZc4fTX.js} +11 -11
- package/dist/{SelectionManager-B8lLv6Ue.js → useCollection-CBVYSuGz.js} +1689 -1777
- package/dist/{useEvent-DkZVfgsS.js → useEvent-ypAU33vv.js} +5 -5
- package/dist/useField-BXf__jxy.js +32 -0
- package/dist/{useFilter-OiMnf6sb.js → useFilter-CfKEbIwL.js} +5 -5
- package/dist/{useFocusRing-DuYL4cdO.js → useFocusRing-BgYY-7ko.js} +23 -23
- package/dist/useFormReset-BuMc_O4y.js +17 -0
- package/dist/{FieldError-BWDbP5Db.js → useFormValidation-BcME9D0E.js} +63 -66
- package/dist/useHover-lyApu3ba.js +975 -0
- package/dist/{useLabel-2EohW5l6.js → useLabel-Rv8cIIKk.js} +8 -8
- package/dist/{useLabels-B2p7RXi5.js → useLabels-xOYtkA8o.js} +5 -5
- package/dist/useListState-u6DfeXHi.js +135 -0
- package/dist/{useLocalizedStringFormatter-Dv2diN3k.js → useLocalizedStringFormatter-CR-bmorj.js} +45 -45
- package/dist/{useNumberField-2xbi3jRV.js → useNumberFieldState-xL-ecwNz.js} +665 -619
- package/dist/useNumberFormatter-CR1PAFPG.js +10 -0
- package/dist/useOverlayTriggerState-AeCx45Gv.js +551 -0
- package/dist/usePress-Dnx5rBoD.js +593 -0
- package/dist/useTextField-BW3ZwGyz.js +159 -0
- package/dist/{useToggle-ecIirvIM.js → useToggle-BF5wptMP.js} +19 -20
- package/dist/useToggleState-D5P01lch.js +22 -0
- package/dist/useToolbar-BT25-MJg.js +55 -0
- package/dist/utilities/debounce-throttle.js +1 -1
- package/dist/utilities/es-dash.js +1 -1
- package/dist/utilities/index.js +3 -3
- package/dist/{utils-B_uiqNa4.js → utils-JFcCNFzy.js} +121 -122
- package/package.json +13 -13
- package/dist/Button-h6xF_WrP.js +0 -225
- package/dist/Dialog-i5VLQw1o.js +0 -2488
- package/dist/FocusScope-CgwbGOBB.js +0 -746
- package/dist/Form-DTMkbrQY.js +0 -5
- package/dist/Heading-Hol-wS_B.js +0 -16
- package/dist/Input-BURqyJXW.js +0 -161
- package/dist/Label-DFXXxMKY.js +0 -17
- package/dist/ListBox-BHUJxpwh.js +0 -600
- package/dist/OverlayArrow-BoloUPQM.js +0 -573
- package/dist/PortalProvider-DinZZCKX.js +0 -14
- package/dist/RSPContexts-C_z0bI8W.js +0 -12
- package/dist/RadioGroup-BwlGtCja.js +0 -329
- package/dist/SearchField-Cm1i5mLj.js +0 -764
- package/dist/SelectionIndicator-31L6EI9F.js +0 -13
- package/dist/Text-O6VBBDlP.js +0 -16
- package/dist/context-C-XNeJ_l.js +0 -93
- package/dist/filterDOMProps-_2_3GD-K.js +0 -69
- package/dist/textSelection-Dv6WPj0Z.js +0 -45
- package/dist/useField-D0WrzR2F.js +0 -32
- package/dist/useFormReset-DdkykzAn.js +0 -18
- package/dist/useHover-qaMm3XFO.js +0 -982
- package/dist/useListState-CD_5vfyy.js +0 -147
- package/dist/useNumberFormatter-C2Cm2mNj.js +0 -10
- package/dist/usePress-ZP1TjkFf.js +0 -678
- package/dist/useToggleState-IIDbiKPl.js +0 -23
- /package/dist/{List-DWlgW2Ex.js → List---tsVJlI.js} +0 -0
- /package/dist/{build-module-Bsx62nlm.js → build-module-K6vi4xE0.js} +0 -0
- /package/dist/{debounce-throttle-DXxSAKpq.js → debounce-throttle-LSPAPFtq.js} +0 -0
- /package/dist/{dist-2gkv7_1U.js → dist-jw8wvxoG.js} +0 -0
- /package/dist/{es-dash-HqXWZZ3_.js → es-dash-BuShf_ht.js} +0 -0
- /package/dist/{jsx-svg-DgKbriN1.js → jsx-svg-DT1SBWuP.js} +0 -0
- /package/dist/{utilities-lwX686oD.js → utilities-DV0KKJNR.js} +0 -0
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { _ as $7613b1592d41b092$export$6cd28814d92fa9c9, n as $7af3f5b51489e0b5$export$253fe78d46329472, t as $d496c0a20b6e58ec$export$6c8a5aaad13c9852 } from "./SelectionManager-B8lLv6Ue.js";
|
|
2
|
-
import { useCallback, useEffect, useMemo, useRef, version } from "react";
|
|
3
|
-
//#region node_modules/@react-aria/utils/dist/inertValue.mjs
|
|
4
|
-
function $cdc5a6778b766db2$export$a9d04c5684123369(value) {
|
|
5
|
-
const pieces = version.split(".");
|
|
6
|
-
if (parseInt(pieces[0], 10) >= 19) return value;
|
|
7
|
-
return value ? "true" : void 0;
|
|
8
|
-
}
|
|
9
|
-
//#endregion
|
|
10
|
-
//#region node_modules/@react-stately/list/dist/ListCollection.mjs
|
|
11
|
-
var $a02d57049d202695$export$d085fb9e920b5ca7 = class {
|
|
12
|
-
*[Symbol.iterator]() {
|
|
13
|
-
yield* this.iterable;
|
|
14
|
-
}
|
|
15
|
-
get size() {
|
|
16
|
-
return this._size;
|
|
17
|
-
}
|
|
18
|
-
getKeys() {
|
|
19
|
-
return this.keyMap.keys();
|
|
20
|
-
}
|
|
21
|
-
getKeyBefore(key) {
|
|
22
|
-
let node = this.keyMap.get(key);
|
|
23
|
-
var _node_prevKey;
|
|
24
|
-
return node ? (_node_prevKey = node.prevKey) !== null && _node_prevKey !== void 0 ? _node_prevKey : null : null;
|
|
25
|
-
}
|
|
26
|
-
getKeyAfter(key) {
|
|
27
|
-
let node = this.keyMap.get(key);
|
|
28
|
-
var _node_nextKey;
|
|
29
|
-
return node ? (_node_nextKey = node.nextKey) !== null && _node_nextKey !== void 0 ? _node_nextKey : null : null;
|
|
30
|
-
}
|
|
31
|
-
getFirstKey() {
|
|
32
|
-
return this.firstKey;
|
|
33
|
-
}
|
|
34
|
-
getLastKey() {
|
|
35
|
-
return this.lastKey;
|
|
36
|
-
}
|
|
37
|
-
getItem(key) {
|
|
38
|
-
var _this_keyMap_get;
|
|
39
|
-
return (_this_keyMap_get = this.keyMap.get(key)) !== null && _this_keyMap_get !== void 0 ? _this_keyMap_get : null;
|
|
40
|
-
}
|
|
41
|
-
at(idx) {
|
|
42
|
-
const keys = [...this.getKeys()];
|
|
43
|
-
return this.getItem(keys[idx]);
|
|
44
|
-
}
|
|
45
|
-
getChildren(key) {
|
|
46
|
-
let node = this.keyMap.get(key);
|
|
47
|
-
return (node === null || node === void 0 ? void 0 : node.childNodes) || [];
|
|
48
|
-
}
|
|
49
|
-
constructor(nodes) {
|
|
50
|
-
this.keyMap = new Map();
|
|
51
|
-
this.firstKey = null;
|
|
52
|
-
this.lastKey = null;
|
|
53
|
-
this.iterable = nodes;
|
|
54
|
-
let visit = (node) => {
|
|
55
|
-
this.keyMap.set(node.key, node);
|
|
56
|
-
if (node.childNodes && node.type === "section") for (let child of node.childNodes) visit(child);
|
|
57
|
-
};
|
|
58
|
-
for (let node of nodes) visit(node);
|
|
59
|
-
let last = null;
|
|
60
|
-
let index = 0;
|
|
61
|
-
let size = 0;
|
|
62
|
-
for (let [key, node] of this.keyMap) {
|
|
63
|
-
if (last) {
|
|
64
|
-
last.nextKey = key;
|
|
65
|
-
node.prevKey = last.key;
|
|
66
|
-
} else {
|
|
67
|
-
this.firstKey = key;
|
|
68
|
-
node.prevKey = void 0;
|
|
69
|
-
}
|
|
70
|
-
if (node.type === "item") node.index = index++;
|
|
71
|
-
if (node.type === "section" || node.type === "item") size++;
|
|
72
|
-
last = node;
|
|
73
|
-
last.nextKey = void 0;
|
|
74
|
-
}
|
|
75
|
-
this._size = size;
|
|
76
|
-
var _last_key;
|
|
77
|
-
this.lastKey = (_last_key = last === null || last === void 0 ? void 0 : last.key) !== null && _last_key !== void 0 ? _last_key : null;
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
//#endregion
|
|
81
|
-
//#region node_modules/@react-stately/list/dist/useListState.mjs
|
|
82
|
-
function $e72dd72e1c76a225$export$2f645645f7bca764(props) {
|
|
83
|
-
let { filter, layoutDelegate } = props;
|
|
84
|
-
let selectionState = $7af3f5b51489e0b5$export$253fe78d46329472(props);
|
|
85
|
-
let disabledKeys = useMemo(() => props.disabledKeys ? new Set(props.disabledKeys) : new Set(), [props.disabledKeys]);
|
|
86
|
-
let collection = $7613b1592d41b092$export$6cd28814d92fa9c9(props, useCallback((nodes) => filter ? new $a02d57049d202695$export$d085fb9e920b5ca7(filter(nodes)) : new $a02d57049d202695$export$d085fb9e920b5ca7(nodes), [filter]), useMemo(() => ({ suppressTextValueWarning: props.suppressTextValueWarning }), [props.suppressTextValueWarning]));
|
|
87
|
-
let selectionManager = useMemo(() => new $d496c0a20b6e58ec$export$6c8a5aaad13c9852(collection, selectionState, { layoutDelegate }), [
|
|
88
|
-
collection,
|
|
89
|
-
selectionState,
|
|
90
|
-
layoutDelegate
|
|
91
|
-
]);
|
|
92
|
-
$e72dd72e1c76a225$var$useFocusedKeyReset(collection, selectionManager);
|
|
93
|
-
return {
|
|
94
|
-
collection,
|
|
95
|
-
disabledKeys,
|
|
96
|
-
selectionManager
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
function $e72dd72e1c76a225$export$ba9d38c0f1bf2b36(state, filterFn) {
|
|
100
|
-
let collection = useMemo(() => filterFn ? state.collection.filter(filterFn) : state.collection, [state.collection, filterFn]);
|
|
101
|
-
let selectionManager = state.selectionManager.withCollection(collection);
|
|
102
|
-
$e72dd72e1c76a225$var$useFocusedKeyReset(collection, selectionManager);
|
|
103
|
-
return {
|
|
104
|
-
collection,
|
|
105
|
-
selectionManager,
|
|
106
|
-
disabledKeys: state.disabledKeys
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
function $e72dd72e1c76a225$var$useFocusedKeyReset(collection, selectionManager) {
|
|
110
|
-
const cachedCollection = useRef(null);
|
|
111
|
-
useEffect(() => {
|
|
112
|
-
if (selectionManager.focusedKey != null && !collection.getItem(selectionManager.focusedKey) && cachedCollection.current) {
|
|
113
|
-
const startItem = cachedCollection.current.getItem(selectionManager.focusedKey);
|
|
114
|
-
const cachedItemNodes = [...cachedCollection.current.getKeys()].map((key) => {
|
|
115
|
-
const itemNode = cachedCollection.current.getItem(key);
|
|
116
|
-
return (itemNode === null || itemNode === void 0 ? void 0 : itemNode.type) === "item" ? itemNode : null;
|
|
117
|
-
}).filter((node) => node !== null);
|
|
118
|
-
const itemNodes = [...collection.getKeys()].map((key) => {
|
|
119
|
-
const itemNode = collection.getItem(key);
|
|
120
|
-
return (itemNode === null || itemNode === void 0 ? void 0 : itemNode.type) === "item" ? itemNode : null;
|
|
121
|
-
}).filter((node) => node !== null);
|
|
122
|
-
var _cachedItemNodes_length, _itemNodes_length;
|
|
123
|
-
const diff = ((_cachedItemNodes_length = cachedItemNodes === null || cachedItemNodes === void 0 ? void 0 : cachedItemNodes.length) !== null && _cachedItemNodes_length !== void 0 ? _cachedItemNodes_length : 0) - ((_itemNodes_length = itemNodes === null || itemNodes === void 0 ? void 0 : itemNodes.length) !== null && _itemNodes_length !== void 0 ? _itemNodes_length : 0);
|
|
124
|
-
var _startItem_index, _startItem_index1, _itemNodes_length1;
|
|
125
|
-
let index = Math.min(diff > 1 ? Math.max(((_startItem_index = startItem === null || startItem === void 0 ? void 0 : startItem.index) !== null && _startItem_index !== void 0 ? _startItem_index : 0) - diff + 1, 0) : (_startItem_index1 = startItem === null || startItem === void 0 ? void 0 : startItem.index) !== null && _startItem_index1 !== void 0 ? _startItem_index1 : 0, ((_itemNodes_length1 = itemNodes === null || itemNodes === void 0 ? void 0 : itemNodes.length) !== null && _itemNodes_length1 !== void 0 ? _itemNodes_length1 : 0) - 1);
|
|
126
|
-
let newNode = null;
|
|
127
|
-
let isReverseSearching = false;
|
|
128
|
-
while (index >= 0) {
|
|
129
|
-
if (!selectionManager.isDisabled(itemNodes[index].key)) {
|
|
130
|
-
newNode = itemNodes[index];
|
|
131
|
-
break;
|
|
132
|
-
}
|
|
133
|
-
if (index < itemNodes.length - 1 && !isReverseSearching) index++;
|
|
134
|
-
else {
|
|
135
|
-
isReverseSearching = true;
|
|
136
|
-
var _startItem_index2, _startItem_index3;
|
|
137
|
-
if (index > ((_startItem_index2 = startItem === null || startItem === void 0 ? void 0 : startItem.index) !== null && _startItem_index2 !== void 0 ? _startItem_index2 : 0)) index = (_startItem_index3 = startItem === null || startItem === void 0 ? void 0 : startItem.index) !== null && _startItem_index3 !== void 0 ? _startItem_index3 : 0;
|
|
138
|
-
index--;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
selectionManager.setFocusedKey(newNode ? newNode.key : null);
|
|
142
|
-
}
|
|
143
|
-
cachedCollection.current = collection;
|
|
144
|
-
}, [collection, selectionManager]);
|
|
145
|
-
}
|
|
146
|
-
//#endregion
|
|
147
|
-
export { $cdc5a6778b766db2$export$a9d04c5684123369 as i, $e72dd72e1c76a225$export$ba9d38c0f1bf2b36 as n, $a02d57049d202695$export$d085fb9e920b5ca7 as r, $e72dd72e1c76a225$export$2f645645f7bca764 as t };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { t as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-C-XNeJ_l.js";
|
|
2
|
-
import { t as $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5 } from "./NumberFormatter-m5VW6MTK.js";
|
|
3
|
-
import { useMemo } from "react";
|
|
4
|
-
//#region node_modules/@react-aria/i18n/dist/useNumberFormatter.mjs
|
|
5
|
-
function $a916eb452884faea$export$b7a616150fdb9f44(options = {}) {
|
|
6
|
-
let { locale } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
|
|
7
|
-
return useMemo(() => new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(locale, options), [locale, options]);
|
|
8
|
-
}
|
|
9
|
-
//#endregion
|
|
10
|
-
export { $a916eb452884faea$export$b7a616150fdb9f44 as t };
|