@rpcbase/ui 0.206.0 → 0.208.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 (232) hide show
  1. package/dist/index.js +7 -7
  2. package/dist/index19.js +1 -1
  3. package/dist/index19.js.map +1 -1
  4. package/dist/index200.js +56 -55
  5. package/dist/index200.js.map +1 -1
  6. package/dist/index201.js +60 -8
  7. package/dist/index201.js.map +1 -1
  8. package/dist/index202.js +7 -15
  9. package/dist/index202.js.map +1 -1
  10. package/dist/index203.js +15 -143
  11. package/dist/index203.js.map +1 -1
  12. package/dist/index204.js +145 -4
  13. package/dist/index204.js.map +1 -1
  14. package/dist/index205.js +4 -11
  15. package/dist/index205.js.map +1 -1
  16. package/dist/index206.js +10 -104
  17. package/dist/index206.js.map +1 -1
  18. package/dist/index207.js +94 -347
  19. package/dist/index207.js.map +1 -1
  20. package/dist/index208.js +349 -87
  21. package/dist/index208.js.map +1 -1
  22. package/dist/index209.js +73 -304
  23. package/dist/index209.js.map +1 -1
  24. package/dist/index210.js +309 -193
  25. package/dist/index210.js.map +1 -1
  26. package/dist/index211.js +211 -19
  27. package/dist/index211.js.map +1 -1
  28. package/dist/index212.js +18 -27
  29. package/dist/index212.js.map +1 -1
  30. package/dist/index213.js +27 -187
  31. package/dist/index213.js.map +1 -1
  32. package/dist/index214.js +186 -16
  33. package/dist/index214.js.map +1 -1
  34. package/dist/index215.js +18 -44
  35. package/dist/index215.js.map +1 -1
  36. package/dist/index216.js +60 -8
  37. package/dist/index216.js.map +1 -1
  38. package/dist/index217.js +42 -23
  39. package/dist/index217.js.map +1 -1
  40. package/dist/index218.js +9 -44
  41. package/dist/index218.js.map +1 -1
  42. package/dist/index219.js +25 -18
  43. package/dist/index219.js.map +1 -1
  44. package/dist/index220.js +45 -3
  45. package/dist/index220.js.map +1 -1
  46. package/dist/index221.js +17 -4
  47. package/dist/index221.js.map +1 -1
  48. package/dist/index222.js +3 -21
  49. package/dist/index222.js.map +1 -1
  50. package/dist/index223.js +4 -24
  51. package/dist/index223.js.map +1 -1
  52. package/dist/index224.js +17 -64
  53. package/dist/index224.js.map +1 -1
  54. package/dist/index225.js +23 -13
  55. package/dist/index225.js.map +1 -1
  56. package/dist/index226.js +68 -4
  57. package/dist/index226.js.map +1 -1
  58. package/dist/index227.js +14 -50
  59. package/dist/index227.js.map +1 -1
  60. package/dist/index228.js +4 -6
  61. package/dist/index228.js.map +1 -1
  62. package/dist/index229.js +50 -26
  63. package/dist/index229.js.map +1 -1
  64. package/dist/index230.js +5 -13
  65. package/dist/index230.js.map +1 -1
  66. package/dist/index231.js +25 -8
  67. package/dist/index231.js.map +1 -1
  68. package/dist/index232.js +17 -3
  69. package/dist/index232.js.map +1 -0
  70. package/dist/index233.js +8 -24
  71. package/dist/index233.js.map +1 -1
  72. package/dist/index234.js +2 -71
  73. package/dist/index235.js +29 -3
  74. package/dist/index235.js.map +1 -0
  75. package/dist/index236.js +69 -12
  76. package/dist/index236.js.map +1 -1
  77. package/dist/index237.js +3 -54
  78. package/dist/index238.js +11 -114
  79. package/dist/index238.js.map +1 -1
  80. package/dist/index239.js +51 -6
  81. package/dist/index239.js.map +1 -1
  82. package/dist/index240.js +115 -13
  83. package/dist/index240.js.map +1 -1
  84. package/dist/index241.js +6 -687
  85. package/dist/index241.js.map +1 -1
  86. package/dist/index242.js +13 -253
  87. package/dist/index242.js.map +1 -1
  88. package/dist/index243.js +662 -676
  89. package/dist/index243.js.map +1 -1
  90. package/dist/index244.js +252 -7430
  91. package/dist/index244.js.map +1 -1
  92. package/dist/index245.js +700 -6
  93. package/dist/index245.js.map +1 -1
  94. package/dist/index246.js +7429 -11
  95. package/dist/index246.js.map +1 -1
  96. package/dist/index247.js +5 -4
  97. package/dist/index247.js.map +1 -1
  98. package/dist/index248.js +11 -458
  99. package/dist/index248.js.map +1 -1
  100. package/dist/index249.js +5 -37
  101. package/dist/index249.js.map +1 -1
  102. package/dist/index250.js +458 -18
  103. package/dist/index250.js.map +1 -1
  104. package/dist/index251.js +34 -24
  105. package/dist/index251.js.map +1 -1
  106. package/dist/index252.js +19 -4
  107. package/dist/index252.js.map +1 -1
  108. package/dist/index253.js +23 -54
  109. package/dist/index253.js.map +1 -1
  110. package/dist/index254.js +4 -7
  111. package/dist/index254.js.map +1 -1
  112. package/dist/index255.js +57 -11
  113. package/dist/index255.js.map +1 -1
  114. package/dist/index256.js +8 -3
  115. package/dist/index256.js.map +1 -1
  116. package/dist/index257.js +12 -16
  117. package/dist/index257.js.map +1 -1
  118. package/dist/index258.js +3 -26
  119. package/dist/index258.js.map +1 -1
  120. package/dist/index259.js +15 -42
  121. package/dist/index259.js.map +1 -1
  122. package/dist/index260.js +25 -13
  123. package/dist/index260.js.map +1 -1
  124. package/dist/index261.js +40 -22
  125. package/dist/index261.js.map +1 -1
  126. package/dist/index262.js +13 -17
  127. package/dist/index262.js.map +1 -1
  128. package/dist/index263.js +24 -34
  129. package/dist/index263.js.map +1 -1
  130. package/dist/index264.js +17 -5
  131. package/dist/index264.js.map +1 -1
  132. package/dist/index265.js +35 -9
  133. package/dist/index265.js.map +1 -1
  134. package/dist/index266.js +5 -8
  135. package/dist/index266.js.map +1 -1
  136. package/dist/index267.js +9 -9
  137. package/dist/index267.js.map +1 -1
  138. package/dist/index268.js +8 -10
  139. package/dist/index268.js.map +1 -1
  140. package/dist/index269.js +9 -7
  141. package/dist/index269.js.map +1 -1
  142. package/dist/index270.js +9 -72
  143. package/dist/index270.js.map +1 -1
  144. package/dist/index271.js +7 -171
  145. package/dist/index271.js.map +1 -1
  146. package/dist/index272.js +63 -104
  147. package/dist/index272.js.map +1 -1
  148. package/dist/index273.js +169 -12
  149. package/dist/index273.js.map +1 -1
  150. package/dist/index274.js +109 -75
  151. package/dist/index274.js.map +1 -1
  152. package/dist/index275.js +12 -44
  153. package/dist/index275.js.map +1 -1
  154. package/dist/index276.js +79 -12
  155. package/dist/index276.js.map +1 -1
  156. package/dist/index277.js +45 -15
  157. package/dist/index277.js.map +1 -1
  158. package/dist/index278.js +12 -98
  159. package/dist/index278.js.map +1 -1
  160. package/dist/index279.js +15 -55
  161. package/dist/index279.js.map +1 -1
  162. package/dist/index280.js +89 -98
  163. package/dist/index280.js.map +1 -1
  164. package/dist/index281.js +27 -42
  165. package/dist/index281.js.map +1 -1
  166. package/dist/index282.js +92 -97
  167. package/dist/index282.js.map +1 -1
  168. package/dist/index283.js +62 -46
  169. package/dist/index283.js.map +1 -1
  170. package/dist/index284.js +108 -38
  171. package/dist/index284.js.map +1 -1
  172. package/dist/index285.js +48 -135
  173. package/dist/index285.js.map +1 -1
  174. package/dist/index286.js +43 -139
  175. package/dist/index286.js.map +1 -1
  176. package/dist/index287.js +105 -217
  177. package/dist/index287.js.map +1 -1
  178. package/dist/index288.js +109 -210
  179. package/dist/index288.js.map +1 -1
  180. package/dist/index289.js +168 -212
  181. package/dist/index289.js.map +1 -1
  182. package/dist/index290.js +240 -5
  183. package/dist/index290.js.map +1 -1
  184. package/dist/index291.js +298 -6
  185. package/dist/index291.js.map +1 -1
  186. package/dist/index292.js +5 -7
  187. package/dist/index292.js.map +1 -1
  188. package/dist/index293.js +4 -4
  189. package/dist/index293.js.map +1 -1
  190. package/dist/index294.js +7 -6
  191. package/dist/index294.js.map +1 -1
  192. package/dist/index295.js +6 -21
  193. package/dist/index295.js.map +1 -1
  194. package/dist/index296.js +6 -10
  195. package/dist/index296.js.map +1 -1
  196. package/dist/index297.js +18 -123
  197. package/dist/index297.js.map +1 -1
  198. package/dist/index298.js +10 -164
  199. package/dist/index298.js.map +1 -1
  200. package/dist/index299.js +116 -58
  201. package/dist/index299.js.map +1 -1
  202. package/dist/index300.js +161 -106
  203. package/dist/index300.js.map +1 -1
  204. package/dist/index301.js +66 -489
  205. package/dist/index301.js.map +1 -1
  206. package/dist/index302.js +106 -59
  207. package/dist/index302.js.map +1 -1
  208. package/dist/index303.js +492 -4
  209. package/dist/index303.js.map +1 -1
  210. package/dist/index304.js +62 -27
  211. package/dist/index304.js.map +1 -1
  212. package/dist/index305.js +4 -66
  213. package/dist/index305.js.map +1 -1
  214. package/dist/index306.js +27 -152
  215. package/dist/index306.js.map +1 -1
  216. package/dist/index307.js +59 -555
  217. package/dist/index307.js.map +1 -1
  218. package/dist/index308.js +143 -201
  219. package/dist/index308.js.map +1 -1
  220. package/dist/index309.js +56 -326
  221. package/dist/index309.js.map +1 -1
  222. package/dist/index310.js +553 -260
  223. package/dist/index310.js.map +1 -1
  224. package/dist/index311.js +214 -0
  225. package/dist/index311.js.map +1 -0
  226. package/dist/index312.js +335 -0
  227. package/dist/index312.js.map +1 -0
  228. package/dist/index313.js +272 -0
  229. package/dist/index313.js.map +1 -0
  230. package/package.json +2 -2
  231. package/dist/index234.js.map +0 -1
  232. package/dist/index237.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index307.js","names":["React","PopperPrimitive.Root","PopperPrimitive.Anchor","PortalPrimitive","RemoveScroll","RovingFocusGroup.Root","PopperPrimitive.Content","RovingFocusGroup.Item","PopperPrimitive.Arrow"],"sources":["../../../node_modules/@radix-ui/react-menu/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/menu.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs, composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport { createRovingFocusGroupScope } from \"@radix-ui/react-roving-focus\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar SELECTION_KEYS = [\"Enter\", \" \"];\nvar FIRST_KEYS = [\"ArrowDown\", \"PageUp\", \"Home\"];\nvar LAST_KEYS = [\"ArrowUp\", \"PageDown\", \"End\"];\nvar FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];\nvar SUB_OPEN_KEYS = {\n ltr: [...SELECTION_KEYS, \"ArrowRight\"],\n rtl: [...SELECTION_KEYS, \"ArrowLeft\"]\n};\nvar SUB_CLOSE_KEYS = {\n ltr: [\"ArrowLeft\"],\n rtl: [\"ArrowRight\"]\n};\nvar MENU_NAME = \"Menu\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(MENU_NAME);\nvar [createMenuContext, createMenuScope] = createContextScope(MENU_NAME, [\n createCollectionScope,\n createPopperScope,\n createRovingFocusGroupScope\n]);\nvar usePopperScope = createPopperScope();\nvar useRovingFocusGroupScope = createRovingFocusGroupScope();\nvar [MenuProvider, useMenuContext] = createMenuContext(MENU_NAME);\nvar [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME);\nvar Menu = (props) => {\n const { __scopeMenu, open = false, children, dir, onOpenChange, modal = true } = props;\n const popperScope = usePopperScope(__scopeMenu);\n const [content, setContent] = React.useState(null);\n const isUsingKeyboardRef = React.useRef(false);\n const handleOpenChange = useCallbackRef(onOpenChange);\n const direction = useDirection(dir);\n React.useEffect(() => {\n const handleKeyDown = () => {\n isUsingKeyboardRef.current = true;\n document.addEventListener(\"pointerdown\", handlePointer, { capture: true, once: true });\n document.addEventListener(\"pointermove\", handlePointer, { capture: true, once: true });\n };\n const handlePointer = () => isUsingKeyboardRef.current = false;\n document.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => {\n document.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n document.removeEventListener(\"pointerdown\", handlePointer, { capture: true });\n document.removeEventListener(\"pointermove\", handlePointer, { capture: true });\n };\n }, []);\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n MenuProvider,\n {\n scope: __scopeMenu,\n open,\n onOpenChange: handleOpenChange,\n content,\n onContentChange: setContent,\n children: /* @__PURE__ */ jsx(\n MenuRootProvider,\n {\n scope: __scopeMenu,\n onClose: React.useCallback(() => handleOpenChange(false), [handleOpenChange]),\n isUsingKeyboardRef,\n dir: direction,\n modal,\n children\n }\n )\n }\n ) });\n};\nMenu.displayName = MENU_NAME;\nvar ANCHOR_NAME = \"MenuAnchor\";\nvar MenuAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...anchorProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nMenuAnchor.displayName = ANCHOR_NAME;\nvar PORTAL_NAME = \"MenuPortal\";\nvar [PortalProvider, usePortalContext] = createMenuContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar MenuPortal = (props) => {\n const { __scopeMenu, forceMount, children, container } = props;\n const context = useMenuContext(PORTAL_NAME, __scopeMenu);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nMenuPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"MenuContent\";\nvar [MenuContentProvider, useMenuContentContext] = createMenuContext(CONTENT_NAME);\nvar MenuContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeMenu, children: rootContext.modal ? /* @__PURE__ */ jsx(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) });\n }\n);\nvar MenuRootContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const content = ref.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: context.open,\n disableOutsideScroll: true,\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n ),\n onDismiss: () => context.onOpenChange(false)\n }\n );\n }\n);\nvar MenuRootContentNonModal = React.forwardRef((props, forwardedRef) => {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n return /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n disableOutsideScroll: false,\n onDismiss: () => context.onOpenChange(false)\n }\n );\n});\nvar Slot = createSlot(\"MenuContent.ScrollLock\");\nvar MenuContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeMenu,\n loop = false,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEntryFocus,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n disableOutsideScroll,\n ...contentProps\n } = props;\n const context = useMenuContext(CONTENT_NAME, __scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const getItems = useCollection(__scopeMenu);\n const [currentItemId, setCurrentItemId] = React.useState(null);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef, context.onContentChange);\n const timerRef = React.useRef(0);\n const searchRef = React.useRef(\"\");\n const pointerGraceTimerRef = React.useRef(0);\n const pointerGraceIntentRef = React.useRef(null);\n const pointerDirRef = React.useRef(\"right\");\n const lastPointerXRef = React.useRef(0);\n const ScrollLockWrapper = disableOutsideScroll ? RemoveScroll : React.Fragment;\n const scrollLockWrapperProps = disableOutsideScroll ? { as: Slot, allowPinchZoom: true } : void 0;\n const handleTypeaheadSearch = (key) => {\n const search = searchRef.current + key;\n const items = getItems().filter((item) => !item.disabled);\n const currentItem = document.activeElement;\n const currentMatch = items.find((item) => item.ref.current === currentItem)?.textValue;\n const values = items.map((item) => item.textValue);\n const nextMatch = getNextMatch(values, search, currentMatch);\n const newItem = items.find((item) => item.textValue === nextMatch)?.ref.current;\n (function updateSearch(value) {\n searchRef.current = value;\n window.clearTimeout(timerRef.current);\n if (value !== \"\") timerRef.current = window.setTimeout(() => updateSearch(\"\"), 1e3);\n })(search);\n if (newItem) {\n setTimeout(() => newItem.focus());\n }\n };\n React.useEffect(() => {\n return () => window.clearTimeout(timerRef.current);\n }, []);\n useFocusGuards();\n const isPointerMovingToSubmenu = React.useCallback((event) => {\n const isMovingTowards = pointerDirRef.current === pointerGraceIntentRef.current?.side;\n return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area);\n }, []);\n return /* @__PURE__ */ jsx(\n MenuContentProvider,\n {\n scope: __scopeMenu,\n searchRef,\n onItemEnter: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu]\n ),\n onItemLeave: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) return;\n contentRef.current?.focus();\n setCurrentItemId(null);\n },\n [isPointerMovingToSubmenu]\n ),\n onTriggerLeave: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu]\n ),\n pointerGraceTimerRef,\n onPointerGraceIntentChange: React.useCallback((intent) => {\n pointerGraceIntentRef.current = intent;\n }, []),\n children: /* @__PURE__ */ jsx(ScrollLockWrapper, { ...scrollLockWrapperProps, children: /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n trapped: trapFocus,\n onMountAutoFocus: composeEventHandlers(onOpenAutoFocus, (event) => {\n event.preventDefault();\n contentRef.current?.focus({ preventScroll: true });\n }),\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n children: /* @__PURE__ */ jsx(\n RovingFocusGroup.Root,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n dir: rootContext.dir,\n orientation: \"vertical\",\n loop,\n currentTabStopId: currentItemId,\n onCurrentTabStopIdChange: setCurrentItemId,\n onEntryFocus: composeEventHandlers(onEntryFocus, (event) => {\n if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();\n }),\n preventScrollOnEntryFocus: true,\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n role: \"menu\",\n \"aria-orientation\": \"vertical\",\n \"data-state\": getOpenState(context.open),\n \"data-radix-menu-content\": \"\",\n dir: rootContext.dir,\n ...popperScope,\n ...contentProps,\n ref: composedRefs,\n style: { outline: \"none\", ...contentProps.style },\n onKeyDown: composeEventHandlers(contentProps.onKeyDown, (event) => {\n const target = event.target;\n const isKeyDownInside = target.closest(\"[data-radix-menu-content]\") === event.currentTarget;\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n const isCharacterKey = event.key.length === 1;\n if (isKeyDownInside) {\n if (event.key === \"Tab\") event.preventDefault();\n if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);\n }\n const content = contentRef.current;\n if (event.target !== content) return;\n if (!FIRST_LAST_KEYS.includes(event.key)) return;\n event.preventDefault();\n const items = getItems().filter((item) => !item.disabled);\n const candidateNodes = items.map((item) => item.ref.current);\n if (LAST_KEYS.includes(event.key)) candidateNodes.reverse();\n focusFirst(candidateNodes);\n }),\n onBlur: composeEventHandlers(props.onBlur, (event) => {\n if (!event.currentTarget.contains(event.target)) {\n window.clearTimeout(timerRef.current);\n searchRef.current = \"\";\n }\n }),\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n const target = event.target;\n const pointerXHasChanged = lastPointerXRef.current !== event.clientX;\n if (event.currentTarget.contains(target) && pointerXHasChanged) {\n const newDir = event.clientX > lastPointerXRef.current ? \"right\" : \"left\";\n pointerDirRef.current = newDir;\n lastPointerXRef.current = event.clientX;\n }\n })\n )\n }\n )\n }\n )\n }\n )\n }\n ) })\n }\n );\n }\n);\nMenuContent.displayName = CONTENT_NAME;\nvar GROUP_NAME = \"MenuGroup\";\nvar MenuGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...groupProps } = props;\n return /* @__PURE__ */ jsx(Primitive.div, { role: \"group\", ...groupProps, ref: forwardedRef });\n }\n);\nMenuGroup.displayName = GROUP_NAME;\nvar LABEL_NAME = \"MenuLabel\";\nvar MenuLabel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...labelProps } = props;\n return /* @__PURE__ */ jsx(Primitive.div, { ...labelProps, ref: forwardedRef });\n }\n);\nMenuLabel.displayName = LABEL_NAME;\nvar ITEM_NAME = \"MenuItem\";\nvar ITEM_SELECT = \"menu.itemSelect\";\nvar MenuItem = React.forwardRef(\n (props, forwardedRef) => {\n const { disabled = false, onSelect, ...itemProps } = props;\n const ref = React.useRef(null);\n const rootContext = useMenuRootContext(ITEM_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(ITEM_NAME, props.__scopeMenu);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const isPointerDownRef = React.useRef(false);\n const handleSelect = () => {\n const menuItem = ref.current;\n if (!disabled && menuItem) {\n const itemSelectEvent = new CustomEvent(ITEM_SELECT, { bubbles: true, cancelable: true });\n menuItem.addEventListener(ITEM_SELECT, (event) => onSelect?.(event), { once: true });\n dispatchDiscreteCustomEvent(menuItem, itemSelectEvent);\n if (itemSelectEvent.defaultPrevented) {\n isPointerDownRef.current = false;\n } else {\n rootContext.onClose();\n }\n }\n };\n return /* @__PURE__ */ jsx(\n MenuItemImpl,\n {\n ...itemProps,\n ref: composedRefs,\n disabled,\n onClick: composeEventHandlers(props.onClick, handleSelect),\n onPointerDown: (event) => {\n props.onPointerDown?.(event);\n isPointerDownRef.current = true;\n },\n onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {\n if (!isPointerDownRef.current) event.currentTarget?.click();\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef.current !== \"\";\n if (disabled || isTypingAhead && event.key === \" \") return;\n if (SELECTION_KEYS.includes(event.key)) {\n event.currentTarget.click();\n event.preventDefault();\n }\n })\n }\n );\n }\n);\nMenuItem.displayName = ITEM_NAME;\nvar MenuItemImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, disabled = false, textValue, ...itemProps } = props;\n const contentContext = useMenuContentContext(ITEM_NAME, __scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const [isFocused, setIsFocused] = React.useState(false);\n const [textContent, setTextContent] = React.useState(\"\");\n React.useEffect(() => {\n const menuItem = ref.current;\n if (menuItem) {\n setTextContent((menuItem.textContent ?? \"\").trim());\n }\n }, [itemProps.children]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeMenu,\n disabled,\n textValue: textValue ?? textContent,\n children: /* @__PURE__ */ jsx(RovingFocusGroup.Item, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"menuitem\",\n \"data-highlighted\": isFocused ? \"\" : void 0,\n \"aria-disabled\": disabled || void 0,\n \"data-disabled\": disabled ? \"\" : void 0,\n ...itemProps,\n ref: composedRefs,\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n if (disabled) {\n contentContext.onItemLeave(event);\n } else {\n contentContext.onItemEnter(event);\n if (!event.defaultPrevented) {\n const item = event.currentTarget;\n item.focus({ preventScroll: true });\n }\n }\n })\n ),\n onPointerLeave: composeEventHandlers(\n props.onPointerLeave,\n whenMouse((event) => contentContext.onItemLeave(event))\n ),\n onFocus: composeEventHandlers(props.onFocus, () => setIsFocused(true)),\n onBlur: composeEventHandlers(props.onBlur, () => setIsFocused(false))\n }\n ) })\n }\n );\n }\n);\nvar CHECKBOX_ITEM_NAME = \"MenuCheckboxItem\";\nvar MenuCheckboxItem = React.forwardRef(\n (props, forwardedRef) => {\n const { checked = false, onCheckedChange, ...checkboxItemProps } = props;\n return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(\n MenuItem,\n {\n role: \"menuitemcheckbox\",\n \"aria-checked\": isIndeterminate(checked) ? \"mixed\" : checked,\n ...checkboxItemProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(checked),\n onSelect: composeEventHandlers(\n checkboxItemProps.onSelect,\n () => onCheckedChange?.(isIndeterminate(checked) ? true : !checked),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\nvar RADIO_GROUP_NAME = \"MenuRadioGroup\";\nvar [RadioGroupProvider, useRadioGroupContext] = createMenuContext(\n RADIO_GROUP_NAME,\n { value: void 0, onValueChange: () => {\n } }\n);\nvar MenuRadioGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { value, onValueChange, ...groupProps } = props;\n const handleValueChange = useCallbackRef(onValueChange);\n return /* @__PURE__ */ jsx(RadioGroupProvider, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ jsx(MenuGroup, { ...groupProps, ref: forwardedRef }) });\n }\n);\nMenuRadioGroup.displayName = RADIO_GROUP_NAME;\nvar RADIO_ITEM_NAME = \"MenuRadioItem\";\nvar MenuRadioItem = React.forwardRef(\n (props, forwardedRef) => {\n const { value, ...radioItemProps } = props;\n const context = useRadioGroupContext(RADIO_ITEM_NAME, props.__scopeMenu);\n const checked = value === context.value;\n return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(\n MenuItem,\n {\n role: \"menuitemradio\",\n \"aria-checked\": checked,\n ...radioItemProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(checked),\n onSelect: composeEventHandlers(\n radioItemProps.onSelect,\n () => context.onValueChange?.(value),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nMenuRadioItem.displayName = RADIO_ITEM_NAME;\nvar ITEM_INDICATOR_NAME = \"MenuItemIndicator\";\nvar [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext(\n ITEM_INDICATOR_NAME,\n { checked: false }\n);\nvar MenuItemIndicator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, forceMount, ...itemIndicatorProps } = props;\n const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu);\n return /* @__PURE__ */ jsx(\n Presence,\n {\n present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...itemIndicatorProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(indicatorContext.checked)\n }\n )\n }\n );\n }\n);\nMenuItemIndicator.displayName = ITEM_INDICATOR_NAME;\nvar SEPARATOR_NAME = \"MenuSeparator\";\nvar MenuSeparator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...separatorProps } = props;\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"separator\",\n \"aria-orientation\": \"horizontal\",\n ...separatorProps,\n ref: forwardedRef\n }\n );\n }\n);\nMenuSeparator.displayName = SEPARATOR_NAME;\nvar ARROW_NAME = \"MenuArrow\";\nvar MenuArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nMenuArrow.displayName = ARROW_NAME;\nvar SUB_NAME = \"MenuSub\";\nvar [MenuSubProvider, useMenuSubContext] = createMenuContext(SUB_NAME);\nvar MenuSub = (props) => {\n const { __scopeMenu, children, open = false, onOpenChange } = props;\n const parentMenuContext = useMenuContext(SUB_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const [trigger, setTrigger] = React.useState(null);\n const [content, setContent] = React.useState(null);\n const handleOpenChange = useCallbackRef(onOpenChange);\n React.useEffect(() => {\n if (parentMenuContext.open === false) handleOpenChange(false);\n return () => handleOpenChange(false);\n }, [parentMenuContext.open, handleOpenChange]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n MenuProvider,\n {\n scope: __scopeMenu,\n open,\n onOpenChange: handleOpenChange,\n content,\n onContentChange: setContent,\n children: /* @__PURE__ */ jsx(\n MenuSubProvider,\n {\n scope: __scopeMenu,\n contentId: useId(),\n triggerId: useId(),\n trigger,\n onTriggerChange: setTrigger,\n children\n }\n )\n }\n ) });\n};\nMenuSub.displayName = SUB_NAME;\nvar SUB_TRIGGER_NAME = \"MenuSubTrigger\";\nvar MenuSubTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const context = useMenuContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const openTimerRef = React.useRef(null);\n const { pointerGraceTimerRef, onPointerGraceIntentChange } = contentContext;\n const scope = { __scopeMenu: props.__scopeMenu };\n const clearOpenTimer = React.useCallback(() => {\n if (openTimerRef.current) window.clearTimeout(openTimerRef.current);\n openTimerRef.current = null;\n }, []);\n React.useEffect(() => clearOpenTimer, [clearOpenTimer]);\n React.useEffect(() => {\n const pointerGraceTimer = pointerGraceTimerRef.current;\n return () => {\n window.clearTimeout(pointerGraceTimer);\n onPointerGraceIntentChange(null);\n };\n }, [pointerGraceTimerRef, onPointerGraceIntentChange]);\n return /* @__PURE__ */ jsx(MenuAnchor, { asChild: true, ...scope, children: /* @__PURE__ */ jsx(\n MenuItemImpl,\n {\n id: subContext.triggerId,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": context.open,\n \"aria-controls\": subContext.contentId,\n \"data-state\": getOpenState(context.open),\n ...props,\n ref: composeRefs(forwardedRef, subContext.onTriggerChange),\n onClick: (event) => {\n props.onClick?.(event);\n if (props.disabled || event.defaultPrevented) return;\n event.currentTarget.focus();\n if (!context.open) context.onOpenChange(true);\n },\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n contentContext.onItemEnter(event);\n if (event.defaultPrevented) return;\n if (!props.disabled && !context.open && !openTimerRef.current) {\n contentContext.onPointerGraceIntentChange(null);\n openTimerRef.current = window.setTimeout(() => {\n context.onOpenChange(true);\n clearOpenTimer();\n }, 100);\n }\n })\n ),\n onPointerLeave: composeEventHandlers(\n props.onPointerLeave,\n whenMouse((event) => {\n clearOpenTimer();\n const contentRect = context.content?.getBoundingClientRect();\n if (contentRect) {\n const side = context.content?.dataset.side;\n const rightSide = side === \"right\";\n const bleed = rightSide ? -5 : 5;\n const contentNearEdge = contentRect[rightSide ? \"left\" : \"right\"];\n const contentFarEdge = contentRect[rightSide ? \"right\" : \"left\"];\n contentContext.onPointerGraceIntentChange({\n area: [\n // Apply a bleed on clientX to ensure that our exit point is\n // consistently within polygon bounds\n { x: event.clientX + bleed, y: event.clientY },\n { x: contentNearEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.bottom },\n { x: contentNearEdge, y: contentRect.bottom }\n ],\n side\n });\n window.clearTimeout(pointerGraceTimerRef.current);\n pointerGraceTimerRef.current = window.setTimeout(\n () => contentContext.onPointerGraceIntentChange(null),\n 300\n );\n } else {\n contentContext.onTriggerLeave(event);\n if (event.defaultPrevented) return;\n contentContext.onPointerGraceIntentChange(null);\n }\n })\n ),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef.current !== \"\";\n if (props.disabled || isTypingAhead && event.key === \" \") return;\n if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) {\n context.onOpenChange(true);\n context.content?.focus();\n event.preventDefault();\n }\n })\n }\n ) });\n }\n);\nMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\nvar SUB_CONTENT_NAME = \"MenuSubContent\";\nvar MenuSubContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, ...subContentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n id: subContext.contentId,\n \"aria-labelledby\": subContext.triggerId,\n ...subContentProps,\n ref: composedRefs,\n align: \"start\",\n side: rootContext.dir === \"rtl\" ? \"left\" : \"right\",\n disableOutsidePointerEvents: false,\n disableOutsideScroll: false,\n trapFocus: false,\n onOpenAutoFocus: (event) => {\n if (rootContext.isUsingKeyboardRef.current) ref.current?.focus();\n event.preventDefault();\n },\n onCloseAutoFocus: (event) => event.preventDefault(),\n onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => {\n if (event.target !== subContext.trigger) context.onOpenChange(false);\n }),\n onEscapeKeyDown: composeEventHandlers(props.onEscapeKeyDown, (event) => {\n rootContext.onClose();\n event.preventDefault();\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isKeyDownInside = event.currentTarget.contains(event.target);\n const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event.key);\n if (isKeyDownInside && isCloseKey) {\n context.onOpenChange(false);\n subContext.trigger?.focus();\n event.preventDefault();\n }\n })\n }\n ) }) }) });\n }\n);\nMenuSubContent.displayName = SUB_CONTENT_NAME;\nfunction getOpenState(open) {\n return open ? \"open\" : \"closed\";\n}\nfunction isIndeterminate(checked) {\n return checked === \"indeterminate\";\n}\nfunction getCheckedState(checked) {\n return isIndeterminate(checked) ? \"indeterminate\" : checked ? \"checked\" : \"unchecked\";\n}\nfunction focusFirst(candidates) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus();\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nfunction getNextMatch(values, search, currentMatch) {\n const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);\n const normalizedSearch = isRepeated ? search[0] : search;\n const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1;\n let wrappedValues = wrapArray(values, Math.max(currentMatchIndex, 0));\n const excludeCurrentMatch = normalizedSearch.length === 1;\n if (excludeCurrentMatch) wrappedValues = wrappedValues.filter((v) => v !== currentMatch);\n const nextMatch = wrappedValues.find(\n (value) => value.toLowerCase().startsWith(normalizedSearch.toLowerCase())\n );\n return nextMatch !== currentMatch ? nextMatch : void 0;\n}\nfunction isPointInPolygon(point, polygon) {\n const { x, y } = point;\n let inside = false;\n for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n const ii = polygon[i];\n const jj = polygon[j];\n const xi = ii.x;\n const yi = ii.y;\n const xj = jj.x;\n const yj = jj.y;\n const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;\n if (intersect) inside = !inside;\n }\n return inside;\n}\nfunction isPointerInGraceArea(event, area) {\n if (!area) return false;\n const cursorPos = { x: event.clientX, y: event.clientY };\n return isPointInPolygon(cursorPos, area);\n}\nfunction whenMouse(handler) {\n return (event) => event.pointerType === \"mouse\" ? handler(event) : void 0;\n}\nvar Root3 = Menu;\nvar Anchor2 = MenuAnchor;\nvar Portal = MenuPortal;\nvar Content2 = MenuContent;\nvar Group = MenuGroup;\nvar Label = MenuLabel;\nvar Item2 = MenuItem;\nvar CheckboxItem = MenuCheckboxItem;\nvar RadioGroup = MenuRadioGroup;\nvar RadioItem = MenuRadioItem;\nvar ItemIndicator = MenuItemIndicator;\nvar Separator = MenuSeparator;\nvar Arrow2 = MenuArrow;\nvar Sub = MenuSub;\nvar SubTrigger = MenuSubTrigger;\nvar SubContent = MenuSubContent;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n CheckboxItem,\n Content2 as Content,\n Group,\n Item2 as Item,\n ItemIndicator,\n Label,\n Menu,\n MenuAnchor,\n MenuArrow,\n MenuCheckboxItem,\n MenuContent,\n MenuGroup,\n MenuItem,\n MenuItemIndicator,\n MenuLabel,\n MenuPortal,\n MenuRadioGroup,\n MenuRadioItem,\n MenuSeparator,\n MenuSub,\n MenuSubContent,\n MenuSubTrigger,\n Portal,\n RadioGroup,\n RadioItem,\n Root3 as Root,\n Separator,\n Sub,\n SubContent,\n SubTrigger,\n createMenuScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAI,IAAiB,CAAC,SAAS,IAAI,EAC/B,KAAa;CAAC;CAAa;CAAU;CAAO,EAC5C,IAAY;CAAC;CAAW;CAAY;CAAM,EAC1C,KAAkB,CAAC,GAAG,IAAY,GAAG,EAAU,EAC/C,IAAgB;CAClB,KAAK,CAAC,GAAG,GAAgB,aAAa;CACtC,KAAK,CAAC,GAAG,GAAgB,YAAY;CACtC,EACG,KAAiB;CACnB,KAAK,CAAC,YAAY;CAClB,KAAK,CAAC,aAAa;CACpB,EACG,IAAY,QACZ,CAAC,GAAY,IAAe,MAAyB,EAAiB,EAAU,EAChF,CAAC,GAAmB,KAAmB,EAAmB,GAAW;CACvE;CACA;CACA;CACD,CAAC,EACE,IAAiB,GAAmB,EACpC,KAA2B,GAA6B,EACxD,CAAC,GAAc,KAAkB,EAAkB,EAAU,EAC7D,CAAC,GAAkB,KAAsB,EAAkB,EAAU,EACrE,KAAQ,MAAU;CACpB,IAAM,EAAE,gBAAa,UAAO,IAAO,aAAU,QAAK,iBAAc,WAAQ,OAAS,GAC3E,IAAc,EAAe,EAAY,EACzC,CAAC,GAAS,KAAcA,EAAM,SAAS,KAAK,EAC5C,IAAqBA,EAAM,OAAO,GAAM,EACxC,IAAmB,EAAe,EAAa,EAC/C,IAAY,EAAa,EAAI;AAenC,QAdA,EAAM,gBAAgB;EACpB,IAAM,UAAsB;AAG1B,G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,IAAS;AACb,MAAK,IAAI,IAAI,GAAG,IAAI,EAAQ,SAAS,GAAG,IAAI,EAAQ,QAAQ,IAAI,KAAK;EACnE,IAAM,IAAK,EAAQ,IACb,IAAK,EAAQ,IACb,IAAK,EAAG,GACR,IAAK,EAAG,GACR,IAAK,EAAG,GACR,IAAK,EAAG;AAEd,EADkB,IAAK,KAAM,IAAK,KAAK,KAAK,IAAK,MAAO,IAAI,MAAO,IAAK,KAAM,MAC/D,IAAS,CAAC;;AAE3B,QAAO;;AAET,SAAS,GAAqB,GAAO,GAAM;AAGzC,QAFK,IAEE,GADW;EAAE,GAAG,EAAM;EAAS,GAAG,EAAM;EAAS,EACrB,EAAK,GAFtB;;AAIpB,SAAS,EAAU,GAAS;AAC1B,SAAQ,MAAU,EAAM,gBAAgB,UAAU,EAAQ,EAAM,GAAG,KAAK;;AAE1E,IAAI,KAAQ,GACR,KAAU,GACV,KAAS,IACT,KAAW,GACX,KAAQ,GACR,KAAQ,IACR,KAAQ,GACR,KAAe,IACf,KAAa,IACb,KAAY,IACZ,KAAgB,IAChB,KAAY,IACZ,KAAS,IAET,KAAa,IACb,KAAa"}
