@eightshift/ui-components 6.0.6 → 6.0.9

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 (99) hide show
  1. package/dist/{Button-BXjXzdW_.js → Button-JRIu2BnS.js} +8 -8
  2. package/dist/{Dialog-D8bjn-nh.js → Dialog-Dd1yqNus.js} +31 -27
  3. package/dist/{FieldError-DwBG6m1U.js → FieldError-DmVwL6Dj.js} +2 -2
  4. package/dist/{FocusScope-BMk5oZCk.js → FocusScope-Dri1oBcH.js} +2 -2
  5. package/dist/{Heading-BmRX4BRL.js → Heading-eA6LXIKB.js} +1 -1
  6. package/dist/{Input-CNNksOWg.js → Input-Cuw9UbNb.js} +14 -24
  7. package/dist/{Label-D8a3eYb-.js → Label-DPWyf-gp.js} +1 -1
  8. package/dist/{List-BGHOoFf0.js → List-CWheI3JH.js} +1 -1
  9. package/dist/{ListBox-Dd37zMvs.js → ListBox-DT1sFY3e.js} +17 -16
  10. package/dist/{OverlayArrow-DokC40S3.js → OverlayArrow-DVJTTfZM.js} +67 -123
  11. package/dist/{RadioGroup-BVFvITWO.js → RadioGroup-Cp5cdBI_.js} +14 -14
  12. package/dist/{SearchField-CHYnN-jt.js → SearchField-CLhr5PGZ.js} +44 -37
  13. package/dist/{SelectionManager-N8X7T_4D.js → SelectionManager-DbBiF5M8.js} +41 -68
  14. package/dist/{SharedElementTransition-BDT84GtD.js → SharedElementTransition-B_vnQ1uR.js} +1 -1
  15. package/dist/{Slider-CL5CM9S8.js → Slider-CZV3HhHY.js} +119 -83
  16. package/dist/{Text-ztX6G1zR.js → Text-Dae33gHp.js} +1 -1
  17. package/dist/{VisuallyHidden-DTUuKFiI.js → VisuallyHidden-eaCBtXhE.js} +2 -2
  18. package/dist/animation-DY7CNkr6.js +67 -0
  19. package/dist/assets/style-admin.css +38 -45
  20. package/dist/assets/style-editor.css +38 -45
  21. package/dist/assets/style.css +38 -45
  22. package/dist/assets/wp-overrides/allow-full-width-blocks.css +1 -1
  23. package/dist/assets/wp-overrides/fix-label-text-case.css +1 -1
  24. package/dist/assets/wp-overrides/increase-sidebar-width.css +1 -1
  25. package/dist/assets/wp-overrides/make-block-messages-nicer.css +1 -1
  26. package/dist/assets/wp-overrides/replace-fonts.css +1 -1
  27. package/dist/assets/wp-overrides/restyle-tooltips.css +1 -1
  28. package/dist/assets/wp-overrides/round-corners.css +1 -1
  29. package/dist/assets/wp-overrides/unify-button-sizes.css +1 -1
  30. package/dist/{color-swatch-BEBLRxTy.js → color-swatch-CZj0jHZd.js} +4 -4
  31. package/dist/components/animated-visibility/animated-visibility.js +2 -2
  32. package/dist/components/base-control/base-control.js +1 -1
  33. package/dist/components/button/button.js +5 -5
  34. package/dist/components/checkbox/checkbox.js +10 -10
  35. package/dist/components/color-pickers/color-picker.js +1 -1
  36. package/dist/components/color-pickers/color-swatch.js +1 -1
  37. package/dist/components/color-pickers/gradient-editor.js +2 -2
  38. package/dist/components/color-pickers/solid-color-picker.js +17 -17
  39. package/dist/components/draggable/draggable.js +43 -44
  40. package/dist/components/draggable-list/draggable-list.js +11 -16
  41. package/dist/components/expandable/expandable.js +13 -12
  42. package/dist/components/index.js +1 -1
  43. package/dist/components/input-field/input-field.js +8 -8
  44. package/dist/components/link-input/link-input.js +25 -25
  45. package/dist/components/matrix-align/matrix-align.js +1 -1
  46. package/dist/components/menu/menu.js +1 -1
  47. package/dist/components/modal/modal.js +19 -12
  48. package/dist/components/number-picker/number-picker.js +9 -9
  49. package/dist/components/options-panel/options-panel.js +1 -1
  50. package/dist/components/popover/popover.js +5 -5
  51. package/dist/components/radio/radio.js +2 -2
  52. package/dist/components/repeater/repeater-item.js +3 -2
  53. package/dist/components/repeater/repeater.js +23 -23
  54. package/dist/components/responsive/mini-responsive.js +1 -1
  55. package/dist/components/select/async-multi-select.js +10 -10
  56. package/dist/components/select/async-select.js +10 -10
  57. package/dist/components/select/multi-select.js +10 -10
  58. package/dist/components/select/shared.js +3 -3
  59. package/dist/components/select/single-select.js +10 -10
  60. package/dist/components/slider/column-config-slider.js +3 -3
  61. package/dist/components/slider/slider.js +3 -3
  62. package/dist/components/smart-image/smart-image.js +1 -1
  63. package/dist/components/smart-image/worker-inline.js +1 -1
  64. package/dist/components/tabs/tabs.js +36 -17
  65. package/dist/components/toggle/switch.js +7 -7
  66. package/dist/components/toggle/toggle.js +1 -1
  67. package/dist/components/toggle-button/toggle-button.js +6 -6
  68. package/dist/components/tooltip/tooltip.js +10 -8
  69. package/dist/{context-BQvmiUqb.js → context-DYYO3Ns3.js} +9 -6
  70. package/dist/{filterDOMProps-D2C6R0DK.js → filterDOMProps-eGTqWSTd.js} +1 -1
  71. package/dist/{general-ChNQK6O9.js → general-C8Q0dvEx.js} +15 -14
  72. package/dist/{index-oFgxU4zs.js → index-sSixe2j_.js} +20 -20
  73. package/dist/index.js +1 -1
  74. package/dist/{proxy-DkQpcQgI.js → proxy-Bj4KTTJt.js} +190 -119
  75. package/dist/{shared-DOxXagm0.js → shared-Bg9lx3pE.js} +20 -20
  76. package/dist/{textSelection-CwHUtNVX.js → textSelection-Cq_Br7RW.js} +1 -1
  77. package/dist/{useAsyncList-D52mQcrH.js → useAsyncList-DsZvQXls.js} +5 -2
  78. package/dist/{useButton-DdZrS1Kz.js → useButton-CeuyDay5.js} +4 -4
  79. package/dist/{useEvent-BD7Olibq.js → useEvent-DoWvho2u.js} +2 -3
  80. package/dist/{useFilter-bhxeEDg8.js → useFilter-DYtfYPua.js} +1 -1
  81. package/dist/{useFocusRing-D3b7Kh4P.js → useFocusRing-WEswknAY.js} +1 -1
  82. package/dist/{useFormReset-WUv2PdFO.js → useFormReset-BDF1K4E4.js} +2 -3
  83. package/dist/{useFormValidation-DQeXkyLm.js → useFormValidation-Dqzjv4jX.js} +2 -5
  84. package/dist/{useHover-Bycb7BsD.js → useHover-CG39Ci3A.js} +164 -66
  85. package/dist/{useLabel-Bnv4-T24.js → useLabel--3fT2XKM.js} +2 -2
  86. package/dist/{useLabels-B49ptFDX.js → useLabels-vzdDMGCX.js} +1 -1
  87. package/dist/{useListState-ZKhRO8ML.js → useListState-Bya9g7W8.js} +1 -1
  88. package/dist/{useLocalizedStringFormatter-NETP-8H8.js → useLocalizedStringFormatter-M3L6Ge2c.js} +3 -3
  89. package/dist/{useNumberField-D2fUHql3.js → useNumberField-D6lsi3Vu.js} +91 -24
  90. package/dist/{useNumberFormatter-DGvuRCn7.js → useNumberFormatter-BWOyCamK.js} +1 -1
  91. package/dist/{usePress-B8OteQMu.js → usePress-B9w0X4Ur.js} +168 -180
  92. package/dist/{useSingleSelectListState-BBTu4shO.js → useSingleSelectListState-D9SqGLJ0.js} +2 -2
  93. package/dist/{useToggle-BZhaYwZl.js → useToggle-Deq2xxQV.js} +5 -5
  94. package/dist/{useToggleState-VkXJjsru.js → useToggleState-j3o1PvdS.js} +1 -1
  95. package/dist/utilities/general.js +1 -1
  96. package/dist/utilities/index.js +1 -1
  97. package/dist/{utils-DGpXyJOJ.js → utils-HC9_3Crc.js} +20 -31
  98. package/dist/workers/image-analysis.worker.js +1 -1
  99. package/package.json +19 -19
