@eightshift/ui-components 6.0.8 → 6.0.10

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 (98) 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 +44 -57
  20. package/dist/assets/style-editor.css +44 -57
  21. package/dist/assets/style.css +44 -57
  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 +329 -156
  40. package/dist/components/draggable-list/draggable-list.js +1 -1
  41. package/dist/components/expandable/expandable.js +16 -13
  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.js +1 -1
  53. package/dist/components/responsive/mini-responsive.js +1 -1
  54. package/dist/components/select/async-multi-select.js +10 -10
  55. package/dist/components/select/async-select.js +10 -10
  56. package/dist/components/select/multi-select.js +10 -10
  57. package/dist/components/select/shared.js +3 -3
  58. package/dist/components/select/single-select.js +10 -10
  59. package/dist/components/slider/column-config-slider.js +3 -3
  60. package/dist/components/slider/slider.js +3 -3
  61. package/dist/components/smart-image/smart-image.js +1 -1
  62. package/dist/components/smart-image/worker-inline.js +1 -1
  63. package/dist/components/tabs/tabs.js +36 -17
  64. package/dist/components/toggle/switch.js +7 -7
  65. package/dist/components/toggle/toggle.js +1 -1
  66. package/dist/components/toggle-button/toggle-button.js +6 -6
  67. package/dist/components/tooltip/tooltip.js +10 -8
  68. package/dist/{context-BQvmiUqb.js → context-DYYO3Ns3.js} +9 -6
  69. package/dist/{filterDOMProps-D2C6R0DK.js → filterDOMProps-eGTqWSTd.js} +1 -1
  70. package/dist/{general-ChNQK6O9.js → general-C8Q0dvEx.js} +15 -14
  71. package/dist/{index-oFgxU4zs.js → index-sSixe2j_.js} +20 -20
  72. package/dist/index.js +1 -1
  73. package/dist/{proxy-DkQpcQgI.js → proxy-CcjltLEW.js} +272 -121
  74. package/dist/{shared-DOxXagm0.js → shared-Bg9lx3pE.js} +20 -20
  75. package/dist/{textSelection-CwHUtNVX.js → textSelection-Cq_Br7RW.js} +1 -1
  76. package/dist/{useAsyncList-D52mQcrH.js → useAsyncList-DsZvQXls.js} +5 -2
  77. package/dist/{useButton-DdZrS1Kz.js → useButton-CeuyDay5.js} +4 -4
  78. package/dist/{useEvent-BD7Olibq.js → useEvent-DoWvho2u.js} +2 -3
  79. package/dist/{useFilter-bhxeEDg8.js → useFilter-DYtfYPua.js} +1 -1
  80. package/dist/{useFocusRing-D3b7Kh4P.js → useFocusRing-WEswknAY.js} +1 -1
  81. package/dist/{useFormReset-WUv2PdFO.js → useFormReset-BDF1K4E4.js} +2 -3
  82. package/dist/{useFormValidation-DQeXkyLm.js → useFormValidation-Dqzjv4jX.js} +2 -5
  83. package/dist/{useHover-Bycb7BsD.js → useHover-CG39Ci3A.js} +164 -66
  84. package/dist/{useLabel-Bnv4-T24.js → useLabel--3fT2XKM.js} +2 -2
  85. package/dist/{useLabels-B49ptFDX.js → useLabels-vzdDMGCX.js} +1 -1
  86. package/dist/{useListState-ZKhRO8ML.js → useListState-Bya9g7W8.js} +1 -1
  87. package/dist/{useLocalizedStringFormatter-NETP-8H8.js → useLocalizedStringFormatter-M3L6Ge2c.js} +3 -3
  88. package/dist/{useNumberField-D2fUHql3.js → useNumberField-D6lsi3Vu.js} +91 -24
  89. package/dist/{useNumberFormatter-DGvuRCn7.js → useNumberFormatter-BWOyCamK.js} +1 -1
  90. package/dist/{usePress-B8OteQMu.js → usePress-B9w0X4Ur.js} +168 -180
  91. package/dist/{useSingleSelectListState-BBTu4shO.js → useSingleSelectListState-D9SqGLJ0.js} +2 -2
  92. package/dist/{useToggle-BZhaYwZl.js → useToggle-Deq2xxQV.js} +5 -5
  93. package/dist/{useToggleState-VkXJjsru.js → useToggleState-j3o1PvdS.js} +1 -1
  94. package/dist/utilities/general.js +1 -1
  95. package/dist/utilities/index.js +1 -1
  96. package/dist/{utils-DGpXyJOJ.js → utils-HC9_3Crc.js} +20 -31
  97. package/dist/workers/image-analysis.worker.js +1 -1
  98. package/package.json +24 -28