1
+ {"version":3,"file":"index307.js","names":["React"],"sources":["../../../node_modules/@radix-ui/react-presence/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/presence.tsx\nimport * as React2 from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// src/use-state-machine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef(null);\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n stylesRef.current = node2 ? getComputedStyle(node2) : null;\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Presence;\nexport {\n Presence,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"x_google_ignoreList":[0],"mappings":";;;;;AASA,SAAS,EAAgB,GAAc,GAAS;AAC9C,QAAOA,EAAM,YAAY,GAAO,MACZ,EAAQ,GAAO,MACb,GACnB,EAAa;;AAIlB,IAAI,KAAY,MAAU;CACxB,IAAM,EAAE,YAAS,gBAAa,GACxB,IAAW,EAAY,EAAQ,EAC/B,IAAQ,OAAO,KAAa,aAAa,EAAS,EAAE,SAAS,EAAS,WAAW,CAAC,GAAG,EAAO,SAAS,KAAK,EAAS,EACnH,IAAM,EAAgB,EAAS,KAAK,EAAc,EAAM,CAAC;AAE/D,QADmB,OAAO,KAAa,cACl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,MAAM,oBAAoB;OAEjC;;MAIF,KAAwB,MAAU;AACtC,IAAI,EAAM,WAAW,MACnB,EAAqB,UAAU,EAAiB,EAAU,QAAQ;;AAMtE,UAHA,EAAK,iBAAiB,kBAAkB,EAAqB,EAC7D,EAAK,iBAAiB,mBAAmB,EAAmB,EAC5D,EAAK,iBAAiB,gBAAgB,EAAmB,QAC5C;AAIX,IAHA,EAAY,aAAa,EAAU,EACnC,EAAK,oBAAoB,kBAAkB,EAAqB,EAChE,EAAK,oBAAoB,mBAAmB,EAAmB,EAC/D,EAAK,oBAAoB,gBAAgB,EAAmB;;QAG9D,GAAK,gBAAgB;IAEtB,CAAC,GAAM,EAAK,CAAC,EACT;EACL,WAAW,CAAC,WAAW,mBAAmB,CAAC,SAAS,EAAM;EAC1D,KAAK,EAAO,aAAa,MAAU;AAEjC,GADA,EAAU,UAAU,IAAQ,iBAAiB,EAAM,GAAG,MACtD,EAAQ,EAAM;KACb,EAAE,CAAC;EACP;;AAEH,SAAS,EAAiB,GAAQ;AAChC,QAAO,GAAQ,iBAAiB;;AAElC,SAAS,EAAc,GAAS;CAC9B,IAAI,IAAS,OAAO,yBAAyB,EAAQ,OAAO,MAAM,EAAE,KAChE,IAAU,KAAU,oBAAoB,KAAU,EAAO;AAS7D,QARI,IACK,EAAQ,OAEjB,IAAS,OAAO,yBAAyB,GAAS,MAAM,EAAE,KAC1D,IAAU,KAAU,oBAAoB,KAAU,EAAO,gBACrD,IACK,EAAQ,MAAM,MAEhB,EAAQ,MAAM,OAAO,EAAQ"}
package/dist/index308.js CHANGED
@@ -1,214 +1,156 @@
1
1
  "use client";
2
2
  import { composeEventHandlers as e } from "./index17.js";
3
- import { composeRefs as t } from "./index18.js";
3
+ import { useComposedRefs as t } from "./index18.js";
4
4
  import { Primitive as n } from "./index20.js";
5
- import { createContextScope as r } from "./index199.js";
6
- import { useId as i } from "./index205.js";
7
- import { useControllableState as a } from "./index215.js";
8
- import { Anchor2 as o, Arrow2 as s, CheckboxItem as c, Content2 as l, Group as u, Item2 as d, ItemIndicator as f, Label as p, Portal as m, RadioGroup as h, RadioItem as g, Root3 as _, Separator as v, SubContent as y, SubTrigger as b, createMenuScope as x } from "./index307.js";
9
- import * as S from "react";
10
- import { jsx as C } from "react/jsx-runtime";
11
- //#region ../../node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs
12
- var w = "DropdownMenu", [T, ee] = r(w, [x]), E = x(), [D, O] = T(w), k = (e) => {
13
- let { __scopeDropdownMenu: t, children: n, dir: r, open: o, defaultOpen: s, onOpenChange: c, modal: l = !0 } = e, u = E(t), d = S.useRef(null), [f, p] = a({
14
- prop: o,
15
- defaultProp: s ?? !1,
16
- onChange: c,
17
- caller: w
18
- });
19
- return /* @__PURE__ */ C(D, {
20
- scope: t,
21
- triggerId: i(),
22
- triggerRef: d,
23
- contentId: i(),
24
- open: f,
25
- onOpenChange: p,
26
- onOpenToggle: S.useCallback(() => p((e) => !e), [p]),
27
- modal: l,
28
- children: /* @__PURE__ */ C(_, {
29
- ...u,
30
- open: f,
31
- onOpenChange: p,
32
- dir: r,
33
- modal: l,
34
- children: n
5
+ import { useCallbackRef as r } from "./index21.js";
6
+ import { createContextScope as i } from "./index199.js";
7
+ import { createCollection as a } from "./index201.js";
8
+ import { useDirection as o } from "./index202.js";
9
+ import { useId as s } from "./index206.js";
10
+ import { useControllableState as c } from "./index217.js";
11
+ import * as l from "react";
12
+ import { jsx as u } from "react/jsx-runtime";
13
+ //#region ../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs
14
+ var d = "rovingFocusGroup.onEntryFocus", f = {
15
+ bubbles: !1,
16
+ cancelable: !0
17
+ }, p = "RovingFocusGroup", [m, h, g] = a(p), [_, v] = i(p, [g]), [y, b] = _(p), x = l.forwardRef((e, t) => /* @__PURE__ */ u(m.Provider, {
18
+ scope: e.__scopeRovingFocusGroup,
19
+ children: /* @__PURE__ */ u(m.Slot, {
20
+ scope: e.__scopeRovingFocusGroup,
21
+ children: /* @__PURE__ */ u(S, {
22
+ ...e,
23
+ ref: t
24
+ })
25
+ })
26
+ }));
27
+ x.displayName = p;
28
+ var S = l.forwardRef((i, a) => {
29
+ let { __scopeRovingFocusGroup: s, orientation: m, loop: g = !1, dir: _, currentTabStopId: v, defaultCurrentTabStopId: b, onCurrentTabStopIdChange: x, onEntryFocus: S, preventScrollOnEntryFocus: C = !1, ...w } = i, T = l.useRef(null), E = t(a, T), D = o(_), [k, A] = c({
30
+ prop: v,
31
+ defaultProp: b ?? null,
32
+ onChange: x,
33
+ caller: p
34
+ }), [j, M] = l.useState(!1), N = r(S), P = h(s), F = l.useRef(!1), [I, L] = l.useState(0);
35
+ return l.useEffect(() => {
36
+ let e = T.current;
37
+ if (e) return e.addEventListener(d, N), () => e.removeEventListener(d, N);
38
+ }, [N]), /* @__PURE__ */ u(y, {
39
+ scope: s,
40
+ orientation: m,
41
+ dir: D,
42
+ loop: g,
43
+ currentTabStopId: k,
44
+ onItemFocus: l.useCallback((e) => A(e), [A]),
45
+ onItemShiftTab: l.useCallback(() => M(!0), []),
46
+ onFocusableItemAdd: l.useCallback(() => L((e) => e + 1), []),
47
+ onFocusableItemRemove: l.useCallback(() => L((e) => e - 1), []),
48
+ children: /* @__PURE__ */ u(n.div, {
49
+ tabIndex: j || I === 0 ? -1 : 0,
50
+ "data-orientation": m,
51
+ ...w,
52
+ ref: E,
53
+ style: {
54
+ outline: "none",
55
+ ...i.style
56
+ },
57
+ onMouseDown: e(i.onMouseDown, () => {
58
+ F.current = !0;
59
+ }),
60
+ onFocus: e(i.onFocus, (e) => {
61
+ let t = !F.current;
62
+ if (e.target === e.currentTarget && t && !j) {
63
+ let t = new CustomEvent(d, f);
64
+ if (e.currentTarget.dispatchEvent(t), !t.defaultPrevented) {
65
+ let e = P().filter((e) => e.focusable);
66
+ O([
67
+ e.find((e) => e.active),
68
+ e.find((e) => e.id === k),
69
+ ...e
70
+ ].filter(Boolean).map((e) => e.ref.current), C);
71
+ }
72
+ }
73
+ F.current = !1;
74
+ }),
75
+ onBlur: e(i.onBlur, () => M(!1))
35
76
  })
36
77
  });
37
- };
38
- k.displayName = w;
39
- var A = "DropdownMenuTrigger", j = S.forwardRef((r, i) => {
40
- let { __scopeDropdownMenu: a, disabled: s = !1, ...c } = r, l = O(A, a);
41
- return /* @__PURE__ */ C(o, {
42
- asChild: !0,
43
- ...E(a),
44
- children: /* @__PURE__ */ C(n.button, {
45
- type: "button",
46
- id: l.triggerId,
47
- "aria-haspopup": "menu",
48
- "aria-expanded": l.open,
49
- "aria-controls": l.open ? l.contentId : void 0,
50
- "data-state": l.open ? "open" : "closed",
51
- "data-disabled": s ? "" : void 0,
52
- disabled: s,
53
- ...c,
54
- ref: t(i, l.triggerRef),
55
- onPointerDown: e(r.onPointerDown, (e) => {
56
- !s && e.button === 0 && e.ctrlKey === !1 && (l.onOpenToggle(), l.open || e.preventDefault());
78
+ }), C = "RovingFocusGroupItem", w = l.forwardRef((t, r) => {
79
+ let { __scopeRovingFocusGroup: i, focusable: a = !0, active: o = !1, tabStopId: c, children: d, ...f } = t, p = s(), g = c || p, _ = b(C, i), v = _.currentTabStopId === g, y = h(i), { onFocusableItemAdd: x, onFocusableItemRemove: S, currentTabStopId: w } = _;
80
+ return l.useEffect(() => {
81
+ if (a) return x(), () => S();
82
+ }, [
83
+ a,
84
+ x,
85
+ S
86
+ ]), /* @__PURE__ */ u(m.ItemSlot, {
87
+ scope: i,
88
+ id: g,
89
+ focusable: a,
90
+ active: o,
91
+ children: /* @__PURE__ */ u(n.span, {
92
+ tabIndex: v ? 0 : -1,
93
+ "data-orientation": _.orientation,
94
+ ...f,
95
+ ref: r,
96
+ onMouseDown: e(t.onMouseDown, (e) => {
97
+ a ? _.onItemFocus(g) : e.preventDefault();
98
+ }),
99
+ onFocus: e(t.onFocus, () => _.onItemFocus(g)),
100
+ onKeyDown: e(t.onKeyDown, (e) => {
101
+ if (e.key === "Tab" && e.shiftKey) {
102
+ _.onItemShiftTab();
103
+ return;
104
+ }
105
+ if (e.target !== e.currentTarget) return;
106
+ let t = D(e, _.orientation, _.dir);
107
+ if (t !== void 0) {
108
+ if (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) return;
109
+ e.preventDefault();
110
+ let n = y().filter((e) => e.focusable).map((e) => e.ref.current);
111
+ if (t === "last") n.reverse();
112
+ else if (t === "prev" || t === "next") {
113
+ t === "prev" && n.reverse();
114
+ let r = n.indexOf(e.currentTarget);
115
+ n = _.loop ? k(n, r + 1) : n.slice(r + 1);
116
+ }
117
+ setTimeout(() => O(n));
118
+ }
57
119
  }),
58
- onKeyDown: e(r.onKeyDown, (e) => {
59
- s || (["Enter", " "].includes(e.key) && l.onOpenToggle(), e.key === "ArrowDown" && l.onOpenChange(!0), [
60
- "Enter",
61
- " ",
62
- "ArrowDown"
63
- ].includes(e.key) && e.preventDefault());
64
- })
120
+ children: typeof d == "function" ? d({
121
+ isCurrentTabStop: v,
122
+ hasTabStop: w != null
123
+ }) : d
65
124
  })
66
125
  });
67
126
  });
68
- j.displayName = A;
69
- var M = "DropdownMenuPortal", N = (e) => {
70
- let { __scopeDropdownMenu: t, ...n } = e;
71
- return /* @__PURE__ */ C(m, {
72
- ...E(t),
73
- ...n
74
- });
127
+ w.displayName = C;
128
+ var T = {
129
+ ArrowLeft: "prev",
130
+ ArrowUp: "prev",
131
+ ArrowRight: "next",
132
+ ArrowDown: "next",
133
+ PageUp: "first",
134
+ Home: "first",
135
+ PageDown: "last",
136
+ End: "last"
75
137
  };
76
- N.displayName = M;
77
- var P = "DropdownMenuContent", F = S.forwardRef((t, n) => {
78
- let { __scopeDropdownMenu: r, ...i } = t, a = O(P, r), o = E(r), s = S.useRef(!1);
79
- return /* @__PURE__ */ C(l, {
80
- id: a.contentId,
81
- "aria-labelledby": a.triggerId,
82
- ...o,
83
- ...i,
84
- ref: n,
85
- onCloseAutoFocus: e(t.onCloseAutoFocus, (e) => {
86
- s.current || a.triggerRef.current?.focus(), s.current = !1, e.preventDefault();
87
- }),
88
- onInteractOutside: e(t.onInteractOutside, (e) => {
89
- let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0, r = t.button === 2 || n;
90
- (!a.modal || r) && (s.current = !0);
91
- }),
92
- style: {
93
- ...t.style,
94
- "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
95
- "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
96
- "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
97
- "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
98
- "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
99
- }
100
- });
101
- });
102
- F.displayName = P;
103
- var I = "DropdownMenuGroup", L = S.forwardRef((e, t) => {
104
- let { __scopeDropdownMenu: n, ...r } = e;
105
- return /* @__PURE__ */ C(u, {
106
- ...E(n),
107
- ...r,
108
- ref: t
109
- });
110
- });
111
- L.displayName = I;
112
- var R = "DropdownMenuLabel", z = S.forwardRef((e, t) => {
113
- let { __scopeDropdownMenu: n, ...r } = e;
114
- return /* @__PURE__ */ C(p, {
115
- ...E(n),
116
- ...r,
117
- ref: t
118
- });
119
- });
120
- z.displayName = R;
121
- var B = "DropdownMenuItem", V = S.forwardRef((e, t) => {
122
- let { __scopeDropdownMenu: n, ...r } = e;
123
- return /* @__PURE__ */ C(d, {
124
- ...E(n),
125
- ...r,
126
- ref: t
127
- });
128
- });
129
- V.displayName = B;
130
- var H = "DropdownMenuCheckboxItem", te = S.forwardRef((e, t) => {
131
- let { __scopeDropdownMenu: n, ...r } = e;
132
- return /* @__PURE__ */ C(c, {
133
- ...E(n),
134
- ...r,
135
- ref: t
136
- });
137
- });
138
- te.displayName = H;
139
- var U = "DropdownMenuRadioGroup", W = S.forwardRef((e, t) => {
140
- let { __scopeDropdownMenu: n, ...r } = e;
141
- return /* @__PURE__ */ C(h, {
142
- ...E(n),
143
- ...r,
144
- ref: t
145
- });
146
- });
147
- W.displayName = U;
148
- var G = "DropdownMenuRadioItem", K = S.forwardRef((e, t) => {
149
- let { __scopeDropdownMenu: n, ...r } = e;
150
- return /* @__PURE__ */ C(g, {
151
- ...E(n),
152
- ...r,
153
- ref: t
154
- });
155
- });
156
- K.displayName = G;
157
- var q = "DropdownMenuItemIndicator", J = S.forwardRef((e, t) => {
158
- let { __scopeDropdownMenu: n, ...r } = e;
159
- return /* @__PURE__ */ C(f, {
160
- ...E(n),
161
- ...r,
162
- ref: t
163
- });
164
- });
165
- J.displayName = q;
166
- var Y = "DropdownMenuSeparator", X = S.forwardRef((e, t) => {
167
- let { __scopeDropdownMenu: n, ...r } = e;
168
- return /* @__PURE__ */ C(v, {
169
- ...E(n),
170
- ...r,
171
- ref: t
172
- });
173
- });
174
- X.displayName = Y;
175
- var Z = "DropdownMenuArrow", Q = S.forwardRef((e, t) => {
176
- let { __scopeDropdownMenu: n, ...r } = e;
177
- return /* @__PURE__ */ C(s, {
178
- ...E(n),
179
- ...r,
180
- ref: t
181
- });
182
- });
183
- Q.displayName = Z;
184
- var $ = "DropdownMenuSubTrigger", ne = S.forwardRef((e, t) => {
185
- let { __scopeDropdownMenu: n, ...r } = e;
186
- return /* @__PURE__ */ C(b, {
187
- ...E(n),
188
- ...r,
189
- ref: t
190
- });
191
- });
192
- ne.displayName = $;
193
- var re = "DropdownMenuSubContent", ie = S.forwardRef((e, t) => {
194
- let { __scopeDropdownMenu: n, ...r } = e;
195
- return /* @__PURE__ */ C(y, {
196
- ...E(n),
197
- ...r,
198
- ref: t,
199
- style: {
200
- ...e.style,
201
- "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
202
- "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
203
- "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
204
- "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
205
- "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
206
- }
207
- });
208
- });
209
- ie.displayName = re;
210
- var ae = k, oe = j, se = N, ce = F, le = V;
138
+ function E(e, t) {
139
+ return t === "rtl" ? e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e : e;
140
+ }
141
+ function D(e, t, n) {
142
+ let r = E(e.key, n);
143
+ if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r))) return T[r];
144
+ }
145
+ function O(e, t = !1) {
146
+ let n = document.activeElement;
147
+ for (let r of e) if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
148
+ }
149
+ function k(e, t) {
150
+ return e.map((n, r) => e[(t + r) % e.length]);
151
+ }
152
+ var A = x, j = w;
211
153
  //#endregion
212
- export { ce as Content2, le as Item2, se as Portal2, ae as Root2, oe as Trigger };
154
+ export { j as Item, A as Root, v as createRovingFocusGroupScope };
213
155
 
214
156
  //# sourceMappingURL=index308.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index308.js","names":["React","MenuPrimitive.Root","MenuPrimitive.Anchor","MenuPrimitive.Portal","MenuPrimitive.Content","MenuPrimitive.Group","MenuPrimitive.Label","MenuPrimitive.Item","MenuPrimitive.CheckboxItem","MenuPrimitive.RadioGroup","MenuPrimitive.RadioItem","MenuPrimitive.ItemIndicator","MenuPrimitive.Separator","MenuPrimitive.Arrow","MenuPrimitive.SubTrigger","MenuPrimitive.SubContent"],"sources":["../../../node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/dropdown-menu.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport * as MenuPrimitive from \"@radix-ui/react-menu\";\nimport { createMenuScope } from \"@radix-ui/react-menu\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DROPDOWN_MENU_NAME = \"DropdownMenu\";\nvar [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(\n DROPDOWN_MENU_NAME,\n [createMenuScope]\n);\nvar useMenuScope = createMenuScope();\nvar [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME);\nvar DropdownMenu = (props) => {\n const {\n __scopeDropdownMenu,\n children,\n dir,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const triggerRef = React.useRef(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DROPDOWN_MENU_NAME\n });\n return /* @__PURE__ */ jsx(\n DropdownMenuProvider,\n {\n scope: __scopeDropdownMenu,\n triggerId: useId(),\n triggerRef,\n contentId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children: /* @__PURE__ */ jsx(MenuPrimitive.Root, { ...menuScope, open, onOpenChange: setOpen, dir, modal, children })\n }\n );\n};\nDropdownMenu.displayName = DROPDOWN_MENU_NAME;\nvar TRIGGER_NAME = \"DropdownMenuTrigger\";\nvar DropdownMenuTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;\n const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Anchor, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n id: context.triggerId,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.open ? context.contentId : void 0,\n \"data-state\": context.open ? \"open\" : \"closed\",\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n ...triggerProps,\n ref: composeRefs(forwardedRef, context.triggerRef),\n onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onOpenToggle();\n if (!context.open) event.preventDefault();\n }\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (disabled) return;\n if ([\"Enter\", \" \"].includes(event.key)) context.onOpenToggle();\n if (event.key === \"ArrowDown\") context.onOpenChange(true);\n if ([\"Enter\", \" \", \"ArrowDown\"].includes(event.key)) event.preventDefault();\n })\n }\n ) });\n }\n);\nDropdownMenuTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DropdownMenuPortal\";\nvar DropdownMenuPortal = (props) => {\n const { __scopeDropdownMenu, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Portal, { ...menuScope, ...portalProps });\n};\nDropdownMenuPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"DropdownMenuContent\";\nvar DropdownMenuContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...contentProps } = props;\n const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const hasInteractedOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n MenuPrimitive.Content,\n {\n id: context.contentId,\n \"aria-labelledby\": context.triggerId,\n ...menuScope,\n ...contentProps,\n ref: forwardedRef,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n hasInteractedOutsideRef.current = false;\n event.preventDefault();\n }),\n onInteractOutside: composeEventHandlers(props.onInteractOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;\n }),\n style: {\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-dropdown-menu-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-dropdown-menu-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-dropdown-menu-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-dropdown-menu-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-dropdown-menu-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n );\n }\n);\nDropdownMenuContent.displayName = CONTENT_NAME;\nvar GROUP_NAME = \"DropdownMenuGroup\";\nvar DropdownMenuGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Group, { ...menuScope, ...groupProps, ref: forwardedRef });\n }\n);\nDropdownMenuGroup.displayName = GROUP_NAME;\nvar LABEL_NAME = \"DropdownMenuLabel\";\nvar DropdownMenuLabel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Label, { ...menuScope, ...labelProps, ref: forwardedRef });\n }\n);\nDropdownMenuLabel.displayName = LABEL_NAME;\nvar ITEM_NAME = \"DropdownMenuItem\";\nvar DropdownMenuItem = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Item, { ...menuScope, ...itemProps, ref: forwardedRef });\n }\n);\nDropdownMenuItem.displayName = ITEM_NAME;\nvar CHECKBOX_ITEM_NAME = \"DropdownMenuCheckboxItem\";\nvar DropdownMenuCheckboxItem = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });\n});\nDropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\nvar RADIO_GROUP_NAME = \"DropdownMenuRadioGroup\";\nvar DropdownMenuRadioGroup = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });\n});\nDropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;\nvar RADIO_ITEM_NAME = \"DropdownMenuRadioItem\";\nvar DropdownMenuRadioItem = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });\n});\nDropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;\nvar INDICATOR_NAME = \"DropdownMenuItemIndicator\";\nvar DropdownMenuItemIndicator = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });\n});\nDropdownMenuItemIndicator.displayName = INDICATOR_NAME;\nvar SEPARATOR_NAME = \"DropdownMenuSeparator\";\nvar DropdownMenuSeparator = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Separator, { ...menuScope, ...separatorProps, ref: forwardedRef });\n});\nDropdownMenuSeparator.displayName = SEPARATOR_NAME;\nvar ARROW_NAME = \"DropdownMenuArrow\";\nvar DropdownMenuArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Arrow, { ...menuScope, ...arrowProps, ref: forwardedRef });\n }\n);\nDropdownMenuArrow.displayName = ARROW_NAME;\nvar DropdownMenuSub = (props) => {\n const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: \"DropdownMenuSub\"\n });\n return /* @__PURE__ */ jsx(MenuPrimitive.Sub, { ...menuScope, open, onOpenChange: setOpen, children });\n};\nvar SUB_TRIGGER_NAME = \"DropdownMenuSubTrigger\";\nvar DropdownMenuSubTrigger = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...subTriggerProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.SubTrigger, { ...menuScope, ...subTriggerProps, ref: forwardedRef });\n});\nDropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\nvar SUB_CONTENT_NAME = \"DropdownMenuSubContent\";\nvar DropdownMenuSubContent = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(\n MenuPrimitive.SubContent,\n {\n ...menuScope,\n ...subContentProps,\n ref: forwardedRef,\n style: {\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-dropdown-menu-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-dropdown-menu-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-dropdown-menu-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-dropdown-menu-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-dropdown-menu-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n );\n});\nDropdownMenuSubContent.displayName = SUB_CONTENT_NAME;\nvar Root2 = DropdownMenu;\nvar Trigger = DropdownMenuTrigger;\nvar Portal2 = DropdownMenuPortal;\nvar Content2 = DropdownMenuContent;\nvar Group2 = DropdownMenuGroup;\nvar Label2 = DropdownMenuLabel;\nvar Item2 = DropdownMenuItem;\nvar CheckboxItem2 = DropdownMenuCheckboxItem;\nvar RadioGroup2 = DropdownMenuRadioGroup;\nvar RadioItem2 = DropdownMenuRadioItem;\nvar ItemIndicator2 = DropdownMenuItemIndicator;\nvar Separator2 = DropdownMenuSeparator;\nvar Arrow2 = DropdownMenuArrow;\nvar Sub2 = DropdownMenuSub;\nvar SubTrigger2 = DropdownMenuSubTrigger;\nvar SubContent2 = DropdownMenuSubContent;\nexport {\n Arrow2 as Arrow,\n CheckboxItem2 as CheckboxItem,\n Content2 as Content,\n DropdownMenu,\n DropdownMenuArrow,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuItemIndicator,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n Group2 as Group,\n Item2 as Item,\n ItemIndicator2 as ItemIndicator,\n Label2 as Label,\n Portal2 as Portal,\n RadioGroup2 as RadioGroup,\n RadioItem2 as RadioItem,\n Root2 as Root,\n Separator2 as Separator,\n Sub2 as Sub,\n SubContent2 as SubContent,\n SubTrigger2 as SubTrigger,\n Trigger,\n createDropdownMenuScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;AAaA,IAAI,IAAqB,gBACrB,CAAC,GAA2B,MAA2B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C;GAE3C;EACF,CACF;EACD;AACF,GAAuB,cAAc;AACrC,IAAI,KAAQ,GACR,KAAU,GACV,KAAU,GACV,KAAW,GAGX,KAAQ"}
1
+ {"version":3,"file":"index308.js","names":["React"],"sources":["../../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n children,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n }),\n children: typeof children === \"function\" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;AAcA,IAAI,IAAc,iCACd,IAAgB;CAAE,SAAS;CAAO,YAAY;CAAM,EACpD,IAAa,oBACb,CAAC,GAAY,GAAe,KAAyB,EAAiB,EAAW,EACjF,CAAC,GAA+B,KAA+B,EACjE,GACA,CAAC,EAAsB,CACxB,EACG,CAAC,GAAqB,KAAyB,EAA8B,EAAW,EACxF,IAAmBA,EAAM,YAC1B,GAAO,MACiB,kBAAI,EAAW,UAAU;CAAE,OAAO,EAAM;CAAyB,UAA0B,kBAAI,EAAW,MAAM;EAAE,OAAO,EAAM;EAAyB,UAA0B,kBAAI,GAAsB;GAAE,GAAG;GAAO,KAAK;GAAc,CAAC;EAAE,CAAC;CAAE,CAAC,CAE5Q;AACD,EAAiB,cAAc;AAC/B,IAAI,IAAuBA,EAAM,YAAY,GAAO,MAAiB;CACnE,IAAM,EACJ,4BACA,gBACA,UAAO,IACP,QACA,kBAAkB,GAClB,4BACA,6BACA,iBACA,+BAA4B,IAC5B,GAAG,MACD,GACE,IAAMA,EAAM,OAAO,KAAK,EACxB,IAAe,EAAgB,GAAc,EAAI,EACjD,IAAY,EAAa,EAAI,EAC7B,CAAC,GAAkB,KAAuB,EAAqB;EACnE,MAAM;EACN,aAAa,KAA2B;EACxC,UAAU;EACV,QAAQ;EACT,CAAC,EACI,CAAC,GAAkB,KAAuBA,EAAM,SAAS,GAAM,EAC/D,IAAmB,EAAe,EAAa,EAC/C,IAAW,EAAc,EAAwB,EACjD,IAAkBA,EAAM,OAAO,GAAM,EACrC,CAAC,GAAqB,KAA0BA,E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