@0xchain/ui 1.1.0-beta.2 → 1.1.0-beta.21
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/LICENSE +21 -0
- package/dist/accordion.js +64 -0
- package/dist/alert-dialog.js +146 -0
- package/dist/{alert.mjs → alert.js} +26 -26
- package/dist/aspect-ratio.js +10 -0
- package/dist/avatar.js +53 -0
- package/dist/{badge.mjs → badge.js} +17 -16
- package/dist/breadcrumb.js +103 -0
- package/dist/{button.mjs → button.js} +18 -17
- package/dist/calendar.js +186 -0
- package/dist/card.js +90 -0
- package/dist/carousel.js +198 -0
- package/dist/{checkbox.mjs → checkbox.js} +16 -16
- package/dist/collapsible.js +34 -0
- package/dist/command.js +170 -0
- package/dist/context-menu.js +223 -0
- package/dist/dialog.js +136 -0
- package/dist/dropdown-menu.js +231 -0
- package/dist/form.js +116 -0
- package/dist/hover-card.js +38 -0
- package/dist/{input.mjs → input.js} +9 -9
- package/dist/{label.mjs → label.js} +12 -12
- package/dist/menubar.js +251 -0
- package/dist/{navigation-menu.mjs → navigation-menu.js} +89 -89
- package/dist/pagination.js +116 -0
- package/dist/popover.js +44 -0
- package/dist/progress.js +31 -0
- package/dist/radio-group.js +45 -0
- package/dist/resizable.js +48 -0
- package/dist/scroll-area.js +60 -0
- package/dist/select.js +169 -0
- package/dist/separator.js +26 -0
- package/dist/sheet.js +126 -0
- package/dist/skeleton.js +15 -0
- package/dist/{slider.mjs → slider.js} +33 -33
- package/dist/sonner.js +22 -0
- package/dist/{switch.mjs → switch.js} +15 -15
- package/dist/table.js +114 -0
- package/dist/{tabs.mjs → tabs.js} +37 -37
- package/dist/{textarea.mjs → textarea.js} +8 -8
- package/dist/toggle-group.js +62 -0
- package/dist/{toggle.mjs → toggle.js} +16 -16
- package/dist/tooltip.js +55 -0
- package/dist/utils-CzDCF-Ah.js +8 -0
- package/package.json +138 -89
- package/dist/accordion.mjs +0 -64
- package/dist/alert-dialog.mjs +0 -146
- package/dist/aspect-ratio.mjs +0 -10
- package/dist/avatar.mjs +0 -53
- package/dist/breadcrumb.mjs +0 -102
- package/dist/calendar.mjs +0 -173
- package/dist/card.mjs +0 -90
- package/dist/carousel.mjs +0 -177
- package/dist/collapsible.mjs +0 -34
- package/dist/command.mjs +0 -170
- package/dist/context-menu.mjs +0 -223
- package/dist/dialog.mjs +0 -136
- package/dist/dropdown-menu.mjs +0 -231
- package/dist/form.mjs +0 -101
- package/dist/hover-card.mjs +0 -38
- package/dist/menubar.mjs +0 -251
- package/dist/pagination.mjs +0 -116
- package/dist/popover.mjs +0 -44
- package/dist/progress.mjs +0 -31
- package/dist/radio-group.mjs +0 -45
- package/dist/resizable.mjs +0 -48
- package/dist/scroll-area.mjs +0 -60
- package/dist/select.mjs +0 -169
- package/dist/separator.mjs +0 -26
- package/dist/sheet.mjs +0 -126
- package/dist/skeleton.mjs +0 -15
- package/dist/sonner.mjs +0 -22
- package/dist/table.mjs +0 -114
- package/dist/toggle-group.mjs +0 -62
- package/dist/tooltip.mjs +0 -55
- package/dist/utils-B7J70Nno.js +0 -8
package/dist/menubar.js
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
3
|
+
import { CheckIcon, CircleIcon, ChevronRightIcon } from "lucide-react";
|
|
4
|
+
import { c as cn } from "./utils-CzDCF-Ah.js";
|
|
5
|
+
function Menubar({
|
|
6
|
+
className,
|
|
7
|
+
...props
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
MenubarPrimitive.Root,
|
|
11
|
+
{
|
|
12
|
+
"data-slot": "menubar",
|
|
13
|
+
className: cn(
|
|
14
|
+
"bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",
|
|
15
|
+
className
|
|
16
|
+
),
|
|
17
|
+
...props
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
function MenubarMenu({
|
|
22
|
+
...props
|
|
23
|
+
}) {
|
|
24
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Menu, { "data-slot": "menubar-menu", ...props });
|
|
25
|
+
}
|
|
26
|
+
function MenubarGroup({
|
|
27
|
+
...props
|
|
28
|
+
}) {
|
|
29
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Group, { "data-slot": "menubar-group", ...props });
|
|
30
|
+
}
|
|
31
|
+
function MenubarPortal({
|
|
32
|
+
...props
|
|
33
|
+
}) {
|
|
34
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { "data-slot": "menubar-portal", ...props });
|
|
35
|
+
}
|
|
36
|
+
function MenubarRadioGroup({
|
|
37
|
+
...props
|
|
38
|
+
}) {
|
|
39
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
|
|
40
|
+
}
|
|
41
|
+
function MenubarTrigger({
|
|
42
|
+
className,
|
|
43
|
+
...props
|
|
44
|
+
}) {
|
|
45
|
+
return /* @__PURE__ */ jsx(
|
|
46
|
+
MenubarPrimitive.Trigger,
|
|
47
|
+
{
|
|
48
|
+
"data-slot": "menubar-trigger",
|
|
49
|
+
className: cn(
|
|
50
|
+
"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",
|
|
51
|
+
className
|
|
52
|
+
),
|
|
53
|
+
...props
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
function MenubarContent({
|
|
58
|
+
className,
|
|
59
|
+
align = "start",
|
|
60
|
+
alignOffset = -4,
|
|
61
|
+
sideOffset = 8,
|
|
62
|
+
...props
|
|
63
|
+
}) {
|
|
64
|
+
return /* @__PURE__ */ jsx(MenubarPortal, { children: /* @__PURE__ */ jsx(
|
|
65
|
+
MenubarPrimitive.Content,
|
|
66
|
+
{
|
|
67
|
+
"data-slot": "menubar-content",
|
|
68
|
+
align,
|
|
69
|
+
alignOffset,
|
|
70
|
+
sideOffset,
|
|
71
|
+
className: cn(
|
|
72
|
+
"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",
|
|
73
|
+
className
|
|
74
|
+
),
|
|
75
|
+
...props
|
|
76
|
+
}
|
|
77
|
+
) });
|
|
78
|
+
}
|
|
79
|
+
function MenubarItem({
|
|
80
|
+
className,
|
|
81
|
+
inset,
|
|
82
|
+
variant = "default",
|
|
83
|
+
...props
|
|
84
|
+
}) {
|
|
85
|
+
return /* @__PURE__ */ jsx(
|
|
86
|
+
MenubarPrimitive.Item,
|
|
87
|
+
{
|
|
88
|
+
"data-slot": "menubar-item",
|
|
89
|
+
"data-inset": inset,
|
|
90
|
+
"data-variant": variant,
|
|
91
|
+
className: cn(
|
|
92
|
+
"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",
|
|
93
|
+
className
|
|
94
|
+
),
|
|
95
|
+
...props
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
function MenubarCheckboxItem({
|
|
100
|
+
className,
|
|
101
|
+
children,
|
|
102
|
+
checked,
|
|
103
|
+
...props
|
|
104
|
+
}) {
|
|
105
|
+
return /* @__PURE__ */ jsxs(
|
|
106
|
+
MenubarPrimitive.CheckboxItem,
|
|
107
|
+
{
|
|
108
|
+
"data-slot": "menubar-checkbox-item",
|
|
109
|
+
className: cn(
|
|
110
|
+
"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",
|
|
111
|
+
className
|
|
112
|
+
),
|
|
113
|
+
checked,
|
|
114
|
+
...props,
|
|
115
|
+
children: [
|
|
116
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
|
|
117
|
+
children
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
function MenubarRadioItem({
|
|
123
|
+
className,
|
|
124
|
+
children,
|
|
125
|
+
...props
|
|
126
|
+
}) {
|
|
127
|
+
return /* @__PURE__ */ jsxs(
|
|
128
|
+
MenubarPrimitive.RadioItem,
|
|
129
|
+
{
|
|
130
|
+
"data-slot": "menubar-radio-item",
|
|
131
|
+
className: cn(
|
|
132
|
+
"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",
|
|
133
|
+
className
|
|
134
|
+
),
|
|
135
|
+
...props,
|
|
136
|
+
children: [
|
|
137
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
|
|
138
|
+
children
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
function MenubarLabel({
|
|
144
|
+
className,
|
|
145
|
+
inset,
|
|
146
|
+
...props
|
|
147
|
+
}) {
|
|
148
|
+
return /* @__PURE__ */ jsx(
|
|
149
|
+
MenubarPrimitive.Label,
|
|
150
|
+
{
|
|
151
|
+
"data-slot": "menubar-label",
|
|
152
|
+
"data-inset": inset,
|
|
153
|
+
className: cn(
|
|
154
|
+
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
155
|
+
className
|
|
156
|
+
),
|
|
157
|
+
...props
|
|
158
|
+
}
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
function MenubarSeparator({
|
|
162
|
+
className,
|
|
163
|
+
...props
|
|
164
|
+
}) {
|
|
165
|
+
return /* @__PURE__ */ jsx(
|
|
166
|
+
MenubarPrimitive.Separator,
|
|
167
|
+
{
|
|
168
|
+
"data-slot": "menubar-separator",
|
|
169
|
+
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
170
|
+
...props
|
|
171
|
+
}
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
function MenubarShortcut({
|
|
175
|
+
className,
|
|
176
|
+
...props
|
|
177
|
+
}) {
|
|
178
|
+
return /* @__PURE__ */ jsx(
|
|
179
|
+
"span",
|
|
180
|
+
{
|
|
181
|
+
"data-slot": "menubar-shortcut",
|
|
182
|
+
className: cn(
|
|
183
|
+
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
184
|
+
className
|
|
185
|
+
),
|
|
186
|
+
...props
|
|
187
|
+
}
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
function MenubarSub({
|
|
191
|
+
...props
|
|
192
|
+
}) {
|
|
193
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
|
|
194
|
+
}
|
|
195
|
+
function MenubarSubTrigger({
|
|
196
|
+
className,
|
|
197
|
+
inset,
|
|
198
|
+
children,
|
|
199
|
+
...props
|
|
200
|
+
}) {
|
|
201
|
+
return /* @__PURE__ */ jsxs(
|
|
202
|
+
MenubarPrimitive.SubTrigger,
|
|
203
|
+
{
|
|
204
|
+
"data-slot": "menubar-sub-trigger",
|
|
205
|
+
"data-inset": inset,
|
|
206
|
+
className: cn(
|
|
207
|
+
"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",
|
|
208
|
+
className
|
|
209
|
+
),
|
|
210
|
+
...props,
|
|
211
|
+
children: [
|
|
212
|
+
children,
|
|
213
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto h-4 w-4" })
|
|
214
|
+
]
|
|
215
|
+
}
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
function MenubarSubContent({
|
|
219
|
+
className,
|
|
220
|
+
...props
|
|
221
|
+
}) {
|
|
222
|
+
return /* @__PURE__ */ jsx(
|
|
223
|
+
MenubarPrimitive.SubContent,
|
|
224
|
+
{
|
|
225
|
+
"data-slot": "menubar-sub-content",
|
|
226
|
+
className: cn(
|
|
227
|
+
"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",
|
|
228
|
+
className
|
|
229
|
+
),
|
|
230
|
+
...props
|
|
231
|
+
}
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
export {
|
|
235
|
+
Menubar,
|
|
236
|
+
MenubarCheckboxItem,
|
|
237
|
+
MenubarContent,
|
|
238
|
+
MenubarGroup,
|
|
239
|
+
MenubarItem,
|
|
240
|
+
MenubarLabel,
|
|
241
|
+
MenubarMenu,
|
|
242
|
+
MenubarPortal,
|
|
243
|
+
MenubarRadioGroup,
|
|
244
|
+
MenubarRadioItem,
|
|
245
|
+
MenubarSeparator,
|
|
246
|
+
MenubarShortcut,
|
|
247
|
+
MenubarSub,
|
|
248
|
+
MenubarSubContent,
|
|
249
|
+
MenubarSubTrigger,
|
|
250
|
+
MenubarTrigger
|
|
251
|
+
};
|
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
import { jsxs
|
|
2
|
-
import * as
|
|
3
|
-
import { cva
|
|
4
|
-
import { ChevronDownIcon
|
|
5
|
-
import { c as
|
|
6
|
-
function
|
|
7
|
-
className
|
|
8
|
-
children
|
|
9
|
-
viewport
|
|
10
|
-
...
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
5
|
+
import { c as cn } from "./utils-CzDCF-Ah.js";
|
|
6
|
+
function NavigationMenu({
|
|
7
|
+
className,
|
|
8
|
+
children,
|
|
9
|
+
viewport = true,
|
|
10
|
+
...props
|
|
11
11
|
}) {
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
-
|
|
12
|
+
return /* @__PURE__ */ jsxs(
|
|
13
|
+
NavigationMenuPrimitive.Root,
|
|
14
14
|
{
|
|
15
15
|
"data-slot": "navigation-menu",
|
|
16
|
-
"data-viewport":
|
|
17
|
-
className:
|
|
16
|
+
"data-viewport": viewport,
|
|
17
|
+
className: cn(
|
|
18
18
|
"group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
|
|
19
|
-
|
|
19
|
+
className
|
|
20
20
|
),
|
|
21
|
-
...
|
|
21
|
+
...props,
|
|
22
22
|
children: [
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
children,
|
|
24
|
+
viewport && /* @__PURE__ */ jsx(NavigationMenuViewport, {})
|
|
25
25
|
]
|
|
26
26
|
}
|
|
27
27
|
);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
className
|
|
31
|
-
...
|
|
29
|
+
function NavigationMenuList({
|
|
30
|
+
className,
|
|
31
|
+
...props
|
|
32
32
|
}) {
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
|
|
33
|
+
return /* @__PURE__ */ jsx(
|
|
34
|
+
NavigationMenuPrimitive.List,
|
|
35
35
|
{
|
|
36
36
|
"data-slot": "navigation-menu-list",
|
|
37
|
-
className:
|
|
37
|
+
className: cn(
|
|
38
38
|
"group flex flex-1 list-none items-center justify-center gap-1",
|
|
39
|
-
|
|
39
|
+
className
|
|
40
40
|
),
|
|
41
|
-
...
|
|
41
|
+
...props
|
|
42
42
|
}
|
|
43
43
|
);
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
className
|
|
47
|
-
...
|
|
45
|
+
function NavigationMenuItem({
|
|
46
|
+
className,
|
|
47
|
+
...props
|
|
48
48
|
}) {
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
-
|
|
49
|
+
return /* @__PURE__ */ jsx(
|
|
50
|
+
NavigationMenuPrimitive.Item,
|
|
51
51
|
{
|
|
52
52
|
"data-slot": "navigation-menu-item",
|
|
53
|
-
className:
|
|
54
|
-
...
|
|
53
|
+
className: cn("relative", className),
|
|
54
|
+
...props
|
|
55
55
|
}
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
|
-
const
|
|
58
|
+
const navigationMenuTriggerStyle = cva(
|
|
59
59
|
"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"
|
|
60
60
|
);
|
|
61
|
-
function
|
|
62
|
-
className
|
|
63
|
-
children
|
|
64
|
-
...
|
|
61
|
+
function NavigationMenuTrigger({
|
|
62
|
+
className,
|
|
63
|
+
children,
|
|
64
|
+
...props
|
|
65
65
|
}) {
|
|
66
|
-
return /* @__PURE__ */
|
|
67
|
-
|
|
66
|
+
return /* @__PURE__ */ jsxs(
|
|
67
|
+
NavigationMenuPrimitive.Trigger,
|
|
68
68
|
{
|
|
69
69
|
"data-slot": "navigation-menu-trigger",
|
|
70
|
-
className:
|
|
71
|
-
...
|
|
70
|
+
className: cn(navigationMenuTriggerStyle(), "group", className),
|
|
71
|
+
...props,
|
|
72
72
|
children: [
|
|
73
|
-
|
|
73
|
+
children,
|
|
74
74
|
" ",
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
|
|
75
|
+
/* @__PURE__ */ jsx(
|
|
76
|
+
ChevronDownIcon,
|
|
77
77
|
{
|
|
78
78
|
className: "relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
79
79
|
"aria-hidden": "true"
|
|
@@ -83,88 +83,88 @@ function b({
|
|
|
83
83
|
}
|
|
84
84
|
);
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
className
|
|
88
|
-
...
|
|
86
|
+
function NavigationMenuContent({
|
|
87
|
+
className,
|
|
88
|
+
...props
|
|
89
89
|
}) {
|
|
90
|
-
return /* @__PURE__ */
|
|
91
|
-
|
|
90
|
+
return /* @__PURE__ */ jsx(
|
|
91
|
+
NavigationMenuPrimitive.Content,
|
|
92
92
|
{
|
|
93
93
|
"data-slot": "navigation-menu-content",
|
|
94
|
-
className:
|
|
94
|
+
className: cn(
|
|
95
95
|
"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",
|
|
96
96
|
"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",
|
|
97
|
-
|
|
97
|
+
className
|
|
98
98
|
),
|
|
99
|
-
...
|
|
99
|
+
...props
|
|
100
100
|
}
|
|
101
101
|
);
|
|
102
102
|
}
|
|
103
|
-
function
|
|
104
|
-
className
|
|
105
|
-
...
|
|
103
|
+
function NavigationMenuViewport({
|
|
104
|
+
className,
|
|
105
|
+
...props
|
|
106
106
|
}) {
|
|
107
|
-
return /* @__PURE__ */
|
|
107
|
+
return /* @__PURE__ */ jsx(
|
|
108
108
|
"div",
|
|
109
109
|
{
|
|
110
|
-
className:
|
|
110
|
+
className: cn(
|
|
111
111
|
"absolute top-full left-0 isolate z-50 flex justify-center"
|
|
112
112
|
),
|
|
113
|
-
children: /* @__PURE__ */
|
|
114
|
-
|
|
113
|
+
children: /* @__PURE__ */ jsx(
|
|
114
|
+
NavigationMenuPrimitive.Viewport,
|
|
115
115
|
{
|
|
116
116
|
"data-slot": "navigation-menu-viewport",
|
|
117
|
-
className:
|
|
117
|
+
className: cn(
|
|
118
118
|
"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)]",
|
|
119
|
-
|
|
119
|
+
className
|
|
120
120
|
),
|
|
121
|
-
...
|
|
121
|
+
...props
|
|
122
122
|
}
|
|
123
123
|
)
|
|
124
124
|
}
|
|
125
125
|
);
|
|
126
126
|
}
|
|
127
|
-
function
|
|
128
|
-
className
|
|
129
|
-
...
|
|
127
|
+
function NavigationMenuLink({
|
|
128
|
+
className,
|
|
129
|
+
...props
|
|
130
130
|
}) {
|
|
131
|
-
return /* @__PURE__ */
|
|
132
|
-
|
|
131
|
+
return /* @__PURE__ */ jsx(
|
|
132
|
+
NavigationMenuPrimitive.Link,
|
|
133
133
|
{
|
|
134
134
|
"data-slot": "navigation-menu-link",
|
|
135
|
-
className:
|
|
135
|
+
className: cn(
|
|
136
136
|
"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",
|
|
137
|
-
|
|
137
|
+
className
|
|
138
138
|
),
|
|
139
|
-
...
|
|
139
|
+
...props
|
|
140
140
|
}
|
|
141
141
|
);
|
|
142
142
|
}
|
|
143
|
-
function
|
|
144
|
-
className
|
|
145
|
-
...
|
|
143
|
+
function NavigationMenuIndicator({
|
|
144
|
+
className,
|
|
145
|
+
...props
|
|
146
146
|
}) {
|
|
147
|
-
return /* @__PURE__ */
|
|
148
|
-
|
|
147
|
+
return /* @__PURE__ */ jsx(
|
|
148
|
+
NavigationMenuPrimitive.Indicator,
|
|
149
149
|
{
|
|
150
150
|
"data-slot": "navigation-menu-indicator",
|
|
151
|
-
className:
|
|
151
|
+
className: cn(
|
|
152
152
|
"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",
|
|
153
|
-
|
|
153
|
+
className
|
|
154
154
|
),
|
|
155
|
-
...
|
|
156
|
-
children: /* @__PURE__ */
|
|
155
|
+
...props,
|
|
156
|
+
children: /* @__PURE__ */ jsx("div", { className: "bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" })
|
|
157
157
|
}
|
|
158
158
|
);
|
|
159
159
|
}
|
|
160
160
|
export {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
161
|
+
NavigationMenu,
|
|
162
|
+
NavigationMenuContent,
|
|
163
|
+
NavigationMenuIndicator,
|
|
164
|
+
NavigationMenuItem,
|
|
165
|
+
NavigationMenuLink,
|
|
166
|
+
NavigationMenuList,
|
|
167
|
+
NavigationMenuTrigger,
|
|
168
|
+
NavigationMenuViewport,
|
|
169
|
+
navigationMenuTriggerStyle
|
|
170
170
|
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { MoreHorizontalIcon, ChevronRightIcon, ChevronLeftIcon } from "lucide-react";
|
|
3
|
+
import { c as cn } from "./utils-CzDCF-Ah.js";
|
|
4
|
+
import { buttonVariants } from "./button.js";
|
|
5
|
+
function Pagination({ className, ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(
|
|
7
|
+
"nav",
|
|
8
|
+
{
|
|
9
|
+
role: "navigation",
|
|
10
|
+
"aria-label": "pagination",
|
|
11
|
+
"data-slot": "pagination",
|
|
12
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
13
|
+
...props
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
function PaginationContent({
|
|
18
|
+
className,
|
|
19
|
+
...props
|
|
20
|
+
}) {
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
"ul",
|
|
23
|
+
{
|
|
24
|
+
"data-slot": "pagination-content",
|
|
25
|
+
className: cn("flex flex-row items-center gap-1", className),
|
|
26
|
+
...props
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
function PaginationItem({ ...props }) {
|
|
31
|
+
return /* @__PURE__ */ jsx("li", { "data-slot": "pagination-item", ...props });
|
|
32
|
+
}
|
|
33
|
+
function PaginationLink({
|
|
34
|
+
className,
|
|
35
|
+
isActive,
|
|
36
|
+
size = "icon",
|
|
37
|
+
...props
|
|
38
|
+
}) {
|
|
39
|
+
return /* @__PURE__ */ jsx(
|
|
40
|
+
"a",
|
|
41
|
+
{
|
|
42
|
+
"aria-current": isActive ? "page" : void 0,
|
|
43
|
+
"data-slot": "pagination-link",
|
|
44
|
+
"data-active": isActive,
|
|
45
|
+
className: cn(
|
|
46
|
+
buttonVariants({
|
|
47
|
+
variant: isActive ? "outline" : "ghost",
|
|
48
|
+
size
|
|
49
|
+
}),
|
|
50
|
+
className
|
|
51
|
+
),
|
|
52
|
+
...props
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
function PaginationPrevious({
|
|
57
|
+
className,
|
|
58
|
+
...props
|
|
59
|
+
}) {
|
|
60
|
+
return /* @__PURE__ */ jsxs(
|
|
61
|
+
PaginationLink,
|
|
62
|
+
{
|
|
63
|
+
"aria-label": "Go to previous page",
|
|
64
|
+
className: cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
65
|
+
...props,
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ jsx(ChevronLeftIcon, {}),
|
|
68
|
+
/* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: "Previous" })
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
function PaginationNext({
|
|
74
|
+
className,
|
|
75
|
+
...props
|
|
76
|
+
}) {
|
|
77
|
+
return /* @__PURE__ */ jsxs(
|
|
78
|
+
PaginationLink,
|
|
79
|
+
{
|
|
80
|
+
"aria-label": "Go to next page",
|
|
81
|
+
className: cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
82
|
+
...props,
|
|
83
|
+
children: [
|
|
84
|
+
/* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: "Next" }),
|
|
85
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
function PaginationEllipsis({
|
|
91
|
+
className,
|
|
92
|
+
...props
|
|
93
|
+
}) {
|
|
94
|
+
return /* @__PURE__ */ jsxs(
|
|
95
|
+
"span",
|
|
96
|
+
{
|
|
97
|
+
"aria-hidden": true,
|
|
98
|
+
"data-slot": "pagination-ellipsis",
|
|
99
|
+
className: cn("flex size-9 items-center justify-center", className),
|
|
100
|
+
...props,
|
|
101
|
+
children: [
|
|
102
|
+
/* @__PURE__ */ jsx(MoreHorizontalIcon, { className: "size-4" }),
|
|
103
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More pages" })
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
export {
|
|
109
|
+
Pagination,
|
|
110
|
+
PaginationContent,
|
|
111
|
+
PaginationEllipsis,
|
|
112
|
+
PaginationItem,
|
|
113
|
+
PaginationLink,
|
|
114
|
+
PaginationNext,
|
|
115
|
+
PaginationPrevious
|
|
116
|
+
};
|
package/dist/popover.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3
|
+
import { c as cn } from "./utils-CzDCF-Ah.js";
|
|
4
|
+
function Popover({
|
|
5
|
+
...props
|
|
6
|
+
}) {
|
|
7
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
8
|
+
}
|
|
9
|
+
function PopoverTrigger({
|
|
10
|
+
...props
|
|
11
|
+
}) {
|
|
12
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
13
|
+
}
|
|
14
|
+
function PopoverContent({
|
|
15
|
+
className,
|
|
16
|
+
align = "center",
|
|
17
|
+
sideOffset = 4,
|
|
18
|
+
...props
|
|
19
|
+
}) {
|
|
20
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
21
|
+
PopoverPrimitive.Content,
|
|
22
|
+
{
|
|
23
|
+
"data-slot": "popover-content",
|
|
24
|
+
align,
|
|
25
|
+
sideOffset,
|
|
26
|
+
className: cn(
|
|
27
|
+
"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 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
28
|
+
className
|
|
29
|
+
),
|
|
30
|
+
...props
|
|
31
|
+
}
|
|
32
|
+
) });
|
|
33
|
+
}
|
|
34
|
+
function PopoverAnchor({
|
|
35
|
+
...props
|
|
36
|
+
}) {
|
|
37
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
Popover,
|
|
41
|
+
PopoverAnchor,
|
|
42
|
+
PopoverContent,
|
|
43
|
+
PopoverTrigger
|
|
44
|
+
};
|