@eightshift/ui-components 1.7.2 → 1.9.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.
Files changed (113) hide show
  1. package/dist/{Button-VbCAu4hd.js → Button-BMFbEXg1.js} +7 -7
  2. package/dist/{Color-BpLubxWI.js → Color-B-cqXgPz.js} +5 -17
  3. package/dist/{ColorSwatch-CinC14s3.js → ColorSwatch-B6s54Jb3.js} +4 -4
  4. package/dist/ComboBox-VR9-vNZv.js +1886 -0
  5. package/dist/Dialog-BlYTPzgB.js +2177 -0
  6. package/dist/{FieldError-BttM1Nxd.js → FieldError-DKicm3R0.js} +2 -2
  7. package/dist/{FocusScope-CtCX0OGo.js → FocusScope-EoLYfbMp.js} +11 -12
  8. package/dist/{Group-XzWUooix.js → Group-D96edUPC.js} +5 -5
  9. package/dist/{Heading-DZelepHV.js → Heading-GytTjUsy.js} +1 -1
  10. package/dist/{Hidden-CcFqOzrp.js → Hidden-D3hHnmPI.js} +2 -2
  11. package/dist/{Input-CV1qVS6t.js → Input-BXSxJ_44.js} +10 -10
  12. package/dist/{Label-BwqMVkuV.js → Label-BtoiUpt8.js} +2 -2
  13. package/dist/{List-Bx2anbX-.js → List-Ct3nzFZG.js} +1 -1
  14. package/dist/{ListBox-DuZPdnkk.js → ListBox-BMpo-Cem.js} +19 -18
  15. package/dist/{NumberFormatter-U_Gx0UDq.js → NumberFormatter-DA8u1Ot7.js} +4 -6
  16. package/dist/OverlayArrow-4epQ99-E.js +567 -0
  17. package/dist/{Select-c7902d94.esm-DtzFQzf-.js → Select-aab027f3.esm-C7BxKjSc.js} +4 -4
  18. package/dist/{SelectionManager-x27KqnAT.js → SelectionManager-D-89MUJW.js} +276 -291
  19. package/dist/{Separator-BM58t3PP.js → Separator-DUhFmbD-.js} +62 -52
  20. package/dist/{Slider-D9Cs6yKr.js → Slider-QNPrj4N9.js} +16 -14
  21. package/dist/{Text-BVIXT8qq.js → Text-DNDWaukZ.js} +1 -1
  22. package/dist/{VisuallyHidden-WhC7vZaL.js → VisuallyHidden-BHNhi-ls.js} +2 -2
  23. package/dist/assets/style.css +1 -1
  24. package/dist/assets/wp-ui-enhancements.css +1 -1
  25. package/dist/components/animated-visibility/animated-visibility.js +67 -7245
  26. package/dist/components/base-control/base-control.js +1 -1
  27. package/dist/components/button/button.js +10 -7
  28. package/dist/components/checkbox/checkbox.js +22 -13
  29. package/dist/components/color-pickers/color-picker.js +1 -1
  30. package/dist/components/color-pickers/color-swatch.js +3 -3
  31. package/dist/components/color-pickers/gradient-editor.js +2 -2
  32. package/dist/components/color-pickers/solid-color-picker.js +21 -21
  33. package/dist/components/component-toggle/component-toggle.js +1 -1
  34. package/dist/components/container-panel/container-panel.js +6 -4
  35. package/dist/components/draggable/draggable-handle.js +2 -2
  36. package/dist/components/draggable/draggable.js +2 -2
  37. package/dist/components/draggable-list/draggable-list-item.js +2 -2
  38. package/dist/components/draggable-list/draggable-list.js +2 -2
  39. package/dist/components/expandable/expandable.js +221 -26
  40. package/dist/components/index.js +8 -4
  41. package/dist/components/input-field/input-field.js +7 -7
  42. package/dist/components/item-collection/item-collection.js +1 -1
  43. package/dist/components/link-input/link-input.js +10 -1872
  44. package/dist/components/list-box/list-box.js +2 -2
  45. package/dist/components/matrix-align/matrix-align.js +2 -2
  46. package/dist/components/menu/menu.js +7 -974
  47. package/dist/components/modal/modal.js +7 -7
  48. package/dist/components/number-picker/number-picker.js +10 -10
  49. package/dist/components/option-select/option-select.js +1 -1
  50. package/dist/components/options-panel/options-panel.js +1 -1
  51. package/dist/components/placeholders/file-placeholder.js +1 -1
  52. package/dist/components/popover/popover.js +2 -2
  53. package/dist/components/radio/radio.js +13 -13
  54. package/dist/components/repeater/repeater-item.js +1 -1
  55. package/dist/components/repeater/repeater.js +2 -2
  56. package/dist/components/responsive/mini-responsive.js +3 -3
  57. package/dist/components/responsive/responsive-legacy.js +2 -2
  58. package/dist/components/responsive/responsive.js +2 -2
  59. package/dist/components/responsive-preview/responsive-preview.js +1 -1
  60. package/dist/components/select/async-multi-select.js +3 -3
  61. package/dist/components/select/async-single-select.js +2 -2
  62. package/dist/components/select/custom-select-default-components.js +1 -1
  63. package/dist/components/select/multi-select-components.js +1 -1
  64. package/dist/components/select/multi-select.js +3 -3
  65. package/dist/components/select/react-select-component-wrappers.js +1 -1
  66. package/dist/components/select/single-select.js +2 -2
  67. package/dist/components/select/v2/async-select.js +307 -0
  68. package/dist/components/select/v2/shared.js +24 -0
  69. package/dist/components/select/v2/single-select.js +993 -0
  70. package/dist/components/slider/column-config-slider.js +3 -3
  71. package/dist/components/slider/slider.js +3 -3
  72. package/dist/components/slider/utils.js +1 -1
  73. package/dist/components/tabs/tabs.js +16 -16
  74. package/dist/components/toggle/switch.js +6 -6
  75. package/dist/components/toggle/toggle.js +1 -1
  76. package/dist/components/toggle-button/toggle-button.js +55 -12
  77. package/dist/components/tooltip/tooltip.js +532 -8
  78. package/dist/{context-Cs-ZD1nu.js → context-KeRYAbEi.js} +2 -2
  79. package/dist/{default-i18n-DRnM8y4w.js → default-i18n-CM1-Xvzf.js} +183 -176
  80. package/dist/{focusSafely-CgFLw4FA.js → focusSafely-CZY36ssv.js} +14 -14
  81. package/dist/icons/icons.js +131 -0
  82. package/dist/icons/jsx-svg.js +16 -3
  83. package/dist/{index-a301f526.esm-BMg114iK.js → index-641ee5b8.esm-DEB-c58F.js} +226 -75
  84. package/dist/index-BYHhzLf-.js +444 -0
  85. package/dist/index.js +7 -3
  86. package/dist/{multi-select-components-DTvEidE3.js → multi-select-components-DM3GsNfb.js} +112 -45
  87. package/dist/{react-jsx-parser.min-B5HVwW_W.js → react-jsx-parser.min-CVit0rZn.js} +5620 -7409
  88. package/dist/{react-select-async.esm-CxA8wpeT.js → react-select-async.esm-Bq3N1-Wi.js} +3 -3
  89. package/dist/{react-select.esm-CeE7o5M9.js → react-select.esm-B38nY7_U.js} +3 -3
  90. package/dist/{textSelection-CvK0YHTZ.js → textSelection-G2G-nukT.js} +1 -1
  91. package/dist/{useButton-Cy9eEev7.js → useButton-CFtcz1T6.js} +4 -4
  92. package/dist/{useEvent-LZebwyrb.js → useEvent-B0yfN_Zu.js} +1 -1
  93. package/dist/{useFocusRing-BMOTWmOx.js → useFocusRing-DMAlRYjX.js} +1 -1
  94. package/dist/{useFocusable-ByyKSVQv.js → useFocusable-BlkOMLma.js} +4 -4
  95. package/dist/{useFormReset-B8m1uz1J.js → useFormReset-BAEM0o25.js} +1 -1
  96. package/dist/{useFormValidationState-BjMhz_VI.js → useFormValidation-BNzOc2t9.js} +92 -88
  97. package/dist/{useLabel-B6uO0wVK.js → useLabel-D6FSp5_M.js} +2 -2
  98. package/dist/{useLabels-5dFkeiXx.js → useLabels-CraZ2Sej.js} +1 -1
  99. package/dist/{useListState-eKxv7HPC.js → useListState-C3dnPq2F.js} +1 -1
  100. package/dist/{useLocalizedStringFormatter-BaKmjFNp.js → useLocalizedStringFormatter-B73fhEA7.js} +1 -1
  101. package/dist/{useNumberField-DMMUTZ-h.js → useNumberField-CQP9-nH5.js} +27 -20
  102. package/dist/{useNumberFormatter-Cyx5Dxkf.js → useNumberFormatter-Cdctl6fg.js} +2 -2
  103. package/dist/{usePress-D8nPoIQm.js → usePress-xTkcGUkt.js} +4 -4
  104. package/dist/{useSingleSelectListState-CABciySJ.js → useSingleSelectListState-BGXQSTy7.js} +2 -2
  105. package/dist/{useToggle-BmltE9Zr.js → useToggle-Dpw3WpSw.js} +4 -4
  106. package/dist/{useToggleState-DZXLEnA_.js → useToggleState-BSKwCUIW.js} +1 -1
  107. package/dist/{utils-BCJajCwh.js → utils-BSLBwuuO.js} +16 -15
  108. package/package.json +30 -31
  109. package/dist/Dialog-BN5EE7UH.js +0 -934
  110. package/dist/index-BTCzc3zb.js +0 -28261
  111. package/dist/isScrollable-Dh9D9IOd.js +0 -9
  112. package/dist/tooltip-eKaARDoV.js +0 -1084
  113. package/dist/useMenuTrigger-4fwEmto8.js +0 -246
