@inspirare/design-system 0.0.21 → 0.0.22
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/components/ui/accordion.js +44 -0
- package/dist/components/ui/alert-dialog.js +61 -0
- package/dist/{src/components → components}/ui/alert.js +10 -10
- package/dist/components/ui/aspect-ratio.js +6 -0
- package/dist/components/ui/avatar.js +29 -0
- package/dist/{src/components → components}/ui/badge.js +6 -6
- package/dist/components/ui/breadcrumb.js +60 -0
- package/dist/components/ui/button-group.js +38 -0
- package/dist/{src/components → components}/ui/button.js +6 -6
- package/dist/{src/components → components}/ui/calendar.js +16 -16
- package/dist/{src/components → components}/ui/carousel.js +29 -29
- package/dist/{src/components → components}/ui/checkbox.js +10 -10
- package/dist/components/ui/collapsible.js +26 -0
- package/dist/{src/components → components}/ui/combobox.js +10 -10
- package/dist/{src/components → components}/ui/command.js +17 -17
- package/dist/{src/components → components}/ui/context-menu.js +37 -37
- package/dist/{src/components → components}/ui/dialog.js +36 -36
- package/dist/{src/components → components}/ui/dropdown-menu.js +46 -46
- package/dist/{src/components → components}/ui/empty.js +21 -21
- package/dist/{src/components → components}/ui/field.js +27 -27
- package/dist/components/ui/form.js +77 -0
- package/dist/{src/components → components}/ui/hover-card.js +14 -14
- package/dist/{src/components → components}/ui/input-group.js +18 -18
- package/dist/{src/components → components}/ui/input-otp.js +13 -13
- package/dist/components/ui/item.js +116 -0
- package/dist/{src/components → components}/ui/label.js +3 -3
- package/dist/components/ui/menubar.js +105 -0
- package/dist/components/ui/navigation-menu.js +58 -0
- package/dist/{src/components → components}/ui/pagination.js +18 -18
- package/dist/components/ui/popover.js +36 -0
- package/dist/components/ui/progress.js +20 -0
- package/dist/{src/components → components}/ui/radio-group.js +14 -14
- package/dist/{src/components → components}/ui/resizable.js +7 -7
- package/dist/{src/components → components}/ui/select.js +44 -44
- package/dist/{src/components → components}/ui/separator.js +3 -3
- package/dist/{src/components → components}/ui/sheet.js +35 -35
- package/dist/{src/components → components}/ui/sidebar.js +124 -124
- package/dist/{src/components → components}/ui/slider.js +20 -20
- package/dist/{src/components → components}/ui/spinner.js +3 -3
- package/dist/{src/components → components}/ui/switch.js +9 -9
- package/dist/{src/components → components}/ui/tabs.js +19 -19
- package/dist/{src/components → components}/ui/theme-toggle.js +10 -10
- package/dist/components/ui/toggle-group.js +44 -0
- package/dist/{src/components → components}/ui/toggle.js +7 -7
- package/dist/components/ui/tooltip.js +37 -0
- package/package.json +1 -1
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -359
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -328
- package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1._f1bed12861163fa290e602839f1ebdb9/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -212
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -97
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -106
- package/dist/node_modules/.pnpm/@radix-ui_number@1.1.2/node_modules/@radix-ui/number/dist/index.js +0 -6
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.4/node_modules/@radix-ui/primitive/dist/index.js +0 -8
- package/dist/node_modules/.pnpm/@radix-ui_react-accordion@1_90771884ca9639bf31e5f01b1faf83e4/node_modules/@radix-ui/react-accordion/dist/index.js +0 -195
- package/dist/node_modules/.pnpm/@radix-ui_react-alert-dialo_0211f1deb04a7e512244dbbc3e4765ed/node_modules/@radix-ui/react-alert-dialog/dist/index.js +0 -119
- package/dist/node_modules/.pnpm/@radix-ui_react-arrow@1.1.9_b34b7156178de4198a23e93f83c57da5/node_modules/@radix-ui/react-arrow/dist/index.js +0 -20
- package/dist/node_modules/.pnpm/@radix-ui_react-aspect-rati_62430dda2e5090a076c492dea1ecc5d8/node_modules/@radix-ui/react-aspect-ratio/dist/index.js +0 -31
- package/dist/node_modules/.pnpm/@radix-ui_react-avatar@1.1._d460f1c45278b86e7424fb8ae25577de/node_modules/@radix-ui/react-avatar/dist/index.js +0 -73
- package/dist/node_modules/.pnpm/@radix-ui_react-checkbox@1._e21be6412c310c083d6755285c4c1ad9/node_modules/@radix-ui/react-checkbox/dist/index.js +0 -158
- package/dist/node_modules/.pnpm/@radix-ui_react-collapsible_d381d44d4b8a6d58d9dfaae3a0126ca3/node_modules/@radix-ui/react-collapsible/dist/index.js +0 -97
- package/dist/node_modules/.pnpm/@radix-ui_react-collection@_9d7b7379fb7a1e56af9d4a8d107ecba8/node_modules/@radix-ui/react-collection/dist/index.js +0 -62
- package/dist/node_modules/.pnpm/@radix-ui_react-compose-ref_1124f78b370d43bfeceaaa9b791be73d/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -25
- package/dist/node_modules/.pnpm/@radix-ui_react-context-men_f76d1e5eaec57e990fe72d3c41a037df/node_modules/@radix-ui/react-context-menu/dist/index.js +0 -240
- package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1_796eddd33de3050019fa09b10c68d7ca/node_modules/@radix-ui/react-context/dist/index.js +0 -80
- package/dist/node_modules/.pnpm/@radix-ui_react-dialog@1.1._ef5419b1d5914b6ed85fc377af02cd8c/node_modules/@radix-ui/react-dialog/dist/index.js +0 -225
- package/dist/node_modules/.pnpm/@radix-ui_react-direction@1_2157d1ab8e201288009ff536bb11c468/node_modules/@radix-ui/react-direction/dist/index.js +0 -11
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable_1202449cfd75d4d3d4e876187986c0d8/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -108
- package/dist/node_modules/.pnpm/@radix-ui_react-dropdown-me_9dd0889a66ea847559fd572aaa20379b/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +0 -225
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-guard_6b3d65e71789b2986a17d5efdb8859bf/node_modules/@radix-ui/react-focus-guards/dist/index.js +0 -22
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope_c97f9e7487f0abcea30d185973e4d237/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -146
- package/dist/node_modules/.pnpm/@radix-ui_react-hover-card@_8a3f4d1399bacc84c908e03b45229f87/node_modules/@radix-ui/react-hover-card/dist/index.js +0 -161
- 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 +0 -12
- package/dist/node_modules/.pnpm/@radix-ui_react-label@2.1.9_386dd2eabe41e70ee233c5790da58dd5/node_modules/@radix-ui/react-label/dist/index.js +0 -16
- package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.17_cc73edd868dbfc82392e3731b66f2e59/node_modules/@radix-ui/react-menu/dist/index.js +0 -563
- package/dist/node_modules/.pnpm/@radix-ui_react-menubar@1.1_52e1207bf5981387ca85fb7a6f7b2195/node_modules/@radix-ui/react-menubar/dist/index.js +0 -312
- package/dist/node_modules/.pnpm/@radix-ui_react-navigation-_ce246f1abffb4c1bd00bc4d15b1887f5/node_modules/@radix-ui/react-navigation-menu/dist/index.js +0 -553
- package/dist/node_modules/.pnpm/@radix-ui_react-popover@1.1_0f96f9f03b66af70568af721c965c5cd/node_modules/@radix-ui/react-popover/dist/index.js +0 -199
- package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.3._bd7668c1d3a757f9e8c97f0d7e635b5d/node_modules/@radix-ui/react-popper/dist/index.js +0 -203
- package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1._32b1caf40ac61f8d30d412d28d60b4ca/node_modules/@radix-ui/react-portal/dist/index.js +0 -19
- package/dist/node_modules/.pnpm/@radix-ui_react-presence@1._dc6e30df35507eb8a116c12c3da26e18/node_modules/@radix-ui/react-presence/dist/index.js +0 -85
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2_9b6ae4cdaf3918ddbf0b21069e38e2ef/node_modules/@radix-ui/react-primitive/dist/index.js +0 -41
- package/dist/node_modules/.pnpm/@radix-ui_react-progress@1._4cd7f31ebaa5416f0f0f54265ec22793/node_modules/@radix-ui/react-progress/dist/index.js +0 -71
- package/dist/node_modules/.pnpm/@radix-ui_react-radio-group_385226f717d657e4aea3688d6214f1c0/node_modules/@radix-ui/react-radio-group/dist/index.js +0 -249
- package/dist/node_modules/.pnpm/@radix-ui_react-roving-focu_d783d3abe701a7f2fb2c68867b8f1f65/node_modules/@radix-ui/react-roving-focus/dist/index.js +0 -154
- package/dist/node_modules/.pnpm/@radix-ui_react-select@2.3._b9232b5aa23e604443839e7a081b7527/node_modules/@radix-ui/react-select/dist/index.js +0 -727
- package/dist/node_modules/.pnpm/@radix-ui_react-separator@1_f5efb6a4d38fd7cb82808cb6f7a6326a/node_modules/@radix-ui/react-separator/dist/index.js +0 -23
- package/dist/node_modules/.pnpm/@radix-ui_react-slider@1.4._cfb70bb4d45c3eedb16b2d4d4cf80f46/node_modules/@radix-ui/react-slider/dist/index.js +0 -404
- 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 +0 -71
- package/dist/node_modules/.pnpm/@radix-ui_react-switch@1.3._d2f9574497ecbe08e0e7c2298fb35dc1/node_modules/@radix-ui/react-switch/dist/index.js +0 -138
- package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.14_769bbb0130198553b196f258bd99ab92/node_modules/@radix-ui/react-tabs/dist/index.js +0 -120
- package/dist/node_modules/.pnpm/@radix-ui_react-toggle-grou_9d4cd233d31c4687b287c174e894620a/node_modules/@radix-ui/react-toggle-group/dist/index.js +0 -125
- package/dist/node_modules/.pnpm/@radix-ui_react-toggle@1.1._afb5f705be3deb4ba78b89b6c70d5cf9/node_modules/@radix-ui/react-toggle/dist/index.js +0 -30
- package/dist/node_modules/.pnpm/@radix-ui_react-tooltip@1.2_02a5bba0cb45f3ddbe548efab47eabcc/node_modules/@radix-ui/react-tooltip/dist/index.js +0 -351
- package/dist/node_modules/.pnpm/@radix-ui_react-use-callbac_5106d65c013fadfe178f87486239c7af/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +0 -10
- package/dist/node_modules/.pnpm/@radix-ui_react-use-control_e3b0d353471f209a120bf58c8d35c552/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -45
- package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-_c83bcf92add652965a36806e6d79891c/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +0 -14
- package/dist/node_modules/.pnpm/@radix-ui_react-use-is-hydr_d8b55bd05f5d50f7ea21f52744760552/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +0 -19
- package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-_ad41f999ca2019252b887df955038ce1/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +0 -5
- package/dist/node_modules/.pnpm/@radix-ui_react-use-previou_58b78c95af3b98dc4c1bc8bce73c779d/node_modules/@radix-ui/react-use-previous/dist/index.js +0 -11
- package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1._4b75a7cfb879b922004e7a6caa492077/node_modules/@radix-ui/react-use-size/dist/index.js +0 -29
- package/dist/node_modules/.pnpm/@radix-ui_react-visually-hi_fbf0dd0d68bb58b2410fc7a153ed1d9c/node_modules/@radix-ui/react-visually-hidden/dist/index.js +0 -27
- package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js +0 -46
- package/dist/node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js +0 -33
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js +0 -7
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3_24279af7608b4a4e9fe00320b3c0cae7/node_modules/react-remove-scroll-bar/dist/es2015/component.js +0 -70
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3_24279af7608b4a4e9fe00320b3c0cae7/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +0 -4
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3_24279af7608b4a4e9fe00320b3c0cae7/node_modules/react-remove-scroll-bar/dist/es2015/index.js +0 -3
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3_24279af7608b4a4e9fe00320b3c0cae7/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +0 -27
- 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 +0 -14
- 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 +0 -116
- 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 +0 -52
- 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 +0 -13
- 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 +0 -52
- 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 +0 -5
- 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 +0 -7
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_64be49a27fe392764e1764f59e110241/node_modules/react-style-singleton/dist/es2015/component.js +0 -11
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_64be49a27fe392764e1764f59e110241/node_modules/react-style-singleton/dist/es2015/hook.js +0 -15
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_64be49a27fe392764e1764f59e110241/node_modules/react-style-singleton/dist/es2015/index.js +0 -3
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_64be49a27fe392764e1764f59e110241/node_modules/react-style-singleton/dist/es2015/singleton.js +0 -28
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +0 -19
- 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 +0 -6
- 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 +0 -26
- 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 +0 -22
- 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 +0 -16
- 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 +0 -69
- package/dist/src/components/ui/accordion.js +0 -44
- package/dist/src/components/ui/alert-dialog.js +0 -61
- package/dist/src/components/ui/aspect-ratio.js +0 -6
- package/dist/src/components/ui/avatar.js +0 -29
- package/dist/src/components/ui/breadcrumb.js +0 -60
- package/dist/src/components/ui/button-group.js +0 -38
- package/dist/src/components/ui/collapsible.js +0 -26
- package/dist/src/components/ui/form.js +0 -76
- package/dist/src/components/ui/item.js +0 -116
- package/dist/src/components/ui/menubar.js +0 -105
- package/dist/src/components/ui/navigation-menu.js +0 -58
- package/dist/src/components/ui/popover.js +0 -36
- package/dist/src/components/ui/progress.js +0 -20
- package/dist/src/components/ui/toggle-group.js +0 -44
- package/dist/src/components/ui/tooltip.js +0 -37
- /package/dist/{src/components → components}/ui/accessibility-improvements.js +0 -0
- /package/dist/{src/components → components}/ui/card.js +0 -0
- /package/dist/{src/components → components}/ui/chart.js +0 -0
- /package/dist/{src/components → components}/ui/color-picker.js +0 -0
- /package/dist/{src/components → components}/ui/drawer.js +0 -0
- /package/dist/{src/components → components}/ui/input.js +0 -0
- /package/dist/{src/components → components}/ui/kbd.js +0 -0
- /package/dist/{src/components → components}/ui/scroll-area.js +0 -0
- /package/dist/{src/components → components}/ui/skeleton.js +0 -0
- /package/dist/{src/components → components}/ui/sonner.js +0 -0
- /package/dist/{src/components → components}/ui/table.js +0 -0
- /package/dist/{src/components → components}/ui/textarea.js +0 -0
- /package/dist/{src/hooks → hooks}/use-mobile.js +0 -0
- /package/dist/{src/index.js → index.js} +0 -0
- /package/dist/{src/lib → lib}/utils.js +0 -0
|
@@ -1,553 +0,0 @@
|
|
|
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 { createCollection as r } from "../../../../../@radix-ui_react-collection@_9d7b7379fb7a1e56af9d4a8d107ecba8/node_modules/@radix-ui/react-collection/dist/index.js";
|
|
5
|
-
import { composeEventHandlers as i } from "../../../../../@radix-ui_primitive@1.1.4/node_modules/@radix-ui/primitive/dist/index.js";
|
|
6
|
-
import { useLayoutEffect2 as a } from "../../../../../@radix-ui_react-use-layout-_ad41f999ca2019252b887df955038ce1/node_modules/@radix-ui/react-use-layout-effect/dist/index.js";
|
|
7
|
-
import { useControllableState as o } from "../../../../../@radix-ui_react-use-control_e3b0d353471f209a120bf58c8d35c552/node_modules/@radix-ui/react-use-controllable-state/dist/index.js";
|
|
8
|
-
import { Primitive as s, dispatchDiscreteCustomEvent as c } from "../../../../../@radix-ui_react-primitive@2_9b6ae4cdaf3918ddbf0b21069e38e2ef/node_modules/@radix-ui/react-primitive/dist/index.js";
|
|
9
|
-
import { Presence as l } from "../../../../../@radix-ui_react-presence@1._dc6e30df35507eb8a116c12c3da26e18/node_modules/@radix-ui/react-presence/dist/index.js";
|
|
10
|
-
import { useId as u } 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";
|
|
11
|
-
import { useDirection as d } from "../../../../../@radix-ui_react-direction@1_2157d1ab8e201288009ff536bb11c468/node_modules/@radix-ui/react-direction/dist/index.js";
|
|
12
|
-
import { useCallbackRef as f } from "../../../../../@radix-ui_react-use-callbac_5106d65c013fadfe178f87486239c7af/node_modules/@radix-ui/react-use-callback-ref/dist/index.js";
|
|
13
|
-
import { DismissableLayer as p } from "../../../../../@radix-ui_react-dismissable_1202449cfd75d4d3d4e876187986c0d8/node_modules/@radix-ui/react-dismissable-layer/dist/index.js";
|
|
14
|
-
import { Root as m } from "../../../../../@radix-ui_react-visually-hi_fbf0dd0d68bb58b2410fc7a153ed1d9c/node_modules/@radix-ui/react-visually-hidden/dist/index.js";
|
|
15
|
-
import { usePrevious as h } from "../../../../../@radix-ui_react-use-previou_58b78c95af3b98dc4c1bc8bce73c779d/node_modules/@radix-ui/react-use-previous/dist/index.js";
|
|
16
|
-
import * as g from "react";
|
|
17
|
-
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
18
|
-
import * as b from "react-dom";
|
|
19
|
-
//#region node_modules/.pnpm/@radix-ui+react-navigation-_ce246f1abffb4c1bd00bc4d15b1887f5/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs
|
|
20
|
-
var x = "NavigationMenu", [S, C, w] = r(x), [T, E, D] = r(x), [O, k] = e(x, [w, D]), [A, j] = O(x), [ee, te] = O(x), M = g.forwardRef((e, t) => {
|
|
21
|
-
let { __scopeNavigationMenu: r, value: i, onValueChange: a, defaultValue: c, delayDuration: l = 200, skipDelayDuration: u = 300, orientation: f = "horizontal", dir: p, ...m } = e, [h, _] = g.useState(null), y = n(t, (e) => _(e)), b = d(p), S = g.useRef(0), C = g.useRef(0), w = g.useRef(0), [T, E] = g.useState(!0), [D, O] = o({
|
|
22
|
-
prop: i,
|
|
23
|
-
onChange: (e) => {
|
|
24
|
-
let t = e !== "", n = u > 0;
|
|
25
|
-
t ? (window.clearTimeout(w.current), n && E(!1)) : (window.clearTimeout(w.current), w.current = window.setTimeout(() => E(!0), u)), a?.(e);
|
|
26
|
-
},
|
|
27
|
-
defaultProp: c ?? "",
|
|
28
|
-
caller: x
|
|
29
|
-
}), k = g.useCallback(() => {
|
|
30
|
-
window.clearTimeout(C.current), C.current = window.setTimeout(() => O(""), 150);
|
|
31
|
-
}, [O]), A = g.useCallback((e) => {
|
|
32
|
-
window.clearTimeout(C.current), O(e);
|
|
33
|
-
}, [O]), j = g.useCallback((e) => {
|
|
34
|
-
D === e ? window.clearTimeout(C.current) : S.current = window.setTimeout(() => {
|
|
35
|
-
window.clearTimeout(C.current), O(e);
|
|
36
|
-
}, l);
|
|
37
|
-
}, [
|
|
38
|
-
D,
|
|
39
|
-
O,
|
|
40
|
-
l
|
|
41
|
-
]);
|
|
42
|
-
return g.useEffect(() => () => {
|
|
43
|
-
window.clearTimeout(S.current), window.clearTimeout(C.current), window.clearTimeout(w.current);
|
|
44
|
-
}, []), /* @__PURE__ */ v(re, {
|
|
45
|
-
scope: r,
|
|
46
|
-
isRootMenu: !0,
|
|
47
|
-
value: D,
|
|
48
|
-
dir: b,
|
|
49
|
-
orientation: f,
|
|
50
|
-
rootNavigationMenu: h,
|
|
51
|
-
onTriggerEnter: (e) => {
|
|
52
|
-
window.clearTimeout(S.current), T ? j(e) : A(e);
|
|
53
|
-
},
|
|
54
|
-
onTriggerLeave: () => {
|
|
55
|
-
window.clearTimeout(S.current), k();
|
|
56
|
-
},
|
|
57
|
-
onContentEnter: () => window.clearTimeout(C.current),
|
|
58
|
-
onContentLeave: k,
|
|
59
|
-
onItemSelect: (e) => {
|
|
60
|
-
O((t) => t === e ? "" : e);
|
|
61
|
-
},
|
|
62
|
-
onItemDismiss: () => O(""),
|
|
63
|
-
children: /* @__PURE__ */ v(s.nav, {
|
|
64
|
-
"aria-label": "Main",
|
|
65
|
-
"data-orientation": f,
|
|
66
|
-
dir: b,
|
|
67
|
-
...m,
|
|
68
|
-
ref: y
|
|
69
|
-
})
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
M.displayName = x;
|
|
73
|
-
var N = "NavigationMenuSub", ne = g.forwardRef((e, t) => {
|
|
74
|
-
let { __scopeNavigationMenu: n, value: r, onValueChange: i, defaultValue: a, orientation: c = "horizontal", ...l } = e, u = j(N, n), [d, f] = o({
|
|
75
|
-
prop: r,
|
|
76
|
-
onChange: i,
|
|
77
|
-
defaultProp: a ?? "",
|
|
78
|
-
caller: N
|
|
79
|
-
});
|
|
80
|
-
return /* @__PURE__ */ v(re, {
|
|
81
|
-
scope: n,
|
|
82
|
-
isRootMenu: !1,
|
|
83
|
-
value: d,
|
|
84
|
-
dir: u.dir,
|
|
85
|
-
orientation: c,
|
|
86
|
-
rootNavigationMenu: u.rootNavigationMenu,
|
|
87
|
-
onTriggerEnter: (e) => f(e),
|
|
88
|
-
onItemSelect: (e) => f(e),
|
|
89
|
-
onItemDismiss: () => f(""),
|
|
90
|
-
children: /* @__PURE__ */ v(s.div, {
|
|
91
|
-
"data-orientation": c,
|
|
92
|
-
...l,
|
|
93
|
-
ref: t
|
|
94
|
-
})
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
ne.displayName = N;
|
|
98
|
-
var re = (e) => {
|
|
99
|
-
let { scope: t, isRootMenu: n, rootNavigationMenu: r, dir: i, orientation: a, children: o, value: s, onItemSelect: c, onItemDismiss: l, onTriggerEnter: d, onTriggerLeave: p, onContentEnter: m, onContentLeave: _ } = e, [y, b] = g.useState(null), [x, C] = g.useState(/* @__PURE__ */ new Map()), [w, T] = g.useState(null);
|
|
100
|
-
return /* @__PURE__ */ v(A, {
|
|
101
|
-
scope: t,
|
|
102
|
-
isRootMenu: n,
|
|
103
|
-
rootNavigationMenu: r,
|
|
104
|
-
value: s,
|
|
105
|
-
previousValue: h(s),
|
|
106
|
-
baseId: u(),
|
|
107
|
-
dir: i,
|
|
108
|
-
orientation: a,
|
|
109
|
-
viewport: y,
|
|
110
|
-
onViewportChange: b,
|
|
111
|
-
indicatorTrack: w,
|
|
112
|
-
onIndicatorTrackChange: T,
|
|
113
|
-
onTriggerEnter: f(d),
|
|
114
|
-
onTriggerLeave: f(p),
|
|
115
|
-
onContentEnter: f(m),
|
|
116
|
-
onContentLeave: f(_),
|
|
117
|
-
onItemSelect: f(c),
|
|
118
|
-
onItemDismiss: f(l),
|
|
119
|
-
onViewportContentChange: g.useCallback((e, t) => {
|
|
120
|
-
C((n) => (n.set(e, t), new Map(n)));
|
|
121
|
-
}, []),
|
|
122
|
-
onViewportContentRemove: g.useCallback((e) => {
|
|
123
|
-
C((t) => t.has(e) ? (t.delete(e), new Map(t)) : t);
|
|
124
|
-
}, []),
|
|
125
|
-
children: /* @__PURE__ */ v(S.Provider, {
|
|
126
|
-
scope: t,
|
|
127
|
-
children: /* @__PURE__ */ v(ee, {
|
|
128
|
-
scope: t,
|
|
129
|
-
items: x,
|
|
130
|
-
children: o
|
|
131
|
-
})
|
|
132
|
-
})
|
|
133
|
-
});
|
|
134
|
-
}, ie = "NavigationMenuList", ae = g.forwardRef((e, t) => {
|
|
135
|
-
let { __scopeNavigationMenu: n, ...r } = e, i = j(ie, n), a = /* @__PURE__ */ v(s.ul, {
|
|
136
|
-
"data-orientation": i.orientation,
|
|
137
|
-
...r,
|
|
138
|
-
ref: t
|
|
139
|
-
});
|
|
140
|
-
return /* @__PURE__ */ v(s.div, {
|
|
141
|
-
style: { position: "relative" },
|
|
142
|
-
ref: i.onIndicatorTrackChange,
|
|
143
|
-
children: /* @__PURE__ */ v(S.Slot, {
|
|
144
|
-
scope: n,
|
|
145
|
-
children: i.isRootMenu ? /* @__PURE__ */ v(q, {
|
|
146
|
-
asChild: !0,
|
|
147
|
-
children: a
|
|
148
|
-
}) : a
|
|
149
|
-
})
|
|
150
|
-
});
|
|
151
|
-
});
|
|
152
|
-
ae.displayName = ie;
|
|
153
|
-
var oe = "NavigationMenuItem", [se, P] = O(oe), F = g.forwardRef((e, t) => {
|
|
154
|
-
let { __scopeNavigationMenu: n, value: r, ...i } = e, a = u(), o = r || a || "LEGACY_REACT_AUTO_VALUE", c = g.useRef(null), l = g.useRef(null), d = g.useRef(null), f = g.useRef(() => {}), p = g.useRef(!1), m = g.useCallback((e = "start") => {
|
|
155
|
-
if (c.current) {
|
|
156
|
-
f.current();
|
|
157
|
-
let t = Y(c.current);
|
|
158
|
-
t.length && X(e === "start" ? t : t.reverse());
|
|
159
|
-
}
|
|
160
|
-
}, []), h = g.useCallback(() => {
|
|
161
|
-
if (c.current) {
|
|
162
|
-
let e = Y(c.current);
|
|
163
|
-
e.length && (f.current = ge(e));
|
|
164
|
-
}
|
|
165
|
-
}, []);
|
|
166
|
-
return /* @__PURE__ */ v(se, {
|
|
167
|
-
scope: n,
|
|
168
|
-
value: o,
|
|
169
|
-
triggerRef: l,
|
|
170
|
-
contentRef: c,
|
|
171
|
-
focusProxyRef: d,
|
|
172
|
-
wasEscapeCloseRef: p,
|
|
173
|
-
onEntryKeyDown: m,
|
|
174
|
-
onFocusProxyEnter: m,
|
|
175
|
-
onRootContentClose: h,
|
|
176
|
-
onContentFocusOutside: h,
|
|
177
|
-
children: /* @__PURE__ */ v(s.li, {
|
|
178
|
-
...i,
|
|
179
|
-
ref: t
|
|
180
|
-
})
|
|
181
|
-
});
|
|
182
|
-
});
|
|
183
|
-
F.displayName = oe;
|
|
184
|
-
var I = "NavigationMenuTrigger", L = g.forwardRef((e, t) => {
|
|
185
|
-
let { __scopeNavigationMenu: r, disabled: a, ...o } = e, c = j(I, e.__scopeNavigationMenu), l = P(I, e.__scopeNavigationMenu), u = g.useRef(null), d = n(u, l.triggerRef, t), f = _e(c.baseId, l.value), p = ve(c.baseId, l.value), h = g.useRef(!1), b = g.useRef(!1), x = l.value === c.value;
|
|
186
|
-
return /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(S.ItemSlot, {
|
|
187
|
-
scope: r,
|
|
188
|
-
value: l.value,
|
|
189
|
-
children: /* @__PURE__ */ v(he, {
|
|
190
|
-
asChild: !0,
|
|
191
|
-
children: /* @__PURE__ */ v(s.button, {
|
|
192
|
-
id: f,
|
|
193
|
-
disabled: a,
|
|
194
|
-
"data-disabled": a ? "" : void 0,
|
|
195
|
-
"data-state": Q(x),
|
|
196
|
-
"aria-expanded": x,
|
|
197
|
-
"aria-controls": x ? p : void 0,
|
|
198
|
-
...o,
|
|
199
|
-
ref: d,
|
|
200
|
-
onPointerEnter: i(e.onPointerEnter, () => {
|
|
201
|
-
b.current = !1, l.wasEscapeCloseRef.current = !1;
|
|
202
|
-
}),
|
|
203
|
-
onPointerMove: i(e.onPointerMove, $(() => {
|
|
204
|
-
a || b.current || l.wasEscapeCloseRef.current || h.current || (c.onTriggerEnter(l.value), h.current = !0);
|
|
205
|
-
})),
|
|
206
|
-
onPointerLeave: i(e.onPointerLeave, $(() => {
|
|
207
|
-
a || (c.onTriggerLeave(), h.current = !1);
|
|
208
|
-
})),
|
|
209
|
-
onClick: i(e.onClick, () => {
|
|
210
|
-
c.onItemSelect(l.value), b.current = x;
|
|
211
|
-
}),
|
|
212
|
-
onKeyDown: i(e.onKeyDown, (e) => {
|
|
213
|
-
let t = {
|
|
214
|
-
horizontal: "ArrowDown",
|
|
215
|
-
vertical: c.dir === "rtl" ? "ArrowLeft" : "ArrowRight"
|
|
216
|
-
}[c.orientation];
|
|
217
|
-
x && e.key === t && (l.onEntryKeyDown(), e.preventDefault());
|
|
218
|
-
})
|
|
219
|
-
})
|
|
220
|
-
})
|
|
221
|
-
}), x && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(m, {
|
|
222
|
-
"aria-hidden": !0,
|
|
223
|
-
tabIndex: 0,
|
|
224
|
-
ref: l.focusProxyRef,
|
|
225
|
-
onFocus: (e) => {
|
|
226
|
-
let t = l.contentRef.current, n = e.relatedTarget, r = n === u.current, i = t?.contains(n);
|
|
227
|
-
(r || !i) && l.onFocusProxyEnter(r ? "start" : "end");
|
|
228
|
-
}
|
|
229
|
-
}), c.viewport && /* @__PURE__ */ v("span", { "aria-owns": p })] })] });
|
|
230
|
-
});
|
|
231
|
-
L.displayName = I;
|
|
232
|
-
var ce = "NavigationMenuLink", R = "navigationMenu.linkSelect", z = g.forwardRef((e, t) => {
|
|
233
|
-
let { __scopeNavigationMenu: n, active: r, onSelect: a, ...o } = e;
|
|
234
|
-
return /* @__PURE__ */ v(he, {
|
|
235
|
-
asChild: !0,
|
|
236
|
-
children: /* @__PURE__ */ v(s.a, {
|
|
237
|
-
"data-active": r ? "" : void 0,
|
|
238
|
-
"aria-current": r ? "page" : void 0,
|
|
239
|
-
...o,
|
|
240
|
-
ref: t,
|
|
241
|
-
onClick: i(e.onClick, (e) => {
|
|
242
|
-
let t = e.target, n = new CustomEvent(R, {
|
|
243
|
-
bubbles: !0,
|
|
244
|
-
cancelable: !0
|
|
245
|
-
});
|
|
246
|
-
t.addEventListener(R, (e) => a?.(e), { once: !0 }), c(t, n), !n.defaultPrevented && !e.metaKey && c(t, new CustomEvent(W, {
|
|
247
|
-
bubbles: !0,
|
|
248
|
-
cancelable: !0
|
|
249
|
-
}));
|
|
250
|
-
}, { checkForDefaultPrevented: !1 })
|
|
251
|
-
})
|
|
252
|
-
});
|
|
253
|
-
});
|
|
254
|
-
z.displayName = ce;
|
|
255
|
-
var B = "NavigationMenuIndicator", V = g.forwardRef((e, t) => {
|
|
256
|
-
let { forceMount: n, ...r } = e, i = j(B, e.__scopeNavigationMenu), a = !!i.value;
|
|
257
|
-
return i.indicatorTrack ? b.createPortal(/* @__PURE__ */ v(l, {
|
|
258
|
-
present: n || a,
|
|
259
|
-
children: /* @__PURE__ */ v(le, {
|
|
260
|
-
...r,
|
|
261
|
-
ref: t
|
|
262
|
-
})
|
|
263
|
-
}), i.indicatorTrack) : null;
|
|
264
|
-
});
|
|
265
|
-
V.displayName = B;
|
|
266
|
-
var le = g.forwardRef((e, t) => {
|
|
267
|
-
let { __scopeNavigationMenu: n, ...r } = e, i = j(B, n), a = C(n), [o, c] = g.useState(null), [l, u] = g.useState(null), d = i.orientation === "horizontal", f = !!i.value;
|
|
268
|
-
g.useEffect(() => {
|
|
269
|
-
let e = a().find((e) => e.value === i.value)?.ref.current;
|
|
270
|
-
e && c(e);
|
|
271
|
-
}, [a, i.value]);
|
|
272
|
-
let p = () => {
|
|
273
|
-
o && u({
|
|
274
|
-
size: d ? o.offsetWidth : o.offsetHeight,
|
|
275
|
-
offset: d ? o.offsetLeft : o.offsetTop
|
|
276
|
-
});
|
|
277
|
-
};
|
|
278
|
-
return Z(o, p), Z(i.indicatorTrack, p), l ? /* @__PURE__ */ v(s.div, {
|
|
279
|
-
"aria-hidden": !0,
|
|
280
|
-
"data-state": f ? "visible" : "hidden",
|
|
281
|
-
"data-orientation": i.orientation,
|
|
282
|
-
...r,
|
|
283
|
-
ref: t,
|
|
284
|
-
style: {
|
|
285
|
-
position: "absolute",
|
|
286
|
-
...d ? {
|
|
287
|
-
left: 0,
|
|
288
|
-
width: l.size + "px",
|
|
289
|
-
transform: `translateX(${l.offset}px)`
|
|
290
|
-
} : {
|
|
291
|
-
top: 0,
|
|
292
|
-
height: l.size + "px",
|
|
293
|
-
transform: `translateY(${l.offset}px)`
|
|
294
|
-
},
|
|
295
|
-
...r.style
|
|
296
|
-
}
|
|
297
|
-
}) : null;
|
|
298
|
-
}), H = "NavigationMenuContent", U = g.forwardRef((e, t) => {
|
|
299
|
-
let { forceMount: r, ...a } = e, o = j(H, e.__scopeNavigationMenu), s = P(H, e.__scopeNavigationMenu), c = n(s.contentRef, t), u = s.value === o.value, d = {
|
|
300
|
-
value: s.value,
|
|
301
|
-
triggerRef: s.triggerRef,
|
|
302
|
-
focusProxyRef: s.focusProxyRef,
|
|
303
|
-
wasEscapeCloseRef: s.wasEscapeCloseRef,
|
|
304
|
-
onContentFocusOutside: s.onContentFocusOutside,
|
|
305
|
-
onRootContentClose: s.onRootContentClose,
|
|
306
|
-
...a
|
|
307
|
-
};
|
|
308
|
-
return o.viewport ? /* @__PURE__ */ v(ue, {
|
|
309
|
-
forceMount: r,
|
|
310
|
-
...d,
|
|
311
|
-
ref: c
|
|
312
|
-
}) : /* @__PURE__ */ v(l, {
|
|
313
|
-
present: r || u,
|
|
314
|
-
children: /* @__PURE__ */ v(G, {
|
|
315
|
-
"data-state": Q(u),
|
|
316
|
-
...d,
|
|
317
|
-
ref: c,
|
|
318
|
-
onPointerEnter: i(e.onPointerEnter, o.onContentEnter),
|
|
319
|
-
onPointerLeave: i(e.onPointerLeave, $(o.onContentLeave)),
|
|
320
|
-
style: {
|
|
321
|
-
pointerEvents: !u && o.isRootMenu ? "none" : void 0,
|
|
322
|
-
...d.style
|
|
323
|
-
}
|
|
324
|
-
})
|
|
325
|
-
});
|
|
326
|
-
});
|
|
327
|
-
U.displayName = H;
|
|
328
|
-
var ue = g.forwardRef((e, t) => {
|
|
329
|
-
let { onViewportContentChange: n, onViewportContentRemove: r } = j(H, e.__scopeNavigationMenu);
|
|
330
|
-
return a(() => {
|
|
331
|
-
n(e.value, {
|
|
332
|
-
ref: t,
|
|
333
|
-
...e
|
|
334
|
-
});
|
|
335
|
-
}, [
|
|
336
|
-
e,
|
|
337
|
-
t,
|
|
338
|
-
n
|
|
339
|
-
]), a(() => () => r(e.value), [e.value, r]), null;
|
|
340
|
-
}), W = "navigationMenu.rootContentDismiss", G = g.forwardRef((e, t) => {
|
|
341
|
-
let { __scopeNavigationMenu: r, value: a, triggerRef: o, focusProxyRef: s, wasEscapeCloseRef: c, onRootContentClose: l, onContentFocusOutside: u, ...d } = e, f = j(H, r), m = g.useRef(null), h = n(m, t), _ = _e(f.baseId, a), y = ve(f.baseId, a), b = C(r), x = g.useRef(null), { onItemDismiss: S } = f;
|
|
342
|
-
return g.useEffect(() => {
|
|
343
|
-
let e = m.current;
|
|
344
|
-
if (f.isRootMenu && e) {
|
|
345
|
-
let t = () => {
|
|
346
|
-
S(), l(), e.contains(document.activeElement) && o.current?.focus();
|
|
347
|
-
};
|
|
348
|
-
return e.addEventListener(W, t), () => e.removeEventListener(W, t);
|
|
349
|
-
}
|
|
350
|
-
}, [
|
|
351
|
-
f.isRootMenu,
|
|
352
|
-
e.value,
|
|
353
|
-
o,
|
|
354
|
-
S,
|
|
355
|
-
l
|
|
356
|
-
]), /* @__PURE__ */ v(q, {
|
|
357
|
-
asChild: !0,
|
|
358
|
-
children: /* @__PURE__ */ v(p, {
|
|
359
|
-
id: y,
|
|
360
|
-
"aria-labelledby": _,
|
|
361
|
-
"data-motion": g.useMemo(() => {
|
|
362
|
-
let e = b().map((e) => e.value);
|
|
363
|
-
f.dir === "rtl" && e.reverse();
|
|
364
|
-
let t = e.indexOf(f.value), n = e.indexOf(f.previousValue), r = a === f.value, i = n === e.indexOf(a);
|
|
365
|
-
if (!r && !i) return x.current;
|
|
366
|
-
let o = (() => {
|
|
367
|
-
if (t !== n) {
|
|
368
|
-
if (r && n !== -1) return t > n ? "from-end" : "from-start";
|
|
369
|
-
if (i && t !== -1) return t > n ? "to-start" : "to-end";
|
|
370
|
-
}
|
|
371
|
-
return null;
|
|
372
|
-
})();
|
|
373
|
-
return x.current = o, o;
|
|
374
|
-
}, [
|
|
375
|
-
f.previousValue,
|
|
376
|
-
f.value,
|
|
377
|
-
f.dir,
|
|
378
|
-
b,
|
|
379
|
-
a
|
|
380
|
-
]),
|
|
381
|
-
"data-orientation": f.orientation,
|
|
382
|
-
...d,
|
|
383
|
-
ref: h,
|
|
384
|
-
disableOutsidePointerEvents: !1,
|
|
385
|
-
onDismiss: () => {
|
|
386
|
-
let e = new Event(W, {
|
|
387
|
-
bubbles: !0,
|
|
388
|
-
cancelable: !0
|
|
389
|
-
});
|
|
390
|
-
m.current?.dispatchEvent(e);
|
|
391
|
-
},
|
|
392
|
-
onFocusOutside: i(e.onFocusOutside, (e) => {
|
|
393
|
-
u();
|
|
394
|
-
let t = e.target;
|
|
395
|
-
f.rootNavigationMenu?.contains(t) && e.preventDefault();
|
|
396
|
-
}),
|
|
397
|
-
onPointerDownOutside: i(e.onPointerDownOutside, (e) => {
|
|
398
|
-
let t = e.target, n = b().some((e) => e.ref.current?.contains(t)), r = f.isRootMenu && f.viewport?.contains(t);
|
|
399
|
-
(n || r || !f.isRootMenu) && e.preventDefault();
|
|
400
|
-
}),
|
|
401
|
-
onKeyDown: i(e.onKeyDown, (e) => {
|
|
402
|
-
let t = e.altKey || e.ctrlKey || e.metaKey;
|
|
403
|
-
if (e.key === "Tab" && !t) {
|
|
404
|
-
let t = Y(e.currentTarget), n = document.activeElement, r = t.findIndex((e) => e === n);
|
|
405
|
-
X(e.shiftKey ? t.slice(0, r).reverse() : t.slice(r + 1, t.length)) ? e.preventDefault() : s.current?.focus();
|
|
406
|
-
}
|
|
407
|
-
}),
|
|
408
|
-
onEscapeKeyDown: i(e.onEscapeKeyDown, (e) => {
|
|
409
|
-
c.current = !0;
|
|
410
|
-
})
|
|
411
|
-
})
|
|
412
|
-
});
|
|
413
|
-
}), K = "NavigationMenuViewport", de = g.forwardRef((e, t) => {
|
|
414
|
-
let { forceMount: n, ...r } = e, i = !!j(K, e.__scopeNavigationMenu).value;
|
|
415
|
-
return /* @__PURE__ */ v(l, {
|
|
416
|
-
present: n || i,
|
|
417
|
-
children: /* @__PURE__ */ v(fe, {
|
|
418
|
-
...r,
|
|
419
|
-
ref: t
|
|
420
|
-
})
|
|
421
|
-
});
|
|
422
|
-
});
|
|
423
|
-
de.displayName = K;
|
|
424
|
-
var fe = g.forwardRef((e, r) => {
|
|
425
|
-
let { __scopeNavigationMenu: a, children: o, ...c } = e, u = j(K, a), d = n(r, u.onViewportChange), f = te(H, e.__scopeNavigationMenu), [p, m] = g.useState(null), [h, _] = g.useState(null), y = p ? p?.width + "px" : void 0, b = p ? p?.height + "px" : void 0, x = !!u.value, S = x ? u.value : u.previousValue;
|
|
426
|
-
return Z(h, () => {
|
|
427
|
-
h && m({
|
|
428
|
-
width: h.offsetWidth,
|
|
429
|
-
height: h.offsetHeight
|
|
430
|
-
});
|
|
431
|
-
}), /* @__PURE__ */ v(s.div, {
|
|
432
|
-
"data-state": Q(x),
|
|
433
|
-
"data-orientation": u.orientation,
|
|
434
|
-
...c,
|
|
435
|
-
ref: d,
|
|
436
|
-
style: {
|
|
437
|
-
pointerEvents: !x && u.isRootMenu ? "none" : void 0,
|
|
438
|
-
"--radix-navigation-menu-viewport-width": y,
|
|
439
|
-
"--radix-navigation-menu-viewport-height": b,
|
|
440
|
-
...c.style
|
|
441
|
-
},
|
|
442
|
-
onPointerEnter: i(e.onPointerEnter, u.onContentEnter),
|
|
443
|
-
onPointerLeave: i(e.onPointerLeave, $(u.onContentLeave)),
|
|
444
|
-
children: Array.from(f.items).map(([e, { ref: n, forceMount: r, ...i }]) => {
|
|
445
|
-
let a = S === e;
|
|
446
|
-
return /* @__PURE__ */ v(l, {
|
|
447
|
-
present: r || a,
|
|
448
|
-
children: /* @__PURE__ */ v(G, {
|
|
449
|
-
...i,
|
|
450
|
-
ref: t(n, (e) => {
|
|
451
|
-
a && e && _(e);
|
|
452
|
-
})
|
|
453
|
-
})
|
|
454
|
-
}, e);
|
|
455
|
-
})
|
|
456
|
-
});
|
|
457
|
-
}), pe = "FocusGroup", q = g.forwardRef((e, t) => {
|
|
458
|
-
let { __scopeNavigationMenu: n, ...r } = e, i = j(pe, n);
|
|
459
|
-
return /* @__PURE__ */ v(T.Provider, {
|
|
460
|
-
scope: n,
|
|
461
|
-
children: /* @__PURE__ */ v(T.Slot, {
|
|
462
|
-
scope: n,
|
|
463
|
-
children: /* @__PURE__ */ v(s.div, {
|
|
464
|
-
dir: i.dir,
|
|
465
|
-
...r,
|
|
466
|
-
ref: t
|
|
467
|
-
})
|
|
468
|
-
})
|
|
469
|
-
});
|
|
470
|
-
}), J = [
|
|
471
|
-
"ArrowRight",
|
|
472
|
-
"ArrowLeft",
|
|
473
|
-
"ArrowUp",
|
|
474
|
-
"ArrowDown"
|
|
475
|
-
], me = "FocusGroupItem", he = g.forwardRef((e, t) => {
|
|
476
|
-
let { __scopeNavigationMenu: n, ...r } = e, a = E(n), o = j(me, n);
|
|
477
|
-
return /* @__PURE__ */ v(T.ItemSlot, {
|
|
478
|
-
scope: n,
|
|
479
|
-
children: /* @__PURE__ */ v(s.button, {
|
|
480
|
-
...r,
|
|
481
|
-
ref: t,
|
|
482
|
-
onKeyDown: i(e.onKeyDown, (e) => {
|
|
483
|
-
if ([
|
|
484
|
-
"Home",
|
|
485
|
-
"End",
|
|
486
|
-
...J
|
|
487
|
-
].includes(e.key)) {
|
|
488
|
-
let t = a().map((e) => e.ref.current);
|
|
489
|
-
if ([
|
|
490
|
-
o.dir === "rtl" ? "ArrowRight" : "ArrowLeft",
|
|
491
|
-
"ArrowUp",
|
|
492
|
-
"End"
|
|
493
|
-
].includes(e.key) && t.reverse(), J.includes(e.key)) {
|
|
494
|
-
let n = t.indexOf(e.currentTarget);
|
|
495
|
-
t = t.slice(n + 1);
|
|
496
|
-
}
|
|
497
|
-
setTimeout(() => X(t)), e.preventDefault();
|
|
498
|
-
}
|
|
499
|
-
})
|
|
500
|
-
})
|
|
501
|
-
});
|
|
502
|
-
});
|
|
503
|
-
function Y(e) {
|
|
504
|
-
let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (e) => {
|
|
505
|
-
let t = e.tagName === "INPUT" && e.type === "hidden";
|
|
506
|
-
return e.disabled || e.hidden || t ? NodeFilter.FILTER_SKIP : e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
507
|
-
} });
|
|
508
|
-
for (; n.nextNode();) t.push(n.currentNode);
|
|
509
|
-
return t;
|
|
510
|
-
}
|
|
511
|
-
function X(e) {
|
|
512
|
-
let t = document.activeElement;
|
|
513
|
-
return e.some((e) => e === t ? !0 : (e.focus(), document.activeElement !== t));
|
|
514
|
-
}
|
|
515
|
-
function ge(e) {
|
|
516
|
-
return e.forEach((e) => {
|
|
517
|
-
e.dataset.tabindex = e.getAttribute("tabindex") || "", e.setAttribute("tabindex", "-1");
|
|
518
|
-
}), () => {
|
|
519
|
-
e.forEach((e) => {
|
|
520
|
-
let t = e.dataset.tabindex;
|
|
521
|
-
e.setAttribute("tabindex", t);
|
|
522
|
-
});
|
|
523
|
-
};
|
|
524
|
-
}
|
|
525
|
-
function Z(e, t) {
|
|
526
|
-
let n = f(t);
|
|
527
|
-
a(() => {
|
|
528
|
-
let t = 0;
|
|
529
|
-
if (e) {
|
|
530
|
-
let r = new ResizeObserver(() => {
|
|
531
|
-
cancelAnimationFrame(t), t = window.requestAnimationFrame(n);
|
|
532
|
-
});
|
|
533
|
-
return r.observe(e), () => {
|
|
534
|
-
window.cancelAnimationFrame(t), r.unobserve(e);
|
|
535
|
-
};
|
|
536
|
-
}
|
|
537
|
-
}, [e, n]);
|
|
538
|
-
}
|
|
539
|
-
function Q(e) {
|
|
540
|
-
return e ? "open" : "closed";
|
|
541
|
-
}
|
|
542
|
-
function _e(e, t) {
|
|
543
|
-
return `${e}-trigger-${t}`;
|
|
544
|
-
}
|
|
545
|
-
function ve(e, t) {
|
|
546
|
-
return `${e}-content-${t}`;
|
|
547
|
-
}
|
|
548
|
-
function $(e) {
|
|
549
|
-
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
550
|
-
}
|
|
551
|
-
var ye = M, be = ae, xe = F, Se = L, Ce = z, we = V, Te = U, Ee = de;
|
|
552
|
-
//#endregion
|
|
553
|
-
export { Te as Content, we as Indicator, xe as Item, Ce as Link, be as List, ye as Root2, Se as Trigger, Ee as Viewport };
|