@blinkdotnew/ui 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1032 -0
- package/dist/index.d.ts +1032 -0
- package/dist/index.js +4036 -0
- package/dist/index.mjs +3763 -0
- package/package.json +115 -0
- package/src/themes/base.css +14 -0
- package/src/themes/glass.css +62 -0
- package/src/themes/linear.css +50 -0
- package/src/themes/midnight.css +56 -0
- package/src/themes/minimal.css +50 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,4036 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React14 = require('react');
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var clsx = require('clsx');
|
|
6
|
+
var tailwindMerge = require('tailwind-merge');
|
|
7
|
+
var reactSlot = require('@radix-ui/react-slot');
|
|
8
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
9
|
+
var SelectPrimitive = require('@radix-ui/react-select');
|
|
10
|
+
var lucideReact = require('lucide-react');
|
|
11
|
+
var CheckboxPrimitive = require('@radix-ui/react-checkbox');
|
|
12
|
+
var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
|
|
13
|
+
var SwitchPrimitive = require('@radix-ui/react-switch');
|
|
14
|
+
var SliderPrimitive = require('@radix-ui/react-slider');
|
|
15
|
+
var DialogPrimitive = require('@radix-ui/react-dialog');
|
|
16
|
+
var PopoverPrimitive = require('@radix-ui/react-popover');
|
|
17
|
+
var TooltipPrimitive = require('@radix-ui/react-tooltip');
|
|
18
|
+
var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
|
|
19
|
+
var ContextMenuPrimitive = require('@radix-ui/react-context-menu');
|
|
20
|
+
var AvatarPrimitive = require('@radix-ui/react-avatar');
|
|
21
|
+
var SeparatorPrimitive = require('@radix-ui/react-separator');
|
|
22
|
+
var ProgressPrimitive = require('@radix-ui/react-progress');
|
|
23
|
+
var TabsPrimitive = require('@radix-ui/react-tabs');
|
|
24
|
+
var reactHookForm = require('react-hook-form');
|
|
25
|
+
var zod = require('@hookform/resolvers/zod');
|
|
26
|
+
var z = require('zod');
|
|
27
|
+
var reactTable = require('@tanstack/react-table');
|
|
28
|
+
var sonner = require('sonner');
|
|
29
|
+
var core = require('@dnd-kit/core');
|
|
30
|
+
var sortable = require('@dnd-kit/sortable');
|
|
31
|
+
var utilities = require('@dnd-kit/utilities');
|
|
32
|
+
var recharts = require('recharts');
|
|
33
|
+
|
|
34
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
35
|
+
|
|
36
|
+
function _interopNamespace(e) {
|
|
37
|
+
if (e && e.__esModule) return e;
|
|
38
|
+
var n = Object.create(null);
|
|
39
|
+
if (e) {
|
|
40
|
+
Object.keys(e).forEach(function (k) {
|
|
41
|
+
if (k !== 'default') {
|
|
42
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
43
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () { return e[k]; }
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
n.default = e;
|
|
51
|
+
return Object.freeze(n);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
var React14__default = /*#__PURE__*/_interopDefault(React14);
|
|
55
|
+
var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
|
|
56
|
+
var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
|
|
57
|
+
var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
|
|
58
|
+
var SwitchPrimitive__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitive);
|
|
59
|
+
var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
|
|
60
|
+
var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
|
|
61
|
+
var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
|
|
62
|
+
var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
|
|
63
|
+
var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
|
|
64
|
+
var ContextMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(ContextMenuPrimitive);
|
|
65
|
+
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
|
|
66
|
+
var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
|
|
67
|
+
var ProgressPrimitive__namespace = /*#__PURE__*/_interopNamespace(ProgressPrimitive);
|
|
68
|
+
var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
|
|
69
|
+
var z__namespace = /*#__PURE__*/_interopNamespace(z);
|
|
70
|
+
|
|
71
|
+
// src/provider/blink-ui-provider.tsx
|
|
72
|
+
var BlinkUIContext = React14.createContext(null);
|
|
73
|
+
function useBlinkUI() {
|
|
74
|
+
const ctx = React14.useContext(BlinkUIContext);
|
|
75
|
+
if (!ctx)
|
|
76
|
+
throw new Error("useBlinkUI must be used within <BlinkUIProvider>");
|
|
77
|
+
return ctx;
|
|
78
|
+
}
|
|
79
|
+
function BlinkUIProvider({
|
|
80
|
+
children,
|
|
81
|
+
theme: initialTheme = "linear",
|
|
82
|
+
darkMode: initialDarkMode = "system"
|
|
83
|
+
}) {
|
|
84
|
+
const [theme, setTheme] = React14.useState(initialTheme);
|
|
85
|
+
const [darkMode, setDarkMode] = React14.useState(initialDarkMode);
|
|
86
|
+
const [resolvedDark, setResolvedDark] = React14.useState(false);
|
|
87
|
+
React14.useEffect(() => {
|
|
88
|
+
const update = () => {
|
|
89
|
+
const isDark = darkMode === "dark" || darkMode === "system" && window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
90
|
+
setResolvedDark(isDark);
|
|
91
|
+
};
|
|
92
|
+
update();
|
|
93
|
+
const mq = window.matchMedia("(prefers-color-scheme: dark)");
|
|
94
|
+
mq.addEventListener("change", update);
|
|
95
|
+
return () => mq.removeEventListener("change", update);
|
|
96
|
+
}, [darkMode]);
|
|
97
|
+
React14.useEffect(() => {
|
|
98
|
+
const root = document.documentElement;
|
|
99
|
+
root.classList.remove("theme-linear", "theme-glass", "theme-midnight", "theme-minimal");
|
|
100
|
+
root.classList.remove("dark", "light");
|
|
101
|
+
root.classList.add(`theme-${theme}`);
|
|
102
|
+
root.classList.add(resolvedDark ? "dark" : "light");
|
|
103
|
+
}, [theme, resolvedDark]);
|
|
104
|
+
return /* @__PURE__ */ jsxRuntime.jsx(BlinkUIContext.Provider, { value: { theme, darkMode, resolvedDark, setTheme, setDarkMode }, children });
|
|
105
|
+
}
|
|
106
|
+
function cn(...inputs) {
|
|
107
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
108
|
+
}
|
|
109
|
+
var buttonVariants = classVarianceAuthority.cva(
|
|
110
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[var(--radius)] text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--ring))] focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
111
|
+
{
|
|
112
|
+
variants: {
|
|
113
|
+
variant: {
|
|
114
|
+
default: "bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))] hover:bg-[hsl(var(--primary)/0.9)]",
|
|
115
|
+
secondary: "bg-[hsl(var(--secondary))] text-[hsl(var(--secondary-foreground))] hover:bg-[hsl(var(--secondary)/0.8)]",
|
|
116
|
+
outline: "border border-[hsl(var(--border))] bg-transparent hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--accent-foreground))]",
|
|
117
|
+
ghost: "hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--accent-foreground))]",
|
|
118
|
+
destructive: "bg-[hsl(var(--destructive))] text-[hsl(var(--destructive-foreground))] hover:bg-[hsl(var(--destructive)/0.9)]",
|
|
119
|
+
link: "text-[hsl(var(--primary))] underline-offset-4 hover:underline"
|
|
120
|
+
},
|
|
121
|
+
size: {
|
|
122
|
+
sm: "h-8 px-3 text-xs",
|
|
123
|
+
default: "h-9 px-4 py-2",
|
|
124
|
+
lg: "h-11 px-6 text-base",
|
|
125
|
+
icon: "h-9 w-9"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
defaultVariants: { variant: "default", size: "default" }
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
var Button = React14__default.default.forwardRef(
|
|
132
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
133
|
+
const Comp = asChild ? reactSlot.Slot : "button";
|
|
134
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Comp, { className: cn(buttonVariants({ variant, size }), className), ref, ...props });
|
|
135
|
+
}
|
|
136
|
+
);
|
|
137
|
+
Button.displayName = "Button";
|
|
138
|
+
var Input = React14__default.default.forwardRef(
|
|
139
|
+
({ className, type, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
140
|
+
"input",
|
|
141
|
+
{
|
|
142
|
+
type,
|
|
143
|
+
className: cn(
|
|
144
|
+
"flex h-9 w-full rounded-[var(--radius)] border border-[hsl(var(--input))] bg-transparent px-3 py-1 text-sm shadow-sm transition-colors",
|
|
145
|
+
"placeholder:text-[hsl(var(--muted-foreground))]",
|
|
146
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--ring))]",
|
|
147
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
148
|
+
"file:border-0 file:bg-transparent file:text-sm file:font-medium",
|
|
149
|
+
className
|
|
150
|
+
),
|
|
151
|
+
ref,
|
|
152
|
+
...props
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
);
|
|
156
|
+
Input.displayName = "Input";
|
|
157
|
+
var Textarea = React14__default.default.forwardRef(
|
|
158
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
159
|
+
"textarea",
|
|
160
|
+
{
|
|
161
|
+
className: cn(
|
|
162
|
+
"flex min-h-[80px] w-full rounded-[var(--radius)] border border-[hsl(var(--input))] bg-transparent px-3 py-2 text-sm shadow-sm",
|
|
163
|
+
"placeholder:text-[hsl(var(--muted-foreground))]",
|
|
164
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--ring))]",
|
|
165
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
166
|
+
"resize-none",
|
|
167
|
+
className
|
|
168
|
+
),
|
|
169
|
+
ref,
|
|
170
|
+
...props
|
|
171
|
+
}
|
|
172
|
+
)
|
|
173
|
+
);
|
|
174
|
+
Textarea.displayName = "Textarea";
|
|
175
|
+
var Select = SelectPrimitive__namespace.Root;
|
|
176
|
+
var SelectGroup = SelectPrimitive__namespace.Group;
|
|
177
|
+
var SelectValue = SelectPrimitive__namespace.Value;
|
|
178
|
+
var SelectTrigger = React14__default.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
179
|
+
SelectPrimitive__namespace.Trigger,
|
|
180
|
+
{
|
|
181
|
+
ref,
|
|
182
|
+
className: cn(
|
|
183
|
+
"flex h-9 w-full items-center justify-between rounded-[var(--radius)] border border-[hsl(var(--input))] bg-transparent px-3 py-2 text-sm shadow-sm",
|
|
184
|
+
"placeholder:text-[hsl(var(--muted-foreground))]",
|
|
185
|
+
"focus:outline-none focus:ring-2 focus:ring-[hsl(var(--ring))]",
|
|
186
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
187
|
+
"[&>span]:truncate",
|
|
188
|
+
className
|
|
189
|
+
),
|
|
190
|
+
...props,
|
|
191
|
+
children: [
|
|
192
|
+
children,
|
|
193
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4 opacity-50 shrink-0" }) })
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
));
|
|
197
|
+
SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
|
|
198
|
+
var SelectScrollUpButton = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
199
|
+
SelectPrimitive__namespace.ScrollUpButton,
|
|
200
|
+
{
|
|
201
|
+
ref,
|
|
202
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
203
|
+
...props,
|
|
204
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, { className: "h-4 w-4" })
|
|
205
|
+
}
|
|
206
|
+
));
|
|
207
|
+
SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
|
|
208
|
+
var SelectScrollDownButton = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
209
|
+
SelectPrimitive__namespace.ScrollDownButton,
|
|
210
|
+
{
|
|
211
|
+
ref,
|
|
212
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
213
|
+
...props,
|
|
214
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4" })
|
|
215
|
+
}
|
|
216
|
+
));
|
|
217
|
+
SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
|
|
218
|
+
var SelectContent = React14__default.default.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
219
|
+
SelectPrimitive__namespace.Content,
|
|
220
|
+
{
|
|
221
|
+
ref,
|
|
222
|
+
className: cn(
|
|
223
|
+
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-[var(--radius)] border border-[hsl(var(--border))] bg-[hsl(var(--popover))] text-[hsl(var(--popover-foreground))] shadow-md",
|
|
224
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
225
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
226
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",
|
|
227
|
+
className
|
|
228
|
+
),
|
|
229
|
+
position,
|
|
230
|
+
...props,
|
|
231
|
+
children: [
|
|
232
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollUpButton, {}),
|
|
233
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
234
|
+
SelectPrimitive__namespace.Viewport,
|
|
235
|
+
{
|
|
236
|
+
className: cn("p-1", position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),
|
|
237
|
+
children
|
|
238
|
+
}
|
|
239
|
+
),
|
|
240
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollDownButton, {})
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
) }));
|
|
244
|
+
SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
|
|
245
|
+
var SelectLabel = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
246
|
+
SelectPrimitive__namespace.Label,
|
|
247
|
+
{
|
|
248
|
+
ref,
|
|
249
|
+
className: cn("px-2 py-1.5 text-xs font-semibold text-[hsl(var(--muted-foreground))]", className),
|
|
250
|
+
...props
|
|
251
|
+
}
|
|
252
|
+
));
|
|
253
|
+
SelectLabel.displayName = SelectPrimitive__namespace.Label.displayName;
|
|
254
|
+
var SelectItem = React14__default.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
255
|
+
SelectPrimitive__namespace.Item,
|
|
256
|
+
{
|
|
257
|
+
ref,
|
|
258
|
+
className: cn(
|
|
259
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none",
|
|
260
|
+
"focus:bg-[hsl(var(--accent))] focus:text-[hsl(var(--accent-foreground))]",
|
|
261
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
262
|
+
className
|
|
263
|
+
),
|
|
264
|
+
...props,
|
|
265
|
+
children: [
|
|
266
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) }) }),
|
|
267
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemText, { children })
|
|
268
|
+
]
|
|
269
|
+
}
|
|
270
|
+
));
|
|
271
|
+
SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
|
|
272
|
+
var SelectSeparator = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
273
|
+
SelectPrimitive__namespace.Separator,
|
|
274
|
+
{
|
|
275
|
+
ref,
|
|
276
|
+
className: cn("-mx-1 my-1 h-px bg-[hsl(var(--muted))]", className),
|
|
277
|
+
...props
|
|
278
|
+
}
|
|
279
|
+
));
|
|
280
|
+
SelectSeparator.displayName = SelectPrimitive__namespace.Separator.displayName;
|
|
281
|
+
var Checkbox = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
282
|
+
CheckboxPrimitive__namespace.Root,
|
|
283
|
+
{
|
|
284
|
+
ref,
|
|
285
|
+
className: cn(
|
|
286
|
+
"peer h-4 w-4 shrink-0 rounded-sm border border-[hsl(var(--primary))] shadow",
|
|
287
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--ring))]",
|
|
288
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
289
|
+
"data-[state=checked]:bg-[hsl(var(--primary))] data-[state=checked]:text-[hsl(var(--primary-foreground))]",
|
|
290
|
+
className
|
|
291
|
+
),
|
|
292
|
+
...props,
|
|
293
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(CheckboxPrimitive__namespace.Indicator, { className: "flex items-center justify-center text-current", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-3.5 w-3.5" }) })
|
|
294
|
+
}
|
|
295
|
+
));
|
|
296
|
+
Checkbox.displayName = CheckboxPrimitive__namespace.Root.displayName;
|
|
297
|
+
var RadioGroup = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(RadioGroupPrimitive__namespace.Root, { className: cn("grid gap-2", className), ref, ...props }));
|
|
298
|
+
RadioGroup.displayName = RadioGroupPrimitive__namespace.Root.displayName;
|
|
299
|
+
var RadioGroupItem = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
300
|
+
RadioGroupPrimitive__namespace.Item,
|
|
301
|
+
{
|
|
302
|
+
ref,
|
|
303
|
+
className: cn(
|
|
304
|
+
"aspect-square h-4 w-4 rounded-full border border-[hsl(var(--primary))] text-[hsl(var(--primary))] shadow",
|
|
305
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--ring))]",
|
|
306
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
307
|
+
className
|
|
308
|
+
),
|
|
309
|
+
...props,
|
|
310
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(RadioGroupPrimitive__namespace.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-2.5 w-2.5 fill-current" }) })
|
|
311
|
+
}
|
|
312
|
+
));
|
|
313
|
+
RadioGroupItem.displayName = RadioGroupPrimitive__namespace.Item.displayName;
|
|
314
|
+
var Switch = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
315
|
+
SwitchPrimitive__namespace.Root,
|
|
316
|
+
{
|
|
317
|
+
ref,
|
|
318
|
+
className: cn(
|
|
319
|
+
"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors",
|
|
320
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--ring))] focus-visible:ring-offset-2 focus-visible:ring-offset-[hsl(var(--background))]",
|
|
321
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
322
|
+
"data-[state=unchecked]:bg-[hsl(var(--input))]",
|
|
323
|
+
"data-[state=checked]:bg-[hsl(var(--primary))]",
|
|
324
|
+
className
|
|
325
|
+
),
|
|
326
|
+
...props,
|
|
327
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
328
|
+
SwitchPrimitive__namespace.Thumb,
|
|
329
|
+
{
|
|
330
|
+
className: cn(
|
|
331
|
+
"pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform",
|
|
332
|
+
"data-[state=unchecked]:translate-x-0",
|
|
333
|
+
"data-[state=checked]:translate-x-4"
|
|
334
|
+
)
|
|
335
|
+
}
|
|
336
|
+
)
|
|
337
|
+
}
|
|
338
|
+
));
|
|
339
|
+
Switch.displayName = SwitchPrimitive__namespace.Root.displayName;
|
|
340
|
+
var Slider = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
341
|
+
SliderPrimitive__namespace.Root,
|
|
342
|
+
{
|
|
343
|
+
ref,
|
|
344
|
+
className: cn("relative flex w-full touch-none select-none items-center", className),
|
|
345
|
+
...props,
|
|
346
|
+
children: [
|
|
347
|
+
/* @__PURE__ */ jsxRuntime.jsx(SliderPrimitive__namespace.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-[hsl(var(--secondary))]", children: /* @__PURE__ */ jsxRuntime.jsx(SliderPrimitive__namespace.Range, { className: "absolute h-full bg-[hsl(var(--primary))]" }) }),
|
|
348
|
+
/* @__PURE__ */ jsxRuntime.jsx(SliderPrimitive__namespace.Thumb, { className: "block h-4 w-4 rounded-full border border-[hsl(var(--primary)/0.5)] bg-[hsl(var(--background))] shadow transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--ring))] disabled:pointer-events-none disabled:opacity-50" })
|
|
349
|
+
]
|
|
350
|
+
}
|
|
351
|
+
));
|
|
352
|
+
Slider.displayName = SliderPrimitive__namespace.Root.displayName;
|
|
353
|
+
var Dialog = DialogPrimitive__namespace.Root;
|
|
354
|
+
var DialogTrigger = DialogPrimitive__namespace.Trigger;
|
|
355
|
+
var DialogPortal = DialogPrimitive__namespace.Portal;
|
|
356
|
+
var DialogClose = DialogPrimitive__namespace.Close;
|
|
357
|
+
var DialogOverlay = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
358
|
+
DialogPrimitive__namespace.Overlay,
|
|
359
|
+
{
|
|
360
|
+
ref,
|
|
361
|
+
className: cn(
|
|
362
|
+
"fixed inset-0 z-50 bg-black/80",
|
|
363
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0",
|
|
364
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
365
|
+
className
|
|
366
|
+
),
|
|
367
|
+
...props
|
|
368
|
+
}
|
|
369
|
+
));
|
|
370
|
+
DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
|
|
371
|
+
var DialogContent = React14__default.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
|
|
372
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
|
|
373
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
374
|
+
DialogPrimitive__namespace.Content,
|
|
375
|
+
{
|
|
376
|
+
ref,
|
|
377
|
+
className: cn(
|
|
378
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4",
|
|
379
|
+
"bg-[hsl(var(--background))] p-6 shadow-lg duration-200 rounded-[var(--radius)]",
|
|
380
|
+
"border border-[hsl(var(--border))]",
|
|
381
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",
|
|
382
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]",
|
|
383
|
+
className
|
|
384
|
+
),
|
|
385
|
+
...props,
|
|
386
|
+
children: [
|
|
387
|
+
children,
|
|
388
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-[hsl(var(--background))] transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-[hsl(var(--ring))] focus:ring-offset-2 disabled:pointer-events-none", children: [
|
|
389
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
|
|
390
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
391
|
+
] })
|
|
392
|
+
]
|
|
393
|
+
}
|
|
394
|
+
)
|
|
395
|
+
] }));
|
|
396
|
+
DialogContent.displayName = DialogPrimitive__namespace.Content.displayName;
|
|
397
|
+
var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
|
|
398
|
+
DialogHeader.displayName = "DialogHeader";
|
|
399
|
+
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
|
|
400
|
+
DialogFooter.displayName = "DialogFooter";
|
|
401
|
+
var DialogTitle = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
402
|
+
DialogPrimitive__namespace.Title,
|
|
403
|
+
{
|
|
404
|
+
ref,
|
|
405
|
+
className: cn("text-lg font-semibold leading-none tracking-tight", className),
|
|
406
|
+
...props
|
|
407
|
+
}
|
|
408
|
+
));
|
|
409
|
+
DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
410
|
+
var DialogDescription = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
411
|
+
DialogPrimitive__namespace.Description,
|
|
412
|
+
{
|
|
413
|
+
ref,
|
|
414
|
+
className: cn("text-sm text-[hsl(var(--muted-foreground))]", className),
|
|
415
|
+
...props
|
|
416
|
+
}
|
|
417
|
+
));
|
|
418
|
+
DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
|
|
419
|
+
var Sheet = DialogPrimitive__namespace.Root;
|
|
420
|
+
var SheetTrigger = DialogPrimitive__namespace.Trigger;
|
|
421
|
+
var SheetClose = DialogPrimitive__namespace.Close;
|
|
422
|
+
var SheetPortal = DialogPrimitive__namespace.Portal;
|
|
423
|
+
var SheetOverlay = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
424
|
+
DialogPrimitive__namespace.Overlay,
|
|
425
|
+
{
|
|
426
|
+
ref,
|
|
427
|
+
className: cn(
|
|
428
|
+
"fixed inset-0 z-50 bg-black/80",
|
|
429
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0",
|
|
430
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
431
|
+
className
|
|
432
|
+
),
|
|
433
|
+
...props
|
|
434
|
+
}
|
|
435
|
+
));
|
|
436
|
+
SheetOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
|
|
437
|
+
var sheetVariants = classVarianceAuthority.cva(
|
|
438
|
+
"fixed z-50 gap-4 bg-[hsl(var(--background))] p-6 shadow-lg transition ease-in-out border-[hsl(var(--border))]",
|
|
439
|
+
{
|
|
440
|
+
variants: {
|
|
441
|
+
side: {
|
|
442
|
+
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
443
|
+
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
444
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
445
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
defaultVariants: { side: "right" }
|
|
449
|
+
}
|
|
450
|
+
);
|
|
451
|
+
var SheetContent = React14__default.default.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(SheetPortal, { children: [
|
|
452
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetOverlay, {}),
|
|
453
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Content, { ref, className: cn(sheetVariants({ side }), className), ...props, children: [
|
|
454
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-[hsl(var(--ring))]", children: [
|
|
455
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
|
|
456
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
457
|
+
] }),
|
|
458
|
+
children
|
|
459
|
+
] })
|
|
460
|
+
] }));
|
|
461
|
+
SheetContent.displayName = DialogPrimitive__namespace.Content.displayName;
|
|
462
|
+
var SheetHeader = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
|
|
463
|
+
var SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
|
|
464
|
+
var SheetTitle = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Title, { ref, className: cn("text-lg font-semibold", className), ...props }));
|
|
465
|
+
SheetTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
466
|
+
var SheetDescription = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Description, { ref, className: cn("text-sm text-[hsl(var(--muted-foreground))]", className), ...props }));
|
|
467
|
+
SheetDescription.displayName = DialogPrimitive__namespace.Description.displayName;
|
|
468
|
+
var Popover = PopoverPrimitive__namespace.Root;
|
|
469
|
+
var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
|
|
470
|
+
var PopoverAnchor = PopoverPrimitive__namespace.Anchor;
|
|
471
|
+
var PopoverContent = React14__default.default.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
472
|
+
PopoverPrimitive__namespace.Content,
|
|
473
|
+
{
|
|
474
|
+
ref,
|
|
475
|
+
align,
|
|
476
|
+
sideOffset,
|
|
477
|
+
className: cn(
|
|
478
|
+
"z-50 w-72 rounded-[var(--radius)] border border-[hsl(var(--border))] bg-[hsl(var(--popover))] p-4 text-[hsl(var(--popover-foreground))] shadow-md outline-none",
|
|
479
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
480
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
481
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",
|
|
482
|
+
className
|
|
483
|
+
),
|
|
484
|
+
...props
|
|
485
|
+
}
|
|
486
|
+
) }));
|
|
487
|
+
PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
|
|
488
|
+
var TooltipProvider = TooltipPrimitive__namespace.Provider;
|
|
489
|
+
var Tooltip = TooltipPrimitive__namespace.Root;
|
|
490
|
+
var TooltipTrigger = TooltipPrimitive__namespace.Trigger;
|
|
491
|
+
var TooltipContent = React14__default.default.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
492
|
+
TooltipPrimitive__namespace.Content,
|
|
493
|
+
{
|
|
494
|
+
ref,
|
|
495
|
+
sideOffset,
|
|
496
|
+
className: cn(
|
|
497
|
+
"z-50 overflow-hidden rounded-[var(--radius)] bg-[hsl(var(--primary))] px-3 py-1.5 text-xs text-[hsl(var(--primary-foreground))] shadow-md",
|
|
498
|
+
"animate-in fade-in-0 zoom-in-95",
|
|
499
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
500
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",
|
|
501
|
+
className
|
|
502
|
+
),
|
|
503
|
+
...props
|
|
504
|
+
}
|
|
505
|
+
) }));
|
|
506
|
+
TooltipContent.displayName = TooltipPrimitive__namespace.Content.displayName;
|
|
507
|
+
var DropdownMenu = DropdownMenuPrimitive__namespace.Root;
|
|
508
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive__namespace.Trigger;
|
|
509
|
+
var DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
|
|
510
|
+
var DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
|
|
511
|
+
var DropdownMenuSub = DropdownMenuPrimitive__namespace.Sub;
|
|
512
|
+
var DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
|
|
513
|
+
var contentStyle = cn(
|
|
514
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-[var(--radius)] border border-[hsl(var(--border))] bg-[hsl(var(--popover))] p-1 text-[hsl(var(--popover-foreground))] shadow-md",
|
|
515
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
516
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95"
|
|
517
|
+
);
|
|
518
|
+
var itemStyle = cn(
|
|
519
|
+
"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors",
|
|
520
|
+
"focus:bg-[hsl(var(--accent))] focus:text-[hsl(var(--accent-foreground))]",
|
|
521
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
|
|
522
|
+
);
|
|
523
|
+
var DropdownMenuContent = React14__default.default.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Content, { ref, sideOffset, className: cn(contentStyle, className), ...props }) }));
|
|
524
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
|
|
525
|
+
var DropdownMenuItem = React14__default.default.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Item, { ref, className: cn(itemStyle, inset && "pl-8", className), ...props }));
|
|
526
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
|
|
527
|
+
var DropdownMenuCheckboxItem = React14__default.default.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuPrimitive__namespace.CheckboxItem, { ref, className: cn(itemStyle, "pl-8", className), checked, ...props, children: [
|
|
528
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) }) }),
|
|
529
|
+
children
|
|
530
|
+
] }));
|
|
531
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
|
|
532
|
+
var DropdownMenuRadioItem = React14__default.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuPrimitive__namespace.RadioItem, { ref, className: cn(itemStyle, "pl-8", className), ...props, children: [
|
|
533
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-2 w-2 fill-current" }) }) }),
|
|
534
|
+
children
|
|
535
|
+
] }));
|
|
536
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
|
|
537
|
+
var DropdownMenuLabel = React14__default.default.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Label, { ref, className: cn("px-2 py-1.5 text-xs font-semibold text-[hsl(var(--muted-foreground))]", inset && "pl-8", className), ...props }));
|
|
538
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
|
|
539
|
+
var DropdownMenuSeparator = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-[hsl(var(--muted))]", className), ...props }));
|
|
540
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive__namespace.Separator.displayName;
|
|
541
|
+
var DropdownMenuSubTrigger = React14__default.default.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuPrimitive__namespace.SubTrigger, { ref, className: cn(itemStyle, inset && "pl-8", "data-[state=open]:bg-[hsl(var(--accent))]", className), ...props, children: [
|
|
542
|
+
children,
|
|
543
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "ml-auto h-4 w-4" })
|
|
544
|
+
] }));
|
|
545
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
|
|
546
|
+
var DropdownMenuSubContent = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.SubContent, { ref, className: cn(contentStyle, className), ...props }));
|
|
547
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
|
|
548
|
+
var DropdownMenuShortcut = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props });
|
|
549
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
550
|
+
var ContextMenu = ContextMenuPrimitive__namespace.Root;
|
|
551
|
+
var ContextMenuTrigger = ContextMenuPrimitive__namespace.Trigger;
|
|
552
|
+
var ContextMenuGroup = ContextMenuPrimitive__namespace.Group;
|
|
553
|
+
var ContextMenuPortal = ContextMenuPrimitive__namespace.Portal;
|
|
554
|
+
var ContextMenuSub = ContextMenuPrimitive__namespace.Sub;
|
|
555
|
+
var ContextMenuRadioGroup = ContextMenuPrimitive__namespace.RadioGroup;
|
|
556
|
+
var contentStyle2 = "z-50 min-w-[8rem] overflow-hidden rounded-[var(--radius)] border border-[hsl(var(--border))] bg-[hsl(var(--popover))] p-1 text-[hsl(var(--popover-foreground))] shadow-md animate-in fade-in-80";
|
|
557
|
+
var itemStyle2 = "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-[hsl(var(--accent))] focus:text-[hsl(var(--accent-foreground))] data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
558
|
+
var ContextMenuContent = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Content, { ref, className: cn(contentStyle2, className), ...props }) }));
|
|
559
|
+
ContextMenuContent.displayName = ContextMenuPrimitive__namespace.Content.displayName;
|
|
560
|
+
var ContextMenuItem = React14__default.default.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Item, { ref, className: cn(itemStyle2, inset && "pl-8", className), ...props }));
|
|
561
|
+
ContextMenuItem.displayName = ContextMenuPrimitive__namespace.Item.displayName;
|
|
562
|
+
var ContextMenuCheckboxItem = React14__default.default.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(ContextMenuPrimitive__namespace.CheckboxItem, { ref, className: cn(itemStyle2, "pl-8", className), checked, ...props, children: [
|
|
563
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) }) }),
|
|
564
|
+
children
|
|
565
|
+
] }));
|
|
566
|
+
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive__namespace.CheckboxItem.displayName;
|
|
567
|
+
var ContextMenuRadioItem = React14__default.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(ContextMenuPrimitive__namespace.RadioItem, { ref, className: cn(itemStyle2, "pl-8", className), ...props, children: [
|
|
568
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-2 w-2 fill-current" }) }) }),
|
|
569
|
+
children
|
|
570
|
+
] }));
|
|
571
|
+
ContextMenuRadioItem.displayName = ContextMenuPrimitive__namespace.RadioItem.displayName;
|
|
572
|
+
var ContextMenuLabel = React14__default.default.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Label, { ref, className: cn("px-2 py-1.5 text-xs font-semibold text-[hsl(var(--muted-foreground))]", inset && "pl-8", className), ...props }));
|
|
573
|
+
ContextMenuLabel.displayName = ContextMenuPrimitive__namespace.Label.displayName;
|
|
574
|
+
var ContextMenuSeparator = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-[hsl(var(--muted))]", className), ...props }));
|
|
575
|
+
ContextMenuSeparator.displayName = ContextMenuPrimitive__namespace.Separator.displayName;
|
|
576
|
+
var ContextMenuSubTrigger = React14__default.default.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(ContextMenuPrimitive__namespace.SubTrigger, { ref, className: cn(itemStyle2, inset && "pl-8", className), ...props, children: [
|
|
577
|
+
children,
|
|
578
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "ml-auto h-4 w-4" })
|
|
579
|
+
] }));
|
|
580
|
+
ContextMenuSubTrigger.displayName = ContextMenuPrimitive__namespace.SubTrigger.displayName;
|
|
581
|
+
var ContextMenuSubContent = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.SubContent, { ref, className: cn(contentStyle2, className), ...props }));
|
|
582
|
+
ContextMenuSubContent.displayName = ContextMenuPrimitive__namespace.SubContent.displayName;
|
|
583
|
+
var ContextMenuShortcut = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props });
|
|
584
|
+
var Card = React14__default.default.forwardRef(
|
|
585
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
586
|
+
"div",
|
|
587
|
+
{
|
|
588
|
+
ref,
|
|
589
|
+
className: cn("rounded-[var(--radius)] border border-[hsl(var(--border))] bg-[hsl(var(--card))] text-[hsl(var(--card-foreground))] shadow-sm", className),
|
|
590
|
+
...props
|
|
591
|
+
}
|
|
592
|
+
)
|
|
593
|
+
);
|
|
594
|
+
Card.displayName = "Card";
|
|
595
|
+
var CardHeader = React14__default.default.forwardRef(
|
|
596
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
|
|
597
|
+
);
|
|
598
|
+
CardHeader.displayName = "CardHeader";
|
|
599
|
+
var CardTitle = React14__default.default.forwardRef(
|
|
600
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("font-semibold leading-none tracking-tight", className), ...props })
|
|
601
|
+
);
|
|
602
|
+
CardTitle.displayName = "CardTitle";
|
|
603
|
+
var CardDescription = React14__default.default.forwardRef(
|
|
604
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("text-sm text-[hsl(var(--muted-foreground))]", className), ...props })
|
|
605
|
+
);
|
|
606
|
+
CardDescription.displayName = "CardDescription";
|
|
607
|
+
var CardContent = React14__default.default.forwardRef(
|
|
608
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("p-6 pt-0", className), ...props })
|
|
609
|
+
);
|
|
610
|
+
CardContent.displayName = "CardContent";
|
|
611
|
+
var CardFooter = React14__default.default.forwardRef(
|
|
612
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
|
|
613
|
+
);
|
|
614
|
+
CardFooter.displayName = "CardFooter";
|
|
615
|
+
var badgeVariants = classVarianceAuthority.cva(
|
|
616
|
+
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-[hsl(var(--ring))] focus:ring-offset-2",
|
|
617
|
+
{
|
|
618
|
+
variants: {
|
|
619
|
+
variant: {
|
|
620
|
+
default: "border-transparent bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))] hover:bg-[hsl(var(--primary)/0.8)]",
|
|
621
|
+
secondary: "border-transparent bg-[hsl(var(--secondary))] text-[hsl(var(--secondary-foreground))] hover:bg-[hsl(var(--secondary)/0.8)]",
|
|
622
|
+
destructive: "border-transparent bg-[hsl(var(--destructive))] text-[hsl(var(--destructive-foreground))] hover:bg-[hsl(var(--destructive)/0.8)]",
|
|
623
|
+
outline: "text-[hsl(var(--foreground))]"
|
|
624
|
+
}
|
|
625
|
+
},
|
|
626
|
+
defaultVariants: { variant: "default" }
|
|
627
|
+
}
|
|
628
|
+
);
|
|
629
|
+
function Badge({ className, variant, ...props }) {
|
|
630
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
631
|
+
}
|
|
632
|
+
var Avatar = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
633
|
+
AvatarPrimitive__namespace.Root,
|
|
634
|
+
{
|
|
635
|
+
ref,
|
|
636
|
+
className: cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className),
|
|
637
|
+
...props
|
|
638
|
+
}
|
|
639
|
+
));
|
|
640
|
+
Avatar.displayName = AvatarPrimitive__namespace.Root.displayName;
|
|
641
|
+
var AvatarImage = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AvatarPrimitive__namespace.Image, { ref, className: cn("aspect-square h-full w-full object-cover", className), ...props }));
|
|
642
|
+
AvatarImage.displayName = AvatarPrimitive__namespace.Image.displayName;
|
|
643
|
+
var AvatarFallback = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
644
|
+
AvatarPrimitive__namespace.Fallback,
|
|
645
|
+
{
|
|
646
|
+
ref,
|
|
647
|
+
className: cn("flex h-full w-full items-center justify-center rounded-full bg-[hsl(var(--muted))] text-sm font-medium text-[hsl(var(--muted-foreground))]", className),
|
|
648
|
+
...props
|
|
649
|
+
}
|
|
650
|
+
));
|
|
651
|
+
AvatarFallback.displayName = AvatarPrimitive__namespace.Fallback.displayName;
|
|
652
|
+
var Separator4 = React14__default.default.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
653
|
+
SeparatorPrimitive__namespace.Root,
|
|
654
|
+
{
|
|
655
|
+
ref,
|
|
656
|
+
decorative,
|
|
657
|
+
orientation,
|
|
658
|
+
className: cn(
|
|
659
|
+
"shrink-0 bg-[hsl(var(--border))]",
|
|
660
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
661
|
+
className
|
|
662
|
+
),
|
|
663
|
+
...props
|
|
664
|
+
}
|
|
665
|
+
));
|
|
666
|
+
Separator4.displayName = SeparatorPrimitive__namespace.Root.displayName;
|
|
667
|
+
function Skeleton({ className, ...props }) {
|
|
668
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
669
|
+
"div",
|
|
670
|
+
{
|
|
671
|
+
className: cn("animate-pulse rounded-[var(--radius)] bg-[hsl(var(--muted))]", className),
|
|
672
|
+
...props
|
|
673
|
+
}
|
|
674
|
+
);
|
|
675
|
+
}
|
|
676
|
+
var Progress = React14__default.default.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
677
|
+
ProgressPrimitive__namespace.Root,
|
|
678
|
+
{
|
|
679
|
+
ref,
|
|
680
|
+
className: cn("relative h-2 w-full overflow-hidden rounded-full bg-[hsl(var(--secondary))]", className),
|
|
681
|
+
...props,
|
|
682
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
683
|
+
ProgressPrimitive__namespace.Indicator,
|
|
684
|
+
{
|
|
685
|
+
className: "h-full w-full flex-1 bg-[hsl(var(--primary))] transition-all",
|
|
686
|
+
style: { transform: `translateX(-${100 - (value ?? 0)}%)` }
|
|
687
|
+
}
|
|
688
|
+
)
|
|
689
|
+
}
|
|
690
|
+
));
|
|
691
|
+
Progress.displayName = ProgressPrimitive__namespace.Root.displayName;
|
|
692
|
+
var Tabs = TabsPrimitive__namespace.Root;
|
|
693
|
+
var TabsList = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
694
|
+
TabsPrimitive__namespace.List,
|
|
695
|
+
{
|
|
696
|
+
ref,
|
|
697
|
+
className: cn(
|
|
698
|
+
"inline-flex h-9 items-center justify-center rounded-lg bg-[hsl(var(--muted))] p-1 text-[hsl(var(--muted-foreground))]",
|
|
699
|
+
className
|
|
700
|
+
),
|
|
701
|
+
...props
|
|
702
|
+
}
|
|
703
|
+
));
|
|
704
|
+
TabsList.displayName = TabsPrimitive__namespace.List.displayName;
|
|
705
|
+
var TabsTrigger = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
706
|
+
TabsPrimitive__namespace.Trigger,
|
|
707
|
+
{
|
|
708
|
+
ref,
|
|
709
|
+
className: cn(
|
|
710
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-[hsl(var(--background))] transition-all",
|
|
711
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--ring))] focus-visible:ring-offset-2",
|
|
712
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
713
|
+
"data-[state=active]:bg-[hsl(var(--background))] data-[state=active]:text-[hsl(var(--foreground))] data-[state=active]:shadow",
|
|
714
|
+
className
|
|
715
|
+
),
|
|
716
|
+
...props
|
|
717
|
+
}
|
|
718
|
+
));
|
|
719
|
+
TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
|
|
720
|
+
var TabsContent = React14__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
721
|
+
TabsPrimitive__namespace.Content,
|
|
722
|
+
{
|
|
723
|
+
ref,
|
|
724
|
+
className: cn(
|
|
725
|
+
"mt-2 ring-offset-[hsl(var(--background))] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--ring))] focus-visible:ring-offset-2",
|
|
726
|
+
className
|
|
727
|
+
),
|
|
728
|
+
...props
|
|
729
|
+
}
|
|
730
|
+
));
|
|
731
|
+
TabsContent.displayName = TabsPrimitive__namespace.Content.displayName;
|
|
732
|
+
var dirMap = {
|
|
733
|
+
row: "flex-row",
|
|
734
|
+
col: "flex-col",
|
|
735
|
+
"row-reverse": "flex-row-reverse",
|
|
736
|
+
"col-reverse": "flex-col-reverse"
|
|
737
|
+
};
|
|
738
|
+
var alignMap = {
|
|
739
|
+
start: "items-start",
|
|
740
|
+
center: "items-center",
|
|
741
|
+
end: "items-end",
|
|
742
|
+
stretch: "items-stretch",
|
|
743
|
+
baseline: "items-baseline"
|
|
744
|
+
};
|
|
745
|
+
var justifyMap = {
|
|
746
|
+
start: "justify-start",
|
|
747
|
+
center: "justify-center",
|
|
748
|
+
end: "justify-end",
|
|
749
|
+
between: "justify-between",
|
|
750
|
+
around: "justify-around",
|
|
751
|
+
evenly: "justify-evenly"
|
|
752
|
+
};
|
|
753
|
+
var Stack = React14__default.default.forwardRef(
|
|
754
|
+
({ className, gap, direction = "col", align, justify, wrap, style, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
755
|
+
"div",
|
|
756
|
+
{
|
|
757
|
+
ref,
|
|
758
|
+
className: cn(
|
|
759
|
+
"flex",
|
|
760
|
+
dirMap[direction],
|
|
761
|
+
align && alignMap[align],
|
|
762
|
+
justify && justifyMap[justify],
|
|
763
|
+
wrap && "flex-wrap",
|
|
764
|
+
className
|
|
765
|
+
),
|
|
766
|
+
style: { ...gap !== void 0 ? { gap: `${gap * 4}px` } : {}, ...style },
|
|
767
|
+
...props
|
|
768
|
+
}
|
|
769
|
+
)
|
|
770
|
+
);
|
|
771
|
+
Stack.displayName = "Stack";
|
|
772
|
+
var HStack = React14__default.default.forwardRef(
|
|
773
|
+
(props, ref) => /* @__PURE__ */ jsxRuntime.jsx(Stack, { ref, direction: "row", ...props })
|
|
774
|
+
);
|
|
775
|
+
HStack.displayName = "HStack";
|
|
776
|
+
var VStack = React14__default.default.forwardRef(
|
|
777
|
+
(props, ref) => /* @__PURE__ */ jsxRuntime.jsx(Stack, { ref, direction: "col", ...props })
|
|
778
|
+
);
|
|
779
|
+
VStack.displayName = "VStack";
|
|
780
|
+
var sizeMap = {
|
|
781
|
+
sm: "max-w-screen-sm",
|
|
782
|
+
md: "max-w-screen-md",
|
|
783
|
+
lg: "max-w-screen-lg",
|
|
784
|
+
xl: "max-w-screen-xl",
|
|
785
|
+
full: "max-w-full"
|
|
786
|
+
};
|
|
787
|
+
var Container = React14__default.default.forwardRef(
|
|
788
|
+
({ className, size = "lg", noPadding = false, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
789
|
+
"div",
|
|
790
|
+
{
|
|
791
|
+
ref,
|
|
792
|
+
className: cn(
|
|
793
|
+
"mx-auto w-full",
|
|
794
|
+
sizeMap[size],
|
|
795
|
+
!noPadding && "px-4 sm:px-6 lg:px-8",
|
|
796
|
+
className
|
|
797
|
+
),
|
|
798
|
+
...props
|
|
799
|
+
}
|
|
800
|
+
)
|
|
801
|
+
);
|
|
802
|
+
Container.displayName = "Container";
|
|
803
|
+
var Page = React14__default.default.forwardRef(
|
|
804
|
+
({ className, maxWidth, style, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
805
|
+
"div",
|
|
806
|
+
{
|
|
807
|
+
ref,
|
|
808
|
+
className: cn("flex flex-col min-h-full w-full", className),
|
|
809
|
+
style: { maxWidth, ...style },
|
|
810
|
+
...props
|
|
811
|
+
}
|
|
812
|
+
)
|
|
813
|
+
);
|
|
814
|
+
Page.displayName = "Page";
|
|
815
|
+
var PageHeader = React14__default.default.forwardRef(
|
|
816
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
817
|
+
"div",
|
|
818
|
+
{
|
|
819
|
+
ref,
|
|
820
|
+
className: cn("flex items-start justify-between gap-4 px-6 py-4 border-b border-[hsl(var(--border))]", className),
|
|
821
|
+
...props
|
|
822
|
+
}
|
|
823
|
+
)
|
|
824
|
+
);
|
|
825
|
+
PageHeader.displayName = "PageHeader";
|
|
826
|
+
var PageTitle = React14__default.default.forwardRef(
|
|
827
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
828
|
+
"h1",
|
|
829
|
+
{
|
|
830
|
+
ref,
|
|
831
|
+
className: cn("text-2xl font-semibold tracking-tight text-[hsl(var(--foreground))]", className),
|
|
832
|
+
...props
|
|
833
|
+
}
|
|
834
|
+
)
|
|
835
|
+
);
|
|
836
|
+
PageTitle.displayName = "PageTitle";
|
|
837
|
+
var PageDescription = React14__default.default.forwardRef(
|
|
838
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("p", { ref, className: cn("text-sm text-[hsl(var(--muted-foreground))] mt-1", className), ...props })
|
|
839
|
+
);
|
|
840
|
+
PageDescription.displayName = "PageDescription";
|
|
841
|
+
var PageActions = React14__default.default.forwardRef(
|
|
842
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex items-center gap-2 shrink-0", className), ...props })
|
|
843
|
+
);
|
|
844
|
+
PageActions.displayName = "PageActions";
|
|
845
|
+
var PageBody = React14__default.default.forwardRef(
|
|
846
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex-1 p-6", className), ...props })
|
|
847
|
+
);
|
|
848
|
+
PageBody.displayName = "PageBody";
|
|
849
|
+
var SidebarCtx = React14__default.default.createContext({ collapsed: false });
|
|
850
|
+
var useSidebarCtx = () => React14__default.default.useContext(SidebarCtx);
|
|
851
|
+
var makeSlot = (name, cls) => {
|
|
852
|
+
const C = React14__default.default.forwardRef(
|
|
853
|
+
({ className, ...p }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn(cls, className), ...p })
|
|
854
|
+
);
|
|
855
|
+
C.displayName = name;
|
|
856
|
+
return C;
|
|
857
|
+
};
|
|
858
|
+
var Sidebar = React14__default.default.forwardRef(
|
|
859
|
+
({ className, collapsed = false, onCollapse, width = "240px", style, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SidebarCtx.Provider, { value: { collapsed }, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
860
|
+
"div",
|
|
861
|
+
{
|
|
862
|
+
ref,
|
|
863
|
+
className: cn("flex flex-col h-full bg-[hsl(var(--card))] border-r border-[hsl(var(--border))] transition-all duration-200 overflow-hidden", className),
|
|
864
|
+
style: { width: collapsed ? "48px" : width, ...style },
|
|
865
|
+
...props,
|
|
866
|
+
children: [
|
|
867
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto overflow-x-hidden", children }),
|
|
868
|
+
onCollapse && /* @__PURE__ */ jsxRuntime.jsx(
|
|
869
|
+
"button",
|
|
870
|
+
{
|
|
871
|
+
onClick: onCollapse,
|
|
872
|
+
className: "flex items-center justify-center h-10 w-full border-t border-[hsl(var(--border))] hover:bg-[hsl(var(--accent))] text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] transition-colors shrink-0",
|
|
873
|
+
children: collapsed ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "h-4 w-4" })
|
|
874
|
+
}
|
|
875
|
+
)
|
|
876
|
+
]
|
|
877
|
+
}
|
|
878
|
+
) })
|
|
879
|
+
);
|
|
880
|
+
Sidebar.displayName = "Sidebar";
|
|
881
|
+
var SidebarHeader = makeSlot("SidebarHeader", "px-3 py-4 border-b border-[hsl(var(--border))] shrink-0");
|
|
882
|
+
var SidebarContent = makeSlot("SidebarContent", "flex-1 overflow-y-auto py-2");
|
|
883
|
+
var SidebarFooter = makeSlot("SidebarFooter", "px-3 py-3 border-t border-[hsl(var(--border))] shrink-0");
|
|
884
|
+
var SidebarGroup = makeSlot("SidebarGroup", "mb-2");
|
|
885
|
+
var SidebarSeparator = makeSlot("SidebarSeparator", "h-px bg-[hsl(var(--border))] mx-3 my-2");
|
|
886
|
+
var SidebarGroupLabel = React14__default.default.forwardRef(
|
|
887
|
+
({ className, ...props }, ref) => {
|
|
888
|
+
const { collapsed } = useSidebarCtx();
|
|
889
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
890
|
+
"div",
|
|
891
|
+
{
|
|
892
|
+
ref,
|
|
893
|
+
className: cn("px-3 py-1 text-xs font-semibold text-[hsl(var(--muted-foreground))] uppercase tracking-wider", collapsed && "sr-only", className),
|
|
894
|
+
...props
|
|
895
|
+
}
|
|
896
|
+
);
|
|
897
|
+
}
|
|
898
|
+
);
|
|
899
|
+
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
900
|
+
var SidebarItem = React14__default.default.forwardRef(
|
|
901
|
+
({ className, icon, label, active, href, badge, onClick, ...props }, ref) => {
|
|
902
|
+
const { collapsed } = useSidebarCtx();
|
|
903
|
+
const cls = cn(
|
|
904
|
+
"flex items-center gap-2.5 px-3 py-2 rounded-md cursor-pointer transition-colors mx-1 text-sm",
|
|
905
|
+
active ? "bg-[hsl(var(--accent))] text-[hsl(var(--foreground))] font-medium" : "text-[hsl(var(--muted-foreground))] hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--foreground))]",
|
|
906
|
+
collapsed && "justify-center px-0 mx-2",
|
|
907
|
+
className
|
|
908
|
+
);
|
|
909
|
+
const inner = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
910
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 flex items-center justify-center w-4 h-4", children: icon }),
|
|
911
|
+
!collapsed && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 min-w-0 truncate", children: label }),
|
|
912
|
+
!collapsed && badge !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] px-1.5 py-0.5 rounded-full bg-[hsl(var(--primary))] bg-opacity-10 text-[hsl(var(--primary))] shrink-0 font-medium", children: badge })
|
|
913
|
+
] });
|
|
914
|
+
if (href)
|
|
915
|
+
return /* @__PURE__ */ jsxRuntime.jsx("a", { href, className: cls, onClick, children: inner });
|
|
916
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, role: "button", tabIndex: 0, className: cls, onClick, ...props, children: inner });
|
|
917
|
+
}
|
|
918
|
+
);
|
|
919
|
+
SidebarItem.displayName = "SidebarItem";
|
|
920
|
+
var Navbar = React14__default.default.forwardRef(
|
|
921
|
+
({ className, sticky = false, border = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
922
|
+
"nav",
|
|
923
|
+
{
|
|
924
|
+
ref,
|
|
925
|
+
className: cn(
|
|
926
|
+
"z-40 w-full h-14 flex items-center bg-[hsl(var(--background))]",
|
|
927
|
+
sticky && "sticky top-0",
|
|
928
|
+
border && "border-b border-[hsl(var(--border))]",
|
|
929
|
+
className
|
|
930
|
+
),
|
|
931
|
+
...props
|
|
932
|
+
}
|
|
933
|
+
)
|
|
934
|
+
);
|
|
935
|
+
Navbar.displayName = "Navbar";
|
|
936
|
+
var NavbarBrand = React14__default.default.forwardRef(
|
|
937
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex items-center gap-2 px-4 shrink-0", className), ...props })
|
|
938
|
+
);
|
|
939
|
+
NavbarBrand.displayName = "NavbarBrand";
|
|
940
|
+
var alignMap2 = {
|
|
941
|
+
start: "justify-start",
|
|
942
|
+
center: "justify-center flex-1",
|
|
943
|
+
end: "justify-end ml-auto"
|
|
944
|
+
};
|
|
945
|
+
var NavbarContent = React14__default.default.forwardRef(
|
|
946
|
+
({ className, align = "start", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
947
|
+
"div",
|
|
948
|
+
{
|
|
949
|
+
ref,
|
|
950
|
+
className: cn("flex items-center gap-1 px-2", alignMap2[align], className),
|
|
951
|
+
...props
|
|
952
|
+
}
|
|
953
|
+
)
|
|
954
|
+
);
|
|
955
|
+
NavbarContent.displayName = "NavbarContent";
|
|
956
|
+
var NavbarItem = React14__default.default.forwardRef(
|
|
957
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex items-center", className), ...props })
|
|
958
|
+
);
|
|
959
|
+
NavbarItem.displayName = "NavbarItem";
|
|
960
|
+
var AppShellCtx = React14__default.default.createContext({
|
|
961
|
+
collapsed: false,
|
|
962
|
+
setCollapsed: () => {
|
|
963
|
+
}
|
|
964
|
+
});
|
|
965
|
+
var useAppShell = () => React14__default.default.useContext(AppShellCtx);
|
|
966
|
+
var AppShell = React14__default.default.forwardRef(
|
|
967
|
+
({ className, defaultCollapsed = false, children, ...props }, ref) => {
|
|
968
|
+
const [collapsed, setCollapsed] = React14__default.default.useState(defaultCollapsed);
|
|
969
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AppShellCtx.Provider, { value: { collapsed, setCollapsed }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
970
|
+
"div",
|
|
971
|
+
{
|
|
972
|
+
ref,
|
|
973
|
+
className: cn("flex h-screen w-full overflow-hidden bg-[hsl(var(--background))]", className),
|
|
974
|
+
...props,
|
|
975
|
+
children
|
|
976
|
+
}
|
|
977
|
+
) });
|
|
978
|
+
}
|
|
979
|
+
);
|
|
980
|
+
AppShell.displayName = "AppShell";
|
|
981
|
+
var AppShellSidebar = React14__default.default.forwardRef(
|
|
982
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("shrink-0 h-full", className), ...props })
|
|
983
|
+
);
|
|
984
|
+
AppShellSidebar.displayName = "AppShellSidebar";
|
|
985
|
+
var AppShellMain = React14__default.default.forwardRef(
|
|
986
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex-1 min-w-0 flex flex-col overflow-auto", className), ...props })
|
|
987
|
+
);
|
|
988
|
+
AppShellMain.displayName = "AppShellMain";
|
|
989
|
+
var SplitPage = React14__default.default.forwardRef(
|
|
990
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex h-full w-full overflow-hidden", className), ...props })
|
|
991
|
+
);
|
|
992
|
+
SplitPage.displayName = "SplitPage";
|
|
993
|
+
var SplitPageList = React14__default.default.forwardRef(
|
|
994
|
+
({ className, width = "320px", style, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
995
|
+
"div",
|
|
996
|
+
{
|
|
997
|
+
ref,
|
|
998
|
+
className: cn("shrink-0 h-full overflow-auto border-r border-[hsl(var(--border))]", className),
|
|
999
|
+
style: { width, ...style },
|
|
1000
|
+
...props
|
|
1001
|
+
}
|
|
1002
|
+
)
|
|
1003
|
+
);
|
|
1004
|
+
SplitPageList.displayName = "SplitPageList";
|
|
1005
|
+
var SplitPageDetail = React14__default.default.forwardRef(
|
|
1006
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex-1 min-w-0 h-full overflow-auto", className), ...props })
|
|
1007
|
+
);
|
|
1008
|
+
SplitPageDetail.displayName = "SplitPageDetail";
|
|
1009
|
+
var ResizeBox = React14__default.default.forwardRef(
|
|
1010
|
+
({ className, resize = "both", minWidth = 100, minHeight = 100, style, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1011
|
+
"div",
|
|
1012
|
+
{
|
|
1013
|
+
ref,
|
|
1014
|
+
className: cn("overflow-auto relative", className),
|
|
1015
|
+
style: { resize, minWidth, minHeight, ...style },
|
|
1016
|
+
...props
|
|
1017
|
+
}
|
|
1018
|
+
)
|
|
1019
|
+
);
|
|
1020
|
+
ResizeBox.displayName = "ResizeBox";
|
|
1021
|
+
var HandleIcon = () => /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", "aria-hidden": true, children: [
|
|
1022
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 2L2 8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
|
|
1023
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 5L5 8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
|
|
1024
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 8L8 8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
1025
|
+
] });
|
|
1026
|
+
var ResizeHandle = React14__default.default.forwardRef(
|
|
1027
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1028
|
+
"div",
|
|
1029
|
+
{
|
|
1030
|
+
ref,
|
|
1031
|
+
className: cn(
|
|
1032
|
+
"absolute bottom-0 right-0 w-5 h-5 flex items-center justify-center",
|
|
1033
|
+
"cursor-se-resize text-[hsl(var(--muted-foreground))] opacity-50 hover:opacity-100 transition-opacity",
|
|
1034
|
+
className
|
|
1035
|
+
),
|
|
1036
|
+
...props,
|
|
1037
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(HandleIcon, {})
|
|
1038
|
+
}
|
|
1039
|
+
)
|
|
1040
|
+
);
|
|
1041
|
+
ResizeHandle.displayName = "ResizeHandle";
|
|
1042
|
+
function Field({ label, description, error, required, children, className }) {
|
|
1043
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-1.5", className), children: [
|
|
1044
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(FieldLabel, { required, children: label }),
|
|
1045
|
+
children,
|
|
1046
|
+
description && !error && /* @__PURE__ */ jsxRuntime.jsx(FieldDescription, { children: description }),
|
|
1047
|
+
error && /* @__PURE__ */ jsxRuntime.jsx(FieldError, { children: error })
|
|
1048
|
+
] });
|
|
1049
|
+
}
|
|
1050
|
+
var FieldLabel = React14__default.default.forwardRef(
|
|
1051
|
+
({ className, required, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1052
|
+
"label",
|
|
1053
|
+
{
|
|
1054
|
+
ref,
|
|
1055
|
+
className: cn("text-sm font-medium leading-none text-[hsl(var(--foreground))]", className),
|
|
1056
|
+
...props,
|
|
1057
|
+
children: [
|
|
1058
|
+
children,
|
|
1059
|
+
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-[hsl(var(--destructive))]", children: "*" })
|
|
1060
|
+
]
|
|
1061
|
+
}
|
|
1062
|
+
)
|
|
1063
|
+
);
|
|
1064
|
+
FieldLabel.displayName = "FieldLabel";
|
|
1065
|
+
var FieldDescription = React14__default.default.forwardRef(
|
|
1066
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1067
|
+
"p",
|
|
1068
|
+
{
|
|
1069
|
+
ref,
|
|
1070
|
+
className: cn("text-xs text-[hsl(var(--muted-foreground))]", className),
|
|
1071
|
+
...props
|
|
1072
|
+
}
|
|
1073
|
+
)
|
|
1074
|
+
);
|
|
1075
|
+
FieldDescription.displayName = "FieldDescription";
|
|
1076
|
+
var FieldError = React14__default.default.forwardRef(
|
|
1077
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1078
|
+
"p",
|
|
1079
|
+
{
|
|
1080
|
+
ref,
|
|
1081
|
+
className: cn("text-xs text-[hsl(var(--destructive))]", className),
|
|
1082
|
+
...props
|
|
1083
|
+
}
|
|
1084
|
+
)
|
|
1085
|
+
);
|
|
1086
|
+
FieldError.displayName = "FieldError";
|
|
1087
|
+
function getStrength(value) {
|
|
1088
|
+
const has = (re) => re.test(value);
|
|
1089
|
+
const score = [value.length >= 8, has(/[A-Z]/), has(/[0-9]/), has(/[^A-Za-z0-9]/)].filter(Boolean).length;
|
|
1090
|
+
if (score <= 1)
|
|
1091
|
+
return { level: "weak", width: "w-1/3", color: "bg-[hsl(var(--destructive))]" };
|
|
1092
|
+
if (score <= 3)
|
|
1093
|
+
return { level: "medium", width: "w-2/3", color: "bg-yellow-500" };
|
|
1094
|
+
return { level: "strong", width: "w-full", color: "bg-green-500" };
|
|
1095
|
+
}
|
|
1096
|
+
var PasswordInput = React14__default.default.forwardRef(
|
|
1097
|
+
({ className, strength, ...props }, ref) => {
|
|
1098
|
+
const [show, setShow] = React14.useState(false);
|
|
1099
|
+
const value = String(props.value ?? "");
|
|
1100
|
+
const str = getStrength(value);
|
|
1101
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
1102
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
1103
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1104
|
+
Input,
|
|
1105
|
+
{
|
|
1106
|
+
ref,
|
|
1107
|
+
type: show ? "text" : "password",
|
|
1108
|
+
className: cn("pr-9", className),
|
|
1109
|
+
...props
|
|
1110
|
+
}
|
|
1111
|
+
),
|
|
1112
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1113
|
+
"button",
|
|
1114
|
+
{
|
|
1115
|
+
type: "button",
|
|
1116
|
+
onClick: () => setShow((s) => !s),
|
|
1117
|
+
className: "absolute right-2.5 top-1/2 -translate-y-1/2 text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] transition-colors",
|
|
1118
|
+
tabIndex: -1,
|
|
1119
|
+
children: show ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.EyeOff, { className: "h-4 w-4" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { className: "h-4 w-4" })
|
|
1120
|
+
}
|
|
1121
|
+
)
|
|
1122
|
+
] }),
|
|
1123
|
+
strength && value.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
1124
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-1 w-full rounded-full bg-[hsl(var(--muted))]", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("h-full rounded-full transition-all", str.width, str.color) }) }),
|
|
1125
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-[hsl(var(--muted-foreground))] capitalize", children: str.level })
|
|
1126
|
+
] })
|
|
1127
|
+
] });
|
|
1128
|
+
}
|
|
1129
|
+
);
|
|
1130
|
+
PasswordInput.displayName = "PasswordInput";
|
|
1131
|
+
var SearchInput = React14__default.default.forwardRef(
|
|
1132
|
+
({ className, shortcut, onClear, onChange, value: valueProp, defaultValue, ...props }, ref) => {
|
|
1133
|
+
const [internalValue, setInternalValue] = React14.useState(defaultValue ?? "");
|
|
1134
|
+
const isControlled = valueProp !== void 0;
|
|
1135
|
+
const value = isControlled ? String(valueProp) : String(internalValue);
|
|
1136
|
+
function handleChange(e) {
|
|
1137
|
+
if (!isControlled)
|
|
1138
|
+
setInternalValue(e.target.value);
|
|
1139
|
+
onChange?.(e.target.value);
|
|
1140
|
+
}
|
|
1141
|
+
function handleClear() {
|
|
1142
|
+
if (!isControlled)
|
|
1143
|
+
setInternalValue("");
|
|
1144
|
+
onChange?.("");
|
|
1145
|
+
onClear?.();
|
|
1146
|
+
}
|
|
1147
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center", children: [
|
|
1148
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "pointer-events-none absolute left-2.5 h-4 w-4 text-[hsl(var(--muted-foreground))]" }),
|
|
1149
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1150
|
+
"input",
|
|
1151
|
+
{
|
|
1152
|
+
ref,
|
|
1153
|
+
value,
|
|
1154
|
+
onChange: handleChange,
|
|
1155
|
+
className: cn(
|
|
1156
|
+
"flex h-9 w-full rounded-[var(--radius)] border border-[hsl(var(--input))] bg-transparent pl-8 pr-8 text-sm shadow-sm transition-colors",
|
|
1157
|
+
"placeholder:text-[hsl(var(--muted-foreground))]",
|
|
1158
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--ring))]",
|
|
1159
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
1160
|
+
className
|
|
1161
|
+
),
|
|
1162
|
+
...props
|
|
1163
|
+
}
|
|
1164
|
+
),
|
|
1165
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute right-2.5 flex items-center", children: value ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1166
|
+
"button",
|
|
1167
|
+
{
|
|
1168
|
+
type: "button",
|
|
1169
|
+
onClick: handleClear,
|
|
1170
|
+
className: "text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] transition-colors",
|
|
1171
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" })
|
|
1172
|
+
}
|
|
1173
|
+
) : shortcut ? /* @__PURE__ */ jsxRuntime.jsx("kbd", { className: "pointer-events-none rounded border border-[hsl(var(--border))] px-1.5 py-0.5 text-[10px] text-[hsl(var(--muted-foreground))]", children: shortcut }) : null })
|
|
1174
|
+
] });
|
|
1175
|
+
}
|
|
1176
|
+
);
|
|
1177
|
+
SearchInput.displayName = "SearchInput";
|
|
1178
|
+
function formatBytes(bytes) {
|
|
1179
|
+
if (bytes < 1024)
|
|
1180
|
+
return `${bytes} B`;
|
|
1181
|
+
if (bytes < 1024 * 1024)
|
|
1182
|
+
return `${(bytes / 1024).toFixed(1)} KB`;
|
|
1183
|
+
return `${(bytes / 1024 / 1024).toFixed(1)} MB`;
|
|
1184
|
+
}
|
|
1185
|
+
function filterBySize(files, maxSize) {
|
|
1186
|
+
return maxSize ? files.filter((f) => f.size <= maxSize) : files;
|
|
1187
|
+
}
|
|
1188
|
+
function FileUpload({ accept, multiple, maxSize, onFiles, className, disabled }) {
|
|
1189
|
+
const inputRef = React14.useRef(null);
|
|
1190
|
+
const [dragging, setDragging] = React14.useState(false);
|
|
1191
|
+
function handleFiles(raw) {
|
|
1192
|
+
if (!raw)
|
|
1193
|
+
return;
|
|
1194
|
+
const files = filterBySize(Array.from(raw), maxSize);
|
|
1195
|
+
onFiles?.(files);
|
|
1196
|
+
}
|
|
1197
|
+
function handleDrop(e) {
|
|
1198
|
+
e.preventDefault();
|
|
1199
|
+
setDragging(false);
|
|
1200
|
+
if (!disabled)
|
|
1201
|
+
handleFiles(e.dataTransfer.files);
|
|
1202
|
+
}
|
|
1203
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1204
|
+
"div",
|
|
1205
|
+
{
|
|
1206
|
+
role: "button",
|
|
1207
|
+
tabIndex: disabled ? -1 : 0,
|
|
1208
|
+
onClick: () => !disabled && inputRef.current?.click(),
|
|
1209
|
+
onKeyDown: (e) => e.key === "Enter" && !disabled && inputRef.current?.click(),
|
|
1210
|
+
onDragOver: (e) => {
|
|
1211
|
+
e.preventDefault();
|
|
1212
|
+
if (!disabled)
|
|
1213
|
+
setDragging(true);
|
|
1214
|
+
},
|
|
1215
|
+
onDragLeave: () => setDragging(false),
|
|
1216
|
+
onDrop: handleDrop,
|
|
1217
|
+
className: cn(
|
|
1218
|
+
"flex flex-col items-center justify-center gap-2 rounded-[var(--radius)] border-2 border-dashed border-[hsl(var(--border))] p-8 text-center transition-colors cursor-pointer",
|
|
1219
|
+
dragging && "border-[hsl(var(--primary))] bg-[hsl(var(--accent))]",
|
|
1220
|
+
disabled && "cursor-not-allowed opacity-50",
|
|
1221
|
+
className
|
|
1222
|
+
),
|
|
1223
|
+
children: [
|
|
1224
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Upload, { className: "h-8 w-8 text-[hsl(var(--muted-foreground))]" }),
|
|
1225
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1226
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium", children: "Drag files here or click to upload" }),
|
|
1227
|
+
maxSize && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: [
|
|
1228
|
+
"Max size: ",
|
|
1229
|
+
formatBytes(maxSize)
|
|
1230
|
+
] })
|
|
1231
|
+
] }),
|
|
1232
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1233
|
+
"input",
|
|
1234
|
+
{
|
|
1235
|
+
ref: inputRef,
|
|
1236
|
+
type: "file",
|
|
1237
|
+
accept,
|
|
1238
|
+
multiple,
|
|
1239
|
+
className: "hidden",
|
|
1240
|
+
onChange: (e) => handleFiles(e.target.files),
|
|
1241
|
+
disabled
|
|
1242
|
+
}
|
|
1243
|
+
)
|
|
1244
|
+
]
|
|
1245
|
+
}
|
|
1246
|
+
);
|
|
1247
|
+
}
|
|
1248
|
+
function FileUploadPreview({ files, onRemove, className }) {
|
|
1249
|
+
if (!files.length)
|
|
1250
|
+
return null;
|
|
1251
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: cn("flex flex-col gap-1", className), children: files.map((file, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-center justify-between rounded-[var(--radius)] border border-[hsl(var(--border))] px-3 py-2 text-sm", children: [
|
|
1252
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate text-[hsl(var(--foreground))]", children: file.name }),
|
|
1253
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-2 flex shrink-0 items-center gap-2", children: [
|
|
1254
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: formatBytes(file.size) }),
|
|
1255
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1256
|
+
"button",
|
|
1257
|
+
{
|
|
1258
|
+
type: "button",
|
|
1259
|
+
onClick: () => onRemove(i),
|
|
1260
|
+
className: "text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--destructive))] transition-colors",
|
|
1261
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" })
|
|
1262
|
+
}
|
|
1263
|
+
)
|
|
1264
|
+
] })
|
|
1265
|
+
] }, i)) });
|
|
1266
|
+
}
|
|
1267
|
+
var DAYS = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
1268
|
+
var MONTHS = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
1269
|
+
function isSameDay(a, b) {
|
|
1270
|
+
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
1271
|
+
}
|
|
1272
|
+
function getDaysInMonth(year, month) {
|
|
1273
|
+
return new Date(year, month + 1, 0).getDate();
|
|
1274
|
+
}
|
|
1275
|
+
function getFirstDayOfWeek(year, month) {
|
|
1276
|
+
return new Date(year, month, 1).getDay();
|
|
1277
|
+
}
|
|
1278
|
+
function CalendarGrid({ year, month, selected, onSelect }) {
|
|
1279
|
+
const today = /* @__PURE__ */ new Date();
|
|
1280
|
+
const daysInMonth = getDaysInMonth(year, month);
|
|
1281
|
+
const firstDay = getFirstDayOfWeek(year, month);
|
|
1282
|
+
const cells = Array.from({ length: firstDay + daysInMonth }, (_, i) => i < firstDay ? null : i - firstDay + 1);
|
|
1283
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-7 gap-0.5", children: [
|
|
1284
|
+
DAYS.map((d) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-1 text-center text-xs font-medium text-[hsl(var(--muted-foreground))]", children: d }, d)),
|
|
1285
|
+
cells.map((day, i) => {
|
|
1286
|
+
if (!day)
|
|
1287
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {}, i);
|
|
1288
|
+
const date = new Date(year, month, day);
|
|
1289
|
+
const isToday = isSameDay(date, today);
|
|
1290
|
+
const isSelected = selected && isSameDay(date, selected);
|
|
1291
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1292
|
+
"button",
|
|
1293
|
+
{
|
|
1294
|
+
type: "button",
|
|
1295
|
+
onClick: () => onSelect(date),
|
|
1296
|
+
className: cn(
|
|
1297
|
+
"flex h-8 w-8 items-center justify-center rounded-[var(--radius)] text-sm transition-colors",
|
|
1298
|
+
isSelected && "bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))]",
|
|
1299
|
+
!isSelected && isToday && "border border-[hsl(var(--primary))] text-[hsl(var(--primary))]",
|
|
1300
|
+
!isSelected && !isToday && "hover:bg-[hsl(var(--accent))]"
|
|
1301
|
+
),
|
|
1302
|
+
children: day
|
|
1303
|
+
},
|
|
1304
|
+
i
|
|
1305
|
+
);
|
|
1306
|
+
})
|
|
1307
|
+
] });
|
|
1308
|
+
}
|
|
1309
|
+
function DatePicker({ value, onChange, placeholder = "Pick a date", disabled, className }) {
|
|
1310
|
+
const [open, setOpen] = React14.useState(false);
|
|
1311
|
+
const now = value ?? /* @__PURE__ */ new Date();
|
|
1312
|
+
const [view, setView] = React14.useState({ year: now.getFullYear(), month: now.getMonth() });
|
|
1313
|
+
function navigate(delta) {
|
|
1314
|
+
setView((v) => {
|
|
1315
|
+
const date = new Date(v.year, v.month + delta);
|
|
1316
|
+
return { year: date.getFullYear(), month: date.getMonth() };
|
|
1317
|
+
});
|
|
1318
|
+
}
|
|
1319
|
+
function handleSelect(date) {
|
|
1320
|
+
onChange?.(date);
|
|
1321
|
+
setOpen(false);
|
|
1322
|
+
}
|
|
1323
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
1324
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1325
|
+
Button,
|
|
1326
|
+
{
|
|
1327
|
+
variant: "outline",
|
|
1328
|
+
disabled,
|
|
1329
|
+
className: cn("w-full justify-start font-normal", !value && "text-[hsl(var(--muted-foreground))]", className),
|
|
1330
|
+
children: [
|
|
1331
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Calendar, { className: "mr-2 h-4 w-4 shrink-0" }),
|
|
1332
|
+
value ? value.toLocaleDateString() : placeholder
|
|
1333
|
+
]
|
|
1334
|
+
}
|
|
1335
|
+
) }),
|
|
1336
|
+
/* @__PURE__ */ jsxRuntime.jsxs(PopoverContent, { className: "w-auto p-3", align: "start", children: [
|
|
1337
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
1338
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => navigate(-1), className: "rounded p-1 hover:bg-[hsl(var(--accent))]", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "h-4 w-4" }) }),
|
|
1339
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-medium", children: [
|
|
1340
|
+
MONTHS[view.month],
|
|
1341
|
+
" ",
|
|
1342
|
+
view.year
|
|
1343
|
+
] }),
|
|
1344
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => navigate(1), className: "rounded p-1 hover:bg-[hsl(var(--accent))]", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4" }) })
|
|
1345
|
+
] }),
|
|
1346
|
+
/* @__PURE__ */ jsxRuntime.jsx(CalendarGrid, { year: view.year, month: view.month, selected: value, onSelect: handleSelect })
|
|
1347
|
+
] })
|
|
1348
|
+
] });
|
|
1349
|
+
}
|
|
1350
|
+
function FormField(props) {
|
|
1351
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactHookForm.Controller, { ...props });
|
|
1352
|
+
}
|
|
1353
|
+
function FormItem({ className, ...props }) {
|
|
1354
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col gap-1.5", className), ...props });
|
|
1355
|
+
}
|
|
1356
|
+
var FormLabel = React14__default.default.forwardRef(
|
|
1357
|
+
({ className, error, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1358
|
+
"label",
|
|
1359
|
+
{
|
|
1360
|
+
ref,
|
|
1361
|
+
className: cn(
|
|
1362
|
+
"text-sm font-medium leading-none",
|
|
1363
|
+
error ? "text-[hsl(var(--destructive))]" : "text-[hsl(var(--foreground))]",
|
|
1364
|
+
className
|
|
1365
|
+
),
|
|
1366
|
+
...props
|
|
1367
|
+
}
|
|
1368
|
+
)
|
|
1369
|
+
);
|
|
1370
|
+
FormLabel.displayName = "FormLabel";
|
|
1371
|
+
var FormControl = React14__default.default.forwardRef(
|
|
1372
|
+
({ ...props }, ref) => {
|
|
1373
|
+
const id = React14.useId();
|
|
1374
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, id, ...props });
|
|
1375
|
+
}
|
|
1376
|
+
);
|
|
1377
|
+
FormControl.displayName = "FormControl";
|
|
1378
|
+
function FormDescription({ className, ...props }) {
|
|
1379
|
+
return /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-xs text-[hsl(var(--muted-foreground))]", className), ...props });
|
|
1380
|
+
}
|
|
1381
|
+
function FormMessage({ className, children, name }) {
|
|
1382
|
+
const { formState } = reactHookForm.useFormContext();
|
|
1383
|
+
const error = name ? formState.errors[name] : void 0;
|
|
1384
|
+
const message = error?.message ? String(error.message) : children;
|
|
1385
|
+
if (!message)
|
|
1386
|
+
return null;
|
|
1387
|
+
return /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-xs text-[hsl(var(--destructive))]", className), children: message });
|
|
1388
|
+
}
|
|
1389
|
+
var StepFormContext = React14.createContext(null);
|
|
1390
|
+
function useStepForm() {
|
|
1391
|
+
const ctx = React14.useContext(StepFormContext);
|
|
1392
|
+
if (!ctx)
|
|
1393
|
+
throw new Error("useStepForm must be used within StepForm");
|
|
1394
|
+
return ctx;
|
|
1395
|
+
}
|
|
1396
|
+
function StepForm({ steps, onSubmit, children, className }) {
|
|
1397
|
+
const [currentStep, setCurrentStep] = React14.useState(0);
|
|
1398
|
+
const totalSteps = steps.length;
|
|
1399
|
+
const ctx = {
|
|
1400
|
+
currentStep,
|
|
1401
|
+
totalSteps,
|
|
1402
|
+
steps,
|
|
1403
|
+
next: () => setCurrentStep((s) => Math.min(s + 1, totalSteps - 1)),
|
|
1404
|
+
prev: () => setCurrentStep((s) => Math.max(s - 1, 0)),
|
|
1405
|
+
isFirst: currentStep === 0,
|
|
1406
|
+
isLast: currentStep === totalSteps - 1
|
|
1407
|
+
};
|
|
1408
|
+
const childArray = React14__default.default.Children.toArray(children);
|
|
1409
|
+
const currentChild = childArray[currentStep];
|
|
1410
|
+
return /* @__PURE__ */ jsxRuntime.jsx(StepFormContext.Provider, { value: ctx, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-6", className), children: [
|
|
1411
|
+
/* @__PURE__ */ jsxRuntime.jsx(StepIndicator, { steps, currentStep }),
|
|
1412
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: currentChild }),
|
|
1413
|
+
/* @__PURE__ */ jsxRuntime.jsx(StepFormNavigation, { onSubmit })
|
|
1414
|
+
] }) });
|
|
1415
|
+
}
|
|
1416
|
+
function StepIndicator({ steps, currentStep }) {
|
|
1417
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: steps.map((label, i) => /* @__PURE__ */ jsxRuntime.jsxs(React14__default.default.Fragment, { children: [
|
|
1418
|
+
i > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("h-px flex-1 bg-[hsl(var(--border))]", i <= currentStep && "bg-[hsl(var(--primary))]") }),
|
|
1419
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-1", children: [
|
|
1420
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
1421
|
+
"flex h-7 w-7 items-center justify-center rounded-full text-xs font-medium border transition-colors",
|
|
1422
|
+
i < currentStep && "bg-[hsl(var(--primary))] border-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))]",
|
|
1423
|
+
i === currentStep && "border-[hsl(var(--primary))] text-[hsl(var(--primary))]",
|
|
1424
|
+
i > currentStep && "border-[hsl(var(--border))] text-[hsl(var(--muted-foreground))]"
|
|
1425
|
+
), children: i + 1 }),
|
|
1426
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden text-[10px] text-[hsl(var(--muted-foreground))] sm:block", children: label })
|
|
1427
|
+
] })
|
|
1428
|
+
] }, i)) });
|
|
1429
|
+
}
|
|
1430
|
+
function StepFormStep({ title, description, children }) {
|
|
1431
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
1432
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1433
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-semibold text-[hsl(var(--foreground))]", children: title }),
|
|
1434
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-[hsl(var(--muted-foreground))]", children: description })
|
|
1435
|
+
] }),
|
|
1436
|
+
children
|
|
1437
|
+
] });
|
|
1438
|
+
}
|
|
1439
|
+
function StepFormNavigation({ onSubmit, submitLabel = "Submit" }) {
|
|
1440
|
+
const { prev, next, isFirst, isLast } = useStepForm();
|
|
1441
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
|
|
1442
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", variant: "outline", onClick: prev, disabled: isFirst, children: "Previous" }),
|
|
1443
|
+
isLast ? /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", onClick: onSubmit, children: submitLabel }) : /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", onClick: next, children: "Next" })
|
|
1444
|
+
] });
|
|
1445
|
+
}
|
|
1446
|
+
function ArrayField({
|
|
1447
|
+
value,
|
|
1448
|
+
onChange,
|
|
1449
|
+
renderItem,
|
|
1450
|
+
addLabel = "Add item",
|
|
1451
|
+
maxItems,
|
|
1452
|
+
defaultItem,
|
|
1453
|
+
className
|
|
1454
|
+
}) {
|
|
1455
|
+
function add() {
|
|
1456
|
+
if (maxItems && value.length >= maxItems)
|
|
1457
|
+
return;
|
|
1458
|
+
onChange([...value, defaultItem]);
|
|
1459
|
+
}
|
|
1460
|
+
function remove(index) {
|
|
1461
|
+
onChange(value.filter((_, i) => i !== index));
|
|
1462
|
+
}
|
|
1463
|
+
const atMax = maxItems !== void 0 && value.length >= maxItems;
|
|
1464
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
|
|
1465
|
+
value.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2", children: [
|
|
1466
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-w-0", children: renderItem(item, i, () => remove(i)) }),
|
|
1467
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1468
|
+
"button",
|
|
1469
|
+
{
|
|
1470
|
+
type: "button",
|
|
1471
|
+
onClick: () => remove(i),
|
|
1472
|
+
className: "mt-2 shrink-0 text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--destructive))] transition-colors",
|
|
1473
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" })
|
|
1474
|
+
}
|
|
1475
|
+
)
|
|
1476
|
+
] }, i)),
|
|
1477
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1478
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Button, { type: "button", variant: "outline", size: "sm", onClick: add, disabled: atMax, children: [
|
|
1479
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4" }),
|
|
1480
|
+
addLabel
|
|
1481
|
+
] }),
|
|
1482
|
+
maxItems && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: [
|
|
1483
|
+
value.length,
|
|
1484
|
+
"/",
|
|
1485
|
+
maxItems
|
|
1486
|
+
] })
|
|
1487
|
+
] })
|
|
1488
|
+
] });
|
|
1489
|
+
}
|
|
1490
|
+
function ObjectField({
|
|
1491
|
+
title,
|
|
1492
|
+
description,
|
|
1493
|
+
collapsible = false,
|
|
1494
|
+
defaultOpen = true,
|
|
1495
|
+
children,
|
|
1496
|
+
className
|
|
1497
|
+
}) {
|
|
1498
|
+
const [open, setOpen] = React14.useState(defaultOpen);
|
|
1499
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("rounded-[var(--radius)] border border-[hsl(var(--border))] overflow-hidden", className), children: [
|
|
1500
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1501
|
+
"div",
|
|
1502
|
+
{
|
|
1503
|
+
className: cn(
|
|
1504
|
+
"flex items-center justify-between px-4 py-3 bg-[hsl(var(--muted)/0.4)]",
|
|
1505
|
+
collapsible && "cursor-pointer hover:bg-[hsl(var(--accent))] transition-colors"
|
|
1506
|
+
),
|
|
1507
|
+
onClick: () => collapsible && setOpen((o) => !o),
|
|
1508
|
+
role: collapsible ? "button" : void 0,
|
|
1509
|
+
tabIndex: collapsible ? 0 : void 0,
|
|
1510
|
+
onKeyDown: (e) => collapsible && e.key === "Enter" && setOpen((o) => !o),
|
|
1511
|
+
children: [
|
|
1512
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1513
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-semibold text-[hsl(var(--foreground))]", children: title }),
|
|
1514
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: description })
|
|
1515
|
+
] }),
|
|
1516
|
+
collapsible && (open ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4 text-[hsl(var(--muted-foreground))]" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4 text-[hsl(var(--muted-foreground))]" }))
|
|
1517
|
+
]
|
|
1518
|
+
}
|
|
1519
|
+
),
|
|
1520
|
+
(!collapsible || open) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 flex flex-col gap-4", children })
|
|
1521
|
+
] });
|
|
1522
|
+
}
|
|
1523
|
+
function toLabel(key) {
|
|
1524
|
+
return key.replace(/([A-Z])/g, " $1").replace(/^./, (s) => s.toUpperCase());
|
|
1525
|
+
}
|
|
1526
|
+
function getInputType(field) {
|
|
1527
|
+
if (field instanceof z__namespace.ZodEmail)
|
|
1528
|
+
return "email";
|
|
1529
|
+
if (field instanceof z__namespace.ZodURL)
|
|
1530
|
+
return "url";
|
|
1531
|
+
return "text";
|
|
1532
|
+
}
|
|
1533
|
+
function unwrapOptional(field) {
|
|
1534
|
+
if (field instanceof z__namespace.ZodOptional || field instanceof z__namespace.ZodNullable) {
|
|
1535
|
+
return unwrapOptional(field.unwrap());
|
|
1536
|
+
}
|
|
1537
|
+
return field;
|
|
1538
|
+
}
|
|
1539
|
+
function FieldRenderer({ name, field, register, setValue, watch, error }) {
|
|
1540
|
+
const inner = unwrapOptional(field);
|
|
1541
|
+
const label = toLabel(name);
|
|
1542
|
+
const isOptional = field instanceof z__namespace.ZodOptional;
|
|
1543
|
+
if (inner instanceof z__namespace.ZodBoolean) {
|
|
1544
|
+
const checked = Boolean(watch(name));
|
|
1545
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Field, { label, error, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1546
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1547
|
+
Checkbox,
|
|
1548
|
+
{
|
|
1549
|
+
id: name,
|
|
1550
|
+
checked,
|
|
1551
|
+
onCheckedChange: (v) => setValue(name, v)
|
|
1552
|
+
}
|
|
1553
|
+
),
|
|
1554
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: name, className: "text-sm text-[hsl(var(--foreground))]", children: label })
|
|
1555
|
+
] }) });
|
|
1556
|
+
}
|
|
1557
|
+
if (inner instanceof z__namespace.ZodEnum) {
|
|
1558
|
+
const options = inner.options ?? [];
|
|
1559
|
+
const value = watch(name);
|
|
1560
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Field, { label, required: !isOptional, error, children: /* @__PURE__ */ jsxRuntime.jsxs(Select, { value, onValueChange: (v) => setValue(name, v), children: [
|
|
1561
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, { placeholder: `Select ${label.toLowerCase()}` }) }),
|
|
1562
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: options.map((opt) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: opt, children: opt }, opt)) })
|
|
1563
|
+
] }) });
|
|
1564
|
+
}
|
|
1565
|
+
if (inner instanceof z__namespace.ZodDate) {
|
|
1566
|
+
const value = watch(name);
|
|
1567
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Field, { label, required: !isOptional, error, children: /* @__PURE__ */ jsxRuntime.jsx(DatePicker, { value, onChange: (d) => setValue(name, d), placeholder: `Select ${label.toLowerCase()}` }) });
|
|
1568
|
+
}
|
|
1569
|
+
if (inner instanceof z__namespace.ZodNumber) {
|
|
1570
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Field, { label, required: !isOptional, error, children: /* @__PURE__ */ jsxRuntime.jsx(Input, { type: "number", ...register(name, { valueAsNumber: true }) }) });
|
|
1571
|
+
}
|
|
1572
|
+
const inputType = getInputType(inner);
|
|
1573
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Field, { label, required: !isOptional, error, children: /* @__PURE__ */ jsxRuntime.jsx(Input, { type: inputType, ...register(name) }) });
|
|
1574
|
+
}
|
|
1575
|
+
function AutoForm({ schema, onSubmit, defaultValues, submitLabel = "Submit" }) {
|
|
1576
|
+
const { register, handleSubmit, setValue, watch, formState } = reactHookForm.useForm({
|
|
1577
|
+
resolver: zod.zodResolver(schema),
|
|
1578
|
+
defaultValues
|
|
1579
|
+
});
|
|
1580
|
+
const shape = schema.shape;
|
|
1581
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit((d) => onSubmit(d)), className: "flex flex-col gap-4", children: [
|
|
1582
|
+
Object.entries(shape).map(([name, field]) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1583
|
+
FieldRenderer,
|
|
1584
|
+
{
|
|
1585
|
+
name,
|
|
1586
|
+
field,
|
|
1587
|
+
register,
|
|
1588
|
+
setValue,
|
|
1589
|
+
watch,
|
|
1590
|
+
error: formState.errors[name]?.message
|
|
1591
|
+
},
|
|
1592
|
+
name
|
|
1593
|
+
)),
|
|
1594
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { type: "submit", children: submitLabel })
|
|
1595
|
+
] });
|
|
1596
|
+
}
|
|
1597
|
+
function DataTableColumnHeader({ column, title }) {
|
|
1598
|
+
if (!column.getCanSort())
|
|
1599
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { children: title });
|
|
1600
|
+
const sorted = column.getIsSorted();
|
|
1601
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1602
|
+
"button",
|
|
1603
|
+
{
|
|
1604
|
+
onClick: () => column.toggleSorting(sorted === "asc"),
|
|
1605
|
+
className: "flex items-center gap-1 hover:text-[hsl(var(--foreground))]",
|
|
1606
|
+
children: [
|
|
1607
|
+
title,
|
|
1608
|
+
sorted === "asc" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, { className: "h-3 w-3" }) : sorted === "desc" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, { className: "h-3 w-3" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUpDown, { className: "h-3 w-3 opacity-50" })
|
|
1609
|
+
]
|
|
1610
|
+
}
|
|
1611
|
+
);
|
|
1612
|
+
}
|
|
1613
|
+
function DataTablePagination({ table }) {
|
|
1614
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-2 py-3", children: [
|
|
1615
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-[hsl(var(--muted-foreground))]", children: [
|
|
1616
|
+
"Page ",
|
|
1617
|
+
table.getState().pagination.pageIndex + 1,
|
|
1618
|
+
" of ",
|
|
1619
|
+
table.getPageCount()
|
|
1620
|
+
] }),
|
|
1621
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1622
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1623
|
+
Select,
|
|
1624
|
+
{
|
|
1625
|
+
value: String(table.getState().pagination.pageSize),
|
|
1626
|
+
onValueChange: (v) => table.setPageSize(Number(v)),
|
|
1627
|
+
children: [
|
|
1628
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "h-8 w-[70px]", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, {}) }),
|
|
1629
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: [10, 20, 50].map((n) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: String(n), children: n }, n)) })
|
|
1630
|
+
]
|
|
1631
|
+
}
|
|
1632
|
+
),
|
|
1633
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", size: "icon", className: "h-8 w-8", onClick: () => table.previousPage(), disabled: !table.getCanPreviousPage(), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "h-4 w-4" }) }),
|
|
1634
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", size: "icon", className: "h-8 w-8", onClick: () => table.nextPage(), disabled: !table.getCanNextPage(), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4" }) })
|
|
1635
|
+
] })
|
|
1636
|
+
] });
|
|
1637
|
+
}
|
|
1638
|
+
function DataTableToolbar({ table, searchColumn }) {
|
|
1639
|
+
if (!searchColumn)
|
|
1640
|
+
return null;
|
|
1641
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-3", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1642
|
+
Input,
|
|
1643
|
+
{
|
|
1644
|
+
placeholder: "Search...",
|
|
1645
|
+
value: table.getColumn(searchColumn)?.getFilterValue() ?? "",
|
|
1646
|
+
onChange: (e) => table.getColumn(searchColumn)?.setFilterValue(e.target.value),
|
|
1647
|
+
className: "max-w-sm h-8"
|
|
1648
|
+
}
|
|
1649
|
+
) });
|
|
1650
|
+
}
|
|
1651
|
+
function DataTable({ columns, data, pageSize = 10, searchable, searchColumn, loading }) {
|
|
1652
|
+
const [sorting, setSorting] = React14__default.default.useState([]);
|
|
1653
|
+
const table = reactTable.useReactTable({
|
|
1654
|
+
data,
|
|
1655
|
+
columns,
|
|
1656
|
+
getCoreRowModel: reactTable.getCoreRowModel(),
|
|
1657
|
+
getPaginationRowModel: reactTable.getPaginationRowModel(),
|
|
1658
|
+
getSortedRowModel: reactTable.getSortedRowModel(),
|
|
1659
|
+
getFilteredRowModel: reactTable.getFilteredRowModel(),
|
|
1660
|
+
onSortingChange: setSorting,
|
|
1661
|
+
initialState: { pagination: { pageSize } },
|
|
1662
|
+
state: { sorting }
|
|
1663
|
+
});
|
|
1664
|
+
if (loading)
|
|
1665
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-10 w-full" }, i)) });
|
|
1666
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full", children: [
|
|
1667
|
+
searchable && /* @__PURE__ */ jsxRuntime.jsx(DataTableToolbar, { table, searchColumn }),
|
|
1668
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-[var(--radius)] border border-[hsl(var(--border))] overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "w-full text-sm", children: [
|
|
1669
|
+
/* @__PURE__ */ jsxRuntime.jsx("thead", { className: "bg-[hsl(var(--muted)/0.4)]", children: table.getHeaderGroups().map((hg) => /* @__PURE__ */ jsxRuntime.jsx("tr", { children: hg.headers.map((h) => /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-4 py-3 text-left font-medium text-[hsl(var(--muted-foreground))]", children: h.isPlaceholder ? null : reactTable.flexRender(h.column.columnDef.header, h.getContext()) }, h.id)) }, hg.id)) }),
|
|
1670
|
+
/* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
|
|
1671
|
+
table.getRowModel().rows.map((row, i) => /* @__PURE__ */ jsxRuntime.jsx("tr", { className: cn("border-t border-[hsl(var(--border))] hover:bg-[hsl(var(--muted)/0.3)] transition-colors", i % 2 === 0 ? "" : "bg-[hsl(var(--muted)/0.1)]"), children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-3", children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id)) }, row.id)),
|
|
1672
|
+
table.getRowModel().rows.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: columns.length, className: "px-4 py-8 text-center text-[hsl(var(--muted-foreground))]", children: "No results." }) })
|
|
1673
|
+
] })
|
|
1674
|
+
] }) }),
|
|
1675
|
+
/* @__PURE__ */ jsxRuntime.jsx(DataTablePagination, { table })
|
|
1676
|
+
] });
|
|
1677
|
+
}
|
|
1678
|
+
function EditableCell({ value: initial, onSave }) {
|
|
1679
|
+
const [editing, setEditing] = React14__default.default.useState(false);
|
|
1680
|
+
const [val, setVal] = React14__default.default.useState(String(initial ?? ""));
|
|
1681
|
+
const commit = () => {
|
|
1682
|
+
onSave(val);
|
|
1683
|
+
setEditing(false);
|
|
1684
|
+
};
|
|
1685
|
+
if (editing) {
|
|
1686
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1687
|
+
"input",
|
|
1688
|
+
{
|
|
1689
|
+
autoFocus: true,
|
|
1690
|
+
className: "w-full bg-transparent outline outline-1 outline-[hsl(var(--ring))] rounded px-1 text-sm",
|
|
1691
|
+
value: val,
|
|
1692
|
+
onChange: (e) => setVal(e.target.value),
|
|
1693
|
+
onBlur: commit,
|
|
1694
|
+
onKeyDown: (e) => {
|
|
1695
|
+
if (e.key === "Enter")
|
|
1696
|
+
commit();
|
|
1697
|
+
if (e.key === "Escape")
|
|
1698
|
+
setEditing(false);
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
);
|
|
1702
|
+
}
|
|
1703
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "cursor-pointer w-full block", onDoubleClick: () => setEditing(true), children: String(initial ?? "") });
|
|
1704
|
+
}
|
|
1705
|
+
var selectionCol = () => ({
|
|
1706
|
+
id: "_select",
|
|
1707
|
+
header: ({ table }) => /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { checked: table.getIsAllRowsSelected(), onCheckedChange: (v) => table.toggleAllRowsSelected(!!v) }),
|
|
1708
|
+
cell: ({ row }) => /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { checked: row.getIsSelected(), onCheckedChange: (v) => row.toggleSelected(!!v) }),
|
|
1709
|
+
size: 40,
|
|
1710
|
+
enableResizing: false
|
|
1711
|
+
});
|
|
1712
|
+
function DataGrid({ columns, data: initialData, onDataChange, editable, className }) {
|
|
1713
|
+
const [data, setData] = React14__default.default.useState(initialData);
|
|
1714
|
+
const [rowSelection, setRowSelection] = React14__default.default.useState({});
|
|
1715
|
+
const columnResizeMode = "onChange";
|
|
1716
|
+
const editableColumns = React14__default.default.useMemo(() => {
|
|
1717
|
+
if (!editable)
|
|
1718
|
+
return columns;
|
|
1719
|
+
return columns.map((col) => ({
|
|
1720
|
+
...col,
|
|
1721
|
+
cell: (info) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1722
|
+
EditableCell,
|
|
1723
|
+
{
|
|
1724
|
+
value: info.getValue(),
|
|
1725
|
+
onSave: (v) => {
|
|
1726
|
+
const updated = data.map(
|
|
1727
|
+
(row, i) => i === info.row.index ? { ...row, [info.column.id]: v } : row
|
|
1728
|
+
);
|
|
1729
|
+
setData(updated);
|
|
1730
|
+
onDataChange?.(updated);
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
)
|
|
1734
|
+
}));
|
|
1735
|
+
}, [columns, data, editable, onDataChange]);
|
|
1736
|
+
const allColumns = React14__default.default.useMemo(() => [selectionCol(), ...editableColumns], [editableColumns]);
|
|
1737
|
+
const table = reactTable.useReactTable({
|
|
1738
|
+
data,
|
|
1739
|
+
columns: allColumns,
|
|
1740
|
+
columnResizeMode,
|
|
1741
|
+
getCoreRowModel: reactTable.getCoreRowModel(),
|
|
1742
|
+
onRowSelectionChange: setRowSelection,
|
|
1743
|
+
state: { rowSelection },
|
|
1744
|
+
enableColumnResizing: true
|
|
1745
|
+
});
|
|
1746
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("overflow-auto rounded-[var(--radius)] border border-[hsl(var(--border))]", className), children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "w-full text-sm", style: { width: table.getCenterTotalSize() }, children: [
|
|
1747
|
+
/* @__PURE__ */ jsxRuntime.jsx("thead", { className: "bg-[hsl(var(--muted)/0.4)]", children: table.getHeaderGroups().map((hg) => /* @__PURE__ */ jsxRuntime.jsx("tr", { children: hg.headers.map((h) => /* @__PURE__ */ jsxRuntime.jsxs("th", { style: { width: h.getSize() }, className: "relative px-3 py-2 text-left font-medium text-[hsl(var(--muted-foreground))] border-r border-[hsl(var(--border))] last:border-r-0", children: [
|
|
1748
|
+
h.isPlaceholder ? null : reactTable.flexRender(h.column.columnDef.header, h.getContext()),
|
|
1749
|
+
h.column.getCanResize() && /* @__PURE__ */ jsxRuntime.jsx("div", { onMouseDown: h.getResizeHandler(), className: "absolute right-0 top-0 h-full w-1 cursor-col-resize hover:bg-[hsl(var(--primary)/0.4)]" })
|
|
1750
|
+
] }, h.id)) }, hg.id)) }),
|
|
1751
|
+
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children: table.getRowModel().rows.map((row) => /* @__PURE__ */ jsxRuntime.jsx("tr", { className: cn("border-t border-[hsl(var(--border))] hover:bg-[hsl(var(--muted)/0.3)] transition-colors", row.getIsSelected() && "bg-[hsl(var(--primary)/0.06)]"), children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsxRuntime.jsx("td", { style: { width: cell.column.getSize() }, className: "px-3 py-2 border-r border-[hsl(var(--border))] last:border-r-0", children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id)) }, row.id)) })
|
|
1752
|
+
] }) });
|
|
1753
|
+
}
|
|
1754
|
+
var EmptyStateIcon = React14__default.default.forwardRef(
|
|
1755
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex h-12 w-12 items-center justify-center rounded-full bg-[hsl(var(--muted))] text-[hsl(var(--muted-foreground))]", className), ...props })
|
|
1756
|
+
);
|
|
1757
|
+
EmptyStateIcon.displayName = "EmptyStateIcon";
|
|
1758
|
+
function EmptyState({ icon, title, description, action, className }) {
|
|
1759
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col items-center justify-center gap-3 py-12 text-center", className), children: [
|
|
1760
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx(EmptyStateIcon, { children: icon }),
|
|
1761
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
1762
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-[hsl(var(--foreground))]", children: title }),
|
|
1763
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-[hsl(var(--muted-foreground))]", children: description })
|
|
1764
|
+
] }),
|
|
1765
|
+
action && /* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: action.onClick, className: "mt-1", children: action.label })
|
|
1766
|
+
] });
|
|
1767
|
+
}
|
|
1768
|
+
var PropertyList = React14__default.default.forwardRef(
|
|
1769
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("dl", { ref, className: cn("divide-y divide-[hsl(var(--border))]", className), ...props })
|
|
1770
|
+
);
|
|
1771
|
+
PropertyList.displayName = "PropertyList";
|
|
1772
|
+
function PropertyItem({ label, value, orientation = "horizontal", className }) {
|
|
1773
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("py-3", orientation === "horizontal" ? "flex gap-4" : "space-y-1", className), children: [
|
|
1774
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: cn("text-sm font-medium text-[hsl(var(--muted-foreground))] shrink-0", orientation === "horizontal" && "w-[40%]"), children: label }),
|
|
1775
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-sm text-[hsl(var(--foreground))] min-w-0", children: value })
|
|
1776
|
+
] });
|
|
1777
|
+
}
|
|
1778
|
+
var dotColors = {
|
|
1779
|
+
default: "bg-[hsl(var(--primary))]",
|
|
1780
|
+
success: "bg-green-500",
|
|
1781
|
+
error: "bg-red-500",
|
|
1782
|
+
warning: "bg-yellow-500"
|
|
1783
|
+
};
|
|
1784
|
+
var TimelineContent = React14__default.default.forwardRef(
|
|
1785
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("pb-1", className), ...props })
|
|
1786
|
+
);
|
|
1787
|
+
TimelineContent.displayName = "TimelineContent";
|
|
1788
|
+
function TimelineConnector({ className }) {
|
|
1789
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("absolute left-[7px] top-5 bottom-0 w-0.5 bg-[hsl(var(--border))]", className) });
|
|
1790
|
+
}
|
|
1791
|
+
function TimelineItem({ icon, title, description, timestamp, variant = "default", isLast, className }) {
|
|
1792
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative flex gap-4", !isLast && "pb-6", className), children: [
|
|
1793
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-none", children: [
|
|
1794
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("h-4 w-4 rounded-full border-2 border-[hsl(var(--background))] flex items-center justify-center mt-0.5", dotColors[variant]), children: icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-white text-[8px]", children: icon }) }),
|
|
1795
|
+
!isLast && /* @__PURE__ */ jsxRuntime.jsx(TimelineConnector, {})
|
|
1796
|
+
] }),
|
|
1797
|
+
/* @__PURE__ */ jsxRuntime.jsxs(TimelineContent, { children: [
|
|
1798
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline justify-between gap-2", children: [
|
|
1799
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-[hsl(var(--foreground))]", children: title }),
|
|
1800
|
+
timestamp && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-[hsl(var(--muted-foreground))] shrink-0", children: timestamp })
|
|
1801
|
+
] }),
|
|
1802
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-[hsl(var(--muted-foreground))] mt-0.5", children: description })
|
|
1803
|
+
] })
|
|
1804
|
+
] });
|
|
1805
|
+
}
|
|
1806
|
+
function Timeline({ children, className }) {
|
|
1807
|
+
const items = React14__default.default.Children.toArray(children);
|
|
1808
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("", className), children: items.map(
|
|
1809
|
+
(child, i) => React14__default.default.isValidElement(child) ? React14__default.default.cloneElement(child, { isLast: i === items.length - 1 }) : child
|
|
1810
|
+
) });
|
|
1811
|
+
}
|
|
1812
|
+
function Stat({ label, value, trend, trendLabel, icon, description, className }) {
|
|
1813
|
+
const isPositive = trend !== void 0 && trend >= 0;
|
|
1814
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Card, { className: cn("", className), children: /* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "p-5", children: [
|
|
1815
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between", children: [
|
|
1816
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1 min-w-0", children: [
|
|
1817
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-[hsl(var(--muted-foreground))] truncate", children: label }),
|
|
1818
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-2xl font-bold text-[hsl(var(--foreground))]", children: value })
|
|
1819
|
+
] }),
|
|
1820
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[hsl(var(--muted-foreground))] shrink-0 ml-2", children: icon })
|
|
1821
|
+
] }),
|
|
1822
|
+
(trend !== void 0 || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 flex items-center gap-1", children: [
|
|
1823
|
+
trend !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("flex items-center gap-0.5 text-xs font-medium", isPositive ? "text-green-600" : "text-red-600"), children: [
|
|
1824
|
+
isPositive ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingUp, { className: "h-3 w-3" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingDown, { className: "h-3 w-3" }),
|
|
1825
|
+
Math.abs(trend),
|
|
1826
|
+
"%"
|
|
1827
|
+
] }),
|
|
1828
|
+
trendLabel && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: trendLabel }),
|
|
1829
|
+
description && !trendLabel && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: description })
|
|
1830
|
+
] })
|
|
1831
|
+
] }) });
|
|
1832
|
+
}
|
|
1833
|
+
function StatGroup({ className, ...props }) {
|
|
1834
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("grid gap-4", className), style: { gridTemplateColumns: "repeat(auto-fill, minmax(min(100%, 200px), 1fr))" }, ...props });
|
|
1835
|
+
}
|
|
1836
|
+
var sizeMap2 = {
|
|
1837
|
+
sm: { avatar: "h-7 w-7", name: "text-sm", subtitle: "text-xs" },
|
|
1838
|
+
md: { avatar: "h-9 w-9", name: "text-sm font-medium", subtitle: "text-xs" },
|
|
1839
|
+
lg: { avatar: "h-12 w-12", name: "text-base font-medium", subtitle: "text-sm" }
|
|
1840
|
+
};
|
|
1841
|
+
function Persona({ name, subtitle, src, size = "md", badge, className }) {
|
|
1842
|
+
const s = sizeMap2[size];
|
|
1843
|
+
const initials = name.split(" ").map((w) => w[0]).slice(0, 2).join("").toUpperCase();
|
|
1844
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-2.5", className), children: [
|
|
1845
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative shrink-0", children: [
|
|
1846
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Avatar, { className: s.avatar, children: [
|
|
1847
|
+
src && /* @__PURE__ */ jsxRuntime.jsx(AvatarImage, { src, alt: name }),
|
|
1848
|
+
/* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { className: "text-xs", children: initials })
|
|
1849
|
+
] }),
|
|
1850
|
+
badge && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -bottom-0.5 -right-0.5", children: badge })
|
|
1851
|
+
] }),
|
|
1852
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
1853
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("truncate text-[hsl(var(--foreground))]", s.name), children: name }),
|
|
1854
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("truncate text-[hsl(var(--muted-foreground))]", s.subtitle), children: subtitle })
|
|
1855
|
+
] })
|
|
1856
|
+
] });
|
|
1857
|
+
}
|
|
1858
|
+
var colorMap = {
|
|
1859
|
+
default: "bg-[hsl(var(--muted))] text-[hsl(var(--muted-foreground))]",
|
|
1860
|
+
primary: "bg-[hsl(var(--primary)/0.12)] text-[hsl(var(--primary))]",
|
|
1861
|
+
success: "bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400",
|
|
1862
|
+
warning: "bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400",
|
|
1863
|
+
error: "bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400",
|
|
1864
|
+
purple: "bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400"
|
|
1865
|
+
};
|
|
1866
|
+
var sizeMap3 = {
|
|
1867
|
+
sm: "h-7 w-7 [&>*]:h-3.5 [&>*]:w-3.5",
|
|
1868
|
+
md: "h-10 w-10 [&>*]:h-5 [&>*]:w-5",
|
|
1869
|
+
lg: "h-14 w-14 [&>*]:h-7 [&>*]:w-7"
|
|
1870
|
+
};
|
|
1871
|
+
function IconBadge({ icon, color = "default", size = "md", className }) {
|
|
1872
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("inline-flex items-center justify-center rounded-full shrink-0", colorMap[color], sizeMap3[size], className), children: icon });
|
|
1873
|
+
}
|
|
1874
|
+
function StructuredListSection({ title, children, className }) {
|
|
1875
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("", className), children: [
|
|
1876
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-4 pb-1 pt-4 text-xs font-semibold uppercase tracking-wider text-[hsl(var(--muted-foreground))]", children: title }),
|
|
1877
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-[var(--radius)] border border-[hsl(var(--border))] overflow-hidden divide-y divide-[hsl(var(--border))]", children })
|
|
1878
|
+
] });
|
|
1879
|
+
}
|
|
1880
|
+
function StructuredListItem({ left, title, description, right, onClick, className }) {
|
|
1881
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1882
|
+
"div",
|
|
1883
|
+
{
|
|
1884
|
+
onClick,
|
|
1885
|
+
className: cn("flex items-center gap-3 px-4 py-3 bg-[hsl(var(--card))]", onClick && "cursor-pointer hover:bg-[hsl(var(--muted)/0.5)] transition-colors", className),
|
|
1886
|
+
children: [
|
|
1887
|
+
left && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: left }),
|
|
1888
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
1889
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-[hsl(var(--foreground))] truncate", children: title }),
|
|
1890
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-[hsl(var(--muted-foreground))] truncate", children: description })
|
|
1891
|
+
] }),
|
|
1892
|
+
right && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 text-[hsl(var(--muted-foreground))]", children: right })
|
|
1893
|
+
]
|
|
1894
|
+
}
|
|
1895
|
+
);
|
|
1896
|
+
}
|
|
1897
|
+
var StructuredList = React14__default.default.forwardRef(
|
|
1898
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("space-y-4", className), ...props })
|
|
1899
|
+
);
|
|
1900
|
+
StructuredList.displayName = "StructuredList";
|
|
1901
|
+
function CommandItem({ icon, label, description, shortcut, active, onClick, className }) {
|
|
1902
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1903
|
+
"div",
|
|
1904
|
+
{
|
|
1905
|
+
onClick,
|
|
1906
|
+
className: cn(
|
|
1907
|
+
"flex items-center gap-3 rounded-[var(--radius)] px-3 py-2 cursor-pointer transition-colors",
|
|
1908
|
+
active ? "bg-[hsl(var(--accent))] text-[hsl(var(--accent-foreground))]" : "hover:bg-[hsl(var(--accent)/0.6)]",
|
|
1909
|
+
className
|
|
1910
|
+
),
|
|
1911
|
+
children: [
|
|
1912
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-[hsl(var(--muted-foreground))] h-4 w-4 flex items-center justify-center", children: icon }),
|
|
1913
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
1914
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium truncate", children: label }),
|
|
1915
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-[hsl(var(--muted-foreground))] truncate", children: description })
|
|
1916
|
+
] }),
|
|
1917
|
+
shortcut && /* @__PURE__ */ jsxRuntime.jsx("kbd", { className: "shrink-0 pointer-events-none inline-flex h-5 items-center gap-1 rounded border border-[hsl(var(--border))] bg-[hsl(var(--muted))] px-1.5 text-[10px] font-medium text-[hsl(var(--muted-foreground))]", children: shortcut })
|
|
1918
|
+
]
|
|
1919
|
+
}
|
|
1920
|
+
);
|
|
1921
|
+
}
|
|
1922
|
+
var bannerVariants = classVarianceAuthority.cva(
|
|
1923
|
+
"relative flex items-start gap-3 rounded-lg border px-4 py-3.5 text-sm transition-all",
|
|
1924
|
+
{
|
|
1925
|
+
variants: {
|
|
1926
|
+
variant: {
|
|
1927
|
+
info: "border-blue-200/80 bg-blue-50/60 dark:border-blue-800/60 dark:bg-blue-950/30",
|
|
1928
|
+
success: "border-green-200/80 bg-green-50/60 dark:border-green-800/60 dark:bg-green-950/30",
|
|
1929
|
+
warning: "border-yellow-200/80 bg-yellow-50/60 dark:border-yellow-800/60 dark:bg-yellow-950/30",
|
|
1930
|
+
error: "border-red-200/80 bg-red-50/60 dark:border-red-800/60 dark:bg-red-950/30",
|
|
1931
|
+
neutral: "border-[hsl(var(--border))] bg-[hsl(var(--muted)/0.5)]"
|
|
1932
|
+
}
|
|
1933
|
+
},
|
|
1934
|
+
defaultVariants: { variant: "info" }
|
|
1935
|
+
}
|
|
1936
|
+
);
|
|
1937
|
+
var accentVariants = classVarianceAuthority.cva("absolute left-0 top-[12%] bottom-[12%] w-[3px] rounded-full", {
|
|
1938
|
+
variants: {
|
|
1939
|
+
variant: {
|
|
1940
|
+
info: "bg-blue-500",
|
|
1941
|
+
success: "bg-green-500",
|
|
1942
|
+
warning: "bg-yellow-500",
|
|
1943
|
+
error: "bg-red-500",
|
|
1944
|
+
neutral: "bg-[hsl(var(--foreground)/0.3)]"
|
|
1945
|
+
}
|
|
1946
|
+
},
|
|
1947
|
+
defaultVariants: { variant: "info" }
|
|
1948
|
+
});
|
|
1949
|
+
var iconVariants = classVarianceAuthority.cva("mt-0.5 h-4 w-4 shrink-0", {
|
|
1950
|
+
variants: {
|
|
1951
|
+
variant: {
|
|
1952
|
+
info: "text-blue-500 dark:text-blue-400",
|
|
1953
|
+
success: "text-green-500 dark:text-green-400",
|
|
1954
|
+
warning: "text-yellow-500 dark:text-yellow-400",
|
|
1955
|
+
error: "text-red-500 dark:text-red-400",
|
|
1956
|
+
neutral: "text-[hsl(var(--muted-foreground))]"
|
|
1957
|
+
}
|
|
1958
|
+
},
|
|
1959
|
+
defaultVariants: { variant: "info" }
|
|
1960
|
+
});
|
|
1961
|
+
var titleVariants = classVarianceAuthority.cva("font-semibold leading-snug", {
|
|
1962
|
+
variants: {
|
|
1963
|
+
variant: {
|
|
1964
|
+
info: "text-blue-900 dark:text-blue-100",
|
|
1965
|
+
success: "text-green-900 dark:text-green-100",
|
|
1966
|
+
warning: "text-yellow-900 dark:text-yellow-100",
|
|
1967
|
+
error: "text-red-900 dark:text-red-100",
|
|
1968
|
+
neutral: "text-[hsl(var(--foreground))]"
|
|
1969
|
+
}
|
|
1970
|
+
},
|
|
1971
|
+
defaultVariants: { variant: "info" }
|
|
1972
|
+
});
|
|
1973
|
+
var descriptionVariants = classVarianceAuthority.cva("mt-0.5 leading-snug opacity-80", {
|
|
1974
|
+
variants: {
|
|
1975
|
+
variant: {
|
|
1976
|
+
info: "text-blue-800 dark:text-blue-200",
|
|
1977
|
+
success: "text-green-800 dark:text-green-200",
|
|
1978
|
+
warning: "text-yellow-800 dark:text-yellow-200",
|
|
1979
|
+
error: "text-red-800 dark:text-red-200",
|
|
1980
|
+
neutral: "text-[hsl(var(--muted-foreground))]"
|
|
1981
|
+
}
|
|
1982
|
+
},
|
|
1983
|
+
defaultVariants: { variant: "info" }
|
|
1984
|
+
});
|
|
1985
|
+
var actionVariants = classVarianceAuthority.cva(
|
|
1986
|
+
"inline-flex items-center gap-1 text-xs font-medium underline-offset-2 hover:underline transition-opacity hover:opacity-80",
|
|
1987
|
+
{
|
|
1988
|
+
variants: {
|
|
1989
|
+
variant: {
|
|
1990
|
+
info: "text-blue-700 dark:text-blue-300",
|
|
1991
|
+
success: "text-green-700 dark:text-green-300",
|
|
1992
|
+
warning: "text-yellow-700 dark:text-yellow-300",
|
|
1993
|
+
error: "text-red-700 dark:text-red-300",
|
|
1994
|
+
neutral: "text-[hsl(var(--foreground))]"
|
|
1995
|
+
}
|
|
1996
|
+
},
|
|
1997
|
+
defaultVariants: { variant: "info" }
|
|
1998
|
+
}
|
|
1999
|
+
);
|
|
2000
|
+
var ICONS = {
|
|
2001
|
+
info: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Info, { className: "h-4 w-4" }),
|
|
2002
|
+
success: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, { className: "h-4 w-4" }),
|
|
2003
|
+
warning: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertTriangle, { className: "h-4 w-4" }),
|
|
2004
|
+
error: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XCircle, { className: "h-4 w-4" }),
|
|
2005
|
+
neutral: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Info, { className: "h-4 w-4" })
|
|
2006
|
+
};
|
|
2007
|
+
function Banner({
|
|
2008
|
+
variant = "info",
|
|
2009
|
+
title,
|
|
2010
|
+
description,
|
|
2011
|
+
dismissible,
|
|
2012
|
+
onDismiss,
|
|
2013
|
+
action,
|
|
2014
|
+
icon = true,
|
|
2015
|
+
className,
|
|
2016
|
+
children
|
|
2017
|
+
}) {
|
|
2018
|
+
const [dismissed, setDismissed] = React14__default.default.useState(false);
|
|
2019
|
+
const [exiting, setExiting] = React14__default.default.useState(false);
|
|
2020
|
+
const handleDismiss = () => {
|
|
2021
|
+
setExiting(true);
|
|
2022
|
+
setTimeout(() => {
|
|
2023
|
+
setDismissed(true);
|
|
2024
|
+
onDismiss?.();
|
|
2025
|
+
}, 200);
|
|
2026
|
+
};
|
|
2027
|
+
if (dismissed)
|
|
2028
|
+
return null;
|
|
2029
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2030
|
+
"div",
|
|
2031
|
+
{
|
|
2032
|
+
className: cn(
|
|
2033
|
+
bannerVariants({ variant }),
|
|
2034
|
+
"pl-[18px]",
|
|
2035
|
+
exiting && "opacity-0 translate-x-1 scale-[0.98]",
|
|
2036
|
+
"transition-all duration-200",
|
|
2037
|
+
className
|
|
2038
|
+
),
|
|
2039
|
+
children: [
|
|
2040
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: accentVariants({ variant }), "aria-hidden": true }),
|
|
2041
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: iconVariants({ variant }), children: ICONS[variant] }),
|
|
2042
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1 space-y-1", children: [
|
|
2043
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn(titleVariants({ variant }), "text-sm"), children: title }),
|
|
2044
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn(descriptionVariants({ variant }), "text-sm"), children: description }),
|
|
2045
|
+
children && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(descriptionVariants({ variant }), "text-sm"), children }),
|
|
2046
|
+
action && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2047
|
+
"button",
|
|
2048
|
+
{
|
|
2049
|
+
onClick: action.onClick,
|
|
2050
|
+
className: cn(actionVariants({ variant }), "mt-1.5"),
|
|
2051
|
+
children: [
|
|
2052
|
+
action.label,
|
|
2053
|
+
action.icon !== false && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRight, { className: "h-3 w-3" })
|
|
2054
|
+
]
|
|
2055
|
+
}
|
|
2056
|
+
)
|
|
2057
|
+
] }),
|
|
2058
|
+
dismissible && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2059
|
+
"button",
|
|
2060
|
+
{
|
|
2061
|
+
onClick: handleDismiss,
|
|
2062
|
+
"aria-label": "Dismiss",
|
|
2063
|
+
className: "shrink-0 rounded-md p-0.5 text-[hsl(var(--muted-foreground))] opacity-60 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--ring))]",
|
|
2064
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" })
|
|
2065
|
+
}
|
|
2066
|
+
)
|
|
2067
|
+
]
|
|
2068
|
+
}
|
|
2069
|
+
);
|
|
2070
|
+
}
|
|
2071
|
+
function Toaster(props) {
|
|
2072
|
+
const ctx = useBlinkUI?.();
|
|
2073
|
+
const dark = ctx?.darkMode === "dark";
|
|
2074
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2075
|
+
sonner.Toaster,
|
|
2076
|
+
{
|
|
2077
|
+
theme: dark ? "dark" : "light",
|
|
2078
|
+
position: "bottom-right",
|
|
2079
|
+
toastOptions: {
|
|
2080
|
+
classNames: {
|
|
2081
|
+
toast: [
|
|
2082
|
+
"group flex items-start gap-3 rounded-lg border px-4 py-3.5 text-sm shadow-md",
|
|
2083
|
+
"border-[hsl(var(--border))] bg-[hsl(var(--card))] text-[hsl(var(--card-foreground))]"
|
|
2084
|
+
].join(" "),
|
|
2085
|
+
title: "font-semibold text-sm leading-snug",
|
|
2086
|
+
description: "text-xs text-[hsl(var(--muted-foreground))] mt-0.5 leading-snug",
|
|
2087
|
+
actionButton: [
|
|
2088
|
+
"mt-2 inline-flex items-center gap-1 text-xs font-medium",
|
|
2089
|
+
"text-[hsl(var(--primary))] underline-offset-2 hover:underline"
|
|
2090
|
+
].join(" "),
|
|
2091
|
+
cancelButton: "mt-2 text-xs text-[hsl(var(--muted-foreground))] hover:opacity-80",
|
|
2092
|
+
closeButton: "text-[hsl(var(--muted-foreground))] opacity-60 hover:opacity-100 transition-opacity",
|
|
2093
|
+
error: "border-red-200/80 bg-red-50/60 dark:border-red-800/60 dark:bg-red-950/30",
|
|
2094
|
+
success: "border-green-200/80 bg-green-50/60 dark:border-green-800/60 dark:bg-green-950/30",
|
|
2095
|
+
warning: "border-yellow-200/80 bg-yellow-50/60 dark:border-yellow-800/60 dark:bg-yellow-950/30",
|
|
2096
|
+
info: "border-blue-200/80 bg-blue-50/60 dark:border-blue-800/60 dark:bg-blue-950/30"
|
|
2097
|
+
}
|
|
2098
|
+
},
|
|
2099
|
+
...props
|
|
2100
|
+
}
|
|
2101
|
+
);
|
|
2102
|
+
}
|
|
2103
|
+
function LoadingOverlay({ loading, text, fullPage, children, className }) {
|
|
2104
|
+
if (fullPage) {
|
|
2105
|
+
return loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm", className), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-2", children: [
|
|
2106
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-8 w-8 animate-spin text-[hsl(var(--primary))]" }),
|
|
2107
|
+
text && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-[hsl(var(--muted-foreground))]", children: text })
|
|
2108
|
+
] }) }) : null;
|
|
2109
|
+
}
|
|
2110
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", className), children: [
|
|
2111
|
+
children,
|
|
2112
|
+
loading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 z-10 flex items-center justify-center rounded-[var(--radius)] bg-[hsl(var(--background)/0.8)] backdrop-blur-[2px]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-2", children: [
|
|
2113
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-6 w-6 animate-spin text-[hsl(var(--primary))]" }),
|
|
2114
|
+
text && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: text })
|
|
2115
|
+
] }) })
|
|
2116
|
+
] });
|
|
2117
|
+
}
|
|
2118
|
+
function StepperStep({ index, current, total, title, description }) {
|
|
2119
|
+
const done = index < current;
|
|
2120
|
+
const active = index === current;
|
|
2121
|
+
const isLast = index === total - 1;
|
|
2122
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3 flex-1 min-w-0", children: [
|
|
2123
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center shrink-0", children: [
|
|
2124
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
2125
|
+
"h-8 w-8 rounded-full flex items-center justify-center border-2 text-sm font-semibold transition-colors",
|
|
2126
|
+
done && "bg-[hsl(var(--primary))] border-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))]",
|
|
2127
|
+
active && "border-[hsl(var(--primary))] text-[hsl(var(--primary))] bg-transparent",
|
|
2128
|
+
!done && !active && "border-[hsl(var(--muted-foreground)/0.4)] text-[hsl(var(--muted-foreground))] bg-transparent"
|
|
2129
|
+
), children: done ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) : index + 1 }),
|
|
2130
|
+
!isLast && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-0.5 flex-1 min-h-[16px] mt-1", done ? "bg-[hsl(var(--primary))]" : "bg-[hsl(var(--border))]") })
|
|
2131
|
+
] }),
|
|
2132
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 pb-4", children: [
|
|
2133
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-sm font-medium", active ? "text-[hsl(var(--foreground))]" : "text-[hsl(var(--muted-foreground))]"), children: title }),
|
|
2134
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-[hsl(var(--muted-foreground))] mt-0.5", children: description })
|
|
2135
|
+
] })
|
|
2136
|
+
] });
|
|
2137
|
+
}
|
|
2138
|
+
function Stepper({ currentStep, steps, className }) {
|
|
2139
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex gap-0", className), children: steps.map((step, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-start", i < steps.length - 1 && "flex-1"), children: [
|
|
2140
|
+
/* @__PURE__ */ jsxRuntime.jsx(StepperStep, { ...step, index: i, current: currentStep, total: steps.length }),
|
|
2141
|
+
i < steps.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex-1 h-0.5 mt-4 mx-2", i < currentStep ? "bg-[hsl(var(--primary))]" : "bg-[hsl(var(--border))]") })
|
|
2142
|
+
] }, i)) });
|
|
2143
|
+
}
|
|
2144
|
+
function BreadcrumbItem({ href, label, active, className }) {
|
|
2145
|
+
return /* @__PURE__ */ jsxRuntime.jsx("li", { className: cn("flex items-center", className), children: href && !active ? /* @__PURE__ */ jsxRuntime.jsx("a", { href, className: "text-sm text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] transition-colors", children: label }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-[hsl(var(--foreground))] font-medium", children: label }) });
|
|
2146
|
+
}
|
|
2147
|
+
function BreadcrumbPage({ children, className }) {
|
|
2148
|
+
return /* @__PURE__ */ jsxRuntime.jsx("li", { "aria-current": "page", className: cn("flex items-center text-sm font-medium text-[hsl(var(--foreground))]", className), children });
|
|
2149
|
+
}
|
|
2150
|
+
function BreadcrumbSeparator({ className }) {
|
|
2151
|
+
return /* @__PURE__ */ jsxRuntime.jsx("li", { role: "presentation", "aria-hidden": "true", className: cn("flex items-center text-[hsl(var(--muted-foreground))]", className), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-3.5 w-3.5" }) });
|
|
2152
|
+
}
|
|
2153
|
+
function Breadcrumb({ children, className }) {
|
|
2154
|
+
const items = React14__default.default.Children.toArray(children);
|
|
2155
|
+
const withSeparators = [];
|
|
2156
|
+
items.forEach((item, i) => {
|
|
2157
|
+
withSeparators.push(item);
|
|
2158
|
+
if (i < items.length - 1)
|
|
2159
|
+
withSeparators.push(/* @__PURE__ */ jsxRuntime.jsx(BreadcrumbSeparator, {}, `sep-${i}`));
|
|
2160
|
+
});
|
|
2161
|
+
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "breadcrumb", children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: cn("flex flex-wrap items-center gap-1", className), children: withSeparators }) });
|
|
2162
|
+
}
|
|
2163
|
+
function HotkeyBadge({ children, className }) {
|
|
2164
|
+
return /* @__PURE__ */ jsxRuntime.jsx("kbd", { className: cn(
|
|
2165
|
+
"inline-flex items-center justify-center rounded border border-[hsl(var(--border))] bg-[hsl(var(--muted))] px-1.5 py-0.5 text-[11px] font-medium text-[hsl(var(--muted-foreground))] shadow-[0_1px_0_rgba(0,0,0,0.1)] min-w-[20px] h-5",
|
|
2166
|
+
className
|
|
2167
|
+
), children });
|
|
2168
|
+
}
|
|
2169
|
+
function Hotkeys({ keys, className }) {
|
|
2170
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("inline-flex items-center gap-0.5", className), children: keys.map((key, i) => /* @__PURE__ */ jsxRuntime.jsx(HotkeyBadge, { children: key }, i)) });
|
|
2171
|
+
}
|
|
2172
|
+
var textOps = ["contains", "equals", "starts with"];
|
|
2173
|
+
var numOps = ["=", ">", "<", ">=", "<="];
|
|
2174
|
+
function AddFilterPopover({ filters, onAdd }) {
|
|
2175
|
+
const [open, setOpen] = React14__default.default.useState(false);
|
|
2176
|
+
const [key, setKey] = React14__default.default.useState("");
|
|
2177
|
+
const [op, setOp] = React14__default.default.useState("");
|
|
2178
|
+
const [val, setVal] = React14__default.default.useState("");
|
|
2179
|
+
const def = filters.find((f) => f.key === key);
|
|
2180
|
+
const ops = def?.type === "number" ? numOps : textOps;
|
|
2181
|
+
const handleAdd = () => {
|
|
2182
|
+
if (!key || !val)
|
|
2183
|
+
return;
|
|
2184
|
+
onAdd({ key, operator: op || ops[0], value: val });
|
|
2185
|
+
setKey("");
|
|
2186
|
+
setOp("");
|
|
2187
|
+
setVal("");
|
|
2188
|
+
setOpen(false);
|
|
2189
|
+
};
|
|
2190
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
2191
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "sm", className: "h-7 gap-1 text-xs", children: [
|
|
2192
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-3.5 w-3.5" }),
|
|
2193
|
+
"Add Filter"
|
|
2194
|
+
] }) }),
|
|
2195
|
+
/* @__PURE__ */ jsxRuntime.jsxs(PopoverContent, { className: "w-72 p-3 space-y-2", children: [
|
|
2196
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Select, { value: key, onValueChange: setKey, children: [
|
|
2197
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "h-8 text-xs", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, { placeholder: "Field" }) }),
|
|
2198
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: filters.map((f) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: f.key, children: f.label }, f.key)) })
|
|
2199
|
+
] }),
|
|
2200
|
+
key && /* @__PURE__ */ jsxRuntime.jsxs(Select, { value: op || ops[0], onValueChange: setOp, children: [
|
|
2201
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "h-8 text-xs", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, {}) }),
|
|
2202
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: ops.map((o) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: o, children: o }, o)) })
|
|
2203
|
+
] }),
|
|
2204
|
+
key && def?.type === "select" ? /* @__PURE__ */ jsxRuntime.jsxs(Select, { value: val, onValueChange: setVal, children: [
|
|
2205
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "h-8 text-xs", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, { placeholder: "Value" }) }),
|
|
2206
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: def.options?.map((o) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: o.value, children: o.label }, o.value)) })
|
|
2207
|
+
] }) : key && /* @__PURE__ */ jsxRuntime.jsx(Input, { type: def?.type === "number" ? "number" : def?.type === "date" ? "date" : "text", className: "h-8 text-xs", value: val, onChange: (e) => setVal(e.target.value), placeholder: "Value" }),
|
|
2208
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", className: "w-full h-7 text-xs", onClick: handleAdd, disabled: !key || !val, children: "Apply" })
|
|
2209
|
+
] })
|
|
2210
|
+
] });
|
|
2211
|
+
}
|
|
2212
|
+
function FilterBadge({ filter, def, onRemove }) {
|
|
2213
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-1 rounded-full border border-[hsl(var(--border))] bg-[hsl(var(--muted))] px-2.5 py-0.5 text-xs font-medium text-[hsl(var(--foreground))]", children: [
|
|
2214
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[hsl(var(--muted-foreground))]", children: def?.label ?? filter.key }),
|
|
2215
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: filter.operator }),
|
|
2216
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: filter.value }),
|
|
2217
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onRemove, className: "ml-0.5 rounded-full hover:text-[hsl(var(--destructive))]", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-3 w-3" }) })
|
|
2218
|
+
] });
|
|
2219
|
+
}
|
|
2220
|
+
function Filters({ filters, value, onChange, className }) {
|
|
2221
|
+
const remove = (i) => onChange(value.filter((_, idx) => idx !== i));
|
|
2222
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-wrap items-center gap-2", className), children: [
|
|
2223
|
+
value.map((fv, i) => /* @__PURE__ */ jsxRuntime.jsx(FilterBadge, { filter: fv, def: filters.find((f) => f.key === fv.key), onRemove: () => remove(i) }, i)),
|
|
2224
|
+
/* @__PURE__ */ jsxRuntime.jsx(AddFilterPopover, { filters, onAdd: (fv) => onChange([...value, fv]) })
|
|
2225
|
+
] });
|
|
2226
|
+
}
|
|
2227
|
+
function BulkActions({ count, actions, onClear, className }) {
|
|
2228
|
+
if (count === 0)
|
|
2229
|
+
return null;
|
|
2230
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("fixed bottom-6 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 rounded-full border border-[hsl(var(--border))] bg-[hsl(var(--card))] px-4 py-2 shadow-lg", className), children: [
|
|
2231
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-medium text-[hsl(var(--foreground))] pr-2 border-r border-[hsl(var(--border))]", children: [
|
|
2232
|
+
count,
|
|
2233
|
+
" selected"
|
|
2234
|
+
] }),
|
|
2235
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", children: actions.map((action, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2236
|
+
Button,
|
|
2237
|
+
{
|
|
2238
|
+
variant: action.variant === "destructive" ? "destructive" : "ghost",
|
|
2239
|
+
size: "sm",
|
|
2240
|
+
className: "h-7 gap-1.5 text-xs rounded-full px-3",
|
|
2241
|
+
onClick: action.onClick,
|
|
2242
|
+
children: [
|
|
2243
|
+
action.icon,
|
|
2244
|
+
action.label
|
|
2245
|
+
]
|
|
2246
|
+
},
|
|
2247
|
+
i
|
|
2248
|
+
)) }),
|
|
2249
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onClear, className: "ml-1 rounded-full p-0.5 text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] transition-colors", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }) })
|
|
2250
|
+
] });
|
|
2251
|
+
}
|
|
2252
|
+
function ToggleButton({ pressed, onClick, disabled, children, className }) {
|
|
2253
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2254
|
+
"button",
|
|
2255
|
+
{
|
|
2256
|
+
type: "button",
|
|
2257
|
+
"aria-pressed": pressed,
|
|
2258
|
+
disabled,
|
|
2259
|
+
onClick,
|
|
2260
|
+
className: cn(
|
|
2261
|
+
"inline-flex items-center justify-center gap-1.5 rounded-[var(--radius)] px-3 py-1.5 text-sm font-medium transition-colors border",
|
|
2262
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
2263
|
+
pressed ? "bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))] border-[hsl(var(--primary))]" : "bg-transparent text-[hsl(var(--foreground))] border-[hsl(var(--border))] hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--accent-foreground))]",
|
|
2264
|
+
className
|
|
2265
|
+
),
|
|
2266
|
+
children
|
|
2267
|
+
}
|
|
2268
|
+
);
|
|
2269
|
+
}
|
|
2270
|
+
function ToggleButtonGroup(props) {
|
|
2271
|
+
const { children, className } = props;
|
|
2272
|
+
const isPressed = (val) => props.type === "multiple" ? props.value.includes(val) : props.value === val;
|
|
2273
|
+
const handleClick = (val) => {
|
|
2274
|
+
if (props.type === "multiple") {
|
|
2275
|
+
const current = props.value;
|
|
2276
|
+
props.onChange(current.includes(val) ? current.filter((v) => v !== val) : [...current, val]);
|
|
2277
|
+
} else {
|
|
2278
|
+
props.onChange(val);
|
|
2279
|
+
}
|
|
2280
|
+
};
|
|
2281
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("inline-flex items-center gap-1 rounded-[var(--radius)] border border-[hsl(var(--border))] bg-[hsl(var(--muted)/0.4)] p-0.5", className), children: React14__default.default.Children.map(children, (child) => {
|
|
2282
|
+
if (!React14__default.default.isValidElement(child))
|
|
2283
|
+
return child;
|
|
2284
|
+
const tb = child;
|
|
2285
|
+
return React14__default.default.cloneElement(tb, {
|
|
2286
|
+
pressed: isPressed(tb.props.value),
|
|
2287
|
+
onClick: () => handleClick(tb.props.value)
|
|
2288
|
+
});
|
|
2289
|
+
}) });
|
|
2290
|
+
}
|
|
2291
|
+
function useCommandBar() {
|
|
2292
|
+
const [open, setOpen] = React14__default.default.useState(false);
|
|
2293
|
+
React14__default.default.useEffect(() => {
|
|
2294
|
+
const handler = (e) => {
|
|
2295
|
+
if ((e.metaKey || e.ctrlKey) && e.key === "k") {
|
|
2296
|
+
e.preventDefault();
|
|
2297
|
+
setOpen((o) => !o);
|
|
2298
|
+
}
|
|
2299
|
+
};
|
|
2300
|
+
window.addEventListener("keydown", handler);
|
|
2301
|
+
return () => window.removeEventListener("keydown", handler);
|
|
2302
|
+
}, []);
|
|
2303
|
+
return { open, setOpen };
|
|
2304
|
+
}
|
|
2305
|
+
function CommandBarEmpty({ children = "No results found." }) {
|
|
2306
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-6 text-center text-sm text-[hsl(var(--muted-foreground))]", children });
|
|
2307
|
+
}
|
|
2308
|
+
function CommandBarGroup({ heading, children }) {
|
|
2309
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-2 py-1", children: [
|
|
2310
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-1 px-2 text-xs font-semibold text-[hsl(var(--muted-foreground))]", children: heading }),
|
|
2311
|
+
children
|
|
2312
|
+
] });
|
|
2313
|
+
}
|
|
2314
|
+
function CommandBarItem({ icon, label, shortcut, onSelect, active, className }) {
|
|
2315
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2316
|
+
"button",
|
|
2317
|
+
{
|
|
2318
|
+
onClick: onSelect,
|
|
2319
|
+
className: cn(
|
|
2320
|
+
"flex w-full items-center gap-2.5 rounded-[var(--radius)] px-3 py-2 text-sm transition-colors",
|
|
2321
|
+
active ? "bg-[hsl(var(--accent))] text-[hsl(var(--accent-foreground))]" : "hover:bg-[hsl(var(--accent)/0.6)]",
|
|
2322
|
+
className
|
|
2323
|
+
),
|
|
2324
|
+
children: [
|
|
2325
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-4 w-4 shrink-0 text-[hsl(var(--muted-foreground))]", children: icon }),
|
|
2326
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-left truncate", children: label }),
|
|
2327
|
+
shortcut && /* @__PURE__ */ jsxRuntime.jsx("kbd", { className: "pointer-events-none shrink-0 inline-flex h-5 items-center rounded border border-[hsl(var(--border))] bg-[hsl(var(--muted))] px-1.5 text-[10px] font-medium text-[hsl(var(--muted-foreground))]", children: shortcut })
|
|
2328
|
+
]
|
|
2329
|
+
}
|
|
2330
|
+
);
|
|
2331
|
+
}
|
|
2332
|
+
function CommandBar({ open, onOpenChange, children, placeholder = "Search commands...", onSearch }) {
|
|
2333
|
+
const [query, setQuery] = React14__default.default.useState("");
|
|
2334
|
+
const handleSearch = (v) => {
|
|
2335
|
+
setQuery(v);
|
|
2336
|
+
onSearch?.(v);
|
|
2337
|
+
};
|
|
2338
|
+
const items = React14__default.default.useRef(null);
|
|
2339
|
+
const handleKeyDown = (e) => {
|
|
2340
|
+
if (e.key === "Escape") {
|
|
2341
|
+
onOpenChange(false);
|
|
2342
|
+
return;
|
|
2343
|
+
}
|
|
2344
|
+
const focusable = items.current?.querySelectorAll("button");
|
|
2345
|
+
if (!focusable?.length)
|
|
2346
|
+
return;
|
|
2347
|
+
const arr = Array.from(focusable);
|
|
2348
|
+
const idx = arr.indexOf(document.activeElement);
|
|
2349
|
+
if (e.key === "ArrowDown") {
|
|
2350
|
+
e.preventDefault();
|
|
2351
|
+
arr[(idx + 1) % arr.length]?.focus();
|
|
2352
|
+
}
|
|
2353
|
+
if (e.key === "ArrowUp") {
|
|
2354
|
+
e.preventDefault();
|
|
2355
|
+
arr[(idx - 1 + arr.length) % arr.length]?.focus();
|
|
2356
|
+
}
|
|
2357
|
+
};
|
|
2358
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "p-0 gap-0 max-w-lg overflow-hidden", onKeyDown: handleKeyDown, children: [
|
|
2359
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "sr-only", children: "Command Bar" }),
|
|
2360
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 border-b border-[hsl(var(--border))] px-4 py-3", children: [
|
|
2361
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "h-4 w-4 shrink-0 text-[hsl(var(--muted-foreground))]" }),
|
|
2362
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2363
|
+
"input",
|
|
2364
|
+
{
|
|
2365
|
+
autoFocus: true,
|
|
2366
|
+
className: "flex-1 bg-transparent text-sm outline-none placeholder:text-[hsl(var(--muted-foreground))]",
|
|
2367
|
+
placeholder,
|
|
2368
|
+
value: query,
|
|
2369
|
+
onChange: (e) => handleSearch(e.target.value)
|
|
2370
|
+
}
|
|
2371
|
+
),
|
|
2372
|
+
query && /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: () => handleSearch(""), className: "text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))]", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }) })
|
|
2373
|
+
] }),
|
|
2374
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { ref: items, className: "max-h-80 overflow-y-auto py-2", children })
|
|
2375
|
+
] }) });
|
|
2376
|
+
}
|
|
2377
|
+
function KanbanCard({ card, isDragging }) {
|
|
2378
|
+
const { attributes, listeners, setNodeRef, transform, transition } = sortable.useSortable({ id: card.id });
|
|
2379
|
+
const style = { transform: utilities.CSS.Transform.toString(transform), transition };
|
|
2380
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2381
|
+
"div",
|
|
2382
|
+
{
|
|
2383
|
+
ref: setNodeRef,
|
|
2384
|
+
style,
|
|
2385
|
+
...attributes,
|
|
2386
|
+
...listeners,
|
|
2387
|
+
className: cn("rounded-[var(--radius)] border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-3 cursor-grab active:cursor-grabbing select-none", isDragging && "shadow-lg opacity-80"),
|
|
2388
|
+
children: [
|
|
2389
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-2", children: [
|
|
2390
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-[hsl(var(--foreground))] leading-tight", children: card.title }),
|
|
2391
|
+
card.badge && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-[10px] px-1.5 py-0.5 rounded-full bg-[hsl(var(--primary)/0.1)] text-[hsl(var(--primary))] font-medium", children: card.badge })
|
|
2392
|
+
] }),
|
|
2393
|
+
card.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-[hsl(var(--muted-foreground))] line-clamp-2", children: card.description })
|
|
2394
|
+
]
|
|
2395
|
+
}
|
|
2396
|
+
);
|
|
2397
|
+
}
|
|
2398
|
+
function KanbanColumn({ column, isOver }) {
|
|
2399
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex w-64 shrink-0 flex-col gap-2 rounded-[var(--radius)] bg-[hsl(var(--muted)/0.4)] p-3 transition-colors", isOver && "bg-[hsl(var(--muted)/0.7)]"), children: [
|
|
2400
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2401
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-[hsl(var(--foreground))]", children: column.title }),
|
|
2402
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-[hsl(var(--muted-foreground))] bg-[hsl(var(--muted))] rounded-full px-2 py-0.5", children: column.cards.length })
|
|
2403
|
+
] }),
|
|
2404
|
+
/* @__PURE__ */ jsxRuntime.jsx(sortable.SortableContext, { items: column.cards.map((c) => c.id), strategy: sortable.verticalListSortingStrategy, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2 min-h-[60px]", children: column.cards.map((card) => /* @__PURE__ */ jsxRuntime.jsx(KanbanCard, { card }, card.id)) }) })
|
|
2405
|
+
] });
|
|
2406
|
+
}
|
|
2407
|
+
function Kanban({ columns: initialColumns, onMoveCard, className }) {
|
|
2408
|
+
const [cols, setCols] = React14__default.default.useState(initialColumns);
|
|
2409
|
+
const [activeCard, setActiveCard] = React14__default.default.useState(null);
|
|
2410
|
+
const [overColId, setOverColId] = React14__default.default.useState(null);
|
|
2411
|
+
const sensors = core.useSensors(core.useSensor(core.PointerSensor, { activationConstraint: { distance: 5 } }));
|
|
2412
|
+
const findColByCard = (cardId) => cols.find((c) => c.cards.some((card) => card.id === cardId));
|
|
2413
|
+
const onDragStart = ({ active }) => {
|
|
2414
|
+
const col = findColByCard(active.id);
|
|
2415
|
+
setActiveCard(col?.cards.find((c) => c.id === active.id) ?? null);
|
|
2416
|
+
};
|
|
2417
|
+
const onDragOver = ({ over }) => {
|
|
2418
|
+
if (!over) {
|
|
2419
|
+
setOverColId(null);
|
|
2420
|
+
return;
|
|
2421
|
+
}
|
|
2422
|
+
const colId = cols.find((c) => c.id === over.id)?.id ?? findColByCard(over.id)?.id ?? null;
|
|
2423
|
+
setOverColId(colId);
|
|
2424
|
+
};
|
|
2425
|
+
const onDragEnd = ({ active, over }) => {
|
|
2426
|
+
setActiveCard(null);
|
|
2427
|
+
setOverColId(null);
|
|
2428
|
+
if (!over || active.id === over.id)
|
|
2429
|
+
return;
|
|
2430
|
+
const fromCol = findColByCard(active.id);
|
|
2431
|
+
const toCol = cols.find((c) => c.id === over.id) ?? findColByCard(over.id);
|
|
2432
|
+
if (!fromCol || !toCol || fromCol.id === toCol.id)
|
|
2433
|
+
return;
|
|
2434
|
+
const card = fromCol.cards.find((c) => c.id === active.id);
|
|
2435
|
+
setCols((prev) => prev.map((c) => {
|
|
2436
|
+
if (c.id === fromCol.id)
|
|
2437
|
+
return { ...c, cards: c.cards.filter((card2) => card2.id !== active.id) };
|
|
2438
|
+
if (c.id === toCol.id)
|
|
2439
|
+
return { ...c, cards: [...c.cards, card] };
|
|
2440
|
+
return c;
|
|
2441
|
+
}));
|
|
2442
|
+
onMoveCard?.(active.id, fromCol.id, toCol.id);
|
|
2443
|
+
};
|
|
2444
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(core.DndContext, { sensors, onDragStart, onDragOver, onDragEnd, children: [
|
|
2445
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex gap-4 overflow-x-auto pb-4", className), children: cols.map((col) => /* @__PURE__ */ jsxRuntime.jsx(KanbanColumn, { column: col, isOver: overColId === col.id }, col.id)) }),
|
|
2446
|
+
/* @__PURE__ */ jsxRuntime.jsx(core.DragOverlay, { children: activeCard && /* @__PURE__ */ jsxRuntime.jsx(KanbanCard, { card: activeCard, isDragging: true }) })
|
|
2447
|
+
] });
|
|
2448
|
+
}
|
|
2449
|
+
var DEFAULT_COLORS = [
|
|
2450
|
+
"hsl(var(--primary))",
|
|
2451
|
+
"hsl(217 91% 60%)",
|
|
2452
|
+
"hsl(142 71% 45%)",
|
|
2453
|
+
"hsl(38 92% 50%)",
|
|
2454
|
+
"hsl(280 65% 60%)"
|
|
2455
|
+
];
|
|
2456
|
+
function AreaChart({
|
|
2457
|
+
data,
|
|
2458
|
+
dataKey,
|
|
2459
|
+
xAxisKey = "name",
|
|
2460
|
+
height = 300,
|
|
2461
|
+
colors = DEFAULT_COLORS,
|
|
2462
|
+
showGrid = true,
|
|
2463
|
+
showTooltip = true,
|
|
2464
|
+
showLegend = false,
|
|
2465
|
+
curved = true,
|
|
2466
|
+
className
|
|
2467
|
+
}) {
|
|
2468
|
+
const keys = Array.isArray(dataKey) ? dataKey : [dataKey];
|
|
2469
|
+
const curve = curved ? "monotone" : "linear";
|
|
2470
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxRuntime.jsxs(recharts.AreaChart, { data, margin: { top: 4, right: 4, left: -20, bottom: 0 }, children: [
|
|
2471
|
+
showGrid && /* @__PURE__ */ jsxRuntime.jsx(recharts.CartesianGrid, { strokeDasharray: "3 3", stroke: "hsl(var(--border))" }),
|
|
2472
|
+
/* @__PURE__ */ jsxRuntime.jsx(recharts.XAxis, { dataKey: xAxisKey, tick: { fontSize: 12, fill: "hsl(var(--muted-foreground))" }, axisLine: false, tickLine: false }),
|
|
2473
|
+
/* @__PURE__ */ jsxRuntime.jsx(recharts.YAxis, { tick: { fontSize: 12, fill: "hsl(var(--muted-foreground))" }, axisLine: false, tickLine: false }),
|
|
2474
|
+
showTooltip && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2475
|
+
recharts.Tooltip,
|
|
2476
|
+
{
|
|
2477
|
+
contentStyle: {
|
|
2478
|
+
background: "hsl(var(--card))",
|
|
2479
|
+
border: "1px solid hsl(var(--border))",
|
|
2480
|
+
borderRadius: "var(--radius)",
|
|
2481
|
+
fontSize: 12
|
|
2482
|
+
}
|
|
2483
|
+
}
|
|
2484
|
+
),
|
|
2485
|
+
showLegend && /* @__PURE__ */ jsxRuntime.jsx(recharts.Legend, { wrapperStyle: { fontSize: 12 } }),
|
|
2486
|
+
keys.map((key, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2487
|
+
recharts.Area,
|
|
2488
|
+
{
|
|
2489
|
+
type: curve,
|
|
2490
|
+
dataKey: key,
|
|
2491
|
+
stroke: colors[i % colors.length],
|
|
2492
|
+
fill: colors[i % colors.length],
|
|
2493
|
+
fillOpacity: 0.15,
|
|
2494
|
+
strokeWidth: 2
|
|
2495
|
+
},
|
|
2496
|
+
key
|
|
2497
|
+
))
|
|
2498
|
+
] }) }) });
|
|
2499
|
+
}
|
|
2500
|
+
var DEFAULT_COLORS2 = [
|
|
2501
|
+
"hsl(var(--primary))",
|
|
2502
|
+
"hsl(217 91% 60%)",
|
|
2503
|
+
"hsl(142 71% 45%)",
|
|
2504
|
+
"hsl(38 92% 50%)",
|
|
2505
|
+
"hsl(280 65% 60%)"
|
|
2506
|
+
];
|
|
2507
|
+
function BarChart({
|
|
2508
|
+
data,
|
|
2509
|
+
dataKey,
|
|
2510
|
+
xAxisKey = "name",
|
|
2511
|
+
height = 300,
|
|
2512
|
+
colors = DEFAULT_COLORS2,
|
|
2513
|
+
showGrid = true,
|
|
2514
|
+
showTooltip = true,
|
|
2515
|
+
showLegend = false,
|
|
2516
|
+
layout = "horizontal",
|
|
2517
|
+
stacked = false,
|
|
2518
|
+
className
|
|
2519
|
+
}) {
|
|
2520
|
+
const keys = Array.isArray(dataKey) ? dataKey : [dataKey];
|
|
2521
|
+
const isVertical = layout === "vertical";
|
|
2522
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxRuntime.jsxs(recharts.BarChart, { data, layout, margin: { top: 4, right: 4, left: -20, bottom: 0 }, children: [
|
|
2523
|
+
showGrid && /* @__PURE__ */ jsxRuntime.jsx(recharts.CartesianGrid, { strokeDasharray: "3 3", stroke: "hsl(var(--border))" }),
|
|
2524
|
+
isVertical ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2525
|
+
/* @__PURE__ */ jsxRuntime.jsx(recharts.XAxis, { type: "number", tick: { fontSize: 12, fill: "hsl(var(--muted-foreground))" }, axisLine: false, tickLine: false }),
|
|
2526
|
+
/* @__PURE__ */ jsxRuntime.jsx(recharts.YAxis, { type: "category", dataKey: xAxisKey, tick: { fontSize: 12, fill: "hsl(var(--muted-foreground))" }, axisLine: false, tickLine: false })
|
|
2527
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2528
|
+
/* @__PURE__ */ jsxRuntime.jsx(recharts.XAxis, { dataKey: xAxisKey, tick: { fontSize: 12, fill: "hsl(var(--muted-foreground))" }, axisLine: false, tickLine: false }),
|
|
2529
|
+
/* @__PURE__ */ jsxRuntime.jsx(recharts.YAxis, { tick: { fontSize: 12, fill: "hsl(var(--muted-foreground))" }, axisLine: false, tickLine: false })
|
|
2530
|
+
] }),
|
|
2531
|
+
showTooltip && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2532
|
+
recharts.Tooltip,
|
|
2533
|
+
{
|
|
2534
|
+
contentStyle: {
|
|
2535
|
+
background: "hsl(var(--card))",
|
|
2536
|
+
border: "1px solid hsl(var(--border))",
|
|
2537
|
+
borderRadius: "var(--radius)",
|
|
2538
|
+
fontSize: 12
|
|
2539
|
+
}
|
|
2540
|
+
}
|
|
2541
|
+
),
|
|
2542
|
+
showLegend && /* @__PURE__ */ jsxRuntime.jsx(recharts.Legend, { wrapperStyle: { fontSize: 12 } }),
|
|
2543
|
+
keys.map((key, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2544
|
+
recharts.Bar,
|
|
2545
|
+
{
|
|
2546
|
+
dataKey: key,
|
|
2547
|
+
fill: colors[i % colors.length],
|
|
2548
|
+
radius: isVertical ? [0, 4, 4, 0] : [4, 4, 0, 0],
|
|
2549
|
+
stackId: stacked ? "stack" : void 0
|
|
2550
|
+
},
|
|
2551
|
+
key
|
|
2552
|
+
))
|
|
2553
|
+
] }) }) });
|
|
2554
|
+
}
|
|
2555
|
+
var DEFAULT_COLORS3 = [
|
|
2556
|
+
"hsl(var(--primary))",
|
|
2557
|
+
"hsl(217 91% 60%)",
|
|
2558
|
+
"hsl(142 71% 45%)",
|
|
2559
|
+
"hsl(38 92% 50%)",
|
|
2560
|
+
"hsl(280 65% 60%)"
|
|
2561
|
+
];
|
|
2562
|
+
function LineChart({
|
|
2563
|
+
data,
|
|
2564
|
+
dataKey,
|
|
2565
|
+
xAxisKey = "name",
|
|
2566
|
+
height = 300,
|
|
2567
|
+
colors = DEFAULT_COLORS3,
|
|
2568
|
+
showGrid = true,
|
|
2569
|
+
showTooltip = true,
|
|
2570
|
+
showLegend = false,
|
|
2571
|
+
curved = true,
|
|
2572
|
+
dotted = false,
|
|
2573
|
+
strokeWidth = 2,
|
|
2574
|
+
className
|
|
2575
|
+
}) {
|
|
2576
|
+
const keys = Array.isArray(dataKey) ? dataKey : [dataKey];
|
|
2577
|
+
const curve = curved ? "monotone" : "linear";
|
|
2578
|
+
const dash = dotted ? "4 4" : void 0;
|
|
2579
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxRuntime.jsxs(recharts.LineChart, { data, margin: { top: 4, right: 4, left: -20, bottom: 0 }, children: [
|
|
2580
|
+
showGrid && /* @__PURE__ */ jsxRuntime.jsx(recharts.CartesianGrid, { strokeDasharray: "3 3", stroke: "hsl(var(--border))" }),
|
|
2581
|
+
/* @__PURE__ */ jsxRuntime.jsx(recharts.XAxis, { dataKey: xAxisKey, tick: { fontSize: 12, fill: "hsl(var(--muted-foreground))" }, axisLine: false, tickLine: false }),
|
|
2582
|
+
/* @__PURE__ */ jsxRuntime.jsx(recharts.YAxis, { tick: { fontSize: 12, fill: "hsl(var(--muted-foreground))" }, axisLine: false, tickLine: false }),
|
|
2583
|
+
showTooltip && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2584
|
+
recharts.Tooltip,
|
|
2585
|
+
{
|
|
2586
|
+
contentStyle: {
|
|
2587
|
+
background: "hsl(var(--card))",
|
|
2588
|
+
border: "1px solid hsl(var(--border))",
|
|
2589
|
+
borderRadius: "var(--radius)",
|
|
2590
|
+
fontSize: 12
|
|
2591
|
+
}
|
|
2592
|
+
}
|
|
2593
|
+
),
|
|
2594
|
+
showLegend && /* @__PURE__ */ jsxRuntime.jsx(recharts.Legend, { wrapperStyle: { fontSize: 12 } }),
|
|
2595
|
+
keys.map((key, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2596
|
+
recharts.Line,
|
|
2597
|
+
{
|
|
2598
|
+
type: curve,
|
|
2599
|
+
dataKey: key,
|
|
2600
|
+
stroke: colors[i % colors.length],
|
|
2601
|
+
strokeWidth,
|
|
2602
|
+
strokeDasharray: dash,
|
|
2603
|
+
dot: false,
|
|
2604
|
+
activeDot: { r: 4 }
|
|
2605
|
+
},
|
|
2606
|
+
key
|
|
2607
|
+
))
|
|
2608
|
+
] }) }) });
|
|
2609
|
+
}
|
|
2610
|
+
function buildPath(data, w, h) {
|
|
2611
|
+
if (data.length < 2)
|
|
2612
|
+
return "";
|
|
2613
|
+
const min = Math.min(...data);
|
|
2614
|
+
const max = Math.max(...data);
|
|
2615
|
+
const range = max - min || 1;
|
|
2616
|
+
const pad = 2;
|
|
2617
|
+
const points = data.map((v, i) => {
|
|
2618
|
+
const x = pad + i / (data.length - 1) * (w - pad * 2);
|
|
2619
|
+
const y = pad + (1 - (v - min) / range) * (h - pad * 2);
|
|
2620
|
+
return `${x},${y}`;
|
|
2621
|
+
});
|
|
2622
|
+
return `M ${points.join(" L ")}`;
|
|
2623
|
+
}
|
|
2624
|
+
function Sparkline({
|
|
2625
|
+
data,
|
|
2626
|
+
type = "line",
|
|
2627
|
+
color = "hsl(var(--primary))",
|
|
2628
|
+
height = 32,
|
|
2629
|
+
width = 100,
|
|
2630
|
+
className
|
|
2631
|
+
}) {
|
|
2632
|
+
const path = buildPath(data, width, height);
|
|
2633
|
+
if (!path)
|
|
2634
|
+
return null;
|
|
2635
|
+
const min = Math.min(...data);
|
|
2636
|
+
const max = Math.max(...data);
|
|
2637
|
+
const range = max - min || 1;
|
|
2638
|
+
const pad = 2;
|
|
2639
|
+
const lastY = pad + (1 - (data[data.length - 1] - min) / range) * (height - pad * 2);
|
|
2640
|
+
const areaPath = type === "area" ? `${path} L ${width - pad},${height - pad} L ${pad},${height - pad} Z` : void 0;
|
|
2641
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2642
|
+
"svg",
|
|
2643
|
+
{
|
|
2644
|
+
width,
|
|
2645
|
+
height,
|
|
2646
|
+
viewBox: `0 0 ${width} ${height}`,
|
|
2647
|
+
className,
|
|
2648
|
+
style: { display: "inline-block", verticalAlign: "middle" },
|
|
2649
|
+
children: [
|
|
2650
|
+
type === "area" && areaPath && /* @__PURE__ */ jsxRuntime.jsx("path", { d: areaPath, fill: color, fillOpacity: 0.15, stroke: "none" }),
|
|
2651
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: path, fill: "none", stroke: color, strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
2652
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: width - pad, cy: lastY, r: 2, fill: color })
|
|
2653
|
+
]
|
|
2654
|
+
}
|
|
2655
|
+
);
|
|
2656
|
+
}
|
|
2657
|
+
var colorMap2 = {
|
|
2658
|
+
primary: "bg-[hsl(var(--primary))]",
|
|
2659
|
+
success: "bg-green-500",
|
|
2660
|
+
warning: "bg-yellow-500",
|
|
2661
|
+
error: "bg-red-500"
|
|
2662
|
+
};
|
|
2663
|
+
var sizeMap4 = {
|
|
2664
|
+
sm: "h-1.5 w-1.5",
|
|
2665
|
+
md: "h-2.5 w-2.5",
|
|
2666
|
+
lg: "h-3.5 w-3.5"
|
|
2667
|
+
};
|
|
2668
|
+
function BeaconDot({ color = "primary", size = "md" }) {
|
|
2669
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative flex", children: [
|
|
2670
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("animate-ping absolute inline-flex h-full w-full rounded-full opacity-75", colorMap2[color]) }),
|
|
2671
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("relative inline-flex rounded-full", sizeMap4[size], colorMap2[color]) })
|
|
2672
|
+
] });
|
|
2673
|
+
}
|
|
2674
|
+
function Beacon({ color = "primary", size = "md", children, className }) {
|
|
2675
|
+
if (!children) {
|
|
2676
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("inline-flex", className), children: /* @__PURE__ */ jsxRuntime.jsx(BeaconDot, { color, size }) });
|
|
2677
|
+
}
|
|
2678
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("relative inline-flex", className), children: [
|
|
2679
|
+
children,
|
|
2680
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -top-1 -right-1 flex", children: /* @__PURE__ */ jsxRuntime.jsx(BeaconDot, { color, size }) })
|
|
2681
|
+
] });
|
|
2682
|
+
}
|
|
2683
|
+
var TourContext = React14.createContext(null);
|
|
2684
|
+
function useTour() {
|
|
2685
|
+
const ctx = React14.useContext(TourContext);
|
|
2686
|
+
if (!ctx)
|
|
2687
|
+
throw new Error("useTour must be used within <Tour>");
|
|
2688
|
+
return ctx;
|
|
2689
|
+
}
|
|
2690
|
+
function Tour({ totalSteps, children }) {
|
|
2691
|
+
const [currentStep, setCurrentStep] = React14.useState(0);
|
|
2692
|
+
const [isActive, setIsActive] = React14.useState(false);
|
|
2693
|
+
const stop = React14.useCallback(() => setIsActive(false), []);
|
|
2694
|
+
const start = React14.useCallback(() => {
|
|
2695
|
+
setCurrentStep(0);
|
|
2696
|
+
setIsActive(true);
|
|
2697
|
+
}, []);
|
|
2698
|
+
const next = React14.useCallback(() => setCurrentStep((s) => Math.min(s + 1, totalSteps - 1)), [totalSteps]);
|
|
2699
|
+
const prev = React14.useCallback(() => setCurrentStep((s) => Math.max(s - 1, 0)), []);
|
|
2700
|
+
const goTo = React14.useCallback((step) => setCurrentStep(Math.max(0, Math.min(step, totalSteps - 1))), [totalSteps]);
|
|
2701
|
+
React14.useEffect(() => {
|
|
2702
|
+
if (!isActive)
|
|
2703
|
+
return;
|
|
2704
|
+
const onKey = (e) => {
|
|
2705
|
+
if (e.key === "Escape")
|
|
2706
|
+
stop();
|
|
2707
|
+
if (e.key === "ArrowRight")
|
|
2708
|
+
next();
|
|
2709
|
+
if (e.key === "ArrowLeft")
|
|
2710
|
+
prev();
|
|
2711
|
+
};
|
|
2712
|
+
window.addEventListener("keydown", onKey);
|
|
2713
|
+
return () => window.removeEventListener("keydown", onKey);
|
|
2714
|
+
}, [isActive, stop, next, prev]);
|
|
2715
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TourContext.Provider, { value: { currentStep, totalSteps, isActive, start, stop, next, prev, goTo }, children });
|
|
2716
|
+
}
|
|
2717
|
+
var placementClasses = {
|
|
2718
|
+
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
2719
|
+
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
2720
|
+
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
2721
|
+
right: "left-full top-1/2 -translate-y-1/2 ml-2"
|
|
2722
|
+
};
|
|
2723
|
+
function TourStep({ step, title, description, placement = "bottom", children }) {
|
|
2724
|
+
const { currentStep, isActive, stop, next, prev, totalSteps } = useTour();
|
|
2725
|
+
const active = isActive && currentStep === step;
|
|
2726
|
+
const isLast = step === totalSteps - 1;
|
|
2727
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative inline-block", children: [
|
|
2728
|
+
active && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2729
|
+
"span",
|
|
2730
|
+
{
|
|
2731
|
+
className: "fixed inset-0 z-40 pointer-events-none",
|
|
2732
|
+
style: { boxShadow: "0 0 0 9999px rgba(0,0,0,0.5)" }
|
|
2733
|
+
}
|
|
2734
|
+
),
|
|
2735
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("relative", active && "z-50 ring-2 ring-[hsl(var(--primary))] ring-offset-2 rounded-[var(--radius)]"), children }),
|
|
2736
|
+
active && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("absolute z-50 w-64 rounded-[var(--radius)] border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-4 shadow-lg", placementClasses[placement]), children: [
|
|
2737
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-semibold text-sm mb-1", children: title }),
|
|
2738
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-[hsl(var(--muted-foreground))] mb-3", children: description }),
|
|
2739
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
2740
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: [
|
|
2741
|
+
step + 1,
|
|
2742
|
+
" / ",
|
|
2743
|
+
totalSteps
|
|
2744
|
+
] }),
|
|
2745
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-1.5", children: [
|
|
2746
|
+
step > 0 && /* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", variant: "outline", onClick: prev, children: "Back" }),
|
|
2747
|
+
isLast ? /* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", onClick: stop, children: "Done" }) : /* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", onClick: next, children: "Next" })
|
|
2748
|
+
] })
|
|
2749
|
+
] })
|
|
2750
|
+
] })
|
|
2751
|
+
] });
|
|
2752
|
+
}
|
|
2753
|
+
var NAV_ITEMS = [
|
|
2754
|
+
{ icon: lucideReact.LayoutDashboard, label: "Dashboard", active: true },
|
|
2755
|
+
{ icon: lucideReact.FolderOpen, label: "Projects" },
|
|
2756
|
+
{ icon: lucideReact.Users, label: "Team" },
|
|
2757
|
+
{ icon: lucideReact.Settings, label: "Settings" }
|
|
2758
|
+
];
|
|
2759
|
+
function NavItem({ icon: Icon2, label, active }) {
|
|
2760
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("button", { className: cn(
|
|
2761
|
+
"flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors",
|
|
2762
|
+
active ? "bg-[hsl(var(--accent))] text-[hsl(var(--accent-foreground))] font-medium" : "text-[hsl(var(--muted-foreground))] hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--accent-foreground))]"
|
|
2763
|
+
), children: [
|
|
2764
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "h-4 w-4 shrink-0" }),
|
|
2765
|
+
label
|
|
2766
|
+
] });
|
|
2767
|
+
}
|
|
2768
|
+
function SidebarLayoutMinimal({
|
|
2769
|
+
brandName = "Acme Inc",
|
|
2770
|
+
pageTitle = "Dashboard",
|
|
2771
|
+
children,
|
|
2772
|
+
className
|
|
2773
|
+
}) {
|
|
2774
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex h-[600px] overflow-hidden rounded-[var(--radius)] border border-[hsl(var(--border))] bg-[hsl(var(--background))]", className), children: [
|
|
2775
|
+
/* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "flex w-60 flex-col border-r border-[hsl(var(--border))] bg-[hsl(var(--card))]", children: [
|
|
2776
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-14 items-center px-4 font-semibold text-sm", children: brandName }),
|
|
2777
|
+
/* @__PURE__ */ jsxRuntime.jsx(Separator4, {}),
|
|
2778
|
+
/* @__PURE__ */ jsxRuntime.jsx("nav", { className: "flex-1 space-y-0.5 p-2", children: NAV_ITEMS.map((item) => /* @__PURE__ */ jsxRuntime.jsx(NavItem, { ...item }, item.label)) }),
|
|
2779
|
+
/* @__PURE__ */ jsxRuntime.jsx(Separator4, {}),
|
|
2780
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 p-4", children: [
|
|
2781
|
+
/* @__PURE__ */ jsxRuntime.jsx(Avatar, { className: "h-8 w-8", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { className: "text-xs", children: "JD" }) }),
|
|
2782
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
2783
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-sm font-medium", children: "Jane Doe" }),
|
|
2784
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs text-[hsl(var(--muted-foreground))]", children: "jane@acme.com" })
|
|
2785
|
+
] })
|
|
2786
|
+
] })
|
|
2787
|
+
] }),
|
|
2788
|
+
/* @__PURE__ */ jsxRuntime.jsxs("main", { className: "flex flex-1 flex-col overflow-auto", children: [
|
|
2789
|
+
/* @__PURE__ */ jsxRuntime.jsx("header", { className: "flex h-14 items-center border-b border-[hsl(var(--border))] px-6", children: /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-sm font-semibold", children: pageTitle }) }),
|
|
2790
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 p-6 text-sm text-[hsl(var(--muted-foreground))]", children: children ?? "Page content goes here." })
|
|
2791
|
+
] })
|
|
2792
|
+
] });
|
|
2793
|
+
}
|
|
2794
|
+
var NAV_GROUPS = [
|
|
2795
|
+
{
|
|
2796
|
+
label: "Main",
|
|
2797
|
+
items: [{ icon: lucideReact.LayoutDashboard, label: "Dashboard", active: true }, { icon: lucideReact.BarChart2, label: "Analytics" }]
|
|
2798
|
+
},
|
|
2799
|
+
{
|
|
2800
|
+
label: "Management",
|
|
2801
|
+
items: [{ icon: lucideReact.FolderOpen, label: "Projects" }, { icon: lucideReact.Users, label: "Team" }, { icon: lucideReact.CreditCard, label: "Billing" }]
|
|
2802
|
+
},
|
|
2803
|
+
{
|
|
2804
|
+
label: "Account",
|
|
2805
|
+
items: [{ icon: lucideReact.Settings, label: "Settings" }, { icon: lucideReact.HelpCircle, label: "Help" }]
|
|
2806
|
+
}
|
|
2807
|
+
];
|
|
2808
|
+
function NavItem2({ icon: Icon2, label, active }) {
|
|
2809
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("button", { className: cn(
|
|
2810
|
+
"flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors",
|
|
2811
|
+
active ? "bg-[hsl(var(--accent))] text-[hsl(var(--accent-foreground))] font-medium" : "text-[hsl(var(--muted-foreground))] hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--accent-foreground))]"
|
|
2812
|
+
), children: [
|
|
2813
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "h-4 w-4 shrink-0" }),
|
|
2814
|
+
label
|
|
2815
|
+
] });
|
|
2816
|
+
}
|
|
2817
|
+
function SidebarLayoutGroups({
|
|
2818
|
+
brandName = "Acme Inc",
|
|
2819
|
+
pageTitle = "Dashboard",
|
|
2820
|
+
children,
|
|
2821
|
+
className
|
|
2822
|
+
}) {
|
|
2823
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex h-[600px] overflow-hidden rounded-[var(--radius)] border border-[hsl(var(--border))] bg-[hsl(var(--background))]", className), children: [
|
|
2824
|
+
/* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "flex w-60 flex-col border-r border-[hsl(var(--border))] bg-[hsl(var(--card))]", children: [
|
|
2825
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-14 items-center px-4 font-semibold text-sm", children: brandName }),
|
|
2826
|
+
/* @__PURE__ */ jsxRuntime.jsx(Separator4, {}),
|
|
2827
|
+
/* @__PURE__ */ jsxRuntime.jsx("nav", { className: "flex-1 overflow-auto p-2 space-y-4", children: NAV_GROUPS.map((group) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2828
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-1 px-3 text-[10px] font-semibold uppercase tracking-wider text-[hsl(var(--muted-foreground))]", children: group.label }),
|
|
2829
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0.5", children: group.items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(NavItem2, { ...item }, item.label)) })
|
|
2830
|
+
] }, group.label)) })
|
|
2831
|
+
] }),
|
|
2832
|
+
/* @__PURE__ */ jsxRuntime.jsxs("main", { className: "flex flex-1 flex-col overflow-auto", children: [
|
|
2833
|
+
/* @__PURE__ */ jsxRuntime.jsx("header", { className: "flex h-14 items-center border-b border-[hsl(var(--border))] px-6", children: /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-sm font-semibold", children: pageTitle }) }),
|
|
2834
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 p-6 text-sm text-[hsl(var(--muted-foreground))]", children: children ?? "Page content goes here." })
|
|
2835
|
+
] })
|
|
2836
|
+
] });
|
|
2837
|
+
}
|
|
2838
|
+
var NAV_ITEMS2 = [
|
|
2839
|
+
{ icon: lucideReact.LayoutDashboard, label: "Dashboard", active: true },
|
|
2840
|
+
{ icon: lucideReact.FolderOpen, label: "Projects" },
|
|
2841
|
+
{ icon: lucideReact.Users, label: "Team" },
|
|
2842
|
+
{ icon: lucideReact.Bell, label: "Notifications", badge: "3" },
|
|
2843
|
+
{ icon: lucideReact.Settings, label: "Settings" }
|
|
2844
|
+
];
|
|
2845
|
+
function NavItem3({ icon: Icon2, label, active, badge }) {
|
|
2846
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("button", { className: cn(
|
|
2847
|
+
"flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors",
|
|
2848
|
+
active ? "bg-[hsl(var(--accent))] text-[hsl(var(--accent-foreground))] font-medium" : "text-[hsl(var(--muted-foreground))] hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--accent-foreground))]"
|
|
2849
|
+
), children: [
|
|
2850
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "h-4 w-4 shrink-0" }),
|
|
2851
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-left", children: label }),
|
|
2852
|
+
badge && /* @__PURE__ */ jsxRuntime.jsx(Badge, { className: "text-[10px] px-1.5 py-0.5 shrink-0", children: badge })
|
|
2853
|
+
] });
|
|
2854
|
+
}
|
|
2855
|
+
function SidebarLayoutUser({
|
|
2856
|
+
userName = "Jane Doe",
|
|
2857
|
+
userEmail = "jane@acme.com",
|
|
2858
|
+
userRole = "Admin",
|
|
2859
|
+
pageTitle = "Dashboard",
|
|
2860
|
+
children,
|
|
2861
|
+
className
|
|
2862
|
+
}) {
|
|
2863
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex h-[600px] overflow-hidden rounded-[var(--radius)] border border-[hsl(var(--border))] bg-[hsl(var(--background))]", className), children: [
|
|
2864
|
+
/* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "flex w-60 flex-col border-r border-[hsl(var(--border))] bg-[hsl(var(--card))]", children: [
|
|
2865
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 rounded-[var(--radius)] bg-[hsl(var(--accent))] p-3", children: [
|
|
2866
|
+
/* @__PURE__ */ jsxRuntime.jsx(Avatar, { className: "h-9 w-9", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { className: "text-xs", children: userName.slice(0, 2).toUpperCase() }) }),
|
|
2867
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
2868
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-sm font-semibold", children: userName }),
|
|
2869
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs text-[hsl(var(--muted-foreground))]", children: userRole })
|
|
2870
|
+
] })
|
|
2871
|
+
] }) }),
|
|
2872
|
+
/* @__PURE__ */ jsxRuntime.jsx(Separator4, {}),
|
|
2873
|
+
/* @__PURE__ */ jsxRuntime.jsx("nav", { className: "flex-1 space-y-0.5 p-2", children: NAV_ITEMS2.map((item) => /* @__PURE__ */ jsxRuntime.jsx(NavItem3, { ...item }, item.label)) }),
|
|
2874
|
+
/* @__PURE__ */ jsxRuntime.jsx(Separator4, {}),
|
|
2875
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "p-4 text-xs text-[hsl(var(--muted-foreground))] truncate", children: userEmail })
|
|
2876
|
+
] }),
|
|
2877
|
+
/* @__PURE__ */ jsxRuntime.jsxs("main", { className: "flex flex-1 flex-col overflow-auto", children: [
|
|
2878
|
+
/* @__PURE__ */ jsxRuntime.jsx("header", { className: "flex h-14 items-center border-b border-[hsl(var(--border))] px-6", children: /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-sm font-semibold", children: pageTitle }) }),
|
|
2879
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 p-6 text-sm text-[hsl(var(--muted-foreground))]", children: children ?? "Page content goes here." })
|
|
2880
|
+
] })
|
|
2881
|
+
] });
|
|
2882
|
+
}
|
|
2883
|
+
var ALL_ITEMS = [
|
|
2884
|
+
{ icon: lucideReact.LayoutDashboard, label: "Dashboard", active: true },
|
|
2885
|
+
{ icon: lucideReact.BarChart2, label: "Analytics" },
|
|
2886
|
+
{ icon: lucideReact.FolderOpen, label: "Projects" },
|
|
2887
|
+
{ icon: lucideReact.Users, label: "Team" },
|
|
2888
|
+
{ icon: lucideReact.Bell, label: "Notifications" },
|
|
2889
|
+
{ icon: lucideReact.Settings, label: "Settings" }
|
|
2890
|
+
];
|
|
2891
|
+
function NavItem4({ icon: Icon2, label, active }) {
|
|
2892
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("button", { className: cn(
|
|
2893
|
+
"flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors",
|
|
2894
|
+
active ? "bg-[hsl(var(--accent))] text-[hsl(var(--accent-foreground))] font-medium" : "text-[hsl(var(--muted-foreground))] hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--accent-foreground))]"
|
|
2895
|
+
), children: [
|
|
2896
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "h-4 w-4 shrink-0" }),
|
|
2897
|
+
label
|
|
2898
|
+
] });
|
|
2899
|
+
}
|
|
2900
|
+
function SidebarLayoutSearch({
|
|
2901
|
+
brandName = "Acme Inc",
|
|
2902
|
+
pageTitle = "Dashboard",
|
|
2903
|
+
children,
|
|
2904
|
+
className
|
|
2905
|
+
}) {
|
|
2906
|
+
const [query, setQuery] = React14.useState("");
|
|
2907
|
+
const filtered = ALL_ITEMS.filter((i) => i.label.toLowerCase().includes(query.toLowerCase()));
|
|
2908
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex h-[600px] overflow-hidden rounded-[var(--radius)] border border-[hsl(var(--border))] bg-[hsl(var(--background))]", className), children: [
|
|
2909
|
+
/* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "flex w-60 flex-col border-r border-[hsl(var(--border))] bg-[hsl(var(--card))]", children: [
|
|
2910
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-14 items-center px-4 font-semibold text-sm", children: brandName }),
|
|
2911
|
+
/* @__PURE__ */ jsxRuntime.jsx(Separator4, {}),
|
|
2912
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2913
|
+
Input,
|
|
2914
|
+
{
|
|
2915
|
+
placeholder: "Search...",
|
|
2916
|
+
value: query,
|
|
2917
|
+
onChange: (e) => setQuery(e.target.value),
|
|
2918
|
+
className: "h-8 text-sm"
|
|
2919
|
+
}
|
|
2920
|
+
) }),
|
|
2921
|
+
/* @__PURE__ */ jsxRuntime.jsx("nav", { className: "flex-1 space-y-0.5 overflow-auto p-2", children: filtered.length > 0 ? filtered.map((item) => /* @__PURE__ */ jsxRuntime.jsx(NavItem4, { ...item }, item.label)) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-3 py-2 text-xs text-[hsl(var(--muted-foreground))]", children: "No results" }) })
|
|
2922
|
+
] }),
|
|
2923
|
+
/* @__PURE__ */ jsxRuntime.jsxs("main", { className: "flex flex-1 flex-col overflow-auto", children: [
|
|
2924
|
+
/* @__PURE__ */ jsxRuntime.jsx("header", { className: "flex h-14 items-center border-b border-[hsl(var(--border))] px-6", children: /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-sm font-semibold", children: pageTitle }) }),
|
|
2925
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 p-6 text-sm text-[hsl(var(--muted-foreground))]", children: children ?? "Page content goes here." })
|
|
2926
|
+
] })
|
|
2927
|
+
] });
|
|
2928
|
+
}
|
|
2929
|
+
var NAV_ITEMS3 = [
|
|
2930
|
+
{ icon: lucideReact.LayoutDashboard, label: "Dashboard", active: true },
|
|
2931
|
+
{ icon: lucideReact.FolderOpen, label: "Projects" },
|
|
2932
|
+
{ icon: lucideReact.Users, label: "Team" },
|
|
2933
|
+
{ icon: lucideReact.Settings, label: "Settings" }
|
|
2934
|
+
];
|
|
2935
|
+
var KPIS = [
|
|
2936
|
+
{ label: "Total Revenue", value: "$48,295", change: "+12.5%" },
|
|
2937
|
+
{ label: "Active Users", value: "2,847", change: "+8.3%" },
|
|
2938
|
+
{ label: "New Orders", value: "384", change: "+3.1%" },
|
|
2939
|
+
{ label: "Conversion", value: "3.24%", change: "-0.4%" }
|
|
2940
|
+
];
|
|
2941
|
+
var TABLE_ROWS = [
|
|
2942
|
+
{ name: "Alpha Project", status: "Active", team: "Design", progress: 72 },
|
|
2943
|
+
{ name: "Beta Launch", status: "Review", team: "Engineering", progress: 45 },
|
|
2944
|
+
{ name: "Gamma Research", status: "Active", team: "Product", progress: 89 }
|
|
2945
|
+
];
|
|
2946
|
+
function NavItem5({ icon: Icon2, label, active }) {
|
|
2947
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("button", { className: cn(
|
|
2948
|
+
"flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors",
|
|
2949
|
+
active ? "bg-[hsl(var(--accent))] font-medium" : "text-[hsl(var(--muted-foreground))] hover:bg-[hsl(var(--accent))]"
|
|
2950
|
+
), children: [
|
|
2951
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "h-4 w-4 shrink-0" }),
|
|
2952
|
+
label
|
|
2953
|
+
] });
|
|
2954
|
+
}
|
|
2955
|
+
function SidebarLayoutDashboard({ className }) {
|
|
2956
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex h-[600px] overflow-hidden rounded-[var(--radius)] border border-[hsl(var(--border))] bg-[hsl(var(--background))]", className), children: [
|
|
2957
|
+
/* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "flex w-56 flex-col border-r border-[hsl(var(--border))] bg-[hsl(var(--card))]", children: [
|
|
2958
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-12 items-center px-4 font-semibold text-sm", children: "Acme Inc" }),
|
|
2959
|
+
/* @__PURE__ */ jsxRuntime.jsx(Separator4, {}),
|
|
2960
|
+
/* @__PURE__ */ jsxRuntime.jsx("nav", { className: "flex-1 space-y-0.5 p-2", children: NAV_ITEMS3.map((i) => /* @__PURE__ */ jsxRuntime.jsx(NavItem5, { ...i }, i.label)) }),
|
|
2961
|
+
/* @__PURE__ */ jsxRuntime.jsx(Separator4, {}),
|
|
2962
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 p-3", children: [
|
|
2963
|
+
/* @__PURE__ */ jsxRuntime.jsx(Avatar, { className: "h-7 w-7", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { className: "text-xs", children: "JD" }) }),
|
|
2964
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-xs font-medium", children: "Jane Doe" })
|
|
2965
|
+
] })
|
|
2966
|
+
] }),
|
|
2967
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
|
|
2968
|
+
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "flex h-12 items-center justify-between border-b border-[hsl(var(--border))] px-4", children: [
|
|
2969
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-sm font-semibold", children: "Dashboard" }),
|
|
2970
|
+
/* @__PURE__ */ jsxRuntime.jsxs("button", { className: "relative", children: [
|
|
2971
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bell, { className: "h-4 w-4" }),
|
|
2972
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -top-1 -right-1 h-2 w-2 rounded-full bg-[hsl(var(--primary))]" })
|
|
2973
|
+
] })
|
|
2974
|
+
] }),
|
|
2975
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 overflow-auto p-4 space-y-4", children: [
|
|
2976
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid gap-3", style: { gridTemplateColumns: "repeat(auto-fill, minmax(min(100%,130px),1fr))" }, children: KPIS.map((k) => /* @__PURE__ */ jsxRuntime.jsx(Card, { children: /* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "p-3", children: [
|
|
2977
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: k.label }),
|
|
2978
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg font-bold mt-0.5", children: k.value }),
|
|
2979
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: cn("text-xs flex items-center gap-0.5 mt-0.5", k.change.startsWith("+") ? "text-green-600" : "text-red-500"), children: [
|
|
2980
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingUp, { className: "h-3 w-3" }),
|
|
2981
|
+
k.change
|
|
2982
|
+
] })
|
|
2983
|
+
] }) }, k.label)) }),
|
|
2984
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-[var(--radius)] border border-[hsl(var(--border))]", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "w-full text-xs", children: [
|
|
2985
|
+
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsx("tr", { className: "border-b border-[hsl(var(--border))]", children: ["Project", "Status", "Team", "Progress"].map((h) => /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-3 py-2 text-left font-medium text-[hsl(var(--muted-foreground))]", children: h }, h)) }) }),
|
|
2986
|
+
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children: TABLE_ROWS.map((r) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "border-b border-[hsl(var(--border))] last:border-0", children: [
|
|
2987
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2 font-medium", children: r.name }),
|
|
2988
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "secondary", className: "text-[10px]", children: r.status }) }),
|
|
2989
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2 text-[hsl(var(--muted-foreground))]", children: r.team }),
|
|
2990
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-1.5 w-20 rounded-full bg-[hsl(var(--muted))]", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full rounded-full bg-[hsl(var(--primary))]", style: { width: `${r.progress}%` } }) }) })
|
|
2991
|
+
] }, r.name)) })
|
|
2992
|
+
] }) })
|
|
2993
|
+
] })
|
|
2994
|
+
] })
|
|
2995
|
+
] });
|
|
2996
|
+
}
|
|
2997
|
+
var NAV_LINKS = ["Home", "Projects", "Analytics", "Team"];
|
|
2998
|
+
var TABS = ["Overview", "Activity", "Settings", "Billing"];
|
|
2999
|
+
function StackedLayoutTabs({
|
|
3000
|
+
brandName = "Acme Inc",
|
|
3001
|
+
children,
|
|
3002
|
+
className
|
|
3003
|
+
}) {
|
|
3004
|
+
const [activeTab, setActiveTab] = React14.useState(0);
|
|
3005
|
+
const [activeNav, setActiveNav] = React14.useState(0);
|
|
3006
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex h-[600px] flex-col overflow-hidden rounded-[var(--radius)] border border-[hsl(var(--border))] bg-[hsl(var(--background))]", className), children: [
|
|
3007
|
+
/* @__PURE__ */ jsxRuntime.jsxs("nav", { className: "flex h-14 items-center gap-6 border-b border-[hsl(var(--border))] bg-[hsl(var(--card))] px-4", children: [
|
|
3008
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-sm shrink-0", children: brandName }),
|
|
3009
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-1 items-center gap-1", children: NAV_LINKS.map((link, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3010
|
+
"button",
|
|
3011
|
+
{
|
|
3012
|
+
onClick: () => setActiveNav(i),
|
|
3013
|
+
className: cn(
|
|
3014
|
+
"px-3 py-1.5 text-sm rounded-md transition-colors",
|
|
3015
|
+
i === activeNav ? "bg-[hsl(var(--accent))] font-medium" : "text-[hsl(var(--muted-foreground))] hover:bg-[hsl(var(--accent))]"
|
|
3016
|
+
),
|
|
3017
|
+
children: link
|
|
3018
|
+
},
|
|
3019
|
+
link
|
|
3020
|
+
)) }),
|
|
3021
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3022
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bell, { className: "h-4 w-4 text-[hsl(var(--muted-foreground))]" }),
|
|
3023
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 cursor-pointer", children: [
|
|
3024
|
+
/* @__PURE__ */ jsxRuntime.jsx(Avatar, { className: "h-7 w-7", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { className: "text-xs", children: "JD" }) }),
|
|
3025
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-3 w-3 text-[hsl(var(--muted-foreground))]" })
|
|
3026
|
+
] })
|
|
3027
|
+
] })
|
|
3028
|
+
] }),
|
|
3029
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b border-[hsl(var(--border))] bg-[hsl(var(--card))] px-4", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-4", children: TABS.map((tab, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3030
|
+
"button",
|
|
3031
|
+
{
|
|
3032
|
+
onClick: () => setActiveTab(i),
|
|
3033
|
+
className: cn(
|
|
3034
|
+
"py-3 text-sm transition-colors border-b-2",
|
|
3035
|
+
i === activeTab ? "border-[hsl(var(--primary))] font-medium" : "border-transparent text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))]"
|
|
3036
|
+
),
|
|
3037
|
+
children: tab
|
|
3038
|
+
},
|
|
3039
|
+
tab
|
|
3040
|
+
)) }) }),
|
|
3041
|
+
/* @__PURE__ */ jsxRuntime.jsx("main", { className: "flex-1 overflow-auto p-6", children: children ?? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-sm text-[hsl(var(--muted-foreground))]", children: [
|
|
3042
|
+
"Content for ",
|
|
3043
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: TABS[activeTab] }),
|
|
3044
|
+
" tab"
|
|
3045
|
+
] }) })
|
|
3046
|
+
] });
|
|
3047
|
+
}
|
|
3048
|
+
var NAV_LINKS2 = ["Features", "Pricing", "Docs", "Blog"];
|
|
3049
|
+
function StackedLayoutBranded({
|
|
3050
|
+
brandName = "Acme",
|
|
3051
|
+
children,
|
|
3052
|
+
className
|
|
3053
|
+
}) {
|
|
3054
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex h-[600px] flex-col overflow-hidden rounded-[var(--radius)] border border-[hsl(var(--border))] bg-[hsl(var(--background))]", className), children: [
|
|
3055
|
+
/* @__PURE__ */ jsxRuntime.jsxs("nav", { className: "flex h-14 items-center gap-6 bg-[hsl(var(--primary))] px-6", children: [
|
|
3056
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-bold text-sm text-[hsl(var(--primary-foreground))] shrink-0", children: brandName }),
|
|
3057
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-1 items-center gap-1", children: NAV_LINKS2.map((link) => /* @__PURE__ */ jsxRuntime.jsx("button", { className: "px-3 py-1.5 text-sm text-[hsl(var(--primary-foreground)/0.8)] hover:text-[hsl(var(--primary-foreground))] transition-colors rounded-md hover:bg-white/10", children: link }, link)) }),
|
|
3058
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
3059
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bell, { className: "h-4 w-4 text-[hsl(var(--primary-foreground)/0.8)]" }),
|
|
3060
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 cursor-pointer", children: [
|
|
3061
|
+
/* @__PURE__ */ jsxRuntime.jsx(Avatar, { className: "h-7 w-7 ring-2 ring-white/30", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { className: "bg-white/20 text-[hsl(var(--primary-foreground))] text-xs", children: "JD" }) }),
|
|
3062
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-3 w-3 text-[hsl(var(--primary-foreground)/0.8)]" })
|
|
3063
|
+
] })
|
|
3064
|
+
] })
|
|
3065
|
+
] }),
|
|
3066
|
+
/* @__PURE__ */ jsxRuntime.jsx("main", { className: "flex-1 overflow-auto", children: children ?? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-6 space-y-6", children: [
|
|
3067
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3068
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-xl font-bold", children: "Welcome back, Jane" }),
|
|
3069
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-[hsl(var(--muted-foreground))] mt-1", children: "Here's what's happening today." })
|
|
3070
|
+
] }),
|
|
3071
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid gap-4", style: { gridTemplateColumns: "repeat(auto-fill, minmax(min(100%,200px),1fr))" }, children: ["Get Started", "View Analytics", "Manage Team"].map((action) => /* @__PURE__ */ jsxRuntime.jsx(Card, { className: "cursor-pointer hover:shadow-md transition-shadow", children: /* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "p-4 flex items-center justify-between", children: [
|
|
3072
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: action }),
|
|
3073
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRight, { className: "h-4 w-4 text-[hsl(var(--muted-foreground))]" })
|
|
3074
|
+
] }) }, action)) })
|
|
3075
|
+
] }) })
|
|
3076
|
+
] });
|
|
3077
|
+
}
|
|
3078
|
+
var NOTIFICATIONS = [
|
|
3079
|
+
{ id: "comments", label: "Comments", description: "Get notified when someone comments on your post", default: true },
|
|
3080
|
+
{ id: "mentions", label: "Mentions", description: "Get notified when you are mentioned", default: true },
|
|
3081
|
+
{ id: "followers", label: "New followers", description: "Get notified when someone follows you", default: false },
|
|
3082
|
+
{ id: "updates", label: "Product updates", description: "Receive emails about new features and improvements", default: true },
|
|
3083
|
+
{ id: "digest", label: "Weekly digest", description: "A summary of activity from the past week", default: false },
|
|
3084
|
+
{ id: "security", label: "Security alerts", description: "Important alerts about your account security", default: true }
|
|
3085
|
+
];
|
|
3086
|
+
function NotifRow({ label, description, checked, onChange }) {
|
|
3087
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-4 py-4", children: [
|
|
3088
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3089
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium", children: label }),
|
|
3090
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-[hsl(var(--muted-foreground))] mt-0.5", children: description })
|
|
3091
|
+
] }),
|
|
3092
|
+
/* @__PURE__ */ jsxRuntime.jsx(Switch, { checked, onCheckedChange: onChange })
|
|
3093
|
+
] });
|
|
3094
|
+
}
|
|
3095
|
+
function NotificationSettings({ className }) {
|
|
3096
|
+
const [states, setStates] = React14.useState(
|
|
3097
|
+
Object.fromEntries(NOTIFICATIONS.map((n) => [n.id, n.default]))
|
|
3098
|
+
);
|
|
3099
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("rounded-[var(--radius)] border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-6", className), children: [
|
|
3100
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
|
|
3101
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-base font-semibold", children: "Email Notifications" }),
|
|
3102
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-[hsl(var(--muted-foreground))] mt-0.5", children: "Choose what you want to be notified about." })
|
|
3103
|
+
] }),
|
|
3104
|
+
/* @__PURE__ */ jsxRuntime.jsx(Separator4, {}),
|
|
3105
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "divide-y divide-[hsl(var(--border))]", children: NOTIFICATIONS.map((n) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3106
|
+
NotifRow,
|
|
3107
|
+
{
|
|
3108
|
+
...n,
|
|
3109
|
+
checked: states[n.id],
|
|
3110
|
+
onChange: (val) => setStates((s) => ({ ...s, [n.id]: val }))
|
|
3111
|
+
},
|
|
3112
|
+
n.id
|
|
3113
|
+
)) })
|
|
3114
|
+
] });
|
|
3115
|
+
}
|
|
3116
|
+
var MEMBERS = [
|
|
3117
|
+
{ id: "1", name: "Jane Doe", email: "jane@acme.com", role: "Owner", initials: "JD" },
|
|
3118
|
+
{ id: "2", name: "Bob Smith", email: "bob@acme.com", role: "Admin", initials: "BS" },
|
|
3119
|
+
{ id: "3", name: "Alice Chen", email: "alice@acme.com", role: "Member", initials: "AC" },
|
|
3120
|
+
{ id: "4", name: "Tom Ray", email: "tom@acme.com", role: "Member", initials: "TR" },
|
|
3121
|
+
{ id: "5", name: "Sara Kim", email: "sara@acme.com", role: "Viewer", initials: "SK" }
|
|
3122
|
+
];
|
|
3123
|
+
var roleVariant = (role) => role === "Owner" ? "default" : role === "Admin" ? "secondary" : "outline";
|
|
3124
|
+
function WorkspaceMembers({ className }) {
|
|
3125
|
+
const [query, setQuery] = React14.useState("");
|
|
3126
|
+
const [members, setMembers] = React14.useState(MEMBERS);
|
|
3127
|
+
const filtered = members.filter(
|
|
3128
|
+
(m) => m.name.toLowerCase().includes(query.toLowerCase()) || m.email.toLowerCase().includes(query.toLowerCase())
|
|
3129
|
+
);
|
|
3130
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("rounded-[var(--radius)] border border-[hsl(var(--border))] bg-[hsl(var(--card))]", className), children: [
|
|
3131
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-4 border-b border-[hsl(var(--border))]", children: [
|
|
3132
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3133
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-sm font-semibold", children: "Members" }),
|
|
3134
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: [
|
|
3135
|
+
members.length,
|
|
3136
|
+
" members"
|
|
3137
|
+
] })
|
|
3138
|
+
] }),
|
|
3139
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
3140
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-[hsl(var(--muted-foreground))]" }),
|
|
3141
|
+
/* @__PURE__ */ jsxRuntime.jsx(Input, { className: "h-8 pl-8 text-xs w-48", placeholder: "Search members...", value: query, onChange: (e) => setQuery(e.target.value) })
|
|
3142
|
+
] })
|
|
3143
|
+
] }),
|
|
3144
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "divide-y divide-[hsl(var(--border))]", children: filtered.map((m) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 px-4 py-3", children: [
|
|
3145
|
+
/* @__PURE__ */ jsxRuntime.jsx(Avatar, { className: "h-8 w-8", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { className: "text-xs", children: m.initials }) }),
|
|
3146
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
3147
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium truncate", children: m.name }),
|
|
3148
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-[hsl(var(--muted-foreground))] truncate", children: m.email })
|
|
3149
|
+
] }),
|
|
3150
|
+
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: roleVariant(m.role), className: "text-[10px] px-1.5 py-0.5 shrink-0", children: m.role }),
|
|
3151
|
+
m.role !== "Owner" && /* @__PURE__ */ jsxRuntime.jsx(Button, { size: "icon", variant: "ghost", className: "h-7 w-7 shrink-0", onClick: () => setMembers((ms) => ms.filter((x) => x.id !== m.id)), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-3.5 w-3.5" }) })
|
|
3152
|
+
] }, m.id)) })
|
|
3153
|
+
] });
|
|
3154
|
+
}
|
|
3155
|
+
function IntegrationCard({
|
|
3156
|
+
icon,
|
|
3157
|
+
name = "Slack",
|
|
3158
|
+
description = "Send notifications and updates to your Slack workspace.",
|
|
3159
|
+
connected = false,
|
|
3160
|
+
className
|
|
3161
|
+
}) {
|
|
3162
|
+
const [isConnected, setIsConnected] = React14.useState(connected);
|
|
3163
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-4 rounded-[var(--radius)] border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-4", className), children: [
|
|
3164
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-[var(--radius)] bg-[hsl(var(--muted))] text-[hsl(var(--muted-foreground))]", children: icon ?? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-bold", children: name[0] }) }),
|
|
3165
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
3166
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3167
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold", children: name }),
|
|
3168
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3169
|
+
Badge,
|
|
3170
|
+
{
|
|
3171
|
+
variant: isConnected ? "default" : "outline",
|
|
3172
|
+
className: "text-[10px] px-1.5 py-0.5 shrink-0",
|
|
3173
|
+
children: isConnected ? "Connected" : "Not connected"
|
|
3174
|
+
}
|
|
3175
|
+
)
|
|
3176
|
+
] }),
|
|
3177
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-[hsl(var(--muted-foreground))] mt-0.5 truncate", children: description })
|
|
3178
|
+
] }),
|
|
3179
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3180
|
+
Button,
|
|
3181
|
+
{
|
|
3182
|
+
size: "sm",
|
|
3183
|
+
variant: isConnected ? "outline" : "default",
|
|
3184
|
+
className: "shrink-0",
|
|
3185
|
+
onClick: () => setIsConnected((v) => !v),
|
|
3186
|
+
children: isConnected ? "Disconnect" : "Connect"
|
|
3187
|
+
}
|
|
3188
|
+
)
|
|
3189
|
+
] });
|
|
3190
|
+
}
|
|
3191
|
+
var REACTIONS = ["\u{1F60A}", "\u{1F610}", "\u{1F615}", "\u{1F621}", "\u{1F929}"];
|
|
3192
|
+
function FeedbackModal({ onSubmit, className }) {
|
|
3193
|
+
const [reaction, setReaction] = React14.useState("");
|
|
3194
|
+
const [text, setText] = React14.useState("");
|
|
3195
|
+
const [submitted, setSubmitted] = React14.useState(false);
|
|
3196
|
+
const handleSubmit = () => {
|
|
3197
|
+
onSubmit?.({ reaction, text });
|
|
3198
|
+
setSubmitted(true);
|
|
3199
|
+
};
|
|
3200
|
+
if (submitted) {
|
|
3201
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col items-center gap-3 py-8 px-6 text-center", className), children: [
|
|
3202
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-4xl", children: "\u{1F389}" }),
|
|
3203
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-semibold", children: "Thanks for your feedback!" }),
|
|
3204
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-[hsl(var(--muted-foreground))]", children: "We'll use it to improve your experience." })
|
|
3205
|
+
] });
|
|
3206
|
+
}
|
|
3207
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-4 p-6", className), children: [
|
|
3208
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3209
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-base font-semibold", children: "Send Feedback" }),
|
|
3210
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-[hsl(var(--muted-foreground))] mt-0.5", children: "How are you feeling about the product?" })
|
|
3211
|
+
] }),
|
|
3212
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-2", children: REACTIONS.map((r) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3213
|
+
"button",
|
|
3214
|
+
{
|
|
3215
|
+
onClick: () => setReaction(r),
|
|
3216
|
+
className: cn(
|
|
3217
|
+
"flex h-10 w-10 items-center justify-center rounded-[var(--radius)] border text-xl transition-colors",
|
|
3218
|
+
reaction === r ? "border-[hsl(var(--primary))] bg-[hsl(var(--primary)/0.1)]" : "border-[hsl(var(--border))] hover:bg-[hsl(var(--accent))]"
|
|
3219
|
+
),
|
|
3220
|
+
children: r
|
|
3221
|
+
},
|
|
3222
|
+
r
|
|
3223
|
+
)) }),
|
|
3224
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3225
|
+
Textarea,
|
|
3226
|
+
{
|
|
3227
|
+
placeholder: "Tell us more (optional)...",
|
|
3228
|
+
value: text,
|
|
3229
|
+
onChange: (e) => setText(e.target.value),
|
|
3230
|
+
className: "resize-none",
|
|
3231
|
+
rows: 4
|
|
3232
|
+
}
|
|
3233
|
+
),
|
|
3234
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
3235
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", size: "sm", children: "Cancel" }),
|
|
3236
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", onClick: handleSubmit, disabled: !reaction, children: "Submit" })
|
|
3237
|
+
] })
|
|
3238
|
+
] });
|
|
3239
|
+
}
|
|
3240
|
+
var PENDING = [
|
|
3241
|
+
{ email: "alex@startup.io", role: "Member" },
|
|
3242
|
+
{ email: "sam@startup.io", role: "Viewer" }
|
|
3243
|
+
];
|
|
3244
|
+
function InviteModal({ className }) {
|
|
3245
|
+
const [email, setEmail] = React14.useState("");
|
|
3246
|
+
const [role, setRole] = React14.useState("Member");
|
|
3247
|
+
const [pending, setPending] = React14.useState(PENDING);
|
|
3248
|
+
const invite = () => {
|
|
3249
|
+
if (!email.trim())
|
|
3250
|
+
return;
|
|
3251
|
+
setPending((p) => [...p, { email: email.trim(), role }]);
|
|
3252
|
+
setEmail("");
|
|
3253
|
+
};
|
|
3254
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-4 p-6", className), children: [
|
|
3255
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3256
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-base font-semibold", children: "Invite People" }),
|
|
3257
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-[hsl(var(--muted-foreground))] mt-0.5", children: "Invite team members to collaborate." })
|
|
3258
|
+
] }),
|
|
3259
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
3260
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3261
|
+
Input,
|
|
3262
|
+
{
|
|
3263
|
+
className: "flex-1 h-9 text-sm",
|
|
3264
|
+
placeholder: "colleague@company.com",
|
|
3265
|
+
value: email,
|
|
3266
|
+
onChange: (e) => setEmail(e.target.value),
|
|
3267
|
+
onKeyDown: (e) => e.key === "Enter" && invite()
|
|
3268
|
+
}
|
|
3269
|
+
),
|
|
3270
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Select, { value: role, onValueChange: setRole, children: [
|
|
3271
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "h-9 w-28 text-sm", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, {}) }),
|
|
3272
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: ["Admin", "Member", "Viewer"].map((r) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: r, children: r }, r)) })
|
|
3273
|
+
] }),
|
|
3274
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", className: "h-9", onClick: invite, children: "Send" })
|
|
3275
|
+
] }),
|
|
3276
|
+
pending.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
3277
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-[hsl(var(--muted-foreground))]", children: "Pending invites" }),
|
|
3278
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "divide-y divide-[hsl(var(--border))] rounded-[var(--radius)] border border-[hsl(var(--border))]", children: pending.map((p, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 px-3 py-2", children: [
|
|
3279
|
+
/* @__PURE__ */ jsxRuntime.jsx(Avatar, { className: "h-6 w-6", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { className: "text-[10px]", children: p.email[0].toUpperCase() }) }),
|
|
3280
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-sm truncate", children: p.email }),
|
|
3281
|
+
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "outline", className: "text-[10px] px-1.5 py-0.5 shrink-0", children: p.role }),
|
|
3282
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { onClick: () => setPending((ps) => ps.filter((_, j) => j !== i)), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-3.5 w-3.5 text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))]" }) })
|
|
3283
|
+
] }, i)) })
|
|
3284
|
+
] })
|
|
3285
|
+
] });
|
|
3286
|
+
}
|
|
3287
|
+
var COLORS = ["bg-blue-500", "bg-green-500", "bg-yellow-500", "bg-purple-500", "bg-red-500", "bg-pink-500"];
|
|
3288
|
+
var INITIAL_TAGS = [
|
|
3289
|
+
{ id: "1", name: "Design", color: "bg-blue-500" },
|
|
3290
|
+
{ id: "2", name: "Engineering", color: "bg-green-500" },
|
|
3291
|
+
{ id: "3", name: "Marketing", color: "bg-yellow-500" },
|
|
3292
|
+
{ id: "4", name: "Research", color: "bg-purple-500" }
|
|
3293
|
+
];
|
|
3294
|
+
function ManageTagsModal({ className }) {
|
|
3295
|
+
const [tags, setTags] = React14.useState(INITIAL_TAGS);
|
|
3296
|
+
const [newTag, setNewTag] = React14.useState("");
|
|
3297
|
+
const [colorIdx, setColorIdx] = React14.useState(0);
|
|
3298
|
+
const addTag = () => {
|
|
3299
|
+
if (!newTag.trim())
|
|
3300
|
+
return;
|
|
3301
|
+
const id = `tag-${Date.now()}`;
|
|
3302
|
+
setTags((t) => [...t, { id, name: newTag.trim(), color: COLORS[colorIdx % COLORS.length] }]);
|
|
3303
|
+
setNewTag("");
|
|
3304
|
+
setColorIdx((i) => i + 1);
|
|
3305
|
+
};
|
|
3306
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-4 p-6", className), children: [
|
|
3307
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3308
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-base font-semibold", children: "Manage Tags" }),
|
|
3309
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-[hsl(var(--muted-foreground))] mt-0.5", children: "Create and organize your tags." })
|
|
3310
|
+
] }),
|
|
3311
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
3312
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3313
|
+
"div",
|
|
3314
|
+
{
|
|
3315
|
+
className: cn("h-9 w-9 shrink-0 rounded-md cursor-pointer transition-opacity", COLORS[colorIdx % COLORS.length]),
|
|
3316
|
+
onClick: () => setColorIdx((i) => i + 1),
|
|
3317
|
+
title: "Click to change color"
|
|
3318
|
+
}
|
|
3319
|
+
),
|
|
3320
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3321
|
+
Input,
|
|
3322
|
+
{
|
|
3323
|
+
className: "flex-1 h-9 text-sm",
|
|
3324
|
+
placeholder: "New tag name...",
|
|
3325
|
+
value: newTag,
|
|
3326
|
+
onChange: (e) => setNewTag(e.target.value),
|
|
3327
|
+
onKeyDown: (e) => e.key === "Enter" && addTag()
|
|
3328
|
+
}
|
|
3329
|
+
),
|
|
3330
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", className: "h-9", onClick: addTag, children: "Add" })
|
|
3331
|
+
] }),
|
|
3332
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1.5", children: tags.map((tag) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 rounded-[var(--radius)] border border-[hsl(var(--border))] px-3 py-2", children: [
|
|
3333
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("h-3 w-3 rounded-full shrink-0", tag.color) }),
|
|
3334
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-sm", children: tag.name }),
|
|
3335
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { className: "text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] transition-colors", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pencil, { className: "h-3.5 w-3.5" }) }),
|
|
3336
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3337
|
+
"button",
|
|
3338
|
+
{
|
|
3339
|
+
onClick: () => setTags((ts) => ts.filter((t) => t.id !== tag.id)),
|
|
3340
|
+
className: "text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] transition-colors",
|
|
3341
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-3.5 w-3.5" })
|
|
3342
|
+
}
|
|
3343
|
+
)
|
|
3344
|
+
] }, tag.id)) })
|
|
3345
|
+
] });
|
|
3346
|
+
}
|
|
3347
|
+
var USERS = [
|
|
3348
|
+
{ id: "1", name: "Jane Doe", email: "jane@acme.com", initials: "JD" },
|
|
3349
|
+
{ id: "2", name: "Bob Smith", email: "bob@acme.com", initials: "BS" },
|
|
3350
|
+
{ id: "3", name: "Alice Chen", email: "alice@acme.com", initials: "AC" },
|
|
3351
|
+
{ id: "4", name: "Tom Ray", email: "tom@acme.com", initials: "TR" },
|
|
3352
|
+
{ id: "5", name: "Sara Kim", email: "sara@acme.com", initials: "SK" },
|
|
3353
|
+
{ id: "6", name: "Mike Liu", email: "mike@acme.com", initials: "ML" }
|
|
3354
|
+
];
|
|
3355
|
+
function SelectUsersModal({ onConfirm, className }) {
|
|
3356
|
+
const [query, setQuery] = React14.useState("");
|
|
3357
|
+
const [selected, setSelected] = React14.useState(/* @__PURE__ */ new Set());
|
|
3358
|
+
const filtered = USERS.filter(
|
|
3359
|
+
(u) => u.name.toLowerCase().includes(query.toLowerCase()) || u.email.toLowerCase().includes(query.toLowerCase())
|
|
3360
|
+
);
|
|
3361
|
+
const toggle = (id) => setSelected((s) => {
|
|
3362
|
+
const n = new Set(s);
|
|
3363
|
+
n.has(id) ? n.delete(id) : n.add(id);
|
|
3364
|
+
return n;
|
|
3365
|
+
});
|
|
3366
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col", className), children: [
|
|
3367
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4 border-b border-[hsl(var(--border))]", children: [
|
|
3368
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-sm font-semibold mb-3", children: "Select Users" }),
|
|
3369
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
3370
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-[hsl(var(--muted-foreground))]" }),
|
|
3371
|
+
/* @__PURE__ */ jsxRuntime.jsx(Input, { className: "pl-8 h-8 text-sm", placeholder: "Search users...", value: query, onChange: (e) => setQuery(e.target.value) })
|
|
3372
|
+
] })
|
|
3373
|
+
] }),
|
|
3374
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-auto max-h-64 divide-y divide-[hsl(var(--border))]", children: filtered.map((u) => /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex cursor-pointer items-center gap-3 px-4 py-3 hover:bg-[hsl(var(--accent))] transition-colors", children: [
|
|
3375
|
+
/* @__PURE__ */ jsxRuntime.jsx(Checkbox, { checked: selected.has(u.id), onCheckedChange: () => toggle(u.id) }),
|
|
3376
|
+
/* @__PURE__ */ jsxRuntime.jsx(Avatar, { className: "h-7 w-7", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { className: "text-xs", children: u.initials }) }),
|
|
3377
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
3378
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium truncate", children: u.name }),
|
|
3379
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-[hsl(var(--muted-foreground))] truncate", children: u.email })
|
|
3380
|
+
] })
|
|
3381
|
+
] }, u.id)) }),
|
|
3382
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-4 border-t border-[hsl(var(--border))]", children: [
|
|
3383
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-[hsl(var(--muted-foreground))]", children: [
|
|
3384
|
+
selected.size,
|
|
3385
|
+
" selected"
|
|
3386
|
+
] }),
|
|
3387
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", disabled: selected.size === 0, onClick: () => onConfirm?.(Array.from(selected)), children: "Confirm" })
|
|
3388
|
+
] })
|
|
3389
|
+
] });
|
|
3390
|
+
}
|
|
3391
|
+
function UserMenu({
|
|
3392
|
+
name = "Jane Doe",
|
|
3393
|
+
email = "jane@acme.com",
|
|
3394
|
+
initials = "JD",
|
|
3395
|
+
onProfile,
|
|
3396
|
+
onSettings,
|
|
3397
|
+
onBilling,
|
|
3398
|
+
onSignOut,
|
|
3399
|
+
className
|
|
3400
|
+
}) {
|
|
3401
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
|
|
3402
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs("button", { className: cn("flex items-center gap-2 rounded-[var(--radius)] px-2 py-1.5 text-sm transition-colors hover:bg-[hsl(var(--accent))] focus:outline-none", className), children: [
|
|
3403
|
+
/* @__PURE__ */ jsxRuntime.jsx(Avatar, { className: "h-7 w-7", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { className: "text-xs", children: initials }) }),
|
|
3404
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium max-w-[120px] truncate", children: name }),
|
|
3405
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-3.5 w-3.5 text-[hsl(var(--muted-foreground))]" })
|
|
3406
|
+
] }) }),
|
|
3407
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuContent, { align: "end", className: "w-52", children: [
|
|
3408
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuLabel, { className: "font-normal", children: [
|
|
3409
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium", children: name }),
|
|
3410
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: email })
|
|
3411
|
+
] }),
|
|
3412
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
|
|
3413
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onClick: onProfile, children: [
|
|
3414
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { className: "h-4 w-4" }),
|
|
3415
|
+
"Profile"
|
|
3416
|
+
] }),
|
|
3417
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onClick: onSettings, children: [
|
|
3418
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { className: "h-4 w-4" }),
|
|
3419
|
+
"Account Settings"
|
|
3420
|
+
] }),
|
|
3421
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onClick: onBilling, children: [
|
|
3422
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CreditCard, { className: "h-4 w-4" }),
|
|
3423
|
+
"Billing"
|
|
3424
|
+
] }),
|
|
3425
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
|
|
3426
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onClick: onSignOut, className: "text-[hsl(var(--destructive))] focus:text-[hsl(var(--destructive))]", children: [
|
|
3427
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.LogOut, { className: "h-4 w-4" }),
|
|
3428
|
+
"Sign out"
|
|
3429
|
+
] })
|
|
3430
|
+
] })
|
|
3431
|
+
] });
|
|
3432
|
+
}
|
|
3433
|
+
var ORGS = [
|
|
3434
|
+
{ id: "1", name: "Acme Corp", slug: "acme", plan: "Pro" },
|
|
3435
|
+
{ id: "2", name: "Beta Labs", slug: "beta-labs", plan: "Starter" },
|
|
3436
|
+
{ id: "3", name: "Gamma Inc", slug: "gamma", plan: "Free" }
|
|
3437
|
+
];
|
|
3438
|
+
function OrgMenu({
|
|
3439
|
+
currentOrgId = "1",
|
|
3440
|
+
onSwitch,
|
|
3441
|
+
onCreateOrg,
|
|
3442
|
+
className
|
|
3443
|
+
}) {
|
|
3444
|
+
const current = ORGS.find((o) => o.id === currentOrgId) ?? ORGS[0];
|
|
3445
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
|
|
3446
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs("button", { className: cn("flex items-center gap-2 rounded-[var(--radius)] px-2 py-1.5 text-sm transition-colors hover:bg-[hsl(var(--accent))] focus:outline-none", className), children: [
|
|
3447
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-6 w-6 items-center justify-center rounded bg-[hsl(var(--primary))] text-[10px] font-bold text-[hsl(var(--primary-foreground))]", children: current.name[0] }),
|
|
3448
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium max-w-[120px] truncate", children: current.name }),
|
|
3449
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-3.5 w-3.5 text-[hsl(var(--muted-foreground))]" })
|
|
3450
|
+
] }) }),
|
|
3451
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuContent, { align: "start", className: "w-52", children: [
|
|
3452
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuLabel, { children: "Organizations" }),
|
|
3453
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
|
|
3454
|
+
ORGS.map((org) => /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onClick: () => onSwitch?.(org.id), className: "justify-between", children: [
|
|
3455
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3456
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-5 w-5 items-center justify-center rounded bg-[hsl(var(--muted))] text-[10px] font-bold", children: org.name[0] }),
|
|
3457
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: org.name })
|
|
3458
|
+
] }),
|
|
3459
|
+
org.id === currentOrgId && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-3.5 w-3.5 text-[hsl(var(--primary))]" })
|
|
3460
|
+
] }, org.id)),
|
|
3461
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
|
|
3462
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onClick: onCreateOrg, children: [
|
|
3463
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4" }),
|
|
3464
|
+
"Create organization"
|
|
3465
|
+
] })
|
|
3466
|
+
] })
|
|
3467
|
+
] });
|
|
3468
|
+
}
|
|
3469
|
+
var ROLES = [
|
|
3470
|
+
{ value: "owner", label: "Owner", description: "Full control over the workspace" },
|
|
3471
|
+
{ value: "admin", label: "Admin", description: "Manage members and settings" },
|
|
3472
|
+
{ value: "member", label: "Member", description: "Can create and edit content" },
|
|
3473
|
+
{ value: "viewer", label: "Viewer", description: "Read-only access" }
|
|
3474
|
+
];
|
|
3475
|
+
function RolesMenu({ value = "member", onChange, className }) {
|
|
3476
|
+
const [role, setRole] = React14.useState(value);
|
|
3477
|
+
const current = ROLES.find((r) => r.value === role) ?? ROLES[2];
|
|
3478
|
+
const handleChange = (v) => {
|
|
3479
|
+
setRole(v);
|
|
3480
|
+
onChange?.(v);
|
|
3481
|
+
};
|
|
3482
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
|
|
3483
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "sm", className: cn("gap-1.5", className), children: [
|
|
3484
|
+
current.label,
|
|
3485
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-3.5 w-3.5 opacity-60" })
|
|
3486
|
+
] }) }),
|
|
3487
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuContent, { align: "end", className: "w-56", children: [
|
|
3488
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuLabel, { children: "Change role" }),
|
|
3489
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
|
|
3490
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuRadioGroup, { value: role, onValueChange: handleChange, children: ROLES.map((r) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuRadioItem, { value: r.value, className: "items-start py-2.5", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-1", children: [
|
|
3491
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium leading-none", children: r.label }),
|
|
3492
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-[hsl(var(--muted-foreground))] mt-0.5", children: r.description })
|
|
3493
|
+
] }) }, r.value)) })
|
|
3494
|
+
] })
|
|
3495
|
+
] });
|
|
3496
|
+
}
|
|
3497
|
+
function MetricCard({ label = "Total Revenue", value = "$48,295", change = "+12.5%", trend = "up", className }) {
|
|
3498
|
+
const TrendIcon = trend === "up" ? lucideReact.TrendingUp : lucideReact.TrendingDown;
|
|
3499
|
+
const trendColor = trend === "up" ? "text-green-600" : "text-red-500";
|
|
3500
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Card, { className: cn("", className), children: /* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "p-4", children: [
|
|
3501
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-[hsl(var(--muted-foreground))]", children: label }),
|
|
3502
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-2xl font-bold mt-1", children: value }),
|
|
3503
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: cn("flex items-center gap-1 text-sm mt-1", trendColor), children: [
|
|
3504
|
+
/* @__PURE__ */ jsxRuntime.jsx(TrendIcon, { className: "h-4 w-4" }),
|
|
3505
|
+
change,
|
|
3506
|
+
" from last month"
|
|
3507
|
+
] })
|
|
3508
|
+
] }) });
|
|
3509
|
+
}
|
|
3510
|
+
function MetricCardWithIcon({ icon, iconColor = "bg-[hsl(var(--primary)/0.1)] text-[hsl(var(--primary))]", ...props }) {
|
|
3511
|
+
const TrendIcon = (props.trend ?? "up") === "up" ? lucideReact.TrendingUp : lucideReact.TrendingDown;
|
|
3512
|
+
const trendColor = (props.trend ?? "up") === "up" ? "text-green-600" : "text-red-500";
|
|
3513
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Card, { className: cn("", props.className), children: /* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: "p-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between", children: [
|
|
3514
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3515
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-[hsl(var(--muted-foreground))]", children: props.label ?? "Total Revenue" }),
|
|
3516
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-2xl font-bold mt-1", children: props.value ?? "$48,295" }),
|
|
3517
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: cn("flex items-center gap-1 text-sm mt-1", trendColor), children: [
|
|
3518
|
+
/* @__PURE__ */ jsxRuntime.jsx(TrendIcon, { className: "h-4 w-4" }),
|
|
3519
|
+
props.change ?? "+12.5%"
|
|
3520
|
+
] })
|
|
3521
|
+
] }),
|
|
3522
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex h-10 w-10 items-center justify-center rounded-[var(--radius)]", iconColor), children: icon ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingUp, { className: "h-5 w-5" }) })
|
|
3523
|
+
] }) }) });
|
|
3524
|
+
}
|
|
3525
|
+
function MetricCardWithButton({ actionLabel = "View details", onAction, ...props }) {
|
|
3526
|
+
const TrendIcon = (props.trend ?? "up") === "up" ? lucideReact.TrendingUp : lucideReact.TrendingDown;
|
|
3527
|
+
const trendColor = (props.trend ?? "up") === "up" ? "text-green-600" : "text-red-500";
|
|
3528
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Card, { className: cn("", props.className), children: /* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "p-4", children: [
|
|
3529
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-[hsl(var(--muted-foreground))]", children: props.label ?? "Total Revenue" }),
|
|
3530
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-2xl font-bold mt-1", children: props.value ?? "$48,295" }),
|
|
3531
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: cn("flex items-center gap-1 text-sm mt-1 mb-3", trendColor), children: [
|
|
3532
|
+
/* @__PURE__ */ jsxRuntime.jsx(TrendIcon, { className: "h-4 w-4" }),
|
|
3533
|
+
props.change ?? "+12.5%"
|
|
3534
|
+
] }),
|
|
3535
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", variant: "outline", className: "w-full", onClick: onAction, children: actionLabel })
|
|
3536
|
+
] }) });
|
|
3537
|
+
}
|
|
3538
|
+
var INITIAL_MESSAGES = [
|
|
3539
|
+
{ id: "1", author: "Alice Chen", initials: "AC", text: "Hey team, just pushed the new design files to Figma.", time: "9:41 AM" },
|
|
3540
|
+
{ id: "2", author: "Bob Smith", initials: "BS", text: "Awesome! I'll take a look and share feedback by EOD.", time: "9:43 AM" },
|
|
3541
|
+
{ id: "3", author: "You", initials: "JD", text: "Looks great, the new color palette really pops!", time: "9:45 AM", self: true },
|
|
3542
|
+
{ id: "4", author: "Alice Chen", initials: "AC", text: "Thanks! Let's sync tomorrow to go through the comments.", time: "9:47 AM" }
|
|
3543
|
+
];
|
|
3544
|
+
function ChatBubble({ msg }) {
|
|
3545
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex gap-2.5", msg.self && "flex-row-reverse"), children: [
|
|
3546
|
+
/* @__PURE__ */ jsxRuntime.jsx(Avatar, { className: "h-7 w-7 shrink-0 mt-0.5", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { className: "text-xs", children: msg.initials }) }),
|
|
3547
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("max-w-[70%]", msg.self && "items-end flex flex-col"), children: [
|
|
3548
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline gap-2 mb-0.5", children: [
|
|
3549
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium", children: msg.author }),
|
|
3550
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-[hsl(var(--muted-foreground))]", children: msg.time })
|
|
3551
|
+
] }),
|
|
3552
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
3553
|
+
"rounded-[var(--radius)] px-3 py-2 text-sm",
|
|
3554
|
+
msg.self ? "bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))]" : "bg-[hsl(var(--muted))]"
|
|
3555
|
+
), children: msg.text })
|
|
3556
|
+
] })
|
|
3557
|
+
] });
|
|
3558
|
+
}
|
|
3559
|
+
function ChatDetail({ className }) {
|
|
3560
|
+
const [messages, setMessages] = React14.useState(INITIAL_MESSAGES);
|
|
3561
|
+
const [input, setInput] = React14.useState("");
|
|
3562
|
+
const send = () => {
|
|
3563
|
+
if (!input.trim())
|
|
3564
|
+
return;
|
|
3565
|
+
const now = (/* @__PURE__ */ new Date()).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" });
|
|
3566
|
+
setMessages((m) => [...m, { id: `${Date.now()}`, author: "You", initials: "JD", text: input.trim(), time: now, self: true }]);
|
|
3567
|
+
setInput("");
|
|
3568
|
+
};
|
|
3569
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex h-[480px] flex-col overflow-hidden rounded-[var(--radius)] border border-[hsl(var(--border))] bg-[hsl(var(--card))]", className), children: [
|
|
3570
|
+
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "flex items-center gap-3 border-b border-[hsl(var(--border))] px-4 py-3", children: [
|
|
3571
|
+
/* @__PURE__ */ jsxRuntime.jsx(Avatar, { className: "h-8 w-8", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { className: "text-xs", children: "AC" }) }),
|
|
3572
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3573
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold", children: "Design Team" }),
|
|
3574
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: "4 members" })
|
|
3575
|
+
] })
|
|
3576
|
+
] }),
|
|
3577
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-auto p-4 space-y-4", children: messages.map((m) => /* @__PURE__ */ jsxRuntime.jsx(ChatBubble, { msg: m }, m.id)) }),
|
|
3578
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 border-t border-[hsl(var(--border))] p-3", children: [
|
|
3579
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3580
|
+
Input,
|
|
3581
|
+
{
|
|
3582
|
+
className: "flex-1 h-9 text-sm",
|
|
3583
|
+
placeholder: "Type a message...",
|
|
3584
|
+
value: input,
|
|
3585
|
+
onChange: (e) => setInput(e.target.value),
|
|
3586
|
+
onKeyDown: (e) => e.key === "Enter" && send()
|
|
3587
|
+
}
|
|
3588
|
+
),
|
|
3589
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { size: "icon", className: "h-9 w-9 shrink-0", onClick: send, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Send, { className: "h-4 w-4" }) })
|
|
3590
|
+
] })
|
|
3591
|
+
] });
|
|
3592
|
+
}
|
|
3593
|
+
var MESSAGES = [
|
|
3594
|
+
{ id: "1", name: "Alice Chen", initials: "AC", preview: "Just pushed the new design files to Figma.", time: "9:41 AM", unread: true },
|
|
3595
|
+
{ id: "2", name: "Bob Smith", initials: "BS", preview: "I'll take a look and share feedback by EOD.", time: "9:43 AM", unread: true },
|
|
3596
|
+
{ id: "3", name: "Tom Ray", initials: "TR", preview: "Can we reschedule the standup to 10am?", time: "Yesterday" },
|
|
3597
|
+
{ id: "4", name: "Sara Kim", initials: "SK", preview: "Shipped the new auth flow. Ready for QA.", time: "Yesterday" },
|
|
3598
|
+
{ id: "5", name: "Mike Liu", initials: "ML", preview: "The latest metrics look promising \u{1F4C8}", time: "Mon" }
|
|
3599
|
+
];
|
|
3600
|
+
function MessageRow({ msg }) {
|
|
3601
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 px-4 py-3 hover:bg-[hsl(var(--accent))] cursor-pointer transition-colors", children: [
|
|
3602
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative shrink-0", children: [
|
|
3603
|
+
/* @__PURE__ */ jsxRuntime.jsx(Avatar, { className: "h-9 w-9", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { className: "text-xs", children: msg.initials }) }),
|
|
3604
|
+
msg.unread && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -top-0.5 -right-0.5 h-2.5 w-2.5 rounded-full bg-[hsl(var(--primary))] ring-2 ring-[hsl(var(--card))]" })
|
|
3605
|
+
] }),
|
|
3606
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
3607
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
3608
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-sm truncate", msg.unread ? "font-semibold" : "font-medium"), children: msg.name }),
|
|
3609
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-[hsl(var(--muted-foreground))] shrink-0", children: msg.time })
|
|
3610
|
+
] }),
|
|
3611
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-xs mt-0.5 truncate", msg.unread ? "text-[hsl(var(--foreground))]" : "text-[hsl(var(--muted-foreground))]"), children: msg.preview })
|
|
3612
|
+
] })
|
|
3613
|
+
] });
|
|
3614
|
+
}
|
|
3615
|
+
function MessagesCard({ className }) {
|
|
3616
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: cn("overflow-hidden", className), children: [
|
|
3617
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardHeader, { className: "px-4 py-3 border-b border-[hsl(var(--border))]", children: /* @__PURE__ */ jsxRuntime.jsxs(CardTitle, { className: "text-sm font-semibold flex items-center justify-between", children: [
|
|
3618
|
+
"Messages",
|
|
3619
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] px-1.5 py-0.5 rounded-full bg-[hsl(var(--primary)/0.1)] text-[hsl(var(--primary))] font-medium", children: "2 new" })
|
|
3620
|
+
] }) }),
|
|
3621
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "divide-y divide-[hsl(var(--border))]", children: MESSAGES.map((m) => /* @__PURE__ */ jsxRuntime.jsx(MessageRow, { msg: m }, m.id)) })
|
|
3622
|
+
] });
|
|
3623
|
+
}
|
|
3624
|
+
var FILES = [
|
|
3625
|
+
{ id: "1", name: "design-system.fig", type: "figma", size: "14.2 MB", modified: "Mar 12" },
|
|
3626
|
+
{ id: "2", name: "hero-banner.png", type: "image", size: "3.8 MB", modified: "Mar 11" },
|
|
3627
|
+
{ id: "3", name: "api-spec.yaml", type: "code", size: "42 KB", modified: "Mar 10" },
|
|
3628
|
+
{ id: "4", name: "demo-video.mp4", type: "video", size: "128 MB", modified: "Mar 9" },
|
|
3629
|
+
{ id: "5", name: "assets.zip", type: "archive", size: "56 MB", modified: "Mar 8" },
|
|
3630
|
+
{ id: "6", name: "meeting-notes.pdf", type: "pdf", size: "1.1 MB", modified: "Mar 7" }
|
|
3631
|
+
];
|
|
3632
|
+
var TYPE_ICON = {
|
|
3633
|
+
figma: lucideReact.FileText,
|
|
3634
|
+
image: lucideReact.Image,
|
|
3635
|
+
code: lucideReact.FileCode,
|
|
3636
|
+
video: lucideReact.Film,
|
|
3637
|
+
archive: lucideReact.Archive,
|
|
3638
|
+
pdf: lucideReact.FileText
|
|
3639
|
+
};
|
|
3640
|
+
var TYPE_COLOR = {
|
|
3641
|
+
figma: "text-purple-500",
|
|
3642
|
+
image: "text-green-500",
|
|
3643
|
+
code: "text-blue-500",
|
|
3644
|
+
video: "text-red-500",
|
|
3645
|
+
archive: "text-yellow-500",
|
|
3646
|
+
pdf: "text-orange-500"
|
|
3647
|
+
};
|
|
3648
|
+
function FileCard({ file }) {
|
|
3649
|
+
const Icon2 = TYPE_ICON[file.type] ?? lucideReact.File;
|
|
3650
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Card, { className: "cursor-pointer hover:shadow-md transition-shadow", children: /* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "p-4", children: [
|
|
3651
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex h-10 w-10 items-center justify-center rounded-[var(--radius)] bg-[hsl(var(--muted))] mb-3", TYPE_COLOR[file.type]), children: /* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "h-5 w-5" }) }),
|
|
3652
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium truncate", children: file.name }),
|
|
3653
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mt-1", children: [
|
|
3654
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: file.size }),
|
|
3655
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: file.modified })
|
|
3656
|
+
] })
|
|
3657
|
+
] }) });
|
|
3658
|
+
}
|
|
3659
|
+
function FileCards({ files = FILES, className }) {
|
|
3660
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("grid gap-3", className), style: { gridTemplateColumns: "repeat(auto-fill, minmax(min(100%,160px),1fr))" }, children: files.map((f) => /* @__PURE__ */ jsxRuntime.jsx(FileCard, { file: f }, f.id)) });
|
|
3661
|
+
}
|
|
3662
|
+
var FILES2 = [
|
|
3663
|
+
{ id: "1", name: "design-system.fig", type: "Figma", size: "14.2 MB", modified: "Mar 12, 2024" },
|
|
3664
|
+
{ id: "2", name: "hero-banner.png", type: "PNG Image", size: "3.8 MB", modified: "Mar 11, 2024" },
|
|
3665
|
+
{ id: "3", name: "api-spec.yaml", type: "YAML", size: "42 KB", modified: "Mar 10, 2024" },
|
|
3666
|
+
{ id: "4", name: "demo-video.mp4", type: "MP4 Video", size: "128 MB", modified: "Mar 9, 2024" },
|
|
3667
|
+
{ id: "5", name: "assets.zip", type: "ZIP Archive", size: "56 MB", modified: "Mar 8, 2024" }
|
|
3668
|
+
];
|
|
3669
|
+
var TYPE_ICON2 = {
|
|
3670
|
+
Figma: lucideReact.FileText,
|
|
3671
|
+
"PNG Image": lucideReact.Image,
|
|
3672
|
+
YAML: lucideReact.FileCode,
|
|
3673
|
+
"MP4 Video": lucideReact.Film,
|
|
3674
|
+
"ZIP Archive": lucideReact.Archive
|
|
3675
|
+
};
|
|
3676
|
+
function FileRow({ file, onDelete }) {
|
|
3677
|
+
const Icon2 = TYPE_ICON2[file.type] ?? lucideReact.FileText;
|
|
3678
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "border-b border-[hsl(var(--border))] last:border-0 hover:bg-[hsl(var(--accent)/0.5)] transition-colors", children: [
|
|
3679
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2.5", children: [
|
|
3680
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "h-4 w-4 shrink-0 text-[hsl(var(--muted-foreground))]" }),
|
|
3681
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: file.name })
|
|
3682
|
+
] }) }),
|
|
3683
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-3 text-sm text-[hsl(var(--muted-foreground))]", children: file.type }),
|
|
3684
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-3 text-sm text-[hsl(var(--muted-foreground))]", children: file.size }),
|
|
3685
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-3 text-sm text-[hsl(var(--muted-foreground))]", children: file.modified }),
|
|
3686
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-3 text-right", children: /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
|
|
3687
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { size: "icon", variant: "ghost", className: "h-7 w-7", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreHorizontal, { className: "h-4 w-4" }) }) }),
|
|
3688
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuContent, { align: "end", children: [
|
|
3689
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { children: [
|
|
3690
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { className: "h-4 w-4" }),
|
|
3691
|
+
"Download"
|
|
3692
|
+
] }),
|
|
3693
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onClick: onDelete, className: "text-[hsl(var(--destructive))]", children: [
|
|
3694
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "h-4 w-4" }),
|
|
3695
|
+
"Delete"
|
|
3696
|
+
] })
|
|
3697
|
+
] })
|
|
3698
|
+
] }) })
|
|
3699
|
+
] });
|
|
3700
|
+
}
|
|
3701
|
+
function FilesList({ className }) {
|
|
3702
|
+
const [files, setFiles] = React14__default.default.useState(FILES2);
|
|
3703
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("rounded-[var(--radius)] border border-[hsl(var(--border))] overflow-hidden", className), children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "w-full", children: [
|
|
3704
|
+
/* @__PURE__ */ jsxRuntime.jsx("thead", { className: "bg-[hsl(var(--muted)/0.5)]", children: /* @__PURE__ */ jsxRuntime.jsx("tr", { children: ["Name", "Type", "Size", "Modified", ""].map((h) => /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-4 py-2.5 text-left text-xs font-medium text-[hsl(var(--muted-foreground))]", children: h }, h)) }) }),
|
|
3705
|
+
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children: files.map((f) => /* @__PURE__ */ jsxRuntime.jsx(FileRow, { file: f, onDelete: () => setFiles((fs) => fs.filter((x) => x.id !== f.id)) }, f.id)) })
|
|
3706
|
+
] }) });
|
|
3707
|
+
}
|
|
3708
|
+
var PRIORITY_COLOR = {
|
|
3709
|
+
High: "bg-red-500/10 text-red-600 border-red-200",
|
|
3710
|
+
Medium: "bg-yellow-500/10 text-yellow-600 border-yellow-200",
|
|
3711
|
+
Low: "bg-green-500/10 text-green-600 border-green-200"
|
|
3712
|
+
};
|
|
3713
|
+
function TaskCard({
|
|
3714
|
+
title = "Redesign onboarding flow",
|
|
3715
|
+
description = "Update the user onboarding experience with the new design language.",
|
|
3716
|
+
assigneeInitials = "AC",
|
|
3717
|
+
dueDate = "Mar 20",
|
|
3718
|
+
priority = "High",
|
|
3719
|
+
className
|
|
3720
|
+
}) {
|
|
3721
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Card, { className: cn("cursor-pointer hover:shadow-md transition-shadow", className), children: /* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "p-4 space-y-3", children: [
|
|
3722
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-2", children: [
|
|
3723
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold leading-tight", children: title }),
|
|
3724
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-[10px] px-1.5 py-0.5 rounded-full border font-medium shrink-0", PRIORITY_COLOR[priority]), children: priority })
|
|
3725
|
+
] }),
|
|
3726
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-[hsl(var(--muted-foreground))] leading-relaxed line-clamp-2", children: description }),
|
|
3727
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
3728
|
+
/* @__PURE__ */ jsxRuntime.jsx(Avatar, { className: "h-6 w-6", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { className: "text-[10px]", children: assigneeInitials }) }),
|
|
3729
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 text-xs text-[hsl(var(--muted-foreground))]", children: [
|
|
3730
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Calendar, { className: "h-3 w-3" }),
|
|
3731
|
+
dueDate
|
|
3732
|
+
] })
|
|
3733
|
+
] })
|
|
3734
|
+
] }) });
|
|
3735
|
+
}
|
|
3736
|
+
var LABEL_COLORS = ["bg-blue-100 text-blue-700", "bg-purple-100 text-purple-700", "bg-green-100 text-green-700"];
|
|
3737
|
+
function TaskCardWithLabels({
|
|
3738
|
+
labels = ["Design", "Frontend"],
|
|
3739
|
+
...props
|
|
3740
|
+
}) {
|
|
3741
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Card, { className: cn("cursor-pointer hover:shadow-md transition-shadow", props.className), children: /* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "p-4 space-y-3", children: [
|
|
3742
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-2", children: [
|
|
3743
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold leading-tight", children: props.title ?? "Redesign onboarding flow" }),
|
|
3744
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-[10px] px-1.5 py-0.5 rounded-full border font-medium shrink-0", PRIORITY_COLOR[props.priority ?? "High"]), children: props.priority ?? "High" })
|
|
3745
|
+
] }),
|
|
3746
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-[hsl(var(--muted-foreground))] leading-relaxed line-clamp-2", children: props.description ?? "Update the user onboarding experience with the new design language." }),
|
|
3747
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: labels.map((l, i) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-[10px] px-1.5 py-0.5 rounded-full font-medium", LABEL_COLORS[i % LABEL_COLORS.length]), children: l }, l)) }),
|
|
3748
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
3749
|
+
/* @__PURE__ */ jsxRuntime.jsx(Avatar, { className: "h-6 w-6", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { className: "text-[10px]", children: props.assigneeInitials ?? "AC" }) }),
|
|
3750
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 text-xs text-[hsl(var(--muted-foreground))]", children: [
|
|
3751
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Calendar, { className: "h-3 w-3" }),
|
|
3752
|
+
props.dueDate ?? "Mar 20"
|
|
3753
|
+
] })
|
|
3754
|
+
] })
|
|
3755
|
+
] }) });
|
|
3756
|
+
}
|
|
3757
|
+
var TASKS = [
|
|
3758
|
+
{ id: "1", title: "Redesign onboarding flow", assignee: "AC", priority: "High", status: "In Progress", done: false },
|
|
3759
|
+
{ id: "2", title: "Fix authentication bug", assignee: "BS", priority: "High", status: "In Progress", done: false },
|
|
3760
|
+
{ id: "3", title: "Write API documentation", assignee: "JD", priority: "Medium", status: "Todo", done: false },
|
|
3761
|
+
{ id: "4", title: "Add dark mode support", assignee: "TR", priority: "Low", status: "Todo", done: false },
|
|
3762
|
+
{ id: "5", title: "Setup CI/CD pipeline", assignee: "SK", priority: "Medium", status: "Done", done: true },
|
|
3763
|
+
{ id: "6", title: "Deploy to staging", assignee: "ML", priority: "Low", status: "Done", done: true }
|
|
3764
|
+
];
|
|
3765
|
+
var PRIORITY_DOT = {
|
|
3766
|
+
High: "bg-red-500",
|
|
3767
|
+
Medium: "bg-yellow-500",
|
|
3768
|
+
Low: "bg-green-500"
|
|
3769
|
+
};
|
|
3770
|
+
var SECTIONS = ["In Progress", "Todo", "Done"];
|
|
3771
|
+
function TaskRow({ task, onToggle }) {
|
|
3772
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 px-3 py-2.5 hover:bg-[hsl(var(--accent)/0.5)] rounded-md transition-colors", children: [
|
|
3773
|
+
/* @__PURE__ */ jsxRuntime.jsx(Checkbox, { checked: task.done, onCheckedChange: onToggle }),
|
|
3774
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("flex-1 text-sm", task.done && "line-through text-[hsl(var(--muted-foreground))]"), children: task.title }),
|
|
3775
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("h-2 w-2 rounded-full shrink-0", PRIORITY_DOT[task.priority]), title: task.priority }),
|
|
3776
|
+
/* @__PURE__ */ jsxRuntime.jsx(Avatar, { className: "h-6 w-6 shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { className: "text-[10px]", children: task.assignee }) })
|
|
3777
|
+
] });
|
|
3778
|
+
}
|
|
3779
|
+
function SortableTaskList({ className }) {
|
|
3780
|
+
const [tasks, setTasks] = React14.useState(TASKS);
|
|
3781
|
+
const toggle = (id) => setTasks((ts) => ts.map((t) => t.id === id ? { ...t, done: !t.done } : t));
|
|
3782
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("rounded-[var(--radius)] border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-4 space-y-4", className), children: SECTIONS.map((section) => {
|
|
3783
|
+
const items = tasks.filter((t) => t.status === section);
|
|
3784
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3785
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-1.5", children: [
|
|
3786
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold text-[hsl(var(--muted-foreground))] uppercase tracking-wide", children: section }),
|
|
3787
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: [
|
|
3788
|
+
"(",
|
|
3789
|
+
items.length,
|
|
3790
|
+
")"
|
|
3791
|
+
] })
|
|
3792
|
+
] }),
|
|
3793
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0.5", children: items.map((task) => /* @__PURE__ */ jsxRuntime.jsx(TaskRow, { task, onToggle: () => toggle(task.id) }, task.id)) })
|
|
3794
|
+
] }, section);
|
|
3795
|
+
}) });
|
|
3796
|
+
}
|
|
3797
|
+
|
|
3798
|
+
Object.defineProperty(exports, "Form", {
|
|
3799
|
+
enumerable: true,
|
|
3800
|
+
get: function () { return reactHookForm.FormProvider; }
|
|
3801
|
+
});
|
|
3802
|
+
Object.defineProperty(exports, "toast", {
|
|
3803
|
+
enumerable: true,
|
|
3804
|
+
get: function () { return sonner.toast; }
|
|
3805
|
+
});
|
|
3806
|
+
exports.AppShell = AppShell;
|
|
3807
|
+
exports.AppShellMain = AppShellMain;
|
|
3808
|
+
exports.AppShellSidebar = AppShellSidebar;
|
|
3809
|
+
exports.AreaChart = AreaChart;
|
|
3810
|
+
exports.ArrayField = ArrayField;
|
|
3811
|
+
exports.AutoForm = AutoForm;
|
|
3812
|
+
exports.Avatar = Avatar;
|
|
3813
|
+
exports.AvatarFallback = AvatarFallback;
|
|
3814
|
+
exports.AvatarImage = AvatarImage;
|
|
3815
|
+
exports.Badge = Badge;
|
|
3816
|
+
exports.Banner = Banner;
|
|
3817
|
+
exports.BarChart = BarChart;
|
|
3818
|
+
exports.Beacon = Beacon;
|
|
3819
|
+
exports.BlinkUIProvider = BlinkUIProvider;
|
|
3820
|
+
exports.Breadcrumb = Breadcrumb;
|
|
3821
|
+
exports.BreadcrumbItem = BreadcrumbItem;
|
|
3822
|
+
exports.BreadcrumbPage = BreadcrumbPage;
|
|
3823
|
+
exports.BreadcrumbSeparator = BreadcrumbSeparator;
|
|
3824
|
+
exports.BulkActions = BulkActions;
|
|
3825
|
+
exports.Button = Button;
|
|
3826
|
+
exports.Card = Card;
|
|
3827
|
+
exports.CardContent = CardContent;
|
|
3828
|
+
exports.CardDescription = CardDescription;
|
|
3829
|
+
exports.CardFooter = CardFooter;
|
|
3830
|
+
exports.CardHeader = CardHeader;
|
|
3831
|
+
exports.CardTitle = CardTitle;
|
|
3832
|
+
exports.ChatDetail = ChatDetail;
|
|
3833
|
+
exports.Checkbox = Checkbox;
|
|
3834
|
+
exports.CommandBar = CommandBar;
|
|
3835
|
+
exports.CommandBarEmpty = CommandBarEmpty;
|
|
3836
|
+
exports.CommandBarGroup = CommandBarGroup;
|
|
3837
|
+
exports.CommandBarItem = CommandBarItem;
|
|
3838
|
+
exports.CommandItem = CommandItem;
|
|
3839
|
+
exports.Container = Container;
|
|
3840
|
+
exports.ContextMenu = ContextMenu;
|
|
3841
|
+
exports.ContextMenuCheckboxItem = ContextMenuCheckboxItem;
|
|
3842
|
+
exports.ContextMenuContent = ContextMenuContent;
|
|
3843
|
+
exports.ContextMenuGroup = ContextMenuGroup;
|
|
3844
|
+
exports.ContextMenuItem = ContextMenuItem;
|
|
3845
|
+
exports.ContextMenuLabel = ContextMenuLabel;
|
|
3846
|
+
exports.ContextMenuPortal = ContextMenuPortal;
|
|
3847
|
+
exports.ContextMenuRadioGroup = ContextMenuRadioGroup;
|
|
3848
|
+
exports.ContextMenuRadioItem = ContextMenuRadioItem;
|
|
3849
|
+
exports.ContextMenuSeparator = ContextMenuSeparator;
|
|
3850
|
+
exports.ContextMenuShortcut = ContextMenuShortcut;
|
|
3851
|
+
exports.ContextMenuSub = ContextMenuSub;
|
|
3852
|
+
exports.ContextMenuSubContent = ContextMenuSubContent;
|
|
3853
|
+
exports.ContextMenuSubTrigger = ContextMenuSubTrigger;
|
|
3854
|
+
exports.ContextMenuTrigger = ContextMenuTrigger;
|
|
3855
|
+
exports.DataGrid = DataGrid;
|
|
3856
|
+
exports.DataTable = DataTable;
|
|
3857
|
+
exports.DataTableColumnHeader = DataTableColumnHeader;
|
|
3858
|
+
exports.DataTablePagination = DataTablePagination;
|
|
3859
|
+
exports.DataTableToolbar = DataTableToolbar;
|
|
3860
|
+
exports.DatePicker = DatePicker;
|
|
3861
|
+
exports.Dialog = Dialog;
|
|
3862
|
+
exports.DialogClose = DialogClose;
|
|
3863
|
+
exports.DialogContent = DialogContent;
|
|
3864
|
+
exports.DialogDescription = DialogDescription;
|
|
3865
|
+
exports.DialogFooter = DialogFooter;
|
|
3866
|
+
exports.DialogHeader = DialogHeader;
|
|
3867
|
+
exports.DialogOverlay = DialogOverlay;
|
|
3868
|
+
exports.DialogPortal = DialogPortal;
|
|
3869
|
+
exports.DialogTitle = DialogTitle;
|
|
3870
|
+
exports.DialogTrigger = DialogTrigger;
|
|
3871
|
+
exports.DropdownMenu = DropdownMenu;
|
|
3872
|
+
exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
|
|
3873
|
+
exports.DropdownMenuContent = DropdownMenuContent;
|
|
3874
|
+
exports.DropdownMenuGroup = DropdownMenuGroup;
|
|
3875
|
+
exports.DropdownMenuItem = DropdownMenuItem;
|
|
3876
|
+
exports.DropdownMenuLabel = DropdownMenuLabel;
|
|
3877
|
+
exports.DropdownMenuPortal = DropdownMenuPortal;
|
|
3878
|
+
exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup;
|
|
3879
|
+
exports.DropdownMenuRadioItem = DropdownMenuRadioItem;
|
|
3880
|
+
exports.DropdownMenuSeparator = DropdownMenuSeparator;
|
|
3881
|
+
exports.DropdownMenuShortcut = DropdownMenuShortcut;
|
|
3882
|
+
exports.DropdownMenuSub = DropdownMenuSub;
|
|
3883
|
+
exports.DropdownMenuSubContent = DropdownMenuSubContent;
|
|
3884
|
+
exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
|
|
3885
|
+
exports.DropdownMenuTrigger = DropdownMenuTrigger;
|
|
3886
|
+
exports.EmptyState = EmptyState;
|
|
3887
|
+
exports.EmptyStateIcon = EmptyStateIcon;
|
|
3888
|
+
exports.FeedbackModal = FeedbackModal;
|
|
3889
|
+
exports.Field = Field;
|
|
3890
|
+
exports.FieldDescription = FieldDescription;
|
|
3891
|
+
exports.FieldError = FieldError;
|
|
3892
|
+
exports.FieldLabel = FieldLabel;
|
|
3893
|
+
exports.FileCards = FileCards;
|
|
3894
|
+
exports.FileUpload = FileUpload;
|
|
3895
|
+
exports.FileUploadPreview = FileUploadPreview;
|
|
3896
|
+
exports.FilesList = FilesList;
|
|
3897
|
+
exports.FilterBadge = FilterBadge;
|
|
3898
|
+
exports.Filters = Filters;
|
|
3899
|
+
exports.FormControl = FormControl;
|
|
3900
|
+
exports.FormDescription = FormDescription;
|
|
3901
|
+
exports.FormField = FormField;
|
|
3902
|
+
exports.FormItem = FormItem;
|
|
3903
|
+
exports.FormLabel = FormLabel;
|
|
3904
|
+
exports.FormMessage = FormMessage;
|
|
3905
|
+
exports.HStack = HStack;
|
|
3906
|
+
exports.HotkeyBadge = HotkeyBadge;
|
|
3907
|
+
exports.Hotkeys = Hotkeys;
|
|
3908
|
+
exports.IconBadge = IconBadge;
|
|
3909
|
+
exports.Input = Input;
|
|
3910
|
+
exports.IntegrationCard = IntegrationCard;
|
|
3911
|
+
exports.InviteModal = InviteModal;
|
|
3912
|
+
exports.Kanban = Kanban;
|
|
3913
|
+
exports.KanbanCard = KanbanCard;
|
|
3914
|
+
exports.KanbanColumn = KanbanColumn;
|
|
3915
|
+
exports.LineChart = LineChart;
|
|
3916
|
+
exports.LoadingOverlay = LoadingOverlay;
|
|
3917
|
+
exports.ManageTagsModal = ManageTagsModal;
|
|
3918
|
+
exports.MessagesCard = MessagesCard;
|
|
3919
|
+
exports.MetricCard = MetricCard;
|
|
3920
|
+
exports.MetricCardWithButton = MetricCardWithButton;
|
|
3921
|
+
exports.MetricCardWithIcon = MetricCardWithIcon;
|
|
3922
|
+
exports.Navbar = Navbar;
|
|
3923
|
+
exports.NavbarBrand = NavbarBrand;
|
|
3924
|
+
exports.NavbarContent = NavbarContent;
|
|
3925
|
+
exports.NavbarItem = NavbarItem;
|
|
3926
|
+
exports.NotificationSettings = NotificationSettings;
|
|
3927
|
+
exports.ObjectField = ObjectField;
|
|
3928
|
+
exports.OrgMenu = OrgMenu;
|
|
3929
|
+
exports.Page = Page;
|
|
3930
|
+
exports.PageActions = PageActions;
|
|
3931
|
+
exports.PageBody = PageBody;
|
|
3932
|
+
exports.PageDescription = PageDescription;
|
|
3933
|
+
exports.PageHeader = PageHeader;
|
|
3934
|
+
exports.PageTitle = PageTitle;
|
|
3935
|
+
exports.PasswordInput = PasswordInput;
|
|
3936
|
+
exports.Persona = Persona;
|
|
3937
|
+
exports.Popover = Popover;
|
|
3938
|
+
exports.PopoverAnchor = PopoverAnchor;
|
|
3939
|
+
exports.PopoverContent = PopoverContent;
|
|
3940
|
+
exports.PopoverTrigger = PopoverTrigger;
|
|
3941
|
+
exports.Progress = Progress;
|
|
3942
|
+
exports.PropertyItem = PropertyItem;
|
|
3943
|
+
exports.PropertyList = PropertyList;
|
|
3944
|
+
exports.RadioGroup = RadioGroup;
|
|
3945
|
+
exports.RadioGroupItem = RadioGroupItem;
|
|
3946
|
+
exports.ResizeBox = ResizeBox;
|
|
3947
|
+
exports.ResizeHandle = ResizeHandle;
|
|
3948
|
+
exports.RolesMenu = RolesMenu;
|
|
3949
|
+
exports.SearchInput = SearchInput;
|
|
3950
|
+
exports.Select = Select;
|
|
3951
|
+
exports.SelectContent = SelectContent;
|
|
3952
|
+
exports.SelectGroup = SelectGroup;
|
|
3953
|
+
exports.SelectItem = SelectItem;
|
|
3954
|
+
exports.SelectLabel = SelectLabel;
|
|
3955
|
+
exports.SelectScrollDownButton = SelectScrollDownButton;
|
|
3956
|
+
exports.SelectScrollUpButton = SelectScrollUpButton;
|
|
3957
|
+
exports.SelectSeparator = SelectSeparator;
|
|
3958
|
+
exports.SelectTrigger = SelectTrigger;
|
|
3959
|
+
exports.SelectUsersModal = SelectUsersModal;
|
|
3960
|
+
exports.SelectValue = SelectValue;
|
|
3961
|
+
exports.Separator = Separator4;
|
|
3962
|
+
exports.Sheet = Sheet;
|
|
3963
|
+
exports.SheetClose = SheetClose;
|
|
3964
|
+
exports.SheetContent = SheetContent;
|
|
3965
|
+
exports.SheetDescription = SheetDescription;
|
|
3966
|
+
exports.SheetFooter = SheetFooter;
|
|
3967
|
+
exports.SheetHeader = SheetHeader;
|
|
3968
|
+
exports.SheetOverlay = SheetOverlay;
|
|
3969
|
+
exports.SheetPortal = SheetPortal;
|
|
3970
|
+
exports.SheetTitle = SheetTitle;
|
|
3971
|
+
exports.SheetTrigger = SheetTrigger;
|
|
3972
|
+
exports.Sidebar = Sidebar;
|
|
3973
|
+
exports.SidebarContent = SidebarContent;
|
|
3974
|
+
exports.SidebarFooter = SidebarFooter;
|
|
3975
|
+
exports.SidebarGroup = SidebarGroup;
|
|
3976
|
+
exports.SidebarGroupLabel = SidebarGroupLabel;
|
|
3977
|
+
exports.SidebarHeader = SidebarHeader;
|
|
3978
|
+
exports.SidebarItem = SidebarItem;
|
|
3979
|
+
exports.SidebarLayoutDashboard = SidebarLayoutDashboard;
|
|
3980
|
+
exports.SidebarLayoutGroups = SidebarLayoutGroups;
|
|
3981
|
+
exports.SidebarLayoutMinimal = SidebarLayoutMinimal;
|
|
3982
|
+
exports.SidebarLayoutSearch = SidebarLayoutSearch;
|
|
3983
|
+
exports.SidebarLayoutUser = SidebarLayoutUser;
|
|
3984
|
+
exports.SidebarSeparator = SidebarSeparator;
|
|
3985
|
+
exports.Skeleton = Skeleton;
|
|
3986
|
+
exports.Slider = Slider;
|
|
3987
|
+
exports.SortableTaskList = SortableTaskList;
|
|
3988
|
+
exports.Sparkline = Sparkline;
|
|
3989
|
+
exports.SplitPage = SplitPage;
|
|
3990
|
+
exports.SplitPageDetail = SplitPageDetail;
|
|
3991
|
+
exports.SplitPageList = SplitPageList;
|
|
3992
|
+
exports.Stack = Stack;
|
|
3993
|
+
exports.StackedLayoutBranded = StackedLayoutBranded;
|
|
3994
|
+
exports.StackedLayoutTabs = StackedLayoutTabs;
|
|
3995
|
+
exports.Stat = Stat;
|
|
3996
|
+
exports.StatGroup = StatGroup;
|
|
3997
|
+
exports.StepForm = StepForm;
|
|
3998
|
+
exports.StepFormNavigation = StepFormNavigation;
|
|
3999
|
+
exports.StepFormStep = StepFormStep;
|
|
4000
|
+
exports.Stepper = Stepper;
|
|
4001
|
+
exports.StructuredList = StructuredList;
|
|
4002
|
+
exports.StructuredListItem = StructuredListItem;
|
|
4003
|
+
exports.StructuredListSection = StructuredListSection;
|
|
4004
|
+
exports.Switch = Switch;
|
|
4005
|
+
exports.Tabs = Tabs;
|
|
4006
|
+
exports.TabsContent = TabsContent;
|
|
4007
|
+
exports.TabsList = TabsList;
|
|
4008
|
+
exports.TabsTrigger = TabsTrigger;
|
|
4009
|
+
exports.TaskCard = TaskCard;
|
|
4010
|
+
exports.TaskCardWithLabels = TaskCardWithLabels;
|
|
4011
|
+
exports.Textarea = Textarea;
|
|
4012
|
+
exports.Timeline = Timeline;
|
|
4013
|
+
exports.TimelineConnector = TimelineConnector;
|
|
4014
|
+
exports.TimelineContent = TimelineContent;
|
|
4015
|
+
exports.TimelineItem = TimelineItem;
|
|
4016
|
+
exports.Toaster = Toaster;
|
|
4017
|
+
exports.ToggleButton = ToggleButton;
|
|
4018
|
+
exports.ToggleButtonGroup = ToggleButtonGroup;
|
|
4019
|
+
exports.Tooltip = Tooltip;
|
|
4020
|
+
exports.TooltipContent = TooltipContent;
|
|
4021
|
+
exports.TooltipProvider = TooltipProvider;
|
|
4022
|
+
exports.TooltipTrigger = TooltipTrigger;
|
|
4023
|
+
exports.Tour = Tour;
|
|
4024
|
+
exports.TourStep = TourStep;
|
|
4025
|
+
exports.UserMenu = UserMenu;
|
|
4026
|
+
exports.VStack = VStack;
|
|
4027
|
+
exports.WorkspaceMembers = WorkspaceMembers;
|
|
4028
|
+
exports.badgeVariants = badgeVariants;
|
|
4029
|
+
exports.buttonVariants = buttonVariants;
|
|
4030
|
+
exports.cn = cn;
|
|
4031
|
+
exports.useAppShell = useAppShell;
|
|
4032
|
+
exports.useBlinkUI = useBlinkUI;
|
|
4033
|
+
exports.useCommandBar = useCommandBar;
|
|
4034
|
+
exports.useTour = useTour;
|
|
4035
|
+
//# sourceMappingURL=out.js.map
|
|
4036
|
+
//# sourceMappingURL=index.js.map
|