@@ -1,8 +1,7 @@
1
- import { i as $ae20dd8cbca75726$export$d6daf82dcd84e87c, j as $c5a24bc478652b5f$export$1005530eda016c13, d as $e1995378a142960e$export$18af5c7a9e9b3664 } from "./SelectionManager-x27KqnAT.js";
2
- import { $ as $cc38e7bd3fc7b213$export$2bb74740c4e19def } from "./isScrollable-Dh9D9IOd.js";
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-D-89MUJW.js";
2
+ import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-KeRYAbEi.js";
4
3
  import React__default, { useMemo, createContext } from "react";
5
- import { a as $64fa3d84918910a7$export$29f1550f4b0d4415 } from "./utils-BCJajCwh.js";
4
+ import { a as $64fa3d84918910a7$export$29f1550f4b0d4415 } from "./utils-BSLBwuuO.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
- while (key != null) {
57
- let item = this.collection.getItem(key);
58
- if ((item === null || item === void 0 ? void 0 : item.type) === "item" && !this.isDisabled(item)) return key;
59
- key = getNext(key);
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
- key = this.collection.getKeyAfter(key);
65
- return this.findNextNonDisabled(key, (key2) => this.collection.getKeyAfter(key2));
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
- key = this.collection.getKeyBefore(key);
69
- return this.findNextNonDisabled(key, (key2) => this.collection.getKeyBefore(key2));
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 itemRect = this.layoutDelegate.getItemRect(key);
73
- if (!itemRect) return null;
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
- key = nextKey(key);
77
- itemRect = this.layoutDelegate.getItemRect(key);
78
- } while (itemRect && shouldSkip(prevRect, itemRect));
79
- return key;
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
- key = this.getKeyAbove(key);
139
- itemRect = key == null ? null : this.layoutDelegate.getItemRect(key);
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
- key = this.getKeyAbove(key);
145
- itemRect = key == null ? null : this.layoutDelegate.getItemRect(key);
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 key !== null && key !== void 0 ? key : this.getFirstKey();
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
- key = this.getKeyBelow(key);
159
- itemRect = key == null ? null : this.layoutDelegate.getItemRect(key);
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
- key = this.getKeyBelow(key);
165
- itemRect = key == null ? null : this.layoutDelegate.getItemRect(key);
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 key !== null && key !== void 0 ? key : this.getLastKey();
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
- count = 0;
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 count++;
260
+ else counter++;
251
261
  };