@@ -1,7 +1,7 @@
1
- import { a as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-DGpXyJOJ.js";
2
- import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-D2C6R0DK.js";
3
- import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "./usePress-B8OteQMu.js";
4
- import { $ as $f645667febf57a63$export$4c014de7c8940b4c } from "./useHover-Bycb7BsD.js";
1
+ import { a as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-HC9_3Crc.js";
2
+ import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-eGTqWSTd.js";
3
+ import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "./usePress-B9w0X4Ur.js";
4
+ import { $ as $f645667febf57a63$export$4c014de7c8940b4c } from "./useHover-CG39Ci3A.js";
5
5
  function $701a24aa0da5b062$export$ea18c227d4417cc3(props, ref) {
6
6
  let { elementType = "button", isDisabled, onPress, onPressStart, onPressEnd, onPressUp, onPressChange, preventFocusOnPress, allowFocusWhenDisabled, onClick, href, target, rel, type = "button" } = props;
7
7
  let additionalProps;
@@ -1,4 +1,4 @@
1
- import { c as $8ae05eaa5c114e9c$export$7f54fc3180508a52 } from "./utils-DGpXyJOJ.js";
1
+ import { b as $8ae05eaa5c114e9c$export$7f54fc3180508a52 } from "./useHover-CG39Ci3A.js";
2
2
  import { useEffect } from "react";
3
3
  function $e9faafb641e167db$export$90fc3a17d93f704c(ref, event, handler, options) {
4
4
  let handleEvent = $8ae05eaa5c114e9c$export$7f54fc3180508a52(handler);
@@ -14,8 +14,7 @@ function $e9faafb641e167db$export$90fc3a17d93f704c(ref, event, handler, options)
14
14
  ref,
15
15
  event,
16
16
  options,
17
- isDisabled,
18
- handleEvent
17
+ isDisabled
19
18
  ]);
20
19
  }
21
20
  export {
@@ -1,4 +1,4 @@
1
- import { i as $325a3faab7a68acd$export$a16aca283550c30d } from "./Dialog-D8bjn-nh.js";
1
+ import { i as $325a3faab7a68acd$export$a16aca283550c30d } from "./Dialog-Dd1yqNus.js";
2
2
  import { useCallback, useMemo } from "react";
3
3
  function $bb77f239b46e8c72$export$3274cf84b703fff(options) {
4
4
  let collator = $325a3faab7a68acd$export$a16aca283550c30d({
@@ -1,4 +1,4 @@
1
- import { e as $03deb23ff14920c4$export$4eaf04e54aa8eed6, f as $8a9cb279dc87e130$export$715c682d09d639cc, c as $431fbd86ca7dc216$export$b204af158042fbac, g as $d4ee10de306f2510$export$cd4e5573fbe2b576, h as $d4ee10de306f2510$export$e58f029f0fbfdb29, i as $d4ee10de306f2510$export$4282f70798064fe0, j as $8a9cb279dc87e130$export$c2b7abe5d61ec696, k as $8a9cb279dc87e130$export$525bc4921d56d4a, l as $507fabe10e71c6fb$export$b9b3dfddab17db27, m as $507fabe10e71c6fb$export$ec71b4b83ac08ec3, n as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6 } from "./useHover-Bycb7BsD.js";
1
+ import { f as $03deb23ff14920c4$export$4eaf04e54aa8eed6, g as $8a9cb279dc87e130$export$715c682d09d639cc, d as $431fbd86ca7dc216$export$b204af158042fbac, h as $d4ee10de306f2510$export$cd4e5573fbe2b576, i as $d4ee10de306f2510$export$e58f029f0fbfdb29, j as $d4ee10de306f2510$export$4282f70798064fe0, k as $8a9cb279dc87e130$export$c2b7abe5d61ec696, l as $8a9cb279dc87e130$export$525bc4921d56d4a, m as $507fabe10e71c6fb$export$b9b3dfddab17db27, n as $507fabe10e71c6fb$export$ec71b4b83ac08ec3, o as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6 } from "./useHover-CG39Ci3A.js";
2
2
  import { useRef, useCallback, useState } from "react";
3
3
  function $9ab94262bd0047c7$export$420e68273165f4ec(props) {
4
4
  let { isDisabled, onBlurWithin, onFocusWithin, onFocusWithinChange } = props;
@@ -1,4 +1,4 @@
1
- import { c as $8ae05eaa5c114e9c$export$7f54fc3180508a52 } from "./utils-DGpXyJOJ.js";
1
+ import { b as $8ae05eaa5c114e9c$export$7f54fc3180508a52 } from "./useHover-CG39Ci3A.js";
2
2
  import { useEffect } from "react";
3
3
  function $99facab73266f662$export$5add1d006293d136(ref, initialValue, onReset) {
4
4
  let handleReset = $8ae05eaa5c114e9c$export$7f54fc3180508a52(() => {
@@ -12,8 +12,7 @@ function $99facab73266f662$export$5add1d006293d136(ref, initialValue, onReset) {
12
12
  form === null || form === void 0 ? void 0 : form.removeEventListener("reset", handleReset);
13
13
  };
14
14
  }, [
15
- ref,
16
- handleReset
15
+ ref
17
16
  ]);
18
17
  }
19
18
  export {
@@ -1,6 +1,6 @@
1
1
  import { useMemo, useContext, createContext, useState, useRef, useEffect } from "react";
2
- import { v as $507fabe10e71c6fb$export$8397ddfc504fdb9a } from "./useHover-Bycb7BsD.js";
3
- import { j as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, c as $8ae05eaa5c114e9c$export$7f54fc3180508a52 } from "./utils-DGpXyJOJ.js";
2
+ import { b as $8ae05eaa5c114e9c$export$7f54fc3180508a52, w as $507fabe10e71c6fb$export$8397ddfc504fdb9a } from "./useHover-CG39Ci3A.js";
3
+ import { b as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c } from "./utils-HC9_3Crc.js";
4
4
  const $e5be200c675c3b3a$export$aca958c65c314e6c = {
5
5
  badInput: false,
6
6
  customError: false,
@@ -188,9 +188,6 @@ function $e93e671b31057976$export$b8473d3665f3a75a(props, state, ref) {
188
188
  };
189
189
  }, [
190
190
  ref,
191
- onInvalid,
192
- onChange,
193
- onReset,
194
191
  validationBehavior
195
192
  ]);
196
193
  }
@@ -1,5 +1,5 @@
1
- import $dbSRa$react__default, { useRef, useCallback, useEffect, useState, useContext, useMemo } from "react";
2
- import { j as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, c as $8ae05eaa5c114e9c$export$7f54fc3180508a52, m as $b5e257d569688ac6$export$535bd6ca7f90a273, k as $df56164dff5785e2$export$4338b53315abf666, a as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-DGpXyJOJ.js";
1
+ import { b as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, l as $b5e257d569688ac6$export$535bd6ca7f90a273, j as $df56164dff5785e2$export$4338b53315abf666, a as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-HC9_3Crc.js";
2
+ import $dbSRa$react__default, { useContext, createContext, useRef, useCallback, useEffect, useState, useReducer, useMemo } from "react";
3
3
  const $431fbd86ca7dc216$export$b204af158042fbac = (el) => {
4
4
  var _el_ownerDocument;
5
5
  return (_el_ownerDocument = el === null || el === void 0 ? void 0 : el.ownerDocument) !== null && _el_ownerDocument !== void 0 ? _el_ownerDocument : document;
@@ -144,6 +144,87 @@ const $c87311424ea30a05$export$a11b0059900ceec8 = $c87311424ea30a05$var$cached(f
144
144
  const $c87311424ea30a05$export$b7d78993b74f766d = $c87311424ea30a05$var$cached(function() {
145
145
  return $c87311424ea30a05$var$testUserAgent(/Firefox/i);
146
146
  });
147
+ const $ea8dcbcb9ea1b556$var$RouterContext = /* @__PURE__ */ createContext({
148
+ isNative: true,
149
+ open: $ea8dcbcb9ea1b556$var$openSyntheticLink,
150
+ useHref: (href) => href
151
+ });
152
+ function $ea8dcbcb9ea1b556$export$9a302a45f65d0572() {
153
+ return useContext($ea8dcbcb9ea1b556$var$RouterContext);
154
+ }
155
+ function $ea8dcbcb9ea1b556$export$efa8c9099e530235(link, modifiers) {
156
+ let target = link.getAttribute("target");
157
+ return (!target || target === "_self") && link.origin === location.origin && !link.hasAttribute("download") && !modifiers.metaKey && // open in new tab (mac)
158
+ !modifiers.ctrlKey && // open in new tab (windows)
159
+ !modifiers.altKey && // download
160
+ !modifiers.shiftKey;
161
+ }
162
+ function $ea8dcbcb9ea1b556$export$95185d699e05d4d7(target, modifiers, setOpening = true) {
163
+ var _window_event_type, _window_event;
164
+ let { metaKey, ctrlKey, altKey, shiftKey } = modifiers;
165
+ if ($c87311424ea30a05$export$b7d78993b74f766d() && ((_window_event = window.event) === null || _window_event === void 0 ? void 0 : (_window_event_type = _window_event.type) === null || _window_event_type === void 0 ? void 0 : _window_event_type.startsWith("key")) && target.target === "_blank") {
166
+ if ($c87311424ea30a05$export$9ac100e40613ea10()) metaKey = true;
167
+ else ctrlKey = true;
168
+ }
169
+ let event = $c87311424ea30a05$export$78551043582a6a98() && $c87311424ea30a05$export$9ac100e40613ea10() && !$c87311424ea30a05$export$7bef049ce92e4224() && process.env.NODE_ENV !== "test" ? new KeyboardEvent("keydown", {
170
+ keyIdentifier: "Enter",
171
+ metaKey,
172
+ ctrlKey,
173
+ altKey,
174
+ shiftKey
175
+ }) : new MouseEvent("click", {
176
+ metaKey,
177
+ ctrlKey,
178
+ altKey,
179
+ shiftKey,
180
+ detail: 1,
181
+ bubbles: true,
182
+ cancelable: true
183
+ });
184
+ $ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening = setOpening;
185
+ $7215afc6de606d6b$export$de79e2c695e052f3(target);
186
+ target.dispatchEvent(event);
187
+ $ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening = false;
188
+ }
189
+ $ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening = false;
190
+ function $ea8dcbcb9ea1b556$var$getSyntheticLink(target, open) {
191
+ if (target instanceof HTMLAnchorElement) open(target);
192
+ else if (target.hasAttribute("data-href")) {
193
+ let link = document.createElement("a");
194
+ link.href = target.getAttribute("data-href");
195
+ if (target.hasAttribute("data-target")) link.target = target.getAttribute("data-target");
196
+ if (target.hasAttribute("data-rel")) link.rel = target.getAttribute("data-rel");
197
+ if (target.hasAttribute("data-download")) link.download = target.getAttribute("data-download");
198
+ if (target.hasAttribute("data-ping")) link.ping = target.getAttribute("data-ping");
199
+ if (target.hasAttribute("data-referrer-policy")) link.referrerPolicy = target.getAttribute("data-referrer-policy");
200
+ target.appendChild(link);
201
+ open(link);
202
+ target.removeChild(link);
203
+ }
204
+ }
205
+ function $ea8dcbcb9ea1b556$var$openSyntheticLink(target, modifiers) {
206
+ $ea8dcbcb9ea1b556$var$getSyntheticLink(target, (link) => $ea8dcbcb9ea1b556$export$95185d699e05d4d7(link, modifiers));
207
+ }
208
+ function $ea8dcbcb9ea1b556$export$7e924b3091a3bd18(props) {
209
+ let router = $ea8dcbcb9ea1b556$export$9a302a45f65d0572();
210
+ var _props_href;
211
+ const href = router.useHref((_props_href = props === null || props === void 0 ? void 0 : props.href) !== null && _props_href !== void 0 ? _props_href : "");
212
+ return {
213
+ href: (props === null || props === void 0 ? void 0 : props.href) ? href : void 0,
214
+ target: props === null || props === void 0 ? void 0 : props.target,
215
+ rel: props === null || props === void 0 ? void 0 : props.rel,
216
+ download: props === null || props === void 0 ? void 0 : props.download,
217
+ ping: props === null || props === void 0 ? void 0 : props.ping,
218
+ referrerPolicy: props === null || props === void 0 ? void 0 : props.referrerPolicy
219
+ };
220
+ }
221
+ function $ea8dcbcb9ea1b556$export$13aea1a3cb5e3f1f(e, router, href, routerOptions) {
222
+ if (!router.isNative && e.currentTarget instanceof HTMLAnchorElement && e.currentTarget.href && // If props are applied to a router Link component, it may have already prevented default.
223
+ !e.isDefaultPrevented() && $ea8dcbcb9ea1b556$export$efa8c9099e530235(e.currentTarget, e) && href) {
224
+ e.preventDefault();
225
+ router.open(e.currentTarget, e, href, routerOptions);
226
+ }
227
+ }
147
228
  let $bbed8b41f857bcc0$var$transitionsByElement = /* @__PURE__ */ new Map();
148
229
  let $bbed8b41f857bcc0$var$transitionCallbacks = /* @__PURE__ */ new Set();
149
230
  function $bbed8b41f857bcc0$var$setupGlobalEvents() {
@@ -234,6 +315,20 @@ function $03deb23ff14920c4$export$4eaf04e54aa8eed6() {
234
315
  removeAllGlobalListeners
235
316
  };
236
317
  }
318
+ var $8ae05eaa5c114e9c$var$_React_useInsertionEffect;
319
+ const $8ae05eaa5c114e9c$var$useEarlyEffect = ($8ae05eaa5c114e9c$var$_React_useInsertionEffect = $dbSRa$react__default["useInsertionEffect"]) !== null && $8ae05eaa5c114e9c$var$_React_useInsertionEffect !== void 0 ? $8ae05eaa5c114e9c$var$_React_useInsertionEffect : $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c;
320
+ function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {
321
+ const ref = useRef(null);
322
+ $8ae05eaa5c114e9c$var$useEarlyEffect(() => {
323
+ ref.current = fn;
324
+ }, [
325
+ fn
326
+ ]);
327
+ return useCallback((...args) => {
328
+ const f = ref.current;
329
+ return f === null || f === void 0 ? void 0 : f(...args);
330
+ }, []);
331
+ }
237
332
  function $e7801be82b4b2a53$export$4debdb1a3f0fa79e(context, ref) {
238
333
  $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
239
334
  if (context && context.ref && ref) {
@@ -308,8 +403,12 @@ function $b4b717babfbb907b$var$isInert(element) {
308
403
  }
309
404
  return false;
310
405
  }
406
+ var $458b0a5536c1a7cf$var$_React_useInsertionEffect;
407
+ const $458b0a5536c1a7cf$var$useEarlyEffect = typeof document !== "undefined" ? ($458b0a5536c1a7cf$var$_React_useInsertionEffect = $dbSRa$react__default["useInsertionEffect"]) !== null && $458b0a5536c1a7cf$var$_React_useInsertionEffect !== void 0 ? $458b0a5536c1a7cf$var$_React_useInsertionEffect : $dbSRa$react__default.useLayoutEffect : () => {
408
+ };
311
409
  function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange) {
312
410
  let [stateValue, setStateValue] = useState(value || defaultValue);
411
+ let valueRef = useRef(stateValue);
313
412
  let isControlledRef = useRef(value !== void 0);
314
413
  let isControlled = value !== void 0;
315
414
  useEffect(() => {
@@ -320,30 +419,19 @@ function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange
320
419
  isControlled
321
420
  ]);
322
421
  let currentValue = isControlled ? value : stateValue;
422
+ $458b0a5536c1a7cf$var$useEarlyEffect(() => {
423
+ valueRef.current = currentValue;
424
+ });
425
+ let [, forceUpdate] = useReducer(() => ({}), {});
323
426
  let setValue = useCallback((value2, ...args) => {
324
- let onChangeCaller = (value3, ...onChangeArgs) => {
325
- if (onChange) {
326
- if (!Object.is(currentValue, value3)) onChange(value3, ...onChangeArgs);
327
- }
328
- if (!isControlled)
329
- currentValue = value3;
330
- };
331
- if (typeof value2 === "function") {
332
- if (process.env.NODE_ENV !== "production") console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320");
333
- let updateFunction = (oldValue, ...functionArgs) => {
334
- let interceptedValue = value2(isControlled ? currentValue : oldValue, ...functionArgs);
335
- onChangeCaller(interceptedValue, ...args);
336
- if (!isControlled) return interceptedValue;
337
- return oldValue;
338
- };
339
- setStateValue(updateFunction);
340
- } else {
341
- if (!isControlled) setStateValue(value2);
342
- onChangeCaller(value2, ...args);
427
+ let newValue = typeof value2 === "function" ? value2(valueRef.current) : value2;
428
+ if (!Object.is(valueRef.current, newValue)) {
429
+ valueRef.current = newValue;
430
+ setStateValue(newValue);
431
+ forceUpdate();
432
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue, ...args);
343
433
  }
344
434
  }, [
345
- isControlled,
346
- currentValue,
347
435
  onChange
348
436
  ]);
349
437
  return [
@@ -382,9 +470,6 @@ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
382
470
  }
383
471
  };
384
472
  }, []);
385
- let dispatchBlur = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
386
- onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
387
- });
388
473
  return useCallback((e) => {
389
474
  if (e.target instanceof HTMLButtonElement || e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement || e.target instanceof HTMLSelectElement) {
390
475
  stateRef.current.isFocused = true;
@@ -393,7 +478,7 @@ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
393
478
  stateRef.current.isFocused = false;
394
479
  if (target.disabled) {
395
480
  let event = $8a9cb279dc87e130$export$525bc4921d56d4a(e2);
396
- dispatchBlur(event);
481
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
397
482
  }
398
483
  if (stateRef.current.observer) {
399
484
  stateRef.current.observer.disconnect();
@@ -425,7 +510,7 @@ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
425
510
  });
426
511
  }
427
512
  }, [
428
- dispatchBlur
513
+ onBlur
429
514
  ]);
430
515
  }
431
516
  let $8a9cb279dc87e130$export$fda7da73ab5d4c48 = false;
@@ -479,6 +564,7 @@ function $8a9cb279dc87e130$export$cabe61c495ee3649(target) {
479
564
  return cleanup;
480
565
  }
481
566
  let $507fabe10e71c6fb$var$currentModality = null;
567
+ let $507fabe10e71c6fb$var$currentPointerType = "keyboard";
482
568
  let $507fabe10e71c6fb$var$changeHandlers = /* @__PURE__ */ new Set();
483
569
  let $507fabe10e71c6fb$export$d90243b58daecda7 = /* @__PURE__ */ new Map();
484
570
  let $507fabe10e71c6fb$var$hasEventBeforeFocus = false;
@@ -495,28 +581,32 @@ function $507fabe10e71c6fb$var$isValidKey(e) {
495
581
  }
496
582
  function $507fabe10e71c6fb$var$handleKeyboardEvent(e) {
497
583
  $507fabe10e71c6fb$var$hasEventBeforeFocus = true;
498
- if ($507fabe10e71c6fb$var$isValidKey(e)) {
584
+ if (!$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening && $507fabe10e71c6fb$var$isValidKey(e)) {
499
585
  $507fabe10e71c6fb$var$currentModality = "keyboard";
586
+ $507fabe10e71c6fb$var$currentPointerType = "keyboard";
500
587
  $507fabe10e71c6fb$var$triggerChangeHandlers("keyboard", e);
501
588
  }
502
589
  }
503
590
  function $507fabe10e71c6fb$var$handlePointerEvent(e) {
504
591
  $507fabe10e71c6fb$var$currentModality = "pointer";
592
+ $507fabe10e71c6fb$var$currentPointerType = "pointerType" in e ? e.pointerType : "mouse";
505
593
  if (e.type === "mousedown" || e.type === "pointerdown") {
506
594
  $507fabe10e71c6fb$var$hasEventBeforeFocus = true;
507
595
  $507fabe10e71c6fb$var$triggerChangeHandlers("pointer", e);
508
596
  }
509
597
  }
510
598
  function $507fabe10e71c6fb$var$handleClickEvent(e) {
511
- if ($6a7db85432448f7f$export$60278871457622de(e)) {
599
+ if (!$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening && $6a7db85432448f7f$export$60278871457622de(e)) {
512
600
  $507fabe10e71c6fb$var$hasEventBeforeFocus = true;
513
601
  $507fabe10e71c6fb$var$currentModality = "virtual";
602
+ $507fabe10e71c6fb$var$currentPointerType = "virtual";
514
603
  }
515
604
  }
516
605
  function $507fabe10e71c6fb$var$handleFocusEvent(e) {
517
606
  if (e.target === window || e.target === document || $8a9cb279dc87e130$export$fda7da73ab5d4c48 || !e.isTrusted) return;
518
607
  if (!$507fabe10e71c6fb$var$hasEventBeforeFocus && !$507fabe10e71c6fb$var$hasBlurredWindowRecently) {
519
608
  $507fabe10e71c6fb$var$currentModality = "virtual";
609
+ $507fabe10e71c6fb$var$currentPointerType = "virtual";
520
610
  $507fabe10e71c6fb$var$triggerChangeHandlers("virtual", e);
521
611
  }
522
612
  $507fabe10e71c6fb$var$hasEventBeforeFocus = false;
@@ -602,8 +692,12 @@ function $507fabe10e71c6fb$export$630ff653c5ada6a9() {
602
692
  }
603
693
  function $507fabe10e71c6fb$export$8397ddfc504fdb9a(modality) {
604
694
  $507fabe10e71c6fb$var$currentModality = modality;
695
+ $507fabe10e71c6fb$var$currentPointerType = modality === "pointer" ? "mouse" : modality;
605
696
  $507fabe10e71c6fb$var$triggerChangeHandlers(modality, null);
606
697
  }
698
+ function $507fabe10e71c6fb$export$887a228355cf7d95() {
699
+ return $507fabe10e71c6fb$var$currentPointerType;
700
+ }
607
701
  function $507fabe10e71c6fb$export$98e20ec92f614cfe() {
608
702
  $507fabe10e71c6fb$var$setupGlobalFocusEvents();
609
703
  let [modality, setModality] = useState($507fabe10e71c6fb$var$currentModality);
@@ -653,11 +747,11 @@ function $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn, deps, opts) {
653
747
  }
654
748
  function $3ad3f6e1647bc98d$export$80f3e147d781571c(element) {
655
749
  const ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(element);
656
- const activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument);
657
750
  if ($507fabe10e71c6fb$export$630ff653c5ada6a9() === "virtual") {
658
- let lastFocusedElement = activeElement;
751
+ let lastFocusedElement = $d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument);
659
752
  $bbed8b41f857bcc0$export$24490316f764c430(() => {
660
- if ($d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument) === lastFocusedElement && element.isConnected) $7215afc6de606d6b$export$de79e2c695e052f3(element);
753
+ const activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument);
754
+ if ((activeElement === lastFocusedElement || activeElement === ownerDocument.body) && element.isConnected) $7215afc6de606d6b$export$de79e2c695e052f3(element);
661
755
  });
662
756
  } else $7215afc6de606d6b$export$de79e2c695e052f3(element);
663
757
  }
@@ -888,43 +982,47 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
888
982
  }
889
983
  export {
890
984
  $f645667febf57a63$export$4c014de7c8940b4c as $,
891
- $46d819fcbaf35654$export$8f71654801c2f7cd as A,
892
- $c87311424ea30a05$export$9ac100e40613ea10 as B,
985
+ $7215afc6de606d6b$export$de79e2c695e052f3 as A,
986
+ $46d819fcbaf35654$export$8f71654801c2f7cd as B,
893
987
  $c87311424ea30a05$export$78551043582a6a98 as C,
894
- $c87311424ea30a05$export$b7d78993b74f766d as D,
895
- $c87311424ea30a05$export$7bef049ce92e4224 as E,
988
+ $c87311424ea30a05$export$9ac100e40613ea10 as D,
989
+ $ea8dcbcb9ea1b556$export$7e924b3091a3bd18 as E,
896
990
  $6a7db85432448f7f$export$29bf1b5f2c56cf63 as F,
897
991
  $8a9cb279dc87e130$export$cabe61c495ee3649 as G,
898
992
  $6a7db85432448f7f$export$60278871457622de as H,
899
993
  $e7801be82b4b2a53$export$4debdb1a3f0fa79e as I,
900
- $c87311424ea30a05$export$e1865c3bedcd822b as J,
901
- $f645667febf57a63$export$f9762fab77588ecb as K,
902
- $c87311424ea30a05$export$186c6964ca17d99 as L,
903
- $507fabe10e71c6fb$export$98e20ec92f614cfe as M,
994
+ $ea8dcbcb9ea1b556$export$95185d699e05d4d7 as J,
995
+ $c87311424ea30a05$export$e1865c3bedcd822b as K,
996
+ $ea8dcbcb9ea1b556$export$9a302a45f65d0572 as L,
997
+ $f645667febf57a63$export$f9762fab77588ecb as M,
998
+ $507fabe10e71c6fb$export$887a228355cf7d95 as N,
999
+ $c87311424ea30a05$export$186c6964ca17d99 as O,
1000
+ $ea8dcbcb9ea1b556$export$13aea1a3cb5e3f1f as P,
1001
+ $507fabe10e71c6fb$export$98e20ec92f614cfe as Q,
904
1002
  $458b0a5536c1a7cf$export$40bfa8c7b0832715 as a,
905
- $c87311424ea30a05$export$fedb369cb70207f1 as b,
906
- $431fbd86ca7dc216$export$b204af158042fbac as c,
907
- $bbed8b41f857bcc0$export$24490316f764c430 as d,
908
- $03deb23ff14920c4$export$4eaf04e54aa8eed6 as e,
909
- $8a9cb279dc87e130$export$715c682d09d639cc as f,
910
- $d4ee10de306f2510$export$cd4e5573fbe2b576 as g,
911
- $d4ee10de306f2510$export$e58f029f0fbfdb29 as h,
912
- $d4ee10de306f2510$export$4282f70798064fe0 as i,
913
- $8a9cb279dc87e130$export$c2b7abe5d61ec696 as j,
914
- $8a9cb279dc87e130$export$525bc4921d56d4a as k,
915
- $507fabe10e71c6fb$export$b9b3dfddab17db27 as l,
916
- $507fabe10e71c6fb$export$ec71b4b83ac08ec3 as m,
917
- $a1ea59d68270f0dd$export$f8168d8dd8fd66e6 as n,
918
- $f4e2df6bd15f8569$export$98658e8c59125e6a as o,
919
- $b4b717babfbb907b$export$bebd5a1431fec25d as p,
920
- $b4b717babfbb907b$export$4c063cf1350e6fed as q,
921
- $3ad3f6e1647bc98d$export$80f3e147d781571c as r,
922
- $c87311424ea30a05$export$a11b0059900ceec8 as s,
923
- $c87311424ea30a05$export$6446a186d09e379e as t,
924
- $507fabe10e71c6fb$export$630ff653c5ada6a9 as u,
925
- $507fabe10e71c6fb$export$8397ddfc504fdb9a as v,
926
- $6179b936705e76d3$export$ae780daf29e6d456 as w,
927
- $431fbd86ca7dc216$export$f21a1ffae260145a as x,
928
- $f645667febf57a63$export$13f3202a3e5ddd5 as y,
929
- $7215afc6de606d6b$export$de79e2c695e052f3 as z
1003
+ $8ae05eaa5c114e9c$export$7f54fc3180508a52 as b,
1004
+ $c87311424ea30a05$export$fedb369cb70207f1 as c,
1005
+ $431fbd86ca7dc216$export$b204af158042fbac as d,
1006
+ $bbed8b41f857bcc0$export$24490316f764c430 as e,
1007
+ $03deb23ff14920c4$export$4eaf04e54aa8eed6 as f,
1008
+ $8a9cb279dc87e130$export$715c682d09d639cc as g,
1009
+ $d4ee10de306f2510$export$cd4e5573fbe2b576 as h,
1010
+ $d4ee10de306f2510$export$e58f029f0fbfdb29 as i,
1011
+ $d4ee10de306f2510$export$4282f70798064fe0 as j,
1012
+ $8a9cb279dc87e130$export$c2b7abe5d61ec696 as k,
1013
+ $8a9cb279dc87e130$export$525bc4921d56d4a as l,
1014
+ $507fabe10e71c6fb$export$b9b3dfddab17db27 as m,
1015
+ $507fabe10e71c6fb$export$ec71b4b83ac08ec3 as n,
1016
+ $a1ea59d68270f0dd$export$f8168d8dd8fd66e6 as o,
1017
+ $f4e2df6bd15f8569$export$98658e8c59125e6a as p,
1018
+ $b4b717babfbb907b$export$bebd5a1431fec25d as q,
1019
+ $b4b717babfbb907b$export$4c063cf1350e6fed as r,
1020
+ $3ad3f6e1647bc98d$export$80f3e147d781571c as s,
1021
+ $c87311424ea30a05$export$a11b0059900ceec8 as t,
1022
+ $c87311424ea30a05$export$6446a186d09e379e as u,
1023
+ $507fabe10e71c6fb$export$630ff653c5ada6a9 as v,
1024
+ $507fabe10e71c6fb$export$8397ddfc504fdb9a as w,
1025
+ $6179b936705e76d3$export$ae780daf29e6d456 as x,
1026
+ $431fbd86ca7dc216$export$f21a1ffae260145a as y,
1027
+ $f645667febf57a63$export$13f3202a3e5ddd5 as z
930
1028
  };
@@ -1,5 +1,5 @@
1
- import { b as $bdb11010cef70236$export$f680877a34711e37 } from "./utils-DGpXyJOJ.js";
2
- import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./useLabels-B49ptFDX.js";
1
+ import { c as $bdb11010cef70236$export$f680877a34711e37 } from "./utils-HC9_3Crc.js";
2
+ import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./useLabels-vzdDMGCX.js";
3
3
  function $d191a55c9702f145$export$8467354a121f1b9f(props) {
4
4
  let { id, label, "aria-labelledby": ariaLabelledby, "aria-label": ariaLabel, labelElementType = "label" } = props;
5
5
  id = $bdb11010cef70236$export$f680877a34711e37(id);
@@ -1,4 +1,4 @@
1
- import { b as $bdb11010cef70236$export$f680877a34711e37 } from "./utils-DGpXyJOJ.js";
1
+ import { c as $bdb11010cef70236$export$f680877a34711e37 } from "./utils-HC9_3Crc.js";
2
2
  function $313b98861ee5dd6c$export$d6875122194c7b44(props, defaultLabel) {
3
3
  let { id, "aria-label": label, "aria-labelledby": labelledBy } = props;
4
4
  id = $bdb11010cef70236$export$f680877a34711e37(id);
@@ -1,5 +1,5 @@
1
1
  import { version, useMemo, useCallback, useRef, useEffect } from "react";
2
- import { $ as $7af3f5b51489e0b5$export$253fe78d46329472, a as $7613b1592d41b092$export$6cd28814d92fa9c9, b as $d496c0a20b6e58ec$export$6c8a5aaad13c9852 } from "./SelectionManager-N8X7T_4D.js";
2
+ import { $ as $7af3f5b51489e0b5$export$253fe78d46329472, a as $7613b1592d41b092$export$6cd28814d92fa9c9, b as $d496c0a20b6e58ec$export$6c8a5aaad13c9852 } from "./SelectionManager-DbBiF5M8.js";
3
3
  function $cdc5a6778b766db2$export$a9d04c5684123369(value) {
4
4
  const pieces = version.split(".");
5
5
  const major = parseInt(pieces[0], 10);
@@ -1,7 +1,7 @@
1
- import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-BQvmiUqb.js";
1
+ import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-DYYO3Ns3.js";
2
2
  import { useMemo } from "react";
3
- const $5b160d28a433310d$var$localeSymbol = Symbol.for("react-aria.i18n.locale");
4
- const $5b160d28a433310d$var$stringsSymbol = Symbol.for("react-aria.i18n.strings");
3
+ const $5b160d28a433310d$var$localeSymbol = /* @__PURE__ */ Symbol.for("react-aria.i18n.locale");
4
+ const $5b160d28a433310d$var$stringsSymbol = /* @__PURE__ */ Symbol.for("react-aria.i18n.strings");
5
5
  let $5b160d28a433310d$var$cachedGlobalStrings = void 0;
6
6
  class $5b160d28a433310d$export$c17fa47878dc55b6 {
7
7
  /** Returns a localized string for the given key and locale. */
@@ -1,17 +1,17 @@
1
- import { a as $458b0a5536c1a7cf$export$40bfa8c7b0832715, e as $03deb23ff14920c4$export$4eaf04e54aa8eed6, n as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6, L as $c87311424ea30a05$export$186c6964ca17d99, s as $c87311424ea30a05$export$a11b0059900ceec8, b as $c87311424ea30a05$export$fedb369cb70207f1 } from "./useHover-Bycb7BsD.js";
1
+ import { b as $8ae05eaa5c114e9c$export$7f54fc3180508a52, a as $458b0a5536c1a7cf$export$40bfa8c7b0832715, f as $03deb23ff14920c4$export$4eaf04e54aa8eed6, o as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6, O as $c87311424ea30a05$export$186c6964ca17d99, t as $c87311424ea30a05$export$a11b0059900ceec8, c as $c87311424ea30a05$export$fedb369cb70207f1 } from "./useHover-CG39Ci3A.js";
2
2
  import { a as $9446cca9a3875146$export$cb6e0bb50bc19463, $ as $9446cca9a3875146$export$7d15b64cf5a3a4c4 } from "./number-7sOvrqo0.js";
3
- import { $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, b as $e5be200c675c3b3a$export$a763b9476acd3eb } from "./useFormValidation-DQeXkyLm.js";
3
+ import { $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, b as $e5be200c675c3b3a$export$a763b9476acd3eb } from "./useFormValidation-Dqzjv4jX.js";
4
4
  import { $ as $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5 } from "./NumberFormatter-DA8u1Ot7.js";
5
5
  import { useCallback, useEffect, useRef, useState, useMemo } from "react";
6
- import { c as $8ae05eaa5c114e9c$export$7f54fc3180508a52, a as $3ef42575df84b30b$export$9d1611c77c2fe928, b as $bdb11010cef70236$export$f680877a34711e37, o as $ff5963eb1fccf552$export$e08e3b67e392101e } from "./utils-DGpXyJOJ.js";
7
- import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-D2C6R0DK.js";
8
- import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-WUv2PdFO.js";
9
- import { $ as $9ab94262bd0047c7$export$420e68273165f4ec } from "./useFocusRing-D3b7Kh4P.js";
10
- import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "./useEvent-BD7Olibq.js";
11
- import { d as $2d73ec29415bd339$export$712718f7aec83d5 } from "./Input-CNNksOWg.js";
12
- import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-NETP-8H8.js";
13
- import { $ as $a916eb452884faea$export$b7a616150fdb9f44 } from "./useNumberFormatter-DGvuRCn7.js";
14
- import { d as $319e236875307eab$export$d10ae4f68404609a, c as $319e236875307eab$export$a9b970dcc4ae71a9 } from "./Button-BXjXzdW_.js";
6
+ import { a as $3ef42575df84b30b$export$9d1611c77c2fe928, c as $bdb11010cef70236$export$f680877a34711e37, n as $ff5963eb1fccf552$export$e08e3b67e392101e } from "./utils-HC9_3Crc.js";
7
+ import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-eGTqWSTd.js";
8
+ import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-BDF1K4E4.js";
9
+ import { $ as $9ab94262bd0047c7$export$420e68273165f4ec } from "./useFocusRing-WEswknAY.js";
10
+ import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "./useEvent-DoWvho2u.js";
11
+ import { d as $2d73ec29415bd339$export$712718f7aec83d5 } from "./Input-Cuw9UbNb.js";
12
+ import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-M3L6Ge2c.js";
13
+ import { $ as $a916eb452884faea$export$b7a616150fdb9f44 } from "./useNumberFormatter-BWOyCamK.js";
14
+ import { d as $319e236875307eab$export$d10ae4f68404609a, c as $319e236875307eab$export$a9b970dcc4ae71a9 } from "./Button-JRIu2BnS.js";
15
15
  const $6c7bd7858deea686$var$CURRENCY_SIGN_REGEX = new RegExp("^.*\\(.*\\).*$");
16
16
  const $6c7bd7858deea686$var$NUMBERING_SYSTEMS = [
17
17
  "latn",
@@ -291,8 +291,7 @@ function $d841c8010a73d545$export$4f384c9210e583c3(props, state, inputRef) {
291
291
  input.removeEventListener("beforeinput", onBeforeInputFallback, false);
292
292
  };
293
293
  }, [
294
- inputRef,
295
- onBeforeInputFallback
294
+ inputRef
296
295
  ]);
297
296
  let onBeforeInput = !$d841c8010a73d545$var$supportsNativeBeforeInputEvent() ? (e) => {
298
297
  let nextValue = e.target.value.slice(0, e.target.selectionStart) + e.data + e.target.value.slice(e.target.selectionEnd);
@@ -665,9 +664,16 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
665
664
  const _async = useRef(void 0);
666
665
  let { value, textValue, minValue, maxValue, isDisabled, isReadOnly, isRequired, onIncrement, onIncrementPage, onDecrement, onDecrementPage, onDecrementToMin, onIncrementToMax } = props;
667
666
  const stringFormatter = $fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault$1($a99895ee3dc79e61$exports), "@react-aria/spinbutton");
668
- const clearAsync = () => clearTimeout(_async.current);
667
+ let isSpinning = useRef(false);
668
+ const clearAsync = useCallback(() => {
669
+ clearTimeout(_async.current);
670
+ isSpinning.current = false;
671
+ }, []);
672
+ const clearAsyncEvent = $8ae05eaa5c114e9c$export$7f54fc3180508a52(() => {
673
+ clearAsync();
674
+ });
669
675
  useEffect(() => {
670
- return () => clearAsync();
676
+ return () => clearAsyncEvent();
671
677
  }, []);
672
678
  let onKeyDown = (e) => {
673
679
  if (e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || isReadOnly || e.nativeEvent.isComposing) return;
@@ -730,15 +736,22 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
730
736
  }, [
731
737
  ariaTextValue
732
738
  ]);
733
- const onIncrementPressStart = $8ae05eaa5c114e9c$export$7f54fc3180508a52((initialStepDelay) => {
739
+ let onPointerCancel = useCallback(() => {
734
740
  clearAsync();
741
+ }, [
742
+ clearAsync
743
+ ]);
744
+ const onIncrementPressStart = $8ae05eaa5c114e9c$export$7f54fc3180508a52((initialStepDelay) => {
745
+ clearAsyncEvent();
746
+ isSpinning.current = true;
735
747
  onIncrement === null || onIncrement === void 0 ? void 0 : onIncrement();
736
748
  _async.current = window.setTimeout(() => {
737
749
  if (maxValue === void 0 || isNaN(maxValue) || value === void 0 || isNaN(value) || value < maxValue) onIncrementPressStart(60);
738
750
  }, initialStepDelay);
739
751
  });
740
752
  const onDecrementPressStart = $8ae05eaa5c114e9c$export$7f54fc3180508a52((initialStepDelay) => {
741
- clearAsync();
753
+ clearAsyncEvent();
754
+ isSpinning.current = true;
742
755
  onDecrement === null || onDecrement === void 0 ? void 0 : onDecrement();
743
756
  _async.current = window.setTimeout(() => {
744
757
  if (minValue === void 0 || isNaN(minValue) || value === void 0 || isNaN(value) || value > minValue) onDecrementPressStart(60);
@@ -748,6 +761,21 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
748
761
  e.preventDefault();
749
762
  };
750
763
  let { addGlobalListener, removeAllGlobalListeners } = $03deb23ff14920c4$export$4eaf04e54aa8eed6();
764
+ let isUp = useRef(false);
765
+ let [isIncrementPressed, setIsIncrementPressed] = useState(null);
766
+ useEffect(() => {
767
+ if (isIncrementPressed === "touch") onIncrementPressStart(60);
768
+ else if (isIncrementPressed) onIncrementPressStart(400);
769
+ }, [
770
+ isIncrementPressed
771
+ ]);
772
+ let [isDecrementPressed, setIsDecrementPressed] = useState(null);
773
+ useEffect(() => {
774
+ if (isDecrementPressed === "touch") onDecrementPressStart(60);
775
+ else if (isDecrementPressed) onDecrementPressStart(400);
776
+ }, [
777
+ isDecrementPressed
778
+ ]);
751
779
  return {
752
780
  spinButtonProps: {
753
781
  role: "spinbutton",
@@ -763,25 +791,64 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
763
791
  onBlur
764
792
  },
765
793
  incrementButtonProps: {
766
- onPressStart: () => {
767
- onIncrementPressStart(400);
794
+ onPressStart: (e) => {
795
+ if (e.pointerType !== "touch") setIsIncrementPressed("mouse");
796
+ else {
797
+ if (_async.current) clearAsync();
798
+ addGlobalListener(window, "pointercancel", onPointerCancel, {
799
+ capture: true
800
+ });
801
+ isUp.current = false;
802
+ _async.current = window.setTimeout(() => {
803
+ setIsIncrementPressed("touch");
804
+ }, 600);
805
+ }
768
806
  addGlobalListener(window, "contextmenu", cancelContextMenu);
769
807
  },
770
- onPressEnd: () => {
808
+ onPressUp: (e) => {
809
+ if (e.pointerType === "touch") isUp.current = true;
771
810
  clearAsync();
772
811
  removeAllGlobalListeners();
812
+ setIsIncrementPressed(null);
813
+ },
814
+ onPressEnd: (e) => {
815
+ if (e.pointerType === "touch") {
816
+ if (!isSpinning.current && isUp.current) onIncrement === null || onIncrement === void 0 ? void 0 : onIncrement();
817
+ }
818
+ clearAsync();
819
+ isUp.current = false;
820
+ setIsIncrementPressed(null);
773
821
  },
774
822
  onFocus,
775
823
  onBlur
776
824
  },
777
825
  decrementButtonProps: {
778
- onPressStart: () => {
779
- onDecrementPressStart(400);
780
- addGlobalListener(window, "contextmenu", cancelContextMenu);
826
+ onPressStart: (e) => {
827
+ if (e.pointerType !== "touch") setIsDecrementPressed("mouse");
828
+ else {
829
+ if (_async.current) clearAsync();
830
+ addGlobalListener(window, "pointercancel", onPointerCancel, {
831
+ capture: true
832
+ });
833
+ isUp.current = false;
834
+ _async.current = window.setTimeout(() => {
835
+ setIsDecrementPressed("touch");
836
+ }, 600);
837
+ }
781
838
  },
782
- onPressEnd: () => {
839
+ onPressUp: (e) => {
840
+ if (e.pointerType === "touch") isUp.current = true;
783
841
  clearAsync();
784
842
  removeAllGlobalListeners();
843
+ setIsDecrementPressed(null);
844
+ },
845
+ onPressEnd: (e) => {
846
+ if (e.pointerType === "touch") {
847
+ if (!isSpinning.current && isUp.current) onDecrement === null || onDecrement === void 0 ? void 0 : onDecrement();
848
+ }
849
+ clearAsync();
850
+ isUp.current = false;
851
+ setIsDecrementPressed(null);
785
852
  },
786
853
  onFocus,
787
854
  onBlur