@wix/site-ui 1.347.0 → 1.348.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/dist/{6706.js → 1093.js} +3 -3
  2. package/dist/{8724.js → 1219.js} +2 -2
  3. package/dist/{7373.js → 1288.js} +8 -2
  4. package/dist/{5299.js → 1381.js} +98 -127
  5. package/dist/{3056.js → 1607.js} +32 -34
  6. package/dist/1629.js +2 -0
  7. package/dist/1669.js +75 -0
  8. package/dist/1718.js +26 -0
  9. package/dist/{1477.js → 201.js} +17 -26
  10. package/dist/2221.js +9 -0
  11. package/dist/{2445.js → 226.js} +12 -48
  12. package/dist/2387.js +7 -0
  13. package/dist/2580.js +6 -0
  14. package/dist/{1500.js → 2859.js} +10 -34
  15. package/dist/3014.js +178 -0
  16. package/dist/{6247.js → 3054.js} +3 -3
  17. package/dist/{7642.js → 3093.js} +1 -1
  18. package/dist/3189.js +5 -0
  19. package/dist/{7564.js → 331.js} +2 -2
  20. package/dist/3357.js +7 -0
  21. package/dist/{487.js → 3398.js} +38 -39
  22. package/dist/3502.js +224 -0
  23. package/dist/3695.js +50 -0
  24. package/dist/3829.js +1 -1
  25. package/dist/{6588.js → 3859.js} +115 -92
  26. package/dist/{3670.js → 3910.js} +28 -21
  27. package/dist/392.js +7 -0
  28. package/dist/{4549.js → 4155.js} +11 -3
  29. package/dist/4226.js +7 -0
  30. package/dist/{6329.js → 4229.js} +1 -1
  31. package/dist/4293.js +3 -0
  32. package/dist/4346.js +853 -2
  33. package/dist/{285.js → 4472.js} +3 -3
  34. package/dist/4605.js +207 -0
  35. package/dist/{7366.js → 488.js} +60 -7
  36. package/dist/{8750.js → 497.js} +190 -375
  37. package/dist/4989.js +35 -0
  38. package/dist/{6270.js → 510.js} +157 -196
  39. package/dist/5258.js +26 -0
  40. package/dist/{5036.js → 5275.js} +0 -3
  41. package/dist/{8171.js → 5298.js} +90 -102
  42. package/dist/5473.js +11 -0
  43. package/dist/{4745.js → 5490.js} +3 -1
  44. package/dist/{6089.js → 5561.js} +869 -786
  45. package/dist/{8996.js → 5595.js} +4 -3
  46. package/dist/5890.js +25 -0
  47. package/dist/{6046.js → 5969.js} +1 -1
  48. package/dist/5984.js +38 -0
  49. package/dist/{8527.js → 6006.js} +3 -3
  50. package/dist/6040.js +97 -0
  51. package/dist/{8758.js → 6137.js} +10 -8
  52. package/dist/{4281.js → 6140.js} +18 -10
  53. package/dist/{8960.js → 6191.js} +2 -2
  54. package/dist/6240.js +121 -0
  55. package/dist/{4490.js → 6373.js} +7 -5
  56. package/dist/{904.js → 6487.js} +19 -17
  57. package/dist/{9635.js → 6498.js} +1 -1
  58. package/dist/6499.js +4 -7
  59. package/dist/6508.js +7 -0
  60. package/dist/{8225.js → 6540.js} +1 -0
  61. package/dist/6551.js +46 -0
  62. package/dist/{9369.js → 6620.js} +35 -34
  63. package/dist/{4143.js → 6838.js} +19 -10
  64. package/dist/6902.js +48 -0
  65. package/dist/6904.js +51 -0
  66. package/dist/70.js +24 -0
  67. package/dist/7024.js +39 -0
  68. package/dist/{6882.js → 721.js} +737 -362
  69. package/dist/{951.js → 7270.js} +4 -4
  70. package/dist/{3485.js → 7323.js} +143 -111
  71. package/dist/{7541.js → 7488.js} +2 -2
  72. package/dist/{4863.js → 7542.js} +7 -6
  73. package/dist/7551.js +28 -0
  74. package/dist/{7021.js → 7640.js} +1 -1
  75. package/dist/{353.js → 7692.js} +3 -7
  76. package/dist/{4707.js → 7930.js} +2 -2
  77. package/dist/{8052.js → 8.js} +80 -64
  78. package/dist/{6914.js → 8129.js} +3 -15
  79. package/dist/{3319.js → 8358.js} +62 -63
  80. package/dist/{5864.js → 8407.js} +13 -13
  81. package/dist/8488.js +15 -0
  82. package/dist/{4768.js → 8495.js} +1 -1
  83. package/dist/8734.js +171 -0
  84. package/dist/{1763.js → 9018.js} +205 -331
  85. package/dist/9053.js +29 -0
  86. package/dist/9067.js +41 -0
  87. package/dist/{2861.js → 9120.js} +2 -2
  88. package/dist/{42.js → 9197.js} +2 -2
  89. package/dist/{9189.js → 9248.js} +36 -17
  90. package/dist/{2801.js → 9252.js} +4 -9
  91. package/dist/9295.js +7 -0
  92. package/dist/9303.js +8 -0
  93. package/dist/{167.js → 9374.js} +1 -1
  94. package/dist/{9352.js → 9540.js} +17 -47
  95. package/dist/9576.js +51 -0
  96. package/dist/{8272.js → 9591.js} +36 -46
  97. package/dist/{6107.js → 9770.js} +2 -2
  98. package/dist/{5085.js → 9880.js} +6 -3
  99. package/dist/Accordion/index.d.ts +207 -41
  100. package/dist/Accordion/index.js +75 -177
  101. package/dist/AlertDialog/index.d.ts +440 -140
  102. package/dist/AlertDialog/index.js +3 -13
  103. package/dist/Autocomplete/index.d.ts +722 -150
  104. package/dist/Autocomplete/index.js +16 -29
  105. package/dist/Avatar/index.d.ts +38 -3
  106. package/dist/Avatar/index.js +82 -28
  107. package/dist/Breadcrumbs/index.d.ts +63 -91
  108. package/dist/Breadcrumbs/index.js +1 -1
  109. package/dist/Button/index.d.ts +11 -0
  110. package/dist/Button/index.js +2 -2
  111. package/dist/Checkbox/index.d.ts +206 -36
  112. package/dist/Checkbox/index.js +293 -8
  113. package/dist/CheckboxField/index.css +1 -1
  114. package/dist/CheckboxField/index.d.ts +40 -36
  115. package/dist/CheckboxGroup/index.d.ts +50 -36
  116. package/dist/CheckboxGroup/index.js +87 -58
  117. package/dist/CheckboxGroupField/index.css +1 -1
  118. package/dist/Collapsible/index.d.ts +128 -36
  119. package/dist/Collapsible/index.js +21 -25
  120. package/dist/Combobox/index.d.ts +801 -158
  121. package/dist/Combobox/index.js +70 -114
  122. package/dist/ContextMenu/index.d.ts +1162 -195
  123. package/dist/ContextMenu/index.js +46 -36
  124. package/dist/Dialog/index.d.ts +425 -133
  125. package/dist/Dialog/index.js +8 -4
  126. package/dist/Drawer/index.d.ts +589 -144
  127. package/dist/Drawer/index.js +482 -562
  128. package/dist/Field/index.css +1 -1
  129. package/dist/Field/index.d.ts +341 -42
  130. package/dist/Field/index.js +123 -273
  131. package/dist/Fieldset/index.d.ts +11 -0
  132. package/dist/Fieldset/index.js +10 -17
  133. package/dist/Form/index.d.ts +43 -39
  134. package/dist/Form/index.js +58 -50
  135. package/dist/Input/index.css +1 -1
  136. package/dist/Input/index.d.ts +94 -42
  137. package/dist/Input/index.js +1 -1
  138. package/dist/Menu/index.d.ts +1140 -175
  139. package/dist/Menu/index.js +51 -67
  140. package/dist/Menubar/index.d.ts +651 -173
  141. package/dist/Menubar/index.js +12 -16
  142. package/dist/Meter/index.js +21 -18
  143. package/dist/NavigationMenu/index.d.ts +370 -86
  144. package/dist/NavigationMenu/index.js +144 -178
  145. package/dist/NumberField/index.css +1 -1
  146. package/dist/NumberField/index.d.ts +507 -47
  147. package/dist/NumberField/index.js +434 -718
  148. package/dist/Popover/index.d.ts +561 -142
  149. package/dist/Popover/index.js +181 -252
  150. package/dist/PreviewCard/index.d.ts +507 -143
  151. package/dist/PreviewCard/index.js +97 -151
  152. package/dist/Progress/index.d.ts +117 -3
  153. package/dist/Progress/index.js +37 -36
  154. package/dist/Radio/index.d.ts +177 -7
  155. package/dist/Radio/index.js +54 -70
  156. package/dist/RadioField/index.css +1 -1
  157. package/dist/RadioField/index.d.ts +23 -7
  158. package/dist/RadioGroup/index.d.ts +51 -37
  159. package/dist/RadioGroup/index.js +60 -51
  160. package/dist/RadioGroupField/index.css +1 -1
  161. package/dist/RadioGroupField/index.d.ts +40 -37
  162. package/dist/ScrollArea/index.d.ts +295 -1
  163. package/dist/ScrollArea/index.js +256 -324
  164. package/dist/Select/index.d.ts +516 -123
  165. package/dist/Select/index.js +513 -635
  166. package/dist/SelectField/index.css +1 -1
  167. package/dist/SelectField/index.d.ts +109 -134
  168. package/dist/SelectField/index.js +5 -1
  169. package/dist/Separator/index.d.ts +12 -0
  170. package/dist/Separator/index.js +1 -1
  171. package/dist/Slider/index.d.ts +383 -64
  172. package/dist/Slider/index.js +298 -374
  173. package/dist/Switch/index.d.ts +184 -37
  174. package/dist/Switch/index.js +44 -58
  175. package/dist/Tabs/index.d.ts +220 -35
  176. package/dist/Tabs/index.js +199 -193
  177. package/dist/Toast/index.d.ts +280 -64
  178. package/dist/Toast/index.js +299 -374
  179. package/dist/Toggle/index.d.ts +55 -35
  180. package/dist/Toggle/index.js +19 -13
  181. package/dist/ToggleGroup/index.d.ts +62 -35
  182. package/dist/ToggleGroup/index.js +13 -31
  183. package/dist/Toolbar/index.d.ts +117 -2
  184. package/dist/Toolbar/index.js +31 -43
  185. package/dist/Tooltip/index.d.ts +507 -150
  186. package/dist/Tooltip/index.js +163 -213
  187. package/dist/index.d.ts +12912 -5382
  188. package/package.json +3 -3
  189. package/dist/2205.js +0 -26
  190. package/dist/2274.js +0 -34
  191. package/dist/2287.js +0 -17
  192. package/dist/3020.js +0 -7
  193. package/dist/3021.js +0 -72
  194. package/dist/3140.js +0 -4
  195. package/dist/3248.js +0 -307
  196. package/dist/4026.js +0 -12
  197. package/dist/4922.js +0 -15
  198. package/dist/5659.js +0 -4
  199. package/dist/5992.js +0 -447
  200. package/dist/6330.js +0 -30
  201. package/dist/6535.js +0 -72
  202. package/dist/6917.js +0 -55
  203. package/dist/7725.js +0 -10
  204. package/dist/7871.js +0 -38
  205. package/dist/8106.js +0 -239
  206. package/dist/8685.js +0 -102
  207. package/dist/8935.js +0 -8
  208. package/dist/8971.js +0 -40
  209. package/dist/8979.js +0 -10
  210. package/dist/9048.js +0 -52
  211. package/dist/9087.js +0 -256
  212. package/dist/9255.js +0 -136
  213. /package/dist/{1457.js → 1068.js} +0 -0
  214. /package/dist/{6003.js → 1234.js} +0 -0
  215. /package/dist/{4723.js → 1282.js} +0 -0
  216. /package/dist/{6825.js → 1876.js} +0 -0
  217. /package/dist/{5778.js → 1885.js} +0 -0
  218. /package/dist/{2445.js.LICENSE.txt → 226.js.LICENSE.txt} +0 -0
  219. /package/dist/{1279.js → 3278.js} +0 -0
  220. /package/dist/{3296.js → 5568.js} +0 -0
  221. /package/dist/{8685.css → 6240.css} +0 -0
  222. /package/dist/{9829.js → 6488.js} +0 -0
  223. /package/dist/{9863.js → 6534.js} +0 -0
  224. /package/dist/{4495.js → 7718.js} +0 -0
  225. /package/dist/{3395.js → 8866.js} +0 -0
  226. /package/dist/{2418.js → 9837.js} +0 -0