252
262
  countItems(collection);
253
- $453cc9f0df89c0a5$var$cache.set(collection, count);
254
- return count;
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
- $982254629710d113$export$b95089534ab7c1fd as $,
303
- $453cc9f0df89c0a5$export$77d5aafae4e095b2 as a,
304
- $325a3faab7a68acd$export$a16aca283550c30d as b,
305
- $2a25aae57d74318e$export$a05409b8bb224a5a as c,
306
- $431f98aba6844401$export$6615d83f6de245ce as d,
307
- $72a5793c14baf454$export$e0e4026c12a8bdbb as e,
308
- $72a5793c14baf454$export$8b251419efc915eb as f,
309
- $431f98aba6844401$export$1ff3c3f08ae963c0 as g
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 { f as $8ae05eaa5c114e9c$export$7f54fc3180508a52, c as $3ef42575df84b30b$export$9d1611c77c2fe928, a as $64fa3d84918910a7$export$29f1550f4b0d4415, g as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, b as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a, $ as $64fa3d84918910a7$export$fabf2dc03a41866e } from "./utils-BCJajCwh.js";
2
- import { a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "./Label-BwqMVkuV.js";
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-BSLBwuuO.js";
2
+ import { a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "./Label-BtoiUpt8.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-Cyx5Dxkf.js";
6
- import { e as $458b0a5536c1a7cf$export$40bfa8c7b0832715, i as $507fabe10e71c6fb$export$8397ddfc504fdb9a, m as $7215afc6de606d6b$export$de79e2c695e052f3, $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "./focusSafely-CgFLw4FA.js";
5
+ import { $ as $a916eb452884faea$export$b7a616150fdb9f44 } from "./useNumberFormatter-Cdctl6fg.js";
6
+ import { e as $458b0a5536c1a7cf$export$40bfa8c7b0832715, i as $507fabe10e71c6fb$export$8397ddfc504fdb9a, n as $7215afc6de606d6b$export$de79e2c695e052f3, $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "./focusSafely-CZY36ssv.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-CvK0YHTZ.js";
9
- import { $ as $d191a55c9702f145$export$8467354a121f1b9f } from "./useLabel-B6uO0wVK.js";
10
- import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-Cs-ZD1nu.js";
11
- import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-B8m1uz1J.js";
12
- import { a as $46d819fcbaf35654$export$8f71654801c2f7cd, $ as $e6afbd83fe6ebbd2$export$4c014de7c8940b4c } from "./useFocusable-ByyKSVQv.js";
13
- import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-BMOTWmOx.js";
14
- import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "./VisuallyHidden-WhC7vZaL.js";
8
+ import { $ as $03deb23ff14920c4$export$4eaf04e54aa8eed6, a as $14c0b72509d70225$export$b0d6fa1ab32e3295, b as $14c0b72509d70225$export$16a4697467175487 } from "./textSelection-G2G-nukT.js";
9
+ import { $ as $d191a55c9702f145$export$8467354a121f1b9f } from "./useLabel-D6FSp5_M.js";
10
+ import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-KeRYAbEi.js";
11
+ import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-BAEM0o25.js";
12
+ import { b as $46d819fcbaf35654$export$8f71654801c2f7cd, $ as $e6afbd83fe6ebbd2$export$4c014de7c8940b4c } from "./useFocusable-BlkOMLma.js";
13
+ import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-DMAlRYjX.js";
14
+ import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "./VisuallyHidden-BHNhi-ls.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 : val[idx - 1];
238
- let max = idx === values2.length - 1 ? maxValue : val[idx + 1];
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-BCJajCwh.js";
1
+ import { a as $64fa3d84918910a7$export$29f1550f4b0d4415 } from "./utils-BSLBwuuO.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 { c as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-BCJajCwh.js";
1
+ import { d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-BSLBwuuO.js";
2
2
  import React__default, { useState, useMemo } from "react";
3
- import { d as $9ab94262bd0047c7$export$420e68273165f4ec } from "./focusSafely-CgFLw4FA.js";
3
+ import { d as $9ab94262bd0047c7$export$420e68273165f4ec } from "./focusSafely-CZY36ssv.js";
4
4
  const $5c3e21d68f1c4674$var$styles = {
5
5
  border: 0,
6
6
  clip: "rect(0 0 0 0)",