@inspirare/design-system 0.0.18 → 0.0.20
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.css +1 -1
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.js +359 -0
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +328 -0
- package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1._f1bed12861163fa290e602839f1ebdb9/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +212 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +97 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +106 -0
- package/dist/node_modules/.pnpm/@radix-ui_number@1.1.2/node_modules/@radix-ui/number/dist/index.js +6 -0
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.4/node_modules/@radix-ui/primitive/dist/index.js +8 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-accordion@1_90771884ca9639bf31e5f01b1faf83e4/node_modules/@radix-ui/react-accordion/dist/index.js +195 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-alert-dialo_0211f1deb04a7e512244dbbc3e4765ed/node_modules/@radix-ui/react-alert-dialog/dist/index.js +119 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-arrow@1.1.9_b34b7156178de4198a23e93f83c57da5/node_modules/@radix-ui/react-arrow/dist/index.js +20 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-aspect-rati_62430dda2e5090a076c492dea1ecc5d8/node_modules/@radix-ui/react-aspect-ratio/dist/index.js +31 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-avatar@1.1._d460f1c45278b86e7424fb8ae25577de/node_modules/@radix-ui/react-avatar/dist/index.js +73 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-checkbox@1._e21be6412c310c083d6755285c4c1ad9/node_modules/@radix-ui/react-checkbox/dist/index.js +158 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-collapsible_d381d44d4b8a6d58d9dfaae3a0126ca3/node_modules/@radix-ui/react-collapsible/dist/index.js +97 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-collection@_9d7b7379fb7a1e56af9d4a8d107ecba8/node_modules/@radix-ui/react-collection/dist/index.js +62 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-compose-ref_1124f78b370d43bfeceaaa9b791be73d/node_modules/@radix-ui/react-compose-refs/dist/index.js +25 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-context-men_f76d1e5eaec57e990fe72d3c41a037df/node_modules/@radix-ui/react-context-menu/dist/index.js +240 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1_796eddd33de3050019fa09b10c68d7ca/node_modules/@radix-ui/react-context/dist/index.js +80 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dialog@1.1._ef5419b1d5914b6ed85fc377af02cd8c/node_modules/@radix-ui/react-dialog/dist/index.js +225 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-direction@1_2157d1ab8e201288009ff536bb11c468/node_modules/@radix-ui/react-direction/dist/index.js +11 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable_1202449cfd75d4d3d4e876187986c0d8/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +108 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dropdown-me_9dd0889a66ea847559fd572aaa20379b/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +225 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-guard_6b3d65e71789b2986a17d5efdb8859bf/node_modules/@radix-ui/react-focus-guards/dist/index.js +22 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope_c97f9e7487f0abcea30d185973e4d237/node_modules/@radix-ui/react-focus-scope/dist/index.js +146 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-hover-card@_8a3f4d1399bacc84c908e03b45229f87/node_modules/@radix-ui/react-hover-card/dist/index.js +161 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.2_@types_react@18.3.31_react@18.3.1/node_modules/@radix-ui/react-id/dist/index.js +12 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-label@2.1.9_386dd2eabe41e70ee233c5790da58dd5/node_modules/@radix-ui/react-label/dist/index.js +16 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.17_cc73edd868dbfc82392e3731b66f2e59/node_modules/@radix-ui/react-menu/dist/index.js +563 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-menubar@1.1_52e1207bf5981387ca85fb7a6f7b2195/node_modules/@radix-ui/react-menubar/dist/index.js +312 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-navigation-_ce246f1abffb4c1bd00bc4d15b1887f5/node_modules/@radix-ui/react-navigation-menu/dist/index.js +553 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-popover@1.1_0f96f9f03b66af70568af721c965c5cd/node_modules/@radix-ui/react-popover/dist/index.js +199 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.3._bd7668c1d3a757f9e8c97f0d7e635b5d/node_modules/@radix-ui/react-popper/dist/index.js +203 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1._32b1caf40ac61f8d30d412d28d60b4ca/node_modules/@radix-ui/react-portal/dist/index.js +19 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-presence@1._dc6e30df35507eb8a116c12c3da26e18/node_modules/@radix-ui/react-presence/dist/index.js +85 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2_9b6ae4cdaf3918ddbf0b21069e38e2ef/node_modules/@radix-ui/react-primitive/dist/index.js +41 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-progress@1._4cd7f31ebaa5416f0f0f54265ec22793/node_modules/@radix-ui/react-progress/dist/index.js +71 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-radio-group_385226f717d657e4aea3688d6214f1c0/node_modules/@radix-ui/react-radio-group/dist/index.js +249 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-roving-focu_d783d3abe701a7f2fb2c68867b8f1f65/node_modules/@radix-ui/react-roving-focus/dist/index.js +154 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-select@2.3._b9232b5aa23e604443839e7a081b7527/node_modules/@radix-ui/react-select/dist/index.js +727 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-separator@1_f5efb6a4d38fd7cb82808cb6f7a6326a/node_modules/@radix-ui/react-separator/dist/index.js +23 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slider@1.4._cfb70bb4d45c3eedb16b2d4d4cf80f46/node_modules/@radix-ui/react-slider/dist/index.js +404 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.2.5_@types_react@18.3.31_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.js +71 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-switch@1.3._d2f9574497ecbe08e0e7c2298fb35dc1/node_modules/@radix-ui/react-switch/dist/index.js +138 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.14_769bbb0130198553b196f258bd99ab92/node_modules/@radix-ui/react-tabs/dist/index.js +120 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-toggle-grou_9d4cd233d31c4687b287c174e894620a/node_modules/@radix-ui/react-toggle-group/dist/index.js +125 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-toggle@1.1._afb5f705be3deb4ba78b89b6c70d5cf9/node_modules/@radix-ui/react-toggle/dist/index.js +30 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-tooltip@1.2_02a5bba0cb45f3ddbe548efab47eabcc/node_modules/@radix-ui/react-tooltip/dist/index.js +351 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-callbac_5106d65c013fadfe178f87486239c7af/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +10 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-control_e3b0d353471f209a120bf58c8d35c552/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +45 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-_c83bcf92add652965a36806e6d79891c/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +14 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-is-hydr_d8b55bd05f5d50f7ea21f52744760552/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +19 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-_ad41f999ca2019252b887df955038ce1/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +5 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-previou_58b78c95af3b98dc4c1bc8bce73c779d/node_modules/@radix-ui/react-use-previous/dist/index.js +11 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1._4b75a7cfb879b922004e7a6caa492077/node_modules/@radix-ui/react-use-size/dist/index.js +29 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-visually-hi_fbf0dd0d68bb58b2410fc7a153ed1d9c/node_modules/@radix-ui/react-visually-hidden/dist/index.js +27 -0
- package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js +46 -0
- package/dist/node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js +33 -0
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js +7 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3_24279af7608b4a4e9fe00320b3c0cae7/node_modules/react-remove-scroll-bar/dist/es2015/component.js +70 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3_24279af7608b4a4e9fe00320b3c0cae7/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +4 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3_24279af7608b4a4e9fe00320b3c0cae7/node_modules/react-remove-scroll-bar/dist/es2015/index.js +3 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3_24279af7608b4a4e9fe00320b3c0cae7/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +27 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@18.3.31_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.js +14 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@18.3.31_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +116 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@18.3.31_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/UI.js +52 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@18.3.31_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +13 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@18.3.31_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +52 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@18.3.31_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/medium.js +5 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.2_@types_react@18.3.31_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/sidecar.js +7 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_64be49a27fe392764e1764f59e110241/node_modules/react-style-singleton/dist/es2015/component.js +11 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_64be49a27fe392764e1764f59e110241/node_modules/react-style-singleton/dist/es2015/hook.js +15 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_64be49a27fe392764e1764f59e110241/node_modules/react-style-singleton/dist/es2015/index.js +3 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_64be49a27fe392764e1764f59e110241/node_modules/react-style-singleton/dist/es2015/singleton.js +28 -0
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +19 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@18.3.31_react@18.3.1/node_modules/use-callback-ref/dist/es2015/assignRef.js +6 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@18.3.31_react@18.3.1/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +26 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@18.3.31_react@18.3.1/node_modules/use-callback-ref/dist/es2015/useRef.js +22 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@18.3.31_react@18.3.1/node_modules/use-sidecar/dist/es2015/exports.js +16 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@18.3.31_react@18.3.1/node_modules/use-sidecar/dist/es2015/medium.js +69 -0
- package/dist/src/components/ui/accessibility-improvements.js +60 -0
- package/dist/src/components/ui/accordion.js +44 -0
- package/dist/src/components/ui/alert-dialog.js +61 -0
- package/dist/src/components/ui/alert.js +32 -0
- package/dist/src/components/ui/aspect-ratio.js +6 -0
- package/dist/src/components/ui/avatar.js +29 -0
- package/dist/src/components/ui/badge.js +24 -0
- package/dist/src/components/ui/breadcrumb.js +60 -0
- package/dist/src/components/ui/button-group.js +38 -0
- package/dist/src/components/ui/button.js +41 -0
- package/dist/src/components/ui/calendar.js +89 -0
- package/dist/src/components/ui/card.js +55 -0
- package/dist/src/components/ui/carousel.js +116 -0
- package/dist/src/components/ui/chart.js +128 -0
- package/dist/src/components/ui/checkbox.js +21 -0
- package/dist/src/components/ui/collapsible.js +26 -0
- package/dist/src/components/ui/color-picker.js +133 -0
- package/dist/src/components/ui/combobox.js +42 -0
- package/dist/src/components/ui/command.js +86 -0
- package/dist/src/components/ui/context-menu.js +72 -0
- package/dist/src/components/ui/dialog.js +88 -0
- package/dist/src/components/ui/drawer.js +80 -0
- package/dist/src/components/ui/dropdown-menu.js +124 -0
- package/dist/src/components/ui/empty.js +59 -0
- package/dist/src/components/ui/field.js +111 -0
- package/dist/src/components/ui/form.js +76 -0
- package/dist/src/components/ui/hover-card.js +33 -0
- package/dist/src/components/ui/input-group.js +78 -0
- package/dist/src/components/ui/input-otp.js +42 -0
- package/dist/src/components/ui/input.js +14 -0
- package/dist/src/components/ui/item.js +116 -0
- package/dist/src/components/ui/kbd.js +19 -0
- package/dist/src/components/ui/label.js +15 -0
- package/dist/src/components/ui/menubar.js +105 -0
- package/dist/src/components/ui/navigation-menu.js +58 -0
- package/dist/src/components/ui/pagination.js +62 -0
- package/dist/src/components/ui/popover.js +36 -0
- package/dist/src/components/ui/progress.js +20 -0
- package/dist/src/components/ui/radio-group.js +27 -0
- package/dist/src/components/ui/resizable.js +19 -0
- package/dist/src/components/ui/scroll-area.js +18 -0
- package/dist/src/components/ui/select.js +96 -0
- package/dist/src/components/ui/separator.js +17 -0
- package/dist/src/components/ui/sheet.js +84 -0
- package/dist/src/components/ui/sidebar.js +326 -0
- package/dist/src/components/ui/skeleton.js +49 -0
- package/dist/src/components/ui/slider.js +36 -0
- package/dist/src/components/ui/sonner.js +20 -0
- package/dist/src/components/ui/spinner.js +14 -0
- package/dist/src/components/ui/switch.js +20 -0
- package/dist/src/components/ui/table.js +67 -0
- package/dist/src/components/ui/tabs.js +36 -0
- package/dist/src/components/ui/textarea.js +13 -0
- package/dist/src/components/ui/theme-toggle.js +56 -0
- package/dist/src/components/ui/toggle-group.js +44 -0
- package/dist/src/components/ui/toggle.js +37 -0
- package/dist/src/components/ui/tooltip.js +37 -0
- package/dist/src/hooks/use-mobile.js +14 -0
- package/dist/src/index.js +61 -0
- package/dist/src/lib/utils.js +8 -0
- package/package.json +9 -6
- package/src/index.css +9 -42
- package/dist/index.js +0 -22051
|
@@ -0,0 +1,563 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContextScope as e } from "../../../../../@radix-ui_react-context@1.1_796eddd33de3050019fa09b10c68d7ca/node_modules/@radix-ui/react-context/dist/index.js";
|
|
3
|
+
import { composeRefs as t, useComposedRefs as n } from "../../../../../@radix-ui_react-compose-ref_1124f78b370d43bfeceaaa9b791be73d/node_modules/@radix-ui/react-compose-refs/dist/index.js";
|
|
4
|
+
import { createSlot as r } from "../../../../../@radix-ui_react-slot@1.2.5_@types_react@18.3.31_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.js";
|
|
5
|
+
import { createCollection as i } from "../../../../../@radix-ui_react-collection@_9d7b7379fb7a1e56af9d4a8d107ecba8/node_modules/@radix-ui/react-collection/dist/index.js";
|
|
6
|
+
import { composeEventHandlers as a } from "../../../../../@radix-ui_primitive@1.1.4/node_modules/@radix-ui/primitive/dist/index.js";
|
|
7
|
+
import { Primitive as o, dispatchDiscreteCustomEvent as s } from "../../../../../@radix-ui_react-primitive@2_9b6ae4cdaf3918ddbf0b21069e38e2ef/node_modules/@radix-ui/react-primitive/dist/index.js";
|
|
8
|
+
import { Presence as c } from "../../../../../@radix-ui_react-presence@1._dc6e30df35507eb8a116c12c3da26e18/node_modules/@radix-ui/react-presence/dist/index.js";
|
|
9
|
+
import { useId as l } from "../../../../../@radix-ui_react-id@1.1.2_@types_react@18.3.31_react@18.3.1/node_modules/@radix-ui/react-id/dist/index.js";
|
|
10
|
+
import { useDirection as u } from "../../../../../@radix-ui_react-direction@1_2157d1ab8e201288009ff536bb11c468/node_modules/@radix-ui/react-direction/dist/index.js";
|
|
11
|
+
import { useCallbackRef as d } from "../../../../../@radix-ui_react-use-callbac_5106d65c013fadfe178f87486239c7af/node_modules/@radix-ui/react-use-callback-ref/dist/index.js";
|
|
12
|
+
import { DismissableLayer as f } from "../../../../../@radix-ui_react-dismissable_1202449cfd75d4d3d4e876187986c0d8/node_modules/@radix-ui/react-dismissable-layer/dist/index.js";
|
|
13
|
+
import { FocusScope as p } from "../../../../../@radix-ui_react-focus-scope_c97f9e7487f0abcea30d185973e4d237/node_modules/@radix-ui/react-focus-scope/dist/index.js";
|
|
14
|
+
import { Portal as m } from "../../../../../@radix-ui_react-portal@1.1._32b1caf40ac61f8d30d412d28d60b4ca/node_modules/@radix-ui/react-portal/dist/index.js";
|
|
15
|
+
import { useFocusGuards as ee } from "../../../../../@radix-ui_react-focus-guard_6b3d65e71789b2986a17d5efdb8859bf/node_modules/@radix-ui/react-focus-guards/dist/index.js";
|
|
16
|
+
import te from "../../../../../react-remove-scroll@2.7.2_@types_react@18.3.31_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.js";
|
|
17
|
+
import { hideOthers as ne } from "../../../../../aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js";
|
|
18
|
+
import { Anchor as h, Arrow as re, Content as ie, Root2 as g, createPopperScope as _ } from "../../../../../@radix-ui_react-popper@1.3._bd7668c1d3a757f9e8c97f0d7e635b5d/node_modules/@radix-ui/react-popper/dist/index.js";
|
|
19
|
+
import { Item as v, Root as ae, createRovingFocusGroupScope as y } from "../../../../../@radix-ui_react-roving-focu_d783d3abe701a7f2fb2c68867b8f1f65/node_modules/@radix-ui/react-roving-focus/dist/index.js";
|
|
20
|
+
import * as b from "react";
|
|
21
|
+
import { jsx as x } from "react/jsx-runtime";
|
|
22
|
+
//#region node_modules/.pnpm/@radix-ui+react-menu@2.1.17_cc73edd868dbfc82392e3731b66f2e59/node_modules/@radix-ui/react-menu/dist/index.mjs
|
|
23
|
+
var S = ["Enter", " "], oe = [
|
|
24
|
+
"ArrowDown",
|
|
25
|
+
"PageUp",
|
|
26
|
+
"Home"
|
|
27
|
+
], se = [
|
|
28
|
+
"ArrowUp",
|
|
29
|
+
"PageDown",
|
|
30
|
+
"End"
|
|
31
|
+
], ce = [...oe, ...se], C = {
|
|
32
|
+
ltr: [...S, "ArrowRight"],
|
|
33
|
+
rtl: [...S, "ArrowLeft"]
|
|
34
|
+
}, le = {
|
|
35
|
+
ltr: ["ArrowLeft"],
|
|
36
|
+
rtl: ["ArrowRight"]
|
|
37
|
+
}, w = "Menu", [T, ue, E] = i(w), [D, O] = e(w, [
|
|
38
|
+
E,
|
|
39
|
+
_,
|
|
40
|
+
y
|
|
41
|
+
]), k = _(), de = y(), [A, j] = D(w), [M, N] = D(w), P = (e) => {
|
|
42
|
+
let { __scopeMenu: t, open: n = !1, children: r, dir: i, onOpenChange: a, modal: o = !0 } = e, s = k(t), [c, l] = b.useState(null), f = b.useRef(!1), p = d(a), m = u(i);
|
|
43
|
+
return b.useEffect(() => {
|
|
44
|
+
let e = () => {
|
|
45
|
+
f.current = !0, document.addEventListener("pointerdown", t, {
|
|
46
|
+
capture: !0,
|
|
47
|
+
once: !0
|
|
48
|
+
}), document.addEventListener("pointermove", t, {
|
|
49
|
+
capture: !0,
|
|
50
|
+
once: !0
|
|
51
|
+
});
|
|
52
|
+
}, t = () => f.current = !1;
|
|
53
|
+
return document.addEventListener("keydown", e, { capture: !0 }), () => {
|
|
54
|
+
document.removeEventListener("keydown", e, { capture: !0 }), document.removeEventListener("pointerdown", t, { capture: !0 }), document.removeEventListener("pointermove", t, { capture: !0 });
|
|
55
|
+
};
|
|
56
|
+
}, []), /* @__PURE__ */ x(g, {
|
|
57
|
+
...s,
|
|
58
|
+
children: /* @__PURE__ */ x(A, {
|
|
59
|
+
scope: t,
|
|
60
|
+
open: n,
|
|
61
|
+
onOpenChange: p,
|
|
62
|
+
content: c,
|
|
63
|
+
onContentChange: l,
|
|
64
|
+
children: /* @__PURE__ */ x(M, {
|
|
65
|
+
scope: t,
|
|
66
|
+
onClose: b.useCallback(() => p(!1), [p]),
|
|
67
|
+
isUsingKeyboardRef: f,
|
|
68
|
+
dir: m,
|
|
69
|
+
modal: o,
|
|
70
|
+
children: r
|
|
71
|
+
})
|
|
72
|
+
})
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
P.displayName = w;
|
|
76
|
+
var F = "MenuAnchor", I = b.forwardRef((e, t) => {
|
|
77
|
+
let { __scopeMenu: n, ...r } = e;
|
|
78
|
+
return /* @__PURE__ */ x(h, {
|
|
79
|
+
...k(n),
|
|
80
|
+
...r,
|
|
81
|
+
ref: t
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
I.displayName = F;
|
|
85
|
+
var L = "MenuPortal", [R, z] = D(L, { forceMount: void 0 }), B = (e) => {
|
|
86
|
+
let { __scopeMenu: t, forceMount: n, children: r, container: i } = e, a = j(L, t);
|
|
87
|
+
return /* @__PURE__ */ x(R, {
|
|
88
|
+
scope: t,
|
|
89
|
+
forceMount: n,
|
|
90
|
+
children: /* @__PURE__ */ x(c, {
|
|
91
|
+
present: n || a.open,
|
|
92
|
+
children: /* @__PURE__ */ x(m, {
|
|
93
|
+
asChild: !0,
|
|
94
|
+
container: i,
|
|
95
|
+
children: r
|
|
96
|
+
})
|
|
97
|
+
})
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
B.displayName = L;
|
|
101
|
+
var V = "MenuContent", [fe, H] = D(V), U = b.forwardRef((e, t) => {
|
|
102
|
+
let n = z(V, e.__scopeMenu), { forceMount: r = n.forceMount, ...i } = e, a = j(V, e.__scopeMenu), o = N(V, e.__scopeMenu);
|
|
103
|
+
return /* @__PURE__ */ x(T.Provider, {
|
|
104
|
+
scope: e.__scopeMenu,
|
|
105
|
+
children: /* @__PURE__ */ x(c, {
|
|
106
|
+
present: r || a.open,
|
|
107
|
+
children: /* @__PURE__ */ x(T.Slot, {
|
|
108
|
+
scope: e.__scopeMenu,
|
|
109
|
+
children: o.modal ? /* @__PURE__ */ x(pe, {
|
|
110
|
+
...i,
|
|
111
|
+
ref: t
|
|
112
|
+
}) : /* @__PURE__ */ x(me, {
|
|
113
|
+
...i,
|
|
114
|
+
ref: t
|
|
115
|
+
})
|
|
116
|
+
})
|
|
117
|
+
})
|
|
118
|
+
});
|
|
119
|
+
}), pe = b.forwardRef((e, t) => {
|
|
120
|
+
let r = j(V, e.__scopeMenu), i = b.useRef(null), o = n(t, i);
|
|
121
|
+
return b.useEffect(() => {
|
|
122
|
+
let e = i.current;
|
|
123
|
+
if (e) return ne(e);
|
|
124
|
+
}, []), /* @__PURE__ */ x(W, {
|
|
125
|
+
...e,
|
|
126
|
+
ref: o,
|
|
127
|
+
trapFocus: r.open,
|
|
128
|
+
disableOutsidePointerEvents: r.open,
|
|
129
|
+
disableOutsideScroll: !0,
|
|
130
|
+
onFocusOutside: a(e.onFocusOutside, (e) => e.preventDefault(), { checkForDefaultPrevented: !1 }),
|
|
131
|
+
onDismiss: () => r.onOpenChange(!1)
|
|
132
|
+
});
|
|
133
|
+
}), me = b.forwardRef((e, t) => {
|
|
134
|
+
let n = j(V, e.__scopeMenu);
|
|
135
|
+
return /* @__PURE__ */ x(W, {
|
|
136
|
+
...e,
|
|
137
|
+
ref: t,
|
|
138
|
+
trapFocus: !1,
|
|
139
|
+
disableOutsidePointerEvents: !1,
|
|
140
|
+
disableOutsideScroll: !1,
|
|
141
|
+
onDismiss: () => n.onOpenChange(!1)
|
|
142
|
+
});
|
|
143
|
+
}), he = r("MenuContent.ScrollLock"), W = b.forwardRef((e, t) => {
|
|
144
|
+
let { __scopeMenu: r, loop: i = !1, trapFocus: o, onOpenAutoFocus: s, onCloseAutoFocus: c, disableOutsidePointerEvents: l, onEntryFocus: u, onEscapeKeyDown: d, onPointerDownOutside: m, onFocusOutside: ne, onInteractOutside: h, onDismiss: re, disableOutsideScroll: g, ..._ } = e, v = j(V, r), y = N(V, r), S = k(r), oe = de(r), C = ue(r), [le, w] = b.useState(null), T = b.useRef(null), E = n(t, T, v.onContentChange), D = b.useRef(0), O = b.useRef(""), A = b.useRef(0), M = b.useRef(null), P = b.useRef("right"), F = b.useRef(0), I = g ? te : b.Fragment, L = g ? {
|
|
145
|
+
as: he,
|
|
146
|
+
allowPinchZoom: !0
|
|
147
|
+
} : void 0, R = (e) => {
|
|
148
|
+
let t = O.current + e, n = C().filter((e) => !e.disabled), r = document.activeElement, i = n.find((e) => e.ref.current === r)?.textValue, a = Ge(n.map((e) => e.textValue), t, i), o = n.find((e) => e.textValue === a)?.ref.current;
|
|
149
|
+
(function e(t) {
|
|
150
|
+
O.current = t, window.clearTimeout(D.current), t !== "" && (D.current = window.setTimeout(() => e(""), 1e3));
|
|
151
|
+
})(t), o && setTimeout(() => o.focus());
|
|
152
|
+
};
|
|
153
|
+
b.useEffect(() => () => window.clearTimeout(D.current), []), ee();
|
|
154
|
+
let z = b.useCallback((e) => P.current === M.current?.side && qe(e, M.current?.area), []);
|
|
155
|
+
return /* @__PURE__ */ x(fe, {
|
|
156
|
+
scope: r,
|
|
157
|
+
searchRef: O,
|
|
158
|
+
onItemEnter: b.useCallback((e) => {
|
|
159
|
+
z(e) && e.preventDefault();
|
|
160
|
+
}, [z]),
|
|
161
|
+
onItemLeave: b.useCallback((e) => {
|
|
162
|
+
z(e) || (T.current?.focus(), w(null));
|
|
163
|
+
}, [z]),
|
|
164
|
+
onTriggerLeave: b.useCallback((e) => {
|
|
165
|
+
z(e) && e.preventDefault();
|
|
166
|
+
}, [z]),
|
|
167
|
+
pointerGraceTimerRef: A,
|
|
168
|
+
onPointerGraceIntentChange: b.useCallback((e) => {
|
|
169
|
+
M.current = e;
|
|
170
|
+
}, []),
|
|
171
|
+
children: /* @__PURE__ */ x(I, {
|
|
172
|
+
...L,
|
|
173
|
+
children: /* @__PURE__ */ x(p, {
|
|
174
|
+
asChild: !0,
|
|
175
|
+
trapped: o,
|
|
176
|
+
onMountAutoFocus: a(s, (e) => {
|
|
177
|
+
e.preventDefault(), T.current?.focus({ preventScroll: !0 });
|
|
178
|
+
}),
|
|
179
|
+
onUnmountAutoFocus: c,
|
|
180
|
+
children: /* @__PURE__ */ x(f, {
|
|
181
|
+
asChild: !0,
|
|
182
|
+
disableOutsidePointerEvents: l,
|
|
183
|
+
onEscapeKeyDown: d,
|
|
184
|
+
onPointerDownOutside: m,
|
|
185
|
+
onFocusOutside: ne,
|
|
186
|
+
onInteractOutside: h,
|
|
187
|
+
onDismiss: re,
|
|
188
|
+
children: /* @__PURE__ */ x(ae, {
|
|
189
|
+
asChild: !0,
|
|
190
|
+
...oe,
|
|
191
|
+
dir: y.dir,
|
|
192
|
+
orientation: "vertical",
|
|
193
|
+
loop: i,
|
|
194
|
+
currentTabStopId: le,
|
|
195
|
+
onCurrentTabStopIdChange: w,
|
|
196
|
+
onEntryFocus: a(u, (e) => {
|
|
197
|
+
y.isUsingKeyboardRef.current || e.preventDefault();
|
|
198
|
+
}),
|
|
199
|
+
preventScrollOnEntryFocus: !0,
|
|
200
|
+
children: /* @__PURE__ */ x(ie, {
|
|
201
|
+
role: "menu",
|
|
202
|
+
"aria-orientation": "vertical",
|
|
203
|
+
"data-state": He(v.open),
|
|
204
|
+
"data-radix-menu-content": "",
|
|
205
|
+
dir: y.dir,
|
|
206
|
+
...S,
|
|
207
|
+
..._,
|
|
208
|
+
ref: E,
|
|
209
|
+
style: {
|
|
210
|
+
outline: "none",
|
|
211
|
+
..._.style
|
|
212
|
+
},
|
|
213
|
+
onKeyDown: a(_.onKeyDown, (e) => {
|
|
214
|
+
let t = e.target.closest("[data-radix-menu-content]") === e.currentTarget, n = e.ctrlKey || e.altKey || e.metaKey, r = e.key.length === 1;
|
|
215
|
+
t && (e.key === "Tab" && e.preventDefault(), !n && r && R(e.key));
|
|
216
|
+
let i = T.current;
|
|
217
|
+
if (e.target !== i || !ce.includes(e.key)) return;
|
|
218
|
+
e.preventDefault();
|
|
219
|
+
let a = C().filter((e) => !e.disabled).map((e) => e.ref.current);
|
|
220
|
+
se.includes(e.key) && a.reverse(), Ue(a);
|
|
221
|
+
}),
|
|
222
|
+
onBlur: a(e.onBlur, (e) => {
|
|
223
|
+
e.currentTarget.contains(e.target) || (window.clearTimeout(D.current), O.current = "");
|
|
224
|
+
}),
|
|
225
|
+
onPointerMove: a(e.onPointerMove, $((e) => {
|
|
226
|
+
let t = e.target, n = F.current !== e.clientX;
|
|
227
|
+
e.currentTarget.contains(t) && n && (P.current = e.clientX > F.current ? "right" : "left", F.current = e.clientX);
|
|
228
|
+
}))
|
|
229
|
+
})
|
|
230
|
+
})
|
|
231
|
+
})
|
|
232
|
+
})
|
|
233
|
+
})
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
U.displayName = V;
|
|
237
|
+
var ge = "MenuGroup", G = b.forwardRef((e, t) => {
|
|
238
|
+
let { __scopeMenu: n, ...r } = e;
|
|
239
|
+
return /* @__PURE__ */ x(o.div, {
|
|
240
|
+
role: "group",
|
|
241
|
+
...r,
|
|
242
|
+
ref: t
|
|
243
|
+
});
|
|
244
|
+
});
|
|
245
|
+
G.displayName = ge;
|
|
246
|
+
var _e = "MenuLabel", ve = b.forwardRef((e, t) => {
|
|
247
|
+
let { __scopeMenu: n, ...r } = e;
|
|
248
|
+
return /* @__PURE__ */ x(o.div, {
|
|
249
|
+
...r,
|
|
250
|
+
ref: t
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
ve.displayName = _e;
|
|
254
|
+
var K = "MenuItem", ye = "menu.itemSelect", q = b.forwardRef((e, t) => {
|
|
255
|
+
let { disabled: r = !1, onSelect: i, ...o } = e, c = b.useRef(null), l = N(K, e.__scopeMenu), u = H(K, e.__scopeMenu), d = n(t, c), f = b.useRef(!1), p = () => {
|
|
256
|
+
let e = c.current;
|
|
257
|
+
if (!r && e) {
|
|
258
|
+
let t = new CustomEvent(ye, {
|
|
259
|
+
bubbles: !0,
|
|
260
|
+
cancelable: !0
|
|
261
|
+
});
|
|
262
|
+
e.addEventListener(ye, (e) => i?.(e), { once: !0 }), s(e, t), t.defaultPrevented ? f.current = !1 : l.onClose();
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
return /* @__PURE__ */ x(be, {
|
|
266
|
+
...o,
|
|
267
|
+
ref: d,
|
|
268
|
+
disabled: r,
|
|
269
|
+
onClick: a(e.onClick, p),
|
|
270
|
+
onPointerDown: (t) => {
|
|
271
|
+
e.onPointerDown?.(t), f.current = !0;
|
|
272
|
+
},
|
|
273
|
+
onPointerUp: a(e.onPointerUp, (e) => {
|
|
274
|
+
f.current || e.currentTarget?.click();
|
|
275
|
+
}),
|
|
276
|
+
onKeyDown: a(e.onKeyDown, (e) => {
|
|
277
|
+
let t = u.searchRef.current !== "";
|
|
278
|
+
r || t && e.key === " " || S.includes(e.key) && (e.currentTarget.click(), e.preventDefault());
|
|
279
|
+
})
|
|
280
|
+
});
|
|
281
|
+
});
|
|
282
|
+
q.displayName = K;
|
|
283
|
+
var be = b.forwardRef((e, t) => {
|
|
284
|
+
let { __scopeMenu: r, disabled: i = !1, textValue: s, ...c } = e, l = H(K, r), u = de(r), d = b.useRef(null), f = n(t, d), [p, m] = b.useState(!1), [ee, te] = b.useState("");
|
|
285
|
+
return b.useEffect(() => {
|
|
286
|
+
let e = d.current;
|
|
287
|
+
e && te((e.textContent ?? "").trim());
|
|
288
|
+
}, [c.children]), /* @__PURE__ */ x(T.ItemSlot, {
|
|
289
|
+
scope: r,
|
|
290
|
+
disabled: i,
|
|
291
|
+
textValue: s ?? ee,
|
|
292
|
+
children: /* @__PURE__ */ x(v, {
|
|
293
|
+
asChild: !0,
|
|
294
|
+
...u,
|
|
295
|
+
focusable: !i,
|
|
296
|
+
children: /* @__PURE__ */ x(o.div, {
|
|
297
|
+
role: "menuitem",
|
|
298
|
+
"data-highlighted": p ? "" : void 0,
|
|
299
|
+
"aria-disabled": i || void 0,
|
|
300
|
+
"data-disabled": i ? "" : void 0,
|
|
301
|
+
...c,
|
|
302
|
+
ref: f,
|
|
303
|
+
onPointerMove: a(e.onPointerMove, $((e) => {
|
|
304
|
+
i ? l.onItemLeave(e) : (l.onItemEnter(e), e.defaultPrevented || e.currentTarget.focus({ preventScroll: !0 }));
|
|
305
|
+
})),
|
|
306
|
+
onPointerLeave: a(e.onPointerLeave, $((e) => l.onItemLeave(e))),
|
|
307
|
+
onFocus: a(e.onFocus, () => m(!0)),
|
|
308
|
+
onBlur: a(e.onBlur, () => m(!1))
|
|
309
|
+
})
|
|
310
|
+
})
|
|
311
|
+
});
|
|
312
|
+
}), xe = "MenuCheckboxItem", Se = b.forwardRef((e, t) => {
|
|
313
|
+
let { checked: n = !1, onCheckedChange: r, ...i } = e;
|
|
314
|
+
return /* @__PURE__ */ x(ke, {
|
|
315
|
+
scope: e.__scopeMenu,
|
|
316
|
+
checked: n,
|
|
317
|
+
children: /* @__PURE__ */ x(q, {
|
|
318
|
+
role: "menuitemcheckbox",
|
|
319
|
+
"aria-checked": Z(n) ? "mixed" : n,
|
|
320
|
+
...i,
|
|
321
|
+
ref: t,
|
|
322
|
+
"data-state": Q(n),
|
|
323
|
+
onSelect: a(i.onSelect, () => r?.(Z(n) ? !0 : !n), { checkForDefaultPrevented: !1 })
|
|
324
|
+
})
|
|
325
|
+
});
|
|
326
|
+
});
|
|
327
|
+
Se.displayName = xe;
|
|
328
|
+
var Ce = "MenuRadioGroup", [we, Te] = D(Ce, {
|
|
329
|
+
value: void 0,
|
|
330
|
+
onValueChange: () => {}
|
|
331
|
+
}), Ee = b.forwardRef((e, t) => {
|
|
332
|
+
let { value: n, onValueChange: r, ...i } = e, a = d(r);
|
|
333
|
+
return /* @__PURE__ */ x(we, {
|
|
334
|
+
scope: e.__scopeMenu,
|
|
335
|
+
value: n,
|
|
336
|
+
onValueChange: a,
|
|
337
|
+
children: /* @__PURE__ */ x(G, {
|
|
338
|
+
...i,
|
|
339
|
+
ref: t
|
|
340
|
+
})
|
|
341
|
+
});
|
|
342
|
+
});
|
|
343
|
+
Ee.displayName = Ce;
|
|
344
|
+
var De = "MenuRadioItem", Oe = b.forwardRef((e, t) => {
|
|
345
|
+
let { value: n, ...r } = e, i = Te(De, e.__scopeMenu), o = n === i.value;
|
|
346
|
+
return /* @__PURE__ */ x(ke, {
|
|
347
|
+
scope: e.__scopeMenu,
|
|
348
|
+
checked: o,
|
|
349
|
+
children: /* @__PURE__ */ x(q, {
|
|
350
|
+
role: "menuitemradio",
|
|
351
|
+
"aria-checked": o,
|
|
352
|
+
...r,
|
|
353
|
+
ref: t,
|
|
354
|
+
"data-state": Q(o),
|
|
355
|
+
onSelect: a(r.onSelect, () => i.onValueChange?.(n), { checkForDefaultPrevented: !1 })
|
|
356
|
+
})
|
|
357
|
+
});
|
|
358
|
+
});
|
|
359
|
+
Oe.displayName = De;
|
|
360
|
+
var J = "MenuItemIndicator", [ke, Ae] = D(J, { checked: !1 }), je = b.forwardRef((e, t) => {
|
|
361
|
+
let { __scopeMenu: n, forceMount: r, ...i } = e, a = Ae(J, n);
|
|
362
|
+
return /* @__PURE__ */ x(c, {
|
|
363
|
+
present: r || Z(a.checked) || a.checked === !0,
|
|
364
|
+
children: /* @__PURE__ */ x(o.span, {
|
|
365
|
+
...i,
|
|
366
|
+
ref: t,
|
|
367
|
+
"data-state": Q(a.checked)
|
|
368
|
+
})
|
|
369
|
+
});
|
|
370
|
+
});
|
|
371
|
+
je.displayName = J;
|
|
372
|
+
var Me = "MenuSeparator", Ne = b.forwardRef((e, t) => {
|
|
373
|
+
let { __scopeMenu: n, ...r } = e;
|
|
374
|
+
return /* @__PURE__ */ x(o.div, {
|
|
375
|
+
role: "separator",
|
|
376
|
+
"aria-orientation": "horizontal",
|
|
377
|
+
...r,
|
|
378
|
+
ref: t
|
|
379
|
+
});
|
|
380
|
+
});
|
|
381
|
+
Ne.displayName = Me;
|
|
382
|
+
var Pe = "MenuArrow", Fe = b.forwardRef((e, t) => {
|
|
383
|
+
let { __scopeMenu: n, ...r } = e;
|
|
384
|
+
return /* @__PURE__ */ x(re, {
|
|
385
|
+
...k(n),
|
|
386
|
+
...r,
|
|
387
|
+
ref: t
|
|
388
|
+
});
|
|
389
|
+
});
|
|
390
|
+
Fe.displayName = Pe;
|
|
391
|
+
var Y = "MenuSub", [Ie, Le] = D(Y), Re = (e) => {
|
|
392
|
+
let { __scopeMenu: t, children: n, open: r = !1, onOpenChange: i } = e, a = j(Y, t), o = k(t), [s, c] = b.useState(null), [u, f] = b.useState(null), p = d(i);
|
|
393
|
+
return b.useEffect(() => (a.open === !1 && p(!1), () => p(!1)), [a.open, p]), /* @__PURE__ */ x(g, {
|
|
394
|
+
...o,
|
|
395
|
+
children: /* @__PURE__ */ x(A, {
|
|
396
|
+
scope: t,
|
|
397
|
+
open: r,
|
|
398
|
+
onOpenChange: p,
|
|
399
|
+
content: u,
|
|
400
|
+
onContentChange: f,
|
|
401
|
+
children: /* @__PURE__ */ x(Ie, {
|
|
402
|
+
scope: t,
|
|
403
|
+
contentId: l(),
|
|
404
|
+
triggerId: l(),
|
|
405
|
+
trigger: s,
|
|
406
|
+
onTriggerChange: c,
|
|
407
|
+
children: n
|
|
408
|
+
})
|
|
409
|
+
})
|
|
410
|
+
});
|
|
411
|
+
};
|
|
412
|
+
Re.displayName = Y;
|
|
413
|
+
var X = "MenuSubTrigger", ze = b.forwardRef((e, n) => {
|
|
414
|
+
let r = j(X, e.__scopeMenu), i = N(X, e.__scopeMenu), o = Le(X, e.__scopeMenu), s = H(X, e.__scopeMenu), c = b.useRef(null), { pointerGraceTimerRef: l, onPointerGraceIntentChange: u } = s, d = { __scopeMenu: e.__scopeMenu }, f = b.useCallback(() => {
|
|
415
|
+
c.current && window.clearTimeout(c.current), c.current = null;
|
|
416
|
+
}, []);
|
|
417
|
+
return b.useEffect(() => f, [f]), b.useEffect(() => {
|
|
418
|
+
let e = l.current;
|
|
419
|
+
return () => {
|
|
420
|
+
window.clearTimeout(e), u(null);
|
|
421
|
+
};
|
|
422
|
+
}, [l, u]), /* @__PURE__ */ x(I, {
|
|
423
|
+
asChild: !0,
|
|
424
|
+
...d,
|
|
425
|
+
children: /* @__PURE__ */ x(be, {
|
|
426
|
+
id: o.triggerId,
|
|
427
|
+
"aria-haspopup": "menu",
|
|
428
|
+
"aria-expanded": r.open,
|
|
429
|
+
"aria-controls": r.open ? o.contentId : void 0,
|
|
430
|
+
"data-state": He(r.open),
|
|
431
|
+
...e,
|
|
432
|
+
ref: t(n, o.onTriggerChange),
|
|
433
|
+
onClick: (t) => {
|
|
434
|
+
e.onClick?.(t), !(e.disabled || t.defaultPrevented) && (t.currentTarget.focus(), r.open || r.onOpenChange(!0));
|
|
435
|
+
},
|
|
436
|
+
onPointerMove: a(e.onPointerMove, $((t) => {
|
|
437
|
+
s.onItemEnter(t), !t.defaultPrevented && !e.disabled && !r.open && !c.current && (s.onPointerGraceIntentChange(null), c.current = window.setTimeout(() => {
|
|
438
|
+
r.onOpenChange(!0), f();
|
|
439
|
+
}, 100));
|
|
440
|
+
})),
|
|
441
|
+
onPointerLeave: a(e.onPointerLeave, $((e) => {
|
|
442
|
+
f();
|
|
443
|
+
let t = r.content?.getBoundingClientRect();
|
|
444
|
+
if (t) {
|
|
445
|
+
let n = r.content?.dataset.side, i = n === "right", a = i ? -5 : 5, o = t[i ? "left" : "right"], c = t[i ? "right" : "left"];
|
|
446
|
+
s.onPointerGraceIntentChange({
|
|
447
|
+
area: [
|
|
448
|
+
{
|
|
449
|
+
x: e.clientX + a,
|
|
450
|
+
y: e.clientY
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
x: o,
|
|
454
|
+
y: t.top
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
x: c,
|
|
458
|
+
y: t.top
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
x: c,
|
|
462
|
+
y: t.bottom
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
x: o,
|
|
466
|
+
y: t.bottom
|
|
467
|
+
}
|
|
468
|
+
],
|
|
469
|
+
side: n
|
|
470
|
+
}), window.clearTimeout(l.current), l.current = window.setTimeout(() => s.onPointerGraceIntentChange(null), 300);
|
|
471
|
+
} else {
|
|
472
|
+
if (s.onTriggerLeave(e), e.defaultPrevented) return;
|
|
473
|
+
s.onPointerGraceIntentChange(null);
|
|
474
|
+
}
|
|
475
|
+
})),
|
|
476
|
+
onKeyDown: a(e.onKeyDown, (t) => {
|
|
477
|
+
let n = s.searchRef.current !== "";
|
|
478
|
+
e.disabled || n && t.key === " " || C[i.dir].includes(t.key) && (r.onOpenChange(!0), r.content?.focus(), t.preventDefault());
|
|
479
|
+
})
|
|
480
|
+
})
|
|
481
|
+
});
|
|
482
|
+
});
|
|
483
|
+
ze.displayName = X;
|
|
484
|
+
var Be = "MenuSubContent", Ve = b.forwardRef((e, t) => {
|
|
485
|
+
let r = z(V, e.__scopeMenu), { forceMount: i = r.forceMount, align: o = "start", ...s } = e, l = j(V, e.__scopeMenu), u = N(V, e.__scopeMenu), d = Le(Be, e.__scopeMenu), f = b.useRef(null), p = n(t, f);
|
|
486
|
+
return /* @__PURE__ */ x(T.Provider, {
|
|
487
|
+
scope: e.__scopeMenu,
|
|
488
|
+
children: /* @__PURE__ */ x(c, {
|
|
489
|
+
present: i || l.open,
|
|
490
|
+
children: /* @__PURE__ */ x(T.Slot, {
|
|
491
|
+
scope: e.__scopeMenu,
|
|
492
|
+
children: /* @__PURE__ */ x(W, {
|
|
493
|
+
id: d.contentId,
|
|
494
|
+
"aria-labelledby": d.triggerId,
|
|
495
|
+
...s,
|
|
496
|
+
ref: p,
|
|
497
|
+
align: o,
|
|
498
|
+
side: u.dir === "rtl" ? "left" : "right",
|
|
499
|
+
disableOutsidePointerEvents: !1,
|
|
500
|
+
disableOutsideScroll: !1,
|
|
501
|
+
trapFocus: !1,
|
|
502
|
+
onOpenAutoFocus: (e) => {
|
|
503
|
+
u.isUsingKeyboardRef.current && f.current?.focus(), e.preventDefault();
|
|
504
|
+
},
|
|
505
|
+
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
506
|
+
onFocusOutside: a(e.onFocusOutside, (e) => {
|
|
507
|
+
e.target !== d.trigger && l.onOpenChange(!1);
|
|
508
|
+
}),
|
|
509
|
+
onEscapeKeyDown: a(e.onEscapeKeyDown, (e) => {
|
|
510
|
+
u.onClose(), e.preventDefault();
|
|
511
|
+
}),
|
|
512
|
+
onKeyDown: a(e.onKeyDown, (e) => {
|
|
513
|
+
let t = e.currentTarget.contains(e.target), n = le[u.dir].includes(e.key);
|
|
514
|
+
t && n && (l.onOpenChange(!1), d.trigger?.focus(), e.preventDefault());
|
|
515
|
+
})
|
|
516
|
+
})
|
|
517
|
+
})
|
|
518
|
+
})
|
|
519
|
+
});
|
|
520
|
+
});
|
|
521
|
+
Ve.displayName = Be;
|
|
522
|
+
function He(e) {
|
|
523
|
+
return e ? "open" : "closed";
|
|
524
|
+
}
|
|
525
|
+
function Z(e) {
|
|
526
|
+
return e === "indeterminate";
|
|
527
|
+
}
|
|
528
|
+
function Q(e) {
|
|
529
|
+
return Z(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
530
|
+
}
|
|
531
|
+
function Ue(e) {
|
|
532
|
+
let t = document.activeElement;
|
|
533
|
+
for (let n of e) if (n === t || (n.focus(), document.activeElement !== t)) return;
|
|
534
|
+
}
|
|
535
|
+
function We(e, t) {
|
|
536
|
+
return e.map((n, r) => e[(t + r) % e.length]);
|
|
537
|
+
}
|
|
538
|
+
function Ge(e, t, n) {
|
|
539
|
+
let r = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1, a = We(e, Math.max(i, 0));
|
|
540
|
+
r.length === 1 && (a = a.filter((e) => e !== n));
|
|
541
|
+
let o = a.find((e) => e.toLowerCase().startsWith(r.toLowerCase()));
|
|
542
|
+
return o === n ? void 0 : o;
|
|
543
|
+
}
|
|
544
|
+
function Ke(e, t) {
|
|
545
|
+
let { x: n, y: r } = e, i = !1;
|
|
546
|
+
for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
|
|
547
|
+
let o = t[e], s = t[a], c = o.x, l = o.y, u = s.x, d = s.y;
|
|
548
|
+
l > r != d > r && n < (u - c) * (r - l) / (d - l) + c && (i = !i);
|
|
549
|
+
}
|
|
550
|
+
return i;
|
|
551
|
+
}
|
|
552
|
+
function qe(e, t) {
|
|
553
|
+
return t ? Ke({
|
|
554
|
+
x: e.clientX,
|
|
555
|
+
y: e.clientY
|
|
556
|
+
}, t) : !1;
|
|
557
|
+
}
|
|
558
|
+
function $(e) {
|
|
559
|
+
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
560
|
+
}
|
|
561
|
+
var Je = P, Ye = I, Xe = B, Ze = U, Qe = G, $e = ve, et = q, tt = Se, nt = Ee, rt = Oe, it = je, at = Ne, ot = Fe, st = Re, ct = ze, lt = Ve;
|
|
562
|
+
//#endregion
|
|
563
|
+
export { Ye as Anchor2, ot as Arrow2, tt as CheckboxItem, Ze as Content2, Qe as Group, et as Item2, it as ItemIndicator, $e as Label, Xe as Portal, nt as RadioGroup, rt as RadioItem, Je as Root3, at as Separator, st as Sub, lt as SubContent, ct as SubTrigger, O as createMenuScope };
|