@@ -1,46 +1,50 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import clsx from "clsx";
3
- import { pressableTriggerOpenStateMapping, popupStateMapping, triggerOpenStateMapping } from "../6917.js";
4
- import { useAnimationsFinished, stateAttributesMapping_TransitionStatusDataAttributes, transitionStatusMapping, useOpenChangeComplete } from "../9369.js";
5
- import { useNavigationMenuDismissContext, useNavigationMenuRootContext, NavigationMenuPopupCssVars_NavigationMenuPopupCssVars, useNavigationMenuTreeContext, NavigationMenuPositionerCssVars_NavigationMenuPositionerCssVars, NavigationMenuItem_NavigationMenuItem, NavigationMenuList_NavigationMenuList, isOutsideMenuEvent, NavigationMenuLink_NavigationMenuLink, NavigationMenuRoot_NavigationMenuRoot, useNavigationMenuItemContext, NAVIGATION_MENU_TRIGGER_IDENTIFIER } from "../6588.js";
6
- import { useTransitionStatus } from "../4863.js";
7
- import { useIsoLayoutEffect } from "../6499.js";
8
- import { useStableCallback } from "../7541.js";
9
- import { getTarget, contains } from "../4549.js";
10
- import { inertValue } from "../167.js";
11
- import { CompositeRoot } from "../9087.js";
12
- import { useFloatingTree, FloatingNode } from "../285.js";
13
- import { EMPTY_OBJECT, mergeProps, EMPTY_ARRAY, useRenderElement, esm_formatErrorMessage } from "../8272.js";
14
- import { useDirection } from "../9863.js";
15
- import { useTimeout } from "../42.js";
16
- import { useAnimationFrame } from "../8996.js";
17
- import { useValueAsRef } from "../4707.js";
18
- import { getCssDimensions } from "../7642.js";
19
- import { getWindow, isHTMLElement } from "../3829.js";
20
- import { addEventListener } from "../4723.js";
21
- import { focusOut, listNavigation, triggerHover, triggerPress } from "../2418.js";
22
- import { usePositioner, adaptiveOriginMiddleware_adaptiveOrigin, useFloatingRootContext, useAnchorPositioning } from "../8750.js";
23
- import { applySafePolygonPointerEventsMutation, useHoverInteractionSharedState, clearSafePolygonPointerEventsMutation } from "../3056.js";
24
- import { safePolygon, useHoverReferenceInteraction } from "../3670.js";
25
- import { useClick } from "../5864.js";
26
- import { createChangeEventDetails } from "../4768.js";
27
- import { stopEvent } from "../6330.js";
28
- import { useButton } from "../9189.js";
29
- import { CompositeItem } from "../951.js";
30
- import { FocusGuard_FocusGuard, disableFocusInside, DROPDOWN_COLLISION_AVOIDANCE, FloatingPortal_FloatingPortal, getTabbableAfterElement, enableFocusInside, getPreviousTabbable, isOutsideEvent, getNextTabbable, ownerVisuallyHidden, POPUP_COLLISION_AVOIDANCE } from "../487.js";
31
- import { getEmptyRootContext } from "../4922.js";
32
- import { mergeCleanups } from "../4495.js";
33
- import { useId } from "../2205.js";
34
- import { useBaseUiId } from "../6046.js";
3
+ import { triggerOpenStateMapping, popupTransitionStateMapping, popupStateMapping, pressableTriggerOpenStateMapping } from "../6904.js";
4
+ import { transitionStatusMapping } from "../8488.js";
5
+ import { useNavigationMenuTreeContext, popupWidth as NavigationMenuPopupCssVars_popupWidth, positionerHeight, NavigationMenuList_NavigationMenuList, NavigationMenuRoot_NavigationMenuRoot, popupHeight as NavigationMenuPopupCssVars_popupHeight, useNavigationMenuItemContext, NAVIGATION_MENU_TRIGGER_IDENTIFIER, useNavigationMenuDismissContext, useNavigationMenuRootContext, positionerWidth, NavigationMenuLink_NavigationMenuLink, setSharedFixedSize, getEmptyRootContext, isOutsideMenuEvent, NavigationMenuItem_NavigationMenuItem } from "../3859.js";
6
+ import { useTransitionStatus } from "../7542.js";
7
+ import { startingStyle as TransitionStatusDataAttributes_startingStyle, useAnimationsFinished, useOpenChangeComplete } from "../6620.js";
8
+ import { useIsoLayoutEffect } from "../3357.js";
9
+ import { useStableCallback } from "../7488.js";
10
+ import { getTarget, closest, contains } from "../4155.js";
11
+ import { inertValue } from "../9374.js";
12
+ import { CompositeRoot } from "../3502.js";
13
+ import { useFloatingTree, FloatingNode } from "../4472.js";
14
+ import { EMPTY_OBJECT, mergeProps, EMPTY_ARRAY, useRenderElement } from "../9591.js";
15
+ import { useDirection } from "../6534.js";
16
+ import { useTimeout } from "../9197.js";
17
+ import { useAnimationFrame } from "../5595.js";
18
+ import { useValueAsRef } from "../7930.js";
19
+ import { getCssDimensions } from "../3093.js";
20
+ import { getWindow } from "../3829.js";
21
+ import { addEventListener } from "../1282.js";
22
+ import { focusOut, listNavigation, triggerHover, triggerPress } from "../9837.js";
23
+ import { useFloatingRootContext } from "../6902.js";
24
+ import { applySafePolygonPointerEventsMutation, useHoverInteractionSharedState, clearSafePolygonPointerEventsMutation } from "../1607.js";
25
+ import { safePolygon, useHoverReferenceInteraction } from "../3910.js";
26
+ import { useClick } from "../8407.js";
27
+ import { createChangeEventDetails } from "../8495.js";
28
+ import { stopEvent } from "../8358.js";
29
+ import { useButton } from "../9248.js";
30
+ import { CompositeItem } from "../7270.js";
31
+ import { FocusGuard_FocusGuard, disableFocusInside, DROPDOWN_COLLISION_AVOIDANCE, FloatingPortal_FloatingPortal, getTabbableNearElement, enableFocusInside, getPreviousTabbable, isOutsideEvent, getNextTabbable, ownerVisuallyHidden, POPUP_COLLISION_AVOIDANCE } from "../3398.js";
32
+ import { utils_formatErrorMessage } from "../5473.js";
33
+ import { usePositioner, useBaseUIFloating, useAnchorPositioningWithHook, getDisabledMountTransitionStyles } from "../497.js";
34
+ import { mergeCleanups } from "../7718.js";
35
+ import { adaptiveOrigin } from "../3695.js";
36
+ import { useId } from "../4989.js";
37
+ import { useBaseUiId } from "../5969.js";
35
38
  import * as __rspack_external_react from "react";
