@anoki/fse-ui 1.0.743 → 1.0.745
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.
- package/dist/index.cjs121.js +1 -1
- package/dist/index.cjs121.js.map +1 -1
- package/dist/index.cjs217.js +1 -1
- package/dist/index.cjs224.js +1 -1
- package/dist/index.cjs244.js +1 -1
- package/dist/index.cjs248.js +1 -1
- package/dist/index.cjs255.js +1 -1
- package/dist/index.cjs265.js +1 -1
- package/dist/index.cjs271.js +1 -1
- package/dist/index.cjs298.js +1 -1
- package/dist/index.cjs337.js +1 -1
- package/dist/index.cjs350.js +1 -1
- package/dist/index.cjs364.js +1 -1
- package/dist/index.cjs365.js +1 -1
- package/dist/index.cjs366.js +1 -1
- package/dist/index.cjs383.js +27 -1
- package/dist/index.cjs383.js.map +1 -1
- package/dist/index.cjs384.js +1 -2
- package/dist/index.cjs384.js.map +1 -1
- package/dist/index.cjs386.js +1 -1
- package/dist/index.cjs386.js.map +1 -1
- package/dist/index.cjs387.js +1 -1
- package/dist/index.cjs387.js.map +1 -1
- package/dist/index.cjs388.js +2 -0
- package/dist/index.cjs388.js.map +1 -0
- package/dist/index.cjs389.js +2 -0
- package/dist/index.cjs389.js.map +1 -0
- package/dist/index.cjs390.js +2 -0
- package/dist/index.cjs390.js.map +1 -0
- package/dist/index.cjs391.js +1 -1
- package/dist/index.cjs391.js.map +1 -1
- package/dist/index.cjs392.js +1 -1
- package/dist/index.cjs392.js.map +1 -1
- package/dist/index.cjs393.js +1 -1
- package/dist/index.cjs393.js.map +1 -1
- package/dist/index.cjs394.js +1 -1
- package/dist/index.cjs394.js.map +1 -1
- package/dist/index.cjs396.js +1 -1
- package/dist/index.cjs396.js.map +1 -1
- package/dist/index.cjs397.js +1 -1
- package/dist/index.cjs397.js.map +1 -1
- package/dist/index.cjs398.js +1 -1
- package/dist/index.cjs398.js.map +1 -1
- package/dist/index.cjs399.js +1 -1
- package/dist/index.cjs408.js +1 -1
- package/dist/index.cjs408.js.map +1 -1
- package/dist/index.cjs409.js +1 -1
- package/dist/index.cjs409.js.map +1 -1
- package/dist/index.cjs410.js +1 -1
- package/dist/index.cjs410.js.map +1 -1
- package/dist/index.cjs411.js +1 -1
- package/dist/index.cjs411.js.map +1 -1
- package/dist/index.cjs412.js +2 -1
- package/dist/index.cjs412.js.map +1 -1
- package/dist/index.cjs413.js +1 -1
- package/dist/index.cjs413.js.map +1 -1
- package/dist/index.cjs414.js +1 -1
- package/dist/index.cjs414.js.map +1 -1
- package/dist/index.cjs415.js +1 -1
- package/dist/index.cjs415.js.map +1 -1
- package/dist/index.cjs416.js +1 -1
- package/dist/index.cjs416.js.map +1 -1
- package/dist/index.cjs417.js +1 -1
- package/dist/index.cjs417.js.map +1 -1
- package/dist/index.cjs418.js +1 -1
- package/dist/index.cjs418.js.map +1 -1
- package/dist/index.cjs419.js +1 -1
- package/dist/index.cjs419.js.map +1 -1
- package/dist/index.cjs420.js +1 -1
- package/dist/index.cjs420.js.map +1 -1
- package/dist/index.cjs423.js +2 -0
- package/dist/index.cjs423.js.map +1 -0
- package/dist/index.cjs424.js +2 -0
- package/dist/index.cjs424.js.map +1 -0
- package/dist/index.cjs425.js +2 -0
- package/dist/index.cjs425.js.map +1 -0
- package/dist/index.cjs426.js +5 -0
- package/dist/index.cjs426.js.map +1 -0
- package/dist/index.cjs427.js +1 -1
- package/dist/index.cjs427.js.map +1 -1
- package/dist/index.cjs428.js +1 -1
- package/dist/index.cjs428.js.map +1 -1
- package/dist/index.cjs429.js +1 -1
- package/dist/index.cjs429.js.map +1 -1
- package/dist/index.cjs430.js +1 -4
- package/dist/index.cjs430.js.map +1 -1
- package/dist/index.cjs431.js +1 -1
- package/dist/index.cjs431.js.map +1 -1
- package/dist/index.cjs432.js +38 -1
- package/dist/index.cjs432.js.map +1 -1
- package/dist/index.cjs433.js +1 -1
- package/dist/index.cjs433.js.map +1 -1
- package/dist/index.cjs434.js +1 -1
- package/dist/index.cjs434.js.map +1 -1
- package/dist/index.cjs435.js +2 -0
- package/dist/index.cjs435.js.map +1 -0
- package/dist/{index.cjs444.js → index.cjs436.js} +2 -2
- package/dist/{index.cjs444.js.map → index.cjs436.js.map} +1 -1
- package/dist/index.cjs437.js +2 -0
- package/dist/index.cjs437.js.map +1 -0
- package/dist/index.cjs438.js +2 -0
- package/dist/index.cjs438.js.map +1 -0
- package/dist/index.cjs439.js +2 -0
- package/dist/index.cjs439.js.map +1 -0
- package/dist/index.cjs440.js +2 -0
- package/dist/index.cjs440.js.map +1 -0
- package/dist/index.cjs441.js +2 -0
- package/dist/index.cjs441.js.map +1 -0
- package/dist/index.cjs446.js +1 -1
- package/dist/index.cjs446.js.map +1 -1
- package/dist/index.cjs447.js +1 -1
- package/dist/index.cjs447.js.map +1 -1
- package/dist/index.cjs448.js +1 -1
- package/dist/index.cjs448.js.map +1 -1
- package/dist/{index.cjs455.js → index.cjs449.js} +1 -1
- package/dist/{index.cjs455.js.map → index.cjs449.js.map} +1 -1
- package/dist/index.cjs450.js +1 -1
- package/dist/index.cjs450.js.map +1 -1
- package/dist/index.cjs451.js +1 -1
- package/dist/index.cjs451.js.map +1 -1
- package/dist/index.cjs452.js +1 -1
- package/dist/index.cjs452.js.map +1 -1
- package/dist/index.cjs458.js +1 -1
- package/dist/index.cjs458.js.map +1 -1
- package/dist/index.cjs459.js +1 -1
- package/dist/index.cjs459.js.map +1 -1
- package/dist/index.cjs460.js +1 -1
- package/dist/index.cjs460.js.map +1 -1
- package/dist/index.cjs461.js +1 -1
- package/dist/index.cjs461.js.map +1 -1
- package/dist/index.cjs462.js +1 -1
- package/dist/index.cjs462.js.map +1 -1
- package/dist/index.cjs463.js +1 -1
- package/dist/index.cjs463.js.map +1 -1
- package/dist/index.cjs464.js +1 -1
- package/dist/index.cjs464.js.map +1 -1
- package/dist/index.cjs465.js +1 -1
- package/dist/index.cjs465.js.map +1 -1
- package/dist/index.cjs466.js +1 -1
- package/dist/index.cjs466.js.map +1 -1
- package/dist/index.cjs467.js +1 -1
- package/dist/index.cjs467.js.map +1 -1
- package/dist/index.cjs468.js +1 -1
- package/dist/index.cjs468.js.map +1 -1
- package/dist/index.cjs469.js +5 -1
- package/dist/index.cjs469.js.map +1 -1
- package/dist/index.cjs470.js +1 -1
- package/dist/index.cjs470.js.map +1 -1
- package/dist/index.cjs471.js +1 -1
- package/dist/index.cjs471.js.map +1 -1
- package/dist/index.cjs472.js +1 -1
- package/dist/index.cjs472.js.map +1 -1
- package/dist/index.cjs473.js +1 -5
- package/dist/index.cjs473.js.map +1 -1
- package/dist/index.cjs474.js +1 -1
- package/dist/index.cjs474.js.map +1 -1
- package/dist/index.cjs475.js +1 -1
- package/dist/index.cjs475.js.map +1 -1
- package/dist/index.cjs476.js +1 -1
- package/dist/index.cjs476.js.map +1 -1
- package/dist/index.cjs477.js +1 -1
- package/dist/index.cjs477.js.map +1 -1
- package/dist/index.cjs478.js +1 -1
- package/dist/index.cjs478.js.map +1 -1
- package/dist/index.cjs479.js +1 -1
- package/dist/index.cjs479.js.map +1 -1
- package/dist/index.cjs480.js +1 -1
- package/dist/index.cjs480.js.map +1 -1
- package/dist/index.cjs481.js +1 -1
- package/dist/index.cjs481.js.map +1 -1
- package/dist/index.es121.js +14 -14
- package/dist/index.es121.js.map +1 -1
- package/dist/index.es217.js +1 -1
- package/dist/index.es224.js +1 -1
- package/dist/index.es244.js +6 -6
- package/dist/index.es248.js +1 -1
- package/dist/index.es255.js +7 -7
- package/dist/index.es265.js +1 -1
- package/dist/index.es271.js +12 -12
- package/dist/index.es298.js +6 -6
- package/dist/index.es337.js +3 -3
- package/dist/index.es350.js +8 -8
- package/dist/index.es364.js +3 -3
- package/dist/index.es365.js +2 -2
- package/dist/index.es366.js +3 -3
- package/dist/index.es383.js +3674 -5
- package/dist/index.es383.js.map +1 -1
- package/dist/index.es384.js +2 -521
- package/dist/index.es384.js.map +1 -1
- package/dist/index.es386.js +7 -2
- package/dist/index.es386.js.map +1 -1
- package/dist/index.es387.js +27 -15
- package/dist/index.es387.js.map +1 -1
- package/dist/index.es388.js +71 -0
- package/dist/index.es388.js.map +1 -0
- package/dist/index.es389.js +14 -0
- package/dist/index.es389.js.map +1 -0
- package/dist/index.es390.js +33 -0
- package/dist/index.es390.js.map +1 -0
- package/dist/index.es391.js +123 -5
- package/dist/index.es391.js.map +1 -1
- package/dist/index.es392.js +130 -22
- package/dist/index.es392.js.map +1 -1
- package/dist/index.es393.js +14 -68
- package/dist/index.es393.js.map +1 -1
- package/dist/index.es394.js +66 -27
- package/dist/index.es394.js.map +1 -1
- package/dist/index.es396.js +11 -618
- package/dist/index.es396.js.map +1 -1
- package/dist/index.es397.js +9 -11
- package/dist/index.es397.js.map +1 -1
- package/dist/index.es398.js +50 -11
- package/dist/index.es398.js.map +1 -1
- package/dist/index.es399.js +1 -1
- package/dist/index.es408.js +3 -177
- package/dist/index.es408.js.map +1 -1
- package/dist/index.es409.js +11 -50
- package/dist/index.es409.js.map +1 -1
- package/dist/index.es410.js +11 -8
- package/dist/index.es410.js.map +1 -1
- package/dist/index.es411.js +6 -4
- package/dist/index.es411.js.map +1 -1
- package/dist/index.es412.js +520 -5
- package/dist/index.es412.js.map +1 -1
- package/dist/index.es413.js +14 -24
- package/dist/index.es413.js.map +1 -1
- package/dist/index.es414.js +5 -11
- package/dist/index.es414.js.map +1 -1
- package/dist/index.es415.js +24 -204
- package/dist/index.es415.js.map +1 -1
- package/dist/index.es416.js +24 -21
- package/dist/index.es416.js.map +1 -1
- package/dist/index.es417.js +27 -391
- package/dist/index.es417.js.map +1 -1
- package/dist/index.es418.js +5 -25
- package/dist/index.es418.js.map +1 -1
- package/dist/index.es419.js +620 -27
- package/dist/index.es419.js.map +1 -1
- package/dist/index.es420.js +15 -5
- package/dist/index.es420.js.map +1 -1
- package/dist/index.es423.js +8 -0
- package/dist/index.es423.js.map +1 -0
- package/dist/index.es424.js +6 -0
- package/dist/index.es424.js.map +1 -0
- package/dist/index.es425.js +27 -0
- package/dist/index.es425.js.map +1 -0
- package/dist/index.es426.js +113 -0
- package/dist/index.es426.js.map +1 -0
- package/dist/index.es427.js +16 -5
- package/dist/index.es427.js.map +1 -1
- package/dist/index.es428.js +46 -3
- package/dist/index.es428.js.map +1 -1
- package/dist/index.es429.js +7 -23
- package/dist/index.es429.js.map +1 -1
- package/dist/index.es430.js +213 -105
- package/dist/index.es430.js.map +1 -1
- package/dist/index.es431.js +176 -14
- package/dist/index.es431.js.map +1 -1
- package/dist/index.es432.js +64 -518
- package/dist/index.es432.js.map +1 -1
- package/dist/index.es433.js +8 -126
- package/dist/index.es433.js.map +1 -1
- package/dist/index.es434.js +13 -128
- package/dist/index.es434.js.map +1 -1
- package/dist/index.es435.js +65 -0
- package/dist/index.es435.js.map +1 -0
- package/dist/{index.es444.js → index.es436.js} +2 -2
- package/dist/{index.es444.js.map → index.es436.js.map} +1 -1
- package/dist/index.es437.js +208 -0
- package/dist/index.es437.js.map +1 -0
- package/dist/index.es438.js +25 -0
- package/dist/index.es438.js.map +1 -0
- package/dist/index.es439.js +396 -0
- package/dist/index.es439.js.map +1 -0
- package/dist/index.es440.js +7 -0
- package/dist/index.es440.js.map +1 -0
- package/dist/index.es441.js +26 -0
- package/dist/index.es441.js.map +1 -0
- package/dist/index.es446.js +21 -7
- package/dist/index.es446.js.map +1 -1
- package/dist/index.es447.js +13 -14
- package/dist/index.es447.js.map +1 -1
- package/dist/index.es448.js +26 -60
- package/dist/index.es448.js.map +1 -1
- package/dist/{index.es455.js → index.es449.js} +1 -1
- package/dist/{index.es455.js.map → index.es449.js.map} +1 -1
- package/dist/index.es450.js +522 -3
- package/dist/index.es450.js.map +1 -1
- package/dist/index.es451.js +126 -22
- package/dist/index.es451.js.map +1 -1
- package/dist/index.es452.js +128 -22
- package/dist/index.es452.js.map +1 -1
- package/dist/index.es458.js +5 -2032
- package/dist/index.es458.js.map +1 -1
- package/dist/index.es459.js +4 -60
- package/dist/index.es459.js.map +1 -1
- package/dist/index.es460.js +4 -188
- package/dist/index.es460.js.map +1 -1
- package/dist/index.es461.js +10 -5
- package/dist/index.es461.js.map +1 -1
- package/dist/index.es462.js +56 -4
- package/dist/index.es462.js.map +1 -1
- package/dist/index.es463.js +7 -4
- package/dist/index.es463.js.map +1 -1
- package/dist/index.es464.js +5 -9
- package/dist/index.es464.js.map +1 -1
- package/dist/index.es465.js +524 -47
- package/dist/index.es465.js.map +1 -1
- package/dist/index.es466.js +2031 -7
- package/dist/index.es466.js.map +1 -1
- package/dist/index.es467.js +59 -5
- package/dist/index.es467.js.map +1 -1
- package/dist/index.es468.js +180 -524
- package/dist/index.es468.js.map +1 -1
- package/dist/index.es469.js +39 -9
- package/dist/index.es469.js.map +1 -1
- package/dist/index.es470.js +2 -178
- package/dist/index.es470.js.map +1 -1
- package/dist/index.es471.js +2 -4
- package/dist/index.es471.js.map +1 -1
- package/dist/index.es472.js +2 -135
- package/dist/index.es472.js.map +1 -1
- package/dist/index.es473.js +2 -40
- package/dist/index.es473.js.map +1 -1
- package/dist/index.es474.js +3 -2
- package/dist/index.es474.js.map +1 -1
- package/dist/index.es475.js +2 -2
- package/dist/index.es475.js.map +1 -1
- package/dist/index.es476.js +6 -2
- package/dist/index.es476.js.map +1 -1
- package/dist/index.es477.js +5 -2
- package/dist/index.es477.js.map +1 -1
- package/dist/index.es478.js +10 -3
- package/dist/index.es478.js.map +1 -1
- package/dist/index.es479.js +178 -2
- package/dist/index.es479.js.map +1 -1
- package/dist/index.es480.js +3 -3
- package/dist/index.es480.js.map +1 -1
- package/dist/index.es481.js +132 -4
- package/dist/index.es481.js.map +1 -1
- package/package.json +1 -1
- package/dist/index.cjs385.js +0 -28
- package/dist/index.cjs385.js.map +0 -1
- package/dist/index.cjs400.js +0 -2
- package/dist/index.cjs400.js.map +0 -1
- package/dist/index.cjs401.js +0 -2
- package/dist/index.cjs401.js.map +0 -1
- package/dist/index.cjs402.js +0 -2
- package/dist/index.cjs402.js.map +0 -1
- package/dist/index.cjs403.js +0 -2
- package/dist/index.cjs403.js.map +0 -1
- package/dist/index.cjs404.js +0 -2
- package/dist/index.cjs404.js.map +0 -1
- package/dist/index.cjs405.js +0 -2
- package/dist/index.cjs405.js.map +0 -1
- package/dist/index.cjs406.js +0 -2
- package/dist/index.cjs406.js.map +0 -1
- package/dist/index.cjs407.js +0 -2
- package/dist/index.cjs407.js.map +0 -1
- package/dist/index.cjs421.js +0 -2
- package/dist/index.cjs421.js.map +0 -1
- package/dist/index.cjs445.js +0 -39
- package/dist/index.cjs445.js.map +0 -1
- package/dist/index.cjs453.js +0 -2
- package/dist/index.cjs453.js.map +0 -1
- package/dist/index.cjs454.js +0 -2
- package/dist/index.cjs454.js.map +0 -1
- package/dist/index.es385.js +0 -3678
- package/dist/index.es385.js.map +0 -1
- package/dist/index.es400.js +0 -49
- package/dist/index.es400.js.map +0 -1
- package/dist/index.es401.js +0 -11
- package/dist/index.es401.js.map +0 -1
- package/dist/index.es402.js +0 -128
- package/dist/index.es402.js.map +0 -1
- package/dist/index.es403.js +0 -18
- package/dist/index.es403.js.map +0 -1
- package/dist/index.es404.js +0 -138
- package/dist/index.es404.js.map +0 -1
- package/dist/index.es405.js +0 -221
- package/dist/index.es405.js.map +0 -1
- package/dist/index.es406.js +0 -17
- package/dist/index.es406.js.map +0 -1
- package/dist/index.es407.js +0 -72
- package/dist/index.es407.js.map +0 -1
- package/dist/index.es421.js +0 -18
- package/dist/index.es421.js.map +0 -1
- package/dist/index.es445.js +0 -72
- package/dist/index.es445.js.map +0 -1
- package/dist/index.es453.js +0 -16
- package/dist/index.es453.js.map +0 -1
- package/dist/index.es454.js +0 -31
- package/dist/index.es454.js.map +0 -1
package/dist/index.es396.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es396.js","sources":["../node_modules/@radix-ui/react-menu/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/menu/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 xi = polygon[i].x;\n const yi = polygon[i].y;\n const xj = polygon[j].x;\n const yj = polygon[j].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"],"names":["SELECTION_KEYS","FIRST_KEYS","LAST_KEYS","FIRST_LAST_KEYS","SUB_OPEN_KEYS","SUB_CLOSE_KEYS","MENU_NAME","Collection","useCollection","createCollectionScope","createCollection","createMenuContext","createMenuScope","createContextScope","createPopperScope","createRovingFocusGroupScope","usePopperScope","useRovingFocusGroupScope","MenuProvider","useMenuContext","MenuRootProvider","useMenuRootContext","Menu","props","__scopeMenu","open","children","dir","onOpenChange","modal","popperScope","content","setContent","React","isUsingKeyboardRef","handleOpenChange","useCallbackRef","direction","useDirection","handleKeyDown","handlePointer","jsx","PopperPrimitive.Root","ANCHOR_NAME","MenuAnchor","forwardedRef","anchorProps","PopperPrimitive.Anchor","PORTAL_NAME","PortalProvider","usePortalContext","MenuPortal","forceMount","container","context","Presence","PortalPrimitive","CONTENT_NAME","MenuContentProvider","useMenuContentContext","MenuContent","portalContext","contentProps","rootContext","MenuRootContentModal","MenuRootContentNonModal","ref","composedRefs","useComposedRefs","hideOthers","MenuContentImpl","composeEventHandlers","event","Slot","createSlot","loop","trapFocus","onOpenAutoFocus","onCloseAutoFocus","disableOutsidePointerEvents","onEntryFocus","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","disableOutsideScroll","rovingFocusGroupScope","getItems","currentItemId","setCurrentItemId","contentRef","timerRef","searchRef","pointerGraceTimerRef","pointerGraceIntentRef","pointerDirRef","lastPointerXRef","ScrollLockWrapper","RemoveScroll","scrollLockWrapperProps","handleTypeaheadSearch","key","search","items","item","currentItem","currentMatch","_a","values","nextMatch","getNextMatch","newItem","_b","updateSearch","value","useFocusGuards","isPointerMovingToSubmenu","isPointerInGraceArea","intent","FocusScope","DismissableLayer","RovingFocusGroup.Root","PopperPrimitive.Content","getOpenState","isKeyDownInside","isModifierKey","isCharacterKey","candidateNodes","focusFirst","whenMouse","target","pointerXHasChanged","newDir","GROUP_NAME","MenuGroup","groupProps","Primitive","LABEL_NAME","MenuLabel","labelProps","ITEM_NAME","ITEM_SELECT","MenuItem","disabled","onSelect","itemProps","contentContext","isPointerDownRef","handleSelect","menuItem","itemSelectEvent","dispatchDiscreteCustomEvent","MenuItemImpl","isTypingAhead","textValue","isFocused","setIsFocused","textContent","setTextContent","RovingFocusGroup.Item","CHECKBOX_ITEM_NAME","MenuCheckboxItem","checked","onCheckedChange","checkboxItemProps","ItemIndicatorProvider","isIndeterminate","getCheckedState","RADIO_GROUP_NAME","RadioGroupProvider","useRadioGroupContext","MenuRadioGroup","onValueChange","handleValueChange","RADIO_ITEM_NAME","MenuRadioItem","radioItemProps","ITEM_INDICATOR_NAME","useItemIndicatorContext","MenuItemIndicator","itemIndicatorProps","indicatorContext","SEPARATOR_NAME","MenuSeparator","separatorProps","ARROW_NAME","MenuArrow","arrowProps","PopperPrimitive.Arrow","SUB_NAME","MenuSubProvider","useMenuSubContext","SUB_TRIGGER_NAME","MenuSubTrigger","subContext","openTimerRef","onPointerGraceIntentChange","scope","clearOpenTimer","pointerGraceTimer","composeRefs","contentRect","side","rightSide","bleed","contentNearEdge","contentFarEdge","SUB_CONTENT_NAME","MenuSubContent","subContentProps","isCloseKey","candidates","PREVIOUSLY_FOCUSED_ELEMENT","candidate","wrapArray","array","startIndex","_","index","normalizedSearch","char","currentMatchIndex","wrappedValues","isPointInPolygon","point","polygon","x","y","inside","i","j","xi","yi","xj","yj","area","cursorPos","handler","Root3","Anchor2","Portal","Content2","Group","Label","Item2","CheckboxItem","RadioGroup","RadioItem","ItemIndicator","Separator","Arrow2","SubTrigger","SubContent"],"mappings":";;;;;;;;;;;;;;;;;;;AAyBA,IAAIA,IAAiB,CAAC,SAAS,GAAG,GAC9BC,KAAa,CAAC,aAAa,UAAU,MAAM,GAC3CC,KAAY,CAAC,WAAW,YAAY,KAAK,GACzCC,KAAkB,CAAC,GAAGF,IAAY,GAAGC,EAAS,GAC9CE,KAAgB;AAAA,EAClB,KAAK,CAAC,GAAGJ,GAAgB,YAAY;AAAA,EACrC,KAAK,CAAC,GAAGA,GAAgB,WAAW;AACtC,GACIK,KAAiB;AAAA,EACnB,KAAK,CAAC,WAAW;AAAA,EACjB,KAAK,CAAC,YAAY;AACpB,GACIC,IAAY,QACZ,CAACC,GAAYC,IAAeC,EAAqB,IAAIC,GAAiBJ,CAAS,GAC/E,CAACK,GAAmBC,EAAe,IAAIC,GAAmBP,GAAW;AAAA,EACvEG;AAAA,EACAK;AAAA,EACAC;AACF,CAAC,GACGC,IAAiBF,GAAmB,GACpCG,KAA2BF,GAA6B,GACxD,CAACG,IAAcC,CAAc,IAAIR,EAAkBL,CAAS,GAC5D,CAACc,IAAkBC,CAAkB,IAAIV,EAAkBL,CAAS,GACpEgB,KAAO,CAACC,MAAU;AACpB,QAAM,EAAE,aAAAC,GAAa,MAAAC,IAAO,IAAO,UAAAC,G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B;AACE,SAAOA;AACT;AACA,SAAS/G,GAAqB9C,GAAOoK,GAAM;AACzC,MAAI,CAACA,EAAM,QAAO;AAClB,QAAMC,IAAY,EAAE,GAAGrK,EAAM,SAAS,GAAGA,EAAM,QAAS;AACxD,SAAOwJ,GAAiBa,GAAWD,CAAI;AACzC;AACA,SAAS1G,EAAU4G,GAAS;AAC1B,SAAO,CAACtK,MAAUA,EAAM,gBAAgB,UAAUsK,EAAQtK,CAAK,IAAI;AACrE;AACG,IAACuK,KAAQzN,IACR0N,KAAUpM,IACVqM,KAAS9L,IACT+L,KAAWtL,IACXuL,KAAQ5G,IACR6G,KAAQzG,IACR0G,KAAQtG,GACRuG,KAAepF,IACfqF,KAAa3E,IACb4E,KAAYxE,IACZyE,KAAgBrE,IAChBsE,KAAYlE,IACZmE,KAAShE,IAETiE,KAAa1D,IACb2D,KAAa5C;","x_google_ignoreList":[0]}
|
1
|
+
{"version":3,"file":"index.es396.js","sources":["../node_modules/@radix-ui/react-focus-guards/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/focus-guards/src/focus-guards.tsx\nimport * as React from \"react\";\nvar count = 0;\nfunction FocusGuards(props) {\n useFocusGuards();\n return props.children;\n}\nfunction useFocusGuards() {\n React.useEffect(() => {\n const edgeGuards = document.querySelectorAll(\"[data-radix-focus-guard]\");\n document.body.insertAdjacentElement(\"afterbegin\", edgeGuards[0] ?? createFocusGuard());\n document.body.insertAdjacentElement(\"beforeend\", edgeGuards[1] ?? createFocusGuard());\n count++;\n return () => {\n if (count === 1) {\n document.querySelectorAll(\"[data-radix-focus-guard]\").forEach((node) => node.remove());\n }\n count--;\n };\n }, []);\n}\nfunction createFocusGuard() {\n const element = document.createElement(\"span\");\n element.setAttribute(\"data-radix-focus-guard\", \"\");\n element.tabIndex = 0;\n element.style.outline = \"none\";\n element.style.opacity = \"0\";\n element.style.position = \"fixed\";\n element.style.pointerEvents = \"none\";\n return element;\n}\nvar Root = FocusGuards;\nexport {\n FocusGuards,\n Root,\n useFocusGuards\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["count","useFocusGuards","React","edgeGuards","createFocusGuard","node","element"],"mappings":";AAIA,IAAIA,IAAQ;AAKZ,SAASC,IAAiB;AACxB,EAAAC,EAAM,UAAU,MAAM;AACpB,UAAMC,IAAa,SAAS,iBAAiB,0BAA0B;AACvE,oBAAS,KAAK,sBAAsB,cAAcA,EAAW,CAAC,KAAKC,GAAkB,GACrF,SAAS,KAAK,sBAAsB,aAAaD,EAAW,CAAC,KAAKC,GAAkB,GACpFJ,KACO,MAAM;AACX,MAAIA,MAAU,KACZ,SAAS,iBAAiB,0BAA0B,EAAE,QAAQ,CAACK,MAASA,EAAK,QAAQ,GAEvFL;AAAA,IACD;AAAA,EACF,GAAE,EAAE;AACP;AACA,SAASI,IAAmB;AAC1B,QAAME,IAAU,SAAS,cAAc,MAAM;AAC7C,SAAAA,EAAQ,aAAa,0BAA0B,EAAE,GACjDA,EAAQ,WAAW,GACnBA,EAAQ,MAAM,UAAU,QACxBA,EAAQ,MAAM,UAAU,KACxBA,EAAQ,MAAM,WAAW,SACzBA,EAAQ,MAAM,gBAAgB,QACvBA;AACT;","x_google_ignoreList":[0]}
|
package/dist/index.es397.js
CHANGED
@@ -1,14 +1,12 @@
|
|
1
|
-
import
|
2
|
-
import
|
3
|
-
|
4
|
-
|
5
|
-
function
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
}, [t]), t || (e ? `radix-${e}` : "");
|
10
|
-
}
|
1
|
+
import { __assign as m } from "./index.es416.js";
|
2
|
+
import * as r from "react";
|
3
|
+
import { RemoveScroll as e } from "./index.es417.js";
|
4
|
+
import t from "./index.es418.js";
|
5
|
+
var s = r.forwardRef(function(a, o) {
|
6
|
+
return r.createElement(e, m({}, a, { ref: o, sideCar: t }));
|
7
|
+
});
|
8
|
+
s.classNames = e.classNames;
|
11
9
|
export {
|
12
|
-
|
10
|
+
s as default
|
13
11
|
};
|
14
12
|
//# sourceMappingURL=index.es397.js.map
|
package/dist/index.es397.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es397.js","sources":["../node_modules
|
1
|
+
{"version":3,"file":"index.es397.js","sources":["../node_modules/react-remove-scroll/dist/es2015/Combination.js"],"sourcesContent":["import { __assign } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScroll } from './UI';\nimport SideCar from './sidecar';\nvar ReactRemoveScroll = React.forwardRef(function (props, ref) { return (React.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: SideCar }))); });\nReactRemoveScroll.classNames = RemoveScroll.classNames;\nexport default ReactRemoveScroll;\n"],"names":["ReactRemoveScroll","React","props","ref","RemoveScroll","__assign","SideCar"],"mappings":";;;;AAIG,IAACA,IAAoBC,EAAM,WAAW,SAAUC,GAAOC,GAAK;AAAE,SAAQF,EAAM,cAAcG,GAAcC,EAAS,CAAE,GAAEH,GAAO,EAAE,KAAKC,GAAK,SAASG,GAAS,CAAC;AAAK,CAAA;AACnKN,EAAkB,aAAaI,EAAa;","x_google_ignoreList":[0]}
|
package/dist/index.es398.js
CHANGED
@@ -1,14 +1,53 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
1
|
+
var S = function(r) {
|
2
|
+
if (typeof document > "u")
|
3
|
+
return null;
|
4
|
+
var u = Array.isArray(r) ? r[0] : r;
|
5
|
+
return u.ownerDocument.body;
|
6
|
+
}, f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {}, h = 0, W = function(r) {
|
7
|
+
return r && (r.host || W(r.parentNode));
|
8
|
+
}, D = function(r, u) {
|
9
|
+
return u.map(function(e) {
|
10
|
+
if (r.contains(e))
|
11
|
+
return e;
|
12
|
+
var n = W(e);
|
13
|
+
return n && r.contains(n) ? n : (console.error("aria-hidden", e, "in not contained inside", r, ". Doing nothing"), null);
|
14
|
+
}).filter(function(e) {
|
15
|
+
return !!e;
|
16
|
+
});
|
17
|
+
}, E = function(r, u, e, n) {
|
18
|
+
var i = D(u, Array.isArray(r) ? r : [r]);
|
19
|
+
p[e] || (p[e] = /* @__PURE__ */ new WeakMap());
|
20
|
+
var o = p[e], l = [], s = /* @__PURE__ */ new Set(), b = new Set(i), y = function(t) {
|
21
|
+
!t || s.has(t) || (s.add(t), y(t.parentNode));
|
22
|
+
};
|
23
|
+
i.forEach(y);
|
24
|
+
var A = function(t) {
|
25
|
+
!t || b.has(t) || Array.prototype.forEach.call(t.children, function(a) {
|
26
|
+
if (s.has(a))
|
27
|
+
A(a);
|
28
|
+
else
|
29
|
+
try {
|
30
|
+
var c = a.getAttribute(n), w = c !== null && c !== "false", d = (f.get(a) || 0) + 1, M = (o.get(a) || 0) + 1;
|
31
|
+
f.set(a, d), o.set(a, M), l.push(a), d === 1 && w && v.set(a, !0), M === 1 && a.setAttribute(e, "true"), w || a.setAttribute(n, "true");
|
32
|
+
} catch (k) {
|
33
|
+
console.error("aria-hidden: cannot operate on ", a, k);
|
34
|
+
}
|
35
|
+
});
|
36
|
+
};
|
37
|
+
return A(u), s.clear(), h++, function() {
|
38
|
+
l.forEach(function(t) {
|
39
|
+
var a = f.get(t) - 1, c = o.get(t) - 1;
|
40
|
+
f.set(t, a), o.set(t, c), a || (v.has(t) || t.removeAttribute(n), v.delete(t)), c || t.removeAttribute(e);
|
41
|
+
}), h--, h || (f = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {});
|
42
|
+
};
|
43
|
+
}, C = function(r, u, e) {
|
44
|
+
e === void 0 && (e = "data-aria-hidden");
|
45
|
+
var n = Array.from(Array.isArray(r) ? r : [r]), i = S(r);
|
46
|
+
return i ? (n.push.apply(n, Array.from(i.querySelectorAll("[aria-live]"))), E(n, i, e, "aria-hidden")) : function() {
|
47
|
+
return null;
|
48
|
+
};
|
49
|
+
};
|
11
50
|
export {
|
12
|
-
|
51
|
+
C as hideOthers
|
13
52
|
};
|
14
53
|
//# sourceMappingURL=index.es398.js.map
|
package/dist/index.es398.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es398.js","sources":["../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs"],"sourcesContent":["// packages/react/use-callback-ref/src/use-callback-ref.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useCallbackRef","callback","callbackRef","React","args","_a"],"mappings":";AAEA,SAASA,EAAeC,GAAU;AAChC,QAAMC,IAAcC,EAAM,OAAOF,CAAQ;AACzC,SAAAE,EAAM,UAAU,MAAM;AACpB,IAAAD,EAAY,UAAUD;AAAA,EAC1B,CAAG,GACME,EAAM,QAAQ,MAAM,IAAIC;;AAAS,YAAAC,IAAAH,EAAY,YAAZ,gBAAAG,EAAA,KAAAH,GAAsB,GAAGE;AAAA,KAAO,EAAE;AAC5E;","x_google_ignoreList":[0]}
|
1
|
+
{"version":3,"file":"index.es398.js","sources":["../node_modules/aria-hidden/dist/es2015/index.js"],"sourcesContent":["var getDefaultParent = function (originalTarget) {\n if (typeof document === 'undefined') {\n return null;\n }\n var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;\n return sampleTarget.ownerDocument.body;\n};\nvar counterMap = new WeakMap();\nvar uncontrolledNodes = new WeakMap();\nvar markerMap = {};\nvar lockCount = 0;\nvar unwrapHost = function (node) {\n return node && (node.host || unwrapHost(node.parentNode));\n};\nvar correctTargets = function (parent, targets) {\n return targets\n .map(function (target) {\n if (parent.contains(target)) {\n return target;\n }\n var correctedTarget = unwrapHost(target);\n if (correctedTarget && parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');\n return null;\n })\n .filter(function (x) { return Boolean(x); });\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @param {String} [controlAttribute] - html Attribute to control\n * @return {Undo} undo command\n */\nvar applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {\n var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n var markerCounter = markerMap[markerName];\n var hiddenNodes = [];\n var elementsToKeep = new Set();\n var elementsToStop = new Set(targets);\n var keep = function (el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n keep(el.parentNode);\n };\n targets.forEach(keep);\n var deep = function (parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n Array.prototype.forEach.call(parent.children, function (node) {\n if (elementsToKeep.has(node)) {\n deep(node);\n }\n else {\n try {\n var attr = node.getAttribute(controlAttribute);\n var alreadyHidden = attr !== null && attr !== 'false';\n var counterValue = (counterMap.get(node) || 0) + 1;\n var markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenNodes.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledNodes.set(node, true);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, 'true');\n }\n if (!alreadyHidden) {\n node.setAttribute(controlAttribute, 'true');\n }\n }\n catch (e) {\n console.error('aria-hidden: cannot operate on ', node, e);\n }\n }\n });\n };\n deep(parentNode);\n elementsToKeep.clear();\n lockCount++;\n return function () {\n hiddenNodes.forEach(function (node) {\n var counterValue = counterMap.get(node) - 1;\n var markerValue = markerCounter.get(node) - 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n if (!counterValue) {\n if (!uncontrolledNodes.has(node)) {\n node.removeAttribute(controlAttribute);\n }\n uncontrolledNodes.delete(node);\n }\n if (!markerValue) {\n node.removeAttribute(markerName);\n }\n });\n lockCount--;\n if (!lockCount) {\n // clear\n counterMap = new WeakMap();\n counterMap = new WeakMap();\n uncontrolledNodes = new WeakMap();\n markerMap = {};\n }\n };\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var hideOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-aria-hidden'; }\n var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n // we should not hide ariaLive elements - https://github.com/theKashey/aria-hidden/issues/10\n targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live]')));\n return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');\n};\n/**\n * Marks everything except given node(or nodes) as inert\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var inertOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-inert-ed'; }\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');\n};\n/**\n * @returns if current browser supports inert\n */\nexport var supportsInert = function () {\n return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');\n};\n/**\n * Automatic function to \"suppress\" DOM elements - _hide_ or _inert_ in the best possible way\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var suppressOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-suppressed'; }\n return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName);\n};\n"],"names":["getDefaultParent","originalTarget","sampleTarget","counterMap","uncontrolledNodes","markerMap","lockCount","unwrapHost","node","correctTargets","parent","targets","target","correctedTarget","x","applyAttributeToOthers","parentNode","markerName","controlAttribute","markerCounter","hiddenNodes","elementsToKeep","elementsToStop","keep","el","deep","attr","alreadyHidden","counterValue","markerValue","e","hideOthers","activeParentNode"],"mappings":"AAAA,IAAIA,IAAmB,SAAUC,GAAgB;AAC7C,MAAI,OAAO,WAAa;AACpB,WAAO;AAEX,MAAIC,IAAe,MAAM,QAAQD,CAAc,IAAIA,EAAe,CAAC,IAAIA;AACvE,SAAOC,EAAa,cAAc;AACtC,GACIC,IAAa,oBAAI,QAAS,GAC1BC,IAAoB,oBAAI,QAAS,GACjCC,IAAY,CAAE,GACdC,IAAY,GACZC,IAAa,SAAUC,GAAM;AAC7B,SAAOA,MAASA,EAAK,QAAQD,EAAWC,EAAK,UAAU;AAC3D,GACIC,IAAiB,SAAUC,GAAQC,GAAS;AAC5C,SAAOA,EACF,IAAI,SAAUC,GAAQ;AACvB,QAAIF,EAAO,SAASE,CAAM;AACtB,aAAOA;AAEX,QAAIC,IAAkBN,EAAWK,CAAM;AACvC,WAAIC,KAAmBH,EAAO,SAASG,CAAe,IAC3CA,KAEX,QAAQ,MAAM,eAAeD,GAAQ,2BAA2BF,GAAQ,iBAAiB,GAClF;AAAA,EACV,CAAA,EACI,OAAO,SAAUI,GAAG;AAAE,WAAO,EAAQA;AAAA,GAAK;AACnD,GASIC,IAAyB,SAAUd,GAAgBe,GAAYC,GAAYC,GAAkB;AAC7F,MAAIP,IAAUF,EAAeO,GAAY,MAAM,QAAQf,CAAc,IAAIA,IAAiB,CAACA,CAAc,CAAC;AAC1G,EAAKI,EAAUY,CAAU,MACrBZ,EAAU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AAcV,EAAc,IAAIX,CAAI,IAAI;AAC5C,MAAAL,EAAW,IAAIK,GAAMoB,CAAY,GACjCT,EAAc,IAAIX,GAAMqB,CAAW,GAC9BD,MACIxB,EAAkB,IAAII,CAAI,KAC3BA,EAAK,gBAAgBU,CAAgB,GAEzCd,EAAkB,OAAOI,CAAI,IAE5BqB,KACDrB,EAAK,gBAAgBS,CAAU;AAAA,IAE/C,CAAS,GACDX,KACKA,MAEDH,IAAa,oBAAI,QAAS,GAC1BA,IAAa,oBAAI,QAAS,GAC1BC,IAAoB,oBAAI,QAAS,GACjCC,IAAY,CAAE;AAAA,EAErB;AACL,GAQW0B,IAAa,SAAU9B,GAAgBe,GAAYC,GAAY;AACtE,EAAIA,MAAe,WAAUA,IAAa;AAC1C,MAAIN,IAAU,MAAM,KAAK,MAAM,QAAQV,CAAc,IAAIA,IAAiB,CAACA,CAAc,CAAC,GACtF+B,IAAiChC,EAAiBC,CAAc;AACpE,SAAK+B,KAILrB,EAAQ,KAAK,MAAMA,GAAS,MAAM,KAAKqB,EAAiB,iBAAiB,aAAa,CAAC,CAAC,GACjFjB,EAAuBJ,GAASqB,GAAkBf,GAAY,aAAa,KAJvE,WAAY;AAAE,WAAO;AAAA,EAAO;AAK3C;","x_google_ignoreList":[0]}
|
package/dist/index.es399.js
CHANGED
package/dist/index.es408.js
CHANGED
@@ -1,181 +1,7 @@
|
|
1
|
-
import * as
|
2
|
-
|
3
|
-
import { createCollection as H } from "./index.es400.js";
|
4
|
-
import { useComposedRefs as V } from "./index.es392.js";
|
5
|
-
import { createContextScope as z } from "./index.es393.js";
|
6
|
-
import { useId as q } from "./index.es397.js";
|
7
|
-
import { Primitive as P } from "./index.es395.js";
|
8
|
-
import { useCallbackRef as J } from "./index.es398.js";
|
9
|
-
import { useControllableState as Q } from "./index.es394.js";
|
10
|
-
import { useDirection as W } from "./index.es401.js";
|
11
|
-
import { j as d } from "./index.es212.js";
|
12
|
-
var _ = "rovingFocusGroup.onEntryFocus", X = { bubbles: !1, cancelable: !0 }, b = "RovingFocusGroup", [h, G, Z] = H(b), [$, Fe] = z(
|
13
|
-
b,
|
14
|
-
[Z]
|
15
|
-
), [ee, oe] = $(b), N = s.forwardRef(
|
16
|
-
(e, r) => /* @__PURE__ */ d.jsx(h.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d.jsx(h.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d.jsx(te, { ...e, ref: r }) }) })
|
17
|
-
);
|
18
|
-
N.displayName = b;
|
19
|
-
var te = s.forwardRef((e, r) => {
|
20
|
-
const {
|
21
|
-
__scopeRovingFocusGroup: c,
|
22
|
-
orientation: o,
|
23
|
-
loop: F = !1,
|
24
|
-
dir: g,
|
25
|
-
currentTabStopId: R,
|
26
|
-
defaultCurrentTabStopId: E,
|
27
|
-
onCurrentTabStopIdChange: m,
|
28
|
-
onEntryFocus: u,
|
29
|
-
preventScrollOnEntryFocus: w = !1,
|
30
|
-
...C
|
31
|
-
} = e, v = s.useRef(null), I = V(r, v), t = W(g), [f = null, T] = Q({
|
32
|
-
prop: R,
|
33
|
-
defaultProp: E,
|
34
|
-
onChange: m
|
35
|
-
}), [a, i] = s.useState(!1), S = J(u), M = G(c), x = s.useRef(!1), [k, y] = s.useState(0);
|
36
|
-
return s.useEffect(() => {
|
37
|
-
const n = v.current;
|
38
|
-
if (n)
|
39
|
-
return n.addEventListener(_, S), () => n.removeEventListener(_, S);
|
40
|
-
}, [S]), /* @__PURE__ */ d.jsx(
|
41
|
-
ee,
|
42
|
-
{
|
43
|
-
scope: c,
|
44
|
-
orientation: o,
|
45
|
-
dir: t,
|
46
|
-
loop: F,
|
47
|
-
currentTabStopId: f,
|
48
|
-
onItemFocus: s.useCallback(
|
49
|
-
(n) => T(n),
|
50
|
-
[T]
|
51
|
-
),
|
52
|
-
onItemShiftTab: s.useCallback(() => i(!0), []),
|
53
|
-
onFocusableItemAdd: s.useCallback(
|
54
|
-
() => y((n) => n + 1),
|
55
|
-
[]
|
56
|
-
),
|
57
|
-
onFocusableItemRemove: s.useCallback(
|
58
|
-
() => y((n) => n - 1),
|
59
|
-
[]
|
60
|
-
),
|
61
|
-
children: /* @__PURE__ */ d.jsx(
|
62
|
-
P.div,
|
63
|
-
{
|
64
|
-
tabIndex: a || k === 0 ? -1 : 0,
|
65
|
-
"data-orientation": o,
|
66
|
-
...C,
|
67
|
-
ref: I,
|
68
|
-
style: { outline: "none", ...e.style },
|
69
|
-
onMouseDown: p(e.onMouseDown, () => {
|
70
|
-
x.current = !0;
|
71
|
-
}),
|
72
|
-
onFocus: p(e.onFocus, (n) => {
|
73
|
-
const L = !x.current;
|
74
|
-
if (n.target === n.currentTarget && L && !a) {
|
75
|
-
const D = new CustomEvent(_, X);
|
76
|
-
if (n.currentTarget.dispatchEvent(D), !D.defaultPrevented) {
|
77
|
-
const A = M().filter((l) => l.focusable), U = A.find((l) => l.active), B = A.find((l) => l.id === f), Y = [U, B, ...A].filter(
|
78
|
-
Boolean
|
79
|
-
).map((l) => l.ref.current);
|
80
|
-
j(Y, w);
|
81
|
-
}
|
82
|
-
}
|
83
|
-
x.current = !1;
|
84
|
-
}),
|
85
|
-
onBlur: p(e.onBlur, () => i(!1))
|
86
|
-
}
|
87
|
-
)
|
88
|
-
}
|
89
|
-
);
|
90
|
-
}), O = "RovingFocusGroupItem", K = s.forwardRef(
|
91
|
-
(e, r) => {
|
92
|
-
const {
|
93
|
-
__scopeRovingFocusGroup: c,
|
94
|
-
focusable: o = !0,
|
95
|
-
active: F = !1,
|
96
|
-
tabStopId: g,
|
97
|
-
...R
|
98
|
-
} = e, E = q(), m = g || E, u = oe(O, c), w = u.currentTabStopId === m, C = G(c), { onFocusableItemAdd: v, onFocusableItemRemove: I } = u;
|
99
|
-
return s.useEffect(() => {
|
100
|
-
if (o)
|
101
|
-
return v(), () => I();
|
102
|
-
}, [o, v, I]), /* @__PURE__ */ d.jsx(
|
103
|
-
h.ItemSlot,
|
104
|
-
{
|
105
|
-
scope: c,
|
106
|
-
id: m,
|
107
|
-
focusable: o,
|
108
|
-
active: F,
|
109
|
-
children: /* @__PURE__ */ d.jsx(
|
110
|
-
P.span,
|
111
|
-
{
|
112
|
-
tabIndex: w ? 0 : -1,
|
113
|
-
"data-orientation": u.orientation,
|
114
|
-
...R,
|
115
|
-
ref: r,
|
116
|
-
onMouseDown: p(e.onMouseDown, (t) => {
|
117
|
-
o ? u.onItemFocus(m) : t.preventDefault();
|
118
|
-
}),
|
119
|
-
onFocus: p(e.onFocus, () => u.onItemFocus(m)),
|
120
|
-
onKeyDown: p(e.onKeyDown, (t) => {
|
121
|
-
if (t.key === "Tab" && t.shiftKey) {
|
122
|
-
u.onItemShiftTab();
|
123
|
-
return;
|
124
|
-
}
|
125
|
-
if (t.target !== t.currentTarget) return;
|
126
|
-
const f = se(t, u.orientation, u.dir);
|
127
|
-
if (f !== void 0) {
|
128
|
-
if (t.metaKey || t.ctrlKey || t.altKey || t.shiftKey) return;
|
129
|
-
t.preventDefault();
|
130
|
-
let a = C().filter((i) => i.focusable).map((i) => i.ref.current);
|
131
|
-
if (f === "last") a.reverse();
|
132
|
-
else if (f === "prev" || f === "next") {
|
133
|
-
f === "prev" && a.reverse();
|
134
|
-
const i = a.indexOf(t.currentTarget);
|
135
|
-
a = u.loop ? ce(a, i + 1) : a.slice(i + 1);
|
136
|
-
}
|
137
|
-
setTimeout(() => j(a));
|
138
|
-
}
|
139
|
-
})
|
140
|
-
}
|
141
|
-
)
|
142
|
-
}
|
143
|
-
);
|
144
|
-
}
|
145
|
-
);
|
146
|
-
K.displayName = O;
|
147
|
-
var re = {
|
148
|
-
ArrowLeft: "prev",
|
149
|
-
ArrowUp: "prev",
|
150
|
-
ArrowRight: "next",
|
151
|
-
ArrowDown: "next",
|
152
|
-
PageUp: "first",
|
153
|
-
Home: "first",
|
154
|
-
PageDown: "last",
|
155
|
-
End: "last"
|
1
|
+
import * as t from "react";
|
2
|
+
var e = globalThis != null && globalThis.document ? t.useLayoutEffect : () => {
|
156
3
|
};
|
157
|
-
function ne(e, r) {
|
158
|
-
return r !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
159
|
-
}
|
160
|
-
function se(e, r, c) {
|
161
|
-
const o = ne(e.key, c);
|
162
|
-
if (!(r === "vertical" && ["ArrowLeft", "ArrowRight"].includes(o)) && !(r === "horizontal" && ["ArrowUp", "ArrowDown"].includes(o)))
|
163
|
-
return re[o];
|
164
|
-
}
|
165
|
-
function j(e, r = !1) {
|
166
|
-
const c = document.activeElement;
|
167
|
-
for (const o of e)
|
168
|
-
if (o === c || (o.focus({ preventScroll: r }), document.activeElement !== c)) return;
|
169
|
-
}
|
170
|
-
function ce(e, r) {
|
171
|
-
return e.map((c, o) => e[(r + o) % e.length]);
|
172
|
-
}
|
173
|
-
var ge = N, Re = K;
|
174
4
|
export {
|
175
|
-
|
176
|
-
ge as Root,
|
177
|
-
N as RovingFocusGroup,
|
178
|
-
K as RovingFocusGroupItem,
|
179
|
-
Fe as createRovingFocusGroupScope
|
5
|
+
e as useLayoutEffect
|
180
6
|
};
|
181
7
|
//# sourceMappingURL=index.es408.js.map
|
package/dist/index.es408.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es408.js","sources":["../node_modules/@radix-ui/react-roving-focus/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/roving-focus/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 = null, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId,\n onChange: onCurrentTabStopIdChange\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 ...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 } = 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 }\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"],"names":["ENTRY_FOCUS","EVENT_OPTIONS","GROUP_NAME","Collection","useCollection","createCollectionScope","createCollection","createRovingFocusGroupContext","createRovingFocusGroupScope","createContextScope","RovingFocusProvider","useRovingFocusContext","RovingFocusGroup","React","props","forwardedRef","jsx","RovingFocusGroupImpl","__scopeRovingFocusGroup","orientation","loop","dir","currentTabStopIdProp","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus","groupProps","ref","composedRefs","useComposedRefs","direction","useDirection","currentTabStopId","setCurrentTabStopId","useControllableState","isTabbingBackOut","setIsTabbingBackOut","handleEntryFocus","useCallbackRef","getItems","isClickFocusRef","focusableItemsCount","setFocusableItemsCount","node","tabStopId","prevCount","Primitive","composeEventHandlers","event","isKeyboardFocus","entryFocusEvent","items","item","activeItem","currentItem","candidateNodes","focusFirst","ITEM_NAME","RovingFocusGroupItem","focusable","active","itemProps","autoId","useId","id","context","isCurrentTabStop","onFocusableItemAdd","onFocusableItemRemove","focusIntent","getFocusIntent","currentIndex","wrapArray","MAP_KEY_TO_FOCUS_INTENT","getDirectionAwareKey","key","candidates","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","candidate","array","startIndex","_","index","Root","Item"],"mappings":";;;;;;;;;;;AAcA,IAAIA,IAAc,iCACdC,IAAgB,EAAE,SAAS,IAAO,YAAY,GAAM,GACpDC,IAAa,oBACb,CAACC,GAAYC,GAAeC,CAAqB,IAAIC,EAAiBJ,CAAU,GAChF,CAACK,GAA+BC,EAA2B,IAAIC;AAAA,EACjEP;AAAA,EACA,CAACG,CAAqB;AACxB,GACI,CAACK,IAAqBC,EAAqB,IAAIJ,EAA8BL,CAAU,GACvFU,IAAmBC,EAAM;AAAA,EAC3B,CAACC,GAAOC,MACiBC,gBAAAA,MAAIb,EAAW,UAAU,EAAE,OAAOW,EAAM,yBAAyB,UAA0BE,gBAAAA,MAAIb,EAAW,MAAM,EAAE,OAAOW,EAAM,yBAAyB,UAA0BE,gBAAAA,EAAAA,IAAIC,IAAsB,EAAE,GAAGH,GAAO,KAAKC,GAAc,EAAC,CAAE,EAAC,CAAE;AAE5Q;AACAH,EAAiB,cAAcV;AAC/B,IAAIe,KAAuBJ,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACnE,QAAM;AAAA,IACJ,yBAAAG;AAAA,IACA,aAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,KAAAC;AAAA,IACA,kBAAkBC;AAAA,IAClB,yBAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,cAAAC;AAAA,IACA,2BAAAC,IAA4B;AAAA,IAC5B,GAAGC;AAAA,EACP,IAAMb,GACEc,IAAMf,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M,EAAE,eAAAF,GAAe,GAC7B,SAAS,kBAAkBC,GAA4B;AAE/D;AACA,SAASN,GAAUQ,GAAOC,GAAY;AACpC,SAAOD,EAAM,IAAI,CAACE,GAAGC,MAAUH,GAAOC,IAAaE,KAASH,EAAM,MAAM,CAAC;AAC3E;AACG,IAACI,KAAOzE,GACP0E,KAAO3B;","x_google_ignoreList":[0]}
|
1
|
+
{"version":3,"file":"index.es408.js","sources":["../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs"],"sourcesContent":["// packages/react/use-layout-effect/src/use-layout-effect.tsx\nimport * as React from \"react\";\nvar useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {\n};\nexport {\n useLayoutEffect2 as useLayoutEffect\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useLayoutEffect2","React"],"mappings":";AAEG,IAACA,IAAmB,iCAAY,WAAWC,EAAM,kBAAkB,MAAM;AAC5E;","x_google_ignoreList":[0]}
|
package/dist/index.es409.js
CHANGED
@@ -1,53 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
},
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
return e;
|
12
|
-
var n = W(e);
|
13
|
-
return n && r.contains(n) ? n : (console.error("aria-hidden", e, "in not contained inside", r, ". Doing nothing"), null);
|
14
|
-
}).filter(function(e) {
|
15
|
-
return !!e;
|
16
|
-
});
|
17
|
-
}, E = function(r, u, e, n) {
|
18
|
-
var i = D(u, Array.isArray(r) ? r : [r]);
|
19
|
-
p[e] || (p[e] = /* @__PURE__ */ new WeakMap());
|
20
|
-
var o = p[e], l = [], s = /* @__PURE__ */ new Set(), b = new Set(i), y = function(t) {
|
21
|
-
!t || s.has(t) || (s.add(t), y(t.parentNode));
|
22
|
-
};
|
23
|
-
i.forEach(y);
|
24
|
-
var A = function(t) {
|
25
|
-
!t || b.has(t) || Array.prototype.forEach.call(t.children, function(a) {
|
26
|
-
if (s.has(a))
|
27
|
-
A(a);
|
28
|
-
else
|
29
|
-
try {
|
30
|
-
var c = a.getAttribute(n), w = c !== null && c !== "false", d = (f.get(a) || 0) + 1, M = (o.get(a) || 0) + 1;
|
31
|
-
f.set(a, d), o.set(a, M), l.push(a), d === 1 && w && v.set(a, !0), M === 1 && a.setAttribute(e, "true"), w || a.setAttribute(n, "true");
|
32
|
-
} catch (k) {
|
33
|
-
console.error("aria-hidden: cannot operate on ", a, k);
|
34
|
-
}
|
35
|
-
});
|
36
|
-
};
|
37
|
-
return A(u), s.clear(), h++, function() {
|
38
|
-
l.forEach(function(t) {
|
39
|
-
var a = f.get(t) - 1, c = o.get(t) - 1;
|
40
|
-
f.set(t, a), o.set(t, c), a || (v.has(t) || t.removeAttribute(n), v.delete(t)), c || t.removeAttribute(e);
|
41
|
-
}), h--, h || (f = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {});
|
42
|
-
};
|
43
|
-
}, C = function(r, u, e) {
|
44
|
-
e === void 0 && (e = "data-aria-hidden");
|
45
|
-
var n = Array.from(Array.isArray(r) ? r : [r]), i = S(r);
|
46
|
-
return i ? (n.push.apply(n, Array.from(i.querySelectorAll("[aria-live]"))), E(n, i, e, "aria-hidden")) : function() {
|
47
|
-
return null;
|
48
|
-
};
|
49
|
-
};
|
1
|
+
import * as r from "react";
|
2
|
+
function o(t) {
|
3
|
+
const e = r.useRef(t);
|
4
|
+
return r.useEffect(() => {
|
5
|
+
e.current = t;
|
6
|
+
}), r.useMemo(() => (...n) => {
|
7
|
+
var u;
|
8
|
+
return (u = e.current) == null ? void 0 : u.call(e, ...n);
|
9
|
+
}, []);
|
10
|
+
}
|
50
11
|
export {
|
51
|
-
|
12
|
+
o as useCallbackRef
|
52
13
|
};
|
53
14
|
//# sourceMappingURL=index.es409.js.map
|
package/dist/index.es409.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es409.js","sources":["../node_modules/aria-hidden/dist/es2015/index.js"],"sourcesContent":["var getDefaultParent = function (originalTarget) {\n if (typeof document === 'undefined') {\n return null;\n }\n var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;\n return sampleTarget.ownerDocument.body;\n};\nvar counterMap = new WeakMap();\nvar uncontrolledNodes = new WeakMap();\nvar markerMap = {};\nvar lockCount = 0;\nvar unwrapHost = function (node) {\n return node && (node.host || unwrapHost(node.parentNode));\n};\nvar correctTargets = function (parent, targets) {\n return targets\n .map(function (target) {\n if (parent.contains(target)) {\n return target;\n }\n var correctedTarget = unwrapHost(target);\n if (correctedTarget && parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');\n return null;\n })\n .filter(function (x) { return Boolean(x); });\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @param {String} [controlAttribute] - html Attribute to control\n * @return {Undo} undo command\n */\nvar applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {\n var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n var markerCounter = markerMap[markerName];\n var hiddenNodes = [];\n var elementsToKeep = new Set();\n var elementsToStop = new Set(targets);\n var keep = function (el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n keep(el.parentNode);\n };\n targets.forEach(keep);\n var deep = function (parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n Array.prototype.forEach.call(parent.children, function (node) {\n if (elementsToKeep.has(node)) {\n deep(node);\n }\n else {\n try {\n var attr = node.getAttribute(controlAttribute);\n var alreadyHidden = attr !== null && attr !== 'false';\n var counterValue = (counterMap.get(node) || 0) + 1;\n var markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenNodes.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledNodes.set(node, true);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, 'true');\n }\n if (!alreadyHidden) {\n node.setAttribute(controlAttribute, 'true');\n }\n }\n catch (e) {\n console.error('aria-hidden: cannot operate on ', node, e);\n }\n }\n });\n };\n deep(parentNode);\n elementsToKeep.clear();\n lockCount++;\n return function () {\n hiddenNodes.forEach(function (node) {\n var counterValue = counterMap.get(node) - 1;\n var markerValue = markerCounter.get(node) - 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n if (!counterValue) {\n if (!uncontrolledNodes.has(node)) {\n node.removeAttribute(controlAttribute);\n }\n uncontrolledNodes.delete(node);\n }\n if (!markerValue) {\n node.removeAttribute(markerName);\n }\n });\n lockCount--;\n if (!lockCount) {\n // clear\n counterMap = new WeakMap();\n counterMap = new WeakMap();\n uncontrolledNodes = new WeakMap();\n markerMap = {};\n }\n };\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var hideOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-aria-hidden'; }\n var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n // we should not hide ariaLive elements - https://github.com/theKashey/aria-hidden/issues/10\n targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live]')));\n return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');\n};\n/**\n * Marks everything except given node(or nodes) as inert\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var inertOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-inert-ed'; }\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');\n};\n/**\n * @returns if current browser supports inert\n */\nexport var supportsInert = function () {\n return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');\n};\n/**\n * Automatic function to \"suppress\" DOM elements - _hide_ or _inert_ in the best possible way\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var suppressOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-suppressed'; }\n return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName);\n};\n"],"names":["getDefaultParent","originalTarget","sampleTarget","counterMap","uncontrolledNodes","markerMap","lockCount","unwrapHost","node","correctTargets","parent","targets","target","correctedTarget","x","applyAttributeToOthers","parentNode","markerName","controlAttribute","markerCounter","hiddenNodes","elementsToKeep","elementsToStop","keep","el","deep","attr","alreadyHidden","counterValue","markerValue","e","hideOthers","activeParentNode"],"mappings":"AAAA,IAAIA,IAAmB,SAAUC,GAAgB;AAC7C,MAAI,OAAO,WAAa;AACpB,WAAO;AAEX,MAAIC,IAAe,MAAM,QAAQD,CAAc,IAAIA,EAAe,CAAC,IAAIA;AACvE,SAAOC,EAAa,cAAc;AACtC,GACIC,IAAa,oBAAI,QAAS,GAC1BC,IAAoB,oBAAI,QAAS,GACjCC,IAAY,CAAE,GACdC,IAAY,GACZC,IAAa,SAAUC,GAAM;AAC7B,SAAOA,MAASA,EAAK,QAAQD,EAAWC,EAAK,UAAU;AAC3D,GACIC,IAAiB,SAAUC,GAAQC,GAAS;AAC5C,SAAOA,EACF,IAAI,SAAUC,GA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ignoreList":[0]}
|
1
|
+
{"version":3,"file":"index.es409.js","sources":["../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs"],"sourcesContent":["// packages/react/use-callback-ref/src/use-callback-ref.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useCallbackRef","callback","callbackRef","React","args","_a"],"mappings":";AAEA,SAASA,EAAeC,GAAU;AAChC,QAAMC,IAAcC,EAAM,OAAOF,CAAQ;AACzC,SAAAE,EAAM,UAAU,MAAM;AACpB,IAAAD,EAAY,UAAUD;AAAA,EAC1B,CAAG,GACME,EAAM,QAAQ,MAAM,IAAIC;;AAAS,YAAAC,IAAAH,EAAY,YAAZ,gBAAAG,EAAA,KAAAH,GAAsB,GAAGE;AAAA,KAAO,EAAE;AAC5E;","x_google_ignoreList":[0]}
|