@gv-tech/ui-web 2.20.0 → 2.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion-Be1vGv6M.js +1 -0
- package/dist/accordion-DXnU0LgU.mjs +221 -0
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.mjs +3 -259
- package/dist/alert-dialog-BXRY0Ghq.js +7 -0
- package/dist/alert-dialog-fcZ-sL7h.mjs +164 -0
- package/dist/alert-dialog.cjs +1 -7
- package/dist/alert-dialog.mjs +4 -171
- package/dist/alert.cjs +1 -1
- package/dist/alert.mjs +35 -32
- package/dist/aspect-ratio-BP5HarYZ.js +1 -0
- package/dist/aspect-ratio-Bp8HMg-1.mjs +33 -0
- package/dist/aspect-ratio.cjs +1 -1
- package/dist/aspect-ratio.mjs +3 -43
- package/dist/avatar-klFl8Sqa.js +1 -0
- package/dist/avatar-vGm9JN1a.mjs +184 -0
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.mjs +3 -205
- package/dist/badge.cjs +1 -1
- package/dist/badge.mjs +21 -24
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.mjs +60 -68
- package/dist/button.cjs +1 -1
- package/dist/button.mjs +40 -40
- package/dist/calendar-aIuSXzs7.js +1 -0
- package/dist/calendar-oitID53a.mjs +3154 -0
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.mjs +4 -2976
- package/dist/card.cjs +1 -1
- package/dist/card.mjs +42 -32
- package/dist/carousel-BjTSkVh9.js +1 -0
- package/dist/carousel-CENzZCXN.mjs +1178 -0
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.mjs +4 -1403
- package/dist/chart.cjs +4 -4
- package/dist/chart.d.ts +3 -35
- package/dist/chart.mjs +123 -182
- package/dist/checkbox-Bwq7mXA2.mjs +170 -0
- package/dist/checkbox-DzEO1q4R.js +1 -0
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.mjs +3 -258
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.mjs +6 -7
- package/dist/command-D7hksKY6.js +1 -0
- package/dist/command-Ws_iF1hM.mjs +531 -0
- package/dist/command.cjs +1 -1
- package/dist/command.mjs +3 -396
- package/dist/context-menu-DJbgNJ7N.js +1 -0
- package/dist/context-menu-fu39gePi.mjs +292 -0
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.mjs +3 -328
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.mjs +50 -66
- package/dist/dist-0FXx-pUX.js +1 -0
- package/dist/dist-4A0ut6a8.mjs +10 -0
- package/dist/dist-ALQAoSGx.mjs +10 -0
- package/dist/dist-B4N_7Tps.js +1 -0
- package/dist/dist-B5776DvK.js +5 -0
- package/dist/dist-B57mzJP3.mjs +28 -0
- package/dist/dist-B5VmV2K7.js +1 -0
- package/dist/dist-BBRD-Qfb.js +1 -0
- package/dist/dist-BC_VB6JL.mjs +25 -0
- package/dist/dist-BKFtvTm8.mjs +6 -0
- package/dist/dist-BUS_s_6N.js +1 -0
- package/dist/dist-BVKPqhkg.js +1 -0
- package/dist/dist-Ba7mQG9D.mjs +117 -0
- package/dist/dist-BeFCyPgD.js +1 -0
- package/dist/dist-Bf4P28CV.js +1 -0
- package/dist/dist-BfFVoFJN.js +1 -0
- package/dist/dist-BhtQH_6Z.js +1 -0
- package/dist/dist-BmjFh8i_.mjs +5 -0
- package/dist/dist-BrCTkQXt.mjs +62 -0
- package/dist/dist-BxmpAHsT.mjs +219 -0
- package/dist/dist-C2ArLRnq.js +1 -0
- package/dist/dist-C2pRTcV_.mjs +62 -0
- package/dist/dist-C9wnUiS4.mjs +27 -0
- package/dist/dist-CIRItnqs.js +1 -0
- package/dist/dist-CL1DhkaL.js +1 -0
- package/dist/dist-CRe7xawr.js +1 -0
- package/dist/dist-CUFjt0cI.js +1 -0
- package/dist/dist-CaaGWewc.mjs +557 -0
- package/dist/dist-Ci2whnVp.js +1 -0
- package/dist/dist-CmBtqW5f.js +1 -0
- package/dist/dist-CsEsK2jW.js +1 -0
- package/dist/dist-CscAxhT8.js +1 -0
- package/dist/dist-CvtF5JdF.mjs +95 -0
- package/dist/dist-Cvwtowos.mjs +77 -0
- package/dist/dist-D2f83VMO.mjs +73 -0
- package/dist/dist-Dh_jWJh-.mjs +11 -0
- package/dist/dist-DikyKBU3.mjs +12 -0
- package/dist/dist-DmmUjo_P.js +1 -0
- package/dist/dist-DqvQ5UFr.mjs +38 -0
- package/dist/dist-FGQAMrhH.mjs +29 -0
- package/dist/dist-Jtk3jeb9.mjs +18 -0
- package/dist/dist-Kqk0oQYU.js +1 -0
- package/dist/dist-VI9bl_Wk.mjs +45 -0
- package/dist/dist-Z7lEV5Nx.mjs +1282 -0
- package/dist/dist-_Osar3kp.js +1 -0
- package/dist/dist-bDoR0CBU.mjs +112 -0
- package/dist/dist-cRjbOZRf.js +1 -0
- package/dist/dist-d_pecHgw.mjs +66 -0
- package/dist/dist-r36zVVcK.js +1 -0
- package/dist/dist-sRlXdzvf.mjs +152 -0
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.mjs +48 -54
- package/dist/dropdown-menu-BGkQXJ-r.mjs +288 -0
- package/dist/dropdown-menu-uGMnmGL-.js +1 -0
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.mjs +3 -316
- package/dist/es2015-Cx0gpR1a.js +41 -0
- package/dist/es2015-a1b8kENC.mjs +701 -0
- package/dist/form.cjs +1 -1
- package/dist/form.mjs +76 -67
- package/dist/hover-card-DdIYJP-Q.mjs +167 -0
- package/dist/hover-card-Ua-2KlY-.js +1 -0
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.mjs +3 -188
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -35
- package/dist/index.mjs +56 -296
- package/dist/input.cjs +1 -1
- package/dist/input.mjs +14 -19
- package/dist/jsx-runtime-CN3qjQQx.js +6 -0
- package/dist/jsx-runtime-CW53Uo-e.mjs +189 -0
- package/dist/label-8YSUv4kt.js +1 -0
- package/dist/label-Bur66PVg.mjs +22 -0
- package/dist/label.cjs +1 -1
- package/dist/label.mjs +3 -22
- package/dist/menubar-Bq1Sfbf5.js +1 -0
- package/dist/menubar-D2fY6zkQ.mjs +410 -0
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.mjs +3 -473
- package/dist/navigation-menu-BuOakbgA.mjs +602 -0
- package/dist/navigation-menu-so6EvLAY.js +1 -0
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.mjs +3 -673
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.mjs +63 -68
- package/dist/popover-BUADXRkO.mjs +201 -0
- package/dist/popover-nBrSPqHk.js +1 -0
- package/dist/popover.cjs +1 -1
- package/dist/popover.mjs +3 -242
- package/dist/progress-BTApMbqg.js +6 -0
- package/dist/progress-BbN-RNvs.mjs +81 -0
- package/dist/progress.cjs +1 -6
- package/dist/progress.mjs +3 -99
- package/dist/radio-group-C5oprOrt.mjs +193 -0
- package/dist/radio-group-FDXr6VLM.js +1 -0
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.mjs +3 -253
- package/dist/resizable-ChdgCzzx.mjs +1534 -0
- package/dist/resizable-ztiFzq_y.js +1 -0
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.mjs +3 -1990
- package/dist/scroll-area-3o0-cc3n.mjs +520 -0
- package/dist/scroll-area-DXZqIKXN.js +1 -0
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.mjs +3 -546
- package/dist/scroll-to-top.cjs +1 -1
- package/dist/scroll-to-top.mjs +71 -84
- package/dist/search.cjs +1 -1
- package/dist/search.mjs +53 -63
- package/dist/select-B2qM503G.mjs +744 -0
- package/dist/select-BHCeW-MD.js +1 -0
- package/dist/select.cjs +1 -1
- package/dist/select.mjs +3 -908
- package/dist/separator-BZJ-SDvg.js +1 -0
- package/dist/separator-DJ_IwKUQ.mjs +31 -0
- package/dist/separator.cjs +1 -1
- package/dist/separator.mjs +3 -35
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.mjs +59 -66
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.mjs +13 -7
- package/dist/slider-CJJPQ0fH.mjs +366 -0
- package/dist/slider-DHccqrW2.js +1 -0
- package/dist/slider.cjs +1 -1
- package/dist/slider.mjs +3 -442
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.mjs +21 -24
- package/dist/support-fab.cjs +1 -1
- package/dist/support-fab.mjs +81 -117
- package/dist/switch-BbcAUYjl.mjs +103 -0
- package/dist/switch-DZfRzgWs.js +1 -0
- package/dist/switch.cjs +1 -1
- package/dist/switch.mjs +3 -149
- package/dist/table-of-contents.cjs +1 -1
- package/dist/table-of-contents.mjs +159 -155
- package/dist/table.cjs +1 -1
- package/dist/table.mjs +58 -57
- package/dist/tabs-BEy0IIV0.js +1 -0
- package/dist/tabs-DqAKyl9T.mjs +136 -0
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.mjs +3 -195
- package/dist/text.cjs +1 -1
- package/dist/text.mjs +41 -42
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.mjs +12 -17
- package/dist/theme-provider.cjs +1 -1
- package/dist/theme-provider.mjs +15 -7
- package/dist/theme-toggle-DKQmD-FO.js +1 -0
- package/dist/theme-toggle-dQbFWNI8.mjs +65 -0
- package/dist/theme-toggle.cjs +1 -1
- package/dist/theme-toggle.mjs +3 -8
- package/dist/toast-C84Cpidq.js +1 -0
- package/dist/toast-CQbUslcw.mjs +427 -0
- package/dist/toast.cjs +1 -1
- package/dist/toast.mjs +3 -494
- package/dist/toaster-BpcpNRz1.js +1 -0
- package/dist/toaster-i6giQYiq.mjs +126 -0
- package/dist/toaster.cjs +1 -1
- package/dist/toaster.mjs +3 -6
- package/dist/toggle-group-B2S7fkhA.mjs +155 -0
- package/dist/toggle-group-BNn6MNiJ.js +1 -0
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.mjs +3 -170
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.mjs +19 -14
- package/dist/tooltip-CElrNodA.js +1 -0
- package/dist/tooltip-oKfTBTbv.mjs +364 -0
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.mjs +3 -342
- package/dist/utils-BxDanjP7.js +1 -0
- package/dist/utils-yc5uc46c.mjs +11 -0
- package/package.json +2 -2
- package/src/chart.tsx +7 -7
- package/src/setupTests.ts +5 -4
- package/dist/index-0ioNhtNM.mjs +0 -10
- package/dist/index-3j-XAIXT.mjs +0 -55
- package/dist/index-B2XtpfGY.js +0 -1
- package/dist/index-B39Lzq0v.js +0 -1
- package/dist/index-B7n6fy75.js +0 -1
- package/dist/index-B8dxbSWX.js +0 -41
- package/dist/index-BGIK9FQF.js +0 -1
- package/dist/index-BZPx6jYI.mjs +0 -8
- package/dist/index-BoNjHhm4.js +0 -1
- package/dist/index-BtZvtDmp.js +0 -1
- package/dist/index-Bv7qrYW6.mjs +0 -180
- package/dist/index-ByiPJW53.js +0 -5
- package/dist/index-C0dlIQIi.js +0 -1
- package/dist/index-C1qb0595.mjs +0 -27
- package/dist/index-C7HEunrh.mjs +0 -15
- package/dist/index-C8ni3LLa.js +0 -1
- package/dist/index-CCKe-Mpx.mjs +0 -6
- package/dist/index-CD6_IrA-.mjs +0 -10
- package/dist/index-CRyCZJLa.mjs +0 -677
- package/dist/index-CVx1AgNG.mjs +0 -615
- package/dist/index-Ce5TOFAK.js +0 -1
- package/dist/index-CeSLNJ60.mjs +0 -32
- package/dist/index-CefEQe_4.js +0 -1
- package/dist/index-Cj5hzyBi.js +0 -1
- package/dist/index-Cjj_rUPu.js +0 -1
- package/dist/index-Cl3G0jzM.js +0 -1
- package/dist/index-CwfE56Ep.mjs +0 -1545
- package/dist/index-CwyAfCwY.js +0 -1
- package/dist/index-CzY-WZXL.js +0 -1
- package/dist/index-D2HnlO3y.js +0 -1
- package/dist/index-DFdF7K7v.mjs +0 -50
- package/dist/index-DIsg7zU7.js +0 -1
- package/dist/index-DKN_vhyX.mjs +0 -32
- package/dist/index-DLcqcWxM.mjs +0 -29
- package/dist/index-DSxf1gN6.mjs +0 -118
- package/dist/index-DYxWvftI.js +0 -1
- package/dist/index-DaILh3TV.mjs +0 -32
- package/dist/index-Dfzl8TxY.mjs +0 -136
- package/dist/index-Dko2XdTk.js +0 -1
- package/dist/index-DlY82G31.mjs +0 -245
- package/dist/index-DnFcfnA9.mjs +0 -13
- package/dist/index-IZ2gq03c.mjs +0 -68
- package/dist/index-K9FzbxYw.mjs +0 -93
- package/dist/index-Le8p9oP4.mjs +0 -60
- package/dist/index-MQ0c3ZX_.js +0 -1
- package/dist/index-_XxjJPRD.js +0 -1
- package/dist/index-_wdrnYim.js +0 -1
- package/dist/index-jv3B4mTd.js +0 -1
- package/dist/index-kaM0u2Q1.js +0 -1
- package/dist/index-p6xVFRb4.mjs +0 -52
- package/dist/index-rKs9bXHr.mjs +0 -6
- package/dist/index-vuPgkS0V.mjs +0 -70
- package/dist/jsx-runtime-nZSsnGb7.js +0 -6
- package/dist/jsx-runtime-tc70JA_2.mjs +0 -264
- package/dist/theme-toggle-DXQGNfCe.js +0 -1
- package/dist/theme-toggle-tHXIbr8W.mjs +0 -79
- package/dist/toaster-C_S9hnXa.js +0 -1
- package/dist/toaster-k5DnQSsh.mjs +0 -118
- package/dist/utils-DY6fhrgS.mjs +0 -12
- package/dist/utils-cdbZV8DZ.js +0 -1
|
@@ -0,0 +1,602 @@
|
|
|
1
|
+
import { t as e } from "./jsx-runtime-CW53Uo-e.mjs";
|
|
2
|
+
import { t } from "./utils-yc5uc46c.mjs";
|
|
3
|
+
import { n } from "./dist-Cvwtowos.mjs";
|
|
4
|
+
import { n as r, t as i } from "./dist-BC_VB6JL.mjs";
|
|
5
|
+
import { n as a, r as o, t as s } from "./dist-bDoR0CBU.mjs";
|
|
6
|
+
import { t as c } from "./dist-BrCTkQXt.mjs";
|
|
7
|
+
import { t as l } from "./dist-BmjFh8i_.mjs";
|
|
8
|
+
import { t as u } from "./dist-VI9bl_Wk.mjs";
|
|
9
|
+
import { t as d } from "./dist-d_pecHgw.mjs";
|
|
10
|
+
import { t as f } from "./dist-DikyKBU3.mjs";
|
|
11
|
+
import { t as p } from "./dist-4A0ut6a8.mjs";
|
|
12
|
+
import { t as m } from "./dist-ALQAoSGx.mjs";
|
|
13
|
+
import { n as h } from "./dist-Ba7mQG9D.mjs";
|
|
14
|
+
import { t as g } from "./dist-Dh_jWJh-.mjs";
|
|
15
|
+
import { t as _ } from "./dist-C9wnUiS4.mjs";
|
|
16
|
+
import * as v from "react";
|
|
17
|
+
import y from "react-dom";
|
|
18
|
+
import { ChevronDown as b } from "lucide-react";
|
|
19
|
+
import { cva as x } from "class-variance-authority";
|
|
20
|
+
//#region ../../node_modules/.bun/@radix-ui+react-navigation-menu@1.2.14+2d3f272c3a65784a/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs
|
|
21
|
+
var S = e(), C = "NavigationMenu", [w, T, E] = c(C), [D, O, k] = c(C), [A, ee] = n(C, [E, k]), [te, j] = A(C), [ne, re] = A(C), M = v.forwardRef((e, t) => {
|
|
22
|
+
let { __scopeNavigationMenu: n, value: i, onValueChange: a, defaultValue: o, delayDuration: c = 200, skipDelayDuration: l = 300, orientation: d = "horizontal", dir: f, ...m } = e, [h, g] = v.useState(null), _ = r(t, (e) => g(e)), y = p(f), b = v.useRef(0), x = v.useRef(0), w = v.useRef(0), [T, E] = v.useState(!0), [D, O] = u({
|
|
23
|
+
prop: i,
|
|
24
|
+
onChange: (e) => {
|
|
25
|
+
let t = e !== "", n = l > 0;
|
|
26
|
+
t ? (window.clearTimeout(w.current), n && E(!1)) : (window.clearTimeout(w.current), w.current = window.setTimeout(() => E(!0), l)), a?.(e);
|
|
27
|
+
},
|
|
28
|
+
defaultProp: o ?? "",
|
|
29
|
+
caller: C
|
|
30
|
+
}), k = v.useCallback(() => {
|
|
31
|
+
window.clearTimeout(x.current), x.current = window.setTimeout(() => O(""), 150);
|
|
32
|
+
}, [O]), A = v.useCallback((e) => {
|
|
33
|
+
window.clearTimeout(x.current), O(e);
|
|
34
|
+
}, [O]), ee = v.useCallback((e) => {
|
|
35
|
+
D === e ? window.clearTimeout(x.current) : b.current = window.setTimeout(() => {
|
|
36
|
+
window.clearTimeout(x.current), O(e);
|
|
37
|
+
}, c);
|
|
38
|
+
}, [
|
|
39
|
+
D,
|
|
40
|
+
O,
|
|
41
|
+
c
|
|
42
|
+
]);
|
|
43
|
+
return v.useEffect(() => () => {
|
|
44
|
+
window.clearTimeout(b.current), window.clearTimeout(x.current), window.clearTimeout(w.current);
|
|
45
|
+
}, []), /* @__PURE__ */ (0, S.jsx)(ae, {
|
|
46
|
+
scope: n,
|
|
47
|
+
isRootMenu: !0,
|
|
48
|
+
value: D,
|
|
49
|
+
dir: y,
|
|
50
|
+
orientation: d,
|
|
51
|
+
rootNavigationMenu: h,
|
|
52
|
+
onTriggerEnter: (e) => {
|
|
53
|
+
window.clearTimeout(b.current), T ? ee(e) : A(e);
|
|
54
|
+
},
|
|
55
|
+
onTriggerLeave: () => {
|
|
56
|
+
window.clearTimeout(b.current), k();
|
|
57
|
+
},
|
|
58
|
+
onContentEnter: () => window.clearTimeout(x.current),
|
|
59
|
+
onContentLeave: k,
|
|
60
|
+
onItemSelect: (e) => {
|
|
61
|
+
O((t) => t === e ? "" : e);
|
|
62
|
+
},
|
|
63
|
+
onItemDismiss: () => O(""),
|
|
64
|
+
children: /* @__PURE__ */ (0, S.jsx)(s.nav, {
|
|
65
|
+
"aria-label": "Main",
|
|
66
|
+
"data-orientation": d,
|
|
67
|
+
dir: y,
|
|
68
|
+
...m,
|
|
69
|
+
ref: _
|
|
70
|
+
})
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
M.displayName = C;
|
|
74
|
+
var N = "NavigationMenuSub", ie = v.forwardRef((e, t) => {
|
|
75
|
+
let { __scopeNavigationMenu: n, value: r, onValueChange: i, defaultValue: a, orientation: o = "horizontal", ...c } = e, l = j(N, n), [d, f] = u({
|
|
76
|
+
prop: r,
|
|
77
|
+
onChange: i,
|
|
78
|
+
defaultProp: a ?? "",
|
|
79
|
+
caller: N
|
|
80
|
+
});
|
|
81
|
+
return /* @__PURE__ */ (0, S.jsx)(ae, {
|
|
82
|
+
scope: n,
|
|
83
|
+
isRootMenu: !1,
|
|
84
|
+
value: d,
|
|
85
|
+
dir: l.dir,
|
|
86
|
+
orientation: o,
|
|
87
|
+
rootNavigationMenu: l.rootNavigationMenu,
|
|
88
|
+
onTriggerEnter: (e) => f(e),
|
|
89
|
+
onItemSelect: (e) => f(e),
|
|
90
|
+
onItemDismiss: () => f(""),
|
|
91
|
+
children: /* @__PURE__ */ (0, S.jsx)(s.div, {
|
|
92
|
+
"data-orientation": o,
|
|
93
|
+
...c,
|
|
94
|
+
ref: t
|
|
95
|
+
})
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
ie.displayName = N;
|
|
99
|
+
var ae = (e) => {
|
|
100
|
+
let { scope: t, isRootMenu: n, rootNavigationMenu: r, dir: i, orientation: a, children: o, value: s, onItemSelect: c, onItemDismiss: l, onTriggerEnter: u, onTriggerLeave: d, onContentEnter: p, onContentLeave: h } = e, [_, y] = v.useState(null), [b, x] = v.useState(/* @__PURE__ */ new Map()), [C, T] = v.useState(null);
|
|
101
|
+
return /* @__PURE__ */ (0, S.jsx)(te, {
|
|
102
|
+
scope: t,
|
|
103
|
+
isRootMenu: n,
|
|
104
|
+
rootNavigationMenu: r,
|
|
105
|
+
value: s,
|
|
106
|
+
previousValue: g(s),
|
|
107
|
+
baseId: f(),
|
|
108
|
+
dir: i,
|
|
109
|
+
orientation: a,
|
|
110
|
+
viewport: _,
|
|
111
|
+
onViewportChange: y,
|
|
112
|
+
indicatorTrack: C,
|
|
113
|
+
onIndicatorTrackChange: T,
|
|
114
|
+
onTriggerEnter: m(u),
|
|
115
|
+
onTriggerLeave: m(d),
|
|
116
|
+
onContentEnter: m(p),
|
|
117
|
+
onContentLeave: m(h),
|
|
118
|
+
onItemSelect: m(c),
|
|
119
|
+
onItemDismiss: m(l),
|
|
120
|
+
onViewportContentChange: v.useCallback((e, t) => {
|
|
121
|
+
x((n) => (n.set(e, t), new Map(n)));
|
|
122
|
+
}, []),
|
|
123
|
+
onViewportContentRemove: v.useCallback((e) => {
|
|
124
|
+
x((t) => t.has(e) ? (t.delete(e), new Map(t)) : t);
|
|
125
|
+
}, []),
|
|
126
|
+
children: /* @__PURE__ */ (0, S.jsx)(w.Provider, {
|
|
127
|
+
scope: t,
|
|
128
|
+
children: /* @__PURE__ */ (0, S.jsx)(ne, {
|
|
129
|
+
scope: t,
|
|
130
|
+
items: b,
|
|
131
|
+
children: o
|
|
132
|
+
})
|
|
133
|
+
})
|
|
134
|
+
});
|
|
135
|
+
}, oe = "NavigationMenuList", se = v.forwardRef((e, t) => {
|
|
136
|
+
let { __scopeNavigationMenu: n, ...r } = e, i = j(oe, n), a = /* @__PURE__ */ (0, S.jsx)(s.ul, {
|
|
137
|
+
"data-orientation": i.orientation,
|
|
138
|
+
...r,
|
|
139
|
+
ref: t
|
|
140
|
+
});
|
|
141
|
+
return /* @__PURE__ */ (0, S.jsx)(s.div, {
|
|
142
|
+
style: { position: "relative" },
|
|
143
|
+
ref: i.onIndicatorTrackChange,
|
|
144
|
+
children: /* @__PURE__ */ (0, S.jsx)(w.Slot, {
|
|
145
|
+
scope: n,
|
|
146
|
+
children: i.isRootMenu ? /* @__PURE__ */ (0, S.jsx)(_e, {
|
|
147
|
+
asChild: !0,
|
|
148
|
+
children: a
|
|
149
|
+
}) : a
|
|
150
|
+
})
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
se.displayName = oe;
|
|
154
|
+
var ce = "NavigationMenuItem", [le, ue] = A(ce), de = v.forwardRef((e, t) => {
|
|
155
|
+
let { __scopeNavigationMenu: n, value: r, ...i } = e, a = f(), o = r || a || "LEGACY_REACT_AUTO_VALUE", c = v.useRef(null), l = v.useRef(null), u = v.useRef(null), d = v.useRef(() => {}), p = v.useRef(!1), m = v.useCallback((e = "start") => {
|
|
156
|
+
if (c.current) {
|
|
157
|
+
d.current();
|
|
158
|
+
let t = K(c.current);
|
|
159
|
+
t.length && q(e === "start" ? t : t.reverse());
|
|
160
|
+
}
|
|
161
|
+
}, []), h = v.useCallback(() => {
|
|
162
|
+
if (c.current) {
|
|
163
|
+
let e = K(c.current);
|
|
164
|
+
e.length && (d.current = xe(e));
|
|
165
|
+
}
|
|
166
|
+
}, []);
|
|
167
|
+
return /* @__PURE__ */ (0, S.jsx)(le, {
|
|
168
|
+
scope: n,
|
|
169
|
+
value: o,
|
|
170
|
+
triggerRef: l,
|
|
171
|
+
contentRef: c,
|
|
172
|
+
focusProxyRef: u,
|
|
173
|
+
wasEscapeCloseRef: p,
|
|
174
|
+
onEntryKeyDown: m,
|
|
175
|
+
onFocusProxyEnter: m,
|
|
176
|
+
onRootContentClose: h,
|
|
177
|
+
onContentFocusOutside: h,
|
|
178
|
+
children: /* @__PURE__ */ (0, S.jsx)(s.li, {
|
|
179
|
+
...i,
|
|
180
|
+
ref: t
|
|
181
|
+
})
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
de.displayName = ce;
|
|
185
|
+
var P = "NavigationMenuTrigger", F = v.forwardRef((e, t) => {
|
|
186
|
+
let { __scopeNavigationMenu: n, disabled: i, ...a } = e, c = j(P, e.__scopeNavigationMenu), l = ue(P, e.__scopeNavigationMenu), u = v.useRef(null), d = r(u, l.triggerRef, t), f = Se(c.baseId, l.value), p = Ce(c.baseId, l.value), m = v.useRef(!1), h = v.useRef(!1), g = l.value === c.value;
|
|
187
|
+
return /* @__PURE__ */ (0, S.jsxs)(S.Fragment, { children: [/* @__PURE__ */ (0, S.jsx)(w.ItemSlot, {
|
|
188
|
+
scope: n,
|
|
189
|
+
value: l.value,
|
|
190
|
+
children: /* @__PURE__ */ (0, S.jsx)(be, {
|
|
191
|
+
asChild: !0,
|
|
192
|
+
children: /* @__PURE__ */ (0, S.jsx)(s.button, {
|
|
193
|
+
id: f,
|
|
194
|
+
disabled: i,
|
|
195
|
+
"data-disabled": i ? "" : void 0,
|
|
196
|
+
"data-state": Y(g),
|
|
197
|
+
"aria-expanded": g,
|
|
198
|
+
"aria-controls": p,
|
|
199
|
+
...a,
|
|
200
|
+
ref: d,
|
|
201
|
+
onPointerEnter: o(e.onPointerEnter, () => {
|
|
202
|
+
h.current = !1, l.wasEscapeCloseRef.current = !1;
|
|
203
|
+
}),
|
|
204
|
+
onPointerMove: o(e.onPointerMove, X(() => {
|
|
205
|
+
i || h.current || l.wasEscapeCloseRef.current || m.current || (c.onTriggerEnter(l.value), m.current = !0);
|
|
206
|
+
})),
|
|
207
|
+
onPointerLeave: o(e.onPointerLeave, X(() => {
|
|
208
|
+
i || (c.onTriggerLeave(), m.current = !1);
|
|
209
|
+
})),
|
|
210
|
+
onClick: o(e.onClick, () => {
|
|
211
|
+
c.onItemSelect(l.value), h.current = g;
|
|
212
|
+
}),
|
|
213
|
+
onKeyDown: o(e.onKeyDown, (e) => {
|
|
214
|
+
let t = {
|
|
215
|
+
horizontal: "ArrowDown",
|
|
216
|
+
vertical: c.dir === "rtl" ? "ArrowLeft" : "ArrowRight"
|
|
217
|
+
}[c.orientation];
|
|
218
|
+
g && e.key === t && (l.onEntryKeyDown(), e.preventDefault());
|
|
219
|
+
})
|
|
220
|
+
})
|
|
221
|
+
})
|
|
222
|
+
}), g && /* @__PURE__ */ (0, S.jsxs)(S.Fragment, { children: [/* @__PURE__ */ (0, S.jsx)(_, {
|
|
223
|
+
"aria-hidden": !0,
|
|
224
|
+
tabIndex: 0,
|
|
225
|
+
ref: l.focusProxyRef,
|
|
226
|
+
onFocus: (e) => {
|
|
227
|
+
let t = l.contentRef.current, n = e.relatedTarget, r = n === u.current, i = t?.contains(n);
|
|
228
|
+
(r || !i) && l.onFocusProxyEnter(r ? "start" : "end");
|
|
229
|
+
}
|
|
230
|
+
}), c.viewport && /* @__PURE__ */ (0, S.jsx)("span", { "aria-owns": p })] })] });
|
|
231
|
+
});
|
|
232
|
+
F.displayName = P;
|
|
233
|
+
var fe = "NavigationMenuLink", I = "navigationMenu.linkSelect", L = v.forwardRef((e, t) => {
|
|
234
|
+
let { __scopeNavigationMenu: n, active: r, onSelect: i, ...c } = e;
|
|
235
|
+
return /* @__PURE__ */ (0, S.jsx)(be, {
|
|
236
|
+
asChild: !0,
|
|
237
|
+
children: /* @__PURE__ */ (0, S.jsx)(s.a, {
|
|
238
|
+
"data-active": r ? "" : void 0,
|
|
239
|
+
"aria-current": r ? "page" : void 0,
|
|
240
|
+
...c,
|
|
241
|
+
ref: t,
|
|
242
|
+
onClick: o(e.onClick, (e) => {
|
|
243
|
+
let t = e.target, n = new CustomEvent(I, {
|
|
244
|
+
bubbles: !0,
|
|
245
|
+
cancelable: !0
|
|
246
|
+
});
|
|
247
|
+
t.addEventListener(I, (e) => i?.(e), { once: !0 }), a(t, n), !n.defaultPrevented && !e.metaKey && a(t, new CustomEvent(H, {
|
|
248
|
+
bubbles: !0,
|
|
249
|
+
cancelable: !0
|
|
250
|
+
}));
|
|
251
|
+
}, { checkForDefaultPrevented: !1 })
|
|
252
|
+
})
|
|
253
|
+
});
|
|
254
|
+
});
|
|
255
|
+
L.displayName = fe;
|
|
256
|
+
var R = "NavigationMenuIndicator", z = v.forwardRef((e, t) => {
|
|
257
|
+
let { forceMount: n, ...r } = e, i = j(R, e.__scopeNavigationMenu), a = !!i.value;
|
|
258
|
+
return i.indicatorTrack ? y.createPortal(/* @__PURE__ */ (0, S.jsx)(d, {
|
|
259
|
+
present: n || a,
|
|
260
|
+
children: /* @__PURE__ */ (0, S.jsx)(pe, {
|
|
261
|
+
...r,
|
|
262
|
+
ref: t
|
|
263
|
+
})
|
|
264
|
+
}), i.indicatorTrack) : null;
|
|
265
|
+
});
|
|
266
|
+
z.displayName = R;
|
|
267
|
+
var pe = v.forwardRef((e, t) => {
|
|
268
|
+
let { __scopeNavigationMenu: n, ...r } = e, i = j(R, n), a = T(n), [o, c] = v.useState(null), [l, u] = v.useState(null), d = i.orientation === "horizontal", f = !!i.value;
|
|
269
|
+
v.useEffect(() => {
|
|
270
|
+
let e = a().find((e) => e.value === i.value)?.ref.current;
|
|
271
|
+
e && c(e);
|
|
272
|
+
}, [a, i.value]);
|
|
273
|
+
let p = () => {
|
|
274
|
+
o && u({
|
|
275
|
+
size: d ? o.offsetWidth : o.offsetHeight,
|
|
276
|
+
offset: d ? o.offsetLeft : o.offsetTop
|
|
277
|
+
});
|
|
278
|
+
};
|
|
279
|
+
return J(o, p), J(i.indicatorTrack, p), l ? /* @__PURE__ */ (0, S.jsx)(s.div, {
|
|
280
|
+
"aria-hidden": !0,
|
|
281
|
+
"data-state": f ? "visible" : "hidden",
|
|
282
|
+
"data-orientation": i.orientation,
|
|
283
|
+
...r,
|
|
284
|
+
ref: t,
|
|
285
|
+
style: {
|
|
286
|
+
position: "absolute",
|
|
287
|
+
...d ? {
|
|
288
|
+
left: 0,
|
|
289
|
+
width: l.size + "px",
|
|
290
|
+
transform: `translateX(${l.offset}px)`
|
|
291
|
+
} : {
|
|
292
|
+
top: 0,
|
|
293
|
+
height: l.size + "px",
|
|
294
|
+
transform: `translateY(${l.offset}px)`
|
|
295
|
+
},
|
|
296
|
+
...r.style
|
|
297
|
+
}
|
|
298
|
+
}) : null;
|
|
299
|
+
}), B = "NavigationMenuContent", V = v.forwardRef((e, t) => {
|
|
300
|
+
let { forceMount: n, ...i } = e, a = j(B, e.__scopeNavigationMenu), s = ue(B, e.__scopeNavigationMenu), c = r(s.contentRef, t), l = s.value === a.value, u = {
|
|
301
|
+
value: s.value,
|
|
302
|
+
triggerRef: s.triggerRef,
|
|
303
|
+
focusProxyRef: s.focusProxyRef,
|
|
304
|
+
wasEscapeCloseRef: s.wasEscapeCloseRef,
|
|
305
|
+
onContentFocusOutside: s.onContentFocusOutside,
|
|
306
|
+
onRootContentClose: s.onRootContentClose,
|
|
307
|
+
...i
|
|
308
|
+
};
|
|
309
|
+
return a.viewport ? /* @__PURE__ */ (0, S.jsx)(me, {
|
|
310
|
+
forceMount: n,
|
|
311
|
+
...u,
|
|
312
|
+
ref: c
|
|
313
|
+
}) : /* @__PURE__ */ (0, S.jsx)(d, {
|
|
314
|
+
present: n || l,
|
|
315
|
+
children: /* @__PURE__ */ (0, S.jsx)(U, {
|
|
316
|
+
"data-state": Y(l),
|
|
317
|
+
...u,
|
|
318
|
+
ref: c,
|
|
319
|
+
onPointerEnter: o(e.onPointerEnter, a.onContentEnter),
|
|
320
|
+
onPointerLeave: o(e.onPointerLeave, X(a.onContentLeave)),
|
|
321
|
+
style: {
|
|
322
|
+
pointerEvents: !l && a.isRootMenu ? "none" : void 0,
|
|
323
|
+
...u.style
|
|
324
|
+
}
|
|
325
|
+
})
|
|
326
|
+
});
|
|
327
|
+
});
|
|
328
|
+
V.displayName = B;
|
|
329
|
+
var me = v.forwardRef((e, t) => {
|
|
330
|
+
let { onViewportContentChange: n, onViewportContentRemove: r } = j(B, e.__scopeNavigationMenu);
|
|
331
|
+
return l(() => {
|
|
332
|
+
n(e.value, {
|
|
333
|
+
ref: t,
|
|
334
|
+
...e
|
|
335
|
+
});
|
|
336
|
+
}, [
|
|
337
|
+
e,
|
|
338
|
+
t,
|
|
339
|
+
n
|
|
340
|
+
]), l(() => () => r(e.value), [e.value, r]), null;
|
|
341
|
+
}), H = "navigationMenu.rootContentDismiss", U = v.forwardRef((e, t) => {
|
|
342
|
+
let { __scopeNavigationMenu: n, value: i, triggerRef: a, focusProxyRef: s, wasEscapeCloseRef: c, onRootContentClose: l, onContentFocusOutside: u, ...d } = e, f = j(B, n), p = v.useRef(null), m = r(p, t), g = Se(f.baseId, i), _ = Ce(f.baseId, i), y = T(n), b = v.useRef(null), { onItemDismiss: x } = f;
|
|
343
|
+
return v.useEffect(() => {
|
|
344
|
+
let e = p.current;
|
|
345
|
+
if (f.isRootMenu && e) {
|
|
346
|
+
let t = () => {
|
|
347
|
+
x(), l(), e.contains(document.activeElement) && a.current?.focus();
|
|
348
|
+
};
|
|
349
|
+
return e.addEventListener(H, t), () => e.removeEventListener(H, t);
|
|
350
|
+
}
|
|
351
|
+
}, [
|
|
352
|
+
f.isRootMenu,
|
|
353
|
+
e.value,
|
|
354
|
+
a,
|
|
355
|
+
x,
|
|
356
|
+
l
|
|
357
|
+
]), /* @__PURE__ */ (0, S.jsx)(_e, {
|
|
358
|
+
asChild: !0,
|
|
359
|
+
children: /* @__PURE__ */ (0, S.jsx)(h, {
|
|
360
|
+
id: _,
|
|
361
|
+
"aria-labelledby": g,
|
|
362
|
+
"data-motion": v.useMemo(() => {
|
|
363
|
+
let e = y().map((e) => e.value);
|
|
364
|
+
f.dir === "rtl" && e.reverse();
|
|
365
|
+
let t = e.indexOf(f.value), n = e.indexOf(f.previousValue), r = i === f.value, a = n === e.indexOf(i);
|
|
366
|
+
if (!r && !a) return b.current;
|
|
367
|
+
let o = (() => {
|
|
368
|
+
if (t !== n) {
|
|
369
|
+
if (r && n !== -1) return t > n ? "from-end" : "from-start";
|
|
370
|
+
if (a && t !== -1) return t > n ? "to-start" : "to-end";
|
|
371
|
+
}
|
|
372
|
+
return null;
|
|
373
|
+
})();
|
|
374
|
+
return b.current = o, o;
|
|
375
|
+
}, [
|
|
376
|
+
f.previousValue,
|
|
377
|
+
f.value,
|
|
378
|
+
f.dir,
|
|
379
|
+
y,
|
|
380
|
+
i
|
|
381
|
+
]),
|
|
382
|
+
"data-orientation": f.orientation,
|
|
383
|
+
...d,
|
|
384
|
+
ref: m,
|
|
385
|
+
disableOutsidePointerEvents: !1,
|
|
386
|
+
onDismiss: () => {
|
|
387
|
+
let e = new Event(H, {
|
|
388
|
+
bubbles: !0,
|
|
389
|
+
cancelable: !0
|
|
390
|
+
});
|
|
391
|
+
p.current?.dispatchEvent(e);
|
|
392
|
+
},
|
|
393
|
+
onFocusOutside: o(e.onFocusOutside, (e) => {
|
|
394
|
+
u();
|
|
395
|
+
let t = e.target;
|
|
396
|
+
f.rootNavigationMenu?.contains(t) && e.preventDefault();
|
|
397
|
+
}),
|
|
398
|
+
onPointerDownOutside: o(e.onPointerDownOutside, (e) => {
|
|
399
|
+
let t = e.target, n = y().some((e) => e.ref.current?.contains(t)), r = f.isRootMenu && f.viewport?.contains(t);
|
|
400
|
+
(n || r || !f.isRootMenu) && e.preventDefault();
|
|
401
|
+
}),
|
|
402
|
+
onKeyDown: o(e.onKeyDown, (e) => {
|
|
403
|
+
let t = e.altKey || e.ctrlKey || e.metaKey;
|
|
404
|
+
if (e.key === "Tab" && !t) {
|
|
405
|
+
let t = K(e.currentTarget), n = document.activeElement, r = t.findIndex((e) => e === n);
|
|
406
|
+
q(e.shiftKey ? t.slice(0, r).reverse() : t.slice(r + 1, t.length)) ? e.preventDefault() : s.current?.focus();
|
|
407
|
+
}
|
|
408
|
+
}),
|
|
409
|
+
onEscapeKeyDown: o(e.onEscapeKeyDown, (e) => {
|
|
410
|
+
c.current = !0;
|
|
411
|
+
})
|
|
412
|
+
})
|
|
413
|
+
});
|
|
414
|
+
}), W = "NavigationMenuViewport", G = v.forwardRef((e, t) => {
|
|
415
|
+
let { forceMount: n, ...r } = e, i = !!j(W, e.__scopeNavigationMenu).value;
|
|
416
|
+
return /* @__PURE__ */ (0, S.jsx)(d, {
|
|
417
|
+
present: n || i,
|
|
418
|
+
children: /* @__PURE__ */ (0, S.jsx)(he, {
|
|
419
|
+
...r,
|
|
420
|
+
ref: t
|
|
421
|
+
})
|
|
422
|
+
});
|
|
423
|
+
});
|
|
424
|
+
G.displayName = W;
|
|
425
|
+
var he = v.forwardRef((e, t) => {
|
|
426
|
+
let { __scopeNavigationMenu: n, children: a, ...c } = e, l = j(W, n), u = r(t, l.onViewportChange), f = re(B, e.__scopeNavigationMenu), [p, m] = v.useState(null), [h, g] = v.useState(null), _ = p ? p?.width + "px" : void 0, y = p ? p?.height + "px" : void 0, b = !!l.value, x = b ? l.value : l.previousValue;
|
|
427
|
+
return J(h, () => {
|
|
428
|
+
h && m({
|
|
429
|
+
width: h.offsetWidth,
|
|
430
|
+
height: h.offsetHeight
|
|
431
|
+
});
|
|
432
|
+
}), /* @__PURE__ */ (0, S.jsx)(s.div, {
|
|
433
|
+
"data-state": Y(b),
|
|
434
|
+
"data-orientation": l.orientation,
|
|
435
|
+
...c,
|
|
436
|
+
ref: u,
|
|
437
|
+
style: {
|
|
438
|
+
pointerEvents: !b && l.isRootMenu ? "none" : void 0,
|
|
439
|
+
"--radix-navigation-menu-viewport-width": _,
|
|
440
|
+
"--radix-navigation-menu-viewport-height": y,
|
|
441
|
+
...c.style
|
|
442
|
+
},
|
|
443
|
+
onPointerEnter: o(e.onPointerEnter, l.onContentEnter),
|
|
444
|
+
onPointerLeave: o(e.onPointerLeave, X(l.onContentLeave)),
|
|
445
|
+
children: Array.from(f.items).map(([e, { ref: t, forceMount: n, ...r }]) => {
|
|
446
|
+
let a = x === e;
|
|
447
|
+
return /* @__PURE__ */ (0, S.jsx)(d, {
|
|
448
|
+
present: n || a,
|
|
449
|
+
children: /* @__PURE__ */ (0, S.jsx)(U, {
|
|
450
|
+
...r,
|
|
451
|
+
ref: i(t, (e) => {
|
|
452
|
+
a && e && g(e);
|
|
453
|
+
})
|
|
454
|
+
})
|
|
455
|
+
}, e);
|
|
456
|
+
})
|
|
457
|
+
});
|
|
458
|
+
}), ge = "FocusGroup", _e = v.forwardRef((e, t) => {
|
|
459
|
+
let { __scopeNavigationMenu: n, ...r } = e, i = j(ge, n);
|
|
460
|
+
return /* @__PURE__ */ (0, S.jsx)(D.Provider, {
|
|
461
|
+
scope: n,
|
|
462
|
+
children: /* @__PURE__ */ (0, S.jsx)(D.Slot, {
|
|
463
|
+
scope: n,
|
|
464
|
+
children: /* @__PURE__ */ (0, S.jsx)(s.div, {
|
|
465
|
+
dir: i.dir,
|
|
466
|
+
...r,
|
|
467
|
+
ref: t
|
|
468
|
+
})
|
|
469
|
+
})
|
|
470
|
+
});
|
|
471
|
+
}), ve = [
|
|
472
|
+
"ArrowRight",
|
|
473
|
+
"ArrowLeft",
|
|
474
|
+
"ArrowUp",
|
|
475
|
+
"ArrowDown"
|
|
476
|
+
], ye = "FocusGroupItem", be = v.forwardRef((e, t) => {
|
|
477
|
+
let { __scopeNavigationMenu: n, ...r } = e, i = O(n), a = j(ye, n);
|
|
478
|
+
return /* @__PURE__ */ (0, S.jsx)(D.ItemSlot, {
|
|
479
|
+
scope: n,
|
|
480
|
+
children: /* @__PURE__ */ (0, S.jsx)(s.button, {
|
|
481
|
+
...r,
|
|
482
|
+
ref: t,
|
|
483
|
+
onKeyDown: o(e.onKeyDown, (e) => {
|
|
484
|
+
if ([
|
|
485
|
+
"Home",
|
|
486
|
+
"End",
|
|
487
|
+
...ve
|
|
488
|
+
].includes(e.key)) {
|
|
489
|
+
let t = i().map((e) => e.ref.current);
|
|
490
|
+
if ([
|
|
491
|
+
a.dir === "rtl" ? "ArrowRight" : "ArrowLeft",
|
|
492
|
+
"ArrowUp",
|
|
493
|
+
"End"
|
|
494
|
+
].includes(e.key) && t.reverse(), ve.includes(e.key)) {
|
|
495
|
+
let n = t.indexOf(e.currentTarget);
|
|
496
|
+
t = t.slice(n + 1);
|
|
497
|
+
}
|
|
498
|
+
setTimeout(() => q(t)), e.preventDefault();
|
|
499
|
+
}
|
|
500
|
+
})
|
|
501
|
+
})
|
|
502
|
+
});
|
|
503
|
+
});
|
|
504
|
+
function K(e) {
|
|
505
|
+
let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (e) => {
|
|
506
|
+
let t = e.tagName === "INPUT" && e.type === "hidden";
|
|
507
|
+
return e.disabled || e.hidden || t ? NodeFilter.FILTER_SKIP : e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
508
|
+
} });
|
|
509
|
+
for (; n.nextNode();) t.push(n.currentNode);
|
|
510
|
+
return t;
|
|
511
|
+
}
|
|
512
|
+
function q(e) {
|
|
513
|
+
let t = document.activeElement;
|
|
514
|
+
return e.some((e) => e === t ? !0 : (e.focus(), document.activeElement !== t));
|
|
515
|
+
}
|
|
516
|
+
function xe(e) {
|
|
517
|
+
return e.forEach((e) => {
|
|
518
|
+
e.dataset.tabindex = e.getAttribute("tabindex") || "", e.setAttribute("tabindex", "-1");
|
|
519
|
+
}), () => {
|
|
520
|
+
e.forEach((e) => {
|
|
521
|
+
let t = e.dataset.tabindex;
|
|
522
|
+
e.setAttribute("tabindex", t);
|
|
523
|
+
});
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
function J(e, t) {
|
|
527
|
+
let n = m(t);
|
|
528
|
+
l(() => {
|
|
529
|
+
let t = 0;
|
|
530
|
+
if (e) {
|
|
531
|
+
let r = new ResizeObserver(() => {
|
|
532
|
+
cancelAnimationFrame(t), t = window.requestAnimationFrame(n);
|
|
533
|
+
});
|
|
534
|
+
return r.observe(e), () => {
|
|
535
|
+
window.cancelAnimationFrame(t), r.unobserve(e);
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
}, [e, n]);
|
|
539
|
+
}
|
|
540
|
+
function Y(e) {
|
|
541
|
+
return e ? "open" : "closed";
|
|
542
|
+
}
|
|
543
|
+
function Se(e, t) {
|
|
544
|
+
return `${e}-trigger-${t}`;
|
|
545
|
+
}
|
|
546
|
+
function Ce(e, t) {
|
|
547
|
+
return `${e}-content-${t}`;
|
|
548
|
+
}
|
|
549
|
+
function X(e) {
|
|
550
|
+
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
551
|
+
}
|
|
552
|
+
var we = M, Te = se, Ee = de, De = F, Oe = L, ke = z, Z = V, Ae = G, je = v.forwardRef(({ className: e, children: n, ...r }, i) => /* @__PURE__ */ (0, S.jsxs)(we, {
|
|
553
|
+
ref: i,
|
|
554
|
+
className: t("relative z-10 flex max-w-max flex-1 items-center justify-center", e),
|
|
555
|
+
...r,
|
|
556
|
+
children: [n, /* @__PURE__ */ (0, S.jsx)(Q, {})]
|
|
557
|
+
}));
|
|
558
|
+
je.displayName = we?.displayName || "NavigationMenu";
|
|
559
|
+
var Me = v.forwardRef(({ className: e, ...n }, r) => /* @__PURE__ */ (0, S.jsx)(Te, {
|
|
560
|
+
ref: r,
|
|
561
|
+
className: t("group flex flex-1 list-none items-center justify-center space-x-1", e),
|
|
562
|
+
...n
|
|
563
|
+
}));
|
|
564
|
+
Me.displayName = Te?.displayName || "NavigationMenuList";
|
|
565
|
+
var Ne = Ee, Pe = x("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent"), Fe = v.forwardRef(({ className: e, children: n, ...r }, i) => /* @__PURE__ */ (0, S.jsxs)(De, {
|
|
566
|
+
ref: i,
|
|
567
|
+
className: t(Pe(), "group", e),
|
|
568
|
+
...r,
|
|
569
|
+
children: [
|
|
570
|
+
n,
|
|
571
|
+
" ",
|
|
572
|
+
/* @__PURE__ */ (0, S.jsx)(b, {
|
|
573
|
+
className: "relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
574
|
+
"aria-hidden": "true"
|
|
575
|
+
})
|
|
576
|
+
]
|
|
577
|
+
}));
|
|
578
|
+
Fe.displayName = De?.displayName || "NavigationMenuTrigger";
|
|
579
|
+
var Ie = v.forwardRef(({ className: e, ...n }, r) => /* @__PURE__ */ (0, S.jsx)(Z, {
|
|
580
|
+
ref: r,
|
|
581
|
+
className: t("data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full md:absolute md:w-auto", e),
|
|
582
|
+
...n
|
|
583
|
+
}));
|
|
584
|
+
Ie.displayName = Z?.displayName || "NavigationMenuContent";
|
|
585
|
+
var Le = Oe, Q = v.forwardRef(({ className: e, ...n }, r) => /* @__PURE__ */ (0, S.jsx)("div", {
|
|
586
|
+
className: t("absolute top-full left-0 flex justify-center"),
|
|
587
|
+
children: /* @__PURE__ */ (0, S.jsx)(Ae, {
|
|
588
|
+
className: t("origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]", e),
|
|
589
|
+
ref: r,
|
|
590
|
+
...n
|
|
591
|
+
})
|
|
592
|
+
}));
|
|
593
|
+
Q.displayName = Ae?.displayName || "NavigationMenuViewport";
|
|
594
|
+
var $ = v.forwardRef(({ className: e, ...n }, r) => /* @__PURE__ */ (0, S.jsx)(ke, {
|
|
595
|
+
ref: r,
|
|
596
|
+
className: t("data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden", e),
|
|
597
|
+
...n,
|
|
598
|
+
children: /* @__PURE__ */ (0, S.jsx)("div", { className: "bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" })
|
|
599
|
+
}));
|
|
600
|
+
$.displayName = ke?.displayName || "NavigationMenuIndicator";
|
|
601
|
+
//#endregion
|
|
602
|
+
export { Le as a, Q as c, Ne as i, Pe as l, Ie as n, Me as o, $ as r, Fe as s, je as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./jsx-runtime-CN3qjQQx.js`),t=require(`./utils-BxDanjP7.js`),n=require(`./dist-Kqk0oQYU.js`),r=require(`./dist-CsEsK2jW.js`),i=require(`./dist-DmmUjo_P.js`),a=require(`./dist-Ci2whnVp.js`),o=require(`./dist-CscAxhT8.js`),s=require(`./dist-B5VmV2K7.js`),c=require(`./dist-_Osar3kp.js`),l=require(`./dist-CUFjt0cI.js`),u=require(`./dist-BeFCyPgD.js`),d=require(`./dist-cRjbOZRf.js`),f=require(`./dist-C2ArLRnq.js`),p=require(`./dist-0FXx-pUX.js`),m=require(`./dist-BfFVoFJN.js`);let h=require(`react`),g=e.i(h,1);h=e.i(h);let _=require(`react-dom`);_=e.i(_,1);let v=require(`lucide-react`),y=require(`class-variance-authority`);var b=e.t(),x=`NavigationMenu`,[S,C,w]=a.t(x),[T,E,D]=a.t(x),[O,k]=n.n(x,[w,D]),[A,j]=O(x),[ee,te]=O(x),M=g.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:a,onValueChange:o,defaultValue:c,delayDuration:l=200,skipDelayDuration:d=300,orientation:f=`horizontal`,dir:p,...m}=e,[h,_]=g.useState(null),v=r.n(t,e=>_(e)),y=u.t(p),S=g.useRef(0),C=g.useRef(0),w=g.useRef(0),[T,E]=g.useState(!0),[D,O]=s.t({prop:a,onChange:e=>{let t=e!==``,n=d>0;t?(window.clearTimeout(w.current),n&&E(!1)):(window.clearTimeout(w.current),w.current=window.setTimeout(()=>E(!0),d)),o?.(e)},defaultProp:c??``,caller:x}),k=g.useCallback(()=>{window.clearTimeout(C.current),C.current=window.setTimeout(()=>O(``),150)},[O]),A=g.useCallback(e=>{window.clearTimeout(C.current),O(e)},[O]),j=g.useCallback(e=>{D===e?window.clearTimeout(C.current):S.current=window.setTimeout(()=>{window.clearTimeout(C.current),O(e)},l)},[D,O,l]);return g.useEffect(()=>()=>{window.clearTimeout(S.current),window.clearTimeout(C.current),window.clearTimeout(w.current)},[]),(0,b.jsx)(re,{scope:n,isRootMenu:!0,value:D,dir:y,orientation:f,rootNavigationMenu:h,onTriggerEnter:e=>{window.clearTimeout(S.current),T?j(e):A(e)},onTriggerLeave:()=>{window.clearTimeout(S.current),k()},onContentEnter:()=>window.clearTimeout(C.current),onContentLeave:k,onItemSelect:e=>{O(t=>t===e?``:e)},onItemDismiss:()=>O(``),children:(0,b.jsx)(i.t.nav,{"aria-label":`Main`,"data-orientation":f,dir:y,...m,ref:v})})});M.displayName=x;var N=`NavigationMenuSub`,ne=g.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,onValueChange:a,defaultValue:o,orientation:c=`horizontal`,...l}=e,u=j(N,n),[d,f]=s.t({prop:r,onChange:a,defaultProp:o??``,caller:N});return(0,b.jsx)(re,{scope:n,isRootMenu:!1,value:d,dir:u.dir,orientation:c,rootNavigationMenu:u.rootNavigationMenu,onTriggerEnter:e=>f(e),onItemSelect:e=>f(e),onItemDismiss:()=>f(``),children:(0,b.jsx)(i.t.div,{"data-orientation":c,...l,ref:t})})});ne.displayName=N;var re=e=>{let{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:i,orientation:a,children:o,value:s,onItemSelect:c,onItemDismiss:u,onTriggerEnter:f,onTriggerLeave:m,onContentEnter:h,onContentLeave:_}=e,[v,y]=g.useState(null),[x,C]=g.useState(new Map),[w,T]=g.useState(null);return(0,b.jsx)(A,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:s,previousValue:p.t(s),baseId:l.t(),dir:i,orientation:a,viewport:v,onViewportChange:y,indicatorTrack:w,onIndicatorTrackChange:T,onTriggerEnter:d.t(f),onTriggerLeave:d.t(m),onContentEnter:d.t(h),onContentLeave:d.t(_),onItemSelect:d.t(c),onItemDismiss:d.t(u),onViewportContentChange:g.useCallback((e,t)=>{C(n=>(n.set(e,t),new Map(n)))},[]),onViewportContentRemove:g.useCallback(e=>{C(t=>t.has(e)?(t.delete(e),new Map(t)):t)},[]),children:(0,b.jsx)(S.Provider,{scope:t,children:(0,b.jsx)(ee,{scope:t,items:x,children:o})})})},ie=`NavigationMenuList`,ae=g.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,a=j(ie,n),o=(0,b.jsx)(i.t.ul,{"data-orientation":a.orientation,...r,ref:t});return(0,b.jsx)(i.t.div,{style:{position:`relative`},ref:a.onIndicatorTrackChange,children:(0,b.jsx)(S.Slot,{scope:n,children:a.isRootMenu?(0,b.jsx)(K,{asChild:!0,children:o}):o})})});ae.displayName=ie;var oe=`NavigationMenuItem`,[se,ce]=O(oe),le=g.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,...a}=e,o=l.t(),s=r||o||`LEGACY_REACT_AUTO_VALUE`,c=g.useRef(null),u=g.useRef(null),d=g.useRef(null),f=g.useRef(()=>{}),p=g.useRef(!1),m=g.useCallback((e=`start`)=>{if(c.current){f.current();let t=q(c.current);t.length&&J(e===`start`?t:t.reverse())}},[]),h=g.useCallback(()=>{if(c.current){let e=q(c.current);e.length&&(f.current=ve(e))}},[]);return(0,b.jsx)(se,{scope:n,value:s,triggerRef:u,contentRef:c,focusProxyRef:d,wasEscapeCloseRef:p,onEntryKeyDown:m,onFocusProxyEnter:m,onRootContentClose:h,onContentFocusOutside:h,children:(0,b.jsx)(i.t.li,{...a,ref:t})})});le.displayName=oe;var P=`NavigationMenuTrigger`,F=g.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,disabled:a,...o}=e,s=j(P,e.__scopeNavigationMenu),c=ce(P,e.__scopeNavigationMenu),l=g.useRef(null),u=r.n(l,c.triggerRef,t),d=ye(s.baseId,c.value),f=be(s.baseId,c.value),p=g.useRef(!1),h=g.useRef(!1),_=c.value===s.value;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(S.ItemSlot,{scope:n,value:c.value,children:(0,b.jsx)(_e,{asChild:!0,children:(0,b.jsx)(i.t.button,{id:d,disabled:a,"data-disabled":a?``:void 0,"data-state":X(_),"aria-expanded":_,"aria-controls":f,...o,ref:u,onPointerEnter:i.r(e.onPointerEnter,()=>{h.current=!1,c.wasEscapeCloseRef.current=!1}),onPointerMove:i.r(e.onPointerMove,Z(()=>{a||h.current||c.wasEscapeCloseRef.current||p.current||(s.onTriggerEnter(c.value),p.current=!0)})),onPointerLeave:i.r(e.onPointerLeave,Z(()=>{a||(s.onTriggerLeave(),p.current=!1)})),onClick:i.r(e.onClick,()=>{s.onItemSelect(c.value),h.current=_}),onKeyDown:i.r(e.onKeyDown,e=>{let t={horizontal:`ArrowDown`,vertical:s.dir===`rtl`?`ArrowLeft`:`ArrowRight`}[s.orientation];_&&e.key===t&&(c.onEntryKeyDown(),e.preventDefault())})})})}),_&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(m.t,{"aria-hidden":!0,tabIndex:0,ref:c.focusProxyRef,onFocus:e=>{let t=c.contentRef.current,n=e.relatedTarget,r=n===l.current,i=t?.contains(n);(r||!i)&&c.onFocusProxyEnter(r?`start`:`end`)}}),s.viewport&&(0,b.jsx)(`span`,{"aria-owns":f})]})]})});F.displayName=P;var ue=`NavigationMenuLink`,I=`navigationMenu.linkSelect`,L=g.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,active:r,onSelect:a,...o}=e;return(0,b.jsx)(_e,{asChild:!0,children:(0,b.jsx)(i.t.a,{"data-active":r?``:void 0,"aria-current":r?`page`:void 0,...o,ref:t,onClick:i.r(e.onClick,e=>{let t=e.target,n=new CustomEvent(I,{bubbles:!0,cancelable:!0});t.addEventListener(I,e=>a?.(e),{once:!0}),i.n(t,n),!n.defaultPrevented&&!e.metaKey&&i.n(t,new CustomEvent(H,{bubbles:!0,cancelable:!0}))},{checkForDefaultPrevented:!1})})})});L.displayName=ue;var R=`NavigationMenuIndicator`,z=g.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=j(R,e.__scopeNavigationMenu),a=!!i.value;return i.indicatorTrack?_.default.createPortal((0,b.jsx)(c.t,{present:n||a,children:(0,b.jsx)(de,{...r,ref:t})}),i.indicatorTrack):null});z.displayName=R;var de=g.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,a=j(R,n),o=C(n),[s,c]=g.useState(null),[l,u]=g.useState(null),d=a.orientation===`horizontal`,f=!!a.value;g.useEffect(()=>{let e=o().find(e=>e.value===a.value)?.ref.current;e&&c(e)},[o,a.value]);let p=()=>{s&&u({size:d?s.offsetWidth:s.offsetHeight,offset:d?s.offsetLeft:s.offsetTop})};return Y(s,p),Y(a.indicatorTrack,p),l?(0,b.jsx)(i.t.div,{"aria-hidden":!0,"data-state":f?`visible`:`hidden`,"data-orientation":a.orientation,...r,ref:t,style:{position:`absolute`,...d?{left:0,width:l.size+`px`,transform:`translateX(${l.offset}px)`}:{top:0,height:l.size+`px`,transform:`translateY(${l.offset}px)`},...r.style}}):null}),B=`NavigationMenuContent`,V=g.forwardRef((e,t)=>{let{forceMount:n,...a}=e,o=j(B,e.__scopeNavigationMenu),s=ce(B,e.__scopeNavigationMenu),l=r.n(s.contentRef,t),u=s.value===o.value,d={value:s.value,triggerRef:s.triggerRef,focusProxyRef:s.focusProxyRef,wasEscapeCloseRef:s.wasEscapeCloseRef,onContentFocusOutside:s.onContentFocusOutside,onRootContentClose:s.onRootContentClose,...a};return o.viewport?(0,b.jsx)(fe,{forceMount:n,...d,ref:l}):(0,b.jsx)(c.t,{present:n||u,children:(0,b.jsx)(U,{"data-state":X(u),...d,ref:l,onPointerEnter:i.r(e.onPointerEnter,o.onContentEnter),onPointerLeave:i.r(e.onPointerLeave,Z(o.onContentLeave)),style:{pointerEvents:!u&&o.isRootMenu?`none`:void 0,...d.style}})})});V.displayName=B;var fe=g.forwardRef((e,t)=>{let{onViewportContentChange:n,onViewportContentRemove:r}=j(B,e.__scopeNavigationMenu);return o.t(()=>{n(e.value,{ref:t,...e})},[e,t,n]),o.t(()=>()=>r(e.value),[e.value,r]),null}),H=`navigationMenu.rootContentDismiss`,U=g.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:a,triggerRef:o,focusProxyRef:s,wasEscapeCloseRef:c,onRootContentClose:l,onContentFocusOutside:u,...d}=e,p=j(B,n),m=g.useRef(null),h=r.n(m,t),_=ye(p.baseId,a),v=be(p.baseId,a),y=C(n),x=g.useRef(null),{onItemDismiss:S}=p;return g.useEffect(()=>{let e=m.current;if(p.isRootMenu&&e){let t=()=>{S(),l(),e.contains(document.activeElement)&&o.current?.focus()};return e.addEventListener(H,t),()=>e.removeEventListener(H,t)}},[p.isRootMenu,e.value,o,S,l]),(0,b.jsx)(K,{asChild:!0,children:(0,b.jsx)(f.n,{id:v,"aria-labelledby":_,"data-motion":g.useMemo(()=>{let e=y().map(e=>e.value);p.dir===`rtl`&&e.reverse();let t=e.indexOf(p.value),n=e.indexOf(p.previousValue),r=a===p.value,i=n===e.indexOf(a);if(!r&&!i)return x.current;let o=(()=>{if(t!==n){if(r&&n!==-1)return t>n?`from-end`:`from-start`;if(i&&t!==-1)return t>n?`to-start`:`to-end`}return null})();return x.current=o,o},[p.previousValue,p.value,p.dir,y,a]),"data-orientation":p.orientation,...d,ref:h,disableOutsidePointerEvents:!1,onDismiss:()=>{let e=new Event(H,{bubbles:!0,cancelable:!0});m.current?.dispatchEvent(e)},onFocusOutside:i.r(e.onFocusOutside,e=>{u();let t=e.target;p.rootNavigationMenu?.contains(t)&&e.preventDefault()}),onPointerDownOutside:i.r(e.onPointerDownOutside,e=>{let t=e.target,n=y().some(e=>e.ref.current?.contains(t)),r=p.isRootMenu&&p.viewport?.contains(t);(n||r||!p.isRootMenu)&&e.preventDefault()}),onKeyDown:i.r(e.onKeyDown,e=>{let t=e.altKey||e.ctrlKey||e.metaKey;if(e.key===`Tab`&&!t){let t=q(e.currentTarget),n=document.activeElement,r=t.findIndex(e=>e===n);J(e.shiftKey?t.slice(0,r).reverse():t.slice(r+1,t.length))?e.preventDefault():s.current?.focus()}}),onEscapeKeyDown:i.r(e.onEscapeKeyDown,e=>{c.current=!0})})})}),W=`NavigationMenuViewport`,G=g.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=!!j(W,e.__scopeNavigationMenu).value;return(0,b.jsx)(c.t,{present:n||i,children:(0,b.jsx)(pe,{...r,ref:t})})});G.displayName=W;var pe=g.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,children:a,...o}=e,s=j(W,n),l=r.n(t,s.onViewportChange),u=te(B,e.__scopeNavigationMenu),[d,f]=g.useState(null),[p,m]=g.useState(null),h=d?d?.width+`px`:void 0,_=d?d?.height+`px`:void 0,v=!!s.value,y=v?s.value:s.previousValue;return Y(p,()=>{p&&f({width:p.offsetWidth,height:p.offsetHeight})}),(0,b.jsx)(i.t.div,{"data-state":X(v),"data-orientation":s.orientation,...o,ref:l,style:{pointerEvents:!v&&s.isRootMenu?`none`:void 0,"--radix-navigation-menu-viewport-width":h,"--radix-navigation-menu-viewport-height":_,...o.style},onPointerEnter:i.r(e.onPointerEnter,s.onContentEnter),onPointerLeave:i.r(e.onPointerLeave,Z(s.onContentLeave)),children:Array.from(u.items).map(([e,{ref:t,forceMount:n,...i}])=>{let a=y===e;return(0,b.jsx)(c.t,{present:n||a,children:(0,b.jsx)(U,{...i,ref:r.t(t,e=>{a&&e&&m(e)})})},e)})})}),me=`FocusGroup`,K=g.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,a=j(me,n);return(0,b.jsx)(T.Provider,{scope:n,children:(0,b.jsx)(T.Slot,{scope:n,children:(0,b.jsx)(i.t.div,{dir:a.dir,...r,ref:t})})})}),he=[`ArrowRight`,`ArrowLeft`,`ArrowUp`,`ArrowDown`],ge=`FocusGroupItem`,_e=g.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,a=E(n),o=j(ge,n);return(0,b.jsx)(T.ItemSlot,{scope:n,children:(0,b.jsx)(i.t.button,{...r,ref:t,onKeyDown:i.r(e.onKeyDown,e=>{if([`Home`,`End`,...he].includes(e.key)){let t=a().map(e=>e.ref.current);if([o.dir===`rtl`?`ArrowRight`:`ArrowLeft`,`ArrowUp`,`End`].includes(e.key)&&t.reverse(),he.includes(e.key)){let n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout(()=>J(t)),e.preventDefault()}})})})});function q(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function J(e){let t=document.activeElement;return e.some(e=>e===t?!0:(e.focus(),document.activeElement!==t))}function ve(e){return e.forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)}),()=>{e.forEach(e=>{let t=e.dataset.tabindex;e.setAttribute(`tabindex`,t)})}}function Y(e,t){let n=d.t(t);o.t(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}function X(e){return e?`open`:`closed`}function ye(e,t){return`${e}-trigger-${t}`}function be(e,t){return`${e}-content-${t}`}function Z(e){return t=>t.pointerType===`mouse`?e(t):void 0}var xe=M,Se=ae,Ce=le,we=F,Te=L,Ee=z,De=V,Oe=G,Q=h.forwardRef(({className:e,children:n,...r},i)=>(0,b.jsxs)(xe,{ref:i,className:t.t(`relative z-10 flex max-w-max flex-1 items-center justify-center`,e),...r,children:[n,(0,b.jsx)($,{})]}));Q.displayName=xe?.displayName||`NavigationMenu`;var ke=h.forwardRef(({className:e,...n},r)=>(0,b.jsx)(Se,{ref:r,className:t.t(`group flex flex-1 list-none items-center justify-center space-x-1`,e),...n}));ke.displayName=Se?.displayName||`NavigationMenuList`;var Ae=Ce,je=(0,y.cva)(`group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent`),Me=h.forwardRef(({className:e,children:n,...r},i)=>(0,b.jsxs)(we,{ref:i,className:t.t(je(),`group`,e),...r,children:[n,` `,(0,b.jsx)(v.ChevronDown,{className:`relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180`,"aria-hidden":`true`})]}));Me.displayName=we?.displayName||`NavigationMenuTrigger`;var Ne=h.forwardRef(({className:e,...n},r)=>(0,b.jsx)(De,{ref:r,className:t.t(`data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full md:absolute md:w-auto`,e),...n}));Ne.displayName=De?.displayName||`NavigationMenuContent`;var Pe=Te,$=h.forwardRef(({className:e,...n},r)=>(0,b.jsx)(`div`,{className:t.t(`absolute top-full left-0 flex justify-center`),children:(0,b.jsx)(Oe,{className:t.t(`origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]`,e),ref:r,...n})}));$.displayName=Oe?.displayName||`NavigationMenuViewport`;var Fe=h.forwardRef(({className:e,...n},r)=>(0,b.jsx)(Ee,{ref:r,className:t.t(`data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden`,e),...n,children:(0,b.jsx)(`div`,{className:`bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md`})}));Fe.displayName=Ee?.displayName||`NavigationMenuIndicator`,Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return je}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return Q}});
|