36
39
  import * as __rspack_external_react_dom_7136dc57 from "react-dom";
40
+ const NavigationMenuContentDataAttributes_activationDirection = 'data-activation-direction';
37
41
  const stateAttributesMapping = {
38
42
  ...popupStateMapping,
39
43
  ...transitionStatusMapping,
40
44
  activationDirection (value) {
41
45
  if (!value) return null;
42
46
  return {
43
- 'data-activation-direction': value
47
+ [NavigationMenuContentDataAttributes_activationDirection]: value
44
48
  };
45
49
  }
46
50
  };
@@ -146,7 +150,7 @@ const DEFAULT_SIZE = {
146
150
  height: 0
147
151
  };
148
152
  const NavigationMenuTrigger_NavigationMenuTrigger = /*#__PURE__*/ __rspack_external_react.forwardRef(function(componentProps, forwardedRef) {
149
- const { render, className, style, nativeButton = true, disabled, ...elementProps } = componentProps;
153
+ const { render, className, style, nativeButton = true, disabled = false, ...elementProps } = componentProps;
150
154
  const { value, setValue, mounted, open, positionerElement, setActivationDirection, setFloatingRootContext, popupElement, viewportElement, transitionStatus, rootRef, beforeOutsideRef, afterOutsideRef, afterInsideRef, beforeInsideRef, prevTriggerElementRef, popupAutoSizeResetRef, currentContentRef, delay, closeDelay, orientation, setViewportInert, nested } = useNavigationMenuRootContext();
151
155
  const { value: itemValue } = useNavigationMenuItemContext();
152
156
  const nodeId = useNavigationMenuTreeContext();
@@ -154,7 +158,6 @@ const NavigationMenuTrigger_NavigationMenuTrigger = /*#__PURE__*/ __rspack_exter
154
158
  const dismissProps = useNavigationMenuDismissContext();
155
159
  const direction = useDirection();
156
160
  const stickIfOpenTimeout = useTimeout();
157
- const focusFrame = useAnimationFrame();
158
161
  const mutationFrame = useAnimationFrame();
159
162
  const resizeFrame = useAnimationFrame();
160
163
  const sizeFrame = useAnimationFrame();
@@ -162,15 +165,14 @@ const NavigationMenuTrigger_NavigationMenuTrigger = /*#__PURE__*/ __rspack_exter
162
165
  const [stickIfOpen, setStickIfOpen] = __rspack_external_react.useState(true);
163
166
  const [pointerType, setPointerType] = __rspack_external_react.useState('');
164
167
  const triggerElementRef = __rspack_external_react.useRef(null);
165
- const allowFocusRef = __rspack_external_react.useRef(false);
166
168
  const prevSizeRef = __rspack_external_react.useRef(DEFAULT_SIZE);
167
169
  const skipAutoSizeSyncRef = __rspack_external_react.useRef(false);
168
170
  const isActiveItem = open && value === itemValue;
169
171
  const isActiveItemRef = useValueAsRef(isActiveItem);
170
- const interactionsEnabled = positionerElement ? true : !value;
172
+ const interactionsEnabled = (null != positionerElement || null == value) && !disabled;
171
173
  const hoverFloatingElement = positionerElement || viewportElement;
172
- const hoverInteractionsEnabled = hoverFloatingElement ? true : !value;
173
- const runOnceAnimationsFinish = useAnimationsFinished(popupElement, false, false);
174
+ const hoverInteractionsEnabled = (null != hoverFloatingElement || null == value) && !disabled;
175
+ const runOnceAnimationsFinish = useAnimationsFinished(popupElement);
174
176
  const handleTriggerElement = __rspack_external_react.useCallback((element)=>{
175
177
  triggerElementRef.current = element;
176
178
  setTriggerElement(element);
@@ -192,108 +194,86 @@ const NavigationMenuTrigger_NavigationMenuTrigger = /*#__PURE__*/ __rspack_exter
192
194
  sizeFrame,
193
195
  cancelAutoSizeReset
194
196
  ]);
195
- function setAutoSizes() {
196
- if (!popupElement) return;
197
- popupElement.style.setProperty(NavigationMenuPopupCssVars_NavigationMenuPopupCssVars.popupWidth, 'auto');
198
- popupElement.style.setProperty(NavigationMenuPopupCssVars_NavigationMenuPopupCssVars.popupHeight, 'auto');
197
+ function setAutoSizes(element) {
198
+ element.style.setProperty(NavigationMenuPopupCssVars_popupWidth, 'auto');
199
+ element.style.setProperty(NavigationMenuPopupCssVars_popupHeight, 'auto');
199
200
  }
200
- function clearFixedSizes() {
201
- if (!popupElement || !positionerElement) return;
202
- popupElement.style.removeProperty(NavigationMenuPopupCssVars_NavigationMenuPopupCssVars.popupWidth);
203
- popupElement.style.removeProperty(NavigationMenuPopupCssVars_NavigationMenuPopupCssVars.popupHeight);
204
- positionerElement.style.removeProperty(NavigationMenuPositionerCssVars_NavigationMenuPositionerCssVars.positionerWidth);
205
- positionerElement.style.removeProperty(NavigationMenuPositionerCssVars_NavigationMenuPositionerCssVars.positionerHeight);
201
+ function clearFixedSizes(popup, positioner) {
202
+ popup.style.removeProperty(NavigationMenuPopupCssVars_popupWidth);
203
+ popup.style.removeProperty(NavigationMenuPopupCssVars_popupHeight);
204
+ positioner.style.removeProperty(positionerWidth);
205
+ positioner.style.removeProperty(positionerHeight);
206
206
  }
207
- function setSharedFixedSizes(width, height) {
208
- if (!popupElement || !positionerElement) return;
209
- popupElement.style.setProperty(NavigationMenuPopupCssVars_NavigationMenuPopupCssVars.popupWidth, `${width}px`);
210
- popupElement.style.setProperty(NavigationMenuPopupCssVars_NavigationMenuPopupCssVars.popupHeight, `${height}px`);
211
- positionerElement.style.setProperty(NavigationMenuPositionerCssVars_NavigationMenuPositionerCssVars.positionerWidth, `${width}px`);
212
- positionerElement.style.setProperty(NavigationMenuPositionerCssVars_NavigationMenuPositionerCssVars.positionerHeight, `${height}px`);
213
- }
214
- function scheduleAutoSizeReset() {
207
+ function scheduleAutoSizeReset(popup) {
215
208
  cancelAutoSizeReset(true);
216
209
  const abortController = new AbortController();
217
210
  popupAutoSizeResetRef.current.abortController = abortController;
218
211
  popupAutoSizeResetRef.current.owner = itemValue;
219
212
  runOnceAnimationsFinish(()=>{
220
- if (popupAutoSizeResetRef.current.abortController !== abortController || popupAutoSizeResetRef.current.owner !== itemValue) return;
221
213
  popupAutoSizeResetRef.current.abortController = null;
222
214
  popupAutoSizeResetRef.current.owner = null;
223
- setAutoSizes();
215
+ setAutoSizes(popup);
224
216
  }, abortController.signal);
225
217
  }
226
- const handleValueChange = useStableCallback((currentWidth, currentHeight, options = {})=>{
227
- if (!popupElement || !positionerElement) return;
218
+ const handleValueChange = useStableCallback((popup, positioner, currentWidth, currentHeight)=>{
228
219
  cancelAutoSizeReset(true);
229
- const { syncPositioner = false } = options;
230
- clearFixedSizes();
231
- const { width, height } = getCssDimensions(popupElement);
220
+ clearFixedSizes(popup, positioner);
221
+ const { width, height } = getCssDimensions(popup);
232
222
  const measuredWidth = width || prevSizeRef.current.width;
233
223
  const measuredHeight = height || prevSizeRef.current.height;
234
224
  if (0 === currentHeight || 0 === currentWidth) {
235
225
  currentWidth = measuredWidth;
236
226
  currentHeight = measuredHeight;
237
227
  }
238
- popupElement.style.setProperty(NavigationMenuPopupCssVars_NavigationMenuPopupCssVars.popupWidth, `${currentWidth}px`);
239
- popupElement.style.setProperty(NavigationMenuPopupCssVars_NavigationMenuPopupCssVars.popupHeight, `${currentHeight}px`);
240
- positionerElement.style.setProperty(NavigationMenuPositionerCssVars_NavigationMenuPositionerCssVars.positionerWidth, `${syncPositioner ? currentWidth : measuredWidth}px`);
241
- positionerElement.style.setProperty(NavigationMenuPositionerCssVars_NavigationMenuPositionerCssVars.positionerHeight, `${syncPositioner ? currentHeight : measuredHeight}px`);
228
+ popup.style.setProperty(NavigationMenuPopupCssVars_popupWidth, `${currentWidth}px`);
229
+ popup.style.setProperty(NavigationMenuPopupCssVars_popupHeight, `${currentHeight}px`);
230
+ positioner.style.setProperty(positionerWidth, `${measuredWidth}px`);
231
+ positioner.style.setProperty(positionerHeight, `${measuredHeight}px`);
242
232
  sizeFrame.request(()=>{
243
233
  if (!isActiveItemRef.current) return;
244
- popupElement.style.setProperty(NavigationMenuPopupCssVars_NavigationMenuPopupCssVars.popupWidth, `${measuredWidth}px`);
245
- popupElement.style.setProperty(NavigationMenuPopupCssVars_NavigationMenuPopupCssVars.popupHeight, `${measuredHeight}px`);
246
- if (syncPositioner) {
247
- positionerElement.style.setProperty(NavigationMenuPositionerCssVars_NavigationMenuPositionerCssVars.positionerWidth, `${measuredWidth}px`);
248
- positionerElement.style.setProperty(NavigationMenuPositionerCssVars_NavigationMenuPositionerCssVars.positionerHeight, `${measuredHeight}px`);
249
- }
250
- scheduleAutoSizeReset();
234
+ popup.style.setProperty(NavigationMenuPopupCssVars_popupWidth, `${measuredWidth}px`);
235
+ popup.style.setProperty(NavigationMenuPopupCssVars_popupHeight, `${measuredHeight}px`);
236
+ scheduleAutoSizeReset(popup);
251
237
  });
252
238
  });
253
- const handleInterruptedMutationResize = useStableCallback((currentWidth, currentHeight)=>{
254
- if (!popupElement || !positionerElement) return;
239
+ const handleInterruptedMutationResize = useStableCallback((popup, positioner, currentWidth, currentHeight)=>{
255
240
  sizeFrame.cancel();
256
241
  mutationFrame.cancel();
257
242
  cancelAutoSizeReset(true);
258
243
  if (0 === currentWidth || 0 === currentHeight) return;
259
- setSharedFixedSizes(currentWidth, currentHeight);
244
+ setSharedFixedSize(popup, positioner, currentWidth, currentHeight);
260
245
  mutationFrame.request(()=>{
261
246
  mutationFrame.request(()=>{
262
- clearFixedSizes();
263
- const { width, height } = getCssDimensions(popupElement);
264
- const measuredWidth = width || currentWidth || prevSizeRef.current.width;
265
- const measuredHeight = height || currentHeight || prevSizeRef.current.height;
266
- setSharedFixedSizes(currentWidth, currentHeight);
247
+ clearFixedSizes(popup, positioner);
248
+ const { width, height } = getCssDimensions(popup);
249
+ const measuredWidth = width || currentWidth;
250
+ const measuredHeight = height || currentHeight;
251
+ setSharedFixedSize(popup, positioner, currentWidth, currentHeight);
267
252
  sizeFrame.request(()=>{
268
253
  if (!isActiveItemRef.current) return;
269
- setSharedFixedSizes(measuredWidth, measuredHeight);
270
- scheduleAutoSizeReset();
254
+ setSharedFixedSize(popup, positioner, measuredWidth, measuredHeight);
255
+ scheduleAutoSizeReset(popup);
271
256
  });
272
257
  });
273
258
  });
274
259
  });
275
- const syncCurrentSize = useStableCallback(()=>{
276
- if (!popupElement || !positionerElement) return;
260
+ const syncCurrentSize = useStableCallback((popup, positioner)=>{
277
261
  sizeFrame.cancel();
278
262
  cancelAutoSizeReset(true);
279
- clearFixedSizes();
280
- const { width, height } = getCssDimensions(popupElement);
263
+ clearFixedSizes(popup, positioner);
264
+ const { width, height } = getCssDimensions(popup);
281
265
  if (0 === width || 0 === height) return;
282
266
  prevSizeRef.current = {
283
267
  width,
284
268
  height
285
269
  };
286
- setAutoSizes();
287
- positionerElement.style.setProperty(NavigationMenuPositionerCssVars_NavigationMenuPositionerCssVars.positionerWidth, `${width}px`);
288
- positionerElement.style.setProperty(NavigationMenuPositionerCssVars_NavigationMenuPositionerCssVars.positionerHeight, `${height}px`);
270
+ setAutoSizes(popup);
271
+ positioner.style.setProperty(positionerWidth, `${width}px`);
272
+ positioner.style.setProperty(positionerHeight, `${height}px`);
289
273
  });
290
- const getMutationBaseline = useStableCallback(()=>{
291
- if (!popupElement) return {
292
- size: prevSizeRef.current,
293
- syncPositioner: false
294
- };
295
- const popupWidth = popupElement.style.getPropertyValue(NavigationMenuPopupCssVars_NavigationMenuPopupCssVars.popupWidth);
296
- const popupHeight = popupElement.style.getPropertyValue(NavigationMenuPopupCssVars_NavigationMenuPopupCssVars.popupHeight);
274
+ const getMutationBaseline = useStableCallback((popup)=>{
275
+ const popupWidth = popup.style.getPropertyValue(NavigationMenuPopupCssVars_popupWidth);
276
+ const popupHeight = popup.style.getPropertyValue(NavigationMenuPopupCssVars_popupHeight);
297
277
  const isResizing = '' !== popupWidth && 'auto' !== popupWidth && '' !== popupHeight && 'auto' !== popupHeight;
298
278
  if (!isResizing) return {
299
279
  size: prevSizeRef.current,
@@ -301,8 +281,8 @@ const NavigationMenuTrigger_NavigationMenuTrigger = /*#__PURE__*/ __rspack_exter
301
281
  };
302
282
  return {
303
283
  size: {
304
- width: popupElement.offsetWidth || prevSizeRef.current.width,
305
- height: popupElement.offsetHeight || prevSizeRef.current.height
284
+ width: popup.offsetWidth || prevSizeRef.current.width,
285
+ height: popup.offsetHeight || prevSizeRef.current.height
306
286
  },
307
287
  syncPositioner: true
308
288
  };
@@ -330,7 +310,7 @@ const NavigationMenuTrigger_NavigationMenuTrigger = /*#__PURE__*/ __rspack_exter
330
310
  }, [
331
311
  mounted
332
312
  ]);
333
- __rspack_external_react.useEffect(()=>{
313
+ useIsoLayoutEffect(()=>{
334
314
  if (!popupElement || 'function' != typeof ResizeObserver) return;
335
315
  const resizeObserver = new ResizeObserver(()=>{
336
316
  prevSizeRef.current = {
@@ -347,10 +327,12 @@ const NavigationMenuTrigger_NavigationMenuTrigger = /*#__PURE__*/ __rspack_exter
347
327
  ]);
348
328
  __rspack_external_react.useEffect(()=>{
349
329
  if (!open || !isActiveItem || !popupElement || !positionerElement) return;
350
- const win = getWindow(positionerElement);
330
+ const popup = popupElement;
331
+ const positioner = positionerElement;
332
+ const win = getWindow(positioner);
351
333
  function handleResize() {
352
334
  resizeFrame.cancel();
353
- resizeFrame.request(syncCurrentSize);
335
+ resizeFrame.request(()=>syncCurrentSize(popup, positioner));
354
336
  }
355
337
  const unsubscribe = addEventListener(win, 'resize', handleResize);
356
338
  return ()=>{
@@ -367,12 +349,12 @@ const NavigationMenuTrigger_NavigationMenuTrigger = /*#__PURE__*/ __rspack_exter
367
349
  ]);
368
350
  __rspack_external_react.useEffect(()=>{
369
351
  const observedElement = currentContentRef.current;
370
- if (!observedElement || !popupElement || !isActiveItem || 'function' != typeof MutationObserver) return;
352
+ if (!observedElement || !popupElement || !positionerElement || !isActiveItem || 'function' != typeof MutationObserver) return;
371
353
  const mutationObserver = new MutationObserver(()=>{
372
- if ('starting' === transitionStatus || popupElement.hasAttribute(stateAttributesMapping_TransitionStatusDataAttributes.startingStyle)) return void syncCurrentSize();
373
- const { size, syncPositioner } = getMutationBaseline();
374
- if (syncPositioner) return void handleInterruptedMutationResize(size.width, size.height);
375
- handleValueChange(size.width, size.height);
354
+ if ('starting' === transitionStatus || popupElement.hasAttribute(TransitionStatusDataAttributes_startingStyle)) return void syncCurrentSize(popupElement, positionerElement);
355
+ const { size, syncPositioner } = getMutationBaseline(popupElement);
356
+ if (syncPositioner) return void handleInterruptedMutationResize(popupElement, positionerElement, size.width, size.height);
357
+ handleValueChange(popupElement, positionerElement, size.width, size.height);
376
358
  });
377
359
  mutationObserver.observe(observedElement, {
378
360
  childList: true,
@@ -389,6 +371,7 @@ const NavigationMenuTrigger_NavigationMenuTrigger = /*#__PURE__*/ __rspack_exter
389
371
  }, [
390
372
  currentContentRef,
391
373
  popupElement,
374
+ positionerElement,
392
375
  isActiveItem,
393
376
  transitionStatus,
394
377
  getMutationBaseline,
@@ -396,38 +379,14 @@ const NavigationMenuTrigger_NavigationMenuTrigger = /*#__PURE__*/ __rspack_exter
396
379
  handleValueChange,
397
380
  syncCurrentSize
398
381
  ]);
399
- __rspack_external_react.useEffect(()=>{
400
- if (isActiveItem && open && popupElement && allowFocusRef.current) {
401
- allowFocusRef.current = false;
402
- focusFrame.request(()=>{
403
- beforeOutsideRef.current?.focus();
404
- });
405
- }
406
- return ()=>{
407
- focusFrame.cancel();
408
- };
409
- }, [
410
- beforeOutsideRef,
411
- focusFrame,
412
- isActiveItem,
413
- open,
414
- popupElement
415
- ]);
416
382
  useIsoLayoutEffect(()=>{
417
- if (isActiveItemRef.current && open && popupElement) {
418
- const hasNestedMenu = currentContentRef.current?.querySelector('[data-nested]') != null;
419
- if ('starting' === transitionStatus && hasNestedMenu) {
420
- sizeFrame.request(syncCurrentSize);
421
- return ()=>{
422
- sizeFrame.cancel();
423
- };
424
- }
383
+ if (isActiveItemRef.current && open && popupElement && positionerElement) {
425
384
  if (skipAutoSizeSyncRef.current) {
426
385
  skipAutoSizeSyncRef.current = false;
427
386
  return;
428
387
  }
429
388
  const { width, height } = getCssDimensions(popupElement);
430
- handleValueChange(width, height);
389
+ handleValueChange(popupElement, positionerElement, width, height);
431
390
  }
432
391
  }, [
433
392
  currentContentRef,
@@ -435,8 +394,7 @@ const NavigationMenuTrigger_NavigationMenuTrigger = /*#__PURE__*/ __rspack_exter
435
394
  isActiveItemRef,
436
395
  open,
437
396
  popupElement,
438
- sizeFrame,
439
- syncCurrentSize,
397
+ positionerElement,
440
398
  transitionStatus
441
399
  ]);
442
400
  function handleOpenChange(nextOpen, eventDetails) {
@@ -479,8 +437,10 @@ const NavigationMenuTrigger_NavigationMenuTrigger = /*#__PURE__*/ __rspack_exter
479
437
  hoverInteractionState.restTimeoutPending = false;
480
438
  hoverInteractionState.openChangeTimeout.clear();
481
439
  hoverInteractionState.restTimeout.clear();
482
- clearSafePolygonPointerEventsMutation(hoverInteractionState);
483
440
  }
441
+ return ()=>{
442
+ clearSafePolygonPointerEventsMutation(hoverInteractionState);
443
+ };
484
444
  }, [
485
445
  context,
486
446
  hoverInteractionState,
@@ -491,8 +451,8 @@ const NavigationMenuTrigger_NavigationMenuTrigger = /*#__PURE__*/ __rspack_exter
491
451
  return getHandleCloseContext(triggerElementRef.current, hoverFloatingElement, nodeId);
492
452
  });
493
453
  function getScope() {
494
- if (!nested || !positionerElement) return triggerElementRef.current?.closest('ul') ?? null;
495
- return null;
454
+ if (nested && positionerElement) return null;
455
+ return closest(triggerElementRef.current, 'ul');
496
456
  }
497
457
  const hoverProps = useHoverReferenceInteraction(context, {
498
458
  enabled: hoverInteractionsEnabled,
@@ -536,7 +496,7 @@ const NavigationMenuTrigger_NavigationMenuTrigger = /*#__PURE__*/ __rspack_exter
536
496
  ]);
537
497
  function handleActivation(event) {
538
498
  __rspack_external_react_dom_7136dc57.flushSync(()=>{
539
- const currentTarget = isHTMLElement(event.currentTarget) ? event.currentTarget : null;
499
+ const currentTarget = event.currentTarget;
540
500
  const prevTriggerRect = prevTriggerElementRef.current?.getBoundingClientRect();
541
501
  if (mounted && prevTriggerRect && triggerElement) {
542
502
  const nextTriggerRect = triggerElement.getBoundingClientRect();
@@ -547,8 +507,8 @@ const NavigationMenuTrigger_NavigationMenuTrigger = /*#__PURE__*/ __rspack_exter
547
507
  }
548
508
  if ('click' !== event.type && null != value) context.context.dataRef.current.openEvent = void 0;
549
509
  if ('touch' === pointerType && 'click' !== event.type) return;
550
- if (null != value) setValue(itemValue, createChangeEventDetails('mouseenter' === event.type ? triggerHover : triggerPress, event.nativeEvent));
551
- if ('mouseenter' === event.type && shouldBlockSafePolygonPointerEvents && (!nested || !positionerElement) && hoverFloatingElement && currentTarget) {
510
+ if (null != value && 'keydown' !== event.type) setValue(itemValue, createChangeEventDetails('mouseenter' === event.type ? triggerHover : triggerPress, event.nativeEvent));
511
+ if ('mouseenter' === event.type && shouldBlockSafePolygonPointerEvents && (!nested || !positionerElement) && hoverFloatingElement) {
552
512
  const applyPointerEventsMutation = ()=>{
553
513
  const scopeElement = getScope() ?? currentTarget.ownerDocument.body;
554
514
  applySafePolygonPointerEventsMutation(hoverInteractionState, {
@@ -563,15 +523,17 @@ const NavigationMenuTrigger_NavigationMenuTrigger = /*#__PURE__*/ __rspack_exter
563
523
  });
564
524
  }
565
525
  const handleOpenEvent = useStableCallback((event)=>{
526
+ if (disabled) return;
566
527
  if (!popupElement || !positionerElement) return void handleActivation(event);
567
528
  const { width, height } = getCssDimensions(popupElement);
568
529
  const shouldSkipAutoSizeSync = null != value && value !== itemValue && ('click' === event.type || 'touch' !== pointerType);
569
530
  handleActivation(event);
570
531
  if (shouldSkipAutoSizeSync) skipAutoSizeSyncRef.current = true;
571
- handleValueChange(width, height);
532
+ handleValueChange(popupElement, positionerElement, width, height);
572
533
  });
573
534
  const state = {
574
- open: isActiveItem
535
+ open: isActiveItem,
536
+ disabled
575
537
  };
576
538
  function handleSetPointerType(event) {
577
539
  setPointerType(event.pointerType);
@@ -593,11 +555,10 @@ const NavigationMenuTrigger_NavigationMenuTrigger = /*#__PURE__*/ __rspack_exter
593
555
  if (!isActiveItem) return;
594
556
  setViewportInert(false);
595
557
  },
596
- onMouseMove () {
597
- allowFocusRef.current = false;
558
+ onMouseLeave () {
559
+ if (null == value) clearSafePolygonPointerEventsMutation(hoverInteractionState);
598
560
  },
599
561
  onKeyDown (event) {
600
- allowFocusRef.current = true;
601
562
  if (nested) return;
602
563
  const verticalOpenKey = 'rtl' === direction ? 'ArrowLeft' : 'ArrowRight';
603
564
  const openHorizontal = 'horizontal' === orientation && 'ArrowDown' === event.key;
@@ -675,7 +636,7 @@ const NavigationMenuTrigger_NavigationMenuTrigger = /*#__PURE__*/ __rspack_exter
675
636
  elementToFocus?.focus();
676
637
  } else {
677
638
  let nextTabbable = getNextTabbable(triggerElement);
678
- if (nested && !positionerElement && referenceElement && nextTabbable && contains(referenceElement, nextTabbable)) nextTabbable = getTabbableAfterElement(afterInsideRef.current);
639
+ if (nested && !positionerElement && referenceElement && nextTabbable && contains(referenceElement, nextTabbable)) nextTabbable = getTabbableNearElement(afterInsideRef.current, 1);
679
640
  nextTabbable?.focus();
680
641
  if ((!nested || positionerElement) && !contains(rootRef.current, nextTabbable)) setValue(null, createChangeEventDetails(focusOut, event.nativeEvent));
681
642
  }
@@ -713,14 +674,24 @@ const NavigationMenuPortalContext = /*#__PURE__*/ __rspack_external_react.create
713
674
  if ("production" !== process.env.NODE_ENV) NavigationMenuPortalContext.displayName = "NavigationMenuPortalContext";
714
675
  function useNavigationMenuPortalContext() {
715
676
  const value = __rspack_external_react.useContext(NavigationMenuPortalContext);
716
- if (void 0 === value) throw new Error("production" !== process.env.NODE_ENV ? 'Base UI: <NavigationMenu.Portal> is missing.' : esm_formatErrorMessage(40));
677
+ if (void 0 === value) throw new Error("production" !== process.env.NODE_ENV ? 'Base UI: <NavigationMenu.Portal> is missing.' : utils_formatErrorMessage(40));
717
678
  return value;
718
679
  }
680
+ function useFloatingWithFallbackStore(options) {
681
+ const fallbackStore = useFloatingRootContext(options);
682
+ return useBaseUIFloating({
683
+ ...options,
684
+ rootContext: options.rootContext || fallbackStore
685
+ });
686
+ }
687
+ function useNavigationMenuAnchorPositioning(params) {
688
+ return useAnchorPositioningWithHook(params, useFloatingWithFallbackStore);
689
+ }
719
690
  const NavigationMenuPositionerContext = /*#__PURE__*/ __rspack_external_react.createContext(void 0);
720
691
  if ("production" !== process.env.NODE_ENV) NavigationMenuPositionerContext.displayName = "NavigationMenuPositionerContext";
721
692
  function useNavigationMenuPositionerContext(optional = false) {
722
693
  const context = __rspack_external_react.useContext(NavigationMenuPositionerContext);
723
- if (!context && !optional) throw new Error("production" !== process.env.NODE_ENV ? 'Base UI: NavigationMenuPositionerContext is missing. NavigationMenuPositioner parts must be placed within <NavigationMenu.Positioner>.' : esm_formatErrorMessage(42));
694
+ if (!context && !optional) throw new Error("production" !== process.env.NODE_ENV ? 'Base UI: NavigationMenuPositionerContext is missing. NavigationMenuPositioner parts must be placed within <NavigationMenu.Positioner>.' : utils_formatErrorMessage(42));
724
695
  return context;
725
696
  }
726
697
  const EMPTY_ROOT_CONTEXT = getEmptyRootContext();
@@ -729,10 +700,10 @@ const NavigationMenuPositioner_NavigationMenuPositioner = /*#__PURE__*/ __rspack
729
700
  const { className, render, anchor, positionMethod = 'absolute', side = 'bottom', align = 'center', sideOffset = 0, alignOffset = 0, collisionBoundary = 'clipping-ancestors', collisionPadding = 5, collisionAvoidance = nested ? POPUP_COLLISION_AVOIDANCE : DROPDOWN_COLLISION_AVOIDANCE, arrowPadding = 5, sticky = false, disableAnchorTracking = false, style, ...elementProps } = componentProps;
730
701
  const keepMounted = useNavigationMenuPortalContext();
731
702
  const nodeId = useNavigationMenuTreeContext();
703
+ const initialInstantTimeout = useTimeout();
732
704
  const resizeTimeout = useTimeout();
733
- const [instant, setInstant] = __rspack_external_react.useState(false);
734
- const positionerRef = __rspack_external_react.useRef(null);
735
- const prevTriggerElementRef = __rspack_external_react.useRef(null);
705
+ const [instant, setInstant] = __rspack_external_react.useState(open);
706
+ const needsInitialInstantResetRef = __rspack_external_react.useRef(open);
736
707
  __rspack_external_react.useEffect(()=>{
737
708
  if (!positionerElement) return;
738
709
  function onFocus(event) {
@@ -747,8 +718,8 @@ const NavigationMenuPositioner_NavigationMenuPositioner = /*#__PURE__*/ __rspack
747
718
  positionerElement
748
719
  ]);
749
720
  const domReference = (floatingRootContext || EMPTY_ROOT_CONTEXT).useState('domReferenceElement');
750
- const positioning = useAnchorPositioning({
751
- anchor: anchor ?? domReference ?? prevTriggerElementRef,
721
+ const positioning = useNavigationMenuAnchorPositioning({
722
+ anchor: anchor ?? domReference,
752
723
  positionMethod,
753
724
  mounted,
754
725
  side,
@@ -763,8 +734,11 @@ const NavigationMenuPositioner_NavigationMenuPositioner = /*#__PURE__*/ __rspack
763
734
  keepMounted,
764
735
  floatingRootContext,
765
736
  collisionAvoidance,
737
+ shift: {
738
+ rootBoundary: 'layoutViewport'
739
+ },
766
740
  nodeId,
767
- adaptiveOrigin: adaptiveOriginMiddleware_adaptiveOrigin
741
+ adaptiveOrigin: adaptiveOrigin
768
742
  });
769
743
  const state = {
770
744
  open,
@@ -775,6 +749,10 @@ const NavigationMenuPositioner_NavigationMenuPositioner = /*#__PURE__*/ __rspack
775
749
  };
776
750
  __rspack_external_react.useEffect(()=>{
777
751
  if (!open) return;
752
+ if (needsInitialInstantResetRef.current) initialInstantTimeout.start(0, ()=>{
753
+ needsInitialInstantResetRef.current = false;
754
+ if (!resizeTimeout.isStarted()) setInstant(false);
755
+ });
778
756
  function handleResize() {
779
757
  __rspack_external_react_dom_7136dc57.flushSync(()=>{
780
758
  setInstant(true);
@@ -787,6 +765,7 @@ const NavigationMenuPositioner_NavigationMenuPositioner = /*#__PURE__*/ __rspack
787
765
  return addEventListener(win, 'resize', handleResize);
788
766
  }, [
789
767
  open,
768
+ initialInstantTimeout,
790
769
  resizeTimeout,
791
770
  positionerElement
792
771
  ]);
@@ -796,8 +775,7 @@ const NavigationMenuPositioner_NavigationMenuPositioner = /*#__PURE__*/ __rspack
796
775
  props: elementProps,
797
776
  refs: [
798
777
  forwardedRef,
799
- setPositionerElement,
800
- positionerRef
778
+ setPositionerElement
801
779
  ],
802
780
  hidden: !mounted,
803
781
  inert: !open
@@ -878,10 +856,6 @@ const NavigationMenuViewport_NavigationMenuViewport = /*#__PURE__*/ __rspack_ext
878
856
  }) : element;
879
857
  });
880
858
  if ("production" !== process.env.NODE_ENV) NavigationMenuViewport_NavigationMenuViewport.displayName = "NavigationMenuViewport";
881
- const NavigationMenuBackdrop_stateAttributesMapping = {
882
- ...popupStateMapping,
883
- ...transitionStatusMapping
884
- };
885
859
  const NavigationMenuBackdrop_NavigationMenuBackdrop = /*#__PURE__*/ __rspack_external_react.forwardRef(function(componentProps, forwardedRef) {
886
860
  const { render, className, style, ...elementProps } = componentProps;
887
861
  const { open, mounted, transitionStatus } = useNavigationMenuRootContext();
@@ -903,15 +877,11 @@ const NavigationMenuBackdrop_NavigationMenuBackdrop = /*#__PURE__*/ __rspack_ext
903
877
  },
904
878
  elementProps
905
879
  ],
906
- stateAttributesMapping: NavigationMenuBackdrop_stateAttributesMapping
880
+ stateAttributesMapping: popupTransitionStateMapping
907
881
  });
908
882
  return element;
909
883
  });
910
884
  if ("production" !== process.env.NODE_ENV) NavigationMenuBackdrop_NavigationMenuBackdrop.displayName = "NavigationMenuBackdrop";
911
- const NavigationMenuPopup_stateAttributesMapping = {
912
- ...popupStateMapping,
913
- ...transitionStatusMapping
914
- };
915
885
  const NavigationMenuPopup_NavigationMenuPopup = /*#__PURE__*/ __rspack_external_react.forwardRef(function(componentProps, forwardedRef) {
916
886
  const { render, className, style, id: idProp, ...elementProps } = componentProps;
917
887
  const { open, transitionStatus, setPopupElement } = useNavigationMenuRootContext();
@@ -925,15 +895,9 @@ const NavigationMenuPopup_NavigationMenuPopup = /*#__PURE__*/ __rspack_external_
925
895
  align: positioning.align,
926
896
  anchorHidden: positioning.anchorHidden
927
897
  };
928
- let isOriginSide = 'top' === positioning.side;
929
898
  let isPhysicalLeft = 'left' === positioning.side;
930
- if ('rtl' === direction) {
931
- isOriginSide = isOriginSide || 'inline-end' === positioning.side;
932
- isPhysicalLeft = isPhysicalLeft || 'inline-end' === positioning.side;
933
- } else {
934
- isOriginSide = isOriginSide || 'inline-start' === positioning.side;
935
- isPhysicalLeft = isPhysicalLeft || 'inline-start' === positioning.side;
936
- }
899
+ isPhysicalLeft = 'rtl' === direction ? isPhysicalLeft || 'inline-end' === positioning.side : isPhysicalLeft || 'inline-start' === positioning.side;
900
+ const isOriginSide = 'top' === positioning.side || isPhysicalLeft;
937
901
  const element = useRenderElement('nav', componentProps, {
938
902
  state,
939
903
  ref: [
@@ -950,16 +914,17 @@ const NavigationMenuPopup_NavigationMenuPopup = /*#__PURE__*/ __rspack_external_
950
914
  [isPhysicalLeft ? 'right' : 'left']: '0'
951
915
  } : {}
952
916
  },
917
+ getDisabledMountTransitionStyles(transitionStatus),
953
918
  elementProps
954
919
  ],
955
- stateAttributesMapping: NavigationMenuPopup_stateAttributesMapping
920
+ stateAttributesMapping: popupTransitionStateMapping
956
921
  });
957
922
  return element;
958
923
  });
959
924
  if ("production" !== process.env.NODE_ENV) NavigationMenuPopup_NavigationMenuPopup.displayName = "NavigationMenuPopup";
960
925
  const NavigationMenuArrow_NavigationMenuArrow = /*#__PURE__*/ __rspack_external_react.forwardRef(function(componentProps, forwardedRef) {
961
926
  const { render, className, style, ...elementProps } = componentProps;
962
- const { open } = useNavigationMenuRootContext();
927
+ const { open, transitionStatus } = useNavigationMenuRootContext();
963
928
  const { arrowRef, side, align, arrowUncentered, arrowStyles } = useNavigationMenuPositionerContext();
964
929
  const state = {
965
930
  open,
@@ -978,6 +943,7 @@ const NavigationMenuArrow_NavigationMenuArrow = /*#__PURE__*/ __rspack_external_
978
943
  style: arrowStyles,
979
944
  'aria-hidden': true
980
945
  },
946
+ getDisabledMountTransitionStyles(transitionStatus),
981
947
  elementProps
982
948
  ],
983
949
  stateAttributesMapping: popupStateMapping
@@ -1,4 +1,4 @@
1
- @import "../8685.css";
1
+ @import "../6240.css";
2
2
  @import "../Field/index.css";
3
3
  .root-XA6trs {
4
4
  font: var(--wst-paragraph-2-font);