@arch-cadre/ui 0.0.10 → 0.0.15
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/build.config.ts +23 -0
- package/dist/components/.gitkeep +0 -0
- package/dist/components/accordion.cjs +62 -0
- package/dist/components/accordion.d.ts +7 -0
- package/dist/components/accordion.mjs +58 -0
- package/dist/components/alert-dialog.cjs +127 -0
- package/dist/components/alert-dialog.d.ts +14 -0
- package/dist/components/alert-dialog.mjs +144 -0
- package/dist/components/alert.cjs +58 -0
- package/dist/components/alert.d.ts +9 -0
- package/dist/components/alert.mjs +62 -0
- package/dist/components/aspect-ratio.cjs +19 -0
- package/dist/components/aspect-ratio.d.ts +4 -0
- package/dist/components/aspect-ratio.mjs +9 -0
- package/dist/components/avatar.cjs +44 -0
- package/dist/components/avatar.d.ts +6 -0
- package/dist/components/avatar.mjs +50 -0
- package/dist/components/badge.cjs +41 -0
- package/dist/components/badge.d.ts +9 -0
- package/dist/components/badge.mjs +37 -0
- package/dist/components/breadcrumb.cjs +106 -0
- package/dist/components/breadcrumb.d.ts +11 -0
- package/dist/components/breadcrumb.mjs +105 -0
- package/dist/components/button-group.cjs +65 -0
- package/dist/components/button-group.d.ts +12 -0
- package/dist/components/button-group.mjs +76 -0
- package/dist/components/button.cjs +57 -0
- package/dist/components/button.d.ts +10 -0
- package/dist/components/button.mjs +51 -0
- package/dist/components/calendar.cjs +143 -0
- package/dist/components/calendar.d.ts +8 -0
- package/dist/components/calendar.mjs +191 -0
- package/dist/components/card.cjs +86 -0
- package/dist/components/card.d.ts +9 -0
- package/dist/components/card.mjs +90 -0
- package/dist/components/checkbox.cjs +28 -0
- package/dist/components/checkbox.d.ts +4 -0
- package/dist/components/checkbox.mjs +30 -0
- package/dist/components/collapsible.cjs +37 -0
- package/dist/components/collapsible.d.ts +6 -0
- package/dist/components/collapsible.mjs +31 -0
- package/dist/components/command.cjs +125 -0
- package/dist/components/command.d.ts +18 -0
- package/dist/components/command.mjs +169 -0
- package/dist/components/context-menu.cjs +188 -0
- package/dist/components/context-menu.d.ts +25 -0
- package/dist/components/context-menu.mjs +218 -0
- package/dist/components/dialog.cjs +123 -0
- package/dist/components/dialog.d.ts +15 -0
- package/dist/components/dialog.mjs +130 -0
- package/dist/components/drawer.cjs +118 -0
- package/dist/components/drawer.d.ts +13 -0
- package/dist/components/drawer.mjs +124 -0
- package/dist/components/dropdown-menu.cjs +190 -0
- package/dist/components/dropdown-menu.d.ts +25 -0
- package/dist/components/dropdown-menu.mjs +226 -0
- package/dist/components/empty.cjs +92 -0
- package/dist/components/empty.d.ts +12 -0
- package/dist/components/empty.mjs +102 -0
- package/dist/components/field.cjs +173 -0
- package/dist/components/field.d.ts +25 -0
- package/dist/components/field.mjs +228 -0
- package/dist/components/form.cjs +143 -0
- package/dist/components/form.d.ts +23 -0
- package/dist/components/form.mjs +123 -0
- package/dist/components/hover-card.cjs +46 -0
- package/dist/components/hover-card.d.ts +6 -0
- package/dist/components/hover-card.mjs +35 -0
- package/dist/components/input-group.cjs +130 -0
- package/dist/components/input-group.d.ts +16 -0
- package/dist/components/input-group.mjs +155 -0
- package/dist/components/input-otp.cjs +69 -0
- package/dist/components/input-otp.d.ts +11 -0
- package/dist/components/input-otp.mjs +59 -0
- package/dist/components/input.cjs +22 -0
- package/dist/components/input.d.ts +3 -0
- package/dist/components/input.mjs +19 -0
- package/dist/components/item.cjs +168 -0
- package/dist/components/item.d.ts +23 -0
- package/dist/components/item.mjs +187 -0
- package/dist/components/kbd.cjs +31 -0
- package/dist/components/kbd.d.ts +4 -0
- package/dist/components/kbd.mjs +28 -0
- package/dist/components/label.cjs +22 -0
- package/dist/components/label.d.ts +4 -0
- package/dist/components/label.mjs +21 -0
- package/dist/components/language-switcher.cjs +43 -0
- package/dist/components/language-switcher.d.ts +2 -0
- package/dist/components/language-switcher.mjs +30 -0
- package/dist/components/menubar.cjs +207 -0
- package/dist/components/menubar.d.ts +26 -0
- package/dist/components/menubar.mjs +246 -0
- package/dist/components/navigation-menu.cjs +113 -0
- package/dist/components/navigation-menu.d.ts +14 -0
- package/dist/components/navigation-menu.mjs +166 -0
- package/dist/components/pagination.cjs +106 -0
- package/dist/components/pagination.d.ts +15 -0
- package/dist/components/pagination.mjs +116 -0
- package/dist/components/popover.cjs +53 -0
- package/dist/components/popover.d.ts +7 -0
- package/dist/components/popover.mjs +40 -0
- package/dist/components/progress.cjs +29 -0
- package/dist/components/progress.d.ts +4 -0
- package/dist/components/progress.mjs +30 -0
- package/dist/components/radio-group.cjs +39 -0
- package/dist/components/radio-group.d.ts +5 -0
- package/dist/components/radio-group.mjs +43 -0
- package/dist/components/scroll-area.cjs +45 -0
- package/dist/components/scroll-area.d.ts +7 -0
- package/dist/components/scroll-area.mjs +59 -0
- package/dist/components/select.cjs +140 -0
- package/dist/components/select.d.ts +15 -0
- package/dist/components/select.mjs +173 -0
- package/dist/components/separator.cjs +26 -0
- package/dist/components/separator.d.ts +4 -0
- package/dist/components/separator.mjs +25 -0
- package/dist/components/sheet.cjs +120 -0
- package/dist/components/sheet.d.ts +13 -0
- package/dist/components/sheet.mjs +119 -0
- package/dist/components/sidebar.cjs +508 -0
- package/dist/components/sidebar.d.ts +69 -0
- package/dist/components/sidebar.mjs +635 -0
- package/dist/components/skeleton.cjs +20 -0
- package/dist/components/skeleton.d.ts +3 -0
- package/dist/components/skeleton.mjs +13 -0
- package/dist/components/slider.cjs +43 -0
- package/dist/components/slider.d.ts +4 -0
- package/dist/components/slider.mjs +59 -0
- package/dist/components/sonner.cjs +49 -0
- package/dist/components/sonner.d.ts +4 -0
- package/dist/components/sonner.mjs +36 -0
- package/dist/components/spinner.cjs +22 -0
- package/dist/components/spinner.d.ts +3 -0
- package/dist/components/spinner.mjs +15 -0
- package/dist/components/switch.cjs +25 -0
- package/dist/components/switch.d.ts +4 -0
- package/dist/components/switch.mjs +30 -0
- package/dist/components/table.cjs +101 -0
- package/dist/components/table.d.ts +10 -0
- package/dist/components/table.mjs +115 -0
- package/dist/components/tabs.cjs +55 -0
- package/dist/components/tabs.d.ts +7 -0
- package/dist/components/tabs.mjs +63 -0
- package/dist/components/textarea.cjs +20 -0
- package/dist/components/textarea.d.ts +3 -0
- package/dist/components/textarea.mjs +16 -0
- package/dist/components/toggle-group.cjs +65 -0
- package/dist/components/toggle-group.d.ts +9 -0
- package/dist/components/toggle-group.mjs +65 -0
- package/dist/components/toggle.cjs +47 -0
- package/dist/components/toggle.d.ts +9 -0
- package/dist/components/toggle.mjs +41 -0
- package/dist/components/tooltip.cjs +56 -0
- package/dist/components/tooltip.d.ts +7 -0
- package/dist/components/tooltip.mjs +49 -0
- package/dist/hooks/.gitkeep +0 -0
- package/dist/hooks/use-mobile.cjs +23 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.mjs +17 -0
- package/dist/hooks/use-user.cjs +21 -0
- package/dist/hooks/use-user.d.ts +12 -0
- package/dist/hooks/use-user.mjs +12 -0
- package/dist/index.cjs +155 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.mjs +13 -0
- package/dist/lib/utils.cjs +11 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.mjs +5 -0
- package/dist/logo.cjs +49 -0
- package/dist/logo.d.ts +15 -0
- package/dist/logo.mjs +32 -0
- package/dist/postcss.config.cjs +13 -0
- package/dist/postcss.config.d.mts +3 -0
- package/dist/postcss.config.mjs +6 -0
- package/dist/providers/auth-provider.cjs +44 -0
- package/dist/providers/auth-provider.d.ts +15 -0
- package/dist/providers/auth-provider.mjs +37 -0
- package/dist/providers/index.cjs +47 -0
- package/dist/providers/index.d.ts +7 -0
- package/dist/providers/index.mjs +33 -0
- package/dist/shared/access-denied.cjs +38 -0
- package/dist/shared/access-denied.d.ts +2 -0
- package/dist/shared/access-denied.mjs +12 -0
- package/dist/shared/loader.cjs +95 -0
- package/dist/shared/loader.d.ts +11 -0
- package/dist/shared/loader.mjs +98 -0
- package/dist/shared/page-loader.cjs +23 -0
- package/dist/shared/page-loader.d.ts +7 -0
- package/dist/shared/page-loader.mjs +6 -0
- package/dist/shared/scroll-fade-effect.cjs +21 -0
- package/dist/shared/scroll-fade-effect.d.ts +4 -0
- package/dist/shared/scroll-fade-effect.mjs +20 -0
- package/dist/styles/globals.css +1 -0
- package/package.json +58 -49
- package/scripts/switchToDist.js +55 -0
- package/scripts/switchToSrc.js +52 -0
- package/src/components/accordion.tsx +2 -2
- package/src/components/alert-dialog.tsx +1 -1
- package/src/components/alert.tsx +1 -1
- package/src/components/aspect-ratio.tsx +2 -1
- package/src/components/avatar.tsx +1 -1
- package/src/components/badge.tsx +3 -3
- package/src/components/breadcrumb.tsx +5 -3
- package/src/components/button-group.tsx +4 -2
- package/src/components/button.tsx +3 -3
- package/src/components/calendar.tsx +2 -2
- package/src/components/checkbox.tsx +2 -2
- package/src/components/collapsible.tsx +2 -1
- package/src/components/command.tsx +1 -1
- package/src/components/context-menu.tsx +2 -2
- package/src/components/dialog.tsx +2 -2
- package/src/components/dropdown-menu.tsx +2 -2
- package/src/components/empty.tsx +1 -0
- package/src/components/field.tsx +5 -2
- package/src/components/form.tsx +9 -7
- package/src/components/hover-card.tsx +1 -1
- package/src/components/input-group.tsx +1 -1
- package/src/components/input-otp.tsx +1 -1
- package/src/components/item.tsx +3 -3
- package/src/components/kbd.tsx +1 -0
- package/src/components/label.tsx +1 -1
- package/src/components/language-switcher.tsx +16 -17
- package/src/components/menubar.tsx +2 -2
- package/src/components/navigation-menu.tsx +2 -2
- package/src/components/pagination.tsx +5 -2
- package/src/components/popover.tsx +1 -1
- package/src/components/progress.tsx +1 -1
- package/src/components/radio-group.tsx +2 -2
- package/src/components/scroll-area.tsx +1 -1
- package/src/components/select.tsx +2 -2
- package/src/components/separator.tsx +1 -1
- package/src/components/sheet.tsx +2 -2
- package/src/components/sidebar.tsx +6 -6
- package/src/components/skeleton.tsx +1 -0
- package/src/components/slider.tsx +1 -1
- package/src/components/sonner.tsx +1 -0
- package/src/components/spinner.tsx +1 -0
- package/src/components/switch.tsx +1 -1
- package/src/components/tabs.tsx +1 -1
- package/src/components/toggle-group.tsx +2 -2
- package/src/components/toggle.tsx +2 -2
- package/src/components/tooltip.tsx +1 -1
- package/src/hooks/use-user.ts +2 -2
- package/src/index.ts +8 -5
- package/src/logo.tsx +1 -0
- package/src/providers/auth-provider.tsx +7 -6
- package/src/providers/index.tsx +1 -0
- package/src/shared/access-denied.tsx +1 -0
- package/src/shared/loader.tsx +2 -1
- package/src/shared/page-loader.tsx +1 -0
- package/src/shared/scroll-fade-effect.tsx +1 -1
- package/src/styles/globals.css +258 -244
- package/biome.json +0 -38
- package/src/components/carousel.tsx +0 -241
- package/src/components/chart.tsx +0 -357
- package/tsconfig.build.json +0 -16
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.Menubar = Menubar;
|
|
8
|
+
exports.MenubarCheckboxItem = MenubarCheckboxItem;
|
|
9
|
+
exports.MenubarContent = MenubarContent;
|
|
10
|
+
exports.MenubarGroup = MenubarGroup;
|
|
11
|
+
exports.MenubarItem = MenubarItem;
|
|
12
|
+
exports.MenubarLabel = MenubarLabel;
|
|
13
|
+
exports.MenubarMenu = MenubarMenu;
|
|
14
|
+
exports.MenubarPortal = MenubarPortal;
|
|
15
|
+
exports.MenubarRadioGroup = MenubarRadioGroup;
|
|
16
|
+
exports.MenubarRadioItem = MenubarRadioItem;
|
|
17
|
+
exports.MenubarSeparator = MenubarSeparator;
|
|
18
|
+
exports.MenubarShortcut = MenubarShortcut;
|
|
19
|
+
exports.MenubarSub = MenubarSub;
|
|
20
|
+
exports.MenubarSubContent = MenubarSubContent;
|
|
21
|
+
exports.MenubarSubTrigger = MenubarSubTrigger;
|
|
22
|
+
exports.MenubarTrigger = MenubarTrigger;
|
|
23
|
+
var _radixUi = require("radix-ui");
|
|
24
|
+
var _lucideReact = require("lucide-react");
|
|
25
|
+
var React = _interopRequireWildcard(require("react"));
|
|
26
|
+
var _utils = require("../lib/utils.cjs");
|
|
27
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
28
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
29
|
+
function Menubar({
|
|
30
|
+
className,
|
|
31
|
+
...props
|
|
32
|
+
}) {
|
|
33
|
+
return /* @__PURE__ */React.createElement(_radixUi.Menubar.Root, {
|
|
34
|
+
"data-slot": "menubar",
|
|
35
|
+
className: (0, _utils.cn)("bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs", className),
|
|
36
|
+
...props
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function MenubarMenu({
|
|
40
|
+
...props
|
|
41
|
+
}) {
|
|
42
|
+
return /* @__PURE__ */React.createElement(_radixUi.Menubar.Menu, {
|
|
43
|
+
"data-slot": "menubar-menu",
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function MenubarGroup({
|
|
48
|
+
...props
|
|
49
|
+
}) {
|
|
50
|
+
return /* @__PURE__ */React.createElement(_radixUi.Menubar.Group, {
|
|
51
|
+
"data-slot": "menubar-group",
|
|
52
|
+
...props
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function MenubarPortal({
|
|
56
|
+
...props
|
|
57
|
+
}) {
|
|
58
|
+
return /* @__PURE__ */React.createElement(_radixUi.Menubar.Portal, {
|
|
59
|
+
"data-slot": "menubar-portal",
|
|
60
|
+
...props
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function MenubarRadioGroup({
|
|
64
|
+
...props
|
|
65
|
+
}) {
|
|
66
|
+
return /* @__PURE__ */React.createElement(_radixUi.Menubar.RadioGroup, {
|
|
67
|
+
"data-slot": "menubar-radio-group",
|
|
68
|
+
...props
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function MenubarTrigger({
|
|
72
|
+
className,
|
|
73
|
+
...props
|
|
74
|
+
}) {
|
|
75
|
+
return /* @__PURE__ */React.createElement(_radixUi.Menubar.Trigger, {
|
|
76
|
+
"data-slot": "menubar-trigger",
|
|
77
|
+
className: (0, _utils.cn)("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none", className),
|
|
78
|
+
...props
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
function MenubarContent({
|
|
82
|
+
className,
|
|
83
|
+
align = "start",
|
|
84
|
+
alignOffset = -4,
|
|
85
|
+
sideOffset = 8,
|
|
86
|
+
...props
|
|
87
|
+
}) {
|
|
88
|
+
return /* @__PURE__ */React.createElement(MenubarPortal, null, /* @__PURE__ */React.createElement(_radixUi.Menubar.Content, {
|
|
89
|
+
"data-slot": "menubar-content",
|
|
90
|
+
align,
|
|
91
|
+
alignOffset,
|
|
92
|
+
sideOffset,
|
|
93
|
+
className: (0, _utils.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md", className),
|
|
94
|
+
...props
|
|
95
|
+
}));
|
|
96
|
+
}
|
|
97
|
+
function MenubarItem({
|
|
98
|
+
className,
|
|
99
|
+
inset,
|
|
100
|
+
variant = "default",
|
|
101
|
+
...props
|
|
102
|
+
}) {
|
|
103
|
+
return /* @__PURE__ */React.createElement(_radixUi.Menubar.Item, {
|
|
104
|
+
"data-slot": "menubar-item",
|
|
105
|
+
"data-inset": inset,
|
|
106
|
+
"data-variant": variant,
|
|
107
|
+
className: (0, _utils.cn)("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
108
|
+
...props
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
function MenubarCheckboxItem({
|
|
112
|
+
className,
|
|
113
|
+
children,
|
|
114
|
+
checked,
|
|
115
|
+
...props
|
|
116
|
+
}) {
|
|
117
|
+
return /* @__PURE__ */React.createElement(_radixUi.Menubar.CheckboxItem, {
|
|
118
|
+
"data-slot": "menubar-checkbox-item",
|
|
119
|
+
className: (0, _utils.cn)("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
120
|
+
checked,
|
|
121
|
+
...props
|
|
122
|
+
}, /* @__PURE__ */React.createElement("span", {
|
|
123
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center"
|
|
124
|
+
}, /* @__PURE__ */React.createElement(_radixUi.Menubar.ItemIndicator, null, /* @__PURE__ */React.createElement(_lucideReact.CheckIcon, {
|
|
125
|
+
className: "size-4"
|
|
126
|
+
}))), children);
|
|
127
|
+
}
|
|
128
|
+
function MenubarRadioItem({
|
|
129
|
+
className,
|
|
130
|
+
children,
|
|
131
|
+
...props
|
|
132
|
+
}) {
|
|
133
|
+
return /* @__PURE__ */React.createElement(_radixUi.Menubar.RadioItem, {
|
|
134
|
+
"data-slot": "menubar-radio-item",
|
|
135
|
+
className: (0, _utils.cn)("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
136
|
+
...props
|
|
137
|
+
}, /* @__PURE__ */React.createElement("span", {
|
|
138
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center"
|
|
139
|
+
}, /* @__PURE__ */React.createElement(_radixUi.Menubar.ItemIndicator, null, /* @__PURE__ */React.createElement(_lucideReact.CircleIcon, {
|
|
140
|
+
className: "size-2 fill-current"
|
|
141
|
+
}))), children);
|
|
142
|
+
}
|
|
143
|
+
function MenubarLabel({
|
|
144
|
+
className,
|
|
145
|
+
inset,
|
|
146
|
+
...props
|
|
147
|
+
}) {
|
|
148
|
+
return /* @__PURE__ */React.createElement(_radixUi.Menubar.Label, {
|
|
149
|
+
"data-slot": "menubar-label",
|
|
150
|
+
"data-inset": inset,
|
|
151
|
+
className: (0, _utils.cn)("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className),
|
|
152
|
+
...props
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
function MenubarSeparator({
|
|
156
|
+
className,
|
|
157
|
+
...props
|
|
158
|
+
}) {
|
|
159
|
+
return /* @__PURE__ */React.createElement(_radixUi.Menubar.Separator, {
|
|
160
|
+
"data-slot": "menubar-separator",
|
|
161
|
+
className: (0, _utils.cn)("bg-border -mx-1 my-1 h-px", className),
|
|
162
|
+
...props
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
function MenubarShortcut({
|
|
166
|
+
className,
|
|
167
|
+
...props
|
|
168
|
+
}) {
|
|
169
|
+
return /* @__PURE__ */React.createElement("span", {
|
|
170
|
+
"data-slot": "menubar-shortcut",
|
|
171
|
+
className: (0, _utils.cn)("text-muted-foreground ml-auto text-xs tracking-widest", className),
|
|
172
|
+
...props
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
function MenubarSub({
|
|
176
|
+
...props
|
|
177
|
+
}) {
|
|
178
|
+
return /* @__PURE__ */React.createElement(_radixUi.Menubar.Sub, {
|
|
179
|
+
"data-slot": "menubar-sub",
|
|
180
|
+
...props
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
function MenubarSubTrigger({
|
|
184
|
+
className,
|
|
185
|
+
inset,
|
|
186
|
+
children,
|
|
187
|
+
...props
|
|
188
|
+
}) {
|
|
189
|
+
return /* @__PURE__ */React.createElement(_radixUi.Menubar.SubTrigger, {
|
|
190
|
+
"data-slot": "menubar-sub-trigger",
|
|
191
|
+
"data-inset": inset,
|
|
192
|
+
className: (0, _utils.cn)("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8", className),
|
|
193
|
+
...props
|
|
194
|
+
}, children, /* @__PURE__ */React.createElement(_lucideReact.ChevronRightIcon, {
|
|
195
|
+
className: "ml-auto h-4 w-4"
|
|
196
|
+
}));
|
|
197
|
+
}
|
|
198
|
+
function MenubarSubContent({
|
|
199
|
+
className,
|
|
200
|
+
...props
|
|
201
|
+
}) {
|
|
202
|
+
return /* @__PURE__ */React.createElement(_radixUi.Menubar.SubContent, {
|
|
203
|
+
"data-slot": "menubar-sub-content",
|
|
204
|
+
className: (0, _utils.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", className),
|
|
205
|
+
...props
|
|
206
|
+
});
|
|
207
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Menubar as MenubarPrimitive } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare function Menubar({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function MenubarMenu({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Menu>): React.JSX.Element;
|
|
5
|
+
declare function MenubarGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Group>): React.JSX.Element;
|
|
6
|
+
declare function MenubarPortal({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Portal>): React.JSX.Element;
|
|
7
|
+
declare function MenubarRadioGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>): React.JSX.Element;
|
|
8
|
+
declare function MenubarTrigger({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Trigger>): React.JSX.Element;
|
|
9
|
+
declare function MenubarContent({ className, align, alignOffset, sideOffset, ...props }: React.ComponentProps<typeof MenubarPrimitive.Content>): React.JSX.Element;
|
|
10
|
+
declare function MenubarItem({ className, inset, variant, ...props }: React.ComponentProps<typeof MenubarPrimitive.Item> & {
|
|
11
|
+
inset?: boolean;
|
|
12
|
+
variant?: "default" | "destructive";
|
|
13
|
+
}): React.JSX.Element;
|
|
14
|
+
declare function MenubarCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof MenubarPrimitive.CheckboxItem>): React.JSX.Element;
|
|
15
|
+
declare function MenubarRadioItem({ className, children, ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioItem>): React.JSX.Element;
|
|
16
|
+
declare function MenubarLabel({ className, inset, ...props }: React.ComponentProps<typeof MenubarPrimitive.Label> & {
|
|
17
|
+
inset?: boolean;
|
|
18
|
+
}): React.JSX.Element;
|
|
19
|
+
declare function MenubarSeparator({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Separator>): React.JSX.Element;
|
|
20
|
+
declare function MenubarShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
21
|
+
declare function MenubarSub({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Sub>): React.JSX.Element;
|
|
22
|
+
declare function MenubarSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof MenubarPrimitive.SubTrigger> & {
|
|
23
|
+
inset?: boolean;
|
|
24
|
+
}): React.JSX.Element;
|
|
25
|
+
declare function MenubarSubContent({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.SubContent>): React.JSX.Element;
|
|
26
|
+
export { Menubar, MenubarPortal, MenubarMenu, MenubarTrigger, MenubarContent, MenubarGroup, MenubarSeparator, MenubarLabel, MenubarItem, MenubarShortcut, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarSub, MenubarSubTrigger, MenubarSubContent, };
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Menubar as MenubarPrimitive } from "radix-ui";
|
|
3
|
+
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { cn } from "../lib/utils.mjs";
|
|
6
|
+
function Menubar({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ React.createElement(
|
|
11
|
+
MenubarPrimitive.Root,
|
|
12
|
+
{
|
|
13
|
+
"data-slot": "menubar",
|
|
14
|
+
className: cn(
|
|
15
|
+
"bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",
|
|
16
|
+
className
|
|
17
|
+
),
|
|
18
|
+
...props
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
function MenubarMenu({
|
|
23
|
+
...props
|
|
24
|
+
}) {
|
|
25
|
+
return /* @__PURE__ */ React.createElement(MenubarPrimitive.Menu, { "data-slot": "menubar-menu", ...props });
|
|
26
|
+
}
|
|
27
|
+
function MenubarGroup({
|
|
28
|
+
...props
|
|
29
|
+
}) {
|
|
30
|
+
return /* @__PURE__ */ React.createElement(MenubarPrimitive.Group, { "data-slot": "menubar-group", ...props });
|
|
31
|
+
}
|
|
32
|
+
function MenubarPortal({
|
|
33
|
+
...props
|
|
34
|
+
}) {
|
|
35
|
+
return /* @__PURE__ */ React.createElement(MenubarPrimitive.Portal, { "data-slot": "menubar-portal", ...props });
|
|
36
|
+
}
|
|
37
|
+
function MenubarRadioGroup({
|
|
38
|
+
...props
|
|
39
|
+
}) {
|
|
40
|
+
return /* @__PURE__ */ React.createElement(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
|
|
41
|
+
}
|
|
42
|
+
function MenubarTrigger({
|
|
43
|
+
className,
|
|
44
|
+
...props
|
|
45
|
+
}) {
|
|
46
|
+
return /* @__PURE__ */ React.createElement(
|
|
47
|
+
MenubarPrimitive.Trigger,
|
|
48
|
+
{
|
|
49
|
+
"data-slot": "menubar-trigger",
|
|
50
|
+
className: cn(
|
|
51
|
+
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",
|
|
52
|
+
className
|
|
53
|
+
),
|
|
54
|
+
...props
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
function MenubarContent({
|
|
59
|
+
className,
|
|
60
|
+
align = "start",
|
|
61
|
+
alignOffset = -4,
|
|
62
|
+
sideOffset = 8,
|
|
63
|
+
...props
|
|
64
|
+
}) {
|
|
65
|
+
return /* @__PURE__ */ React.createElement(MenubarPortal, null, /* @__PURE__ */ React.createElement(
|
|
66
|
+
MenubarPrimitive.Content,
|
|
67
|
+
{
|
|
68
|
+
"data-slot": "menubar-content",
|
|
69
|
+
align,
|
|
70
|
+
alignOffset,
|
|
71
|
+
sideOffset,
|
|
72
|
+
className: cn(
|
|
73
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",
|
|
74
|
+
className
|
|
75
|
+
),
|
|
76
|
+
...props
|
|
77
|
+
}
|
|
78
|
+
));
|
|
79
|
+
}
|
|
80
|
+
function MenubarItem({
|
|
81
|
+
className,
|
|
82
|
+
inset,
|
|
83
|
+
variant = "default",
|
|
84
|
+
...props
|
|
85
|
+
}) {
|
|
86
|
+
return /* @__PURE__ */ React.createElement(
|
|
87
|
+
MenubarPrimitive.Item,
|
|
88
|
+
{
|
|
89
|
+
"data-slot": "menubar-item",
|
|
90
|
+
"data-inset": inset,
|
|
91
|
+
"data-variant": variant,
|
|
92
|
+
className: cn(
|
|
93
|
+
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
94
|
+
className
|
|
95
|
+
),
|
|
96
|
+
...props
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
function MenubarCheckboxItem({
|
|
101
|
+
className,
|
|
102
|
+
children,
|
|
103
|
+
checked,
|
|
104
|
+
...props
|
|
105
|
+
}) {
|
|
106
|
+
return /* @__PURE__ */ React.createElement(
|
|
107
|
+
MenubarPrimitive.CheckboxItem,
|
|
108
|
+
{
|
|
109
|
+
"data-slot": "menubar-checkbox-item",
|
|
110
|
+
className: cn(
|
|
111
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
112
|
+
className
|
|
113
|
+
),
|
|
114
|
+
checked,
|
|
115
|
+
...props
|
|
116
|
+
},
|
|
117
|
+
/* @__PURE__ */ React.createElement("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center" }, /* @__PURE__ */ React.createElement(MenubarPrimitive.ItemIndicator, null, /* @__PURE__ */ React.createElement(CheckIcon, { className: "size-4" }))),
|
|
118
|
+
children
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
function MenubarRadioItem({
|
|
122
|
+
className,
|
|
123
|
+
children,
|
|
124
|
+
...props
|
|
125
|
+
}) {
|
|
126
|
+
return /* @__PURE__ */ React.createElement(
|
|
127
|
+
MenubarPrimitive.RadioItem,
|
|
128
|
+
{
|
|
129
|
+
"data-slot": "menubar-radio-item",
|
|
130
|
+
className: cn(
|
|
131
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
132
|
+
className
|
|
133
|
+
),
|
|
134
|
+
...props
|
|
135
|
+
},
|
|
136
|
+
/* @__PURE__ */ React.createElement("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center" }, /* @__PURE__ */ React.createElement(MenubarPrimitive.ItemIndicator, null, /* @__PURE__ */ React.createElement(CircleIcon, { className: "size-2 fill-current" }))),
|
|
137
|
+
children
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
function MenubarLabel({
|
|
141
|
+
className,
|
|
142
|
+
inset,
|
|
143
|
+
...props
|
|
144
|
+
}) {
|
|
145
|
+
return /* @__PURE__ */ React.createElement(
|
|
146
|
+
MenubarPrimitive.Label,
|
|
147
|
+
{
|
|
148
|
+
"data-slot": "menubar-label",
|
|
149
|
+
"data-inset": inset,
|
|
150
|
+
className: cn(
|
|
151
|
+
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
152
|
+
className
|
|
153
|
+
),
|
|
154
|
+
...props
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
function MenubarSeparator({
|
|
159
|
+
className,
|
|
160
|
+
...props
|
|
161
|
+
}) {
|
|
162
|
+
return /* @__PURE__ */ React.createElement(
|
|
163
|
+
MenubarPrimitive.Separator,
|
|
164
|
+
{
|
|
165
|
+
"data-slot": "menubar-separator",
|
|
166
|
+
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
167
|
+
...props
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
function MenubarShortcut({
|
|
172
|
+
className,
|
|
173
|
+
...props
|
|
174
|
+
}) {
|
|
175
|
+
return /* @__PURE__ */ React.createElement(
|
|
176
|
+
"span",
|
|
177
|
+
{
|
|
178
|
+
"data-slot": "menubar-shortcut",
|
|
179
|
+
className: cn(
|
|
180
|
+
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
181
|
+
className
|
|
182
|
+
),
|
|
183
|
+
...props
|
|
184
|
+
}
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
function MenubarSub({
|
|
188
|
+
...props
|
|
189
|
+
}) {
|
|
190
|
+
return /* @__PURE__ */ React.createElement(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
|
|
191
|
+
}
|
|
192
|
+
function MenubarSubTrigger({
|
|
193
|
+
className,
|
|
194
|
+
inset,
|
|
195
|
+
children,
|
|
196
|
+
...props
|
|
197
|
+
}) {
|
|
198
|
+
return /* @__PURE__ */ React.createElement(
|
|
199
|
+
MenubarPrimitive.SubTrigger,
|
|
200
|
+
{
|
|
201
|
+
"data-slot": "menubar-sub-trigger",
|
|
202
|
+
"data-inset": inset,
|
|
203
|
+
className: cn(
|
|
204
|
+
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8",
|
|
205
|
+
className
|
|
206
|
+
),
|
|
207
|
+
...props
|
|
208
|
+
},
|
|
209
|
+
children,
|
|
210
|
+
/* @__PURE__ */ React.createElement(ChevronRightIcon, { className: "ml-auto h-4 w-4" })
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
function MenubarSubContent({
|
|
214
|
+
className,
|
|
215
|
+
...props
|
|
216
|
+
}) {
|
|
217
|
+
return /* @__PURE__ */ React.createElement(
|
|
218
|
+
MenubarPrimitive.SubContent,
|
|
219
|
+
{
|
|
220
|
+
"data-slot": "menubar-sub-content",
|
|
221
|
+
className: cn(
|
|
222
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
223
|
+
className
|
|
224
|
+
),
|
|
225
|
+
...props
|
|
226
|
+
}
|
|
227
|
+
);
|
|
228
|
+
}
|
|
229
|
+
export {
|
|
230
|
+
Menubar,
|
|
231
|
+
MenubarPortal,
|
|
232
|
+
MenubarMenu,
|
|
233
|
+
MenubarTrigger,
|
|
234
|
+
MenubarContent,
|
|
235
|
+
MenubarGroup,
|
|
236
|
+
MenubarSeparator,
|
|
237
|
+
MenubarLabel,
|
|
238
|
+
MenubarItem,
|
|
239
|
+
MenubarShortcut,
|
|
240
|
+
MenubarCheckboxItem,
|
|
241
|
+
MenubarRadioGroup,
|
|
242
|
+
MenubarRadioItem,
|
|
243
|
+
MenubarSub,
|
|
244
|
+
MenubarSubTrigger,
|
|
245
|
+
MenubarSubContent
|
|
246
|
+
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.NavigationMenu = NavigationMenu;
|
|
7
|
+
exports.NavigationMenuContent = NavigationMenuContent;
|
|
8
|
+
exports.NavigationMenuIndicator = NavigationMenuIndicator;
|
|
9
|
+
exports.NavigationMenuItem = NavigationMenuItem;
|
|
10
|
+
exports.NavigationMenuLink = NavigationMenuLink;
|
|
11
|
+
exports.NavigationMenuList = NavigationMenuList;
|
|
12
|
+
exports.NavigationMenuTrigger = NavigationMenuTrigger;
|
|
13
|
+
exports.NavigationMenuViewport = NavigationMenuViewport;
|
|
14
|
+
exports.navigationMenuTriggerStyle = void 0;
|
|
15
|
+
var _radixUi = require("radix-ui");
|
|
16
|
+
var _classVarianceAuthority = require("class-variance-authority");
|
|
17
|
+
var _lucideReact = require("lucide-react");
|
|
18
|
+
var React = _interopRequireWildcard(require("react"));
|
|
19
|
+
var _utils = require("../lib/utils.cjs");
|
|
20
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
21
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
|
+
function NavigationMenu({
|
|
23
|
+
className,
|
|
24
|
+
children,
|
|
25
|
+
viewport = true,
|
|
26
|
+
...props
|
|
27
|
+
}) {
|
|
28
|
+
return /* @__PURE__ */React.createElement(_radixUi.NavigationMenu.Root, {
|
|
29
|
+
"data-slot": "navigation-menu",
|
|
30
|
+
"data-viewport": viewport,
|
|
31
|
+
className: (0, _utils.cn)("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", className),
|
|
32
|
+
...props
|
|
33
|
+
}, children, viewport && /* @__PURE__ */React.createElement(NavigationMenuViewport, null));
|
|
34
|
+
}
|
|
35
|
+
function NavigationMenuList({
|
|
36
|
+
className,
|
|
37
|
+
...props
|
|
38
|
+
}) {
|
|
39
|
+
return /* @__PURE__ */React.createElement(_radixUi.NavigationMenu.List, {
|
|
40
|
+
"data-slot": "navigation-menu-list",
|
|
41
|
+
className: (0, _utils.cn)("group flex flex-1 list-none items-center justify-center gap-1", className),
|
|
42
|
+
...props
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function NavigationMenuItem({
|
|
46
|
+
className,
|
|
47
|
+
...props
|
|
48
|
+
}) {
|
|
49
|
+
return /* @__PURE__ */React.createElement(_radixUi.NavigationMenu.Item, {
|
|
50
|
+
"data-slot": "navigation-menu-item",
|
|
51
|
+
className: (0, _utils.cn)("relative", className),
|
|
52
|
+
...props
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
const navigationMenuTriggerStyle = exports.navigationMenuTriggerStyle = (0, _classVarianceAuthority.cva)("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1");
|
|
56
|
+
function NavigationMenuTrigger({
|
|
57
|
+
className,
|
|
58
|
+
children,
|
|
59
|
+
...props
|
|
60
|
+
}) {
|
|
61
|
+
return /* @__PURE__ */React.createElement(_radixUi.NavigationMenu.Trigger, {
|
|
62
|
+
"data-slot": "navigation-menu-trigger",
|
|
63
|
+
className: (0, _utils.cn)(navigationMenuTriggerStyle(), "group", className),
|
|
64
|
+
...props
|
|
65
|
+
}, children, " ", /* @__PURE__ */React.createElement(_lucideReact.ChevronDownIcon, {
|
|
66
|
+
className: "relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
67
|
+
"aria-hidden": "true"
|
|
68
|
+
}));
|
|
69
|
+
}
|
|
70
|
+
function NavigationMenuContent({
|
|
71
|
+
className,
|
|
72
|
+
...props
|
|
73
|
+
}) {
|
|
74
|
+
return /* @__PURE__ */React.createElement(_radixUi.NavigationMenu.Content, {
|
|
75
|
+
"data-slot": "navigation-menu-content",
|
|
76
|
+
className: (0, _utils.cn)("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 p-2 pr-2.5 md:absolute md:w-auto", "group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none", className),
|
|
77
|
+
...props
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function NavigationMenuViewport({
|
|
81
|
+
className,
|
|
82
|
+
...props
|
|
83
|
+
}) {
|
|
84
|
+
return /* @__PURE__ */React.createElement("div", {
|
|
85
|
+
className: (0, _utils.cn)("absolute top-full left-0 isolate z-50 flex justify-center")
|
|
86
|
+
}, /* @__PURE__ */React.createElement(_radixUi.NavigationMenu.Viewport, {
|
|
87
|
+
"data-slot": "navigation-menu-viewport",
|
|
88
|
+
className: (0, _utils.cn)("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)]", className),
|
|
89
|
+
...props
|
|
90
|
+
}));
|
|
91
|
+
}
|
|
92
|
+
function NavigationMenuLink({
|
|
93
|
+
className,
|
|
94
|
+
...props
|
|
95
|
+
}) {
|
|
96
|
+
return /* @__PURE__ */React.createElement(_radixUi.NavigationMenu.Link, {
|
|
97
|
+
"data-slot": "navigation-menu-link",
|
|
98
|
+
className: (0, _utils.cn)("data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4", className),
|
|
99
|
+
...props
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function NavigationMenuIndicator({
|
|
103
|
+
className,
|
|
104
|
+
...props
|
|
105
|
+
}) {
|
|
106
|
+
return /* @__PURE__ */React.createElement(_radixUi.NavigationMenu.Indicator, {
|
|
107
|
+
"data-slot": "navigation-menu-indicator",
|
|
108
|
+
className: (0, _utils.cn)("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", className),
|
|
109
|
+
...props
|
|
110
|
+
}, /* @__PURE__ */React.createElement("div", {
|
|
111
|
+
className: "bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md"
|
|
112
|
+
}));
|
|
113
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NavigationMenu as NavigationMenuPrimitive } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare function NavigationMenu({ className, children, viewport, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Root> & {
|
|
4
|
+
viewport?: boolean;
|
|
5
|
+
}): React.JSX.Element;
|
|
6
|
+
declare function NavigationMenuList({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.List>): React.JSX.Element;
|
|
7
|
+
declare function NavigationMenuItem({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Item>): React.JSX.Element;
|
|
8
|
+
declare const navigationMenuTriggerStyle: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
9
|
+
declare function NavigationMenuTrigger({ className, children, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>): React.JSX.Element;
|
|
10
|
+
declare function NavigationMenuContent({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Content>): React.JSX.Element;
|
|
11
|
+
declare function NavigationMenuViewport({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>): React.JSX.Element;
|
|
12
|
+
declare function NavigationMenuLink({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Link>): React.JSX.Element;
|
|
13
|
+
declare function NavigationMenuIndicator({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Indicator>): React.JSX.Element;
|
|
14
|
+
export { NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, navigationMenuTriggerStyle, };
|