@nextlyhq/ui 0.0.2-alpha.4 → 0.0.2-alpha.40
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/README.md +98 -23
- package/dist/index.cjs +1070 -1084
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +72 -250
- package/dist/index.d.ts +72 -250
- package/dist/index.mjs +830 -826
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +2 -0
- package/dist/styles.scoped.css +2 -0
- package/dist/tailwind-preset.cjs +98 -0
- package/dist/tailwind-preset.cjs.map +1 -0
- package/dist/tailwind-preset.d.cts +80 -0
- package/dist/tailwind-preset.d.ts +80 -0
- package/dist/tailwind-preset.mjs +93 -0
- package/dist/tailwind-preset.mjs.map +1 -0
- package/dist/theme.css +893 -0
- package/dist/utils.cjs +13 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.d.cts +17 -0
- package/dist/utils.d.ts +17 -0
- package/dist/utils.mjs +11 -0
- package/dist/utils.mjs.map +1 -0
- package/docs/plugin-ui-authoring.md +178 -0
- package/package.json +56 -15
package/dist/index.mjs
CHANGED
|
@@ -1,34 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
import { cva } from 'class-variance-authority';
|
|
3
|
-
import * as React5 from 'react';
|
|
4
|
-
import { forwardRef, createContext, useContext } from 'react';
|
|
5
|
-
import { clsx } from 'clsx';
|
|
6
|
-
import { twMerge } from 'tailwind-merge';
|
|
7
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
|
-
import { Root as Root$3 } from '@radix-ui/react-label';
|
|
9
|
-
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
10
|
-
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
11
|
-
import { Minus, Check, ChevronDown, X, ChevronRight, Circle, Search, Loader2, ChevronUp, XCircle, AlertTriangle, AlertCircle, CheckCircle2, FileQuestion, ChevronsLeft, ChevronLeft, ChevronsRight } from 'lucide-react';
|
|
12
|
-
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
13
|
-
import { Root as Root$4, Thumb } from '@radix-ui/react-switch';
|
|
14
|
-
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
15
|
-
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
16
|
-
import { Root, Image, Fallback } from '@radix-ui/react-avatar';
|
|
17
|
-
import { List, Trigger, Content, Root as Root$1 } from '@radix-ui/react-tabs';
|
|
18
|
-
import { Content as Content$1, Root as Root$2, Provider, Trigger as Trigger$1 } from '@radix-ui/react-tooltip';
|
|
19
|
-
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
20
|
-
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
21
|
-
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
22
|
-
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
23
|
-
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
24
|
-
import { Command as Command$1 } from 'cmdk';
|
|
25
|
-
import { Toaster as Toaster$1 } from 'sonner';
|
|
26
|
-
export { toast } from 'sonner';
|
|
1
|
+
"use client";
|
|
27
2
|
|
|
28
3
|
// src/components/button.tsx
|
|
4
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
+
import { cva } from "class-variance-authority";
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { forwardRef } from "react";
|
|
8
|
+
|
|
9
|
+
// src/lib/utils.ts
|
|
10
|
+
import { clsx } from "clsx";
|
|
11
|
+
import { twMerge } from "tailwind-merge";
|
|
29
12
|
function cn(...inputs) {
|
|
30
13
|
return twMerge(clsx(inputs));
|
|
31
14
|
}
|
|
15
|
+
|
|
16
|
+
// src/components/button.tsx
|
|
17
|
+
import { jsx } from "react/jsx-runtime";
|
|
32
18
|
var buttonVariants = cva(
|
|
33
19
|
"inline-flex items-center justify-center whitespace-nowrap rounded-none text-sm font-medium cursor-pointer transition-all duration-150 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-0 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed active:scale-[0.98] [&_svg]:text-current",
|
|
34
20
|
{
|
|
@@ -36,20 +22,26 @@ var buttonVariants = cva(
|
|
|
36
22
|
variant: {
|
|
37
23
|
default: "bg-primary text-primary-foreground border border-transparent hover:opacity-90",
|
|
38
24
|
primary: "bg-primary text-primary-foreground border border-transparent hover:opacity-90",
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
25
|
+
// Solid fill uses the emphasis token so white on-color text stays AA in
|
|
26
|
+
// dark mode (the base token is the readable text color, too light here).
|
|
27
|
+
// Hover darkens to a deeper shade instead of opacity-90, which would
|
|
28
|
+
// composite the fill toward the page and drop white text under 4.5:1.
|
|
29
|
+
destructive: "bg-destructive-solid text-destructive-foreground border border-transparent hover:bg-destructive-700",
|
|
30
|
+
// border-border (not a faint primary alpha) so the outline is a visible
|
|
31
|
+
// boundary at the 3:1 UI minimum.
|
|
32
|
+
outline: "border border-border text-foreground hover-unified bg-background",
|
|
33
|
+
secondary: "bg-background border border-border text-foreground hover:bg-primary/5",
|
|
42
34
|
ghost: "text-foreground border border-transparent hover-unified",
|
|
43
35
|
link: "text-primary border border-transparent underline-offset-4 hover:underline"
|
|
44
36
|
},
|
|
45
37
|
size: {
|
|
46
|
-
default: "h-
|
|
47
|
-
sm: "h-
|
|
48
|
-
md: "h-
|
|
49
|
-
lg: "h-
|
|
50
|
-
icon: "h-
|
|
51
|
-
"icon-sm": "h-
|
|
52
|
-
"icon-lg": "h-
|
|
38
|
+
default: "h-[var(--nx-control-height)] px-6 py-2",
|
|
39
|
+
sm: "h-[var(--nx-control-height-md)] px-4 text-[13px]",
|
|
40
|
+
md: "h-[var(--nx-control-height)] px-6 text-sm",
|
|
41
|
+
lg: "h-[var(--nx-control-height-lg)] px-8 text-base",
|
|
42
|
+
icon: "h-[var(--nx-control-height)] w-[var(--nx-control-height)] p-0",
|
|
43
|
+
"icon-sm": "h-[var(--nx-control-height-md)] w-[var(--nx-control-height-md)] p-0",
|
|
44
|
+
"icon-lg": "h-[var(--nx-control-height-lg)] w-[var(--nx-control-height-lg)] p-0"
|
|
53
45
|
}
|
|
54
46
|
},
|
|
55
47
|
defaultVariants: {
|
|
@@ -68,7 +60,7 @@ var Button = forwardRef(
|
|
|
68
60
|
...props
|
|
69
61
|
}, ref) => {
|
|
70
62
|
const Comp = asChild ? Slot : "button";
|
|
71
|
-
const hasMultipleChildren =
|
|
63
|
+
const hasMultipleChildren = React.Children.count(children) > 1;
|
|
72
64
|
return /* @__PURE__ */ jsx(
|
|
73
65
|
Comp,
|
|
74
66
|
{
|
|
@@ -85,14 +77,19 @@ var Button = forwardRef(
|
|
|
85
77
|
}
|
|
86
78
|
);
|
|
87
79
|
Button.displayName = "Button";
|
|
88
|
-
|
|
89
|
-
|
|
80
|
+
|
|
81
|
+
// src/components/input.tsx
|
|
82
|
+
import { cva as cva2 } from "class-variance-authority";
|
|
83
|
+
import { forwardRef as forwardRef2 } from "react";
|
|
84
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
85
|
+
var inputVariants = cva2(
|
|
86
|
+
"file:text-foreground placeholder:text-muted-foreground placeholder:opacity-50 selection:bg-primary selection:text-primary-foreground w-full min-w-0 rounded-none border border-input bg-background text-sm transition-all duration-150 outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 focus:ring-0 focus:ring-offset-0 focus:outline-none focus:border-primary! focus-visible:border-primary! aria-invalid:border-destructive aria-invalid:focus:border-destructive! data-[invalid=true]:border-destructive data-[invalid=true]:focus:border-destructive!",
|
|
90
87
|
{
|
|
91
88
|
variants: {
|
|
92
89
|
size: {
|
|
93
|
-
sm: "h-
|
|
94
|
-
default: "h-
|
|
95
|
-
lg: "h-
|
|
90
|
+
sm: "h-[var(--nx-control-height-sm)] px-2.5 py-2 text-sm",
|
|
91
|
+
default: "h-[var(--nx-control-height)] px-3 py-2.5 text-sm",
|
|
92
|
+
lg: "h-[var(--nx-control-height-lg)] px-4 py-3 text-base"
|
|
96
93
|
}
|
|
97
94
|
},
|
|
98
95
|
defaultVariants: {
|
|
@@ -100,9 +97,9 @@ var inputVariants = cva(
|
|
|
100
97
|
}
|
|
101
98
|
}
|
|
102
99
|
);
|
|
103
|
-
var Input =
|
|
100
|
+
var Input = forwardRef2(
|
|
104
101
|
({ className, type, size, ...props }, ref) => {
|
|
105
|
-
return /* @__PURE__ */
|
|
102
|
+
return /* @__PURE__ */ jsx2(
|
|
106
103
|
"input",
|
|
107
104
|
{
|
|
108
105
|
type,
|
|
@@ -115,14 +112,20 @@ var Input = forwardRef(
|
|
|
115
112
|
}
|
|
116
113
|
);
|
|
117
114
|
Input.displayName = "Input";
|
|
118
|
-
|
|
119
|
-
|
|
115
|
+
|
|
116
|
+
// src/components/textarea.tsx
|
|
117
|
+
import { forwardRef as forwardRef3 } from "react";
|
|
118
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
119
|
+
var Textarea = forwardRef3(({ className, ...props }, ref) => {
|
|
120
|
+
return /* @__PURE__ */ jsx3(
|
|
120
121
|
"textarea",
|
|
121
122
|
{
|
|
122
123
|
"data-slot": "textarea",
|
|
123
124
|
className: cn(
|
|
124
|
-
|
|
125
|
-
|
|
125
|
+
// hover:border-primary (full strength) keeps the hover boundary more
|
|
126
|
+
// visible than the resting border-input, not a fainter alpha of it.
|
|
127
|
+
"flex min-h-[80px] w-full rounded-none border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground placeholder:opacity-50 transition-all duration-200 focus:border-primary! focus-visible:border-primary! focus:outline-none hover:border-primary disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-primary/5 resize-y",
|
|
128
|
+
"aria-invalid:border-destructive aria-invalid:focus:border-destructive!",
|
|
126
129
|
className
|
|
127
130
|
),
|
|
128
131
|
ref,
|
|
@@ -131,9 +134,13 @@ var Textarea = forwardRef(({ className, ...props }, ref) => {
|
|
|
131
134
|
);
|
|
132
135
|
});
|
|
133
136
|
Textarea.displayName = "Textarea";
|
|
137
|
+
|
|
138
|
+
// src/components/label.tsx
|
|
139
|
+
import { Root as LabelRoot } from "@radix-ui/react-label";
|
|
140
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
134
141
|
function Label({ className, ...props }) {
|
|
135
|
-
return /* @__PURE__ */
|
|
136
|
-
|
|
142
|
+
return /* @__PURE__ */ jsx4(
|
|
143
|
+
LabelRoot,
|
|
137
144
|
{
|
|
138
145
|
"data-slot": "label",
|
|
139
146
|
className: cn(
|
|
@@ -144,17 +151,127 @@ function Label({ className, ...props }) {
|
|
|
144
151
|
}
|
|
145
152
|
);
|
|
146
153
|
}
|
|
147
|
-
|
|
154
|
+
|
|
155
|
+
// src/components/form-label-with-tooltip.tsx
|
|
156
|
+
import { Info } from "lucide-react";
|
|
157
|
+
import * as React2 from "react";
|
|
158
|
+
|
|
159
|
+
// src/components/tooltip.tsx
|
|
160
|
+
import {
|
|
161
|
+
Provider,
|
|
162
|
+
Root,
|
|
163
|
+
Trigger,
|
|
164
|
+
Portal,
|
|
165
|
+
Content
|
|
166
|
+
} from "@radix-ui/react-tooltip";
|
|
167
|
+
import { forwardRef as forwardRef4 } from "react";
|
|
168
|
+
|
|
169
|
+
// src/providers/portal-provider.tsx
|
|
170
|
+
import { createContext, useContext } from "react";
|
|
171
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
172
|
+
var PortalContext = createContext({ container: null });
|
|
173
|
+
function PortalProvider({ container, children }) {
|
|
174
|
+
return /* @__PURE__ */ jsx5(PortalContext.Provider, { value: { container }, children });
|
|
175
|
+
}
|
|
176
|
+
function usePortalContainer() {
|
|
177
|
+
const { container } = useContext(PortalContext);
|
|
178
|
+
return container ?? void 0;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// src/components/tooltip.tsx
|
|
182
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
183
|
+
var TooltipProvider = Provider;
|
|
184
|
+
var Tooltip = Root;
|
|
185
|
+
var TooltipTrigger = Trigger;
|
|
186
|
+
var TooltipContent = forwardRef4(({ className, sideOffset = 4, ...props }, ref) => {
|
|
187
|
+
const portalContainer = usePortalContainer();
|
|
188
|
+
return (
|
|
189
|
+
// Portalled for the same reason as every other overlay here, plus one
|
|
190
|
+
// specific to the tooltip: the positioner measures against the nearest
|
|
191
|
+
// containing block, and it counts `container-type` as one while the
|
|
192
|
+
// browser does not. Left inline under a `@container` element, the content
|
|
193
|
+
// is offset by that element's own position. Portalling lifts it out of any
|
|
194
|
+
// such ancestor, so the two agree again.
|
|
195
|
+
/* @__PURE__ */ jsx6(Portal, { container: portalContainer, children: /* @__PURE__ */ jsx6(
|
|
196
|
+
Content,
|
|
197
|
+
{
|
|
198
|
+
ref,
|
|
199
|
+
sideOffset,
|
|
200
|
+
"data-slot": "tooltip-content",
|
|
201
|
+
className: cn(
|
|
202
|
+
"z-50 overflow-hidden rounded-none px-3 py-1.5 text-xs shadow-lg border border-border bg-popover text-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",
|
|
203
|
+
className
|
|
204
|
+
),
|
|
205
|
+
...props
|
|
206
|
+
}
|
|
207
|
+
) })
|
|
208
|
+
);
|
|
209
|
+
});
|
|
210
|
+
TooltipContent.displayName = Content.displayName;
|
|
211
|
+
|
|
212
|
+
// src/components/form-label-with-tooltip.tsx
|
|
213
|
+
import { jsx as jsx7, jsxs } from "react/jsx-runtime";
|
|
214
|
+
var FormLabelWithTooltip = React2.forwardRef(
|
|
215
|
+
({
|
|
216
|
+
className,
|
|
217
|
+
labelClassName,
|
|
218
|
+
tooltipClassName,
|
|
219
|
+
label,
|
|
220
|
+
description,
|
|
221
|
+
required,
|
|
222
|
+
...props
|
|
223
|
+
}, ref) => {
|
|
224
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-2", className), children: [
|
|
225
|
+
/* @__PURE__ */ jsxs(Label, { ref, className: labelClassName, ...props, children: [
|
|
226
|
+
label,
|
|
227
|
+
required && /* @__PURE__ */ jsx7("span", { className: "text-destructive ml-1", children: "*" })
|
|
228
|
+
] }),
|
|
229
|
+
description && /* @__PURE__ */ jsx7(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { delayDuration: 200, children: [
|
|
230
|
+
/* @__PURE__ */ jsxs(
|
|
231
|
+
TooltipTrigger,
|
|
232
|
+
{
|
|
233
|
+
type: "button",
|
|
234
|
+
tabIndex: -1,
|
|
235
|
+
className: "shrink-0 text-muted-foreground hover:text-foreground focus:outline-none focus:text-foreground transition-colors cursor-help",
|
|
236
|
+
children: [
|
|
237
|
+
/* @__PURE__ */ jsx7(Info, { className: "h-3.5 w-3.5" }),
|
|
238
|
+
/* @__PURE__ */ jsx7("span", { className: "sr-only", children: "Toggle description" })
|
|
239
|
+
]
|
|
240
|
+
}
|
|
241
|
+
),
|
|
242
|
+
/* @__PURE__ */ jsx7(
|
|
243
|
+
TooltipContent,
|
|
244
|
+
{
|
|
245
|
+
side: "right",
|
|
246
|
+
className: cn(
|
|
247
|
+
"max-w-[250px] text-[12px] break-words relative z-[100] shadow-md border border-border bg-primary text-primary-foreground px-3 py-2 rounded-none",
|
|
248
|
+
tooltipClassName
|
|
249
|
+
),
|
|
250
|
+
children: description
|
|
251
|
+
}
|
|
252
|
+
)
|
|
253
|
+
] }) })
|
|
254
|
+
] });
|
|
255
|
+
}
|
|
256
|
+
);
|
|
257
|
+
FormLabelWithTooltip.displayName = "FormLabelWithTooltip";
|
|
258
|
+
|
|
259
|
+
// src/components/badge.tsx
|
|
260
|
+
import { cva as cva3 } from "class-variance-authority";
|
|
261
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
262
|
+
var badgeVariants = cva3(
|
|
148
263
|
"inline-flex items-center rounded-none px-2.5 py-0.5 h-[22px] text-xs font-medium transition-colors",
|
|
149
264
|
{
|
|
150
265
|
variants: {
|
|
151
266
|
variant: {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
267
|
+
// Clear, legible chip in both modes (was bg-primary/5 at ~5% opacity,
|
|
268
|
+
// which was nearly invisible on dark backgrounds).
|
|
269
|
+
default: "bg-muted text-foreground",
|
|
270
|
+
primary: "bg-primary/10 text-primary dark:bg-primary/20",
|
|
271
|
+
success: "bg-success-100 text-success-700 dark:bg-success-900 dark:text-success-100",
|
|
272
|
+
warning: "bg-warning-100 text-warning-700 dark:bg-warning-900 dark:text-warning-100",
|
|
273
|
+
destructive: "bg-destructive-100 text-destructive-700 dark:bg-destructive-900 dark:text-destructive-100",
|
|
274
|
+
outline: "border border-border! bg-transparent text-foreground dark:text-muted-foreground dark:border-border!"
|
|
158
275
|
}
|
|
159
276
|
},
|
|
160
277
|
defaultVariants: {
|
|
@@ -163,7 +280,7 @@ var badgeVariants = cva(
|
|
|
163
280
|
}
|
|
164
281
|
);
|
|
165
282
|
function Badge({ className, variant = "default", ...props }) {
|
|
166
|
-
return /* @__PURE__ */
|
|
283
|
+
return /* @__PURE__ */ jsx8(
|
|
167
284
|
"div",
|
|
168
285
|
{
|
|
169
286
|
"data-slot": `badge.${variant}`,
|
|
@@ -172,8 +289,13 @@ function Badge({ className, variant = "default", ...props }) {
|
|
|
172
289
|
}
|
|
173
290
|
);
|
|
174
291
|
}
|
|
175
|
-
|
|
176
|
-
|
|
292
|
+
|
|
293
|
+
// src/components/card.tsx
|
|
294
|
+
import { cva as cva4 } from "class-variance-authority";
|
|
295
|
+
import { forwardRef as forwardRef6 } from "react";
|
|
296
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
297
|
+
var cardVariants = cva4(
|
|
298
|
+
"bg-card text-foreground rounded-none border border-border transition-all duration-200",
|
|
177
299
|
{
|
|
178
300
|
variants: {
|
|
179
301
|
variant: {
|
|
@@ -187,9 +309,9 @@ var cardVariants = cva(
|
|
|
187
309
|
}
|
|
188
310
|
}
|
|
189
311
|
);
|
|
190
|
-
var Card =
|
|
312
|
+
var Card = forwardRef6(
|
|
191
313
|
({ className, variant, ...props }, ref) => {
|
|
192
|
-
return /* @__PURE__ */
|
|
314
|
+
return /* @__PURE__ */ jsx9(
|
|
193
315
|
"div",
|
|
194
316
|
{
|
|
195
317
|
ref,
|
|
@@ -201,16 +323,16 @@ var Card = forwardRef(
|
|
|
201
323
|
}
|
|
202
324
|
);
|
|
203
325
|
Card.displayName = "Card";
|
|
204
|
-
var CardHeader =
|
|
326
|
+
var CardHeader = forwardRef6(
|
|
205
327
|
({ className, noBorder = false, ...props }, ref) => {
|
|
206
|
-
return /* @__PURE__ */
|
|
328
|
+
return /* @__PURE__ */ jsx9(
|
|
207
329
|
"div",
|
|
208
330
|
{
|
|
209
331
|
ref,
|
|
210
332
|
"data-slot": "card-header",
|
|
211
333
|
className: cn(
|
|
212
334
|
"flex flex-col p-4",
|
|
213
|
-
!noBorder && "border-b border-
|
|
335
|
+
!noBorder && "border-b border-border",
|
|
214
336
|
className
|
|
215
337
|
),
|
|
216
338
|
...props
|
|
@@ -219,9 +341,9 @@ var CardHeader = forwardRef(
|
|
|
219
341
|
}
|
|
220
342
|
);
|
|
221
343
|
CardHeader.displayName = "CardHeader";
|
|
222
|
-
var CardTitle =
|
|
344
|
+
var CardTitle = forwardRef6(
|
|
223
345
|
({ className, ...props }, ref) => {
|
|
224
|
-
return /* @__PURE__ */
|
|
346
|
+
return /* @__PURE__ */ jsx9(
|
|
225
347
|
"h3",
|
|
226
348
|
{
|
|
227
349
|
ref,
|
|
@@ -233,9 +355,9 @@ var CardTitle = forwardRef(
|
|
|
233
355
|
}
|
|
234
356
|
);
|
|
235
357
|
CardTitle.displayName = "CardTitle";
|
|
236
|
-
var CardDescription =
|
|
358
|
+
var CardDescription = forwardRef6(
|
|
237
359
|
({ className, ...props }, ref) => {
|
|
238
|
-
return /* @__PURE__ */
|
|
360
|
+
return /* @__PURE__ */ jsx9(
|
|
239
361
|
"p",
|
|
240
362
|
{
|
|
241
363
|
ref,
|
|
@@ -247,9 +369,9 @@ var CardDescription = forwardRef(
|
|
|
247
369
|
}
|
|
248
370
|
);
|
|
249
371
|
CardDescription.displayName = "CardDescription";
|
|
250
|
-
var CardAction =
|
|
372
|
+
var CardAction = forwardRef6(
|
|
251
373
|
({ className, ...props }, ref) => {
|
|
252
|
-
return /* @__PURE__ */
|
|
374
|
+
return /* @__PURE__ */ jsx9(
|
|
253
375
|
"div",
|
|
254
376
|
{
|
|
255
377
|
ref,
|
|
@@ -261,9 +383,9 @@ var CardAction = forwardRef(
|
|
|
261
383
|
}
|
|
262
384
|
);
|
|
263
385
|
CardAction.displayName = "CardAction";
|
|
264
|
-
var CardContent =
|
|
386
|
+
var CardContent = forwardRef6(
|
|
265
387
|
({ className, ...props }, ref) => {
|
|
266
|
-
return /* @__PURE__ */
|
|
388
|
+
return /* @__PURE__ */ jsx9(
|
|
267
389
|
"div",
|
|
268
390
|
{
|
|
269
391
|
ref,
|
|
@@ -275,15 +397,15 @@ var CardContent = forwardRef(
|
|
|
275
397
|
}
|
|
276
398
|
);
|
|
277
399
|
CardContent.displayName = "CardContent";
|
|
278
|
-
var CardFooter =
|
|
400
|
+
var CardFooter = forwardRef6(
|
|
279
401
|
({ className, ...props }, ref) => {
|
|
280
|
-
return /* @__PURE__ */
|
|
402
|
+
return /* @__PURE__ */ jsx9(
|
|
281
403
|
"div",
|
|
282
404
|
{
|
|
283
405
|
ref,
|
|
284
406
|
"data-slot": "card-footer",
|
|
285
407
|
className: cn(
|
|
286
|
-
"flex items-center px-6 py-4 border-t border-
|
|
408
|
+
"flex items-center px-6 py-4 border-t border-border bg-primary/5",
|
|
287
409
|
className
|
|
288
410
|
),
|
|
289
411
|
...props
|
|
@@ -292,15 +414,80 @@ var CardFooter = forwardRef(
|
|
|
292
414
|
}
|
|
293
415
|
);
|
|
294
416
|
CardFooter.displayName = "CardFooter";
|
|
295
|
-
|
|
296
|
-
|
|
417
|
+
|
|
418
|
+
// src/components/layout.tsx
|
|
419
|
+
import { forwardRef as forwardRef7 } from "react";
|
|
420
|
+
import { jsx as jsx10, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
421
|
+
var GAP = {
|
|
422
|
+
0: "gap-0",
|
|
423
|
+
1: "gap-1",
|
|
424
|
+
2: "gap-2",
|
|
425
|
+
3: "gap-3",
|
|
426
|
+
4: "gap-4",
|
|
427
|
+
6: "gap-6",
|
|
428
|
+
8: "gap-8"
|
|
429
|
+
};
|
|
430
|
+
var COLS = {
|
|
431
|
+
1: "grid-cols-1",
|
|
432
|
+
2: "grid-cols-2",
|
|
433
|
+
3: "grid-cols-3",
|
|
434
|
+
4: "grid-cols-4",
|
|
435
|
+
6: "grid-cols-6"
|
|
436
|
+
};
|
|
437
|
+
var Stack = forwardRef7(
|
|
438
|
+
({ direction = "col", gap = 4, className, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
439
|
+
"div",
|
|
440
|
+
{
|
|
441
|
+
ref,
|
|
442
|
+
className: cn(
|
|
443
|
+
"flex",
|
|
444
|
+
direction === "col" ? "flex-col" : "flex-row",
|
|
445
|
+
GAP[gap],
|
|
446
|
+
className
|
|
447
|
+
),
|
|
448
|
+
...props
|
|
449
|
+
}
|
|
450
|
+
)
|
|
451
|
+
);
|
|
452
|
+
Stack.displayName = "Stack";
|
|
453
|
+
var Grid = forwardRef7(
|
|
454
|
+
({ cols = 2, gap = 4, className, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
455
|
+
"div",
|
|
456
|
+
{
|
|
457
|
+
ref,
|
|
458
|
+
className: cn("grid", COLS[cols], GAP[gap], className),
|
|
459
|
+
...props
|
|
460
|
+
}
|
|
461
|
+
)
|
|
462
|
+
);
|
|
463
|
+
Grid.displayName = "Grid";
|
|
464
|
+
var Stat = forwardRef7(
|
|
465
|
+
({ label, value, className, ...props }, ref) => /* @__PURE__ */ jsxs2("div", { ref, className: cn("flex flex-col gap-1", className), ...props, children: [
|
|
466
|
+
/* @__PURE__ */ jsx10("span", { className: "text-sm text-muted-foreground", children: label }),
|
|
467
|
+
/* @__PURE__ */ jsx10("span", { className: "text-2xl font-semibold text-foreground", children: value })
|
|
468
|
+
] })
|
|
469
|
+
);
|
|
470
|
+
Stat.displayName = "Stat";
|
|
471
|
+
|
|
472
|
+
// src/components/alert.tsx
|
|
473
|
+
import { cva as cva5 } from "class-variance-authority";
|
|
474
|
+
import { forwardRef as forwardRef8 } from "react";
|
|
475
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
476
|
+
var alertVariants = cva5(
|
|
477
|
+
"relative flex items-start gap-3 rounded-none border border-border p-4 text-sm transition-colors duration-150",
|
|
297
478
|
{
|
|
298
479
|
variants: {
|
|
299
480
|
variant: {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
481
|
+
// text-primary is mode-correct (dark ink on light in light mode, light
|
|
482
|
+
// ink on dark in dark mode); the previous dark text override rendered
|
|
483
|
+
// dark slate on the dark tint at about 1:1.
|
|
484
|
+
info: "bg-primary/5 text-primary",
|
|
485
|
+
// dark:border-l-* re-asserts the strong base accent on the left after
|
|
486
|
+
// the dark:border-*-900 all-sides rule, so the meaningful accent stays
|
|
487
|
+
// visible in dark mode instead of collapsing to the faint -900 shade.
|
|
488
|
+
success: "border-success-200 bg-success-50 text-success-900 border-l-4 border-l-success dark:border-success-900 dark:border-l-success dark:bg-success-950 dark:text-success-100",
|
|
489
|
+
warning: "border-warning-200 bg-warning-50 text-warning-900 border-l-4 border-l-warning dark:border-warning-900 dark:border-l-warning dark:bg-warning-950 dark:text-warning-100",
|
|
490
|
+
destructive: "border-destructive-200 bg-destructive-50 text-destructive-900 border-l-4 border-l-destructive dark:border-destructive-900 dark:border-l-destructive dark:bg-destructive-950 dark:text-destructive-100"
|
|
304
491
|
}
|
|
305
492
|
},
|
|
306
493
|
defaultVariants: {
|
|
@@ -308,9 +495,9 @@ var alertVariants = cva(
|
|
|
308
495
|
}
|
|
309
496
|
}
|
|
310
497
|
);
|
|
311
|
-
var Alert =
|
|
498
|
+
var Alert = forwardRef8(
|
|
312
499
|
({ className, variant = "info", role = "alert", ...props }, ref) => {
|
|
313
|
-
return /* @__PURE__ */
|
|
500
|
+
return /* @__PURE__ */ jsx11(
|
|
314
501
|
"div",
|
|
315
502
|
{
|
|
316
503
|
ref,
|
|
@@ -323,9 +510,9 @@ var Alert = forwardRef(
|
|
|
323
510
|
}
|
|
324
511
|
);
|
|
325
512
|
Alert.displayName = "Alert";
|
|
326
|
-
var AlertTitle =
|
|
513
|
+
var AlertTitle = forwardRef8(
|
|
327
514
|
({ className, ...props }, ref) => {
|
|
328
|
-
return /* @__PURE__ */
|
|
515
|
+
return /* @__PURE__ */ jsx11(
|
|
329
516
|
"h5",
|
|
330
517
|
{
|
|
331
518
|
ref,
|
|
@@ -340,9 +527,9 @@ var AlertTitle = forwardRef(
|
|
|
340
527
|
}
|
|
341
528
|
);
|
|
342
529
|
AlertTitle.displayName = "AlertTitle";
|
|
343
|
-
var AlertDescription =
|
|
530
|
+
var AlertDescription = forwardRef8(
|
|
344
531
|
({ className, ...props }, ref) => {
|
|
345
|
-
return /* @__PURE__ */
|
|
532
|
+
return /* @__PURE__ */ jsx11(
|
|
346
533
|
"div",
|
|
347
534
|
{
|
|
348
535
|
ref,
|
|
@@ -354,13 +541,17 @@ var AlertDescription = forwardRef(
|
|
|
354
541
|
}
|
|
355
542
|
);
|
|
356
543
|
AlertDescription.displayName = "AlertDescription";
|
|
544
|
+
|
|
545
|
+
// src/components/separator.tsx
|
|
546
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
547
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
357
548
|
function Separator({
|
|
358
549
|
className,
|
|
359
550
|
orientation = "horizontal",
|
|
360
551
|
decorative = true,
|
|
361
552
|
...props
|
|
362
553
|
}) {
|
|
363
|
-
return /* @__PURE__ */
|
|
554
|
+
return /* @__PURE__ */ jsx12(
|
|
364
555
|
SeparatorPrimitive.Root,
|
|
365
556
|
{
|
|
366
557
|
"data-slot": "separator",
|
|
@@ -374,9 +565,13 @@ function Separator({
|
|
|
374
565
|
}
|
|
375
566
|
);
|
|
376
567
|
}
|
|
377
|
-
|
|
568
|
+
|
|
569
|
+
// src/components/skeleton.tsx
|
|
570
|
+
import * as React3 from "react";
|
|
571
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
572
|
+
var Skeleton = React3.forwardRef(
|
|
378
573
|
({ className, ...props }, ref) => {
|
|
379
|
-
return /* @__PURE__ */
|
|
574
|
+
return /* @__PURE__ */ jsx13(
|
|
380
575
|
"div",
|
|
381
576
|
{
|
|
382
577
|
ref,
|
|
@@ -392,11 +587,16 @@ var Skeleton = React5.forwardRef(
|
|
|
392
587
|
}
|
|
393
588
|
);
|
|
394
589
|
Skeleton.displayName = "Skeleton";
|
|
395
|
-
|
|
590
|
+
|
|
591
|
+
// src/components/progress.tsx
|
|
592
|
+
import { cva as cva6 } from "class-variance-authority";
|
|
593
|
+
import * as React4 from "react";
|
|
594
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
595
|
+
var progressVariants = cva6("h-full rounded-none transition-all", {
|
|
396
596
|
variants: {
|
|
397
597
|
variant: {
|
|
398
598
|
default: "bg-primary-500",
|
|
399
|
-
success: "bg-
|
|
599
|
+
success: "bg-success-500",
|
|
400
600
|
error: "bg-destructive"
|
|
401
601
|
}
|
|
402
602
|
},
|
|
@@ -404,7 +604,7 @@ var progressVariants = cva("h-full rounded-none transition-all", {
|
|
|
404
604
|
variant: "default"
|
|
405
605
|
}
|
|
406
606
|
});
|
|
407
|
-
var Progress =
|
|
607
|
+
var Progress = React4.forwardRef(
|
|
408
608
|
({
|
|
409
609
|
value,
|
|
410
610
|
max = 100,
|
|
@@ -415,7 +615,7 @@ var Progress = React5.forwardRef(
|
|
|
415
615
|
}, ref) => {
|
|
416
616
|
const clampedValue = Math.min(Math.max(0, value), max);
|
|
417
617
|
const percentage = clampedValue / max * 100;
|
|
418
|
-
return /* @__PURE__ */
|
|
618
|
+
return /* @__PURE__ */ jsx14(
|
|
419
619
|
"div",
|
|
420
620
|
{
|
|
421
621
|
ref,
|
|
@@ -429,7 +629,7 @@ var Progress = React5.forwardRef(
|
|
|
429
629
|
className
|
|
430
630
|
),
|
|
431
631
|
...props,
|
|
432
|
-
children: /* @__PURE__ */
|
|
632
|
+
children: /* @__PURE__ */ jsx14(
|
|
433
633
|
"div",
|
|
434
634
|
{
|
|
435
635
|
className: cn(progressVariants({ variant })),
|
|
@@ -444,28 +644,41 @@ var Progress = React5.forwardRef(
|
|
|
444
644
|
}
|
|
445
645
|
);
|
|
446
646
|
Progress.displayName = "Progress";
|
|
447
|
-
|
|
647
|
+
|
|
648
|
+
// src/components/checkbox.tsx
|
|
649
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
650
|
+
import { Check, Minus } from "lucide-react";
|
|
651
|
+
import { forwardRef as forwardRef11 } from "react";
|
|
652
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
653
|
+
var Checkbox = forwardRef11(({ className, indeterminate, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
448
654
|
CheckboxPrimitive.Root,
|
|
449
655
|
{
|
|
450
656
|
ref,
|
|
451
657
|
"data-slot": "checkbox",
|
|
452
658
|
className: cn(
|
|
453
|
-
|
|
659
|
+
// Resting border uses border-input (a visible 3:1 boundary); the checked
|
|
660
|
+
// state switches to border-primary below, keeping the two states distinct.
|
|
661
|
+
"peer relative h-4 w-4 shrink-0 rounded-none border border-input ring-offset-background before:absolute before:left-1/2 before:top-1/2 before:h-6 before:w-6 before:-translate-x-1/2 before:-translate-y-1/2 before:content-[''] focus:border-primary! focus-visible:border-primary! focus:outline-none focus-visible:outline-none aria-invalid:border-destructive aria-invalid:focus:border-destructive! aria-invalid:focus-visible:border-destructive! disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground data-[state=indeterminate]:border-primary transition-all duration-200",
|
|
454
662
|
className
|
|
455
663
|
),
|
|
456
664
|
...props,
|
|
457
|
-
children: /* @__PURE__ */
|
|
665
|
+
children: /* @__PURE__ */ jsx15(
|
|
458
666
|
CheckboxPrimitive.Indicator,
|
|
459
667
|
{
|
|
460
668
|
className: cn("flex items-center justify-center text-current"),
|
|
461
|
-
children: indeterminate ? /* @__PURE__ */
|
|
669
|
+
children: indeterminate ? /* @__PURE__ */ jsx15(Minus, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx15(Check, { className: "h-3 w-3" })
|
|
462
670
|
}
|
|
463
671
|
)
|
|
464
672
|
}
|
|
465
673
|
));
|
|
466
674
|
Checkbox.displayName = "Checkbox";
|
|
467
|
-
|
|
468
|
-
|
|
675
|
+
|
|
676
|
+
// src/components/radio-group.tsx
|
|
677
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
678
|
+
import { forwardRef as forwardRef12 } from "react";
|
|
679
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
680
|
+
var RadioGroup = forwardRef12(({ className, ...props }, ref) => {
|
|
681
|
+
return /* @__PURE__ */ jsx16(
|
|
469
682
|
RadioGroupPrimitive.Root,
|
|
470
683
|
{
|
|
471
684
|
className: cn("grid gap-2", className),
|
|
@@ -476,36 +689,47 @@ var RadioGroup = forwardRef(({ className, ...props }, ref) => {
|
|
|
476
689
|
);
|
|
477
690
|
});
|
|
478
691
|
RadioGroup.displayName = "RadioGroup";
|
|
479
|
-
var RadioGroupItem =
|
|
480
|
-
return /* @__PURE__ */
|
|
692
|
+
var RadioGroupItem = forwardRef12(({ className, ...props }, ref) => {
|
|
693
|
+
return /* @__PURE__ */ jsx16(
|
|
481
694
|
RadioGroupPrimitive.Item,
|
|
482
695
|
{
|
|
483
696
|
ref,
|
|
484
697
|
"data-slot": "radio-group-item",
|
|
485
698
|
className: cn(
|
|
486
|
-
|
|
699
|
+
// Unchecked outline uses primary/40 (clearly visible) instead of primary/5
|
|
700
|
+
// (~5% opacity, effectively invisible); hover strengthens above the resting state.
|
|
701
|
+
// Resting border uses border-input (a visible 3:1 boundary); the checked
|
|
702
|
+
// state switches to border-primary below, keeping the two states distinct.
|
|
703
|
+
"peer h-4 w-4 shrink-0 rounded-none border border-input bg-background cursor-pointer transition-all duration-150 focus:border-primary! focus-visible:border-primary! focus:outline-none focus-visible:outline-none aria-invalid:border-destructive aria-invalid:focus:border-destructive! aria-invalid:focus-visible:border-destructive! disabled:cursor-not-allowed disabled:opacity-50 hover:border-primary/70 data-[state=checked]:border-primary data-[state=checked]:border-[5px]",
|
|
487
704
|
className
|
|
488
705
|
),
|
|
489
706
|
...props,
|
|
490
|
-
children: /* @__PURE__ */
|
|
707
|
+
children: /* @__PURE__ */ jsx16(RadioGroupPrimitive.Indicator, {})
|
|
491
708
|
}
|
|
492
709
|
);
|
|
493
710
|
});
|
|
494
711
|
RadioGroupItem.displayName = "RadioGroupItem";
|
|
712
|
+
|
|
713
|
+
// src/components/switch.tsx
|
|
714
|
+
import {
|
|
715
|
+
Root as SwitchRoot,
|
|
716
|
+
Thumb as SwitchThumb
|
|
717
|
+
} from "@radix-ui/react-switch";
|
|
718
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
495
719
|
function Switch({ className, ...props }) {
|
|
496
|
-
return /* @__PURE__ */
|
|
497
|
-
|
|
720
|
+
return /* @__PURE__ */ jsx17(
|
|
721
|
+
SwitchRoot,
|
|
498
722
|
{
|
|
499
723
|
"data-slot": "switch",
|
|
500
724
|
className: cn(
|
|
501
|
-
"peer inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-none border border-
|
|
502
|
-
"data-[state=checked]:bg-primary data-[state=checked]
|
|
503
|
-
"data-[state=unchecked]:bg-input data-[state=unchecked]:border-
|
|
725
|
+
"peer inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-none border border-border transition-all outline-none focus-visible:border-primary aria-invalid:border-destructive aria-invalid:focus-visible:border-destructive! disabled:cursor-not-allowed disabled:opacity-50",
|
|
726
|
+
"data-[state=checked]:bg-primary data-[state=checked]:border-primary!",
|
|
727
|
+
"data-[state=unchecked]:bg-input data-[state=unchecked]:border-border dark:data-[state=unchecked]:bg-input/80",
|
|
504
728
|
className
|
|
505
729
|
),
|
|
506
730
|
...props,
|
|
507
|
-
children: /* @__PURE__ */
|
|
508
|
-
|
|
731
|
+
children: /* @__PURE__ */ jsx17(
|
|
732
|
+
SwitchThumb,
|
|
509
733
|
{
|
|
510
734
|
"data-slot": "switch-thumb",
|
|
511
735
|
className: cn(
|
|
@@ -516,12 +740,21 @@ function Switch({ className, ...props }) {
|
|
|
516
740
|
}
|
|
517
741
|
);
|
|
518
742
|
}
|
|
743
|
+
|
|
744
|
+
// src/components/collapsible.tsx
|
|
745
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
519
746
|
var Collapsible = CollapsiblePrimitive.Root;
|
|
520
747
|
var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
|
|
521
748
|
var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
|
|
749
|
+
|
|
750
|
+
// src/components/accordion.tsx
|
|
751
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
752
|
+
import { ChevronDown } from "lucide-react";
|
|
753
|
+
import { forwardRef as forwardRef13 } from "react";
|
|
754
|
+
import { jsx as jsx18, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
522
755
|
var Accordion = AccordionPrimitive.Root;
|
|
523
|
-
var AccordionItem =
|
|
524
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
756
|
+
var AccordionItem = forwardRef13(
|
|
757
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
|
|
525
758
|
AccordionPrimitive.Item,
|
|
526
759
|
{
|
|
527
760
|
ref,
|
|
@@ -532,8 +765,8 @@ var AccordionItem = forwardRef(
|
|
|
532
765
|
)
|
|
533
766
|
);
|
|
534
767
|
AccordionItem.displayName = "AccordionItem";
|
|
535
|
-
var AccordionTrigger =
|
|
536
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
768
|
+
var AccordionTrigger = forwardRef13(
|
|
769
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx18(AccordionPrimitive.Header, { className: "flex", "data-slot": "accordion-header", children: /* @__PURE__ */ jsxs3(
|
|
537
770
|
AccordionPrimitive.Trigger,
|
|
538
771
|
{
|
|
539
772
|
ref,
|
|
@@ -545,26 +778,36 @@ var AccordionTrigger = forwardRef(
|
|
|
545
778
|
...props,
|
|
546
779
|
children: [
|
|
547
780
|
children,
|
|
548
|
-
/* @__PURE__ */
|
|
781
|
+
/* @__PURE__ */ jsx18(ChevronDown, { className: "h-4 w-4 shrink-0 transition-transform duration-150 will-change-transform" })
|
|
549
782
|
]
|
|
550
783
|
}
|
|
551
784
|
) })
|
|
552
785
|
);
|
|
553
786
|
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
554
|
-
var AccordionContent =
|
|
555
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
787
|
+
var AccordionContent = forwardRef13(
|
|
788
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx18(
|
|
556
789
|
AccordionPrimitive.Content,
|
|
557
790
|
{
|
|
558
791
|
ref,
|
|
559
792
|
"data-slot": "accordion-content",
|
|
560
|
-
className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
793
|
+
className: "overflow-hidden text-sm transition-all will-change-[height] transform-[translateZ(0)] data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
561
794
|
...props,
|
|
562
|
-
children: /* @__PURE__ */
|
|
795
|
+
children: /* @__PURE__ */ jsx18("div", { className: cn("pb-4 pt-0", className), children })
|
|
563
796
|
}
|
|
564
797
|
)
|
|
565
798
|
);
|
|
566
799
|
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
567
|
-
|
|
800
|
+
|
|
801
|
+
// src/components/avatar.tsx
|
|
802
|
+
import {
|
|
803
|
+
Root as AvatarRoot,
|
|
804
|
+
Image as AvatarImagePrimitive,
|
|
805
|
+
Fallback as AvatarFallbackPrimitive
|
|
806
|
+
} from "@radix-ui/react-avatar";
|
|
807
|
+
import { cva as cva7 } from "class-variance-authority";
|
|
808
|
+
import { createContext as createContext2, forwardRef as forwardRef14, useContext as useContext2 } from "react";
|
|
809
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
810
|
+
var avatarVariants = cva7(
|
|
568
811
|
"relative inline-flex shrink-0 overflow-hidden rounded-none items-center justify-center bg-primary/5 text-muted-foreground",
|
|
569
812
|
{
|
|
570
813
|
variants: {
|
|
@@ -593,11 +836,11 @@ var fallbackTextSizeMap = {
|
|
|
593
836
|
"2xl": "text-2xl"
|
|
594
837
|
// 24px for 80px avatar
|
|
595
838
|
};
|
|
596
|
-
var AvatarSizeContext =
|
|
597
|
-
var Avatar =
|
|
839
|
+
var AvatarSizeContext = createContext2("md");
|
|
840
|
+
var Avatar = forwardRef14(
|
|
598
841
|
({ className, size = "md", ...props }, ref) => {
|
|
599
|
-
return /* @__PURE__ */
|
|
600
|
-
|
|
842
|
+
return /* @__PURE__ */ jsx19(AvatarSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx19(
|
|
843
|
+
AvatarRoot,
|
|
601
844
|
{
|
|
602
845
|
ref,
|
|
603
846
|
"data-slot": "avatar",
|
|
@@ -608,10 +851,10 @@ var Avatar = forwardRef(
|
|
|
608
851
|
}
|
|
609
852
|
);
|
|
610
853
|
Avatar.displayName = "Avatar";
|
|
611
|
-
var AvatarImage =
|
|
854
|
+
var AvatarImage = forwardRef14(
|
|
612
855
|
({ className, ...props }, ref) => {
|
|
613
|
-
return /* @__PURE__ */
|
|
614
|
-
|
|
856
|
+
return /* @__PURE__ */ jsx19(
|
|
857
|
+
AvatarImagePrimitive,
|
|
615
858
|
{
|
|
616
859
|
ref,
|
|
617
860
|
"data-slot": "avatar-image",
|
|
@@ -622,12 +865,12 @@ var AvatarImage = forwardRef(
|
|
|
622
865
|
}
|
|
623
866
|
);
|
|
624
867
|
AvatarImage.displayName = "AvatarImage";
|
|
625
|
-
var AvatarFallback =
|
|
868
|
+
var AvatarFallback = forwardRef14(
|
|
626
869
|
({ className, children, ...props }, ref) => {
|
|
627
|
-
const size =
|
|
870
|
+
const size = useContext2(AvatarSizeContext) || "md";
|
|
628
871
|
const textSize = fallbackTextSizeMap[size];
|
|
629
|
-
return /* @__PURE__ */
|
|
630
|
-
|
|
872
|
+
return /* @__PURE__ */ jsx19(
|
|
873
|
+
AvatarFallbackPrimitive,
|
|
631
874
|
{
|
|
632
875
|
ref,
|
|
633
876
|
"data-slot": "avatar-fallback",
|
|
@@ -643,9 +886,14 @@ var AvatarFallback = forwardRef(
|
|
|
643
886
|
}
|
|
644
887
|
);
|
|
645
888
|
AvatarFallback.displayName = "AvatarFallback";
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
889
|
+
|
|
890
|
+
// src/components/tabs.tsx
|
|
891
|
+
import { Root as Root7, List, Trigger as Trigger3, Content as Content3 } from "@radix-ui/react-tabs";
|
|
892
|
+
import { forwardRef as forwardRef15 } from "react";
|
|
893
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
894
|
+
var Tabs = Root7;
|
|
895
|
+
var TabsList = forwardRef15(
|
|
896
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx20(
|
|
649
897
|
List,
|
|
650
898
|
{
|
|
651
899
|
ref,
|
|
@@ -659,67 +907,47 @@ var TabsList = forwardRef(
|
|
|
659
907
|
)
|
|
660
908
|
);
|
|
661
909
|
TabsList.displayName = List.displayName;
|
|
662
|
-
var TabsTrigger =
|
|
663
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
664
|
-
|
|
910
|
+
var TabsTrigger = forwardRef15(
|
|
911
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx20(
|
|
912
|
+
Trigger3,
|
|
665
913
|
{
|
|
666
914
|
ref,
|
|
667
915
|
"data-slot": "tabs-trigger",
|
|
668
916
|
className: cn(
|
|
669
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-none bg-transparent px-4 py-2 text-sm font-medium cursor-pointer transition-all duration-200 border-b-2 relative -mb-0.5 data-[state=active]
|
|
917
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-none bg-transparent px-4 py-2 text-sm font-medium cursor-pointer transition-all duration-200 border-b-2 relative -mb-0.5 data-[state=active]:border-b-primary! data-[state=active]:text-primary data-[state=inactive]:border-transparent data-[state=inactive]:text-muted-foreground hover:text-primary hover:border-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed",
|
|
670
918
|
className
|
|
671
919
|
),
|
|
672
920
|
...props
|
|
673
921
|
}
|
|
674
922
|
)
|
|
675
923
|
);
|
|
676
|
-
TabsTrigger.displayName =
|
|
677
|
-
var TabsContent =
|
|
678
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
679
|
-
|
|
924
|
+
TabsTrigger.displayName = Trigger3.displayName;
|
|
925
|
+
var TabsContent = forwardRef15(
|
|
926
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx20(
|
|
927
|
+
Content3,
|
|
680
928
|
{
|
|
681
929
|
ref,
|
|
682
930
|
"data-slot": "tabs-content",
|
|
683
931
|
className: cn(
|
|
684
|
-
"mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring
|
|
932
|
+
"mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
685
933
|
className
|
|
686
934
|
),
|
|
687
935
|
...props
|
|
688
936
|
}
|
|
689
937
|
)
|
|
690
938
|
);
|
|
691
|
-
TabsContent.displayName =
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
{
|
|
698
|
-
ref,
|
|
699
|
-
sideOffset,
|
|
700
|
-
"data-slot": "tooltip-content",
|
|
701
|
-
className: cn(
|
|
702
|
-
"z-50 overflow-hidden rounded-none px-3 py-1.5 text-xs shadow-lg border border-primary/5 bg-popover text-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",
|
|
703
|
-
className
|
|
704
|
-
),
|
|
705
|
-
...props
|
|
706
|
-
}
|
|
707
|
-
));
|
|
708
|
-
TooltipContent.displayName = Content$1.displayName;
|
|
709
|
-
var PortalContext = createContext({ container: null });
|
|
710
|
-
function PortalProvider({ container, children }) {
|
|
711
|
-
return /* @__PURE__ */ jsx(PortalContext.Provider, { value: { container }, children });
|
|
712
|
-
}
|
|
713
|
-
function usePortalContainer() {
|
|
714
|
-
const { container } = useContext(PortalContext);
|
|
715
|
-
return container ?? void 0;
|
|
716
|
-
}
|
|
939
|
+
TabsContent.displayName = Content3.displayName;
|
|
940
|
+
|
|
941
|
+
// src/components/popover.tsx
|
|
942
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
943
|
+
import * as React5 from "react";
|
|
944
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
717
945
|
var Popover = PopoverPrimitive.Root;
|
|
718
946
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
719
947
|
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
720
948
|
var PopoverContent = React5.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => {
|
|
721
949
|
const portalContainer = usePortalContainer();
|
|
722
|
-
return /* @__PURE__ */
|
|
950
|
+
return /* @__PURE__ */ jsx21(PopoverPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx21(
|
|
723
951
|
PopoverPrimitive.Content,
|
|
724
952
|
{
|
|
725
953
|
ref,
|
|
@@ -727,7 +955,7 @@ var PopoverContent = React5.forwardRef(({ className, align = "center", sideOffse
|
|
|
727
955
|
sideOffset,
|
|
728
956
|
"data-slot": "popover-content",
|
|
729
957
|
className: cn(
|
|
730
|
-
"z-[100] w-72 rounded-none border border-
|
|
958
|
+
"z-[100] w-72 rounded-none border border-border bg-popover p-4 text-popover-foreground shadow-md outline-none 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 origin-[--radix-popover-content-transform-origin]",
|
|
731
959
|
className
|
|
732
960
|
),
|
|
733
961
|
...props
|
|
@@ -735,11 +963,18 @@ var PopoverContent = React5.forwardRef(({ className, align = "center", sideOffse
|
|
|
735
963
|
) });
|
|
736
964
|
});
|
|
737
965
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
966
|
+
|
|
967
|
+
// src/components/dialog.tsx
|
|
968
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
969
|
+
import { cva as cva8 } from "class-variance-authority";
|
|
970
|
+
import { X } from "lucide-react";
|
|
971
|
+
import { forwardRef as forwardRef17 } from "react";
|
|
972
|
+
import { jsx as jsx22, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
738
973
|
var Dialog = DialogPrimitive.Root;
|
|
739
974
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
740
975
|
var DialogPortal = DialogPrimitive.Portal;
|
|
741
976
|
var DialogClose = DialogPrimitive.Close;
|
|
742
|
-
var DialogOverlay =
|
|
977
|
+
var DialogOverlay = forwardRef17(({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
|
|
743
978
|
DialogPrimitive.Overlay,
|
|
744
979
|
{
|
|
745
980
|
ref,
|
|
@@ -752,7 +987,7 @@ var DialogOverlay = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
752
987
|
}
|
|
753
988
|
));
|
|
754
989
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
755
|
-
var dialogContentVariants =
|
|
990
|
+
var dialogContentVariants = cva8("", {
|
|
756
991
|
variants: {
|
|
757
992
|
size: {
|
|
758
993
|
sm: "max-w-sm",
|
|
@@ -766,31 +1001,31 @@ var dialogContentVariants = cva("", {
|
|
|
766
1001
|
size: "md"
|
|
767
1002
|
}
|
|
768
1003
|
});
|
|
769
|
-
var DialogContent =
|
|
1004
|
+
var DialogContent = forwardRef17(({ className, children, size, ...props }, ref) => {
|
|
770
1005
|
const portalContainer = usePortalContainer();
|
|
771
|
-
return /* @__PURE__ */
|
|
772
|
-
/* @__PURE__ */
|
|
773
|
-
/* @__PURE__ */
|
|
1006
|
+
return /* @__PURE__ */ jsxs4(DialogPortal, { container: portalContainer, children: [
|
|
1007
|
+
/* @__PURE__ */ jsx22(DialogOverlay, {}),
|
|
1008
|
+
/* @__PURE__ */ jsxs4(
|
|
774
1009
|
DialogPrimitive.Content,
|
|
775
1010
|
{
|
|
776
1011
|
ref,
|
|
777
1012
|
"data-slot": "dialog-content",
|
|
778
1013
|
className: cn(
|
|
779
|
-
"fixed left-[50%] top-[50%] z-[51] grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border border-
|
|
1014
|
+
"fixed left-[50%] top-[50%] z-[51] grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background p-6 shadow-xl rounded-none duration-150 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",
|
|
780
1015
|
dialogContentVariants({ size }),
|
|
781
1016
|
className
|
|
782
1017
|
),
|
|
783
1018
|
...props,
|
|
784
1019
|
children: [
|
|
785
1020
|
children,
|
|
786
|
-
/* @__PURE__ */
|
|
1021
|
+
/* @__PURE__ */ jsxs4(
|
|
787
1022
|
DialogPrimitive.Close,
|
|
788
1023
|
{
|
|
789
1024
|
"data-slot": "dialog-close",
|
|
790
1025
|
className: "absolute right-4 top-4 rounded-none p-1 text-muted-foreground cursor-pointer transition-colors duration-150 hover-unified focus:outline-none focus:ring-2 focus:ring-ring disabled:pointer-events-none disabled:cursor-not-allowed",
|
|
791
1026
|
children: [
|
|
792
|
-
/* @__PURE__ */
|
|
793
|
-
/* @__PURE__ */
|
|
1027
|
+
/* @__PURE__ */ jsx22(X, { className: "h-4 w-4" }),
|
|
1028
|
+
/* @__PURE__ */ jsx22("span", { className: "sr-only", children: "Close" })
|
|
794
1029
|
]
|
|
795
1030
|
}
|
|
796
1031
|
)
|
|
@@ -800,8 +1035,8 @@ var DialogContent = forwardRef(({ className, children, size, ...props }, ref) =>
|
|
|
800
1035
|
] });
|
|
801
1036
|
});
|
|
802
1037
|
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
803
|
-
var DialogHeader =
|
|
804
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
1038
|
+
var DialogHeader = forwardRef17(
|
|
1039
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
|
|
805
1040
|
"div",
|
|
806
1041
|
{
|
|
807
1042
|
ref,
|
|
@@ -814,8 +1049,8 @@ var DialogHeader = forwardRef(
|
|
|
814
1049
|
)
|
|
815
1050
|
);
|
|
816
1051
|
DialogHeader.displayName = "DialogHeader";
|
|
817
|
-
var DialogFooter =
|
|
818
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
1052
|
+
var DialogFooter = forwardRef17(
|
|
1053
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
|
|
819
1054
|
"div",
|
|
820
1055
|
{
|
|
821
1056
|
ref,
|
|
@@ -828,7 +1063,7 @@ var DialogFooter = forwardRef(
|
|
|
828
1063
|
)
|
|
829
1064
|
);
|
|
830
1065
|
DialogFooter.displayName = "DialogFooter";
|
|
831
|
-
var DialogTitle =
|
|
1066
|
+
var DialogTitle = forwardRef17(({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
|
|
832
1067
|
DialogPrimitive.Title,
|
|
833
1068
|
{
|
|
834
1069
|
ref,
|
|
@@ -840,7 +1075,7 @@ var DialogTitle = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ j
|
|
|
840
1075
|
}
|
|
841
1076
|
));
|
|
842
1077
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
843
|
-
var DialogDescription =
|
|
1078
|
+
var DialogDescription = forwardRef17(({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
|
|
844
1079
|
DialogPrimitive.Description,
|
|
845
1080
|
{
|
|
846
1081
|
ref,
|
|
@@ -849,10 +1084,17 @@ var DialogDescription = forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
849
1084
|
}
|
|
850
1085
|
));
|
|
851
1086
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
1087
|
+
|
|
1088
|
+
// src/components/alert-dialog.tsx
|
|
1089
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
1090
|
+
import {
|
|
1091
|
+
forwardRef as forwardRef18
|
|
1092
|
+
} from "react";
|
|
1093
|
+
import { jsx as jsx23, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
852
1094
|
var AlertDialog = AlertDialogPrimitive.Root;
|
|
853
1095
|
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
854
1096
|
var AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
855
|
-
var AlertDialogOverlay =
|
|
1097
|
+
var AlertDialogOverlay = forwardRef18(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
856
1098
|
AlertDialogPrimitive.Overlay,
|
|
857
1099
|
{
|
|
858
1100
|
ref,
|
|
@@ -864,16 +1106,16 @@ var AlertDialogOverlay = forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
864
1106
|
}
|
|
865
1107
|
));
|
|
866
1108
|
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
867
|
-
var AlertDialogContent =
|
|
1109
|
+
var AlertDialogContent = forwardRef18(({ className, ...props }, ref) => {
|
|
868
1110
|
const portalContainer = usePortalContainer();
|
|
869
|
-
return /* @__PURE__ */
|
|
870
|
-
/* @__PURE__ */
|
|
871
|
-
/* @__PURE__ */
|
|
1111
|
+
return /* @__PURE__ */ jsxs5(AlertDialogPortal, { container: portalContainer, children: [
|
|
1112
|
+
/* @__PURE__ */ jsx23(AlertDialogOverlay, {}),
|
|
1113
|
+
/* @__PURE__ */ jsx23(
|
|
872
1114
|
AlertDialogPrimitive.Content,
|
|
873
1115
|
{
|
|
874
1116
|
ref,
|
|
875
1117
|
className: cn(
|
|
876
|
-
"fixed left-[50%] top-[50%] z-[51] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-
|
|
1118
|
+
"fixed left-[50%] top-[50%] z-[51] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background p-6 shadow-xl rounded-none duration-150 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",
|
|
877
1119
|
className
|
|
878
1120
|
),
|
|
879
1121
|
...props
|
|
@@ -882,8 +1124,8 @@ var AlertDialogContent = forwardRef(({ className, ...props }, ref) => {
|
|
|
882
1124
|
] });
|
|
883
1125
|
});
|
|
884
1126
|
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
885
|
-
var AlertDialogHeader =
|
|
886
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
1127
|
+
var AlertDialogHeader = forwardRef18(
|
|
1128
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
887
1129
|
"div",
|
|
888
1130
|
{
|
|
889
1131
|
ref,
|
|
@@ -896,8 +1138,8 @@ var AlertDialogHeader = forwardRef(
|
|
|
896
1138
|
)
|
|
897
1139
|
);
|
|
898
1140
|
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
899
|
-
var AlertDialogFooter =
|
|
900
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
1141
|
+
var AlertDialogFooter = forwardRef18(
|
|
1142
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
901
1143
|
"div",
|
|
902
1144
|
{
|
|
903
1145
|
ref,
|
|
@@ -910,7 +1152,7 @@ var AlertDialogFooter = forwardRef(
|
|
|
910
1152
|
)
|
|
911
1153
|
);
|
|
912
1154
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
913
|
-
var AlertDialogTitle =
|
|
1155
|
+
var AlertDialogTitle = forwardRef18(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
914
1156
|
AlertDialogPrimitive.Title,
|
|
915
1157
|
{
|
|
916
1158
|
ref,
|
|
@@ -922,7 +1164,7 @@ var AlertDialogTitle = forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
922
1164
|
}
|
|
923
1165
|
));
|
|
924
1166
|
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
925
|
-
var AlertDialogDescription =
|
|
1167
|
+
var AlertDialogDescription = forwardRef18(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
926
1168
|
AlertDialogPrimitive.Description,
|
|
927
1169
|
{
|
|
928
1170
|
ref,
|
|
@@ -931,7 +1173,7 @@ var AlertDialogDescription = forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
931
1173
|
}
|
|
932
1174
|
));
|
|
933
1175
|
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
934
|
-
var AlertDialogAction =
|
|
1176
|
+
var AlertDialogAction = forwardRef18(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
935
1177
|
AlertDialogPrimitive.Action,
|
|
936
1178
|
{
|
|
937
1179
|
ref,
|
|
@@ -941,7 +1183,7 @@ var AlertDialogAction = forwardRef(({ className, children, ...props }, ref) => /
|
|
|
941
1183
|
}
|
|
942
1184
|
));
|
|
943
1185
|
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
944
|
-
var AlertDialogCancel =
|
|
1186
|
+
var AlertDialogCancel = forwardRef18(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
945
1187
|
AlertDialogPrimitive.Cancel,
|
|
946
1188
|
{
|
|
947
1189
|
ref,
|
|
@@ -955,50 +1197,58 @@ var AlertDialogCancel = forwardRef(({ className, children, ...props }, ref) => /
|
|
|
955
1197
|
}
|
|
956
1198
|
));
|
|
957
1199
|
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
1200
|
+
|
|
1201
|
+
// src/components/dropdown-menu.tsx
|
|
1202
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
1203
|
+
import { Check as Check2, ChevronRight, Circle } from "lucide-react";
|
|
1204
|
+
import * as React6 from "react";
|
|
1205
|
+
import { jsx as jsx24, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
958
1206
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
959
1207
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
960
1208
|
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
961
1209
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
962
1210
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
963
1211
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
964
|
-
var
|
|
1212
|
+
var menuItemBase = "cursor-pointer transition-colors data-[highlighted]:bg-muted data-[highlighted]:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
1213
|
+
var DropdownMenuSubTrigger = React6.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs6(
|
|
965
1214
|
DropdownMenuPrimitive.SubTrigger,
|
|
966
1215
|
{
|
|
967
1216
|
ref,
|
|
968
1217
|
className: cn(
|
|
969
|
-
"flex
|
|
1218
|
+
"flex select-none items-center gap-2 rounded-none px-2 py-1.5 text-sm outline-none data-[state=open]:bg-muted data-[state=open]:text-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
1219
|
+
menuItemBase,
|
|
970
1220
|
inset && "pl-8",
|
|
971
1221
|
className
|
|
972
1222
|
),
|
|
973
1223
|
...props,
|
|
974
1224
|
children: [
|
|
975
1225
|
children,
|
|
976
|
-
/* @__PURE__ */
|
|
1226
|
+
/* @__PURE__ */ jsx24(ChevronRight, { className: "ml-auto" })
|
|
977
1227
|
]
|
|
978
1228
|
}
|
|
979
1229
|
));
|
|
980
1230
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
981
|
-
var DropdownMenuSubContent =
|
|
1231
|
+
var DropdownMenuSubContent = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
982
1232
|
DropdownMenuPrimitive.SubContent,
|
|
983
1233
|
{
|
|
984
1234
|
ref,
|
|
985
1235
|
className: cn(
|
|
986
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-none border border-
|
|
1236
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-none border border-border bg-popover p-1 text-popover-foreground shadow-lg 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 origin-[--radix-dropdown-menu-content-transform-origin]",
|
|
987
1237
|
className
|
|
988
1238
|
),
|
|
989
1239
|
...props
|
|
990
1240
|
}
|
|
991
1241
|
));
|
|
992
1242
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
993
|
-
var DropdownMenuContent =
|
|
1243
|
+
var DropdownMenuContent = React6.forwardRef(({ className, sideOffset = 4, ...props }, ref) => {
|
|
994
1244
|
const portalContainer = usePortalContainer();
|
|
995
|
-
return /* @__PURE__ */
|
|
1245
|
+
return /* @__PURE__ */ jsx24(DropdownMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx24(
|
|
996
1246
|
DropdownMenuPrimitive.Content,
|
|
997
1247
|
{
|
|
998
1248
|
ref,
|
|
999
1249
|
sideOffset,
|
|
1000
1250
|
className: cn(
|
|
1001
|
-
"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-none border border-
|
|
1251
|
+
"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-none border border-border bg-popover p-1 text-popover-foreground shadow-md 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 origin-[--radix-dropdown-menu-content-transform-origin]",
|
|
1002
1252
|
className
|
|
1003
1253
|
),
|
|
1004
1254
|
...props
|
|
@@ -1006,12 +1256,13 @@ var DropdownMenuContent = React5.forwardRef(({ className, sideOffset = 4, ...pro
|
|
|
1006
1256
|
) });
|
|
1007
1257
|
});
|
|
1008
1258
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1009
|
-
var DropdownMenuItem =
|
|
1259
|
+
var DropdownMenuItem = React6.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
1010
1260
|
DropdownMenuPrimitive.Item,
|
|
1011
1261
|
{
|
|
1012
1262
|
ref,
|
|
1013
1263
|
className: cn(
|
|
1014
|
-
"relative flex
|
|
1264
|
+
"relative flex select-none items-center gap-2 rounded-none px-2 py-1.5 text-sm outline-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
1265
|
+
menuItemBase,
|
|
1015
1266
|
inset && "pl-8",
|
|
1016
1267
|
className
|
|
1017
1268
|
),
|
|
@@ -1019,40 +1270,42 @@ var DropdownMenuItem = React5.forwardRef(({ className, inset, ...props }, ref) =
|
|
|
1019
1270
|
}
|
|
1020
1271
|
));
|
|
1021
1272
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
1022
|
-
var DropdownMenuCheckboxItem =
|
|
1273
|
+
var DropdownMenuCheckboxItem = React6.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs6(
|
|
1023
1274
|
DropdownMenuPrimitive.CheckboxItem,
|
|
1024
1275
|
{
|
|
1025
1276
|
ref,
|
|
1026
1277
|
className: cn(
|
|
1027
|
-
"relative flex
|
|
1278
|
+
"relative flex select-none items-center rounded-none py-1.5 pl-8 pr-2 text-sm outline-none",
|
|
1279
|
+
menuItemBase,
|
|
1028
1280
|
className
|
|
1029
1281
|
),
|
|
1030
1282
|
checked,
|
|
1031
1283
|
...props,
|
|
1032
1284
|
children: [
|
|
1033
|
-
/* @__PURE__ */
|
|
1285
|
+
/* @__PURE__ */ jsx24("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx24(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx24(Check2, { className: "h-4 w-4" }) }) }),
|
|
1034
1286
|
children
|
|
1035
1287
|
]
|
|
1036
1288
|
}
|
|
1037
1289
|
));
|
|
1038
1290
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
1039
|
-
var DropdownMenuRadioItem =
|
|
1291
|
+
var DropdownMenuRadioItem = React6.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs6(
|
|
1040
1292
|
DropdownMenuPrimitive.RadioItem,
|
|
1041
1293
|
{
|
|
1042
1294
|
ref,
|
|
1043
1295
|
className: cn(
|
|
1044
|
-
"relative flex
|
|
1296
|
+
"relative flex select-none items-center rounded-none py-1.5 pl-8 pr-2 text-sm outline-none",
|
|
1297
|
+
menuItemBase,
|
|
1045
1298
|
className
|
|
1046
1299
|
),
|
|
1047
1300
|
...props,
|
|
1048
1301
|
children: [
|
|
1049
|
-
/* @__PURE__ */
|
|
1302
|
+
/* @__PURE__ */ jsx24("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx24(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx24(Circle, { className: "h-2 w-2 fill-current" }) }) }),
|
|
1050
1303
|
children
|
|
1051
1304
|
]
|
|
1052
1305
|
}
|
|
1053
1306
|
));
|
|
1054
1307
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
1055
|
-
var DropdownMenuLabel =
|
|
1308
|
+
var DropdownMenuLabel = React6.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
1056
1309
|
DropdownMenuPrimitive.Label,
|
|
1057
1310
|
{
|
|
1058
1311
|
ref,
|
|
@@ -1065,7 +1318,7 @@ var DropdownMenuLabel = React5.forwardRef(({ className, inset, ...props }, ref)
|
|
|
1065
1318
|
}
|
|
1066
1319
|
));
|
|
1067
1320
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
1068
|
-
var DropdownMenuSeparator =
|
|
1321
|
+
var DropdownMenuSeparator = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
1069
1322
|
DropdownMenuPrimitive.Separator,
|
|
1070
1323
|
{
|
|
1071
1324
|
ref,
|
|
@@ -1074,8 +1327,8 @@ var DropdownMenuSeparator = React5.forwardRef(({ className, ...props }, ref) =>
|
|
|
1074
1327
|
}
|
|
1075
1328
|
));
|
|
1076
1329
|
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
1077
|
-
var DropdownMenuShortcut =
|
|
1078
|
-
return /* @__PURE__ */
|
|
1330
|
+
var DropdownMenuShortcut = React6.forwardRef(({ className, ...props }, ref) => {
|
|
1331
|
+
return /* @__PURE__ */ jsx24(
|
|
1079
1332
|
"span",
|
|
1080
1333
|
{
|
|
1081
1334
|
ref,
|
|
@@ -1085,27 +1338,36 @@ var DropdownMenuShortcut = React5.forwardRef(({ className, ...props }, ref) => {
|
|
|
1085
1338
|
);
|
|
1086
1339
|
});
|
|
1087
1340
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
1341
|
+
|
|
1342
|
+
// src/components/select.tsx
|
|
1343
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
1344
|
+
import { cva as cva9 } from "class-variance-authority";
|
|
1345
|
+
import { Check as Check3, ChevronDown as ChevronDown2, ChevronUp } from "lucide-react";
|
|
1346
|
+
import { forwardRef as forwardRef20 } from "react";
|
|
1347
|
+
import { jsx as jsx25, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1088
1348
|
function Select({ ...props }) {
|
|
1089
|
-
return /* @__PURE__ */
|
|
1349
|
+
return /* @__PURE__ */ jsx25(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
1090
1350
|
}
|
|
1091
1351
|
function SelectGroup({
|
|
1092
1352
|
...props
|
|
1093
1353
|
}) {
|
|
1094
|
-
return /* @__PURE__ */
|
|
1354
|
+
return /* @__PURE__ */ jsx25(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
1095
1355
|
}
|
|
1096
1356
|
function SelectValue({
|
|
1097
1357
|
...props
|
|
1098
1358
|
}) {
|
|
1099
|
-
return /* @__PURE__ */
|
|
1359
|
+
return /* @__PURE__ */ jsx25(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
1100
1360
|
}
|
|
1101
|
-
var selectTriggerVariants =
|
|
1102
|
-
|
|
1361
|
+
var selectTriggerVariants = cva9(
|
|
1362
|
+
// hover:border-primary (full strength) keeps the hover boundary more visible
|
|
1363
|
+
// than the resting border-input, not a fainter alpha of it.
|
|
1364
|
+
"flex w-full items-center justify-between gap-2 rounded-none border border-input bg-background px-3 text-sm text-foreground cursor-pointer transition-all duration-150 focus:border-primary! focus-visible:border-primary! focus:outline-none hover:border-primary disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-primary/5 data-[placeholder]:text-muted-foreground aria-[invalid=true]:border-destructive aria-[invalid=true]:focus:border-destructive! [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4",
|
|
1103
1365
|
{
|
|
1104
1366
|
variants: {
|
|
1105
1367
|
size: {
|
|
1106
|
-
sm: "h-
|
|
1107
|
-
default: "h-
|
|
1108
|
-
lg: "h-
|
|
1368
|
+
sm: "h-[var(--nx-control-height-sm)] text-sm",
|
|
1369
|
+
default: "h-[var(--nx-control-height)] text-sm",
|
|
1370
|
+
lg: "h-[var(--nx-control-height-lg)] text-base"
|
|
1109
1371
|
}
|
|
1110
1372
|
},
|
|
1111
1373
|
defaultVariants: {
|
|
@@ -1113,8 +1375,8 @@ var selectTriggerVariants = cva(
|
|
|
1113
1375
|
}
|
|
1114
1376
|
}
|
|
1115
1377
|
);
|
|
1116
|
-
var SelectTrigger =
|
|
1117
|
-
return /* @__PURE__ */
|
|
1378
|
+
var SelectTrigger = forwardRef20(({ className, size, children, ...props }, ref) => {
|
|
1379
|
+
return /* @__PURE__ */ jsxs7(
|
|
1118
1380
|
SelectPrimitive.Trigger,
|
|
1119
1381
|
{
|
|
1120
1382
|
ref,
|
|
@@ -1123,7 +1385,7 @@ var SelectTrigger = forwardRef(({ className, size, children, ...props }, ref) =>
|
|
|
1123
1385
|
...props,
|
|
1124
1386
|
children: [
|
|
1125
1387
|
children,
|
|
1126
|
-
/* @__PURE__ */
|
|
1388
|
+
/* @__PURE__ */ jsx25(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx25(ChevronDown2, { className: "size-4 opacity-50" }) })
|
|
1127
1389
|
]
|
|
1128
1390
|
}
|
|
1129
1391
|
);
|
|
@@ -1136,20 +1398,20 @@ function SelectContent({
|
|
|
1136
1398
|
...props
|
|
1137
1399
|
}) {
|
|
1138
1400
|
const portalContainer = usePortalContainer();
|
|
1139
|
-
return /* @__PURE__ */
|
|
1401
|
+
return /* @__PURE__ */ jsx25(SelectPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxs7(
|
|
1140
1402
|
SelectPrimitive.Content,
|
|
1141
1403
|
{
|
|
1142
1404
|
"data-slot": "select-content",
|
|
1143
1405
|
className: cn(
|
|
1144
|
-
"bg-popover text-popover-foreground border border-
|
|
1406
|
+
"bg-popover text-popover-foreground border border-border shadow-none rounded-none z-9999 max-h-(--radix-select-content-available-height) min-w-32 overflow-hidden data-[state=open]:animate-zoom-in-95 data-[state=closed]:animate-zoom-out-95 data-[side=bottom]:animate-slide-in-from-top-2 data-[side=left]:animate-slide-in-from-right-2 data-[side=right]:animate-slide-in-from-left-2 data-[side=top]:animate-slide-in-from-bottom-2",
|
|
1145
1407
|
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
1146
1408
|
className
|
|
1147
1409
|
),
|
|
1148
1410
|
position,
|
|
1149
1411
|
...props,
|
|
1150
1412
|
children: [
|
|
1151
|
-
/* @__PURE__ */
|
|
1152
|
-
/* @__PURE__ */
|
|
1413
|
+
/* @__PURE__ */ jsx25(SelectScrollUpButton, {}),
|
|
1414
|
+
/* @__PURE__ */ jsx25(
|
|
1153
1415
|
SelectPrimitive.Viewport,
|
|
1154
1416
|
{
|
|
1155
1417
|
className: cn(
|
|
@@ -1159,7 +1421,7 @@ function SelectContent({
|
|
|
1159
1421
|
children
|
|
1160
1422
|
}
|
|
1161
1423
|
),
|
|
1162
|
-
/* @__PURE__ */
|
|
1424
|
+
/* @__PURE__ */ jsx25(SelectScrollDownButton, {})
|
|
1163
1425
|
]
|
|
1164
1426
|
}
|
|
1165
1427
|
) });
|
|
@@ -1168,7 +1430,7 @@ function SelectLabel({
|
|
|
1168
1430
|
className,
|
|
1169
1431
|
...props
|
|
1170
1432
|
}) {
|
|
1171
|
-
return /* @__PURE__ */
|
|
1433
|
+
return /* @__PURE__ */ jsx25(
|
|
1172
1434
|
SelectPrimitive.Label,
|
|
1173
1435
|
{
|
|
1174
1436
|
"data-slot": "select-label",
|
|
@@ -1182,7 +1444,7 @@ function SelectItem({
|
|
|
1182
1444
|
children,
|
|
1183
1445
|
...props
|
|
1184
1446
|
}) {
|
|
1185
|
-
return /* @__PURE__ */
|
|
1447
|
+
return /* @__PURE__ */ jsxs7(
|
|
1186
1448
|
SelectPrimitive.Item,
|
|
1187
1449
|
{
|
|
1188
1450
|
"data-slot": "select-item",
|
|
@@ -1192,8 +1454,8 @@ function SelectItem({
|
|
|
1192
1454
|
),
|
|
1193
1455
|
...props,
|
|
1194
1456
|
children: [
|
|
1195
|
-
/* @__PURE__ */
|
|
1196
|
-
/* @__PURE__ */
|
|
1457
|
+
/* @__PURE__ */ jsx25("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx25(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx25(Check3, { className: "size-4" }) }) }),
|
|
1458
|
+
/* @__PURE__ */ jsx25(SelectPrimitive.ItemText, { children })
|
|
1197
1459
|
]
|
|
1198
1460
|
}
|
|
1199
1461
|
);
|
|
@@ -1202,7 +1464,7 @@ function SelectSeparator({
|
|
|
1202
1464
|
className,
|
|
1203
1465
|
...props
|
|
1204
1466
|
}) {
|
|
1205
|
-
return /* @__PURE__ */
|
|
1467
|
+
return /* @__PURE__ */ jsx25(
|
|
1206
1468
|
SelectPrimitive.Separator,
|
|
1207
1469
|
{
|
|
1208
1470
|
"data-slot": "select-separator",
|
|
@@ -1215,7 +1477,7 @@ function SelectScrollUpButton({
|
|
|
1215
1477
|
className,
|
|
1216
1478
|
...props
|
|
1217
1479
|
}) {
|
|
1218
|
-
return /* @__PURE__ */
|
|
1480
|
+
return /* @__PURE__ */ jsx25(
|
|
1219
1481
|
SelectPrimitive.ScrollUpButton,
|
|
1220
1482
|
{
|
|
1221
1483
|
"data-slot": "select-scroll-up-button",
|
|
@@ -1224,7 +1486,7 @@ function SelectScrollUpButton({
|
|
|
1224
1486
|
className
|
|
1225
1487
|
),
|
|
1226
1488
|
...props,
|
|
1227
|
-
children: /* @__PURE__ */
|
|
1489
|
+
children: /* @__PURE__ */ jsx25(ChevronUp, { className: "size-4" })
|
|
1228
1490
|
}
|
|
1229
1491
|
);
|
|
1230
1492
|
}
|
|
@@ -1232,7 +1494,7 @@ function SelectScrollDownButton({
|
|
|
1232
1494
|
className,
|
|
1233
1495
|
...props
|
|
1234
1496
|
}) {
|
|
1235
|
-
return /* @__PURE__ */
|
|
1497
|
+
return /* @__PURE__ */ jsx25(
|
|
1236
1498
|
SelectPrimitive.ScrollDownButton,
|
|
1237
1499
|
{
|
|
1238
1500
|
"data-slot": "select-scroll-down-button",
|
|
@@ -1241,16 +1503,22 @@ function SelectScrollDownButton({
|
|
|
1241
1503
|
className
|
|
1242
1504
|
),
|
|
1243
1505
|
...props,
|
|
1244
|
-
children: /* @__PURE__ */
|
|
1506
|
+
children: /* @__PURE__ */ jsx25(ChevronDown2, { className: "size-4" })
|
|
1245
1507
|
}
|
|
1246
1508
|
);
|
|
1247
1509
|
}
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1510
|
+
|
|
1511
|
+
// src/components/sheet.tsx
|
|
1512
|
+
import * as DialogPrimitive2 from "@radix-ui/react-dialog";
|
|
1513
|
+
import { cva as cva10 } from "class-variance-authority";
|
|
1514
|
+
import * as React7 from "react";
|
|
1515
|
+
import { jsx as jsx26, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1516
|
+
var Sheet = DialogPrimitive2.Root;
|
|
1517
|
+
var SheetTrigger = DialogPrimitive2.Trigger;
|
|
1518
|
+
var SheetClose = DialogPrimitive2.Close;
|
|
1519
|
+
var SheetPortal = DialogPrimitive2.Portal;
|
|
1520
|
+
var SheetOverlay = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
1521
|
+
DialogPrimitive2.Overlay,
|
|
1254
1522
|
{
|
|
1255
1523
|
className: cn(
|
|
1256
1524
|
"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",
|
|
@@ -1262,16 +1530,16 @@ var SheetOverlay = React5.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1262
1530
|
ref
|
|
1263
1531
|
}
|
|
1264
1532
|
));
|
|
1265
|
-
SheetOverlay.displayName =
|
|
1266
|
-
var sheetVariants =
|
|
1533
|
+
SheetOverlay.displayName = DialogPrimitive2.Overlay.displayName;
|
|
1534
|
+
var sheetVariants = cva10(
|
|
1267
1535
|
"fixed z-50 gap-4 bg-background p-6 shadow-lg will-change-transform transition ease-in-out data-[state=closed]:duration-150 data-[state=open]:duration-150 data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
1268
1536
|
{
|
|
1269
1537
|
variants: {
|
|
1270
1538
|
side: {
|
|
1271
|
-
top: "inset-x-0 top-0 border-b border-
|
|
1272
|
-
bottom: "inset-x-0 bottom-0 border-t border-
|
|
1273
|
-
left: "inset-y-0 left-0 h-full w-3/4 border-r border-
|
|
1274
|
-
right: "inset-y-0 right-0 h-full w-3/4 border-l border-
|
|
1539
|
+
top: "inset-x-0 top-0 border-b border-border data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
1540
|
+
bottom: "inset-x-0 bottom-0 border-t border-border data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
1541
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r border-border data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
1542
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l border-border data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
|
|
1275
1543
|
}
|
|
1276
1544
|
},
|
|
1277
1545
|
defaultVariants: {
|
|
@@ -1279,12 +1547,12 @@ var sheetVariants = cva(
|
|
|
1279
1547
|
}
|
|
1280
1548
|
}
|
|
1281
1549
|
);
|
|
1282
|
-
var SheetContent =
|
|
1550
|
+
var SheetContent = React7.forwardRef(({ side = "right", className, children, ...props }, ref) => {
|
|
1283
1551
|
const portalContainer = usePortalContainer();
|
|
1284
|
-
return /* @__PURE__ */
|
|
1285
|
-
/* @__PURE__ */
|
|
1286
|
-
/* @__PURE__ */
|
|
1287
|
-
|
|
1552
|
+
return /* @__PURE__ */ jsxs8(SheetPortal, { container: portalContainer, children: [
|
|
1553
|
+
/* @__PURE__ */ jsx26(SheetOverlay, {}),
|
|
1554
|
+
/* @__PURE__ */ jsx26(
|
|
1555
|
+
DialogPrimitive2.Content,
|
|
1288
1556
|
{
|
|
1289
1557
|
ref,
|
|
1290
1558
|
"data-slot": "sheet-content",
|
|
@@ -1295,11 +1563,11 @@ var SheetContent = React5.forwardRef(({ side = "right", className, children, ...
|
|
|
1295
1563
|
)
|
|
1296
1564
|
] });
|
|
1297
1565
|
});
|
|
1298
|
-
SheetContent.displayName =
|
|
1566
|
+
SheetContent.displayName = DialogPrimitive2.Content.displayName;
|
|
1299
1567
|
var SheetHeader = ({
|
|
1300
1568
|
className,
|
|
1301
1569
|
...props
|
|
1302
|
-
}) => /* @__PURE__ */
|
|
1570
|
+
}) => /* @__PURE__ */ jsx26(
|
|
1303
1571
|
"div",
|
|
1304
1572
|
{
|
|
1305
1573
|
className: cn(
|
|
@@ -1313,7 +1581,7 @@ SheetHeader.displayName = "SheetHeader";
|
|
|
1313
1581
|
var SheetFooter = ({
|
|
1314
1582
|
className,
|
|
1315
1583
|
...props
|
|
1316
|
-
}) => /* @__PURE__ */
|
|
1584
|
+
}) => /* @__PURE__ */ jsx26(
|
|
1317
1585
|
"div",
|
|
1318
1586
|
{
|
|
1319
1587
|
className: cn(
|
|
@@ -1324,27 +1592,34 @@ var SheetFooter = ({
|
|
|
1324
1592
|
}
|
|
1325
1593
|
);
|
|
1326
1594
|
SheetFooter.displayName = "SheetFooter";
|
|
1327
|
-
var SheetTitle =
|
|
1328
|
-
|
|
1595
|
+
var SheetTitle = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
1596
|
+
DialogPrimitive2.Title,
|
|
1329
1597
|
{
|
|
1330
1598
|
ref,
|
|
1331
1599
|
className: cn("text-lg font-semibold text-foreground", className),
|
|
1332
1600
|
...props
|
|
1333
1601
|
}
|
|
1334
1602
|
));
|
|
1335
|
-
SheetTitle.displayName =
|
|
1336
|
-
var SheetDescription =
|
|
1337
|
-
|
|
1603
|
+
SheetTitle.displayName = DialogPrimitive2.Title.displayName;
|
|
1604
|
+
var SheetDescription = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
1605
|
+
DialogPrimitive2.Description,
|
|
1338
1606
|
{
|
|
1339
1607
|
ref,
|
|
1340
1608
|
className: cn("text-sm text-muted-foreground", className),
|
|
1341
1609
|
...props
|
|
1342
1610
|
}
|
|
1343
1611
|
));
|
|
1344
|
-
SheetDescription.displayName =
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1612
|
+
SheetDescription.displayName = DialogPrimitive2.Description.displayName;
|
|
1613
|
+
|
|
1614
|
+
// src/components/command.tsx
|
|
1615
|
+
import * as DialogPrimitive3 from "@radix-ui/react-dialog";
|
|
1616
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
1617
|
+
import { Search } from "lucide-react";
|
|
1618
|
+
import { forwardRef as forwardRef22 } from "react";
|
|
1619
|
+
import { jsx as jsx27, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1620
|
+
var Command = forwardRef22(
|
|
1621
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
1622
|
+
CommandPrimitive,
|
|
1348
1623
|
{
|
|
1349
1624
|
ref,
|
|
1350
1625
|
className: cn(
|
|
@@ -1356,8 +1631,8 @@ var Command = forwardRef(
|
|
|
1356
1631
|
)
|
|
1357
1632
|
);
|
|
1358
1633
|
Command.displayName = "Command";
|
|
1359
|
-
var CommandDialogOverlay =
|
|
1360
|
-
|
|
1634
|
+
var CommandDialogOverlay = forwardRef22(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
1635
|
+
DialogPrimitive3.Overlay,
|
|
1361
1636
|
{
|
|
1362
1637
|
ref,
|
|
1363
1638
|
className: cn(
|
|
@@ -1373,10 +1648,10 @@ var CommandDialogOverlay = forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1373
1648
|
CommandDialogOverlay.displayName = "CommandDialogOverlay";
|
|
1374
1649
|
var CommandDialog = ({ children, ...props }) => {
|
|
1375
1650
|
const portalContainer = usePortalContainer();
|
|
1376
|
-
return /* @__PURE__ */
|
|
1377
|
-
/* @__PURE__ */
|
|
1378
|
-
/* @__PURE__ */
|
|
1379
|
-
|
|
1651
|
+
return /* @__PURE__ */ jsx27(DialogPrimitive3.Root, { ...props, children: /* @__PURE__ */ jsxs9(DialogPrimitive3.Portal, { container: portalContainer, children: [
|
|
1652
|
+
/* @__PURE__ */ jsx27(CommandDialogOverlay, {}),
|
|
1653
|
+
/* @__PURE__ */ jsx27(
|
|
1654
|
+
DialogPrimitive3.Content,
|
|
1380
1655
|
{
|
|
1381
1656
|
"data-slot": "command-content",
|
|
1382
1657
|
className: cn(
|
|
@@ -1395,7 +1670,7 @@ var CommandDialog = ({ children, ...props }) => {
|
|
|
1395
1670
|
"m-4 sm:m-0",
|
|
1396
1671
|
// 16px margin on mobile, no margin on desktop
|
|
1397
1672
|
// Visual
|
|
1398
|
-
"overflow-hidden rounded-none border border-
|
|
1673
|
+
"overflow-hidden rounded-none border border-border bg-background shadow-xl",
|
|
1399
1674
|
// Animation
|
|
1400
1675
|
"duration-200",
|
|
1401
1676
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
@@ -1403,20 +1678,20 @@ var CommandDialog = ({ children, ...props }) => {
|
|
|
1403
1678
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
1404
1679
|
"data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-top-[48%]"
|
|
1405
1680
|
),
|
|
1406
|
-
children: /* @__PURE__ */
|
|
1681
|
+
children: /* @__PURE__ */ jsx27(Command, { className: "[&_[cmdk-group-heading]]:px-3 [&_[cmdk-group-heading]]:py-2 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-wide [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:mb-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-3 [&_[cmdk-item]]:py-2 [&_[cmdk-item]_svg]:h-4 [&_[cmdk-item]_svg]:w-4", children })
|
|
1407
1682
|
}
|
|
1408
1683
|
)
|
|
1409
1684
|
] }) });
|
|
1410
1685
|
};
|
|
1411
|
-
var CommandInput =
|
|
1686
|
+
var CommandInput = forwardRef22(({ className, ...props }, ref) => /* @__PURE__ */ jsxs9(
|
|
1412
1687
|
"div",
|
|
1413
1688
|
{
|
|
1414
|
-
className: "flex items-center border-b border-
|
|
1689
|
+
className: "flex items-center border-b border-border px-4",
|
|
1415
1690
|
"cmdk-input-wrapper": "",
|
|
1416
1691
|
children: [
|
|
1417
|
-
/* @__PURE__ */
|
|
1418
|
-
/* @__PURE__ */
|
|
1419
|
-
|
|
1692
|
+
/* @__PURE__ */ jsx27(Search, { className: "mr-3 h-5 w-5 shrink-0 text-muted-foreground" }),
|
|
1693
|
+
/* @__PURE__ */ jsx27(
|
|
1694
|
+
CommandPrimitive.Input,
|
|
1420
1695
|
{
|
|
1421
1696
|
ref,
|
|
1422
1697
|
className: cn(
|
|
@@ -1440,8 +1715,8 @@ var CommandInput = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
1440
1715
|
}
|
|
1441
1716
|
));
|
|
1442
1717
|
CommandInput.displayName = "CommandInput";
|
|
1443
|
-
var CommandList =
|
|
1444
|
-
|
|
1718
|
+
var CommandList = forwardRef22(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
1719
|
+
CommandPrimitive.List,
|
|
1445
1720
|
{
|
|
1446
1721
|
ref,
|
|
1447
1722
|
className: cn(
|
|
@@ -1455,8 +1730,8 @@ var CommandList = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ j
|
|
|
1455
1730
|
}
|
|
1456
1731
|
));
|
|
1457
1732
|
CommandList.displayName = "CommandList";
|
|
1458
|
-
var CommandEmpty =
|
|
1459
|
-
|
|
1733
|
+
var CommandEmpty = forwardRef22((props, ref) => /* @__PURE__ */ jsx27(
|
|
1734
|
+
CommandPrimitive.Empty,
|
|
1460
1735
|
{
|
|
1461
1736
|
ref,
|
|
1462
1737
|
className: "py-8 px-4 text-center text-sm text-muted-foreground",
|
|
@@ -1464,8 +1739,8 @@ var CommandEmpty = forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
|
1464
1739
|
}
|
|
1465
1740
|
));
|
|
1466
1741
|
CommandEmpty.displayName = "CommandEmpty";
|
|
1467
|
-
var CommandGroup =
|
|
1468
|
-
|
|
1742
|
+
var CommandGroup = forwardRef22(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
1743
|
+
CommandPrimitive.Group,
|
|
1469
1744
|
{
|
|
1470
1745
|
ref,
|
|
1471
1746
|
className: cn(
|
|
@@ -1479,8 +1754,8 @@ var CommandGroup = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
1479
1754
|
}
|
|
1480
1755
|
));
|
|
1481
1756
|
CommandGroup.displayName = "CommandGroup";
|
|
1482
|
-
var CommandSeparator =
|
|
1483
|
-
|
|
1757
|
+
var CommandSeparator = forwardRef22(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
1758
|
+
CommandPrimitive.Separator,
|
|
1484
1759
|
{
|
|
1485
1760
|
ref,
|
|
1486
1761
|
className: cn("h-px bg-border my-2", className),
|
|
@@ -1488,8 +1763,8 @@ var CommandSeparator = forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
1488
1763
|
}
|
|
1489
1764
|
));
|
|
1490
1765
|
CommandSeparator.displayName = "CommandSeparator";
|
|
1491
|
-
var CommandItem =
|
|
1492
|
-
|
|
1766
|
+
var CommandItem = forwardRef22(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
1767
|
+
CommandPrimitive.Item,
|
|
1493
1768
|
{
|
|
1494
1769
|
ref,
|
|
1495
1770
|
className: cn(
|
|
@@ -1517,9 +1792,9 @@ var CommandItem = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ j
|
|
|
1517
1792
|
}
|
|
1518
1793
|
));
|
|
1519
1794
|
CommandItem.displayName = "CommandItem";
|
|
1520
|
-
var CommandShortcut =
|
|
1795
|
+
var CommandShortcut = forwardRef22(
|
|
1521
1796
|
({ className, ...props }, ref) => {
|
|
1522
|
-
return /* @__PURE__ */
|
|
1797
|
+
return /* @__PURE__ */ jsx27(
|
|
1523
1798
|
"span",
|
|
1524
1799
|
{
|
|
1525
1800
|
ref,
|
|
@@ -1530,7 +1805,7 @@ var CommandShortcut = forwardRef(
|
|
|
1530
1805
|
"text-xs font-mono",
|
|
1531
1806
|
// Visual
|
|
1532
1807
|
"text-muted-foreground bg-primary/5",
|
|
1533
|
-
"border border-
|
|
1808
|
+
"border border-border rounded-none",
|
|
1534
1809
|
// Spacing
|
|
1535
1810
|
"px-1.5 py-0.5",
|
|
1536
1811
|
className
|
|
@@ -1541,7 +1816,13 @@ var CommandShortcut = forwardRef(
|
|
|
1541
1816
|
}
|
|
1542
1817
|
);
|
|
1543
1818
|
CommandShortcut.displayName = "CommandShortcut";
|
|
1544
|
-
|
|
1819
|
+
|
|
1820
|
+
// src/components/spinner.tsx
|
|
1821
|
+
import { cva as cva11 } from "class-variance-authority";
|
|
1822
|
+
import { Loader2 } from "lucide-react";
|
|
1823
|
+
import { forwardRef as forwardRef23 } from "react";
|
|
1824
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1825
|
+
var spinnerVariants = cva11("animate-spin motion-reduce:animate-none", {
|
|
1545
1826
|
variants: {
|
|
1546
1827
|
size: {
|
|
1547
1828
|
sm: "h-4 w-4",
|
|
@@ -1553,9 +1834,9 @@ var spinnerVariants = cva("animate-spin motion-reduce:animate-none", {
|
|
|
1553
1834
|
size: "md"
|
|
1554
1835
|
}
|
|
1555
1836
|
});
|
|
1556
|
-
var Spinner =
|
|
1837
|
+
var Spinner = forwardRef23(
|
|
1557
1838
|
({ size = "md", className, "aria-label": ariaLabel = "Loading", ...props }, ref) => {
|
|
1558
|
-
return /* @__PURE__ */
|
|
1839
|
+
return /* @__PURE__ */ jsx28(
|
|
1559
1840
|
Loader2,
|
|
1560
1841
|
{
|
|
1561
1842
|
ref,
|
|
@@ -1568,12 +1849,23 @@ var Spinner = forwardRef(
|
|
|
1568
1849
|
}
|
|
1569
1850
|
);
|
|
1570
1851
|
Spinner.displayName = "Spinner";
|
|
1852
|
+
|
|
1853
|
+
// src/components/toaster.tsx
|
|
1854
|
+
import {
|
|
1855
|
+
CheckCircle2,
|
|
1856
|
+
AlertCircle,
|
|
1857
|
+
AlertTriangle,
|
|
1858
|
+
XCircle,
|
|
1859
|
+
Loader2 as Loader22
|
|
1860
|
+
} from "lucide-react";
|
|
1861
|
+
import { toast, Toaster as Sonner } from "sonner";
|
|
1862
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1571
1863
|
function Toaster({ theme = "system", ...props }) {
|
|
1572
|
-
return /* @__PURE__ */
|
|
1573
|
-
|
|
1864
|
+
return /* @__PURE__ */ jsx29(
|
|
1865
|
+
Sonner,
|
|
1574
1866
|
{
|
|
1575
1867
|
theme,
|
|
1576
|
-
className: "toaster group
|
|
1868
|
+
className: "toaster group bg-transparent! overflow-visible! z-[9999]!",
|
|
1577
1869
|
"data-slot": "toaster",
|
|
1578
1870
|
toastOptions: {
|
|
1579
1871
|
classNames: {
|
|
@@ -1581,23 +1873,27 @@ function Toaster({ theme = "system", ...props }) {
|
|
|
1581
1873
|
}
|
|
1582
1874
|
},
|
|
1583
1875
|
icons: {
|
|
1584
|
-
success: /* @__PURE__ */
|
|
1585
|
-
info: /* @__PURE__ */
|
|
1586
|
-
warning: /* @__PURE__ */
|
|
1587
|
-
error: /* @__PURE__ */
|
|
1588
|
-
loading: /* @__PURE__ */
|
|
1876
|
+
success: /* @__PURE__ */ jsx29(CheckCircle2, { className: "h-4 w-4" }),
|
|
1877
|
+
info: /* @__PURE__ */ jsx29(AlertCircle, { className: "h-4 w-4" }),
|
|
1878
|
+
warning: /* @__PURE__ */ jsx29(AlertTriangle, { className: "h-4 w-4" }),
|
|
1879
|
+
error: /* @__PURE__ */ jsx29(XCircle, { className: "h-4 w-4" }),
|
|
1880
|
+
loading: /* @__PURE__ */ jsx29(Loader22, { className: "h-4 w-4 animate-spin" })
|
|
1589
1881
|
},
|
|
1590
1882
|
style: {
|
|
1591
|
-
"--normal-bg": "
|
|
1592
|
-
"--normal-text": "
|
|
1593
|
-
"--normal-border": "
|
|
1883
|
+
"--normal-bg": "var(--nx-popover)",
|
|
1884
|
+
"--normal-text": "var(--nx-popover-foreground)",
|
|
1885
|
+
"--normal-border": "var(--nx-border)",
|
|
1594
1886
|
"--border-radius": "0px"
|
|
1595
1887
|
},
|
|
1596
1888
|
...props
|
|
1597
1889
|
}
|
|
1598
1890
|
);
|
|
1599
1891
|
}
|
|
1600
|
-
|
|
1892
|
+
|
|
1893
|
+
// src/components/table.tsx
|
|
1894
|
+
import * as React8 from "react";
|
|
1895
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1896
|
+
var Table = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx30(
|
|
1601
1897
|
"table",
|
|
1602
1898
|
{
|
|
1603
1899
|
ref,
|
|
@@ -1606,9 +1902,16 @@ var Table = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
1606
1902
|
}
|
|
1607
1903
|
) }));
|
|
1608
1904
|
Table.displayName = "Table";
|
|
1609
|
-
var TableHeader =
|
|
1905
|
+
var TableHeader = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
1906
|
+
"thead",
|
|
1907
|
+
{
|
|
1908
|
+
ref,
|
|
1909
|
+
className: cn("[&_tr]:border-b border-border", className),
|
|
1910
|
+
...props
|
|
1911
|
+
}
|
|
1912
|
+
));
|
|
1610
1913
|
TableHeader.displayName = "TableHeader";
|
|
1611
|
-
var TableBody =
|
|
1914
|
+
var TableBody = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
1612
1915
|
"tbody",
|
|
1613
1916
|
{
|
|
1614
1917
|
ref,
|
|
@@ -1617,28 +1920,31 @@ var TableBody = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
1617
1920
|
}
|
|
1618
1921
|
));
|
|
1619
1922
|
TableBody.displayName = "TableBody";
|
|
1620
|
-
var TableFooter =
|
|
1923
|
+
var TableFooter = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
1621
1924
|
"tfoot",
|
|
1622
1925
|
{
|
|
1623
1926
|
ref,
|
|
1624
|
-
className: cn(
|
|
1927
|
+
className: cn(
|
|
1928
|
+
"border-t border-border font-medium [&>tr]:last:border-b-0",
|
|
1929
|
+
className
|
|
1930
|
+
),
|
|
1625
1931
|
...props
|
|
1626
1932
|
}
|
|
1627
1933
|
));
|
|
1628
1934
|
TableFooter.displayName = "TableFooter";
|
|
1629
|
-
var TableRow =
|
|
1935
|
+
var TableRow = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
1630
1936
|
"tr",
|
|
1631
1937
|
{
|
|
1632
1938
|
ref,
|
|
1633
1939
|
className: cn(
|
|
1634
|
-
"border-b border-
|
|
1940
|
+
"border-b border-border transition-colors data-[state=selected]:bg-primary/5",
|
|
1635
1941
|
className
|
|
1636
1942
|
),
|
|
1637
1943
|
...props
|
|
1638
1944
|
}
|
|
1639
1945
|
));
|
|
1640
1946
|
TableRow.displayName = "TableRow";
|
|
1641
|
-
var TableHead =
|
|
1947
|
+
var TableHead = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
1642
1948
|
"th",
|
|
1643
1949
|
{
|
|
1644
1950
|
ref,
|
|
@@ -1650,7 +1956,7 @@ var TableHead = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
1650
1956
|
}
|
|
1651
1957
|
));
|
|
1652
1958
|
TableHead.displayName = "TableHead";
|
|
1653
|
-
var TableCell =
|
|
1959
|
+
var TableCell = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
1654
1960
|
"td",
|
|
1655
1961
|
{
|
|
1656
1962
|
ref,
|
|
@@ -1662,7 +1968,7 @@ var TableCell = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
1662
1968
|
}
|
|
1663
1969
|
));
|
|
1664
1970
|
TableCell.displayName = "TableCell";
|
|
1665
|
-
var TableCaption =
|
|
1971
|
+
var TableCaption = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
1666
1972
|
"caption",
|
|
1667
1973
|
{
|
|
1668
1974
|
ref,
|
|
@@ -1671,6 +1977,10 @@ var TableCaption = React5.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1671
1977
|
}
|
|
1672
1978
|
));
|
|
1673
1979
|
TableCaption.displayName = "TableCaption";
|
|
1980
|
+
|
|
1981
|
+
// src/components/table-search.tsx
|
|
1982
|
+
import { Search as Search2, Loader2 as Loader23, X as X2 } from "lucide-react";
|
|
1983
|
+
import { jsx as jsx31, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1674
1984
|
function TableSearch({
|
|
1675
1985
|
value,
|
|
1676
1986
|
onChange,
|
|
@@ -1679,9 +1989,9 @@ function TableSearch({
|
|
|
1679
1989
|
isLoading = false,
|
|
1680
1990
|
inputRef
|
|
1681
1991
|
}) {
|
|
1682
|
-
return /* @__PURE__ */
|
|
1683
|
-
/* @__PURE__ */
|
|
1684
|
-
/* @__PURE__ */
|
|
1992
|
+
return /* @__PURE__ */ jsxs10("div", { className: "relative w-full max-w-lg", children: [
|
|
1993
|
+
/* @__PURE__ */ jsx31(Search2, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" }),
|
|
1994
|
+
/* @__PURE__ */ jsx31(
|
|
1685
1995
|
"input",
|
|
1686
1996
|
{
|
|
1687
1997
|
ref: inputRef,
|
|
@@ -1690,541 +2000,235 @@ function TableSearch({
|
|
|
1690
2000
|
value,
|
|
1691
2001
|
onChange: (e) => onChange(e.target.value),
|
|
1692
2002
|
"aria-busy": isLoading,
|
|
1693
|
-
className: "h-10 w-full rounded-none border border-
|
|
2003
|
+
className: "h-10 w-full rounded-none border border-border bg-background pl-10 pr-10 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 transition-all"
|
|
1694
2004
|
}
|
|
1695
2005
|
),
|
|
1696
|
-
(value || isLoading) && /* @__PURE__ */
|
|
1697
|
-
isLoading && /* @__PURE__ */
|
|
1698
|
-
value && /* @__PURE__ */
|
|
2006
|
+
(value || isLoading) && /* @__PURE__ */ jsxs10("div", { className: "absolute right-3 top-1/2 -translate-y-1/2 flex items-center gap-2", children: [
|
|
2007
|
+
isLoading && /* @__PURE__ */ jsx31(Loader23, { className: "w-3.5 h-3.5 text-primary animate-spin" }),
|
|
2008
|
+
value && /* @__PURE__ */ jsx31(
|
|
1699
2009
|
"button",
|
|
1700
2010
|
{
|
|
1701
2011
|
type: "button",
|
|
1702
2012
|
onClick: onClear,
|
|
1703
|
-
className: "text-muted-foreground
|
|
2013
|
+
className: "text-muted-foreground hover:text-foreground transition-colors p-0.5 rounded-none hover:bg-primary/5",
|
|
1704
2014
|
"aria-label": "Clear search",
|
|
1705
|
-
children: /* @__PURE__ */
|
|
2015
|
+
children: /* @__PURE__ */ jsx31(X2, { className: "w-3.5 h-3.5" })
|
|
1706
2016
|
}
|
|
1707
2017
|
)
|
|
1708
2018
|
] })
|
|
1709
2019
|
] });
|
|
1710
2020
|
}
|
|
2021
|
+
|
|
2022
|
+
// src/components/table-states.tsx
|
|
2023
|
+
import { AlertCircle as AlertCircle2, Loader2 as Loader24, FileQuestion } from "lucide-react";
|
|
2024
|
+
import { jsx as jsx32, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1711
2025
|
function TableError({
|
|
1712
2026
|
message = "An error occurred. Please try again."
|
|
1713
2027
|
}) {
|
|
1714
|
-
return /* @__PURE__ */
|
|
1715
|
-
/* @__PURE__ */
|
|
1716
|
-
/* @__PURE__ */
|
|
2028
|
+
return /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-2", children: [
|
|
2029
|
+
/* @__PURE__ */ jsx32(AlertCircle2, { className: "w-4 h-4 shrink-0" }),
|
|
2030
|
+
/* @__PURE__ */ jsx32("span", { children: message })
|
|
1717
2031
|
] });
|
|
1718
2032
|
}
|
|
1719
2033
|
function TableLoading() {
|
|
1720
|
-
return /* @__PURE__ */
|
|
1721
|
-
/* @__PURE__ */
|
|
1722
|
-
/* @__PURE__ */
|
|
2034
|
+
return /* @__PURE__ */ jsxs11("div", { className: "flex flex-col items-center justify-center gap-4 p-12 text-muted-foreground", children: [
|
|
2035
|
+
/* @__PURE__ */ jsx32(Loader24, { className: "w-8 h-8 animate-spin text-primary/80" }),
|
|
2036
|
+
/* @__PURE__ */ jsx32("span", { className: "text-sm font-medium", children: "Loading data..." })
|
|
1723
2037
|
] });
|
|
1724
2038
|
}
|
|
1725
2039
|
function TableEmpty({ message = "No records found" }) {
|
|
1726
|
-
return /* @__PURE__ */
|
|
1727
|
-
/* @__PURE__ */
|
|
1728
|
-
/* @__PURE__ */
|
|
2040
|
+
return /* @__PURE__ */ jsxs11("div", { className: "flex flex-col items-center justify-center gap-4 p-16 text-center text-muted-foreground", children: [
|
|
2041
|
+
/* @__PURE__ */ jsx32("div", { className: "flex h-12 w-12 items-center justify-center rounded-none bg-primary/5", children: /* @__PURE__ */ jsx32(FileQuestion, { className: "h-6 w-6" }) }),
|
|
2042
|
+
/* @__PURE__ */ jsx32("span", { className: "text-sm font-medium", children: message })
|
|
1729
2043
|
] });
|
|
1730
2044
|
}
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
"button",
|
|
1736
|
-
{
|
|
1737
|
-
onClick: () => onPageChange(i),
|
|
1738
|
-
"aria-label": `Go to page ${i + 1}`,
|
|
1739
|
-
"aria-current": currentPage === i ? "page" : void 0,
|
|
1740
|
-
className: getBtnClass(currentPage === i),
|
|
1741
|
-
children: i + 1
|
|
1742
|
-
},
|
|
1743
|
-
`page-${i}`
|
|
1744
|
-
));
|
|
1745
|
-
}
|
|
1746
|
-
const pages = [];
|
|
1747
|
-
const startPage = Math.max(0, currentPage - Math.floor(maxVisiblePages / 2));
|
|
1748
|
-
const endPage = Math.min(totalPages - 1, startPage + maxVisiblePages - 1);
|
|
1749
|
-
if (startPage > 0) {
|
|
1750
|
-
pages.push(
|
|
1751
|
-
/* @__PURE__ */ jsx(
|
|
1752
|
-
"button",
|
|
1753
|
-
{
|
|
1754
|
-
onClick: () => onPageChange(0),
|
|
1755
|
-
"aria-label": "Go to page 1",
|
|
1756
|
-
className: getBtnClass(currentPage === 0),
|
|
1757
|
-
children: "1"
|
|
1758
|
-
},
|
|
1759
|
-
"page-0"
|
|
1760
|
-
)
|
|
1761
|
-
);
|
|
1762
|
-
if (startPage > 1) {
|
|
1763
|
-
pages.push(
|
|
1764
|
-
/* @__PURE__ */ jsx(
|
|
1765
|
-
"span",
|
|
1766
|
-
{
|
|
1767
|
-
className: "flex h-8 w-8 items-center justify-center border-y border-primary/5 border-r border-primary/5 !border-primary/5 !bg-background text-muted-foreground text-xs -ml-px",
|
|
1768
|
-
"aria-hidden": "true",
|
|
1769
|
-
children: "..."
|
|
1770
|
-
},
|
|
1771
|
-
"ellipsis-start"
|
|
1772
|
-
)
|
|
1773
|
-
);
|
|
1774
|
-
}
|
|
1775
|
-
}
|
|
1776
|
-
for (let i = startPage; i <= endPage; i++) {
|
|
1777
|
-
pages.push(
|
|
1778
|
-
/* @__PURE__ */ jsx(
|
|
1779
|
-
"button",
|
|
1780
|
-
{
|
|
1781
|
-
onClick: () => onPageChange(i),
|
|
1782
|
-
"aria-label": `Go to page ${i + 1}`,
|
|
1783
|
-
"aria-current": currentPage === i ? "page" : void 0,
|
|
1784
|
-
className: getBtnClass(currentPage === i),
|
|
1785
|
-
children: i + 1
|
|
1786
|
-
},
|
|
1787
|
-
i
|
|
1788
|
-
)
|
|
1789
|
-
);
|
|
1790
|
-
}
|
|
1791
|
-
if (endPage < totalPages - 1) {
|
|
1792
|
-
if (endPage < totalPages - 2) {
|
|
1793
|
-
pages.push(
|
|
1794
|
-
/* @__PURE__ */ jsx(
|
|
1795
|
-
"span",
|
|
1796
|
-
{
|
|
1797
|
-
className: "flex h-8 w-8 items-center justify-center border-y border-primary/5 border-r border-primary/5 !border-primary/5 !bg-background text-muted-foreground text-xs -ml-px",
|
|
1798
|
-
"aria-hidden": "true",
|
|
1799
|
-
children: "..."
|
|
1800
|
-
},
|
|
1801
|
-
"ellipsis-end"
|
|
1802
|
-
)
|
|
1803
|
-
);
|
|
1804
|
-
}
|
|
1805
|
-
pages.push(
|
|
1806
|
-
/* @__PURE__ */ jsx(
|
|
1807
|
-
"button",
|
|
1808
|
-
{
|
|
1809
|
-
onClick: () => onPageChange(totalPages - 1),
|
|
1810
|
-
"aria-label": `Go to page ${totalPages}`,
|
|
1811
|
-
className: getBtnClass(currentPage === totalPages - 1),
|
|
1812
|
-
children: totalPages
|
|
1813
|
-
},
|
|
1814
|
-
totalPages - 1
|
|
1815
|
-
)
|
|
1816
|
-
);
|
|
1817
|
-
}
|
|
1818
|
-
return pages;
|
|
1819
|
-
}
|
|
1820
|
-
function TablePagination({
|
|
1821
|
-
meta,
|
|
1822
|
-
onPageChange,
|
|
1823
|
-
onPageSizeChange,
|
|
1824
|
-
config,
|
|
1825
|
-
isLoading = false
|
|
1826
|
-
}) {
|
|
1827
|
-
const {
|
|
1828
|
-
showPageSizeSelector = true,
|
|
1829
|
-
pageSizeOptions = [10, 20, 30, 50],
|
|
1830
|
-
maxVisiblePages = 5
|
|
1831
|
-
} = config || {};
|
|
1832
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row w-full items-center justify-between gap-4 text-xs sm:text-sm text-muted-foreground p-4 border-t border-primary/5", children: [
|
|
1833
|
-
/* @__PURE__ */ jsxs("div", { className: "whitespace-nowrap order-2 sm:order-1", children: [
|
|
1834
|
-
"Showing ",
|
|
1835
|
-
(meta.page - 1) * meta.limit + 1,
|
|
1836
|
-
"-",
|
|
1837
|
-
Math.min(meta.page * meta.limit, meta.total),
|
|
1838
|
-
" of ",
|
|
1839
|
-
meta.total,
|
|
1840
|
-
" entries"
|
|
1841
|
-
] }),
|
|
1842
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-center gap-4 sm:gap-6 lg:gap-8 order-1 sm:order-2", children: [
|
|
1843
|
-
showPageSizeSelector && /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
1844
|
-
/* @__PURE__ */ jsx("span", { className: "whitespace-nowrap hidden sm:inline-block", children: "Rows per page" }),
|
|
1845
|
-
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
1846
|
-
/* @__PURE__ */ jsx(
|
|
1847
|
-
"select",
|
|
1848
|
-
{
|
|
1849
|
-
id: "pageSize",
|
|
1850
|
-
value: meta.limit,
|
|
1851
|
-
onChange: (e) => {
|
|
1852
|
-
const newPageSize = Number(e.target.value);
|
|
1853
|
-
onPageSizeChange(newPageSize);
|
|
1854
|
-
},
|
|
1855
|
-
className: "h-8 w-[70px] appearance-none rounded-none border border-primary/5 bg-background px-2 py-1 text-sm font-medium focus-visible:outline-none focus:ring-1 focus:ring-ring disabled:opacity-50 hover-muted cursor-pointer",
|
|
1856
|
-
disabled: isLoading,
|
|
1857
|
-
children: pageSizeOptions.map((size) => /* @__PURE__ */ jsx("option", { value: size, children: size }, size))
|
|
1858
|
-
}
|
|
1859
|
-
),
|
|
1860
|
-
/* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-muted-foreground", children: /* @__PURE__ */ jsx(
|
|
1861
|
-
"svg",
|
|
1862
|
-
{
|
|
1863
|
-
className: "h-3 w-3",
|
|
1864
|
-
fill: "none",
|
|
1865
|
-
viewBox: "0 0 24 24",
|
|
1866
|
-
stroke: "currentColor",
|
|
1867
|
-
children: /* @__PURE__ */ jsx(
|
|
1868
|
-
"path",
|
|
1869
|
-
{
|
|
1870
|
-
strokeLinecap: "round",
|
|
1871
|
-
strokeLinejoin: "round",
|
|
1872
|
-
strokeWidth: 2,
|
|
1873
|
-
d: "M19 9l-7 7-7-7"
|
|
1874
|
-
}
|
|
1875
|
-
)
|
|
1876
|
-
}
|
|
1877
|
-
) })
|
|
1878
|
-
] })
|
|
1879
|
-
] }),
|
|
1880
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center -space-x-px", children: [
|
|
1881
|
-
/* @__PURE__ */ jsx(
|
|
1882
|
-
"button",
|
|
1883
|
-
{
|
|
1884
|
-
onClick: () => onPageChange(0),
|
|
1885
|
-
disabled: meta.page === 0 || isLoading,
|
|
1886
|
-
className: "hidden sm:flex h-8 w-8 items-center justify-center rounded-none border border-primary/5 bg-background hover-muted disabled:opacity-50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring z-10",
|
|
1887
|
-
"aria-label": "First page",
|
|
1888
|
-
children: /* @__PURE__ */ jsx(ChevronsLeft, { className: "h-4 w-4" })
|
|
1889
|
-
}
|
|
1890
|
-
),
|
|
1891
|
-
/* @__PURE__ */ jsx(
|
|
1892
|
-
"button",
|
|
1893
|
-
{
|
|
1894
|
-
onClick: () => onPageChange(meta.page - 1),
|
|
1895
|
-
disabled: meta.page === 0 || isLoading,
|
|
1896
|
-
className: "flex h-8 w-8 items-center justify-center rounded-none sm:rounded-none border border-primary/5 bg-background hover-muted disabled:opacity-50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring z-10",
|
|
1897
|
-
"aria-label": "Previous page",
|
|
1898
|
-
children: /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" })
|
|
1899
|
-
}
|
|
1900
|
-
),
|
|
1901
|
-
/* @__PURE__ */ jsx("div", { className: "flex", children: renderPageNumbers(
|
|
1902
|
-
meta.page,
|
|
1903
|
-
meta.totalPages,
|
|
1904
|
-
maxVisiblePages,
|
|
1905
|
-
onPageChange
|
|
1906
|
-
) }),
|
|
1907
|
-
/* @__PURE__ */ jsx(
|
|
1908
|
-
"button",
|
|
1909
|
-
{
|
|
1910
|
-
onClick: () => onPageChange(meta.page + 1),
|
|
1911
|
-
disabled: meta.page >= meta.totalPages - 1 || isLoading,
|
|
1912
|
-
className: "flex h-8 w-8 items-center justify-center rounded-none sm:rounded-none border-y border-primary/5 border-x border-primary/5 sm :border-r border-primary/5 bg-background hover-muted disabled:opacity-50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring z-10",
|
|
1913
|
-
"aria-label": "Next page",
|
|
1914
|
-
children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
|
|
1915
|
-
}
|
|
1916
|
-
),
|
|
1917
|
-
/* @__PURE__ */ jsx(
|
|
1918
|
-
"button",
|
|
1919
|
-
{
|
|
1920
|
-
onClick: () => onPageChange(meta.totalPages - 1),
|
|
1921
|
-
disabled: meta.page >= meta.totalPages - 1 || isLoading,
|
|
1922
|
-
className: "hidden sm:flex h-8 w-8 items-center justify-center rounded-none border border-primary/5 bg-background hover-muted disabled:opacity-50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring z-10",
|
|
1923
|
-
"aria-label": "Last page",
|
|
1924
|
-
children: /* @__PURE__ */ jsx(ChevronsRight, { className: "h-4 w-4" })
|
|
1925
|
-
}
|
|
1926
|
-
)
|
|
1927
|
-
] }),
|
|
1928
|
-
/* @__PURE__ */ jsxs("div", { className: "whitespace-nowrap hidden sm:block", children: [
|
|
1929
|
-
"Page ",
|
|
1930
|
-
meta.page + 1,
|
|
1931
|
-
" of ",
|
|
1932
|
-
meta.totalPages
|
|
1933
|
-
] })
|
|
1934
|
-
] })
|
|
1935
|
-
] });
|
|
1936
|
-
}
|
|
1937
|
-
var GrayBar = ({ className }) => /* @__PURE__ */ jsx(Skeleton, { className });
|
|
2045
|
+
|
|
2046
|
+
// src/components/table-skeleton.tsx
|
|
2047
|
+
import { Fragment, jsx as jsx33, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2048
|
+
var GrayBar = ({ className }) => /* @__PURE__ */ jsx33(Skeleton, { className });
|
|
1938
2049
|
var TableSkeleton = ({
|
|
1939
2050
|
columns = 5,
|
|
1940
2051
|
rowCount = 8,
|
|
1941
2052
|
hideWrapper = false,
|
|
1942
2053
|
hideFooter = false
|
|
1943
2054
|
}) => {
|
|
1944
|
-
const content = /* @__PURE__ */
|
|
1945
|
-
/* @__PURE__ */
|
|
1946
|
-
/* @__PURE__ */
|
|
1947
|
-
/* @__PURE__ */
|
|
1948
|
-
/* @__PURE__ */
|
|
1949
|
-
/* @__PURE__ */
|
|
1950
|
-
/* @__PURE__ */
|
|
1951
|
-
/* @__PURE__ */
|
|
2055
|
+
const content = /* @__PURE__ */ jsxs12(Fragment, { children: [
|
|
2056
|
+
/* @__PURE__ */ jsx33("div", { className: "border-0 rounded-none shadow-none", children: /* @__PURE__ */ jsxs12(Table, { children: [
|
|
2057
|
+
/* @__PURE__ */ jsx33(TableHeader, { children: /* @__PURE__ */ jsx33(TableRow, { children: Array.from({ length: columns }).map((_, colIdx) => /* @__PURE__ */ jsx33(TableHead, { className: "py-3", children: colIdx === 0 ? /* @__PURE__ */ jsx33(GrayBar, { className: "h-4 w-4" }) : colIdx === columns - 1 ? /* @__PURE__ */ jsx33("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx33(Skeleton, { className: "h-4 w-4 rounded-none" }) }) : colIdx === 1 ? /* @__PURE__ */ jsx33(GrayBar, { className: "h-4 w-[70%] max-w-[180px]" }) : /* @__PURE__ */ jsx33(GrayBar, { className: "h-4 w-[60%] max-w-[120px]" }) }, `skeleton-header-${colIdx}`)) }) }),
|
|
2058
|
+
/* @__PURE__ */ jsx33(TableBody, { children: Array.from({ length: rowCount }).map((_, rowIdx) => /* @__PURE__ */ jsx33(TableRow, { className: "border-b border-border", children: Array.from({ length: columns }).map((_2, colIdx) => /* @__PURE__ */ jsx33(TableCell, { className: "py-3", children: colIdx === 0 ? /* @__PURE__ */ jsx33(GrayBar, { className: "h-4 w-4" }) : colIdx === columns - 1 ? /* @__PURE__ */ jsx33("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx33(Skeleton, { className: "h-8 w-8 rounded-none" }) }) : colIdx === 1 ? /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-3", children: [
|
|
2059
|
+
/* @__PURE__ */ jsx33(Skeleton, { className: "w-9 rounded-none shrink-0" }),
|
|
2060
|
+
/* @__PURE__ */ jsxs12("div", { className: "space-y-1.5 flex-1", children: [
|
|
2061
|
+
/* @__PURE__ */ jsx33(Skeleton, { className: "h-4 w-[120px]" }),
|
|
2062
|
+
/* @__PURE__ */ jsx33(Skeleton, { className: "h-3 w-[80px]" })
|
|
1952
2063
|
] })
|
|
1953
|
-
] }) : /* @__PURE__ */
|
|
2064
|
+
] }) : /* @__PURE__ */ jsx33(GrayBar, { className: "h-4 w-[60%] max-w-[120px]" }) }, colIdx)) }, rowIdx)) })
|
|
1954
2065
|
] }) }),
|
|
1955
|
-
!hideFooter && /* @__PURE__ */
|
|
1956
|
-
/* @__PURE__ */
|
|
1957
|
-
/* @__PURE__ */
|
|
1958
|
-
/* @__PURE__ */
|
|
1959
|
-
/* @__PURE__ */
|
|
1960
|
-
/* @__PURE__ */
|
|
2066
|
+
!hideFooter && /* @__PURE__ */ jsx33("div", { className: "table-footer border-t border-border", children: /* @__PURE__ */ jsxs12("div", { className: "flex items-center justify-between px-2 py-4 p-4", children: [
|
|
2067
|
+
/* @__PURE__ */ jsx33("div", { className: "flex items-center gap-2 text-sm", children: /* @__PURE__ */ jsx33(GrayBar, { className: "h-4 w-[120px]" }) }),
|
|
2068
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-6", children: [
|
|
2069
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-2", children: [
|
|
2070
|
+
/* @__PURE__ */ jsx33(GrayBar, { className: "h-4 w-20" }),
|
|
2071
|
+
/* @__PURE__ */ jsx33(GrayBar, { className: "h-8 w-[70px]" })
|
|
1961
2072
|
] }),
|
|
1962
|
-
/* @__PURE__ */
|
|
1963
|
-
/* @__PURE__ */
|
|
1964
|
-
/* @__PURE__ */
|
|
1965
|
-
/* @__PURE__ */
|
|
1966
|
-
/* @__PURE__ */
|
|
1967
|
-
/* @__PURE__ */
|
|
2073
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-1", children: [
|
|
2074
|
+
/* @__PURE__ */ jsx33(GrayBar, { className: "h-8 w-8" }),
|
|
2075
|
+
/* @__PURE__ */ jsx33(GrayBar, { className: "h-8 w-8" }),
|
|
2076
|
+
/* @__PURE__ */ jsx33(GrayBar, { className: "h-8 w-8" }),
|
|
2077
|
+
/* @__PURE__ */ jsx33(GrayBar, { className: "h-8 w-8" }),
|
|
2078
|
+
/* @__PURE__ */ jsx33(GrayBar, { className: "h-8 w-8" })
|
|
1968
2079
|
] }),
|
|
1969
|
-
/* @__PURE__ */
|
|
2080
|
+
/* @__PURE__ */ jsx33(GrayBar, { className: "h-4 w-[120px]" })
|
|
1970
2081
|
] })
|
|
1971
2082
|
] }) })
|
|
1972
2083
|
] });
|
|
1973
2084
|
if (hideWrapper) {
|
|
1974
2085
|
return content;
|
|
1975
2086
|
}
|
|
1976
|
-
return /* @__PURE__ */
|
|
2087
|
+
return /* @__PURE__ */ jsx33("div", { className: "table-wrapper rounded-none border border-border bg-card overflow-hidden", children: content });
|
|
1977
2088
|
};
|
|
1978
2089
|
TableSkeleton.displayName = "TableSkeleton";
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
)) }) }),
|
|
2123
|
-
/* @__PURE__ */ jsx(TableBody, { children: data.map((item) => {
|
|
2124
|
-
const primaryValue = primaryColumn ? String(item[primaryColumn.key]) : String(item.id);
|
|
2125
|
-
return /* @__PURE__ */ jsx(
|
|
2126
|
-
TableRow,
|
|
2127
|
-
{
|
|
2128
|
-
className: cn(
|
|
2129
|
-
"hover-unified-table-row",
|
|
2130
|
-
onRowClick && "cursor-pointer"
|
|
2131
|
-
),
|
|
2132
|
-
onClick: (e) => handleItemClick(item, e),
|
|
2133
|
-
role: onRowClick ? "button" : void 0,
|
|
2134
|
-
tabIndex: onRowClick ? 0 : void 0,
|
|
2135
|
-
onKeyDown: onRowClick ? handleCardKeyDown(item) : void 0,
|
|
2136
|
-
"aria-label": onRowClick ? `View details for ${primaryValue}` : void 0,
|
|
2137
|
-
children: columns.map((column) => /* @__PURE__ */ jsx(
|
|
2138
|
-
TableCell,
|
|
2139
|
-
{
|
|
2140
|
-
className: column.cellClassName,
|
|
2141
|
-
children: column.render ? column.render(item[column.key], item) : String(item[column.key])
|
|
2142
|
-
},
|
|
2143
|
-
String(column.key)
|
|
2144
|
-
))
|
|
2145
|
-
},
|
|
2146
|
-
item.id
|
|
2147
|
-
);
|
|
2148
|
-
}) })
|
|
2149
|
-
] })
|
|
2150
|
-
}
|
|
2151
|
-
),
|
|
2152
|
-
footer && /* @__PURE__ */ jsx("div", { className: "table-footer border-t border-primary/5 bg-[hsl(var(--table-header-bg))]", children: footer })
|
|
2153
|
-
] });
|
|
2154
|
-
}
|
|
2155
|
-
var ResponsiveTable = React5.forwardRef(ResponsiveTableInner);
|
|
2156
|
-
|
|
2157
|
-
// src/tailwind-preset.ts
|
|
2158
|
-
var uiPreset = {
|
|
2159
|
-
theme: {
|
|
2160
|
-
extend: {
|
|
2161
|
-
colors: {
|
|
2162
|
-
border: "hsl(var(--border))",
|
|
2163
|
-
input: "hsl(var(--input))",
|
|
2164
|
-
ring: "hsl(var(--ring))",
|
|
2165
|
-
background: "hsl(var(--background))",
|
|
2166
|
-
foreground: "hsl(var(--foreground))",
|
|
2167
|
-
primary: {
|
|
2168
|
-
DEFAULT: "hsl(var(--primary))",
|
|
2169
|
-
foreground: "hsl(var(--primary-foreground))"
|
|
2170
|
-
},
|
|
2171
|
-
secondary: {
|
|
2172
|
-
DEFAULT: "hsl(var(--secondary))",
|
|
2173
|
-
foreground: "hsl(var(--secondary-foreground))"
|
|
2174
|
-
},
|
|
2175
|
-
destructive: {
|
|
2176
|
-
DEFAULT: "hsl(var(--destructive))",
|
|
2177
|
-
foreground: "hsl(var(--destructive-foreground))"
|
|
2178
|
-
},
|
|
2179
|
-
success: {
|
|
2180
|
-
DEFAULT: "hsl(var(--success))",
|
|
2181
|
-
foreground: "hsl(var(--success-foreground))"
|
|
2182
|
-
},
|
|
2183
|
-
warning: {
|
|
2184
|
-
DEFAULT: "hsl(var(--warning))",
|
|
2185
|
-
foreground: "hsl(var(--warning-foreground))"
|
|
2186
|
-
},
|
|
2187
|
-
muted: {
|
|
2188
|
-
DEFAULT: "hsl(var(--muted))",
|
|
2189
|
-
foreground: "hsl(var(--muted-foreground))"
|
|
2190
|
-
},
|
|
2191
|
-
accent: {
|
|
2192
|
-
DEFAULT: "hsl(var(--accent))",
|
|
2193
|
-
foreground: "hsl(var(--accent-foreground))"
|
|
2194
|
-
},
|
|
2195
|
-
popover: {
|
|
2196
|
-
DEFAULT: "hsl(var(--popover))",
|
|
2197
|
-
foreground: "hsl(var(--popover-foreground))"
|
|
2198
|
-
},
|
|
2199
|
-
card: {
|
|
2200
|
-
DEFAULT: "hsl(var(--card))",
|
|
2201
|
-
foreground: "hsl(var(--card-foreground))"
|
|
2202
|
-
}
|
|
2203
|
-
},
|
|
2204
|
-
borderRadius: {
|
|
2205
|
-
lg: "var(--radius)",
|
|
2206
|
-
md: "calc(var(--radius) - 2px)",
|
|
2207
|
-
sm: "calc(var(--radius) - 4px)"
|
|
2208
|
-
},
|
|
2209
|
-
keyframes: {
|
|
2210
|
-
"accordion-down": {
|
|
2211
|
-
from: { height: "0" },
|
|
2212
|
-
to: { height: "var(--radix-accordion-content-height)" }
|
|
2213
|
-
},
|
|
2214
|
-
"accordion-up": {
|
|
2215
|
-
from: { height: "var(--radix-accordion-content-height)" },
|
|
2216
|
-
to: { height: "0" }
|
|
2217
|
-
}
|
|
2218
|
-
},
|
|
2219
|
-
animation: {
|
|
2220
|
-
"accordion-down": "accordion-down 0.3s cubic-bezier(0.87, 0, 0.13, 1)",
|
|
2221
|
-
"accordion-up": "accordion-up 0.3s cubic-bezier(0.87, 0, 0.13, 1)"
|
|
2222
|
-
}
|
|
2223
|
-
}
|
|
2224
|
-
}
|
|
2090
|
+
export {
|
|
2091
|
+
Accordion,
|
|
2092
|
+
AccordionContent,
|
|
2093
|
+
AccordionItem,
|
|
2094
|
+
AccordionTrigger,
|
|
2095
|
+
Alert,
|
|
2096
|
+
AlertDescription,
|
|
2097
|
+
AlertDialog,
|
|
2098
|
+
AlertDialogAction,
|
|
2099
|
+
AlertDialogCancel,
|
|
2100
|
+
AlertDialogContent,
|
|
2101
|
+
AlertDialogDescription,
|
|
2102
|
+
AlertDialogFooter,
|
|
2103
|
+
AlertDialogHeader,
|
|
2104
|
+
AlertDialogOverlay,
|
|
2105
|
+
AlertDialogPortal,
|
|
2106
|
+
AlertDialogTitle,
|
|
2107
|
+
AlertDialogTrigger,
|
|
2108
|
+
AlertTitle,
|
|
2109
|
+
Avatar,
|
|
2110
|
+
AvatarFallback,
|
|
2111
|
+
AvatarImage,
|
|
2112
|
+
Badge,
|
|
2113
|
+
Button,
|
|
2114
|
+
Card,
|
|
2115
|
+
CardAction,
|
|
2116
|
+
CardContent,
|
|
2117
|
+
CardDescription,
|
|
2118
|
+
CardFooter,
|
|
2119
|
+
CardHeader,
|
|
2120
|
+
CardTitle,
|
|
2121
|
+
Checkbox,
|
|
2122
|
+
Collapsible,
|
|
2123
|
+
CollapsibleContent2 as CollapsibleContent,
|
|
2124
|
+
CollapsibleTrigger2 as CollapsibleTrigger,
|
|
2125
|
+
Command,
|
|
2126
|
+
CommandDialog,
|
|
2127
|
+
CommandEmpty,
|
|
2128
|
+
CommandGroup,
|
|
2129
|
+
CommandInput,
|
|
2130
|
+
CommandItem,
|
|
2131
|
+
CommandList,
|
|
2132
|
+
CommandSeparator,
|
|
2133
|
+
CommandShortcut,
|
|
2134
|
+
Dialog,
|
|
2135
|
+
DialogClose,
|
|
2136
|
+
DialogContent,
|
|
2137
|
+
DialogDescription,
|
|
2138
|
+
DialogFooter,
|
|
2139
|
+
DialogHeader,
|
|
2140
|
+
DialogOverlay,
|
|
2141
|
+
DialogPortal,
|
|
2142
|
+
DialogTitle,
|
|
2143
|
+
DialogTrigger,
|
|
2144
|
+
DropdownMenu,
|
|
2145
|
+
DropdownMenuCheckboxItem,
|
|
2146
|
+
DropdownMenuContent,
|
|
2147
|
+
DropdownMenuGroup,
|
|
2148
|
+
DropdownMenuItem,
|
|
2149
|
+
DropdownMenuLabel,
|
|
2150
|
+
DropdownMenuPortal,
|
|
2151
|
+
DropdownMenuRadioGroup,
|
|
2152
|
+
DropdownMenuRadioItem,
|
|
2153
|
+
DropdownMenuSeparator,
|
|
2154
|
+
DropdownMenuShortcut,
|
|
2155
|
+
DropdownMenuSub,
|
|
2156
|
+
DropdownMenuSubContent,
|
|
2157
|
+
DropdownMenuSubTrigger,
|
|
2158
|
+
DropdownMenuTrigger,
|
|
2159
|
+
FormLabelWithTooltip,
|
|
2160
|
+
Grid,
|
|
2161
|
+
Input,
|
|
2162
|
+
Label,
|
|
2163
|
+
Popover,
|
|
2164
|
+
PopoverAnchor,
|
|
2165
|
+
PopoverContent,
|
|
2166
|
+
PopoverTrigger,
|
|
2167
|
+
PortalProvider,
|
|
2168
|
+
Progress,
|
|
2169
|
+
RadioGroup,
|
|
2170
|
+
RadioGroupItem,
|
|
2171
|
+
Select,
|
|
2172
|
+
SelectContent,
|
|
2173
|
+
SelectGroup,
|
|
2174
|
+
SelectItem,
|
|
2175
|
+
SelectLabel,
|
|
2176
|
+
SelectScrollDownButton,
|
|
2177
|
+
SelectScrollUpButton,
|
|
2178
|
+
SelectSeparator,
|
|
2179
|
+
SelectTrigger,
|
|
2180
|
+
SelectValue,
|
|
2181
|
+
Separator,
|
|
2182
|
+
Sheet,
|
|
2183
|
+
SheetClose,
|
|
2184
|
+
SheetContent,
|
|
2185
|
+
SheetDescription,
|
|
2186
|
+
SheetFooter,
|
|
2187
|
+
SheetHeader,
|
|
2188
|
+
SheetOverlay,
|
|
2189
|
+
SheetPortal,
|
|
2190
|
+
SheetTitle,
|
|
2191
|
+
SheetTrigger,
|
|
2192
|
+
Skeleton,
|
|
2193
|
+
Spinner,
|
|
2194
|
+
Stack,
|
|
2195
|
+
Stat,
|
|
2196
|
+
Switch,
|
|
2197
|
+
Table,
|
|
2198
|
+
TableBody,
|
|
2199
|
+
TableCaption,
|
|
2200
|
+
TableCell,
|
|
2201
|
+
TableEmpty,
|
|
2202
|
+
TableError,
|
|
2203
|
+
TableFooter,
|
|
2204
|
+
TableHead,
|
|
2205
|
+
TableHeader,
|
|
2206
|
+
TableLoading,
|
|
2207
|
+
TableRow,
|
|
2208
|
+
TableSearch,
|
|
2209
|
+
TableSkeleton,
|
|
2210
|
+
Tabs,
|
|
2211
|
+
TabsContent,
|
|
2212
|
+
TabsList,
|
|
2213
|
+
TabsTrigger,
|
|
2214
|
+
Textarea,
|
|
2215
|
+
Toaster,
|
|
2216
|
+
Tooltip,
|
|
2217
|
+
TooltipContent,
|
|
2218
|
+
TooltipProvider,
|
|
2219
|
+
TooltipTrigger,
|
|
2220
|
+
alertVariants,
|
|
2221
|
+
avatarVariants,
|
|
2222
|
+
badgeVariants,
|
|
2223
|
+
buttonVariants,
|
|
2224
|
+
cardVariants,
|
|
2225
|
+
dialogContentVariants,
|
|
2226
|
+
inputVariants,
|
|
2227
|
+
progressVariants,
|
|
2228
|
+
selectTriggerVariants,
|
|
2229
|
+
sheetVariants,
|
|
2230
|
+
spinnerVariants,
|
|
2231
|
+
toast,
|
|
2232
|
+
usePortalContainer
|
|
2225
2233
|
};
|
|
2226
|
-
var tailwind_preset_default = uiPreset;
|
|
2227
|
-
|
|
2228
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Input, Label, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalProvider, Progress, RadioGroup, RadioGroupItem, ResponsiveTable, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableEmpty, TableError, TableFooter, TableHead, TableHeader, TableLoading, TablePagination, TableRow, TableSearch, TableSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, alertVariants, avatarVariants, badgeVariants, buttonVariants, cardVariants, cn, dialogContentVariants, inputVariants, progressVariants, selectTriggerVariants, sheetVariants, spinnerVariants, tailwind_preset_default as uiPreset, usePortalContainer };
|
|
2229
|
-
//# sourceMappingURL=index.mjs.map
|
|
2230
2234
|
//# sourceMappingURL=index.mjs.map
|