@@ -1,27 +1,27 @@
1
- import { j as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, $ as $64fa3d84918910a7$export$29f1550f4b0d4415, g as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "./utils-DGpXyJOJ.js";
2
- import { r as reactDomExports } from "./index-oFgxU4zs.js";
3
- import $dbSRa$react__default, { useEffect, useState, useCallback, useRef, forwardRef, createContext } from "react";
4
- import { C as $c87311424ea30a05$export$78551043582a6a98, a as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./useHover-Bycb7BsD.js";
1
+ import { b as $8ae05eaa5c114e9c$export$7f54fc3180508a52, C as $c87311424ea30a05$export$78551043582a6a98, a as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./useHover-CG39Ci3A.js";
5
2
  import { $ as $9446cca9a3875146$export$7d15b64cf5a3a4c4 } from "./number-7sOvrqo0.js";
6
- import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-BQvmiUqb.js";
7
- import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-D2C6R0DK.js";
3
+ import $dbSRa$react__default, { useEffect, useState, useRef, useCallback, forwardRef, createContext } from "react";
4
+ import { b as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, $ as $64fa3d84918910a7$export$29f1550f4b0d4415, g as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "./utils-HC9_3Crc.js";
5
+ import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-DYYO3Ns3.js";
6
+ import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-eGTqWSTd.js";
8
7
  function $9daab02d461809db$var$hasResizeObserver() {
9
8
  return typeof window.ResizeObserver !== "undefined";
10
9
  }
11
10
  function $9daab02d461809db$export$683480f191c0e3ea(options) {
12
11
  const { ref, box, onResize } = options;
12
+ let onResizeEvent = $8ae05eaa5c114e9c$export$7f54fc3180508a52(onResize);
13
13
  useEffect(() => {
14
14
  let element = ref === null || ref === void 0 ? void 0 : ref.current;
15
15
  if (!element) return;
16
16
  if (!$9daab02d461809db$var$hasResizeObserver()) {
17
- window.addEventListener("resize", onResize, false);
17
+ window.addEventListener("resize", onResizeEvent, false);
18
18
  return () => {
19
- window.removeEventListener("resize", onResize, false);
19
+ window.removeEventListener("resize", onResizeEvent, false);
20
20
  };
21
21
  } else {
22
22
  const resizeObserverInstance = new window.ResizeObserver((entries) => {
23
23
  if (!entries.length) return;
24
- onResize();
24
+ onResizeEvent();
25
25
  });
26
26
  resizeObserverInstance.observe(element, {
27
27
  box
@@ -31,71 +31,10 @@ function $9daab02d461809db$export$683480f191c0e3ea(options) {
31
31
  };
32
32
  }
33
33
  }, [
34
- onResize,
35
34
  ref,
36
35
  box
37
36
  ]);
38
37
  }
39
- function $d3f049242431219c$export$6d3443f2c48bfc20(ref, isReady = true) {
40
- let [isEntering, setEntering] = useState(true);
41
- let isAnimationReady = isEntering && isReady;
42
- $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
43
- if (isAnimationReady && ref.current && "getAnimations" in ref.current) {
44
- for (let animation of ref.current.getAnimations()) if (animation instanceof CSSTransition) animation.cancel();
45
- }
46
- }, [
47
- ref,
48
- isAnimationReady
49
- ]);
50
- $d3f049242431219c$var$useAnimation(ref, isAnimationReady, useCallback(() => setEntering(false), []));
51
- return isAnimationReady;
52
- }
53
- function $d3f049242431219c$export$45fda7c47f93fd48(ref, isOpen) {
54
- let [exitState, setExitState] = useState(isOpen ? "open" : "closed");
55
- switch (exitState) {
56
- case "open":
57
- if (!isOpen) setExitState("exiting");
58
- break;
59
- case "closed":
60
- case "exiting":
61
- if (isOpen) setExitState("open");
62
- break;
63
- }
64
- let isExiting = exitState === "exiting";
65
- $d3f049242431219c$var$useAnimation(ref, isExiting, useCallback(() => {
66
- setExitState((state) => state === "exiting" ? "closed" : state);
67
- }, []));
68
- return isExiting;
69
- }
70
- function $d3f049242431219c$var$useAnimation(ref, isActive, onEnd) {
71
- $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
72
- if (isActive && ref.current) {
73
- if (!("getAnimations" in ref.current)) {
74
- onEnd();
75
- return;
76
- }
77
- let animations = ref.current.getAnimations();
78
- if (animations.length === 0) {
79
- onEnd();
80
- return;
81
- }
82
- let canceled = false;
83
- Promise.all(animations.map((a) => a.finished)).then(() => {
84
- if (!canceled) reactDomExports.flushSync(() => {
85
- onEnd();
86
- });
87
- }).catch(() => {
88
- });
89
- return () => {
90
- canceled = true;
91
- };
92
- }
93
- }, [
94
- ref,
95
- isActive,
96
- onEnd
97
- ]);
98
- }
99
38
  const $edcf132a9284368a$var$AXIS = {
100
39
  top: "top",
101
40
  bottom: "top",
@@ -121,25 +60,25 @@ const $edcf132a9284368a$var$TOTAL_SIZE = {
121
60
  height: "totalHeight"
122
61
  };
123
62
  const $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE = {};
124
- let $edcf132a9284368a$var$visualViewport = typeof document !== "undefined" ? window.visualViewport : null;
125
- function $edcf132a9284368a$var$getContainerDimensions(containerNode) {
63
+ let $edcf132a9284368a$var$getVisualViewport = () => typeof document !== "undefined" ? window.visualViewport : null;
64
+ function $edcf132a9284368a$var$getContainerDimensions(containerNode, visualViewport) {
126
65
  let width = 0, height = 0, totalWidth = 0, totalHeight = 0, top = 0, left = 0;
127
66
  let scroll = {};
128
67
  var _visualViewport_scale;
129
- let isPinchZoomedIn = ((_visualViewport_scale = $edcf132a9284368a$var$visualViewport === null || $edcf132a9284368a$var$visualViewport === void 0 ? void 0 : $edcf132a9284368a$var$visualViewport.scale) !== null && _visualViewport_scale !== void 0 ? _visualViewport_scale : 1) > 1;
130
- if (containerNode.tagName === "BODY") {
68
+ let isPinchZoomedIn = ((_visualViewport_scale = visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.scale) !== null && _visualViewport_scale !== void 0 ? _visualViewport_scale : 1) > 1;
69
+ if (containerNode.tagName === "BODY" || containerNode.tagName === "HTML") {
131
70
  let documentElement = document.documentElement;
132
71
  totalWidth = documentElement.clientWidth;
133
72
  totalHeight = documentElement.clientHeight;
134
73
  var _visualViewport_width;
135
- width = (_visualViewport_width = $edcf132a9284368a$var$visualViewport === null || $edcf132a9284368a$var$visualViewport === void 0 ? void 0 : $edcf132a9284368a$var$visualViewport.width) !== null && _visualViewport_width !== void 0 ? _visualViewport_width : totalWidth;
74
+ width = (_visualViewport_width = visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.width) !== null && _visualViewport_width !== void 0 ? _visualViewport_width : totalWidth;
136
75
  var _visualViewport_height;
137
- height = (_visualViewport_height = $edcf132a9284368a$var$visualViewport === null || $edcf132a9284368a$var$visualViewport === void 0 ? void 0 : $edcf132a9284368a$var$visualViewport.height) !== null && _visualViewport_height !== void 0 ? _visualViewport_height : totalHeight;
76
+ height = (_visualViewport_height = visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.height) !== null && _visualViewport_height !== void 0 ? _visualViewport_height : totalHeight;
138
77
  scroll.top = documentElement.scrollTop || containerNode.scrollTop;
139
78
  scroll.left = documentElement.scrollLeft || containerNode.scrollLeft;
140
- if ($edcf132a9284368a$var$visualViewport) {
141
- top = $edcf132a9284368a$var$visualViewport.offsetTop;
142
- left = $edcf132a9284368a$var$visualViewport.offsetLeft;
79
+ if (visualViewport) {
80
+ top = visualViewport.offsetTop;
81
+ left = visualViewport.offsetLeft;
143
82
  }
144
83
  } else {
145
84
  ({ width, height, top, left } = $edcf132a9284368a$var$getOffset(containerNode, false));
@@ -152,9 +91,9 @@ function $edcf132a9284368a$var$getContainerDimensions(containerNode) {
152
91
  scroll.top = 0;
153
92
  scroll.left = 0;
154
93
  var _visualViewport_pageTop;
155
- top = (_visualViewport_pageTop = $edcf132a9284368a$var$visualViewport === null || $edcf132a9284368a$var$visualViewport === void 0 ? void 0 : $edcf132a9284368a$var$visualViewport.pageTop) !== null && _visualViewport_pageTop !== void 0 ? _visualViewport_pageTop : 0;
94
+ top = (_visualViewport_pageTop = visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.pageTop) !== null && _visualViewport_pageTop !== void 0 ? _visualViewport_pageTop : 0;
156
95
  var _visualViewport_pageLeft;
157
- left = (_visualViewport_pageLeft = $edcf132a9284368a$var$visualViewport === null || $edcf132a9284368a$var$visualViewport === void 0 ? void 0 : $edcf132a9284368a$var$visualViewport.pageLeft) !== null && _visualViewport_pageLeft !== void 0 ? _visualViewport_pageLeft : 0;
96
+ left = (_visualViewport_pageLeft = visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.pageLeft) !== null && _visualViewport_pageLeft !== void 0 ? _visualViewport_pageLeft : 0;
158
97
  }
159
98
  return {
160
99
  width,
@@ -178,10 +117,10 @@ function $edcf132a9284368a$var$getDelta(axis, offset, size, boundaryDimensions,
178
117
  var _containerDimensions_scroll_axis;
179
118
  let containerScroll = (_containerDimensions_scroll_axis = containerDimensions.scroll[axis]) !== null && _containerDimensions_scroll_axis !== void 0 ? _containerDimensions_scroll_axis : 0;
180
119
  let boundarySize = boundaryDimensions[$edcf132a9284368a$var$AXIS_SIZE[axis]];
181
- let boundaryStartEdge = boundaryDimensions.scroll[$edcf132a9284368a$var$AXIS[axis]] + padding;
182
- let boundaryEndEdge = boundarySize + boundaryDimensions.scroll[$edcf132a9284368a$var$AXIS[axis]] - padding;
183
- let startEdgeOffset = offset - containerScroll + containerOffsetWithBoundary[axis] - boundaryDimensions[$edcf132a9284368a$var$AXIS[axis]];
184
- let endEdgeOffset = offset - containerScroll + size + containerOffsetWithBoundary[axis] - boundaryDimensions[$edcf132a9284368a$var$AXIS[axis]];
120
+ let boundaryStartEdge = containerOffsetWithBoundary[axis] + boundaryDimensions.scroll[$edcf132a9284368a$var$AXIS[axis]] + padding;
121
+ let boundaryEndEdge = containerOffsetWithBoundary[axis] + boundaryDimensions.scroll[$edcf132a9284368a$var$AXIS[axis]] + boundarySize - padding;
122
+ let startEdgeOffset = offset - containerScroll + boundaryDimensions.scroll[$edcf132a9284368a$var$AXIS[axis]] + containerOffsetWithBoundary[axis] - boundaryDimensions[$edcf132a9284368a$var$AXIS[axis]];
123
+ let endEdgeOffset = offset - containerScroll + size + boundaryDimensions.scroll[$edcf132a9284368a$var$AXIS[axis]] + containerOffsetWithBoundary[axis] - boundaryDimensions[$edcf132a9284368a$var$AXIS[axis]];
185
124
  if (startEdgeOffset < boundaryStartEdge) return boundaryStartEdge - startEdgeOffset;
186
125
  else if (endEdgeOffset > boundaryEndEdge) return Math.max(boundaryEndEdge - endEdgeOffset, boundaryStartEdge - startEdgeOffset);
187
126
  else return 0;
@@ -213,7 +152,7 @@ function $edcf132a9284368a$var$parsePlacement(input) {
213
152
  };
214
153
  return $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE[input];
215
154
  }
216
- function $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset) {
155
+ function $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset, containerDimensions) {
217
156
  let { placement, crossPlacement, axis, crossAxis, size, crossSize } = placementInfo;
218
157
  let position = {};
219
158
  var _childOffset_crossAxis;
@@ -228,39 +167,48 @@ function $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions,
228
167
  const maxPosition = childOffset[crossAxis] + childOffset[crossSize] - arrowSize - arrowBoundaryOffset;
229
168
  position[crossAxis] = $9446cca9a3875146$export$7d15b64cf5a3a4c4(position[crossAxis], minPosition, maxPosition);
230
169
  if (placement === axis) {
231
- const containerHeight = isContainerPositioned ? containerOffsetWithBoundary[size] : boundaryDimensions[$edcf132a9284368a$var$TOTAL_SIZE[size]];
170
+ let containerHeight = isContainerPositioned ? containerDimensions[size] : containerDimensions[$edcf132a9284368a$var$TOTAL_SIZE[size]];
232
171
  position[$edcf132a9284368a$var$FLIPPED_DIRECTION[axis]] = Math.floor(containerHeight - childOffset[axis] + offset);
233
172
  } else position[axis] = Math.floor(childOffset[axis] + childOffset[size] + offset);
234
173
  return position;
235
174
  }
236
- function $edcf132a9284368a$var$getMaxHeight(position, boundaryDimensions, containerOffsetWithBoundary, isContainerPositioned, margins, padding, overlayHeight, heightGrowthDirection) {
237
- const containerHeight = isContainerPositioned ? containerOffsetWithBoundary.height : boundaryDimensions[$edcf132a9284368a$var$TOTAL_SIZE.height];
238
- var _position_bottom;
239
- let overlayTop = position.top != null ? containerOffsetWithBoundary.top + position.top : containerOffsetWithBoundary.top + (containerHeight - ((_position_bottom = position.bottom) !== null && _position_bottom !== void 0 ? _position_bottom : 0) - overlayHeight);
240
- var _boundaryDimensions_scroll_top, _margins_top, _margins_bottom, _boundaryDimensions_scroll_top1, _margins_top1, _margins_bottom1;
175
+ function $edcf132a9284368a$var$getMaxHeight(position, boundaryDimensions, containerOffsetWithBoundary, isContainerPositioned, margins, padding, overlayHeight, heightGrowthDirection, containerDimensions, isContainerDescendentOfBoundary, visualViewport) {
176
+ var _position_bottom, _containerDimensions_scroll_top;
177
+ let overlayTop = (position.top != null ? position.top : containerDimensions[$edcf132a9284368a$var$TOTAL_SIZE.height] - ((_position_bottom = position.bottom) !== null && _position_bottom !== void 0 ? _position_bottom : 0) - overlayHeight) - ((_containerDimensions_scroll_top = containerDimensions.scroll.top) !== null && _containerDimensions_scroll_top !== void 0 ? _containerDimensions_scroll_top : 0);
178
+ let boundaryToContainerTransformOffset = isContainerDescendentOfBoundary ? containerOffsetWithBoundary.top : 0;
179
+ var _visualViewport_offsetTop, _visualViewport_offsetTop1, _visualViewport_height;
180
+ let boundingRect = {
181
+ // This should be boundary top in container coord system vs viewport top in container coord system
182
+ // For the viewport top, there are several cases
183
+ // 1. pinchzoom case where we want the viewports offset top as top here
184
+ // 2. case where container is offset from the boundary and is contained by the boundary. In this case the top we want here is NOT 0, we want to take boundary's top even though is is a negative number OR the visual viewport, whichever is more restrictive
185
+ top: Math.max(boundaryDimensions.top + boundaryToContainerTransformOffset, ((_visualViewport_offsetTop = visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.offsetTop) !== null && _visualViewport_offsetTop !== void 0 ? _visualViewport_offsetTop : boundaryDimensions.top) + boundaryToContainerTransformOffset),
186
+ bottom: Math.min(boundaryDimensions.top + boundaryDimensions.height + boundaryToContainerTransformOffset, ((_visualViewport_offsetTop1 = visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.offsetTop) !== null && _visualViewport_offsetTop1 !== void 0 ? _visualViewport_offsetTop1 : 0) + ((_visualViewport_height = visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.height) !== null && _visualViewport_height !== void 0 ? _visualViewport_height : 0))
187
+ };
188
+ var _margins_top, _margins_bottom, _margins_top1, _margins_bottom1;
241
189
  let maxHeight = heightGrowthDirection !== "top" ? (
242
190
  // We want the distance between the top of the overlay to the bottom of the boundary
243
- Math.max(0, boundaryDimensions.height + boundaryDimensions.top + ((_boundaryDimensions_scroll_top = boundaryDimensions.scroll.top) !== null && _boundaryDimensions_scroll_top !== void 0 ? _boundaryDimensions_scroll_top : 0) - overlayTop - (((_margins_top = margins.top) !== null && _margins_top !== void 0 ? _margins_top : 0) + ((_margins_bottom = margins.bottom) !== null && _margins_bottom !== void 0 ? _margins_bottom : 0) + padding))
244
- ) : Math.max(0, overlayTop + overlayHeight - (boundaryDimensions.top + ((_boundaryDimensions_scroll_top1 = boundaryDimensions.scroll.top) !== null && _boundaryDimensions_scroll_top1 !== void 0 ? _boundaryDimensions_scroll_top1 : 0)) - (((_margins_top1 = margins.top) !== null && _margins_top1 !== void 0 ? _margins_top1 : 0) + ((_margins_bottom1 = margins.bottom) !== null && _margins_bottom1 !== void 0 ? _margins_bottom1 : 0) + padding));
245
- return Math.min(boundaryDimensions.height - padding * 2, maxHeight);
191
+ Math.max(0, boundingRect.bottom - overlayTop - (((_margins_top = margins.top) !== null && _margins_top !== void 0 ? _margins_top : 0) + ((_margins_bottom = margins.bottom) !== null && _margins_bottom !== void 0 ? _margins_bottom : 0) + padding))
192
+ ) : Math.max(0, overlayTop + overlayHeight - boundingRect.top - (((_margins_top1 = margins.top) !== null && _margins_top1 !== void 0 ? _margins_top1 : 0) + ((_margins_bottom1 = margins.bottom) !== null && _margins_bottom1 !== void 0 ? _margins_bottom1 : 0) + padding));
193
+ return maxHeight;
246
194
  }
247
- function $edcf132a9284368a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding, placementInfo) {
195
+ function $edcf132a9284368a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding, placementInfo, containerDimensions, isContainerDescendentOfBoundary) {
248
196
  let { placement, axis, size } = placementInfo;
249
- var _boundaryDimensions_scroll_axis, _margins_axis;
250
- if (placement === axis) return Math.max(0, childOffset[axis] - boundaryDimensions[axis] - ((_boundaryDimensions_scroll_axis = boundaryDimensions.scroll[axis]) !== null && _boundaryDimensions_scroll_axis !== void 0 ? _boundaryDimensions_scroll_axis : 0) + containerOffsetWithBoundary[axis] - ((_margins_axis = margins[axis]) !== null && _margins_axis !== void 0 ? _margins_axis : 0) - margins[$edcf132a9284368a$var$FLIPPED_DIRECTION[axis]] - padding);
251
- var _margins_axis1;
252
- return Math.max(0, boundaryDimensions[size] + boundaryDimensions[axis] + boundaryDimensions.scroll[axis] - containerOffsetWithBoundary[axis] - childOffset[axis] - childOffset[size] - ((_margins_axis1 = margins[axis]) !== null && _margins_axis1 !== void 0 ? _margins_axis1 : 0) - margins[$edcf132a9284368a$var$FLIPPED_DIRECTION[axis]] - padding);
197
+ var _containerDimensions_scroll_axis, _margins_axis;
198
+ if (placement === axis) return Math.max(0, childOffset[axis] - ((_containerDimensions_scroll_axis = containerDimensions.scroll[axis]) !== null && _containerDimensions_scroll_axis !== void 0 ? _containerDimensions_scroll_axis : 0) - (boundaryDimensions[axis] + (isContainerDescendentOfBoundary ? containerOffsetWithBoundary[axis] : 0)) - ((_margins_axis = margins[axis]) !== null && _margins_axis !== void 0 ? _margins_axis : 0) - margins[$edcf132a9284368a$var$FLIPPED_DIRECTION[axis]] - padding);
199
+ var _containerDimensions_scroll_axis1, _margins_axis1;
200
+ return Math.max(0, boundaryDimensions[size] + boundaryDimensions[axis] + (isContainerDescendentOfBoundary ? containerOffsetWithBoundary[axis] : 0) - childOffset[axis] - childOffset[size] + ((_containerDimensions_scroll_axis1 = containerDimensions.scroll[axis]) !== null && _containerDimensions_scroll_axis1 !== void 0 ? _containerDimensions_scroll_axis1 : 0) - ((_margins_axis1 = margins[axis]) !== null && _margins_axis1 !== void 0 ? _margins_axis1 : 0) - margins[$edcf132a9284368a$var$FLIPPED_DIRECTION[axis]] - padding);
253
201
  }
254
- function $edcf132a9284368a$export$6839422d1f33cee9(placementInput, childOffset, overlaySize, scrollSize, margins, padding, flip, boundaryDimensions, containerDimensions, containerOffsetWithBoundary, offset, crossOffset, isContainerPositioned, userSetMaxHeight, arrowSize, arrowBoundaryOffset) {
202
+ function $edcf132a9284368a$export$6839422d1f33cee9(placementInput, childOffset, overlaySize, scrollSize, margins, padding, flip, boundaryDimensions, containerDimensions, containerOffsetWithBoundary, offset, crossOffset, isContainerPositioned, userSetMaxHeight, arrowSize, arrowBoundaryOffset, isContainerDescendentOfBoundary, visualViewport) {
255
203
  let placementInfo = $edcf132a9284368a$var$parsePlacement(placementInput);
256
204
  let { size, crossAxis, crossSize, placement, crossPlacement } = placementInfo;
257
- let position = $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset);
205
+ let position = $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset, containerDimensions);
258
206
  let normalizedOffset = offset;
259
- let space = $edcf132a9284368a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding + offset, placementInfo);
260
- if (flip && scrollSize[size] > space) {
207
+ let space = $edcf132a9284368a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding + offset, placementInfo, containerDimensions, isContainerDescendentOfBoundary);
208
+ if (flip && overlaySize[size] > space) {
261
209
  let flippedPlacementInfo = $edcf132a9284368a$var$parsePlacement(`${$edcf132a9284368a$var$FLIPPED_DIRECTION[placement]} ${crossPlacement}`);
262
- let flippedPosition = $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, flippedPlacementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset);
263
- let flippedSpace = $edcf132a9284368a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding + offset, flippedPlacementInfo);
210
+ let flippedPosition = $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, flippedPlacementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset, containerDimensions);
211
+ let flippedSpace = $edcf132a9284368a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding + offset, flippedPlacementInfo, containerDimensions, isContainerDescendentOfBoundary);
264
212
  if (flippedSpace > space) {
265
213
  placementInfo = flippedPlacementInfo;
266
214
  position = flippedPosition;
@@ -277,10 +225,10 @@ function $edcf132a9284368a$export$6839422d1f33cee9(placementInput, childOffset,
277
225
  }
278
226
  let delta = $edcf132a9284368a$var$getDelta(crossAxis, position[crossAxis], overlaySize[crossSize], boundaryDimensions, containerDimensions, padding, containerOffsetWithBoundary);
279
227
  position[crossAxis] += delta;
280
- let maxHeight = $edcf132a9284368a$var$getMaxHeight(position, boundaryDimensions, containerOffsetWithBoundary, isContainerPositioned, margins, padding, overlaySize.height, heightGrowthDirection);
228
+ let maxHeight = $edcf132a9284368a$var$getMaxHeight(position, boundaryDimensions, containerOffsetWithBoundary, isContainerPositioned, margins, padding, overlaySize.height, heightGrowthDirection, containerDimensions, isContainerDescendentOfBoundary, visualViewport);
281
229
  if (userSetMaxHeight && userSetMaxHeight < maxHeight) maxHeight = userSetMaxHeight;
282
230
  overlaySize.height = Math.min(overlaySize.height, maxHeight);
283
- position = $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, normalizedOffset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset);
231
+ position = $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, normalizedOffset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset, containerDimensions);
284
232
  delta = $edcf132a9284368a$var$getDelta(crossAxis, position[crossAxis], overlaySize[crossSize], boundaryDimensions, containerDimensions, padding, containerOffsetWithBoundary);
285
233
  position[crossAxis] += delta;
286
234
  let arrowPosition = {};
@@ -314,6 +262,7 @@ function $edcf132a9284368a$export$6839422d1f33cee9(placementInput, childOffset,
314
262
  }
315
263
  function $edcf132a9284368a$export$b3ceb0cbf1056d98(opts) {
316
264
  let { placement, targetNode, overlayNode, scrollNode, padding, shouldFlip, boundaryElement, offset, crossOffset, maxHeight, arrowSize = 0, arrowBoundaryOffset = 0 } = opts;
265
+ let visualViewport = $edcf132a9284368a$var$getVisualViewport();
317
266
  let container = overlayNode instanceof HTMLElement ? $edcf132a9284368a$var$getContainingBlock(overlayNode) : document.documentElement;
318
267
  let isViewportContainer = container === document.documentElement;
319
268
  const containerPositionStyle = window.getComputedStyle(container).position;
@@ -331,14 +280,11 @@ function $edcf132a9284368a$export$b3ceb0cbf1056d98(opts) {
331
280
  var _margins_top, _margins_bottom;
332
281
  overlaySize.height += ((_margins_top = margins.top) !== null && _margins_top !== void 0 ? _margins_top : 0) + ((_margins_bottom = margins.bottom) !== null && _margins_bottom !== void 0 ? _margins_bottom : 0);
333
282
  let scrollSize = $edcf132a9284368a$var$getScroll(scrollNode);
334
- let boundaryDimensions = $edcf132a9284368a$var$getContainerDimensions(boundaryElement);
335
- let containerDimensions = $edcf132a9284368a$var$getContainerDimensions(container);
336
- let containerOffsetWithBoundary = boundaryElement.tagName === "BODY" ? $edcf132a9284368a$var$getOffset(container, false) : $edcf132a9284368a$var$getPosition(container, boundaryElement, false);
337
- if (container.tagName === "HTML" && boundaryElement.tagName === "BODY") {
338
- containerDimensions.scroll.top = 0;
339
- containerDimensions.scroll.left = 0;
340
- }
341
- return $edcf132a9284368a$export$6839422d1f33cee9(placement, childOffset, overlaySize, scrollSize, margins, padding, shouldFlip, boundaryDimensions, containerDimensions, containerOffsetWithBoundary, offset, crossOffset, isContainerPositioned, maxHeight, arrowSize, arrowBoundaryOffset);
283
+ let boundaryDimensions = $edcf132a9284368a$var$getContainerDimensions(boundaryElement, visualViewport);
284
+ let containerDimensions = $edcf132a9284368a$var$getContainerDimensions(container, visualViewport);
285
+ let containerOffsetWithBoundary = $edcf132a9284368a$var$getPosition(boundaryElement, container, false);
286
+ let isContainerDescendentOfBoundary = boundaryElement.contains(container);
287
+ return $edcf132a9284368a$export$6839422d1f33cee9(placement, childOffset, overlaySize, scrollSize, margins, padding, shouldFlip, boundaryDimensions, containerDimensions, containerOffsetWithBoundary, offset, crossOffset, isContainerPositioned, maxHeight, arrowSize, arrowBoundaryOffset, isContainerDescendentOfBoundary, visualViewport);
342
288
  }
343
289
  function $edcf132a9284368a$export$4b834cebd9e5cebe(node, ignoreScale) {
344
290
  let { top, left, width, height } = node.getBoundingClientRect();
@@ -642,11 +588,9 @@ const $44f671af83e7d9e0$export$746d02f47f4d381 = /* @__PURE__ */ forwardRef(func
642
588
  });
643
589
  export {
644
590
  $fc909762b330b746$export$61c6a8c84e605fb6 as $,
645
- $d3f049242431219c$export$45fda7c47f93fd48 as a,
646
- $d3f049242431219c$export$6d3443f2c48bfc20 as b,
647
- $2a41e45df1593e64$export$d39e1813b3bdd0e1 as c,
648
- $44f671af83e7d9e0$export$2de4954e8ae13b9f as d,
649
- $44f671af83e7d9e0$export$746d02f47f4d381 as e,
650
- $9daab02d461809db$export$683480f191c0e3ea as f,
651
- $dd149f63282afbbf$export$f6211563215e3b37 as g
591
+ $2a41e45df1593e64$export$d39e1813b3bdd0e1 as a,
592
+ $44f671af83e7d9e0$export$2de4954e8ae13b9f as b,
593
+ $44f671af83e7d9e0$export$746d02f47f4d381 as c,
594
+ $9daab02d461809db$export$683480f191c0e3ea as d,
595
+ $dd149f63282afbbf$export$f6211563215e3b37 as e
652
596
  };
@@ -1,20 +1,20 @@
1
- import { a as $3ef42575df84b30b$export$9d1611c77c2fe928, b as $bdb11010cef70236$export$f680877a34711e37, $ as $64fa3d84918910a7$export$29f1550f4b0d4415, d as $64fa3d84918910a7$export$fabf2dc03a41866e, e as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, g as $64fa3d84918910a7$export$4d86445c2cf5e3, h as $64fa3d84918910a7$export$2881499e37b75b9a, k as $df56164dff5785e2$export$4338b53315abf666, l as $5dc95899b306f630$export$c9058316764c140e, f as $64fa3d84918910a7$export$ef03459518577ad4 } from "./utils-DGpXyJOJ.js";
2
- import { a as $2baaea4c71418dea$export$294aa081a6c6f55d, $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "./FieldError-DwBG6m1U.js";
1
+ import { a as $3ef42575df84b30b$export$9d1611c77c2fe928, c as $bdb11010cef70236$export$f680877a34711e37, $ as $64fa3d84918910a7$export$29f1550f4b0d4415, d as $64fa3d84918910a7$export$fabf2dc03a41866e, e as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, g as $64fa3d84918910a7$export$4d86445c2cf5e3, h as $64fa3d84918910a7$export$2881499e37b75b9a, j as $df56164dff5785e2$export$4338b53315abf666, k as $5dc95899b306f630$export$c9058316764c140e, f as $64fa3d84918910a7$export$ef03459518577ad4 } from "./utils-HC9_3Crc.js";
2
+ import { a as $2baaea4c71418dea$export$294aa081a6c6f55d, $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "./FieldError-DmVwL6Dj.js";
3
3
  import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "./Form-Cq3fu75_.js";
4
- import { a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "./Label-D8a3eYb-.js";
4
+ import { a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "./Label-DPWyf-gp.js";
5
5
  import { $ as $1d5b8b8664671ef2$export$c9549807523555e0 } from "./SelectionIndicator-D7WMzeAW.js";
6
- import { $ as $c8a5a149f625efcf$export$758399f318e6385a } from "./SharedElementTransition-BDT84GtD.js";
7
- import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "./Text-ztX6G1zR.js";
8
- import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-D2C6R0DK.js";
6
+ import { $ as $c8a5a149f625efcf$export$758399f318e6385a } from "./SharedElementTransition-B_vnQ1uR.js";
7
+ import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "./Text-Dae33gHp.js";
8
+ import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-eGTqWSTd.js";
9
9
  import $dbSRa$react__default, { useMemo, useState, forwardRef, createContext } from "react";
10
- import { a as $e93e671b31057976$export$b8473d3665f3a75a, $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10 } from "./useFormValidation-DQeXkyLm.js";
11
- import { $ as $f645667febf57a63$export$4c014de7c8940b4c, x as $431fbd86ca7dc216$export$f21a1ffae260145a, a as $458b0a5536c1a7cf$export$40bfa8c7b0832715, w as $6179b936705e76d3$export$ae780daf29e6d456 } from "./useHover-Bycb7BsD.js";
12
- import { a as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "./FocusScope-BMk5oZCk.js";
13
- import { $ as $9ab94262bd0047c7$export$420e68273165f4ec, a as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-D3b7Kh4P.js";
14
- import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-BQvmiUqb.js";
15
- import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-WUv2PdFO.js";
16
- import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "./usePress-B8OteQMu.js";
17
- import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "./VisuallyHidden-DTUuKFiI.js";
10
+ import { a as $e93e671b31057976$export$b8473d3665f3a75a, $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10 } from "./useFormValidation-Dqzjv4jX.js";
11
+ import { $ as $f645667febf57a63$export$4c014de7c8940b4c, y as $431fbd86ca7dc216$export$f21a1ffae260145a, a as $458b0a5536c1a7cf$export$40bfa8c7b0832715, x as $6179b936705e76d3$export$ae780daf29e6d456 } from "./useHover-CG39Ci3A.js";
12
+ import { a as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "./FocusScope-Dri1oBcH.js";
13
+ import { $ as $9ab94262bd0047c7$export$420e68273165f4ec, a as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-WEswknAY.js";
14
+ import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-DYYO3Ns3.js";
15
+ import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-BDF1K4E4.js";
16
+ import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "./usePress-B9w0X4Ur.js";
17
+ import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "./VisuallyHidden-eaCBtXhE.js";
18
18
  const $884aeceb3d67f00f$export$37b65e5b5444d35c = /* @__PURE__ */ new WeakMap();
19
19
  function $0d5c49892c1215da$export$37b0961d2f4751e2(props, state, ref) {
20
20
  let { value, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, onPressStart, onPressEnd, onPressChange, onPress, onPressUp, onClick } = props;
@@ -1,19 +1,19 @@
1
1
  import { a as $4e85f108e88277b8$export$698f465ec27e93df, c as $4e85f108e88277b8$export$b0d3ecf7112093a7 } from "./RSPContexts-CJ-HBf0L.js";
2
- import { o as $ff5963eb1fccf552$export$e08e3b67e392101e, b as $bdb11010cef70236$export$f680877a34711e37, c as $8ae05eaa5c114e9c$export$7f54fc3180508a52, k as $df56164dff5785e2$export$4338b53315abf666, l as $5dc95899b306f630$export$c9058316764c140e, a as $3ef42575df84b30b$export$9d1611c77c2fe928, d as $64fa3d84918910a7$export$fabf2dc03a41866e, f as $64fa3d84918910a7$export$ef03459518577ad4, h as $64fa3d84918910a7$export$2881499e37b75b9a, $ as $64fa3d84918910a7$export$29f1550f4b0d4415, e as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, g as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "./utils-DGpXyJOJ.js";
3
- import { u as $507fabe10e71c6fb$export$630ff653c5ada6a9, b as $c87311424ea30a05$export$fedb369cb70207f1, s as $c87311424ea30a05$export$a11b0059900ceec8, g as $d4ee10de306f2510$export$cd4e5573fbe2b576, c as $431fbd86ca7dc216$export$b204af158042fbac, a as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./useHover-Bycb7BsD.js";
4
- import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./useLabels-B49ptFDX.js";
5
- import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "./useEvent-BD7Olibq.js";
6
- import { t as $5671b20cf9b562b2$export$831c820ad60f9d12, u as $55f9b1ae81f22853$export$76e4e37e5339496d, v as $5671b20cf9b562b2$export$447a38995de2c711, w as $55f9b1ae81f22853$export$6c5dc7e81d2cc29a, r as $55f9b1ae81f22853$export$2b35b76d2e30e129, x as $21f1aa98acb08317$export$16792effe837dba3, y as $55f9b1ae81f22853$export$759df0d867455a91 } from "./SelectionManager-N8X7T_4D.js";
2
+ import { n as $ff5963eb1fccf552$export$e08e3b67e392101e, c as $bdb11010cef70236$export$f680877a34711e37, b as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, j as $df56164dff5785e2$export$4338b53315abf666, k as $5dc95899b306f630$export$c9058316764c140e, a as $3ef42575df84b30b$export$9d1611c77c2fe928, d as $64fa3d84918910a7$export$fabf2dc03a41866e, f as $64fa3d84918910a7$export$ef03459518577ad4, h as $64fa3d84918910a7$export$2881499e37b75b9a, $ as $64fa3d84918910a7$export$29f1550f4b0d4415, e as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, g as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "./utils-HC9_3Crc.js";
3
+ import { v as $507fabe10e71c6fb$export$630ff653c5ada6a9, c as $c87311424ea30a05$export$fedb369cb70207f1, t as $c87311424ea30a05$export$a11b0059900ceec8, b as $8ae05eaa5c114e9c$export$7f54fc3180508a52, h as $d4ee10de306f2510$export$cd4e5573fbe2b576, d as $431fbd86ca7dc216$export$b204af158042fbac, N as $507fabe10e71c6fb$export$887a228355cf7d95, a as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./useHover-CG39Ci3A.js";
4
+ import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./useLabels-vzdDMGCX.js";
5
+ import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "./useEvent-DoWvho2u.js";
6
+ import { t as $5671b20cf9b562b2$export$831c820ad60f9d12, u as $55f9b1ae81f22853$export$76e4e37e5339496d, v as $5671b20cf9b562b2$export$447a38995de2c711, w as $55f9b1ae81f22853$export$6c5dc7e81d2cc29a, r as $55f9b1ae81f22853$export$2b35b76d2e30e129, x as $21f1aa98acb08317$export$16792effe837dba3, y as $55f9b1ae81f22853$export$759df0d867455a91 } from "./SelectionManager-DbBiF5M8.js";
7
7
  import $dbSRa$react__default, { useRef, useState, useEffect, useCallback, useMemo, createContext } from "react";
8
- import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-NETP-8H8.js";
9
- import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "./Button-BXjXzdW_.js";
10
- import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "./FieldError-DwBG6m1U.js";
8
+ import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-M3L6Ge2c.js";
9
+ import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "./Button-JRIu2BnS.js";
10
+ import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "./FieldError-DmVwL6Dj.js";
11
11
  import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "./Form-Cq3fu75_.js";
12
- import { d as $2d73ec29415bd339$export$712718f7aec83d5, b as $3985021b0ad6602f$export$37fb8590cf2c088c, a as $a049562f99e7db0e$export$f9c6924e160136d1 } from "./Input-CNNksOWg.js";
13
- import { a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "./Label-D8a3eYb-.js";
14
- import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "./Text-ztX6G1zR.js";
12
+ import { d as $2d73ec29415bd339$export$712718f7aec83d5, b as $3985021b0ad6602f$export$37fb8590cf2c088c, a as $a049562f99e7db0e$export$f9c6924e160136d1 } from "./Input-Cuw9UbNb.js";
13
+ import { a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "./Label-DPWyf-gp.js";
14
+ import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "./Text-Dae33gHp.js";
15
15
  import { $ as $f39a9eba43920ace$export$86427a43e3e48ebb } from "./Hidden-Rfj-STx7.js";
16
- import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-D2C6R0DK.js";
16
+ import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-eGTqWSTd.js";
17
17
  var $03c9a1a10de12f06$exports = {};
18
18
  $03c9a1a10de12f06$exports = {
19
19
  "Clear search": `مسح البحث`
@@ -427,15 +427,14 @@ function $48f6ba390f8c5b59$export$1e40b3ca02d92d21(props, state) {
427
427
  let timeout = useRef(void 0);
428
428
  let delayNextActiveDescendant = useRef(false);
429
429
  let queuedActiveDescendant = useRef(null);
430
- let lastCollectionNode = useRef(null);
431
430
  let isMobileScreenReader = $507fabe10e71c6fb$export$630ff653c5ada6a9() === "virtual" && ($c87311424ea30a05$export$fedb369cb70207f1() || $c87311424ea30a05$export$a11b0059900ceec8());
432
431
  let [shouldUseVirtualFocus, setShouldUseVirtualFocus] = useState(!isMobileScreenReader && !disableVirtualFocus);
433
432
  let [hasCollection, setHasCollection] = useState(false);
434
433
  useEffect(() => {
435
434
  return () => clearTimeout(timeout.current);
436
435
  }, []);
437
- let updateActiveDescendant = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
438
- if (!e.isTrusted && shouldUseVirtualFocus && inputRef.current && $d4ee10de306f2510$export$cd4e5573fbe2b576($431fbd86ca7dc216$export$b204af158042fbac(inputRef.current)) !== inputRef.current) inputRef.current.focus();
436
+ let updateActiveDescendantEvent = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
437
+ if (!e.isTrusted && shouldUseVirtualFocus && inputRef.current && $d4ee10de306f2510$export$cd4e5573fbe2b576($431fbd86ca7dc216$export$b204af158042fbac(inputRef.current)) !== inputRef.current && $507fabe10e71c6fb$export$887a228355cf7d95() !== "touch") inputRef.current.focus();
439
438
  let target = e.target;
440
439
  if (e.isTrusted || !target || queuedActiveDescendant.current === target.id) return;
441
440
  clearTimeout(timeout.current);
@@ -455,27 +454,28 @@ function $48f6ba390f8c5b59$export$1e40b3ca02d92d21(props, state) {
455
454
  }
456
455
  delayNextActiveDescendant.current = false;
457
456
  });
458
- let callbackRef = useCallback((collectionNode) => {
459
- if (collectionNode != null) {
460
- var _lastCollectionNode_current;
461
- (_lastCollectionNode_current = lastCollectionNode.current) === null || _lastCollectionNode_current === void 0 ? void 0 : _lastCollectionNode_current.removeEventListener("focusin", updateActiveDescendant);
462
- lastCollectionNode.current = collectionNode;
463
- collectionNode.addEventListener("focusin", updateActiveDescendant);
464
- if (collectionNode.getAttribute("tabindex") != null) setShouldUseVirtualFocus(false);
457
+ let [collectionNode, setCollectionNode] = useState(null);
458
+ let callbackRef = useCallback((node) => {
459
+ setCollectionNode(node);
460
+ if (node != null) {
461
+ if (node.getAttribute("tabindex") != null) setShouldUseVirtualFocus(false);
465
462
  setHasCollection(true);
466
- } else {
467
- var _lastCollectionNode_current1;
468
- (_lastCollectionNode_current1 = lastCollectionNode.current) === null || _lastCollectionNode_current1 === void 0 ? void 0 : _lastCollectionNode_current1.removeEventListener("focusin", updateActiveDescendant);
469
- setHasCollection(false);
470
- }
463
+ } else setHasCollection(false);
464
+ }, []);
465
+ $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
466
+ if (collectionNode != null)
467
+ collectionNode.addEventListener("focusin", updateActiveDescendantEvent);
468
+ return () => {
469
+ collectionNode === null || collectionNode === void 0 ? void 0 : collectionNode.removeEventListener("focusin", updateActiveDescendantEvent);
470
+ };
471
471
  }, [
472
- updateActiveDescendant
472
+ collectionNode
473
473
  ]);
474
474
  let mergedCollectionRef = $df56164dff5785e2$export$4338b53315abf666(useMemo(() => $5dc95899b306f630$export$c9058316764c140e(collectionRef, callbackRef), [
475
475
  collectionRef,
476
476
  callbackRef
477
477
  ]));
478
- let focusFirstItem = $8ae05eaa5c114e9c$export$7f54fc3180508a52(() => {
478
+ let focusFirstItem = useCallback(() => {
479
479
  var _collectionRef_current;
480
480
  delayNextActiveDescendant.current = true;
481
481
  (_collectionRef_current = collectionRef.current) === null || _collectionRef_current === void 0 ? void 0 : _collectionRef_current.dispatchEvent(new CustomEvent($5671b20cf9b562b2$export$831c820ad60f9d12, {
@@ -485,8 +485,10 @@ function $48f6ba390f8c5b59$export$1e40b3ca02d92d21(props, state) {
485
485
  focusStrategy: "first"
486
486
  }
487
487
  }));
488
- });
489
- let clearVirtualFocus = $8ae05eaa5c114e9c$export$7f54fc3180508a52((clearFocusKey) => {
488
+ }, [
489
+ collectionRef
490
+ ]);
491
+ let clearVirtualFocus = useCallback((clearFocusKey) => {
490
492
  var _collectionRef_current;
491
493
  $55f9b1ae81f22853$export$76e4e37e5339496d($d4ee10de306f2510$export$cd4e5573fbe2b576());
492
494
  queuedActiveDescendant.current = null;
@@ -501,7 +503,10 @@ function $48f6ba390f8c5b59$export$1e40b3ca02d92d21(props, state) {
501
503
  clearTimeout(timeout.current);
502
504
  delayNextActiveDescendant.current = false;
503
505
  (_collectionRef_current = collectionRef.current) === null || _collectionRef_current === void 0 ? void 0 : _collectionRef_current.dispatchEvent(clearFocusEvent);
504
- });
506
+ }, [
507
+ collectionRef,
508
+ state
509
+ ]);
505
510
  let lastInputType = useRef("");
506
511
  $e9faafb641e167db$export$90fc3a17d93f704c(inputRef, "input", (e) => {
507
512
  let { inputType } = e;
@@ -567,7 +572,7 @@ function $48f6ba390f8c5b59$export$1e40b3ca02d92d21(props, state) {
567
572
  case "Enter":
568
573
  if (focusedNodeId != null) {
569
574
  let item = document.getElementById(focusedNodeId);
570
- item === null || item === void 0 ? void 0 : item.click();
575
+ item === null || item === void 0 ? void 0 : item.dispatchEvent(new PointerEvent("click", e.nativeEvent));
571
576
  }
572
577
  break;
573
578
  }
@@ -591,9 +596,7 @@ function $48f6ba390f8c5b59$export$1e40b3ca02d92d21(props, state) {
591
596
  return () => {
592
597
  document.removeEventListener("keyup", onKeyUpCapture, true);
593
598
  };
594
- }, [
595
- onKeyUpCapture
596
- ]);
599
+ }, []);
597
600
  let stringFormatter = $fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault($957f4f2fd749edef$exports), "@react-aria/autocomplete");
598
601
  let collectionProps = $313b98861ee5dd6c$export$d6875122194c7b44({
599
602
  id: collectionId,
@@ -745,6 +748,8 @@ const $440f4836bcb56932$export$b94867ecbd698f21 = /* @__PURE__ */ $f39a9eba43920
745
748
  isEmpty: state.value === "",
746
749
  isDisabled: props.isDisabled || false,
747
750
  isInvalid: validation.isInvalid || false,
751
+ isReadOnly: props.isReadOnly || false,
752
+ isRequired: props.isRequired || false,
748
753
  state
749
754
  },
750
755
  defaultClassName: "react-aria-SearchField"
@@ -760,7 +765,9 @@ const $440f4836bcb56932$export$b94867ecbd698f21 = /* @__PURE__ */ $f39a9eba43920
760
765
  slot: props.slot || void 0,
761
766
  "data-empty": state.value === "" || void 0,
762
767
  "data-disabled": props.isDisabled || void 0,
763
- "data-invalid": validation.isInvalid || void 0
768
+ "data-invalid": validation.isInvalid || void 0,
769
+ "data-readonly": props.isReadOnly || void 0,
770
+ "data-required": props.isRequired || void 0
764
771
  }, /* @__PURE__ */ $dbSRa$react__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
765
772
  values: [
766
773
  [