@eightshift/ui-components 1.7.2 → 1.8.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-VbCAu4hd.js → Button-Xa6Ny0p_.js} +7 -7
- package/dist/{Color-BpLubxWI.js → Color-VsesNqCf.js} +5 -17
- package/dist/{ColorSwatch-CinC14s3.js → ColorSwatch-xOFAZO_h.js} +4 -4
- package/dist/ComboBox-CP_SqnqT.js +1886 -0
- package/dist/Dialog-jcIYer1n.js +2177 -0
- package/dist/{FieldError-BttM1Nxd.js → FieldError-BPe3YgNH.js} +2 -2
- package/dist/{FocusScope-CtCX0OGo.js → FocusScope-uV-xoRHT.js} +8 -9
- package/dist/{Group-XzWUooix.js → Group-Bvmb49y7.js} +5 -5
- package/dist/{Heading-DZelepHV.js → Heading-Bfhyr4ZC.js} +1 -1
- package/dist/{Hidden-CcFqOzrp.js → Hidden-7ZhNuLM9.js} +2 -2
- package/dist/{Input-CV1qVS6t.js → Input-C2dTSp9z.js} +10 -10
- package/dist/{Label-BwqMVkuV.js → Label-DqNX_sAU.js} +2 -2
- package/dist/{List-Bx2anbX-.js → List-C7L49CxW.js} +1 -1
- package/dist/{ListBox-DuZPdnkk.js → ListBox-B9r1QoSm.js} +19 -18
- package/dist/{NumberFormatter-U_Gx0UDq.js → NumberFormatter-DA8u1Ot7.js} +4 -6
- package/dist/OverlayArrow-ClRhYjQu.js +567 -0
- package/dist/{Select-c7902d94.esm-DtzFQzf-.js → Select-aab027f3.esm-B8nEum75.js} +4 -4
- package/dist/{SelectionManager-x27KqnAT.js → SelectionManager-DP537Pbu.js} +177 -141
- package/dist/{Separator-BM58t3PP.js → Separator-Dmxzf3m_.js} +62 -52
- package/dist/{Slider-D9Cs6yKr.js → Slider-BgHBCyI7.js} +16 -14
- package/dist/{Text-BVIXT8qq.js → Text-DImhB4rT.js} +1 -1
- package/dist/{VisuallyHidden-WhC7vZaL.js → VisuallyHidden-wryJF4qQ.js} +2 -2
- package/dist/assets/style.css +1 -1
- package/dist/assets/wp-ui-enhancements.css +1 -1
- package/dist/components/animated-visibility/animated-visibility.js +141 -113
- package/dist/components/base-control/base-control.js +1 -1
- package/dist/components/button/button.js +10 -7
- package/dist/components/checkbox/checkbox.js +19 -11
- package/dist/components/color-pickers/color-picker.js +1 -1
- package/dist/components/color-pickers/color-swatch.js +3 -3
- package/dist/components/color-pickers/gradient-editor.js +2 -2
- package/dist/components/color-pickers/solid-color-picker.js +21 -21
- package/dist/components/component-toggle/component-toggle.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/draggable-list/draggable-list.js +2 -2
- package/dist/components/expandable/expandable.js +3 -3
- package/dist/components/index.js +8 -4
- package/dist/components/input-field/input-field.js +7 -7
- package/dist/components/item-collection/item-collection.js +1 -1
- package/dist/components/link-input/link-input.js +10 -1872
- package/dist/components/list-box/list-box.js +2 -2
- package/dist/components/matrix-align/matrix-align.js +2 -2
- package/dist/components/menu/menu.js +7 -974
- package/dist/components/modal/modal.js +7 -7
- package/dist/components/number-picker/number-picker.js +10 -10
- package/dist/components/option-select/option-select.js +1 -1
- package/dist/components/options-panel/options-panel.js +1 -1
- package/dist/components/placeholders/file-placeholder.js +1 -1
- package/dist/components/popover/popover.js +2 -2
- package/dist/components/radio/radio.js +13 -13
- package/dist/components/repeater/repeater-item.js +1 -1
- package/dist/components/repeater/repeater.js +2 -2
- package/dist/components/responsive/mini-responsive.js +3 -3
- package/dist/components/responsive/responsive-legacy.js +2 -2
- package/dist/components/responsive/responsive.js +2 -2
- package/dist/components/responsive-preview/responsive-preview.js +1 -1
- 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 +1 -1
- package/dist/components/select/multi-select-components.js +1 -1
- package/dist/components/select/multi-select.js +3 -3
- package/dist/components/select/react-select-component-wrappers.js +1 -1
- package/dist/components/select/single-select.js +2 -2
- package/dist/components/select/v2/async-select.js +307 -0
- package/dist/components/select/v2/shared.js +24 -0
- package/dist/components/select/v2/single-select.js +993 -0
- package/dist/components/slider/column-config-slider.js +3 -3
- package/dist/components/slider/slider.js +3 -3
- package/dist/components/slider/utils.js +1 -1
- package/dist/components/tabs/tabs.js +16 -16
- package/dist/components/toggle/switch.js +6 -6
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +55 -12
- package/dist/components/tooltip/tooltip.js +532 -8
- package/dist/{context-Cs-ZD1nu.js → context-BI3VdU0Z.js} +2 -2
- package/dist/{default-i18n-DRnM8y4w.js → default-i18n-CM1-Xvzf.js} +183 -176
- package/dist/{focusSafely-CgFLw4FA.js → focusSafely-Cl9cN7Qx.js} +14 -14
- package/dist/icons/icons.js +19 -0
- package/dist/icons/jsx-svg.js +16 -3
- package/dist/{index-a301f526.esm-BMg114iK.js → index-641ee5b8.esm-BclOH4xf.js} +165 -29
- package/dist/{index-BTCzc3zb.js → index-D0mHceYg.js} +81 -17
- package/dist/index.js +7 -3
- package/dist/{multi-select-components-DTvEidE3.js → multi-select-components-BGQBvx-z.js} +55 -44
- package/dist/{react-jsx-parser.min-B5HVwW_W.js → react-jsx-parser.min-CVit0rZn.js} +5620 -7409
- package/dist/{react-select-async.esm-CxA8wpeT.js → react-select-async.esm-B8kK0aL4.js} +3 -3
- package/dist/{react-select.esm-CeE7o5M9.js → react-select.esm-ucYwBxq5.js} +3 -3
- package/dist/{textSelection-CvK0YHTZ.js → textSelection-DDDNsS-g.js} +1 -1
- package/dist/{useButton-Cy9eEev7.js → useButton-CRKy9xk2.js} +4 -4
- package/dist/{useEvent-LZebwyrb.js → useEvent-D54lIBrO.js} +1 -1
- package/dist/{useFocusRing-BMOTWmOx.js → useFocusRing-DKxoCzVD.js} +1 -1
- package/dist/{useFocusable-ByyKSVQv.js → useFocusable-CPKTGWPn.js} +4 -4
- package/dist/{useFormReset-B8m1uz1J.js → useFormReset-CTp--h9B.js} +1 -1
- package/dist/{useFormValidationState-BjMhz_VI.js → useFormValidation-BNBrliSj.js} +92 -88
- package/dist/{useLabel-B6uO0wVK.js → useLabel-CzGdEzIq.js} +2 -2
- package/dist/{useLabels-5dFkeiXx.js → useLabels-eGSmZC_Z.js} +1 -1
- package/dist/{useListState-eKxv7HPC.js → useListState-D7mE1Y00.js} +1 -1
- package/dist/{useLocalizedStringFormatter-BaKmjFNp.js → useLocalizedStringFormatter-BBeUyA9l.js} +1 -1
- package/dist/{useNumberField-DMMUTZ-h.js → useNumberField-BmEJmL3K.js} +27 -20
- package/dist/{useNumberFormatter-Cyx5Dxkf.js → useNumberFormatter-CTY_UZxq.js} +2 -2
- package/dist/{usePress-D8nPoIQm.js → usePress-BG9At5Lb.js} +4 -4
- package/dist/{useSingleSelectListState-CABciySJ.js → useSingleSelectListState-DeJEr7lC.js} +2 -2
- package/dist/{useToggle-BmltE9Zr.js → useToggle-QlyoyPYv.js} +4 -4
- package/dist/{useToggleState-DZXLEnA_.js → useToggleState-C1mnFRiI.js} +1 -1
- package/dist/{utils-BCJajCwh.js → utils-BSxcP7tv.js} +15 -14
- package/package.json +20 -20
- package/dist/Dialog-BN5EE7UH.js +0 -934
- package/dist/isScrollable-Dh9D9IOd.js +0 -9
- package/dist/tooltip-eKaARDoV.js +0 -1084
- package/dist/useMenuTrigger-4fwEmto8.js +0 -246
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $ as $
|
|
3
|
-
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-Cs-ZD1nu.js";
|
|
1
|
+
import { j as $cc38e7bd3fc7b213$export$2bb74740c4e19def, k as $ae20dd8cbca75726$export$d6daf82dcd84e87c, l as $c5a24bc478652b5f$export$1005530eda016c13, e as $e1995378a142960e$export$18af5c7a9e9b3664 } from "./SelectionManager-DP537Pbu.js";
|
|
2
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-BI3VdU0Z.js";
|
|
4
3
|
import React__default, { useMemo, createContext } from "react";
|
|
5
|
-
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415 } from "./utils-
|
|
4
|
+
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415 } from "./utils-BSxcP7tv.js";
|
|
6
5
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.js";
|
|
7
6
|
let $325a3faab7a68acd$var$cache = /* @__PURE__ */ new Map();
|
|
8
7
|
function $325a3faab7a68acd$export$a16aca283550c30d(options) {
|
|
@@ -16,6 +15,7 @@ function $325a3faab7a68acd$export$a16aca283550c30d(options) {
|
|
|
16
15
|
class $657e4dc4a6e88df0$export$8f5ed9ff9f511381 {
|
|
17
16
|
getItemRect(key) {
|
|
18
17
|
let container = this.ref.current;
|
|
18
|
+
if (!container) return null;
|
|
19
19
|
let item = key != null ? container.querySelector(`[data-key="${CSS.escape(key.toString())}"]`) : null;
|
|
20
20
|
if (!item) return null;
|
|
21
21
|
let containerRect = container.getBoundingClientRect();
|
|
@@ -29,18 +29,20 @@ class $657e4dc4a6e88df0$export$8f5ed9ff9f511381 {
|
|
|
29
29
|
}
|
|
30
30
|
getContentSize() {
|
|
31
31
|
let container = this.ref.current;
|
|
32
|
+
var _container_scrollWidth, _container_scrollHeight;
|
|
32
33
|
return {
|
|
33
|
-
width: container.scrollWidth,
|
|
34
|
-
height: container.scrollHeight
|
|
34
|
+
width: (_container_scrollWidth = container === null || container === void 0 ? void 0 : container.scrollWidth) !== null && _container_scrollWidth !== void 0 ? _container_scrollWidth : 0,
|
|
35
|
+
height: (_container_scrollHeight = container === null || container === void 0 ? void 0 : container.scrollHeight) !== null && _container_scrollHeight !== void 0 ? _container_scrollHeight : 0
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
38
|
getVisibleRect() {
|
|
38
39
|
let container = this.ref.current;
|
|
40
|
+
var _container_scrollLeft, _container_scrollTop, _container_offsetWidth, _container_offsetHeight;
|
|
39
41
|
return {
|
|
40
|
-
x: container.scrollLeft,
|
|
41
|
-
y: container.scrollTop,
|
|
42
|
-
width: container.offsetWidth,
|
|
43
|
-
height: container.offsetHeight
|
|
42
|
+
x: (_container_scrollLeft = container === null || container === void 0 ? void 0 : container.scrollLeft) !== null && _container_scrollLeft !== void 0 ? _container_scrollLeft : 0,
|
|
43
|
+
y: (_container_scrollTop = container === null || container === void 0 ? void 0 : container.scrollTop) !== null && _container_scrollTop !== void 0 ? _container_scrollTop : 0,
|
|
44
|
+
width: (_container_offsetWidth = container === null || container === void 0 ? void 0 : container.offsetWidth) !== null && _container_offsetWidth !== void 0 ? _container_offsetWidth : 0,
|
|
45
|
+
height: (_container_offsetHeight = container === null || container === void 0 ? void 0 : container.offsetHeight) !== null && _container_offsetHeight !== void 0 ? _container_offsetHeight : 0
|
|
44
46
|
};
|
|
45
47
|
}
|
|
46
48
|
constructor(ref) {
|
|
@@ -53,30 +55,35 @@ class $2a25aae57d74318e$export$a05409b8bb224a5a {
|
|
|
53
55
|
return this.disabledBehavior === "all" && (((_item_props = item.props) === null || _item_props === void 0 ? void 0 : _item_props.isDisabled) || this.disabledKeys.has(item.key));
|
|
54
56
|
}
|
|
55
57
|
findNextNonDisabled(key, getNext) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
let nextKey = key;
|
|
59
|
+
while (nextKey != null) {
|
|
60
|
+
let item = this.collection.getItem(nextKey);
|
|
61
|
+
if ((item === null || item === void 0 ? void 0 : item.type) === "item" && !this.isDisabled(item)) return nextKey;
|
|
62
|
+
nextKey = getNext(nextKey);
|
|
60
63
|
}
|
|
61
64
|
return null;
|
|
62
65
|
}
|
|
63
66
|
getNextKey(key) {
|
|
64
|
-
|
|
65
|
-
|
|
67
|
+
let nextKey = key;
|
|
68
|
+
nextKey = this.collection.getKeyAfter(nextKey);
|
|
69
|
+
return this.findNextNonDisabled(nextKey, (key2) => this.collection.getKeyAfter(key2));
|
|
66
70
|
}
|
|
67
71
|
getPreviousKey(key) {
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
let nextKey = key;
|
|
73
|
+
nextKey = this.collection.getKeyBefore(nextKey);
|
|
74
|
+
return this.findNextNonDisabled(nextKey, (key2) => this.collection.getKeyBefore(key2));
|
|
70
75
|
}
|
|
71
76
|
findKey(key, nextKey, shouldSkip) {
|
|
72
|
-
let
|
|
73
|
-
|
|
77
|
+
let tempKey = key;
|
|
78
|
+
let itemRect = this.layoutDelegate.getItemRect(tempKey);
|
|
79
|
+
if (!itemRect || tempKey == null) return null;
|
|
74
80
|
let prevRect = itemRect;
|
|
75
81
|
do {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
82
|
+
tempKey = nextKey(tempKey);
|
|
83
|
+
if (tempKey == null) break;
|
|
84
|
+
itemRect = this.layoutDelegate.getItemRect(tempKey);
|
|
85
|
+
} while (itemRect && shouldSkip(prevRect, itemRect) && tempKey != null);
|
|
86
|
+
return tempKey;
|
|
80
87
|
}
|
|
81
88
|
isSameRow(prevRect, itemRect) {
|
|
82
89
|
return prevRect.y === itemRect.y || prevRect.x !== itemRect.x;
|
|
@@ -131,41 +138,43 @@ class $2a25aae57d74318e$export$a05409b8bb224a5a {
|
|
|
131
138
|
let menu = this.ref.current;
|
|
132
139
|
let itemRect = this.layoutDelegate.getItemRect(key);
|
|
133
140
|
if (!itemRect) return null;
|
|
134
|
-
if (!$cc38e7bd3fc7b213$export$2bb74740c4e19def(menu)) return this.getFirstKey();
|
|
141
|
+
if (menu && !$cc38e7bd3fc7b213$export$2bb74740c4e19def(menu)) return this.getFirstKey();
|
|
142
|
+
let nextKey = key;
|
|
135
143
|
if (this.orientation === "horizontal") {
|
|
136
144
|
let pageX = Math.max(0, itemRect.x + itemRect.width - this.layoutDelegate.getVisibleRect().width);
|
|
137
|
-
while (itemRect && itemRect.x > pageX) {
|
|
138
|
-
|
|
139
|
-
itemRect =
|
|
145
|
+
while (itemRect && itemRect.x > pageX && nextKey != null) {
|
|
146
|
+
nextKey = this.getKeyAbove(nextKey);
|
|
147
|
+
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
140
148
|
}
|
|
141
149
|
} else {
|
|
142
150
|
let pageY = Math.max(0, itemRect.y + itemRect.height - this.layoutDelegate.getVisibleRect().height);
|
|
143
|
-
while (itemRect && itemRect.y > pageY) {
|
|
144
|
-
|
|
145
|
-
itemRect =
|
|
151
|
+
while (itemRect && itemRect.y > pageY && nextKey != null) {
|
|
152
|
+
nextKey = this.getKeyAbove(nextKey);
|
|
153
|
+
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
146
154
|
}
|
|
147
155
|
}
|
|
148
|
-
return
|
|
156
|
+
return nextKey !== null && nextKey !== void 0 ? nextKey : this.getFirstKey();
|
|
149
157
|
}
|
|
150
158
|
getKeyPageBelow(key) {
|
|
151
159
|
let menu = this.ref.current;
|
|
152
160
|
let itemRect = this.layoutDelegate.getItemRect(key);
|
|
153
161
|
if (!itemRect) return null;
|
|
154
|
-
if (!$cc38e7bd3fc7b213$export$2bb74740c4e19def(menu)) return this.getLastKey();
|
|
162
|
+
if (menu && !$cc38e7bd3fc7b213$export$2bb74740c4e19def(menu)) return this.getLastKey();
|
|
163
|
+
let nextKey = key;
|
|
155
164
|
if (this.orientation === "horizontal") {
|
|
156
165
|
let pageX = Math.min(this.layoutDelegate.getContentSize().width, itemRect.y - itemRect.width + this.layoutDelegate.getVisibleRect().width);
|
|
157
|
-
while (itemRect && itemRect.x < pageX) {
|
|
158
|
-
|
|
159
|
-
itemRect =
|
|
166
|
+
while (itemRect && itemRect.x < pageX && nextKey != null) {
|
|
167
|
+
nextKey = this.getKeyBelow(nextKey);
|
|
168
|
+
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
160
169
|
}
|
|
161
170
|
} else {
|
|
162
171
|
let pageY = Math.min(this.layoutDelegate.getContentSize().height, itemRect.y - itemRect.height + this.layoutDelegate.getVisibleRect().height);
|
|
163
|
-
while (itemRect && itemRect.y < pageY) {
|
|
164
|
-
|
|
165
|
-
itemRect =
|
|
172
|
+
while (itemRect && itemRect.y < pageY && nextKey != null) {
|
|
173
|
+
nextKey = this.getKeyBelow(nextKey);
|
|
174
|
+
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
166
175
|
}
|
|
167
176
|
}
|
|
168
|
-
return
|
|
177
|
+
return nextKey !== null && nextKey !== void 0 ? nextKey : this.getLastKey();
|
|
169
178
|
}
|
|
170
179
|
getKeyForSearch(search, fromKey) {
|
|
171
180
|
if (!this.collator) return null;
|
|
@@ -173,6 +182,7 @@ class $2a25aae57d74318e$export$a05409b8bb224a5a {
|
|
|
173
182
|
let key = fromKey || this.getFirstKey();
|
|
174
183
|
while (key != null) {
|
|
175
184
|
let item = collection.getItem(key);
|
|
185
|
+
if (!item) return null;
|
|
176
186
|
let substring = item.textValue.slice(0, search.length);
|
|
177
187
|
if (item.textValue && this.collator.compare(substring, search) === 0) return key;
|
|
178
188
|
key = this.getNextKey(key);
|
|
@@ -244,14 +254,14 @@ const $453cc9f0df89c0a5$var$cache = /* @__PURE__ */ new WeakMap();
|
|
|
244
254
|
function $453cc9f0df89c0a5$export$77d5aafae4e095b2(collection) {
|
|
245
255
|
let count = $453cc9f0df89c0a5$var$cache.get(collection);
|
|
246
256
|
if (count != null) return count;
|
|
247
|
-
|
|
257
|
+
let counter = 0;
|
|
248
258
|
let countItems = (items) => {
|
|
249
259
|
for (let item of items) if (item.type === "section") countItems($c5a24bc478652b5f$export$1005530eda016c13(item, collection));
|
|
250
|
-
else
|
|
260
|
+
else counter++;
|
|
251
261
|
};
|
|
252
262
|
countItems(collection);
|
|
253
|
-
$453cc9f0df89c0a5$var$cache.set(collection,
|
|
254
|
-
return
|
|
263
|
+
$453cc9f0df89c0a5$var$cache.set(collection, counter);
|
|
264
|
+
return counter;
|
|
255
265
|
}
|
|
256
266
|
function $f4b273590fab9f93$export$52210f68a14655d0(props) {
|
|
257
267
|
let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
@@ -299,12 +309,12 @@ const $431f98aba6844401$export$1ff3c3f08ae963c0 = /* @__PURE__ */ $e1995378a1429
|
|
|
299
309
|
});
|
|
300
310
|
});
|
|
301
311
|
export {
|
|
302
|
-
$
|
|
303
|
-
$
|
|
304
|
-
$
|
|
305
|
-
$
|
|
306
|
-
$
|
|
307
|
-
$
|
|
308
|
-
$
|
|
309
|
-
$
|
|
312
|
+
$72a5793c14baf454$export$8b251419efc915eb as $,
|
|
313
|
+
$431f98aba6844401$export$1ff3c3f08ae963c0 as a,
|
|
314
|
+
$982254629710d113$export$b95089534ab7c1fd as b,
|
|
315
|
+
$453cc9f0df89c0a5$export$77d5aafae4e095b2 as c,
|
|
316
|
+
$325a3faab7a68acd$export$a16aca283550c30d as d,
|
|
317
|
+
$2a25aae57d74318e$export$a05409b8bb224a5a as e,
|
|
318
|
+
$431f98aba6844401$export$6615d83f6de245ce as f,
|
|
319
|
+
$72a5793c14baf454$export$e0e4026c12a8bdbb as g
|
|
310
320
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "./Label-
|
|
1
|
+
import { g as $8ae05eaa5c114e9c$export$7f54fc3180508a52, d as $3ef42575df84b30b$export$9d1611c77c2fe928, a as $64fa3d84918910a7$export$29f1550f4b0d4415, h as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, b as $64fa3d84918910a7$export$4d86445c2cf5e3, j as $64fa3d84918910a7$export$2881499e37b75b9a, $ as $64fa3d84918910a7$export$fabf2dc03a41866e } from "./utils-BSxcP7tv.js";
|
|
2
|
+
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "./Label-DqNX_sAU.js";
|
|
3
3
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.js";
|
|
4
4
|
import React__default, { useRef, useMemo, useCallback, useState, useEffect, createContext, forwardRef, useContext } from "react";
|
|
5
|
-
import { $ as $a916eb452884faea$export$b7a616150fdb9f44 } from "./useNumberFormatter-
|
|
6
|
-
import { e as $458b0a5536c1a7cf$export$40bfa8c7b0832715, i as $507fabe10e71c6fb$export$8397ddfc504fdb9a,
|
|
5
|
+
import { $ as $a916eb452884faea$export$b7a616150fdb9f44 } from "./useNumberFormatter-CTY_UZxq.js";
|
|
6
|
+
import { e as $458b0a5536c1a7cf$export$40bfa8c7b0832715, i as $507fabe10e71c6fb$export$8397ddfc504fdb9a, n as $7215afc6de606d6b$export$de79e2c695e052f3, $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "./focusSafely-Cl9cN7Qx.js";
|
|
7
7
|
import { $ as $9446cca9a3875146$export$cb6e0bb50bc19463, a as $9446cca9a3875146$export$7d15b64cf5a3a4c4 } from "./number-GajL10e1.js";
|
|
8
|
-
import { $ as $03deb23ff14920c4$export$4eaf04e54aa8eed6, a as $14c0b72509d70225$export$b0d6fa1ab32e3295, b as $14c0b72509d70225$export$16a4697467175487 } from "./textSelection-
|
|
9
|
-
import { $ as $d191a55c9702f145$export$8467354a121f1b9f } from "./useLabel-
|
|
10
|
-
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-
|
|
11
|
-
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-
|
|
12
|
-
import {
|
|
13
|
-
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-
|
|
14
|
-
import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "./VisuallyHidden-
|
|
8
|
+
import { $ as $03deb23ff14920c4$export$4eaf04e54aa8eed6, a as $14c0b72509d70225$export$b0d6fa1ab32e3295, b as $14c0b72509d70225$export$16a4697467175487 } from "./textSelection-DDDNsS-g.js";
|
|
9
|
+
import { $ as $d191a55c9702f145$export$8467354a121f1b9f } from "./useLabel-CzGdEzIq.js";
|
|
10
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-BI3VdU0Z.js";
|
|
11
|
+
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-CTp--h9B.js";
|
|
12
|
+
import { b as $46d819fcbaf35654$export$8f71654801c2f7cd, $ as $e6afbd83fe6ebbd2$export$4c014de7c8940b4c } from "./useFocusable-CPKTGWPn.js";
|
|
13
|
+
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-DKxoCzVD.js";
|
|
14
|
+
import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "./VisuallyHidden-wryJF4qQ.js";
|
|
15
15
|
function $e8a7022cf87cba2a$export$36da96379f79f245(props) {
|
|
16
16
|
let { onMoveStart, onMove, onMoveEnd } = props;
|
|
17
17
|
let state = useRef({
|
|
@@ -234,8 +234,8 @@ function $28f99e3e86e6ec45$export$e5fda3247f5d67f9(props) {
|
|
|
234
234
|
minValue
|
|
235
235
|
]);
|
|
236
236
|
let restrictValues = useCallback((values2) => values2 === null || values2 === void 0 ? void 0 : values2.map((val, idx) => {
|
|
237
|
-
let min = idx === 0 ? minValue :
|
|
238
|
-
let max = idx === values2.length - 1 ? maxValue :
|
|
237
|
+
let min = idx === 0 ? minValue : values2[idx - 1];
|
|
238
|
+
let max = idx === values2.length - 1 ? maxValue : values2[idx + 1];
|
|
239
239
|
return $9446cca9a3875146$export$cb6e0bb50bc19463(val, min, max, step);
|
|
240
240
|
}), [
|
|
241
241
|
minValue,
|
|
@@ -393,9 +393,10 @@ function $bcca50147b47f54d$export$56b2c08e277f365(props, state, trackRef) {
|
|
|
393
393
|
currentPosition.current = null;
|
|
394
394
|
},
|
|
395
395
|
onMove({ deltaX, deltaY }) {
|
|
396
|
+
if (!trackRef.current) return;
|
|
396
397
|
let { height, width } = trackRef.current.getBoundingClientRect();
|
|
397
398
|
let size = isVertical ? height : width;
|
|
398
|
-
if (currentPosition.current == null) currentPosition.current = state.getThumbPercent(realTimeTrackDraggingIndex.current) * size;
|
|
399
|
+
if (currentPosition.current == null && realTimeTrackDraggingIndex.current != null) currentPosition.current = state.getThumbPercent(realTimeTrackDraggingIndex.current) * size;
|
|
399
400
|
let delta = isVertical ? deltaY : deltaX;
|
|
400
401
|
if (isVertical || reverseX) delta = -delta;
|
|
401
402
|
currentPosition.current += delta;
|
|
@@ -560,6 +561,7 @@ function $47b897dc8cdb026b$export$8d15029008292ae(opts, state) {
|
|
|
560
561
|
},
|
|
561
562
|
onMove({ deltaX, deltaY, pointerType, shiftKey }) {
|
|
562
563
|
const { getThumbPercent, setThumbPercent, decrementThumb, incrementThumb, step, pageSize } = state;
|
|
564
|
+
if (!trackRef.current) return;
|
|
563
565
|
let { width, height } = trackRef.current.getBoundingClientRect();
|
|
564
566
|
let size = isVertical ? height : width;
|
|
565
567
|
if (currentPosition.current == null) currentPosition.current = getThumbPercent(index) * size;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415 } from "./utils-
|
|
1
|
+
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415 } from "./utils-BSxcP7tv.js";
|
|
2
2
|
import React__default, { forwardRef, createContext } from "react";
|
|
3
3
|
const $514c0188e459b4c0$export$9afb8bc826b033ea = /* @__PURE__ */ createContext({});
|
|
4
4
|
function $514c0188e459b4c0$var$Text(props, ref) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-BSxcP7tv.js";
|
|
2
2
|
import React__default, { useState, useMemo } from "react";
|
|
3
|
-
import { d as $9ab94262bd0047c7$export$420e68273165f4ec } from "./focusSafely-
|
|
3
|
+
import { d as $9ab94262bd0047c7$export$420e68273165f4ec } from "./focusSafely-Cl9cN7Qx.js";
|
|
4
4
|
const $5c3e21d68f1c4674$var$styles = {
|
|
5
5
|
border: 0,
|
|
6
6
|
clip: "rect(0 0 0 0)",
|