@hyddenlabs/hydn-ui 0.0.1-alpha.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +569 -0
- package/dist/index.cjs +3121 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1029 -0
- package/dist/index.d.ts +1029 -0
- package/dist/index.js +3042 -0
- package/dist/index.js.map +1 -0
- package/dist/style.css +2 -0
- package/package.json +99 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,3121 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var iconsReact = require('@tabler/icons-react');
|
|
6
|
+
var reactRouterDom = require('react-router-dom');
|
|
7
|
+
var reactDom = require('react-dom');
|
|
8
|
+
|
|
9
|
+
// src/components/forms/button/button.tsx
|
|
10
|
+
function Button({
|
|
11
|
+
children,
|
|
12
|
+
onClick,
|
|
13
|
+
ariaLabel,
|
|
14
|
+
disabled = false,
|
|
15
|
+
type = "button",
|
|
16
|
+
className = "",
|
|
17
|
+
icon,
|
|
18
|
+
iconPosition = "left",
|
|
19
|
+
variant = "neutral",
|
|
20
|
+
style = "solid",
|
|
21
|
+
size = "md",
|
|
22
|
+
rounded = "default",
|
|
23
|
+
loading = false,
|
|
24
|
+
fullWidth = false,
|
|
25
|
+
wide = false,
|
|
26
|
+
active = false
|
|
27
|
+
}) {
|
|
28
|
+
const isIconOnly = icon && !children;
|
|
29
|
+
if (isIconOnly && !ariaLabel) {
|
|
30
|
+
console.warn("Button: Icon-only buttons require an ariaLabel for accessibility");
|
|
31
|
+
}
|
|
32
|
+
const solidVariantClasses = {
|
|
33
|
+
neutral: "bg-neutral text-neutral-foreground hover:bg-neutral/90 active:bg-neutral/80",
|
|
34
|
+
primary: "bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/80",
|
|
35
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/90 active:bg-secondary/80",
|
|
36
|
+
accent: "bg-accent text-accent-foreground hover:bg-accent/90 active:bg-accent/80",
|
|
37
|
+
info: "bg-info text-info-foreground hover:bg-info/90 active:bg-info/80",
|
|
38
|
+
success: "bg-success text-success-foreground hover:bg-success/90 active:bg-success/80",
|
|
39
|
+
warning: "bg-warning text-warning-foreground hover:bg-warning/90 active:bg-warning/80",
|
|
40
|
+
error: "bg-destructive text-destructive-foreground hover:bg-destructive/90 active:bg-destructive/80"
|
|
41
|
+
};
|
|
42
|
+
const outlineVariantClasses = {
|
|
43
|
+
neutral: "border-2 border-neutral text-neutral bg-transparent hover:bg-neutral hover:text-neutral-foreground",
|
|
44
|
+
primary: "border-2 border-primary text-primary bg-transparent hover:bg-primary hover:text-primary-foreground",
|
|
45
|
+
secondary: "border-2 border-secondary text-secondary bg-transparent hover:bg-secondary hover:text-secondary-foreground",
|
|
46
|
+
accent: "border-2 border-accent text-accent bg-transparent hover:bg-accent hover:text-accent-foreground",
|
|
47
|
+
info: "border-2 border-info text-info bg-transparent hover:bg-info hover:text-info-foreground",
|
|
48
|
+
success: "border-2 border-success text-success bg-transparent hover:bg-success hover:text-success-foreground",
|
|
49
|
+
warning: "border-2 border-warning text-warning bg-transparent hover:bg-warning hover:text-warning-foreground",
|
|
50
|
+
error: "border-2 border-destructive text-destructive bg-transparent hover:bg-destructive hover:text-destructive-foreground"
|
|
51
|
+
};
|
|
52
|
+
const ghostVariantClasses = {
|
|
53
|
+
neutral: "bg-transparent text-foreground hover:bg-neutral/10 active:bg-neutral/20",
|
|
54
|
+
primary: "bg-transparent text-primary hover:bg-primary/10 active:bg-primary/20",
|
|
55
|
+
secondary: "bg-transparent text-secondary hover:bg-secondary/10 active:bg-secondary/20",
|
|
56
|
+
accent: "bg-transparent text-accent hover:bg-accent/10 active:bg-accent/20",
|
|
57
|
+
info: "bg-transparent text-info hover:bg-info/10 active:bg-info/20",
|
|
58
|
+
success: "bg-transparent text-success hover:bg-success/10 active:bg-success/20",
|
|
59
|
+
warning: "bg-transparent text-warning hover:bg-warning/10 active:bg-warning/20",
|
|
60
|
+
error: "bg-transparent text-destructive hover:bg-destructive/10 active:bg-destructive/20"
|
|
61
|
+
};
|
|
62
|
+
const softVariantClasses = {
|
|
63
|
+
neutral: "bg-neutral/20 text-foreground hover:bg-neutral/30 active:bg-neutral/40",
|
|
64
|
+
primary: "bg-primary/20 text-primary hover:bg-primary/30 active:bg-primary/40",
|
|
65
|
+
secondary: "bg-secondary/20 text-secondary hover:bg-secondary/30 active:bg-secondary/40",
|
|
66
|
+
accent: "bg-accent/20 text-accent hover:bg-accent/30 active:bg-accent/40",
|
|
67
|
+
info: "bg-info/20 text-info hover:bg-info/30 active:bg-info/40",
|
|
68
|
+
success: "bg-success/20 text-success hover:bg-success/30 active:bg-success/40",
|
|
69
|
+
warning: "bg-warning/20 text-warning hover:bg-warning/30 active:bg-warning/40",
|
|
70
|
+
error: "bg-destructive/20 text-destructive hover:bg-destructive/30 active:bg-destructive/40"
|
|
71
|
+
};
|
|
72
|
+
const linkVariantClasses = {
|
|
73
|
+
neutral: "bg-transparent text-foreground underline-offset-4 hover:underline",
|
|
74
|
+
primary: "bg-transparent text-primary underline-offset-4 hover:underline",
|
|
75
|
+
secondary: "bg-transparent text-secondary underline-offset-4 hover:underline",
|
|
76
|
+
accent: "bg-transparent text-accent underline-offset-4 hover:underline",
|
|
77
|
+
info: "bg-transparent text-info underline-offset-4 hover:underline",
|
|
78
|
+
success: "bg-transparent text-success underline-offset-4 hover:underline",
|
|
79
|
+
warning: "bg-transparent text-warning underline-offset-4 hover:underline",
|
|
80
|
+
error: "bg-transparent text-destructive underline-offset-4 hover:underline"
|
|
81
|
+
};
|
|
82
|
+
const getStyleClasses = () => {
|
|
83
|
+
const variantKey = variant;
|
|
84
|
+
switch (style) {
|
|
85
|
+
case "outline":
|
|
86
|
+
return `${outlineVariantClasses[variantKey]} active:scale-95`;
|
|
87
|
+
case "ghost":
|
|
88
|
+
return ghostVariantClasses[variantKey];
|
|
89
|
+
case "link":
|
|
90
|
+
return linkVariantClasses[variantKey];
|
|
91
|
+
case "soft":
|
|
92
|
+
return softVariantClasses[variantKey];
|
|
93
|
+
case "solid":
|
|
94
|
+
default:
|
|
95
|
+
return `${solidVariantClasses[variantKey]} shadow-sm hover:shadow-md`;
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
const sizeClasses = {
|
|
99
|
+
xs: "h-6 px-2 text-xs min-h-6",
|
|
100
|
+
sm: "h-8 px-3 text-sm min-h-8",
|
|
101
|
+
md: "h-10 px-4 text-base min-h-10",
|
|
102
|
+
lg: "h-12 px-6 text-lg min-h-12",
|
|
103
|
+
xl: "h-14 px-8 text-xl min-h-14"
|
|
104
|
+
};
|
|
105
|
+
const roundedClasses = {
|
|
106
|
+
default: "rounded-md",
|
|
107
|
+
pill: "rounded-full",
|
|
108
|
+
square: "rounded-none aspect-square",
|
|
109
|
+
circle: "rounded-full aspect-square"
|
|
110
|
+
};
|
|
111
|
+
const displayIcon = loading ? /* @__PURE__ */ jsxRuntime.jsxs("svg", { className: "animate-spin h-4 w-4", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
|
|
112
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
113
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
114
|
+
"path",
|
|
115
|
+
{
|
|
116
|
+
className: "opacity-75",
|
|
117
|
+
fill: "currentColor",
|
|
118
|
+
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
] }) : icon;
|
|
122
|
+
const styleClasses = getStyleClasses();
|
|
123
|
+
const widthClasses = fullWidth ? "w-full" : wide ? "px-8" : "";
|
|
124
|
+
const activeClasses = active ? "active:scale-95" : "";
|
|
125
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
126
|
+
"button",
|
|
127
|
+
{
|
|
128
|
+
type,
|
|
129
|
+
onClick,
|
|
130
|
+
"aria-label": ariaLabel,
|
|
131
|
+
disabled: disabled || loading,
|
|
132
|
+
className: `inline-flex items-center justify-center ${roundedClasses[rounded]} font-medium transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50 ${styleClasses} ${sizeClasses[size]} ${isIconOnly ? "p-0" : ""} ${widthClasses} ${activeClasses} ${className}`,
|
|
133
|
+
children: [
|
|
134
|
+
displayIcon && iconPosition === "left" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `inline-flex ${children ? "mr-2" : ""}`, children: displayIcon }),
|
|
135
|
+
children,
|
|
136
|
+
displayIcon && iconPosition === "right" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `inline-flex ${children ? "ml-2" : ""}`, children: displayIcon })
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
Button.displayName = "Button";
|
|
142
|
+
var button_default = Button;
|
|
143
|
+
function Input({
|
|
144
|
+
value,
|
|
145
|
+
onChange,
|
|
146
|
+
placeholder,
|
|
147
|
+
disabled = false,
|
|
148
|
+
type = "text",
|
|
149
|
+
className = "",
|
|
150
|
+
ariaLabel,
|
|
151
|
+
id,
|
|
152
|
+
name,
|
|
153
|
+
required = false,
|
|
154
|
+
size = "md",
|
|
155
|
+
validationState = "default"
|
|
156
|
+
}) {
|
|
157
|
+
const sizeClasses = {
|
|
158
|
+
sm: "h-8 px-3 py-1.5 text-sm",
|
|
159
|
+
md: "h-10 px-3 py-2 text-sm",
|
|
160
|
+
lg: "h-12 px-4 py-3 text-base"
|
|
161
|
+
};
|
|
162
|
+
const validationClasses = {
|
|
163
|
+
default: "border-input focus:border-ring",
|
|
164
|
+
error: "border-destructive focus:border-destructive",
|
|
165
|
+
success: "border-success focus:border-success",
|
|
166
|
+
warning: "border-warning focus:border-warning"
|
|
167
|
+
};
|
|
168
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
169
|
+
"input",
|
|
170
|
+
{
|
|
171
|
+
type,
|
|
172
|
+
value,
|
|
173
|
+
onChange,
|
|
174
|
+
placeholder,
|
|
175
|
+
disabled,
|
|
176
|
+
"aria-label": ariaLabel,
|
|
177
|
+
id,
|
|
178
|
+
name,
|
|
179
|
+
required,
|
|
180
|
+
"aria-invalid": validationState === "error",
|
|
181
|
+
className: `flex w-full rounded-lg border bg-background shadow-sm transition-all duration-200 file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring/20 focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-muted/50 ${sizeClasses[size]} ${validationClasses[validationState]} ${className}`
|
|
182
|
+
}
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
Input.displayName = "Input";
|
|
186
|
+
var input_default = Input;
|
|
187
|
+
function Checkbox({
|
|
188
|
+
checked,
|
|
189
|
+
onChange,
|
|
190
|
+
disabled = false,
|
|
191
|
+
className = "",
|
|
192
|
+
ariaLabel,
|
|
193
|
+
id,
|
|
194
|
+
name
|
|
195
|
+
}) {
|
|
196
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
197
|
+
"input",
|
|
198
|
+
{
|
|
199
|
+
type: "checkbox",
|
|
200
|
+
checked,
|
|
201
|
+
onChange,
|
|
202
|
+
disabled,
|
|
203
|
+
"aria-label": ariaLabel,
|
|
204
|
+
id,
|
|
205
|
+
name,
|
|
206
|
+
className: `h-4 w-4 rounded border-2 border-input bg-background text-primary transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-muted/50 checked:bg-primary checked:border-primary hover:border-ring cursor-pointer ${className}`
|
|
207
|
+
}
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
Checkbox.displayName = "Checkbox";
|
|
211
|
+
var checkbox_default = Checkbox;
|
|
212
|
+
function Radio({
|
|
213
|
+
checked,
|
|
214
|
+
onChange,
|
|
215
|
+
disabled = false,
|
|
216
|
+
className = "",
|
|
217
|
+
ariaLabel,
|
|
218
|
+
id,
|
|
219
|
+
name,
|
|
220
|
+
value
|
|
221
|
+
}) {
|
|
222
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
223
|
+
"input",
|
|
224
|
+
{
|
|
225
|
+
type: "radio",
|
|
226
|
+
checked,
|
|
227
|
+
onChange,
|
|
228
|
+
disabled,
|
|
229
|
+
"aria-label": ariaLabel,
|
|
230
|
+
id,
|
|
231
|
+
name,
|
|
232
|
+
value,
|
|
233
|
+
className: `w-4 h-4 text-primary border-2 border-input bg-background transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-muted/50 checked:bg-primary checked:border-primary hover:border-ring cursor-pointer ${className}`
|
|
234
|
+
}
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
Radio.displayName = "Radio";
|
|
238
|
+
var radio_default = Radio;
|
|
239
|
+
function Select({
|
|
240
|
+
value,
|
|
241
|
+
onChange,
|
|
242
|
+
disabled = false,
|
|
243
|
+
className = "",
|
|
244
|
+
ariaLabel,
|
|
245
|
+
id,
|
|
246
|
+
name,
|
|
247
|
+
children,
|
|
248
|
+
required = false,
|
|
249
|
+
size = "md",
|
|
250
|
+
validationState = "default"
|
|
251
|
+
}) {
|
|
252
|
+
const sizeClasses = {
|
|
253
|
+
sm: "h-8 px-3 py-1.5 text-sm",
|
|
254
|
+
md: "h-10 px-3 py-2 text-sm pr-10",
|
|
255
|
+
lg: "h-12 px-4 py-3 text-base pr-10"
|
|
256
|
+
};
|
|
257
|
+
const validationClasses = {
|
|
258
|
+
default: "border-input focus:border-ring",
|
|
259
|
+
error: "border-destructive focus:border-destructive",
|
|
260
|
+
success: "border-success focus:border-success",
|
|
261
|
+
warning: "border-warning focus:border-warning"
|
|
262
|
+
};
|
|
263
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
264
|
+
"select",
|
|
265
|
+
{
|
|
266
|
+
value,
|
|
267
|
+
onChange,
|
|
268
|
+
disabled,
|
|
269
|
+
"aria-label": ariaLabel,
|
|
270
|
+
id,
|
|
271
|
+
name,
|
|
272
|
+
required,
|
|
273
|
+
"aria-invalid": validationState === "error",
|
|
274
|
+
className: `flex w-full rounded-lg border bg-background shadow-sm transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-ring/20 focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-muted/50 appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20stroke%3D%22%236b7280%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%221.5%22%20d%3D%22M6%208l4%204%204-4%22%2F%3E%3C%2Fsvg%3E')] bg-[length:1.5em] bg-[right_0.5rem_center] bg-no-repeat ${sizeClasses[size]} ${validationClasses[validationState]} ${className}`,
|
|
275
|
+
children
|
|
276
|
+
}
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
Select.displayName = "Select";
|
|
280
|
+
var select_default = Select;
|
|
281
|
+
function SelectItem({ value, disabled = false, children }) {
|
|
282
|
+
return /* @__PURE__ */ jsxRuntime.jsx("option", { value, disabled, children });
|
|
283
|
+
}
|
|
284
|
+
SelectItem.displayName = "SelectItem";
|
|
285
|
+
var select_item_default = SelectItem;
|
|
286
|
+
function Textarea({
|
|
287
|
+
value,
|
|
288
|
+
onChange,
|
|
289
|
+
placeholder,
|
|
290
|
+
disabled = false,
|
|
291
|
+
className = "",
|
|
292
|
+
ariaLabel,
|
|
293
|
+
id,
|
|
294
|
+
name,
|
|
295
|
+
rows = 3,
|
|
296
|
+
required = false,
|
|
297
|
+
validationState = "default"
|
|
298
|
+
}) {
|
|
299
|
+
const validationClasses = {
|
|
300
|
+
default: "border-input focus:border-ring",
|
|
301
|
+
error: "border-destructive focus:border-destructive",
|
|
302
|
+
success: "border-success focus:border-success",
|
|
303
|
+
warning: "border-warning focus:border-warning"
|
|
304
|
+
};
|
|
305
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
306
|
+
"textarea",
|
|
307
|
+
{
|
|
308
|
+
value,
|
|
309
|
+
onChange,
|
|
310
|
+
placeholder,
|
|
311
|
+
disabled,
|
|
312
|
+
"aria-label": ariaLabel,
|
|
313
|
+
id,
|
|
314
|
+
name,
|
|
315
|
+
rows,
|
|
316
|
+
required,
|
|
317
|
+
"aria-invalid": validationState === "error",
|
|
318
|
+
className: `flex min-h-[80px] w-full rounded-lg border bg-background px-3 py-2 text-sm shadow-sm transition-all duration-200 placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring/20 focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-muted/50 resize-y ${validationClasses[validationState]} ${className}`
|
|
319
|
+
}
|
|
320
|
+
);
|
|
321
|
+
}
|
|
322
|
+
Textarea.displayName = "Textarea";
|
|
323
|
+
var textarea_default = Textarea;
|
|
324
|
+
function Switch({
|
|
325
|
+
checked = false,
|
|
326
|
+
onChange,
|
|
327
|
+
disabled = false,
|
|
328
|
+
className = "",
|
|
329
|
+
ariaLabel,
|
|
330
|
+
id,
|
|
331
|
+
name,
|
|
332
|
+
size = "md",
|
|
333
|
+
variant
|
|
334
|
+
}) {
|
|
335
|
+
const handleChange = (e) => {
|
|
336
|
+
onChange?.(e.target.checked);
|
|
337
|
+
};
|
|
338
|
+
const sizeStyles = {
|
|
339
|
+
xs: {
|
|
340
|
+
container: "h-4 w-8",
|
|
341
|
+
handle: "h-3 w-3",
|
|
342
|
+
padding: "p-0.5",
|
|
343
|
+
translate: checked ? "translate-x-4" : "translate-x-0"
|
|
344
|
+
},
|
|
345
|
+
sm: {
|
|
346
|
+
container: "h-5 w-10",
|
|
347
|
+
handle: "h-4 w-4",
|
|
348
|
+
padding: "p-0.5",
|
|
349
|
+
translate: checked ? "translate-x-5" : "translate-x-0"
|
|
350
|
+
},
|
|
351
|
+
md: {
|
|
352
|
+
container: "h-6 w-12",
|
|
353
|
+
handle: "h-5 w-5",
|
|
354
|
+
padding: "p-0.5",
|
|
355
|
+
translate: checked ? "translate-x-6" : "translate-x-0"
|
|
356
|
+
},
|
|
357
|
+
lg: {
|
|
358
|
+
container: "h-7 w-14",
|
|
359
|
+
handle: "h-6 w-6",
|
|
360
|
+
padding: "p-0.5",
|
|
361
|
+
translate: checked ? "translate-x-7" : "translate-x-0"
|
|
362
|
+
},
|
|
363
|
+
xl: {
|
|
364
|
+
container: "h-8 w-16",
|
|
365
|
+
handle: "h-7 w-7",
|
|
366
|
+
padding: "p-0.5",
|
|
367
|
+
translate: checked ? "translate-x-8" : "translate-x-0"
|
|
368
|
+
}
|
|
369
|
+
};
|
|
370
|
+
const getVariantColors = () => {
|
|
371
|
+
if (!checked) {
|
|
372
|
+
return "bg-input border-input";
|
|
373
|
+
}
|
|
374
|
+
switch (variant) {
|
|
375
|
+
case "secondary":
|
|
376
|
+
return "bg-secondary border-secondary";
|
|
377
|
+
case "accent":
|
|
378
|
+
return "bg-accent border-accent";
|
|
379
|
+
case "success":
|
|
380
|
+
return "bg-success border-success";
|
|
381
|
+
case "warning":
|
|
382
|
+
return "bg-warning border-warning";
|
|
383
|
+
case "info":
|
|
384
|
+
return "bg-info border-info";
|
|
385
|
+
case "error":
|
|
386
|
+
return "bg-destructive border-destructive";
|
|
387
|
+
case "neutral":
|
|
388
|
+
return "bg-neutral border-neutral";
|
|
389
|
+
case "primary":
|
|
390
|
+
default:
|
|
391
|
+
return "bg-primary border-primary";
|
|
392
|
+
}
|
|
393
|
+
};
|
|
394
|
+
const styles = sizeStyles[size];
|
|
395
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
396
|
+
"label",
|
|
397
|
+
{
|
|
398
|
+
className: `relative inline-flex ${styles.container} ${styles.padding} items-center rounded-full border transition-all duration-200 cursor-pointer ${disabled ? "opacity-30 cursor-not-allowed" : ""} ${getVariantColors()} ${className}`,
|
|
399
|
+
children: [
|
|
400
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
401
|
+
"input",
|
|
402
|
+
{
|
|
403
|
+
type: "checkbox",
|
|
404
|
+
role: "switch",
|
|
405
|
+
checked,
|
|
406
|
+
onChange: handleChange,
|
|
407
|
+
disabled,
|
|
408
|
+
"aria-label": ariaLabel,
|
|
409
|
+
id,
|
|
410
|
+
name,
|
|
411
|
+
className: "sr-only"
|
|
412
|
+
}
|
|
413
|
+
),
|
|
414
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
415
|
+
"span",
|
|
416
|
+
{
|
|
417
|
+
className: `inline-block ${styles.handle} rounded-full bg-background shadow-sm transition-transform duration-200 ${styles.translate}`
|
|
418
|
+
}
|
|
419
|
+
)
|
|
420
|
+
]
|
|
421
|
+
}
|
|
422
|
+
);
|
|
423
|
+
}
|
|
424
|
+
Switch.displayName = "Switch";
|
|
425
|
+
var switch_default = Switch;
|
|
426
|
+
function Slider({
|
|
427
|
+
value = 50,
|
|
428
|
+
onChange,
|
|
429
|
+
min = 0,
|
|
430
|
+
max = 100,
|
|
431
|
+
step = 1,
|
|
432
|
+
disabled = false,
|
|
433
|
+
className = "",
|
|
434
|
+
ariaLabel,
|
|
435
|
+
id,
|
|
436
|
+
name
|
|
437
|
+
}) {
|
|
438
|
+
const handleChange = (e) => {
|
|
439
|
+
onChange?.(Number(e.target.value));
|
|
440
|
+
};
|
|
441
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
442
|
+
"input",
|
|
443
|
+
{
|
|
444
|
+
type: "range",
|
|
445
|
+
value,
|
|
446
|
+
onChange: handleChange,
|
|
447
|
+
min,
|
|
448
|
+
max,
|
|
449
|
+
step,
|
|
450
|
+
disabled,
|
|
451
|
+
"aria-label": ariaLabel,
|
|
452
|
+
id,
|
|
453
|
+
name,
|
|
454
|
+
className: `w-full h-2 bg-muted/30 rounded-lg appearance-none cursor-pointer transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed hover:bg-muted/40 ${className}`,
|
|
455
|
+
style: {
|
|
456
|
+
background: `linear-gradient(to right, hsl(var(--primary)) 0%, hsl(var(--primary)) ${(value - min) / (max - min) * 100}%, hsl(var(--muted) / 0.3) ${(value - min) / (max - min) * 100}%, hsl(var(--muted) / 0.3) 100%)`
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
);
|
|
460
|
+
}
|
|
461
|
+
Slider.displayName = "Slider";
|
|
462
|
+
var slider_default = Slider;
|
|
463
|
+
function ButtonGroup({
|
|
464
|
+
children,
|
|
465
|
+
className = "",
|
|
466
|
+
variant = "default",
|
|
467
|
+
orientation = "horizontal"
|
|
468
|
+
}) {
|
|
469
|
+
const baseClasses = "inline-flex";
|
|
470
|
+
const orientationClasses = orientation === "horizontal" ? "flex-row" : "flex-col";
|
|
471
|
+
let variantClasses = "";
|
|
472
|
+
if (variant === "separated") {
|
|
473
|
+
variantClasses = "gap-2";
|
|
474
|
+
} else if (orientation === "horizontal") {
|
|
475
|
+
variantClasses = "[&>button]:rounded-none [&>button:first-child]:rounded-l-md [&>button:last-child]:rounded-r-md [&>button:not(:last-child)]:border-r-0";
|
|
476
|
+
} else {
|
|
477
|
+
variantClasses = "[&>button]:rounded-none [&>button:first-child]:rounded-t-md [&>button:last-child]:rounded-b-md [&>button:not(:last-child)]:border-b-0";
|
|
478
|
+
}
|
|
479
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${baseClasses} ${orientationClasses} ${variantClasses} ${className}`, children });
|
|
480
|
+
}
|
|
481
|
+
ButtonGroup.displayName = "ButtonGroup";
|
|
482
|
+
var button_group_default = ButtonGroup;
|
|
483
|
+
function RadioGroup({
|
|
484
|
+
children,
|
|
485
|
+
name: _name,
|
|
486
|
+
label,
|
|
487
|
+
orientation = "vertical",
|
|
488
|
+
className = ""
|
|
489
|
+
}) {
|
|
490
|
+
const orientationClasses = orientation === "horizontal" ? "flex flex-row gap-4" : "flex flex-col gap-2";
|
|
491
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className, children: [
|
|
492
|
+
label && /* @__PURE__ */ jsxRuntime.jsx("legend", { className: "text-sm font-medium text-foreground mb-2", children: label }),
|
|
493
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: orientationClasses, role: "radiogroup", children })
|
|
494
|
+
] });
|
|
495
|
+
}
|
|
496
|
+
RadioGroup.displayName = "RadioGroup";
|
|
497
|
+
var radio_group_default = RadioGroup;
|
|
498
|
+
function Text({
|
|
499
|
+
children,
|
|
500
|
+
variant = "body",
|
|
501
|
+
size,
|
|
502
|
+
weight = "semibold",
|
|
503
|
+
// elevated default weight
|
|
504
|
+
className = "",
|
|
505
|
+
noMargin = false
|
|
506
|
+
}) {
|
|
507
|
+
const variantClasses = {
|
|
508
|
+
body: "text-foreground",
|
|
509
|
+
muted: "text-muted-foreground",
|
|
510
|
+
small: "text-muted-foreground"
|
|
511
|
+
};
|
|
512
|
+
const sizeClasses = {
|
|
513
|
+
xs: "text-xs",
|
|
514
|
+
sm: "text-sm",
|
|
515
|
+
base: "text-base",
|
|
516
|
+
lg: "text-lg",
|
|
517
|
+
xl: "text-xl"
|
|
518
|
+
};
|
|
519
|
+
const weightClasses = {
|
|
520
|
+
normal: "font-normal",
|
|
521
|
+
medium: "font-medium",
|
|
522
|
+
semibold: "font-semibold",
|
|
523
|
+
bold: "font-bold"
|
|
524
|
+
};
|
|
525
|
+
const defaultSizes = {
|
|
526
|
+
body: "lg",
|
|
527
|
+
// bigger default body text
|
|
528
|
+
muted: "base",
|
|
529
|
+
// muted still readable
|
|
530
|
+
small: "sm"
|
|
531
|
+
// small bumped up slightly
|
|
532
|
+
};
|
|
533
|
+
const finalSize = size || defaultSizes[variant];
|
|
534
|
+
const margin = noMargin ? "" : "mb-4";
|
|
535
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
536
|
+
"p",
|
|
537
|
+
{
|
|
538
|
+
className: `${variantClasses[variant]} ${sizeClasses[finalSize]} ${weightClasses[weight]} ${margin} ${className}`,
|
|
539
|
+
children
|
|
540
|
+
}
|
|
541
|
+
);
|
|
542
|
+
}
|
|
543
|
+
Text.displayName = "Text";
|
|
544
|
+
var text_default = Text;
|
|
545
|
+
function Stack({
|
|
546
|
+
children,
|
|
547
|
+
className = "",
|
|
548
|
+
direction = "vertical",
|
|
549
|
+
spacing = "md",
|
|
550
|
+
align = "stretch",
|
|
551
|
+
justify
|
|
552
|
+
}) {
|
|
553
|
+
const spacingClasses = {
|
|
554
|
+
none: "gap-0",
|
|
555
|
+
sm: "gap-2",
|
|
556
|
+
md: "gap-4",
|
|
557
|
+
lg: "gap-6",
|
|
558
|
+
xl: "gap-8"
|
|
559
|
+
};
|
|
560
|
+
const alignClasses = {
|
|
561
|
+
start: "items-start",
|
|
562
|
+
center: "items-center",
|
|
563
|
+
end: "items-end",
|
|
564
|
+
stretch: "items-stretch"
|
|
565
|
+
};
|
|
566
|
+
const justifyClasses = {
|
|
567
|
+
start: "justify-start",
|
|
568
|
+
center: "justify-center",
|
|
569
|
+
end: "justify-end",
|
|
570
|
+
between: "justify-between",
|
|
571
|
+
around: "justify-around"
|
|
572
|
+
};
|
|
573
|
+
const directionClass = direction === "horizontal" ? "flex-row" : "flex-col";
|
|
574
|
+
const justifyClass = justify ? justifyClasses[justify] : "";
|
|
575
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
576
|
+
"div",
|
|
577
|
+
{
|
|
578
|
+
"data-component": "Stack",
|
|
579
|
+
className: `flex ${directionClass} ${spacingClasses[spacing]} ${alignClasses[align]} ${justifyClass} ${className}`,
|
|
580
|
+
children
|
|
581
|
+
}
|
|
582
|
+
);
|
|
583
|
+
}
|
|
584
|
+
Stack.displayName = "Stack";
|
|
585
|
+
var stack_default = Stack;
|
|
586
|
+
function FormField({
|
|
587
|
+
children,
|
|
588
|
+
label,
|
|
589
|
+
htmlFor,
|
|
590
|
+
error,
|
|
591
|
+
helperText,
|
|
592
|
+
required = false,
|
|
593
|
+
className = "",
|
|
594
|
+
validationState = "default"
|
|
595
|
+
}) {
|
|
596
|
+
const effectiveValidationState = error ? "error" : validationState;
|
|
597
|
+
const childWithValidation = react.isValidElement(children) ? react.cloneElement(children, {
|
|
598
|
+
validationState: effectiveValidationState
|
|
599
|
+
}) : children;
|
|
600
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(stack_default, { direction: "vertical", spacing: "sm", className, children: [
|
|
601
|
+
label && /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor, children: /* @__PURE__ */ jsxRuntime.jsxs(text_default, { variant: "body", size: "sm", noMargin: true, className: "font-medium", children: [
|
|
602
|
+
label,
|
|
603
|
+
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive ml-1", children: "*" })
|
|
604
|
+
] }) }),
|
|
605
|
+
childWithValidation,
|
|
606
|
+
error && /* @__PURE__ */ jsxRuntime.jsx(text_default, { variant: "body", size: "sm", noMargin: true, className: "text-destructive", children: error }),
|
|
607
|
+
!error && helperText && /* @__PURE__ */ jsxRuntime.jsx(text_default, { variant: "muted", size: "sm", noMargin: true, children: helperText })
|
|
608
|
+
] });
|
|
609
|
+
}
|
|
610
|
+
FormField.displayName = "FormField";
|
|
611
|
+
var form_field_default = FormField;
|
|
612
|
+
function InputGroup({ children, prefix, suffix, className = "" }) {
|
|
613
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex items-stretch ${className}`, children: [
|
|
614
|
+
prefix && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center px-3 bg-muted border border-r-0 border-input rounded-l-md", children: prefix }),
|
|
615
|
+
children,
|
|
616
|
+
suffix && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center px-3 bg-muted border border-l-0 border-input rounded-r-md", children: suffix })
|
|
617
|
+
] });
|
|
618
|
+
}
|
|
619
|
+
InputGroup.displayName = "InputGroup";
|
|
620
|
+
var input_group_default = InputGroup;
|
|
621
|
+
function Nav({ children, className = "", ariaLabel = "Main navigation" }) {
|
|
622
|
+
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": ariaLabel, className: `flex items-center ${className}`, children });
|
|
623
|
+
}
|
|
624
|
+
Nav.displayName = "Nav";
|
|
625
|
+
var nav_default = Nav;
|
|
626
|
+
function Container({
|
|
627
|
+
children,
|
|
628
|
+
className = "",
|
|
629
|
+
size = "lg",
|
|
630
|
+
padding = "lg",
|
|
631
|
+
align = "center"
|
|
632
|
+
}) {
|
|
633
|
+
const sizeClasses = {
|
|
634
|
+
sm: "max-w-screen-sm",
|
|
635
|
+
md: "max-w-screen-md",
|
|
636
|
+
lg: "max-w-screen-lg",
|
|
637
|
+
xl: "max-w-screen-xl",
|
|
638
|
+
full: "max-w-full"
|
|
639
|
+
};
|
|
640
|
+
const paddingClasses = {
|
|
641
|
+
none: "",
|
|
642
|
+
sm: "py-6",
|
|
643
|
+
md: "py-8",
|
|
644
|
+
lg: "py-12",
|
|
645
|
+
xl: "py-16"
|
|
646
|
+
};
|
|
647
|
+
const alignClasses = {
|
|
648
|
+
start: "mr-auto",
|
|
649
|
+
center: "mx-auto",
|
|
650
|
+
end: "ml-auto"
|
|
651
|
+
};
|
|
652
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `px-4 ${sizeClasses[size]} ${paddingClasses[padding]} ${alignClasses[align]} ${className}`, children });
|
|
653
|
+
}
|
|
654
|
+
Container.displayName = "Container";
|
|
655
|
+
var container_default = Container;
|
|
656
|
+
function Navbar({
|
|
657
|
+
brand,
|
|
658
|
+
children,
|
|
659
|
+
sticky = true,
|
|
660
|
+
className = "",
|
|
661
|
+
actions,
|
|
662
|
+
size = "xl",
|
|
663
|
+
appearance = "solid",
|
|
664
|
+
border = "none",
|
|
665
|
+
disableMobileMenu = false
|
|
666
|
+
}) {
|
|
667
|
+
const [mobileMenuOpen, setMobileMenuOpen] = react.useState(false);
|
|
668
|
+
const appearanceClasses = {
|
|
669
|
+
solid: "bg-background",
|
|
670
|
+
blur: "bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/80",
|
|
671
|
+
transparent: "bg-transparent"
|
|
672
|
+
};
|
|
673
|
+
const borderClasses = {
|
|
674
|
+
none: "",
|
|
675
|
+
bottom: "border-b border-border",
|
|
676
|
+
top: "border-t border-border",
|
|
677
|
+
both: "border-y border-border"
|
|
678
|
+
};
|
|
679
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
680
|
+
"nav",
|
|
681
|
+
{
|
|
682
|
+
className: `${sticky ? "sticky top-0 z-50" : ""} ${appearanceClasses[appearance]} ${borderClasses[border]} ${className}`,
|
|
683
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(container_default, { padding: "none", size, children: [
|
|
684
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between h-16", children: [
|
|
685
|
+
brand && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0", children: brand }),
|
|
686
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden md:flex md:items-center md:space-x-6 md:flex-1 md:ml-10", children }),
|
|
687
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${disableMobileMenu ? "flex" : "hidden md:flex"} items-center space-x-4`, children: actions }),
|
|
688
|
+
!disableMobileMenu && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "md:hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
689
|
+
button_default,
|
|
690
|
+
{
|
|
691
|
+
variant: "neutral",
|
|
692
|
+
style: "ghost",
|
|
693
|
+
size: "sm",
|
|
694
|
+
icon: mobileMenuOpen ? /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconX, { size: 24 }) : /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconMenu2, { size: 24 }),
|
|
695
|
+
ariaLabel: "Toggle menu",
|
|
696
|
+
onClick: () => setMobileMenuOpen(!mobileMenuOpen)
|
|
697
|
+
}
|
|
698
|
+
) })
|
|
699
|
+
] }),
|
|
700
|
+
!disableMobileMenu && mobileMenuOpen && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "md:hidden py-4 space-y-3 border-t border-border", children: [
|
|
701
|
+
children,
|
|
702
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pt-4 border-t border-border space-y-2", children: actions })
|
|
703
|
+
] })
|
|
704
|
+
] })
|
|
705
|
+
}
|
|
706
|
+
);
|
|
707
|
+
}
|
|
708
|
+
Navbar.displayName = "Navbar";
|
|
709
|
+
var navbar_default = Navbar;
|
|
710
|
+
function NavbarBrand({ children, href, external = false, onClick, className = "" }) {
|
|
711
|
+
const content = /* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-lg md:text-xl font-bold ${className}`, children });
|
|
712
|
+
const linkClassName = "no-underline text-foreground hover:text-primary transition-colors";
|
|
713
|
+
if (href) {
|
|
714
|
+
if (external) {
|
|
715
|
+
return /* @__PURE__ */ jsxRuntime.jsx("a", { href, className: linkClassName, target: "_blank", rel: "noopener noreferrer", children: content });
|
|
716
|
+
}
|
|
717
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Link, { to: href, className: linkClassName, children: content });
|
|
718
|
+
}
|
|
719
|
+
if (onClick) {
|
|
720
|
+
return /* @__PURE__ */ jsxRuntime.jsx("button", { onClick, className: linkClassName, children: content });
|
|
721
|
+
}
|
|
722
|
+
return content;
|
|
723
|
+
}
|
|
724
|
+
NavbarBrand.displayName = "NavbarBrand";
|
|
725
|
+
var navbar_brand_default = NavbarBrand;
|
|
726
|
+
function NavbarLink({ href, children, external = false, className = "", end = false }) {
|
|
727
|
+
const baseClassName = `block md:inline-block py-2 md:py-0 font-medium transition-colors no-underline ${className}`;
|
|
728
|
+
if (external) {
|
|
729
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
730
|
+
"a",
|
|
731
|
+
{
|
|
732
|
+
href,
|
|
733
|
+
target: "_blank",
|
|
734
|
+
rel: "noopener noreferrer",
|
|
735
|
+
className: `${baseClassName} text-foreground hover:text-primary`,
|
|
736
|
+
children
|
|
737
|
+
}
|
|
738
|
+
);
|
|
739
|
+
}
|
|
740
|
+
if (href.startsWith("#")) {
|
|
741
|
+
return /* @__PURE__ */ jsxRuntime.jsx("a", { href, className: `${baseClassName} text-foreground hover:text-primary`, children });
|
|
742
|
+
}
|
|
743
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
744
|
+
reactRouterDom.NavLink,
|
|
745
|
+
{
|
|
746
|
+
to: href,
|
|
747
|
+
end,
|
|
748
|
+
className: ({ isActive }) => `${baseClassName} ${isActive ? "text-primary font-semibold border-b-2 border-primary" : "text-foreground hover:text-primary"}`,
|
|
749
|
+
children
|
|
750
|
+
}
|
|
751
|
+
);
|
|
752
|
+
}
|
|
753
|
+
NavbarLink.displayName = "NavbarLink";
|
|
754
|
+
var navbar_link_default = NavbarLink;
|
|
755
|
+
function Tabs({ tabs, defaultTab, className = "", ariaLabel = "Tabs" }) {
|
|
756
|
+
const [activeTab, setActiveTab] = react.useState(defaultTab || tabs[0]?.id);
|
|
757
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, children: [
|
|
758
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { role: "tablist", "aria-label": ariaLabel, className: "flex border-b-2 border-border/50", children: tabs.map((tab) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
759
|
+
"button",
|
|
760
|
+
{
|
|
761
|
+
role: "tab",
|
|
762
|
+
"aria-selected": activeTab === tab.id,
|
|
763
|
+
"aria-controls": `panel-${tab.id}`,
|
|
764
|
+
id: `tab-${tab.id}`,
|
|
765
|
+
onClick: () => setActiveTab(tab.id),
|
|
766
|
+
className: `px-4 py-3 font-medium cursor-pointer transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 relative ${activeTab === tab.id ? "text-primary after:absolute after:bottom-0 after:left-0 after:right-0 after:h-0.5 after:bg-primary after:rounded-t" : "text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,
|
|
767
|
+
children: tab.label
|
|
768
|
+
},
|
|
769
|
+
tab.id
|
|
770
|
+
)) }),
|
|
771
|
+
tabs.map((tab) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
772
|
+
"div",
|
|
773
|
+
{
|
|
774
|
+
role: "tabpanel",
|
|
775
|
+
id: `panel-${tab.id}`,
|
|
776
|
+
"aria-labelledby": `tab-${tab.id}`,
|
|
777
|
+
hidden: activeTab !== tab.id,
|
|
778
|
+
className: "pt-6",
|
|
779
|
+
children: tab.content
|
|
780
|
+
},
|
|
781
|
+
tab.id
|
|
782
|
+
))
|
|
783
|
+
] });
|
|
784
|
+
}
|
|
785
|
+
Tabs.displayName = "Tabs";
|
|
786
|
+
var tabs_default = Tabs;
|
|
787
|
+
function Dropdown({ trigger, children, className = "" }) {
|
|
788
|
+
const [isOpen, setIsOpen] = react.useState(false);
|
|
789
|
+
const dropdownRef = react.useRef(null);
|
|
790
|
+
react.useEffect(() => {
|
|
791
|
+
const handleClickOutside = (event) => {
|
|
792
|
+
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
793
|
+
setIsOpen(false);
|
|
794
|
+
}
|
|
795
|
+
};
|
|
796
|
+
const handleEscape = (event) => {
|
|
797
|
+
if (event.key === "Escape") {
|
|
798
|
+
setIsOpen(false);
|
|
799
|
+
}
|
|
800
|
+
};
|
|
801
|
+
if (isOpen) {
|
|
802
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
803
|
+
document.addEventListener("keydown", handleEscape);
|
|
804
|
+
return () => {
|
|
805
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
806
|
+
document.removeEventListener("keydown", handleEscape);
|
|
807
|
+
};
|
|
808
|
+
}
|
|
809
|
+
return void 0;
|
|
810
|
+
}, [isOpen]);
|
|
811
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: dropdownRef, className: `relative ${className}`, children: [
|
|
812
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
813
|
+
"button",
|
|
814
|
+
{
|
|
815
|
+
onClick: () => setIsOpen(!isOpen),
|
|
816
|
+
className: "bg-transparent border-0 p-0 cursor-pointer outline-none",
|
|
817
|
+
type: "button",
|
|
818
|
+
"aria-expanded": isOpen,
|
|
819
|
+
"aria-haspopup": "true",
|
|
820
|
+
children: trigger
|
|
821
|
+
}
|
|
822
|
+
),
|
|
823
|
+
isOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
824
|
+
"div",
|
|
825
|
+
{
|
|
826
|
+
className: "absolute left-0 mt-2 bg-popover text-popover-foreground border border-border rounded-lg shadow-xl z-50 min-w-[180px] animate-scaleIn",
|
|
827
|
+
onClick: () => setIsOpen(false),
|
|
828
|
+
onKeyDown: (e) => e.key === "Enter" && setIsOpen(false),
|
|
829
|
+
role: "menu",
|
|
830
|
+
tabIndex: -1,
|
|
831
|
+
children
|
|
832
|
+
}
|
|
833
|
+
)
|
|
834
|
+
] });
|
|
835
|
+
}
|
|
836
|
+
Dropdown.displayName = "Dropdown";
|
|
837
|
+
var dropdown_default = Dropdown;
|
|
838
|
+
function Breadcrumbs({ items, separator = "/", className = "" }) {
|
|
839
|
+
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Breadcrumb", className, children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "flex items-center space-x-2 text-sm", children: items.map((item, index) => {
|
|
840
|
+
const isLast = index === items.length - 1;
|
|
841
|
+
const key = item.href || item.label;
|
|
842
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-center", children: [
|
|
843
|
+
item.href && !isLast ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
844
|
+
"a",
|
|
845
|
+
{
|
|
846
|
+
href: item.href,
|
|
847
|
+
className: "text-primary hover:text-primary/80 hover:underline cursor-pointer transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-ring rounded px-1 -mx-1",
|
|
848
|
+
children: item.label
|
|
849
|
+
}
|
|
850
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: isLast ? "text-foreground font-medium" : "text-muted-foreground", children: item.label }),
|
|
851
|
+
!isLast && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mx-2 text-muted-foreground select-none", "aria-hidden": "true", children: separator })
|
|
852
|
+
] }, key);
|
|
853
|
+
}) }) });
|
|
854
|
+
}
|
|
855
|
+
Breadcrumbs.displayName = "Breadcrumbs";
|
|
856
|
+
var breadcrumbs_default = Breadcrumbs;
|
|
857
|
+
function Pagination({
|
|
858
|
+
currentPage,
|
|
859
|
+
totalPages,
|
|
860
|
+
onPageChange,
|
|
861
|
+
siblingCount = 1,
|
|
862
|
+
className = ""
|
|
863
|
+
}) {
|
|
864
|
+
const getPageNumbers = () => {
|
|
865
|
+
const pages = [];
|
|
866
|
+
const leftSibling = Math.max(currentPage - siblingCount, 1);
|
|
867
|
+
const rightSibling = Math.min(currentPage + siblingCount, totalPages);
|
|
868
|
+
if (leftSibling > 2) {
|
|
869
|
+
pages.push(1, "...");
|
|
870
|
+
} else {
|
|
871
|
+
for (let i = 1; i < leftSibling; i++) {
|
|
872
|
+
pages.push(i);
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
for (let i = leftSibling; i <= rightSibling; i++) {
|
|
876
|
+
pages.push(i);
|
|
877
|
+
}
|
|
878
|
+
if (rightSibling < totalPages - 1) {
|
|
879
|
+
pages.push("...", totalPages);
|
|
880
|
+
} else {
|
|
881
|
+
for (let i = rightSibling + 1; i <= totalPages; i++) {
|
|
882
|
+
pages.push(i);
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
return pages;
|
|
886
|
+
};
|
|
887
|
+
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Pagination", className, children: /* @__PURE__ */ jsxRuntime.jsxs("ul", { className: "flex items-center space-x-1", children: [
|
|
888
|
+
/* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
889
|
+
"button",
|
|
890
|
+
{
|
|
891
|
+
onClick: () => onPageChange(currentPage - 1),
|
|
892
|
+
disabled: currentPage === 1,
|
|
893
|
+
className: "px-3 py-2 rounded-lg border border-border hover:bg-accent hover:text-accent-foreground transition-colors duration-200 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-ring",
|
|
894
|
+
"aria-label": "Previous page",
|
|
895
|
+
children: "\u2190"
|
|
896
|
+
}
|
|
897
|
+
) }),
|
|
898
|
+
getPageNumbers().map((page, index) => {
|
|
899
|
+
const key = typeof page === "number" ? `page-${page}` : `ellipsis-${index}`;
|
|
900
|
+
return /* @__PURE__ */ jsxRuntime.jsx("li", { children: typeof page === "number" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
901
|
+
"button",
|
|
902
|
+
{
|
|
903
|
+
onClick: () => onPageChange(page),
|
|
904
|
+
className: `px-3 py-2 rounded-lg border cursor-pointer transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-ring ${page === currentPage ? "bg-primary text-primary-foreground border-primary shadow-sm" : "border-border hover:bg-accent hover:text-accent-foreground hover:border-accent"}`,
|
|
905
|
+
"aria-label": `Page ${page}`,
|
|
906
|
+
"aria-current": page === currentPage ? "page" : void 0,
|
|
907
|
+
children: page
|
|
908
|
+
}
|
|
909
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-3 py-2 text-muted-foreground", children: "..." }) }, key);
|
|
910
|
+
}),
|
|
911
|
+
/* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
912
|
+
"button",
|
|
913
|
+
{
|
|
914
|
+
onClick: () => onPageChange(currentPage + 1),
|
|
915
|
+
disabled: currentPage === totalPages,
|
|
916
|
+
className: "px-3 py-2 rounded-lg border border-border hover:bg-accent hover:text-accent-foreground transition-colors duration-200 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-ring",
|
|
917
|
+
"aria-label": "Next page",
|
|
918
|
+
children: "\u2192"
|
|
919
|
+
}
|
|
920
|
+
) })
|
|
921
|
+
] }) });
|
|
922
|
+
}
|
|
923
|
+
Pagination.displayName = "Pagination";
|
|
924
|
+
var pagination_default = Pagination;
|
|
925
|
+
function Sidebar({ children, className = "", width = "16rem" }) {
|
|
926
|
+
const widthClass = width === "16rem" ? "w-64" : width === "4rem" ? "w-16" : "";
|
|
927
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
928
|
+
"nav",
|
|
929
|
+
{
|
|
930
|
+
className: `bg-muted border-r border-border ${widthClass || ""} ${className}`,
|
|
931
|
+
style: !widthClass ? { width } : void 0,
|
|
932
|
+
"aria-label": "Sidebar navigation",
|
|
933
|
+
children
|
|
934
|
+
}
|
|
935
|
+
);
|
|
936
|
+
}
|
|
937
|
+
Sidebar.displayName = "Sidebar";
|
|
938
|
+
var sidebar_default = Sidebar;
|
|
939
|
+
function Stepper({
|
|
940
|
+
steps,
|
|
941
|
+
currentStep,
|
|
942
|
+
className = "",
|
|
943
|
+
orientation = "horizontal",
|
|
944
|
+
onStepClick,
|
|
945
|
+
clickable = false
|
|
946
|
+
}) {
|
|
947
|
+
const getStepStatus = (index) => {
|
|
948
|
+
const step = steps[index];
|
|
949
|
+
if (step.status) return step.status;
|
|
950
|
+
if (index < currentStep) return "completed";
|
|
951
|
+
if (index === currentStep) return "current";
|
|
952
|
+
return "pending";
|
|
953
|
+
};
|
|
954
|
+
const renderStep = (step, index) => {
|
|
955
|
+
const status = getStepStatus(index) || "pending";
|
|
956
|
+
const isClickable = clickable && status !== "pending";
|
|
957
|
+
const statusStyles = {
|
|
958
|
+
pending: {
|
|
959
|
+
circle: "bg-muted text-muted-foreground border-2 border-muted",
|
|
960
|
+
title: "text-muted-foreground",
|
|
961
|
+
description: "text-muted-foreground"
|
|
962
|
+
},
|
|
963
|
+
current: {
|
|
964
|
+
circle: "bg-primary text-primary-foreground border-2 border-primary",
|
|
965
|
+
title: "text-foreground font-semibold",
|
|
966
|
+
description: "text-muted-foreground"
|
|
967
|
+
},
|
|
968
|
+
completed: {
|
|
969
|
+
circle: "bg-success text-success-foreground border-2 border-success",
|
|
970
|
+
title: "text-foreground",
|
|
971
|
+
description: "text-muted-foreground"
|
|
972
|
+
},
|
|
973
|
+
error: {
|
|
974
|
+
circle: "bg-destructive text-destructive-foreground border-2 border-destructive",
|
|
975
|
+
title: "text-destructive",
|
|
976
|
+
description: "text-destructive"
|
|
977
|
+
}
|
|
978
|
+
};
|
|
979
|
+
const styles = statusStyles[status];
|
|
980
|
+
const handleClick = () => {
|
|
981
|
+
if (isClickable && onStepClick) {
|
|
982
|
+
onStepClick(index);
|
|
983
|
+
}
|
|
984
|
+
};
|
|
985
|
+
const handleKeyDown = (e) => {
|
|
986
|
+
if (isClickable && onStepClick && (e.key === "Enter" || e.key === " ")) {
|
|
987
|
+
e.preventDefault();
|
|
988
|
+
onStepClick(index);
|
|
989
|
+
}
|
|
990
|
+
};
|
|
991
|
+
if (orientation === "horizontal") {
|
|
992
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
993
|
+
"div",
|
|
994
|
+
{
|
|
995
|
+
className: `flex-1 flex flex-col items-center ${isClickable ? "cursor-pointer" : ""}`,
|
|
996
|
+
onClick: handleClick,
|
|
997
|
+
onKeyDown: handleKeyDown,
|
|
998
|
+
role: isClickable ? "button" : void 0,
|
|
999
|
+
tabIndex: isClickable ? 0 : void 0,
|
|
1000
|
+
"aria-label": isClickable ? `Go to step ${index + 1}: ${step.title}` : void 0,
|
|
1001
|
+
children: [
|
|
1002
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center w-full", children: [
|
|
1003
|
+
index > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1004
|
+
"div",
|
|
1005
|
+
{
|
|
1006
|
+
className: `h-0.5 flex-1 ${status === "completed" || status === "current" ? "bg-success" : "bg-muted"}`
|
|
1007
|
+
}
|
|
1008
|
+
),
|
|
1009
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1010
|
+
"div",
|
|
1011
|
+
{
|
|
1012
|
+
className: `
|
|
1013
|
+
relative z-10 flex items-center justify-center
|
|
1014
|
+
w-10 h-10 rounded-full transition-colors
|
|
1015
|
+
${styles.circle}
|
|
1016
|
+
`,
|
|
1017
|
+
children: status === "completed" ? /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconCheck, { className: "w-5 h-5" }) : step.icon ? step.icon : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold", children: index + 1 })
|
|
1018
|
+
}
|
|
1019
|
+
),
|
|
1020
|
+
index < steps.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `h-0.5 flex-1 ${status === "completed" ? "bg-success" : "bg-muted"}` })
|
|
1021
|
+
] }),
|
|
1022
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 text-center", children: [
|
|
1023
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `text-sm ${styles.title}`, children: [
|
|
1024
|
+
step.title,
|
|
1025
|
+
step.optional && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-xs text-muted-foreground", children: "(Optional)" })
|
|
1026
|
+
] }),
|
|
1027
|
+
step.description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `text-xs mt-1 ${styles.description}`, children: step.description })
|
|
1028
|
+
] })
|
|
1029
|
+
]
|
|
1030
|
+
},
|
|
1031
|
+
index
|
|
1032
|
+
);
|
|
1033
|
+
}
|
|
1034
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1035
|
+
"div",
|
|
1036
|
+
{
|
|
1037
|
+
className: `flex gap-4 ${index < steps.length - 1 ? "pb-8" : ""} ${isClickable ? "cursor-pointer" : ""}`,
|
|
1038
|
+
onClick: handleClick,
|
|
1039
|
+
onKeyDown: handleKeyDown,
|
|
1040
|
+
role: isClickable ? "button" : void 0,
|
|
1041
|
+
tabIndex: isClickable ? 0 : void 0,
|
|
1042
|
+
"aria-label": isClickable ? `Go to step ${index + 1}: ${step.title}` : void 0,
|
|
1043
|
+
children: [
|
|
1044
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [
|
|
1045
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1046
|
+
"div",
|
|
1047
|
+
{
|
|
1048
|
+
className: `
|
|
1049
|
+
flex items-center justify-center
|
|
1050
|
+
w-10 h-10 rounded-full transition-colors flex-shrink-0
|
|
1051
|
+
${styles.circle}
|
|
1052
|
+
`,
|
|
1053
|
+
children: status === "completed" ? /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconCheck, { className: "w-5 h-5" }) : step.icon ? step.icon : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold", children: index + 1 })
|
|
1054
|
+
}
|
|
1055
|
+
),
|
|
1056
|
+
index < steps.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-0.5 flex-1 mt-2 ${status === "completed" ? "bg-success" : "bg-muted"}` })
|
|
1057
|
+
] }),
|
|
1058
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 pt-2", children: [
|
|
1059
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `text-base ${styles.title}`, children: [
|
|
1060
|
+
step.title,
|
|
1061
|
+
step.optional && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2 text-xs text-muted-foreground", children: "(Optional)" })
|
|
1062
|
+
] }),
|
|
1063
|
+
step.description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `text-sm mt-1 ${styles.description}`, children: step.description })
|
|
1064
|
+
] })
|
|
1065
|
+
]
|
|
1066
|
+
},
|
|
1067
|
+
index
|
|
1068
|
+
);
|
|
1069
|
+
};
|
|
1070
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1071
|
+
"div",
|
|
1072
|
+
{
|
|
1073
|
+
className: `
|
|
1074
|
+
${orientation === "horizontal" ? "flex items-start" : "flex flex-col"}
|
|
1075
|
+
${className}
|
|
1076
|
+
`,
|
|
1077
|
+
children: steps.map((step, index) => renderStep(step, index))
|
|
1078
|
+
}
|
|
1079
|
+
);
|
|
1080
|
+
}
|
|
1081
|
+
Stepper.displayName = "Stepper";
|
|
1082
|
+
var stepper_default = Stepper;
|
|
1083
|
+
function Toast({ message, children, type = "info", onClose, className = "" }) {
|
|
1084
|
+
const typeClasses = {
|
|
1085
|
+
info: "bg-info text-info-foreground",
|
|
1086
|
+
success: "bg-success text-success-foreground",
|
|
1087
|
+
warning: "bg-warning text-warning-foreground",
|
|
1088
|
+
error: "bg-destructive text-destructive-foreground"
|
|
1089
|
+
};
|
|
1090
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1091
|
+
"div",
|
|
1092
|
+
{
|
|
1093
|
+
role: "alert",
|
|
1094
|
+
"aria-live": "polite",
|
|
1095
|
+
className: `fixed bottom-4 right-4 px-4 py-3 rounded-md shadow-lg ${typeClasses[type]} ${className}`,
|
|
1096
|
+
children: [
|
|
1097
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: children || message }),
|
|
1098
|
+
onClose && /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onClose, className: "ml-4 font-bold", "aria-label": "Close", children: "\xD7" })
|
|
1099
|
+
]
|
|
1100
|
+
}
|
|
1101
|
+
);
|
|
1102
|
+
}
|
|
1103
|
+
Toast.displayName = "Toast";
|
|
1104
|
+
var toast_default = Toast;
|
|
1105
|
+
function Tooltip({
|
|
1106
|
+
children,
|
|
1107
|
+
content,
|
|
1108
|
+
position = "top",
|
|
1109
|
+
variant = "default",
|
|
1110
|
+
open = false,
|
|
1111
|
+
usePortal = false,
|
|
1112
|
+
className = ""
|
|
1113
|
+
}) {
|
|
1114
|
+
const [showTooltip, setShowTooltip] = react.useState(false);
|
|
1115
|
+
const [tooltipPosition, setTooltipPosition] = react.useState({ top: 0, left: 0 });
|
|
1116
|
+
const triggerRef = react.useRef(null);
|
|
1117
|
+
const isVisible = open || showTooltip;
|
|
1118
|
+
react.useEffect(() => {
|
|
1119
|
+
if (usePortal && isVisible && triggerRef.current) {
|
|
1120
|
+
const rect = triggerRef.current.getBoundingClientRect();
|
|
1121
|
+
const positions = {
|
|
1122
|
+
top: {
|
|
1123
|
+
top: rect.top - 8,
|
|
1124
|
+
left: rect.left + rect.width / 2
|
|
1125
|
+
},
|
|
1126
|
+
bottom: {
|
|
1127
|
+
top: rect.bottom + 8,
|
|
1128
|
+
left: rect.left + rect.width / 2
|
|
1129
|
+
},
|
|
1130
|
+
left: {
|
|
1131
|
+
top: rect.top + rect.height / 2,
|
|
1132
|
+
left: rect.left - 8
|
|
1133
|
+
},
|
|
1134
|
+
right: {
|
|
1135
|
+
top: rect.top + rect.height / 2,
|
|
1136
|
+
left: rect.right + 8
|
|
1137
|
+
}
|
|
1138
|
+
};
|
|
1139
|
+
setTooltipPosition(positions[position]);
|
|
1140
|
+
}
|
|
1141
|
+
}, [usePortal, isVisible, position]);
|
|
1142
|
+
const variantClasses = {
|
|
1143
|
+
default: "bg-popover text-popover-foreground",
|
|
1144
|
+
primary: "bg-primary text-primary-foreground",
|
|
1145
|
+
secondary: "bg-secondary text-secondary-foreground",
|
|
1146
|
+
accent: "bg-accent text-accent-foreground",
|
|
1147
|
+
info: "bg-blue-500 text-white",
|
|
1148
|
+
success: "bg-green-500 text-white",
|
|
1149
|
+
warning: "bg-yellow-500 text-gray-900",
|
|
1150
|
+
error: "bg-red-500 text-white",
|
|
1151
|
+
neutral: "bg-gray-700 text-white dark:bg-gray-300 dark:text-gray-900"
|
|
1152
|
+
};
|
|
1153
|
+
const arrowColorClasses = {
|
|
1154
|
+
default: "before:border-popover",
|
|
1155
|
+
primary: "before:border-primary",
|
|
1156
|
+
secondary: "before:border-secondary",
|
|
1157
|
+
accent: "before:border-accent",
|
|
1158
|
+
info: "before:border-blue-500",
|
|
1159
|
+
success: "before:border-green-500",
|
|
1160
|
+
warning: "before:border-yellow-500",
|
|
1161
|
+
error: "before:border-red-500",
|
|
1162
|
+
neutral: "before:border-gray-700 dark:before:border-gray-300"
|
|
1163
|
+
};
|
|
1164
|
+
const portalPositionClasses = {
|
|
1165
|
+
top: "-translate-x-1/2 -translate-y-full before:left-1/2 before:-translate-x-1/2 before:top-full before:border-l-transparent before:border-r-transparent before:border-b-transparent",
|
|
1166
|
+
bottom: "-translate-x-1/2 before:left-1/2 before:-translate-x-1/2 before:bottom-full before:border-l-transparent before:border-r-transparent before:border-t-transparent",
|
|
1167
|
+
left: "-translate-x-full -translate-y-1/2 before:left-full before:top-1/2 before:-translate-y-1/2 before:border-t-transparent before:border-b-transparent before:border-r-transparent",
|
|
1168
|
+
right: "-translate-y-1/2 before:right-full before:top-1/2 before:-translate-y-1/2 before:border-t-transparent before:border-b-transparent before:border-l-transparent"
|
|
1169
|
+
};
|
|
1170
|
+
const absolutePositionClasses = {
|
|
1171
|
+
top: "bottom-full left-1/2 -translate-x-1/2 mb-2 before:left-1/2 before:-translate-x-1/2 before:top-full before:border-l-transparent before:border-r-transparent before:border-b-transparent",
|
|
1172
|
+
bottom: "top-full left-1/2 -translate-x-1/2 mt-2 before:left-1/2 before:-translate-x-1/2 before:bottom-full before:border-l-transparent before:border-r-transparent before:border-t-transparent",
|
|
1173
|
+
left: "right-full top-1/2 -translate-y-1/2 mr-2 before:top-1/2 before:-translate-y-1/2 before:left-full before:border-t-transparent before:border-b-transparent before:border-r-transparent",
|
|
1174
|
+
right: "left-full top-1/2 -translate-y-1/2 ml-2 before:top-1/2 before:-translate-y-1/2 before:right-full before:border-t-transparent before:border-b-transparent before:border-l-transparent"
|
|
1175
|
+
};
|
|
1176
|
+
const positionClasses = usePortal ? portalPositionClasses : absolutePositionClasses;
|
|
1177
|
+
const tooltipContent = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1178
|
+
"span",
|
|
1179
|
+
{
|
|
1180
|
+
className: `
|
|
1181
|
+
${usePortal ? "fixed" : "absolute"}
|
|
1182
|
+
z-[9999]
|
|
1183
|
+
px-3 py-2
|
|
1184
|
+
text-sm font-medium
|
|
1185
|
+
rounded-lg
|
|
1186
|
+
shadow-lg
|
|
1187
|
+
whitespace-nowrap
|
|
1188
|
+
pointer-events-none
|
|
1189
|
+
transition-opacity duration-200
|
|
1190
|
+
${variantClasses[variant]}
|
|
1191
|
+
${positionClasses[position]}
|
|
1192
|
+
${arrowColorClasses[variant]}
|
|
1193
|
+
${isVisible ? "opacity-100 visible" : "opacity-0 invisible"}
|
|
1194
|
+
before:content-['']
|
|
1195
|
+
before:absolute
|
|
1196
|
+
before:border-4
|
|
1197
|
+
before:border-solid
|
|
1198
|
+
`,
|
|
1199
|
+
style: usePortal ? {
|
|
1200
|
+
top: `${tooltipPosition.top}px`,
|
|
1201
|
+
left: `${tooltipPosition.left}px`
|
|
1202
|
+
} : void 0,
|
|
1203
|
+
role: "tooltip",
|
|
1204
|
+
"aria-hidden": !isVisible,
|
|
1205
|
+
children: content
|
|
1206
|
+
}
|
|
1207
|
+
);
|
|
1208
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1209
|
+
"span",
|
|
1210
|
+
{
|
|
1211
|
+
ref: triggerRef,
|
|
1212
|
+
className: `group relative inline-flex ${usePortal ? "" : "w-full"} ${className}`,
|
|
1213
|
+
"data-position": position,
|
|
1214
|
+
onMouseEnter: () => !open && setShowTooltip(true),
|
|
1215
|
+
onMouseLeave: () => !open && setShowTooltip(false),
|
|
1216
|
+
onFocus: () => !open && setShowTooltip(true),
|
|
1217
|
+
onBlur: () => !open && setShowTooltip(false),
|
|
1218
|
+
children: [
|
|
1219
|
+
children,
|
|
1220
|
+
usePortal && isVisible ? reactDom.createPortal(tooltipContent, document.body) : !usePortal && tooltipContent
|
|
1221
|
+
]
|
|
1222
|
+
}
|
|
1223
|
+
);
|
|
1224
|
+
}
|
|
1225
|
+
Tooltip.displayName = "Tooltip";
|
|
1226
|
+
var tooltip_default = Tooltip;
|
|
1227
|
+
function Modal({ isOpen, onClose, children, className = "", ariaLabel }) {
|
|
1228
|
+
react.useEffect(() => {
|
|
1229
|
+
const handleEscape = (e) => {
|
|
1230
|
+
if (e.key === "Escape") {
|
|
1231
|
+
e.preventDefault();
|
|
1232
|
+
onClose();
|
|
1233
|
+
}
|
|
1234
|
+
};
|
|
1235
|
+
if (isOpen) {
|
|
1236
|
+
document.body.style.overflow = "hidden";
|
|
1237
|
+
document.addEventListener("keydown", handleEscape);
|
|
1238
|
+
return () => {
|
|
1239
|
+
document.body.style.overflow = "";
|
|
1240
|
+
document.removeEventListener("keydown", handleEscape);
|
|
1241
|
+
};
|
|
1242
|
+
}
|
|
1243
|
+
return void 0;
|
|
1244
|
+
}, [isOpen, onClose]);
|
|
1245
|
+
if (!isOpen) return null;
|
|
1246
|
+
return (
|
|
1247
|
+
// Backdrop: fixed overlay, centered grid, semi-transparent black background
|
|
1248
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1249
|
+
"div",
|
|
1250
|
+
{
|
|
1251
|
+
className: "fixed inset-0 z-[999] grid place-items-center bg-black/40 backdrop-blur-sm p-4 overflow-y-auto overscroll-contain",
|
|
1252
|
+
onClick: onClose,
|
|
1253
|
+
onKeyDown: (e) => e.key === "Escape" && onClose(),
|
|
1254
|
+
role: "button",
|
|
1255
|
+
"aria-label": ariaLabel || "Close modal",
|
|
1256
|
+
tabIndex: 0,
|
|
1257
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1258
|
+
"div",
|
|
1259
|
+
{
|
|
1260
|
+
className: `relative w-11/12 max-w-2xl max-h-[calc(100vh-5em)] bg-card text-card-foreground rounded-2xl border border-border shadow-2xl p-6 ${className}`,
|
|
1261
|
+
role: "dialog",
|
|
1262
|
+
"aria-modal": "true",
|
|
1263
|
+
children
|
|
1264
|
+
}
|
|
1265
|
+
)
|
|
1266
|
+
}
|
|
1267
|
+
)
|
|
1268
|
+
);
|
|
1269
|
+
}
|
|
1270
|
+
Modal.displayName = "Modal";
|
|
1271
|
+
var modal_default = Modal;
|
|
1272
|
+
function Dialog({ isOpen, onClose, title, children, actions, className = "" }) {
|
|
1273
|
+
return /* @__PURE__ */ jsxRuntime.jsx(modal_default, { isOpen, onClose, ariaLabel: title, className, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col p-6 gap-4", children: [
|
|
1274
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-bold text-foreground", children: title }),
|
|
1275
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-foreground", children }),
|
|
1276
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end gap-3 pt-2", children: actions })
|
|
1277
|
+
] }) });
|
|
1278
|
+
}
|
|
1279
|
+
Dialog.displayName = "Dialog";
|
|
1280
|
+
var dialog_default = Dialog;
|
|
1281
|
+
function DeleteDialog({
|
|
1282
|
+
isOpen,
|
|
1283
|
+
onClose,
|
|
1284
|
+
onConfirm,
|
|
1285
|
+
title = "Confirm Deletion",
|
|
1286
|
+
description,
|
|
1287
|
+
itemName,
|
|
1288
|
+
isLoading = false,
|
|
1289
|
+
confirmText = "Delete",
|
|
1290
|
+
cancelText = "Cancel",
|
|
1291
|
+
className = ""
|
|
1292
|
+
}) {
|
|
1293
|
+
const defaultDescription = itemName ? `Are you sure you want to delete "${itemName}"? This action cannot be undone.` : "Are you sure you want to delete this item? This action cannot be undone.";
|
|
1294
|
+
const finalDescription = description || defaultDescription;
|
|
1295
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1296
|
+
dialog_default,
|
|
1297
|
+
{
|
|
1298
|
+
isOpen,
|
|
1299
|
+
onClose,
|
|
1300
|
+
title,
|
|
1301
|
+
className,
|
|
1302
|
+
actions: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1303
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1304
|
+
button_default,
|
|
1305
|
+
{
|
|
1306
|
+
onClick: onClose,
|
|
1307
|
+
disabled: isLoading,
|
|
1308
|
+
className: "bg-muted hover:bg-muted/80 text-muted-foreground",
|
|
1309
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconX, { size: 16 }),
|
|
1310
|
+
children: cancelText
|
|
1311
|
+
}
|
|
1312
|
+
),
|
|
1313
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1314
|
+
button_default,
|
|
1315
|
+
{
|
|
1316
|
+
onClick: onConfirm,
|
|
1317
|
+
disabled: isLoading,
|
|
1318
|
+
className: "bg-destructive hover:bg-destructive/90 text-destructive-foreground",
|
|
1319
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconTrash, { size: 16 }),
|
|
1320
|
+
children: isLoading ? "Deleting..." : confirmText
|
|
1321
|
+
}
|
|
1322
|
+
)
|
|
1323
|
+
] }),
|
|
1324
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-foreground", children: finalDescription })
|
|
1325
|
+
}
|
|
1326
|
+
);
|
|
1327
|
+
}
|
|
1328
|
+
DeleteDialog.displayName = "DeleteDialog";
|
|
1329
|
+
var delete_dialog_default = DeleteDialog;
|
|
1330
|
+
function Popover({ trigger, children, content, position = "bottom", className = "" }) {
|
|
1331
|
+
const [isOpen, setIsOpen] = react.useState(false);
|
|
1332
|
+
const popoverRef = react.useRef(null);
|
|
1333
|
+
const triggerContent = children || trigger;
|
|
1334
|
+
react.useEffect(() => {
|
|
1335
|
+
const handleClickOutside = (event) => {
|
|
1336
|
+
if (popoverRef.current && !popoverRef.current.contains(event.target)) {
|
|
1337
|
+
setIsOpen(false);
|
|
1338
|
+
}
|
|
1339
|
+
};
|
|
1340
|
+
const handleEscape = (event) => {
|
|
1341
|
+
if (event.key === "Escape") {
|
|
1342
|
+
setIsOpen(false);
|
|
1343
|
+
}
|
|
1344
|
+
};
|
|
1345
|
+
if (isOpen) {
|
|
1346
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
1347
|
+
document.addEventListener("keydown", handleEscape);
|
|
1348
|
+
return () => {
|
|
1349
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
1350
|
+
document.removeEventListener("keydown", handleEscape);
|
|
1351
|
+
};
|
|
1352
|
+
}
|
|
1353
|
+
return void 0;
|
|
1354
|
+
}, [isOpen]);
|
|
1355
|
+
const positionClasses = {
|
|
1356
|
+
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
1357
|
+
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
1358
|
+
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
1359
|
+
right: "left-full top-1/2 -translate-y-1/2 ml-2"
|
|
1360
|
+
};
|
|
1361
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `relative inline-block ${className}`, ref: popoverRef, children: [
|
|
1362
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1363
|
+
"button",
|
|
1364
|
+
{
|
|
1365
|
+
onClick: () => setIsOpen(!isOpen),
|
|
1366
|
+
className: "bg-transparent border-0 p-0 cursor-pointer",
|
|
1367
|
+
type: "button",
|
|
1368
|
+
"aria-expanded": isOpen,
|
|
1369
|
+
"aria-haspopup": "true",
|
|
1370
|
+
children: triggerContent
|
|
1371
|
+
}
|
|
1372
|
+
),
|
|
1373
|
+
isOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1374
|
+
"div",
|
|
1375
|
+
{
|
|
1376
|
+
className: `absolute min-w-[200px] bg-popover text-popover-foreground border border-border rounded-lg shadow-xl p-4 z-50 animate-scaleIn ${positionClasses[position]}`,
|
|
1377
|
+
role: "tooltip",
|
|
1378
|
+
children: content
|
|
1379
|
+
}
|
|
1380
|
+
)
|
|
1381
|
+
] });
|
|
1382
|
+
}
|
|
1383
|
+
Popover.displayName = "Popover";
|
|
1384
|
+
var popover_default = Popover;
|
|
1385
|
+
function Alert({ children, type = "info", dismissible = false, onClose, className = "" }) {
|
|
1386
|
+
const typeClasses = {
|
|
1387
|
+
info: "bg-info/10 text-info-foreground border-info/30",
|
|
1388
|
+
success: "bg-success/10 text-success-foreground border-success/30",
|
|
1389
|
+
warning: "bg-warning/10 text-warning-foreground border-warning/30",
|
|
1390
|
+
error: "bg-destructive/10 text-destructive-foreground border-destructive/30"
|
|
1391
|
+
};
|
|
1392
|
+
const iconClasses = {
|
|
1393
|
+
info: "text-info",
|
|
1394
|
+
success: "text-success",
|
|
1395
|
+
warning: "text-warning",
|
|
1396
|
+
error: "text-destructive"
|
|
1397
|
+
};
|
|
1398
|
+
const icons = {
|
|
1399
|
+
info: /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-5 h-5 flex-shrink-0", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1400
|
+
"path",
|
|
1401
|
+
{
|
|
1402
|
+
fillRule: "evenodd",
|
|
1403
|
+
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",
|
|
1404
|
+
clipRule: "evenodd"
|
|
1405
|
+
}
|
|
1406
|
+
) }),
|
|
1407
|
+
success: /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-5 h-5 flex-shrink-0", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1408
|
+
"path",
|
|
1409
|
+
{
|
|
1410
|
+
fillRule: "evenodd",
|
|
1411
|
+
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
|
|
1412
|
+
clipRule: "evenodd"
|
|
1413
|
+
}
|
|
1414
|
+
) }),
|
|
1415
|
+
warning: /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-5 h-5 flex-shrink-0", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1416
|
+
"path",
|
|
1417
|
+
{
|
|
1418
|
+
fillRule: "evenodd",
|
|
1419
|
+
d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",
|
|
1420
|
+
clipRule: "evenodd"
|
|
1421
|
+
}
|
|
1422
|
+
) }),
|
|
1423
|
+
error: /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-5 h-5 flex-shrink-0", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1424
|
+
"path",
|
|
1425
|
+
{
|
|
1426
|
+
fillRule: "evenodd",
|
|
1427
|
+
d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",
|
|
1428
|
+
clipRule: "evenodd"
|
|
1429
|
+
}
|
|
1430
|
+
) })
|
|
1431
|
+
};
|
|
1432
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { role: "alert", className: `p-4 border rounded-lg flex items-start gap-3 ${typeClasses[type]} ${className}`, children: [
|
|
1433
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: iconClasses[type], children: icons[type] }),
|
|
1434
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 text-sm", children }),
|
|
1435
|
+
dismissible && onClose && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1436
|
+
"button",
|
|
1437
|
+
{
|
|
1438
|
+
onClick: onClose,
|
|
1439
|
+
className: "flex-shrink-0 text-current opacity-70 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-ring rounded p-0.5",
|
|
1440
|
+
"aria-label": "Close alert",
|
|
1441
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
|
|
1442
|
+
}
|
|
1443
|
+
)
|
|
1444
|
+
] });
|
|
1445
|
+
}
|
|
1446
|
+
Alert.displayName = "Alert";
|
|
1447
|
+
var alert_default = Alert;
|
|
1448
|
+
function Spinner({ size = "md", variant = "primary", className = "", speed, ...props }) {
|
|
1449
|
+
const sizeClasses = {
|
|
1450
|
+
sm: "w-4 h-4 border-2",
|
|
1451
|
+
md: "w-8 h-8 border-2",
|
|
1452
|
+
lg: "w-12 h-12 border-4"
|
|
1453
|
+
};
|
|
1454
|
+
const variantTopBorder = {
|
|
1455
|
+
primary: "border-t-primary",
|
|
1456
|
+
accent: "border-t-accent",
|
|
1457
|
+
secondary: "border-t-secondary",
|
|
1458
|
+
neutral: "border-t-neutral"
|
|
1459
|
+
}[variant];
|
|
1460
|
+
const duration = speed ? `[animation-duration:${speed}]` : "";
|
|
1461
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1462
|
+
"div",
|
|
1463
|
+
{
|
|
1464
|
+
role: "status",
|
|
1465
|
+
"aria-label": "Loading",
|
|
1466
|
+
"data-variant": variant,
|
|
1467
|
+
className: `inline-block border-muted ${variantTopBorder} rounded-full animate-spin ${duration} ${sizeClasses[size]} ${className}`,
|
|
1468
|
+
...props,
|
|
1469
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Loading..." })
|
|
1470
|
+
}
|
|
1471
|
+
);
|
|
1472
|
+
}
|
|
1473
|
+
Spinner.displayName = "Spinner";
|
|
1474
|
+
var spinner_default = Spinner;
|
|
1475
|
+
function ProgressBar({
|
|
1476
|
+
value,
|
|
1477
|
+
max = 100,
|
|
1478
|
+
showLabel = false,
|
|
1479
|
+
variant = "default",
|
|
1480
|
+
className = ""
|
|
1481
|
+
}) {
|
|
1482
|
+
const percentage = Math.min(value / max * 100, 100);
|
|
1483
|
+
const variantClasses = {
|
|
1484
|
+
default: "bg-primary",
|
|
1485
|
+
success: "bg-success",
|
|
1486
|
+
warning: "bg-warning",
|
|
1487
|
+
error: "bg-destructive"
|
|
1488
|
+
};
|
|
1489
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, children: [
|
|
1490
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full bg-muted/30 rounded-full h-2.5 overflow-hidden shadow-inner", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1491
|
+
"div",
|
|
1492
|
+
{
|
|
1493
|
+
role: "progressbar",
|
|
1494
|
+
"aria-valuenow": value,
|
|
1495
|
+
"aria-valuemin": 0,
|
|
1496
|
+
"aria-valuemax": max,
|
|
1497
|
+
className: `h-full transition-all duration-500 ease-out rounded-full ${variantClasses[variant]}`,
|
|
1498
|
+
style: { width: `${percentage}%` }
|
|
1499
|
+
}
|
|
1500
|
+
) }),
|
|
1501
|
+
showLabel && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-sm text-muted-foreground mt-2 text-right font-medium", children: [
|
|
1502
|
+
Math.round(percentage),
|
|
1503
|
+
"%"
|
|
1504
|
+
] })
|
|
1505
|
+
] });
|
|
1506
|
+
}
|
|
1507
|
+
ProgressBar.displayName = "ProgressBar";
|
|
1508
|
+
var progress_bar_default = ProgressBar;
|
|
1509
|
+
function Skeleton({ variant = "text", width, height, className = "", ...props }) {
|
|
1510
|
+
const variantClasses = {
|
|
1511
|
+
text: "rounded h-4",
|
|
1512
|
+
circular: "rounded-full",
|
|
1513
|
+
rectangular: "rounded-md"
|
|
1514
|
+
};
|
|
1515
|
+
const style = {
|
|
1516
|
+
width: width || (variant === "circular" ? "40px" : "100%"),
|
|
1517
|
+
height: height || (variant === "circular" ? "40px" : void 0)
|
|
1518
|
+
};
|
|
1519
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1520
|
+
"div",
|
|
1521
|
+
{
|
|
1522
|
+
className: `bg-muted animate-pulse ${variantClasses[variant]} ${className}`,
|
|
1523
|
+
style,
|
|
1524
|
+
"aria-busy": "true",
|
|
1525
|
+
"aria-live": "polite",
|
|
1526
|
+
...props,
|
|
1527
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Loading..." })
|
|
1528
|
+
}
|
|
1529
|
+
);
|
|
1530
|
+
}
|
|
1531
|
+
Skeleton.displayName = "Skeleton";
|
|
1532
|
+
var skeleton_default = Skeleton;
|
|
1533
|
+
function Badge({ children, variant = "default", size = "md", className = "", ...props }) {
|
|
1534
|
+
const variantClasses = {
|
|
1535
|
+
default: "bg-muted text-muted-foreground border border-border",
|
|
1536
|
+
primary: "bg-primary/10 text-primary border border-primary/20",
|
|
1537
|
+
success: "bg-success/10 text-success border border-success/20",
|
|
1538
|
+
warning: "bg-warning/10 text-warning border border-warning/20",
|
|
1539
|
+
error: "bg-destructive/10 text-destructive border border-destructive/20"
|
|
1540
|
+
};
|
|
1541
|
+
const sizeClasses = {
|
|
1542
|
+
sm: "px-2 py-0.5 text-xs",
|
|
1543
|
+
md: "px-2.5 py-0.5 text-xs font-semibold",
|
|
1544
|
+
lg: "px-3 py-1 text-sm font-semibold"
|
|
1545
|
+
};
|
|
1546
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1547
|
+
"span",
|
|
1548
|
+
{
|
|
1549
|
+
className: `inline-flex items-center font-medium rounded-full transition-colors ${variantClasses[variant]} ${sizeClasses[size]} ${className}`,
|
|
1550
|
+
...props,
|
|
1551
|
+
children
|
|
1552
|
+
}
|
|
1553
|
+
);
|
|
1554
|
+
}
|
|
1555
|
+
Badge.displayName = "Badge";
|
|
1556
|
+
var badge_default = Badge;
|
|
1557
|
+
function StatusLabel({
|
|
1558
|
+
children,
|
|
1559
|
+
status = "info",
|
|
1560
|
+
size = "md",
|
|
1561
|
+
variant = "filled",
|
|
1562
|
+
className = ""
|
|
1563
|
+
}) {
|
|
1564
|
+
const statusConfig = {
|
|
1565
|
+
active: {
|
|
1566
|
+
filled: "bg-success/10 text-success border-success/20",
|
|
1567
|
+
outlined: "bg-transparent text-success border-success",
|
|
1568
|
+
dot: "bg-success"
|
|
1569
|
+
},
|
|
1570
|
+
inactive: {
|
|
1571
|
+
filled: "bg-muted text-muted-foreground border-border",
|
|
1572
|
+
outlined: "bg-transparent text-muted-foreground border-muted-foreground",
|
|
1573
|
+
dot: "bg-muted-foreground"
|
|
1574
|
+
},
|
|
1575
|
+
pending: {
|
|
1576
|
+
filled: "bg-warning/10 text-warning border-warning/20",
|
|
1577
|
+
outlined: "bg-transparent text-warning border-warning",
|
|
1578
|
+
dot: "bg-warning"
|
|
1579
|
+
},
|
|
1580
|
+
success: {
|
|
1581
|
+
filled: "bg-success/10 text-success border-success/20",
|
|
1582
|
+
outlined: "bg-transparent text-success border-success",
|
|
1583
|
+
dot: "bg-success"
|
|
1584
|
+
},
|
|
1585
|
+
error: {
|
|
1586
|
+
filled: "bg-destructive/10 text-destructive border-destructive/20",
|
|
1587
|
+
outlined: "bg-transparent text-destructive border-destructive",
|
|
1588
|
+
dot: "bg-destructive"
|
|
1589
|
+
},
|
|
1590
|
+
warning: {
|
|
1591
|
+
filled: "bg-warning/10 text-warning border-warning/20",
|
|
1592
|
+
outlined: "bg-transparent text-warning border-warning",
|
|
1593
|
+
dot: "bg-warning"
|
|
1594
|
+
},
|
|
1595
|
+
info: {
|
|
1596
|
+
filled: "bg-primary/10 text-primary border-primary/20",
|
|
1597
|
+
outlined: "bg-transparent text-primary border-primary",
|
|
1598
|
+
dot: "bg-primary"
|
|
1599
|
+
}
|
|
1600
|
+
};
|
|
1601
|
+
const sizeClasses = {
|
|
1602
|
+
sm: {
|
|
1603
|
+
container: "px-2 py-0.5 text-xs gap-1.5",
|
|
1604
|
+
dot: "w-1.5 h-1.5"
|
|
1605
|
+
},
|
|
1606
|
+
md: {
|
|
1607
|
+
container: "px-2.5 py-0.5 text-sm gap-2",
|
|
1608
|
+
dot: "w-2 h-2"
|
|
1609
|
+
},
|
|
1610
|
+
lg: {
|
|
1611
|
+
container: "px-3 py-1 text-base gap-2",
|
|
1612
|
+
dot: "w-2.5 h-2.5"
|
|
1613
|
+
}
|
|
1614
|
+
};
|
|
1615
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1616
|
+
"span",
|
|
1617
|
+
{
|
|
1618
|
+
className: `inline-flex items-center font-medium rounded-full border ${statusConfig[status][variant]} ${sizeClasses[size].container} ${className}`,
|
|
1619
|
+
children: [
|
|
1620
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `rounded-full ${statusConfig[status].dot} ${sizeClasses[size].dot}` }),
|
|
1621
|
+
children
|
|
1622
|
+
]
|
|
1623
|
+
}
|
|
1624
|
+
);
|
|
1625
|
+
}
|
|
1626
|
+
StatusLabel.displayName = "StatusLabel";
|
|
1627
|
+
var status_label_default = StatusLabel;
|
|
1628
|
+
function Avatar({ src, alt = "", fallback, size = "md", className = "" }) {
|
|
1629
|
+
const sizeClasses = {
|
|
1630
|
+
sm: "w-8 h-8 text-xs",
|
|
1631
|
+
md: "w-10 h-10 text-sm",
|
|
1632
|
+
lg: "w-12 h-12 text-base",
|
|
1633
|
+
xl: "w-16 h-16 text-lg"
|
|
1634
|
+
};
|
|
1635
|
+
let content;
|
|
1636
|
+
if (src) {
|
|
1637
|
+
content = /* @__PURE__ */ jsxRuntime.jsx("img", { src, alt, className: "w-full h-full object-cover" });
|
|
1638
|
+
} else if (fallback) {
|
|
1639
|
+
content = fallback;
|
|
1640
|
+
} else {
|
|
1641
|
+
content = /* @__PURE__ */ jsxRuntime.jsx("span", { children: alt.charAt(0).toUpperCase() });
|
|
1642
|
+
}
|
|
1643
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1644
|
+
"div",
|
|
1645
|
+
{
|
|
1646
|
+
className: `inline-flex items-center justify-center rounded-full bg-muted text-muted-foreground font-medium overflow-hidden ${sizeClasses[size]} ${className}`,
|
|
1647
|
+
children: content
|
|
1648
|
+
}
|
|
1649
|
+
);
|
|
1650
|
+
}
|
|
1651
|
+
Avatar.displayName = "Avatar";
|
|
1652
|
+
var avatar_default = Avatar;
|
|
1653
|
+
function EmptyState({ title, description, icon, action, className = "" }) {
|
|
1654
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex flex-col items-center justify-center text-center py-12 ${className}`, children: [
|
|
1655
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground mb-4", children: icon }),
|
|
1656
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold text-foreground mb-2", children: title }),
|
|
1657
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mb-6 max-w-sm", children: description }),
|
|
1658
|
+
action
|
|
1659
|
+
] });
|
|
1660
|
+
}
|
|
1661
|
+
EmptyState.displayName = "EmptyState";
|
|
1662
|
+
var empty_state_default = EmptyState;
|
|
1663
|
+
function List({ children, className = "", ordered = false }) {
|
|
1664
|
+
const Component = ordered ? "ol" : "ul";
|
|
1665
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Component, { className: `divide-y divide-gray-200 ${className}`, children });
|
|
1666
|
+
}
|
|
1667
|
+
function ListItem({ children, className = "" }) {
|
|
1668
|
+
return /* @__PURE__ */ jsxRuntime.jsx("li", { className: `py-3 ${className}`, children });
|
|
1669
|
+
}
|
|
1670
|
+
function Table({
|
|
1671
|
+
children,
|
|
1672
|
+
className = "",
|
|
1673
|
+
striped = false,
|
|
1674
|
+
bordered = false,
|
|
1675
|
+
hoverable = false,
|
|
1676
|
+
compact = false,
|
|
1677
|
+
caption,
|
|
1678
|
+
...props
|
|
1679
|
+
}) {
|
|
1680
|
+
const baseClasses = "w-full text-sm text-left";
|
|
1681
|
+
const stripedClasses = striped ? "striped" : "";
|
|
1682
|
+
const borderedClasses = bordered ? "border border-border" : "";
|
|
1683
|
+
const compactClasses = compact ? "table-compact" : "";
|
|
1684
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "overflow-x-auto rounded-lg", children: [
|
|
1685
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1686
|
+
"table",
|
|
1687
|
+
{
|
|
1688
|
+
className: `${baseClasses} ${stripedClasses} ${borderedClasses} ${compactClasses} ${className}`,
|
|
1689
|
+
...props,
|
|
1690
|
+
children: [
|
|
1691
|
+
caption && /* @__PURE__ */ jsxRuntime.jsx("caption", { className: "sr-only", children: caption }),
|
|
1692
|
+
children
|
|
1693
|
+
]
|
|
1694
|
+
}
|
|
1695
|
+
),
|
|
1696
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `
|
|
1697
|
+
.striped tbody tr:nth-child(even) {
|
|
1698
|
+
background-color: hsl(var(--muted) / 0.3);
|
|
1699
|
+
}
|
|
1700
|
+
${hoverable ? `
|
|
1701
|
+
table tbody tr:hover {
|
|
1702
|
+
background-color: hsl(var(--muted) / 0.5);
|
|
1703
|
+
}
|
|
1704
|
+
` : ""}
|
|
1705
|
+
.table-compact td,
|
|
1706
|
+
.table-compact th {
|
|
1707
|
+
padding: 0.5rem;
|
|
1708
|
+
}
|
|
1709
|
+
` })
|
|
1710
|
+
] });
|
|
1711
|
+
}
|
|
1712
|
+
function TableHeader({ children, className = "", ...props }) {
|
|
1713
|
+
return /* @__PURE__ */ jsxRuntime.jsx("thead", { className: `text-xs text-muted-foreground uppercase bg-muted/50 ${className}`, ...props, children });
|
|
1714
|
+
}
|
|
1715
|
+
function TableBody({ children, className = "", ...props }) {
|
|
1716
|
+
return /* @__PURE__ */ jsxRuntime.jsx("tbody", { className: `divide-y divide-border ${className}`, ...props, children });
|
|
1717
|
+
}
|
|
1718
|
+
function TableFooter({ children, className = "", ...props }) {
|
|
1719
|
+
return /* @__PURE__ */ jsxRuntime.jsx("tfoot", { className: `text-xs font-semibold text-foreground bg-muted/30 ${className}`, ...props, children });
|
|
1720
|
+
}
|
|
1721
|
+
function TableRow({ children, className = "", selected = false, ...props }) {
|
|
1722
|
+
const selectedClasses = selected ? "bg-primary/10" : "";
|
|
1723
|
+
return /* @__PURE__ */ jsxRuntime.jsx("tr", { className: `${selectedClasses} ${className}`, ...props, children });
|
|
1724
|
+
}
|
|
1725
|
+
function TableHeadCell({
|
|
1726
|
+
children,
|
|
1727
|
+
className = "",
|
|
1728
|
+
align = "left",
|
|
1729
|
+
scope = "col",
|
|
1730
|
+
...props
|
|
1731
|
+
}) {
|
|
1732
|
+
const alignClasses = {
|
|
1733
|
+
left: "text-left",
|
|
1734
|
+
center: "text-center",
|
|
1735
|
+
right: "text-right"
|
|
1736
|
+
};
|
|
1737
|
+
return /* @__PURE__ */ jsxRuntime.jsx("th", { scope, className: `px-6 py-3 font-medium ${alignClasses[align]} ${className}`, ...props, children });
|
|
1738
|
+
}
|
|
1739
|
+
function TableCell({ children, className = "", align = "left", ...props }) {
|
|
1740
|
+
const alignClasses = {
|
|
1741
|
+
left: "text-left",
|
|
1742
|
+
center: "text-center",
|
|
1743
|
+
right: "text-right"
|
|
1744
|
+
};
|
|
1745
|
+
return /* @__PURE__ */ jsxRuntime.jsx("td", { className: `px-6 py-4 whitespace-nowrap ${alignClasses[align]} ${className}`, ...props, children });
|
|
1746
|
+
}
|
|
1747
|
+
function useTable({ data, initialSort, pageSize = 10 }) {
|
|
1748
|
+
const [sortConfig, setSortConfig] = react.useState(
|
|
1749
|
+
initialSort ? { key: initialSort.key, direction: initialSort.direction } : null
|
|
1750
|
+
);
|
|
1751
|
+
const [currentPage, setCurrentPage] = react.useState(1);
|
|
1752
|
+
const [selectedRows, setSelectedRows] = react.useState(/* @__PURE__ */ new Set());
|
|
1753
|
+
const sortedData = react.useMemo(() => {
|
|
1754
|
+
if (!sortConfig) return data;
|
|
1755
|
+
const sorted = [...data].sort((a, b) => {
|
|
1756
|
+
const aValue = a[sortConfig.key];
|
|
1757
|
+
const bValue = b[sortConfig.key];
|
|
1758
|
+
if (aValue === bValue) return 0;
|
|
1759
|
+
if (aValue == null) return 1;
|
|
1760
|
+
if (bValue == null) return -1;
|
|
1761
|
+
if (aValue < bValue) {
|
|
1762
|
+
return sortConfig.direction === "asc" ? -1 : 1;
|
|
1763
|
+
}
|
|
1764
|
+
return sortConfig.direction === "asc" ? 1 : -1;
|
|
1765
|
+
});
|
|
1766
|
+
return sorted;
|
|
1767
|
+
}, [data, sortConfig]);
|
|
1768
|
+
const totalPages = Math.ceil(sortedData.length / pageSize);
|
|
1769
|
+
const startIndex = (currentPage - 1) * pageSize;
|
|
1770
|
+
const endIndex = startIndex + pageSize;
|
|
1771
|
+
const currentData = sortedData.slice(startIndex, endIndex);
|
|
1772
|
+
const handleSort = (key) => {
|
|
1773
|
+
let direction = "asc";
|
|
1774
|
+
if (sortConfig?.key === key) {
|
|
1775
|
+
if (sortConfig.direction === "asc") {
|
|
1776
|
+
direction = "desc";
|
|
1777
|
+
} else if (sortConfig.direction === "desc") {
|
|
1778
|
+
direction = null;
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
setSortConfig(direction ? { key, direction } : null);
|
|
1782
|
+
setCurrentPage(1);
|
|
1783
|
+
};
|
|
1784
|
+
const nextPage = () => {
|
|
1785
|
+
setCurrentPage((prev) => Math.min(prev + 1, totalPages));
|
|
1786
|
+
};
|
|
1787
|
+
const prevPage = () => {
|
|
1788
|
+
setCurrentPage((prev) => Math.max(prev - 1, 1));
|
|
1789
|
+
};
|
|
1790
|
+
const canNextPage = currentPage < totalPages;
|
|
1791
|
+
const canPrevPage = currentPage > 1;
|
|
1792
|
+
const toggleRow = (index) => {
|
|
1793
|
+
setSelectedRows((prev) => {
|
|
1794
|
+
const newSet = new Set(prev);
|
|
1795
|
+
if (newSet.has(index)) {
|
|
1796
|
+
newSet.delete(index);
|
|
1797
|
+
} else {
|
|
1798
|
+
newSet.add(index);
|
|
1799
|
+
}
|
|
1800
|
+
return newSet;
|
|
1801
|
+
});
|
|
1802
|
+
};
|
|
1803
|
+
const toggleAll = () => {
|
|
1804
|
+
if (selectedRows.size === currentData.length) {
|
|
1805
|
+
setSelectedRows(/* @__PURE__ */ new Set());
|
|
1806
|
+
} else {
|
|
1807
|
+
const allIndices = currentData.map((_, idx) => startIndex + idx);
|
|
1808
|
+
setSelectedRows(new Set(allIndices));
|
|
1809
|
+
}
|
|
1810
|
+
};
|
|
1811
|
+
const isRowSelected = (index) => selectedRows.has(index);
|
|
1812
|
+
const isAllSelected = currentData.length > 0 && currentData.every((_, idx) => selectedRows.has(startIndex + idx));
|
|
1813
|
+
const clearSelection = () => setSelectedRows(/* @__PURE__ */ new Set());
|
|
1814
|
+
return {
|
|
1815
|
+
currentData,
|
|
1816
|
+
sortedData,
|
|
1817
|
+
sortConfig,
|
|
1818
|
+
handleSort,
|
|
1819
|
+
currentPage,
|
|
1820
|
+
totalPages,
|
|
1821
|
+
setCurrentPage,
|
|
1822
|
+
nextPage,
|
|
1823
|
+
prevPage,
|
|
1824
|
+
canNextPage,
|
|
1825
|
+
canPrevPage,
|
|
1826
|
+
selectedRows,
|
|
1827
|
+
toggleRow,
|
|
1828
|
+
toggleAll,
|
|
1829
|
+
isRowSelected,
|
|
1830
|
+
isAllSelected,
|
|
1831
|
+
clearSelection
|
|
1832
|
+
};
|
|
1833
|
+
}
|
|
1834
|
+
function DataTable({
|
|
1835
|
+
data,
|
|
1836
|
+
columns,
|
|
1837
|
+
className = "",
|
|
1838
|
+
striped = true,
|
|
1839
|
+
bordered = false,
|
|
1840
|
+
hoverable = true,
|
|
1841
|
+
compact = false,
|
|
1842
|
+
stickyHeader = false,
|
|
1843
|
+
sortable = true,
|
|
1844
|
+
paginated = false,
|
|
1845
|
+
pageSize = 10,
|
|
1846
|
+
selectable = false,
|
|
1847
|
+
onRowClick,
|
|
1848
|
+
onSelectionChange,
|
|
1849
|
+
emptyMessage = "No data available",
|
|
1850
|
+
emptyIcon,
|
|
1851
|
+
initialSort
|
|
1852
|
+
}) {
|
|
1853
|
+
const tableOptions = {
|
|
1854
|
+
data,
|
|
1855
|
+
initialSort,
|
|
1856
|
+
pageSize
|
|
1857
|
+
};
|
|
1858
|
+
const {
|
|
1859
|
+
currentData,
|
|
1860
|
+
sortedData,
|
|
1861
|
+
sortConfig,
|
|
1862
|
+
handleSort,
|
|
1863
|
+
currentPage,
|
|
1864
|
+
totalPages,
|
|
1865
|
+
nextPage,
|
|
1866
|
+
prevPage,
|
|
1867
|
+
canNextPage,
|
|
1868
|
+
canPrevPage,
|
|
1869
|
+
selectedRows,
|
|
1870
|
+
toggleRow,
|
|
1871
|
+
toggleAll,
|
|
1872
|
+
isRowSelected,
|
|
1873
|
+
isAllSelected
|
|
1874
|
+
} = useTable(tableOptions);
|
|
1875
|
+
const displayData = paginated ? currentData : sortedData;
|
|
1876
|
+
const handleToggleRow = (index) => {
|
|
1877
|
+
toggleRow(index);
|
|
1878
|
+
if (onSelectionChange) {
|
|
1879
|
+
const newSelection = new Set(selectedRows);
|
|
1880
|
+
if (newSelection.has(index)) {
|
|
1881
|
+
newSelection.delete(index);
|
|
1882
|
+
} else {
|
|
1883
|
+
newSelection.add(index);
|
|
1884
|
+
}
|
|
1885
|
+
onSelectionChange(Array.from(newSelection));
|
|
1886
|
+
}
|
|
1887
|
+
};
|
|
1888
|
+
const handleToggleAll = () => {
|
|
1889
|
+
toggleAll();
|
|
1890
|
+
if (onSelectionChange) {
|
|
1891
|
+
if (isAllSelected) {
|
|
1892
|
+
onSelectionChange([]);
|
|
1893
|
+
} else {
|
|
1894
|
+
const startIndex = (currentPage - 1) * pageSize;
|
|
1895
|
+
const allIndices = displayData.map((_, idx) => startIndex + idx);
|
|
1896
|
+
onSelectionChange(allIndices);
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
};
|
|
1900
|
+
const renderSortIcon = (columnKey) => {
|
|
1901
|
+
if (!sortable) return null;
|
|
1902
|
+
const isSorted = sortConfig?.key === columnKey;
|
|
1903
|
+
if (!isSorted) {
|
|
1904
|
+
return /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconSelector, { className: "w-4 h-4 ml-1 text-muted-foreground" });
|
|
1905
|
+
}
|
|
1906
|
+
if (sortConfig?.direction === "asc") {
|
|
1907
|
+
return /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconChevronUp, { className: "w-4 h-4 ml-1 text-primary" });
|
|
1908
|
+
}
|
|
1909
|
+
return /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconChevronDown, { className: "w-4 h-4 ml-1 text-primary" });
|
|
1910
|
+
};
|
|
1911
|
+
if (data.length === 0) {
|
|
1912
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border border-border rounded-lg", children: /* @__PURE__ */ jsxRuntime.jsx(empty_state_default, { title: emptyMessage, icon: emptyIcon, className: "py-12" }) });
|
|
1913
|
+
}
|
|
1914
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, children: [
|
|
1915
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: stickyHeader ? "overflow-auto max-h-[600px]" : "", children: /* @__PURE__ */ jsxRuntime.jsxs(Table, { striped, bordered, hoverable, compact, children: [
|
|
1916
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableHeader, { className: stickyHeader ? "sticky top-0 z-10 bg-background shadow-sm" : "", children: /* @__PURE__ */ jsxRuntime.jsxs(TableRow, { children: [
|
|
1917
|
+
selectable && /* @__PURE__ */ jsxRuntime.jsx(TableHeadCell, { className: "w-12", children: /* @__PURE__ */ jsxRuntime.jsx(checkbox_default, { checked: isAllSelected, onChange: handleToggleAll, ariaLabel: "Select all rows" }) }),
|
|
1918
|
+
columns.map((column) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1919
|
+
TableHeadCell,
|
|
1920
|
+
{
|
|
1921
|
+
align: column.align,
|
|
1922
|
+
className: column.width ? `w-[${column.width}]` : "",
|
|
1923
|
+
children: column.sortable !== false && sortable ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1924
|
+
"button",
|
|
1925
|
+
{
|
|
1926
|
+
onClick: () => handleSort(column.key),
|
|
1927
|
+
className: "flex items-center gap-1 hover:text-foreground transition-colors font-medium",
|
|
1928
|
+
type: "button",
|
|
1929
|
+
children: [
|
|
1930
|
+
column.label,
|
|
1931
|
+
renderSortIcon(column.key)
|
|
1932
|
+
]
|
|
1933
|
+
}
|
|
1934
|
+
) : column.label
|
|
1935
|
+
},
|
|
1936
|
+
String(column.key)
|
|
1937
|
+
))
|
|
1938
|
+
] }) }),
|
|
1939
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: displayData.map((row, rowIndex) => {
|
|
1940
|
+
const actualIndex = paginated ? (currentPage - 1) * pageSize + rowIndex : rowIndex;
|
|
1941
|
+
const isSelected = isRowSelected(actualIndex);
|
|
1942
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1943
|
+
TableRow,
|
|
1944
|
+
{
|
|
1945
|
+
selected: isSelected,
|
|
1946
|
+
onClick: onRowClick ? () => onRowClick(row, actualIndex) : void 0,
|
|
1947
|
+
className: onRowClick ? "cursor-pointer" : "",
|
|
1948
|
+
children: [
|
|
1949
|
+
selectable && /* @__PURE__ */ jsxRuntime.jsx(TableCell, { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1950
|
+
checkbox_default,
|
|
1951
|
+
{
|
|
1952
|
+
checked: isSelected,
|
|
1953
|
+
onChange: () => handleToggleRow(actualIndex),
|
|
1954
|
+
ariaLabel: `Select row ${actualIndex + 1}`
|
|
1955
|
+
}
|
|
1956
|
+
) }),
|
|
1957
|
+
columns.map((column) => {
|
|
1958
|
+
const value = row[column.key];
|
|
1959
|
+
const content = column.render ? column.render(value, row, actualIndex) : String(value ?? "");
|
|
1960
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TableCell, { align: column.align, children: content }, String(column.key));
|
|
1961
|
+
})
|
|
1962
|
+
]
|
|
1963
|
+
},
|
|
1964
|
+
actualIndex
|
|
1965
|
+
);
|
|
1966
|
+
}) })
|
|
1967
|
+
] }) }),
|
|
1968
|
+
paginated && totalPages > 1 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-4 py-3 border-t border-border", children: [
|
|
1969
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-sm text-muted-foreground", children: [
|
|
1970
|
+
"Page ",
|
|
1971
|
+
currentPage,
|
|
1972
|
+
" of ",
|
|
1973
|
+
totalPages,
|
|
1974
|
+
" (",
|
|
1975
|
+
data.length,
|
|
1976
|
+
" total rows)"
|
|
1977
|
+
] }),
|
|
1978
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
1979
|
+
/* @__PURE__ */ jsxRuntime.jsx(button_default, { size: "sm", style: "outline", onClick: prevPage, disabled: !canPrevPage, children: "Previous" }),
|
|
1980
|
+
/* @__PURE__ */ jsxRuntime.jsx(button_default, { size: "sm", style: "outline", onClick: nextPage, disabled: !canNextPage, children: "Next" })
|
|
1981
|
+
] })
|
|
1982
|
+
] })
|
|
1983
|
+
] });
|
|
1984
|
+
}
|
|
1985
|
+
DataTable.displayName = "DataTable";
|
|
1986
|
+
var data_table_default = DataTable;
|
|
1987
|
+
function Chip({
|
|
1988
|
+
children,
|
|
1989
|
+
className = "",
|
|
1990
|
+
variant = "default",
|
|
1991
|
+
size = "md",
|
|
1992
|
+
onRemove,
|
|
1993
|
+
icon,
|
|
1994
|
+
disabled = false,
|
|
1995
|
+
clickable = false,
|
|
1996
|
+
onClick
|
|
1997
|
+
}) {
|
|
1998
|
+
const sizeClasses = {
|
|
1999
|
+
sm: "text-xs px-2 py-1 gap-1",
|
|
2000
|
+
md: "text-sm px-3 py-1.5 gap-1.5",
|
|
2001
|
+
lg: "text-base px-4 py-2 gap-2"
|
|
2002
|
+
};
|
|
2003
|
+
const variantClasses = {
|
|
2004
|
+
default: "bg-muted text-muted-foreground",
|
|
2005
|
+
primary: "bg-primary/10 text-primary",
|
|
2006
|
+
success: "bg-success/10 text-success",
|
|
2007
|
+
warning: "bg-warning/10 text-warning",
|
|
2008
|
+
error: "bg-destructive/10 text-destructive"
|
|
2009
|
+
};
|
|
2010
|
+
const interactiveClasses = clickable && !disabled ? "cursor-pointer hover:opacity-80 active:opacity-60 transition-opacity" : "";
|
|
2011
|
+
const disabledClasses = disabled ? "opacity-50 cursor-not-allowed" : "";
|
|
2012
|
+
const handleClick = (e) => {
|
|
2013
|
+
if (!disabled && clickable && onClick) {
|
|
2014
|
+
onClick(e);
|
|
2015
|
+
}
|
|
2016
|
+
};
|
|
2017
|
+
const handleRemove = (e) => {
|
|
2018
|
+
e.stopPropagation();
|
|
2019
|
+
if (!disabled && onRemove) {
|
|
2020
|
+
onRemove(e);
|
|
2021
|
+
}
|
|
2022
|
+
};
|
|
2023
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2024
|
+
"div",
|
|
2025
|
+
{
|
|
2026
|
+
className: `
|
|
2027
|
+
inline-flex items-center justify-center
|
|
2028
|
+
rounded-full font-medium
|
|
2029
|
+
${sizeClasses[size]}
|
|
2030
|
+
${variantClasses[variant]}
|
|
2031
|
+
${interactiveClasses}
|
|
2032
|
+
${disabledClasses}
|
|
2033
|
+
${className}
|
|
2034
|
+
`,
|
|
2035
|
+
onClick: handleClick,
|
|
2036
|
+
role: clickable ? "button" : void 0,
|
|
2037
|
+
tabIndex: clickable && !disabled ? 0 : void 0,
|
|
2038
|
+
onKeyDown: clickable && !disabled ? (e) => {
|
|
2039
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
2040
|
+
e.preventDefault();
|
|
2041
|
+
onClick?.(e);
|
|
2042
|
+
}
|
|
2043
|
+
} : void 0,
|
|
2044
|
+
children: [
|
|
2045
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0 flex items-center", children: icon }),
|
|
2046
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children }),
|
|
2047
|
+
onRemove && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2048
|
+
"button",
|
|
2049
|
+
{
|
|
2050
|
+
type: "button",
|
|
2051
|
+
onClick: handleRemove,
|
|
2052
|
+
disabled,
|
|
2053
|
+
className: `
|
|
2054
|
+
flex-shrink-0 flex items-center justify-center
|
|
2055
|
+
rounded-full hover:bg-black/10 dark:hover:bg-white/10
|
|
2056
|
+
transition-colors
|
|
2057
|
+
${size === "sm" ? "w-3 h-3" : size === "md" ? "w-4 h-4" : "w-5 h-5"}
|
|
2058
|
+
${disabled ? "cursor-not-allowed" : "cursor-pointer"}
|
|
2059
|
+
`,
|
|
2060
|
+
"aria-label": "Remove",
|
|
2061
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconX, { className: size === "sm" ? "w-2.5 h-2.5" : size === "md" ? "w-3 h-3" : "w-3.5 h-3.5" })
|
|
2062
|
+
}
|
|
2063
|
+
)
|
|
2064
|
+
]
|
|
2065
|
+
}
|
|
2066
|
+
);
|
|
2067
|
+
}
|
|
2068
|
+
Chip.displayName = "Chip";
|
|
2069
|
+
var chip_default = Chip;
|
|
2070
|
+
function TimelineItem({
|
|
2071
|
+
children,
|
|
2072
|
+
className = "",
|
|
2073
|
+
icon,
|
|
2074
|
+
iconColor = "default",
|
|
2075
|
+
title,
|
|
2076
|
+
subtitle,
|
|
2077
|
+
timestamp,
|
|
2078
|
+
isLast = false
|
|
2079
|
+
}) {
|
|
2080
|
+
const iconColorClasses = {
|
|
2081
|
+
default: "bg-muted text-muted-foreground",
|
|
2082
|
+
primary: "bg-primary text-primary-foreground",
|
|
2083
|
+
success: "bg-success text-success-foreground",
|
|
2084
|
+
warning: "bg-warning text-warning-foreground",
|
|
2085
|
+
error: "bg-destructive text-destructive-foreground"
|
|
2086
|
+
};
|
|
2087
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex gap-4 ${className}`, children: [
|
|
2088
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [
|
|
2089
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2090
|
+
"div",
|
|
2091
|
+
{
|
|
2092
|
+
className: `
|
|
2093
|
+
flex items-center justify-center
|
|
2094
|
+
w-8 h-8 rounded-full
|
|
2095
|
+
flex-shrink-0
|
|
2096
|
+
${iconColorClasses[iconColor]}
|
|
2097
|
+
`,
|
|
2098
|
+
children: icon || /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-2 h-2 rounded-full bg-current" })
|
|
2099
|
+
}
|
|
2100
|
+
),
|
|
2101
|
+
!isLast && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-0.5 flex-1 bg-border mt-2" })
|
|
2102
|
+
] }),
|
|
2103
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-1 ${!isLast ? "pb-8" : ""}`, children: [
|
|
2104
|
+
(title || timestamp) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-4 mb-1", children: [
|
|
2105
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-foreground", children: title }),
|
|
2106
|
+
timestamp && /* @__PURE__ */ jsxRuntime.jsx("time", { className: "text-sm text-muted-foreground whitespace-nowrap", children: timestamp })
|
|
2107
|
+
] }),
|
|
2108
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground mb-2", children: subtitle }),
|
|
2109
|
+
children && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-foreground", children })
|
|
2110
|
+
] })
|
|
2111
|
+
] });
|
|
2112
|
+
}
|
|
2113
|
+
function Timeline({ children, className = "", position = "left" }) {
|
|
2114
|
+
const positionClasses = {
|
|
2115
|
+
left: "",
|
|
2116
|
+
center: "mx-auto max-w-2xl",
|
|
2117
|
+
right: "ml-auto max-w-2xl"
|
|
2118
|
+
};
|
|
2119
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${positionClasses[position]} ${className}`, children });
|
|
2120
|
+
}
|
|
2121
|
+
Timeline.displayName = "Timeline";
|
|
2122
|
+
var timeline_default = Timeline;
|
|
2123
|
+
function Grid({
|
|
2124
|
+
children,
|
|
2125
|
+
className = "",
|
|
2126
|
+
itemSize = "md",
|
|
2127
|
+
maxCols,
|
|
2128
|
+
gap = "md",
|
|
2129
|
+
responsive,
|
|
2130
|
+
alignItems = "stretch",
|
|
2131
|
+
justifyItems = "stretch"
|
|
2132
|
+
}) {
|
|
2133
|
+
const itemSizeValues = {
|
|
2134
|
+
xs: "150px",
|
|
2135
|
+
sm: "200px",
|
|
2136
|
+
md: "250px",
|
|
2137
|
+
lg: "300px",
|
|
2138
|
+
xl: "350px",
|
|
2139
|
+
"2xl": "400px"
|
|
2140
|
+
};
|
|
2141
|
+
const gapClasses = {
|
|
2142
|
+
none: "gap-0",
|
|
2143
|
+
xs: "gap-1",
|
|
2144
|
+
sm: "gap-2",
|
|
2145
|
+
md: "gap-4",
|
|
2146
|
+
lg: "gap-6",
|
|
2147
|
+
xl: "gap-8",
|
|
2148
|
+
"2xl": "gap-12"
|
|
2149
|
+
};
|
|
2150
|
+
const alignItemsClasses = {
|
|
2151
|
+
start: "items-start",
|
|
2152
|
+
center: "items-center",
|
|
2153
|
+
end: "items-end",
|
|
2154
|
+
stretch: "items-stretch"
|
|
2155
|
+
};
|
|
2156
|
+
const justifyItemsClasses = {
|
|
2157
|
+
start: "justify-items-start",
|
|
2158
|
+
center: "justify-items-center",
|
|
2159
|
+
end: "justify-items-end",
|
|
2160
|
+
stretch: "justify-items-stretch"
|
|
2161
|
+
};
|
|
2162
|
+
const responsiveClasses = responsive ? Object.entries(responsive).map(([breakpoint, cols]) => {
|
|
2163
|
+
const breakpointPrefix = breakpoint === "sm" ? "sm:" : breakpoint === "md" ? "md:" : breakpoint === "lg" ? "lg:" : "xl:";
|
|
2164
|
+
return `${breakpointPrefix}grid-cols-${cols}`;
|
|
2165
|
+
}).join(" ") : "";
|
|
2166
|
+
const minWidth = itemSizeValues[itemSize];
|
|
2167
|
+
const gridStyle = !responsive ? {
|
|
2168
|
+
gridTemplateColumns: maxCols ? `repeat(auto-fit, minmax(min(${minWidth}, 100%), 1fr))` : `repeat(auto-fill, minmax(min(${minWidth}, 100%), 1fr))`
|
|
2169
|
+
} : void 0;
|
|
2170
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2171
|
+
"div",
|
|
2172
|
+
{
|
|
2173
|
+
className: `
|
|
2174
|
+
grid
|
|
2175
|
+
${!responsive ? "" : responsiveClasses}
|
|
2176
|
+
${gapClasses[gap]}
|
|
2177
|
+
${alignItemsClasses[alignItems]}
|
|
2178
|
+
${justifyItemsClasses[justifyItems]}
|
|
2179
|
+
${className}
|
|
2180
|
+
`.trim(),
|
|
2181
|
+
style: gridStyle,
|
|
2182
|
+
children
|
|
2183
|
+
}
|
|
2184
|
+
);
|
|
2185
|
+
}
|
|
2186
|
+
Grid.displayName = "Grid";
|
|
2187
|
+
var grid_default = Grid;
|
|
2188
|
+
function Heading({ children, level = 1, className = "", noMargin = false }) {
|
|
2189
|
+
const levelClasses = {
|
|
2190
|
+
1: "text-4xl font-bold",
|
|
2191
|
+
2: "text-3xl font-bold",
|
|
2192
|
+
3: "text-2xl font-semibold",
|
|
2193
|
+
4: "text-xl font-semibold",
|
|
2194
|
+
5: "text-lg font-medium",
|
|
2195
|
+
6: "text-base font-medium"
|
|
2196
|
+
};
|
|
2197
|
+
const marginClasses = {
|
|
2198
|
+
1: "mb-4",
|
|
2199
|
+
2: "mb-3",
|
|
2200
|
+
3: "mb-3",
|
|
2201
|
+
4: "mb-2",
|
|
2202
|
+
5: "mb-2",
|
|
2203
|
+
6: "mb-2"
|
|
2204
|
+
};
|
|
2205
|
+
const margin = noMargin ? "" : marginClasses[level];
|
|
2206
|
+
return react.createElement(
|
|
2207
|
+
`h${level}`,
|
|
2208
|
+
{
|
|
2209
|
+
className: `text-foreground ${levelClasses[level]} ${margin} ${className}`
|
|
2210
|
+
},
|
|
2211
|
+
children
|
|
2212
|
+
);
|
|
2213
|
+
}
|
|
2214
|
+
Heading.displayName = "Heading";
|
|
2215
|
+
var heading_default = Heading;
|
|
2216
|
+
function PricingTable({ title, description, children, columns = 3, className = "" }) {
|
|
2217
|
+
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: `py-16 md:py-20 ${className}`, children: /* @__PURE__ */ jsxRuntime.jsxs(container_default, { size: "xl", children: [
|
|
2218
|
+
(title || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center mb-12 md:mb-16 max-w-3xl mx-auto", children: [
|
|
2219
|
+
title && /* @__PURE__ */ jsxRuntime.jsx(heading_default, { level: 2, className: "text-3xl md:text-4xl font-bold mb-4", children: title }),
|
|
2220
|
+
description && /* @__PURE__ */ jsxRuntime.jsx(text_default, { className: "text-lg md:text-xl text-muted", children: description })
|
|
2221
|
+
] }),
|
|
2222
|
+
/* @__PURE__ */ jsxRuntime.jsx(grid_default, { itemSize: "lg", maxCols: columns, gap: "lg", className: "items-stretch", children })
|
|
2223
|
+
] }) });
|
|
2224
|
+
}
|
|
2225
|
+
PricingTable.displayName = "PricingTable";
|
|
2226
|
+
var pricing_table_default = PricingTable;
|
|
2227
|
+
function Card({
|
|
2228
|
+
children,
|
|
2229
|
+
className = "",
|
|
2230
|
+
variant = "default",
|
|
2231
|
+
size = "md",
|
|
2232
|
+
hoverable = false,
|
|
2233
|
+
imagePosition = "top",
|
|
2234
|
+
centered = false,
|
|
2235
|
+
compact = false,
|
|
2236
|
+
...props
|
|
2237
|
+
}) {
|
|
2238
|
+
const variantClasses = {
|
|
2239
|
+
default: "bg-card text-card-foreground border border-border shadow-md",
|
|
2240
|
+
bordered: "bg-card text-card-foreground border-2 border-border",
|
|
2241
|
+
ghost: "bg-transparent",
|
|
2242
|
+
filled: "bg-muted text-foreground"
|
|
2243
|
+
};
|
|
2244
|
+
const sizeClasses = {
|
|
2245
|
+
xs: "w-36",
|
|
2246
|
+
sm: "w-64",
|
|
2247
|
+
md: "w-96",
|
|
2248
|
+
lg: "w-[28rem]",
|
|
2249
|
+
xl: "w-[32rem]"
|
|
2250
|
+
};
|
|
2251
|
+
const hoverClasses = hoverable ? "transition-all duration-300 hover:shadow-xl hover:-translate-y-1 cursor-pointer" : "transition-shadow duration-200";
|
|
2252
|
+
const imagePositionClasses = {
|
|
2253
|
+
top: "flex-col",
|
|
2254
|
+
bottom: "flex-col-reverse",
|
|
2255
|
+
side: "flex-row",
|
|
2256
|
+
overlay: "relative"
|
|
2257
|
+
};
|
|
2258
|
+
const centerClasses = centered ? "text-center items-center" : "";
|
|
2259
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2260
|
+
"div",
|
|
2261
|
+
{
|
|
2262
|
+
className: `
|
|
2263
|
+
rounded-2xl
|
|
2264
|
+
overflow-hidden
|
|
2265
|
+
${variantClasses[variant]}
|
|
2266
|
+
${size !== "md" ? sizeClasses[size] : "max-w-full"}
|
|
2267
|
+
${hoverClasses}
|
|
2268
|
+
${imagePositionClasses[imagePosition]}
|
|
2269
|
+
${centerClasses}
|
|
2270
|
+
${compact ? "p-4" : ""}
|
|
2271
|
+
${imagePosition === "side" ? "flex" : "flex"}
|
|
2272
|
+
${className}
|
|
2273
|
+
`.trim().replace(/\s+/g, " "),
|
|
2274
|
+
...props,
|
|
2275
|
+
children
|
|
2276
|
+
}
|
|
2277
|
+
);
|
|
2278
|
+
}
|
|
2279
|
+
Card.displayName = "Card";
|
|
2280
|
+
var card_default = Card;
|
|
2281
|
+
function CardHeader({ children, className = "", bordered = true, padding = "md" }) {
|
|
2282
|
+
const paddingClasses = {
|
|
2283
|
+
none: "p-0",
|
|
2284
|
+
sm: "p-4",
|
|
2285
|
+
md: "p-6",
|
|
2286
|
+
lg: "p-8"
|
|
2287
|
+
};
|
|
2288
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2289
|
+
"div",
|
|
2290
|
+
{
|
|
2291
|
+
className: `
|
|
2292
|
+
card-header
|
|
2293
|
+
flex items-center justify-between gap-3
|
|
2294
|
+
${paddingClasses[padding]}
|
|
2295
|
+
${bordered ? "border-b border-border" : ""}
|
|
2296
|
+
${className}
|
|
2297
|
+
`.trim().replace(/\s+/g, " "),
|
|
2298
|
+
children
|
|
2299
|
+
}
|
|
2300
|
+
);
|
|
2301
|
+
}
|
|
2302
|
+
CardHeader.displayName = "CardHeader";
|
|
2303
|
+
var card_header_default = CardHeader;
|
|
2304
|
+
function CardFooter({
|
|
2305
|
+
children,
|
|
2306
|
+
className = "",
|
|
2307
|
+
bordered = true,
|
|
2308
|
+
padding = "md",
|
|
2309
|
+
align = "start"
|
|
2310
|
+
}) {
|
|
2311
|
+
const paddingClasses = {
|
|
2312
|
+
none: "p-0",
|
|
2313
|
+
sm: "p-4",
|
|
2314
|
+
md: "p-6",
|
|
2315
|
+
lg: "p-8"
|
|
2316
|
+
};
|
|
2317
|
+
const alignClasses = {
|
|
2318
|
+
start: "justify-start",
|
|
2319
|
+
center: "justify-center",
|
|
2320
|
+
end: "justify-end"
|
|
2321
|
+
};
|
|
2322
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2323
|
+
"div",
|
|
2324
|
+
{
|
|
2325
|
+
className: `
|
|
2326
|
+
card-footer
|
|
2327
|
+
flex items-center gap-1
|
|
2328
|
+
${paddingClasses[padding]}
|
|
2329
|
+
${bordered ? "border-t border-border" : ""}
|
|
2330
|
+
${alignClasses[align]}
|
|
2331
|
+
${className}
|
|
2332
|
+
`.trim().replace(/\s+/g, " "),
|
|
2333
|
+
children
|
|
2334
|
+
}
|
|
2335
|
+
);
|
|
2336
|
+
}
|
|
2337
|
+
CardFooter.displayName = "CardFooter";
|
|
2338
|
+
var card_footer_default = CardFooter;
|
|
2339
|
+
function PricingTier({
|
|
2340
|
+
name,
|
|
2341
|
+
price,
|
|
2342
|
+
period = "/month",
|
|
2343
|
+
description,
|
|
2344
|
+
features,
|
|
2345
|
+
ctaLabel,
|
|
2346
|
+
ctaOnClick,
|
|
2347
|
+
featured = false,
|
|
2348
|
+
badge,
|
|
2349
|
+
className = ""
|
|
2350
|
+
}) {
|
|
2351
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2352
|
+
card_default,
|
|
2353
|
+
{
|
|
2354
|
+
className: `relative flex flex-col h-full p-6 ${featured ? "border-2 border-primary shadow-lg scale-105" : "border border-border"} ${className}`,
|
|
2355
|
+
children: [
|
|
2356
|
+
badge && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -top-3 left-1/2 transform -translate-x-1/2", children: /* @__PURE__ */ jsxRuntime.jsx(badge_default, { variant: "primary", children: badge }) }),
|
|
2357
|
+
/* @__PURE__ */ jsxRuntime.jsxs(card_header_default, { className: "text-center border-none bg-transparent px-0 pt-0", children: [
|
|
2358
|
+
/* @__PURE__ */ jsxRuntime.jsx(heading_default, { level: 3, className: "text-2xl font-bold mb-2", children: name }),
|
|
2359
|
+
description && /* @__PURE__ */ jsxRuntime.jsx(text_default, { variant: "muted", className: "text-sm", children: description })
|
|
2360
|
+
] }),
|
|
2361
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-6 text-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline justify-center", children: [
|
|
2362
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-5xl font-bold", children: price }),
|
|
2363
|
+
period && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted ml-2", children: period })
|
|
2364
|
+
] }) }),
|
|
2365
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 space-y-3 py-6", children: features.map((feature, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
2366
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2367
|
+
iconsReact.IconCheck,
|
|
2368
|
+
{
|
|
2369
|
+
size: 20,
|
|
2370
|
+
className: `flex-shrink-0 mt-0.5 ${feature.included ? "text-success" : "text-muted opacity-30"}`
|
|
2371
|
+
}
|
|
2372
|
+
),
|
|
2373
|
+
/* @__PURE__ */ jsxRuntime.jsx(text_default, { className: `text-sm ${feature.included ? "text-foreground" : "text-muted line-through"}`, children: feature.label })
|
|
2374
|
+
] }, index)) }),
|
|
2375
|
+
/* @__PURE__ */ jsxRuntime.jsx(card_footer_default, { className: "border-none bg-transparent px-0 pb-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2376
|
+
button_default,
|
|
2377
|
+
{
|
|
2378
|
+
variant: featured ? "primary" : "neutral",
|
|
2379
|
+
style: featured ? void 0 : "outline",
|
|
2380
|
+
className: "w-full",
|
|
2381
|
+
size: "lg",
|
|
2382
|
+
onClick: ctaOnClick,
|
|
2383
|
+
children: ctaLabel
|
|
2384
|
+
}
|
|
2385
|
+
) })
|
|
2386
|
+
]
|
|
2387
|
+
}
|
|
2388
|
+
);
|
|
2389
|
+
}
|
|
2390
|
+
PricingTier.displayName = "PricingTier";
|
|
2391
|
+
var pricing_tier_default = PricingTier;
|
|
2392
|
+
function CodeBlock({ code, className = "", showCopy = true }) {
|
|
2393
|
+
const [copied, setCopied] = react.useState(false);
|
|
2394
|
+
const handleCopy = async () => {
|
|
2395
|
+
try {
|
|
2396
|
+
await navigator.clipboard.writeText(code);
|
|
2397
|
+
setCopied(true);
|
|
2398
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
2399
|
+
} catch (err) {
|
|
2400
|
+
console.error("Failed to copy code:", err);
|
|
2401
|
+
}
|
|
2402
|
+
};
|
|
2403
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `relative group ${className}`, children: [
|
|
2404
|
+
showCopy && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2405
|
+
button_default,
|
|
2406
|
+
{
|
|
2407
|
+
variant: "neutral",
|
|
2408
|
+
style: "ghost",
|
|
2409
|
+
size: "sm",
|
|
2410
|
+
onClick: handleCopy,
|
|
2411
|
+
className: "text-xs bg-background/80 hover:bg-background",
|
|
2412
|
+
children: copied ? "\u2713 Copied" : "Copy"
|
|
2413
|
+
}
|
|
2414
|
+
) }),
|
|
2415
|
+
/* @__PURE__ */ jsxRuntime.jsx("pre", { className: `bg-muted/50 border rounded-lg p-4 overflow-x-auto text-sm ${showCopy ? "pr-24" : ""}`, children: /* @__PURE__ */ jsxRuntime.jsx("code", { className: "font-mono text-foreground", children: code }) })
|
|
2416
|
+
] });
|
|
2417
|
+
}
|
|
2418
|
+
CodeBlock.displayName = "CodeBlock";
|
|
2419
|
+
var code_block_default = CodeBlock;
|
|
2420
|
+
function Divider({ orientation = "horizontal", className = "", ...props }) {
|
|
2421
|
+
const orientationClasses = orientation === "horizontal" ? "w-full h-px" : "h-full w-px";
|
|
2422
|
+
return /* @__PURE__ */ jsxRuntime.jsx("hr", { className: `border-0 bg-border ${orientationClasses} ${className}`, "aria-orientation": orientation, ...props });
|
|
2423
|
+
}
|
|
2424
|
+
Divider.displayName = "Divider";
|
|
2425
|
+
var divider_default = Divider;
|
|
2426
|
+
function Drawer({ isOpen, onClose, children, position = "right", className = "" }) {
|
|
2427
|
+
react.useEffect(() => {
|
|
2428
|
+
const handleEscape = (e) => {
|
|
2429
|
+
if (e.key === "Escape") onClose();
|
|
2430
|
+
};
|
|
2431
|
+
if (isOpen) {
|
|
2432
|
+
document.body.style.overflow = "hidden";
|
|
2433
|
+
document.addEventListener("keydown", handleEscape);
|
|
2434
|
+
return () => {
|
|
2435
|
+
document.body.style.overflow = "";
|
|
2436
|
+
document.removeEventListener("keydown", handleEscape);
|
|
2437
|
+
};
|
|
2438
|
+
}
|
|
2439
|
+
return void 0;
|
|
2440
|
+
}, [isOpen, onClose]);
|
|
2441
|
+
if (!isOpen) return null;
|
|
2442
|
+
const positionClasses = {
|
|
2443
|
+
left: "left-0 top-0 h-full w-80 animate-slideInLeft",
|
|
2444
|
+
right: "right-0 top-0 h-full w-80 animate-slideInRight",
|
|
2445
|
+
top: "top-0 left-0 w-full h-80 animate-slideInTop",
|
|
2446
|
+
bottom: "bottom-0 left-0 w-full h-80 animate-slideInBottom"
|
|
2447
|
+
};
|
|
2448
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2449
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2450
|
+
"button",
|
|
2451
|
+
{
|
|
2452
|
+
className: "fixed inset-0 bg-black/50 backdrop-blur-sm z-40 animate-fadeIn border-none p-0 m-0 cursor-default",
|
|
2453
|
+
onClick: onClose,
|
|
2454
|
+
"aria-label": "Close drawer",
|
|
2455
|
+
type: "button"
|
|
2456
|
+
}
|
|
2457
|
+
),
|
|
2458
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2459
|
+
"aside",
|
|
2460
|
+
{
|
|
2461
|
+
className: `fixed bg-card text-card-foreground border border-border shadow-2xl z-50 ${positionClasses[position]} ${className}`,
|
|
2462
|
+
role: "dialog",
|
|
2463
|
+
"aria-modal": "true",
|
|
2464
|
+
tabIndex: -1,
|
|
2465
|
+
children
|
|
2466
|
+
}
|
|
2467
|
+
)
|
|
2468
|
+
] });
|
|
2469
|
+
}
|
|
2470
|
+
Drawer.displayName = "Drawer";
|
|
2471
|
+
var drawer_default = Drawer;
|
|
2472
|
+
function Page({ children, className = "" }) {
|
|
2473
|
+
return /* @__PURE__ */ jsxRuntime.jsx("main", { className: `min-h-screen bg-background ${className}`, children });
|
|
2474
|
+
}
|
|
2475
|
+
Page.displayName = "Page";
|
|
2476
|
+
var page_default = Page;
|
|
2477
|
+
function AccordionItem({ title, children, defaultOpen = false }) {
|
|
2478
|
+
const [isOpen, setIsOpen] = react.useState(defaultOpen);
|
|
2479
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-border", children: [
|
|
2480
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2481
|
+
"button",
|
|
2482
|
+
{
|
|
2483
|
+
onClick: () => setIsOpen(!isOpen),
|
|
2484
|
+
className: "w-full flex items-center justify-between py-4 px-2 text-left hover:bg-accent hover:text-accent-foreground transition-colors",
|
|
2485
|
+
"aria-expanded": isOpen,
|
|
2486
|
+
children: [
|
|
2487
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-foreground", children: title }),
|
|
2488
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2489
|
+
"svg",
|
|
2490
|
+
{
|
|
2491
|
+
className: `w-5 h-5 transition-transform ${isOpen ? "rotate-180" : ""}`,
|
|
2492
|
+
fill: "none",
|
|
2493
|
+
stroke: "currentColor",
|
|
2494
|
+
viewBox: "0 0 24 24",
|
|
2495
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" })
|
|
2496
|
+
}
|
|
2497
|
+
)
|
|
2498
|
+
]
|
|
2499
|
+
}
|
|
2500
|
+
),
|
|
2501
|
+
isOpen && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-2 pb-4 text-muted-foreground", children })
|
|
2502
|
+
] });
|
|
2503
|
+
}
|
|
2504
|
+
function Accordion({ children, className = "" }) {
|
|
2505
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `divide-y divide-gray-200 ${className}`, children });
|
|
2506
|
+
}
|
|
2507
|
+
Accordion.displayName = "Accordion";
|
|
2508
|
+
var accordion_default = Accordion;
|
|
2509
|
+
function Hero({
|
|
2510
|
+
title,
|
|
2511
|
+
description,
|
|
2512
|
+
primaryAction,
|
|
2513
|
+
secondaryAction,
|
|
2514
|
+
children,
|
|
2515
|
+
className = "",
|
|
2516
|
+
backgroundGradient = true,
|
|
2517
|
+
centered = true,
|
|
2518
|
+
size = "lg"
|
|
2519
|
+
}) {
|
|
2520
|
+
const sizeClasses = {
|
|
2521
|
+
sm: "py-12",
|
|
2522
|
+
md: "py-16",
|
|
2523
|
+
lg: "py-20 md:py-24"
|
|
2524
|
+
};
|
|
2525
|
+
const titleSizes = {
|
|
2526
|
+
sm: "text-3xl md:text-4xl",
|
|
2527
|
+
md: "text-4xl md:text-5xl",
|
|
2528
|
+
lg: "text-4xl md:text-5xl lg:text-6xl"
|
|
2529
|
+
};
|
|
2530
|
+
const descriptionSizes = {
|
|
2531
|
+
sm: "text-base md:text-lg",
|
|
2532
|
+
md: "text-lg md:text-xl",
|
|
2533
|
+
lg: "text-xl md:text-2xl"
|
|
2534
|
+
};
|
|
2535
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2536
|
+
"section",
|
|
2537
|
+
{
|
|
2538
|
+
className: `${sizeClasses[size]} ${backgroundGradient ? "bg-gradient-to-b from-primary/10 via-primary/5 to-background" : "bg-background"} ${className}`,
|
|
2539
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(container_default, { size: "lg", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: centered ? "text-center" : "", children: [
|
|
2540
|
+
/* @__PURE__ */ jsxRuntime.jsx(heading_default, { level: 1, className: `${titleSizes[size]} font-bold mb-4 md:mb-6`, children: title }),
|
|
2541
|
+
description && /* @__PURE__ */ jsxRuntime.jsx(text_default, { className: `${descriptionSizes[size]} mb-6 md:mb-8 ${centered ? "max-w-3xl mx-auto" : "max-w-3xl"}`, children: description }),
|
|
2542
|
+
(primaryAction || secondaryAction) && /* @__PURE__ */ jsxRuntime.jsxs(stack_default, { direction: "horizontal", spacing: "md", className: `flex-wrap ${centered ? "justify-center" : ""}`, children: [
|
|
2543
|
+
primaryAction && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2544
|
+
button_default,
|
|
2545
|
+
{
|
|
2546
|
+
size: "lg",
|
|
2547
|
+
variant: primaryAction.variant || "primary",
|
|
2548
|
+
style: primaryAction.style,
|
|
2549
|
+
onClick: primaryAction.onClick,
|
|
2550
|
+
loading: primaryAction.loading,
|
|
2551
|
+
children: primaryAction.label
|
|
2552
|
+
}
|
|
2553
|
+
),
|
|
2554
|
+
secondaryAction && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2555
|
+
button_default,
|
|
2556
|
+
{
|
|
2557
|
+
size: "lg",
|
|
2558
|
+
variant: secondaryAction.variant || "neutral",
|
|
2559
|
+
style: secondaryAction.style || "outline",
|
|
2560
|
+
onClick: secondaryAction.onClick,
|
|
2561
|
+
loading: secondaryAction.loading,
|
|
2562
|
+
children: secondaryAction.label
|
|
2563
|
+
}
|
|
2564
|
+
)
|
|
2565
|
+
] }),
|
|
2566
|
+
children && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-8", children })
|
|
2567
|
+
] }) })
|
|
2568
|
+
}
|
|
2569
|
+
);
|
|
2570
|
+
}
|
|
2571
|
+
Hero.displayName = "Hero";
|
|
2572
|
+
var hero_default = Hero;
|
|
2573
|
+
function FeatureSection({
|
|
2574
|
+
title,
|
|
2575
|
+
description,
|
|
2576
|
+
features,
|
|
2577
|
+
columns = 3,
|
|
2578
|
+
centered = true,
|
|
2579
|
+
className = ""
|
|
2580
|
+
}) {
|
|
2581
|
+
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: `py-16 md:py-20 ${className}`, children: /* @__PURE__ */ jsxRuntime.jsxs(container_default, { size: "xl", children: [
|
|
2582
|
+
(title || description) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2583
|
+
"div",
|
|
2584
|
+
{
|
|
2585
|
+
className: `mb-12 md:mb-16 ${centered ? "text-center" : ""} ${centered ? "max-w-3xl mx-auto" : "max-w-3xl"}`,
|
|
2586
|
+
children: [
|
|
2587
|
+
title && /* @__PURE__ */ jsxRuntime.jsx(heading_default, { level: 2, className: "text-3xl md:text-4xl font-bold mb-4", children: title }),
|
|
2588
|
+
description && /* @__PURE__ */ jsxRuntime.jsx(text_default, { className: "text-lg md:text-xl", children: description })
|
|
2589
|
+
]
|
|
2590
|
+
}
|
|
2591
|
+
),
|
|
2592
|
+
/* @__PURE__ */ jsxRuntime.jsx(grid_default, { itemSize: "md", maxCols: columns, gap: "lg", children: features.map((feature, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: centered ? "text-center" : "", children: [
|
|
2593
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2594
|
+
"div",
|
|
2595
|
+
{
|
|
2596
|
+
className: `inline-flex items-center justify-center w-12 h-12 md:w-16 md:h-16 rounded-lg md:rounded-xl bg-primary/10 text-primary mb-4 md:mb-6 ${centered ? "" : "mr-auto"}`,
|
|
2597
|
+
children: feature.icon
|
|
2598
|
+
}
|
|
2599
|
+
),
|
|
2600
|
+
/* @__PURE__ */ jsxRuntime.jsx(heading_default, { level: 3, className: "text-xl font-semibold mb-2 md:mb-3", children: feature.title }),
|
|
2601
|
+
/* @__PURE__ */ jsxRuntime.jsx(text_default, { variant: "muted", className: "text-sm md:text-base", children: feature.description })
|
|
2602
|
+
] }, index)) })
|
|
2603
|
+
] }) });
|
|
2604
|
+
}
|
|
2605
|
+
FeatureSection.displayName = "FeatureSection";
|
|
2606
|
+
var feature_section_default = FeatureSection;
|
|
2607
|
+
function Link2({
|
|
2608
|
+
children,
|
|
2609
|
+
href,
|
|
2610
|
+
external = false,
|
|
2611
|
+
variant = "default",
|
|
2612
|
+
underline = "hover",
|
|
2613
|
+
size = "md",
|
|
2614
|
+
display = "inline",
|
|
2615
|
+
className = ""
|
|
2616
|
+
}) {
|
|
2617
|
+
const variantClasses = {
|
|
2618
|
+
default: "text-primary hover:text-primary/80",
|
|
2619
|
+
muted: "text-muted-foreground hover:text-foreground",
|
|
2620
|
+
secondary: "text-secondary hover:text-secondary/80",
|
|
2621
|
+
inherit: "text-inherit hover:opacity-80"
|
|
2622
|
+
};
|
|
2623
|
+
const underlineClasses = {
|
|
2624
|
+
hover: "hover:underline",
|
|
2625
|
+
always: "underline",
|
|
2626
|
+
none: "no-underline"
|
|
2627
|
+
};
|
|
2628
|
+
const sizeClasses = {
|
|
2629
|
+
sm: "text-sm",
|
|
2630
|
+
md: "text-base",
|
|
2631
|
+
lg: "text-lg"
|
|
2632
|
+
};
|
|
2633
|
+
const displayClasses = {
|
|
2634
|
+
inline: "inline",
|
|
2635
|
+
block: "block"
|
|
2636
|
+
};
|
|
2637
|
+
const linkClassName = [
|
|
2638
|
+
variantClasses[variant],
|
|
2639
|
+
underlineClasses[underline],
|
|
2640
|
+
sizeClasses[size],
|
|
2641
|
+
displayClasses[display],
|
|
2642
|
+
"cursor-pointer transition-colors",
|
|
2643
|
+
className
|
|
2644
|
+
].filter(Boolean).join(" ");
|
|
2645
|
+
if (external) {
|
|
2646
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("a", { href, className: linkClassName, target: "_blank", rel: "noopener noreferrer", children: [
|
|
2647
|
+
children,
|
|
2648
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2649
|
+
"svg",
|
|
2650
|
+
{
|
|
2651
|
+
className: "inline-block w-4 h-4 ml-1",
|
|
2652
|
+
fill: "none",
|
|
2653
|
+
stroke: "currentColor",
|
|
2654
|
+
viewBox: "0 0 24 24",
|
|
2655
|
+
"aria-hidden": "true",
|
|
2656
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2657
|
+
"path",
|
|
2658
|
+
{
|
|
2659
|
+
strokeLinecap: "round",
|
|
2660
|
+
strokeLinejoin: "round",
|
|
2661
|
+
strokeWidth: 2,
|
|
2662
|
+
d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
|
|
2663
|
+
}
|
|
2664
|
+
)
|
|
2665
|
+
}
|
|
2666
|
+
)
|
|
2667
|
+
] });
|
|
2668
|
+
}
|
|
2669
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Link, { to: href, className: linkClassName, children });
|
|
2670
|
+
}
|
|
2671
|
+
Link2.displayName = "Link";
|
|
2672
|
+
var link_default = Link2;
|
|
2673
|
+
function Footer({ sections, copyright, social, className = "" }) {
|
|
2674
|
+
return /* @__PURE__ */ jsxRuntime.jsx("footer", { className: `border-t border-border bg-muted/20 ${className}`, children: /* @__PURE__ */ jsxRuntime.jsxs(container_default, { children: [
|
|
2675
|
+
sections && sections.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-12 md:py-16", children: /* @__PURE__ */ jsxRuntime.jsx(grid_default, { itemSize: "xs", maxCols: 4, gap: "lg", children: sections.map((section, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2676
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-foreground mb-4", children: section.title }),
|
|
2677
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-3", children: section.links.map((link, linkIndex) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2678
|
+
link_default,
|
|
2679
|
+
{
|
|
2680
|
+
href: link.href,
|
|
2681
|
+
external: link.external,
|
|
2682
|
+
className: "text-sm text-muted hover:text-foreground transition-colors",
|
|
2683
|
+
children: link.label
|
|
2684
|
+
}
|
|
2685
|
+
) }, linkIndex)) })
|
|
2686
|
+
] }, index)) }) }),
|
|
2687
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2688
|
+
"div",
|
|
2689
|
+
{
|
|
2690
|
+
className: `${sections && sections.length > 0 ? "border-t border-border" : ""} py-6 flex flex-col md:flex-row items-center justify-between gap-4`,
|
|
2691
|
+
children: [
|
|
2692
|
+
copyright && /* @__PURE__ */ jsxRuntime.jsx(text_default, { variant: "muted", className: "text-sm text-center md:text-left", children: copyright }),
|
|
2693
|
+
social && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center space-x-4", children: social })
|
|
2694
|
+
]
|
|
2695
|
+
}
|
|
2696
|
+
)
|
|
2697
|
+
] }) });
|
|
2698
|
+
}
|
|
2699
|
+
Footer.displayName = "Footer";
|
|
2700
|
+
var footer_default = Footer;
|
|
2701
|
+
function LeftNavLayout({
|
|
2702
|
+
nav,
|
|
2703
|
+
children,
|
|
2704
|
+
collapsed: controlledCollapsed,
|
|
2705
|
+
onCollapsedChange,
|
|
2706
|
+
showToggle = true,
|
|
2707
|
+
className = "",
|
|
2708
|
+
navClassName = "",
|
|
2709
|
+
contentClassName = "",
|
|
2710
|
+
navWidth = "16rem",
|
|
2711
|
+
navWidthCollapsed = "4.5rem",
|
|
2712
|
+
mobileCollapsible = true,
|
|
2713
|
+
mobileMenuOpen: controlledMobileMenuOpen,
|
|
2714
|
+
onMobileMenuOpenChange,
|
|
2715
|
+
embedded = false
|
|
2716
|
+
}) {
|
|
2717
|
+
const [internalCollapsed, setInternalCollapsed] = react.useState(false);
|
|
2718
|
+
const [internalMobileMenuOpen, setInternalMobileMenuOpen] = react.useState(false);
|
|
2719
|
+
const navRef = react.useRef(null);
|
|
2720
|
+
const scrollPosRef = react.useRef(0);
|
|
2721
|
+
const contentRef = react.useRef(null);
|
|
2722
|
+
const location = reactRouterDom.useLocation();
|
|
2723
|
+
const collapsed = controlledCollapsed ?? internalCollapsed;
|
|
2724
|
+
const setCollapsed = (value) => {
|
|
2725
|
+
if (onCollapsedChange) {
|
|
2726
|
+
onCollapsedChange(value);
|
|
2727
|
+
} else {
|
|
2728
|
+
setInternalCollapsed(value);
|
|
2729
|
+
}
|
|
2730
|
+
};
|
|
2731
|
+
const mobileMenuOpen = controlledMobileMenuOpen ?? internalMobileMenuOpen;
|
|
2732
|
+
const setMobileMenuOpen = (value) => {
|
|
2733
|
+
if (onMobileMenuOpenChange) {
|
|
2734
|
+
onMobileMenuOpenChange(value);
|
|
2735
|
+
} else {
|
|
2736
|
+
setInternalMobileMenuOpen(value);
|
|
2737
|
+
}
|
|
2738
|
+
};
|
|
2739
|
+
const toggleCollapsed = () => setCollapsed(!collapsed);
|
|
2740
|
+
const toggleMobileMenu = () => setMobileMenuOpen(!mobileMenuOpen);
|
|
2741
|
+
react.useEffect(() => {
|
|
2742
|
+
if (navRef.current) {
|
|
2743
|
+
navRef.current.scrollTop = scrollPosRef.current;
|
|
2744
|
+
}
|
|
2745
|
+
}, [children]);
|
|
2746
|
+
react.useEffect(() => {
|
|
2747
|
+
if (contentRef.current) {
|
|
2748
|
+
contentRef.current.scrollTop = 0;
|
|
2749
|
+
requestAnimationFrame(() => {
|
|
2750
|
+
if (contentRef.current) {
|
|
2751
|
+
contentRef.current.scrollTop = 0;
|
|
2752
|
+
}
|
|
2753
|
+
});
|
|
2754
|
+
}
|
|
2755
|
+
window.scrollTo({ top: 0 });
|
|
2756
|
+
}, [location.pathname]);
|
|
2757
|
+
const containerClasses = embedded ? "flex bg-background border border-border rounded-lg overflow-hidden" : "flex min-h-screen bg-background";
|
|
2758
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${containerClasses} ${className}`, children: [
|
|
2759
|
+
mobileCollapsible && mobileMenuOpen && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 z-40 lg:hidden bg-background/80", onClick: toggleMobileMenu, "aria-hidden": "true" }),
|
|
2760
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2761
|
+
"aside",
|
|
2762
|
+
{
|
|
2763
|
+
className: `
|
|
2764
|
+
${embedded ? "relative flex flex-col h-full" : "fixed lg:fixed top-0 lg:top-16 left-0 z-40 lg:z-10 h-screen lg:h-[calc(100vh-4rem)]"}
|
|
2765
|
+
flex flex-col
|
|
2766
|
+
bg-background
|
|
2767
|
+
transition-all duration-300 ease-in-out
|
|
2768
|
+
${!embedded && mobileCollapsible && !mobileMenuOpen ? "-translate-x-full lg:translate-x-0" : "translate-x-0"}
|
|
2769
|
+
${collapsed ? navWidthCollapsed === "4.5rem" ? "w-[4.5rem]" : "" : navWidth === "16rem" ? "w-64" : ""}
|
|
2770
|
+
overflow-visible
|
|
2771
|
+
${navClassName}
|
|
2772
|
+
`,
|
|
2773
|
+
style: !collapsed && navWidth !== "16rem" || collapsed && navWidthCollapsed !== "4.5rem" ? {
|
|
2774
|
+
width: collapsed ? navWidthCollapsed : navWidth
|
|
2775
|
+
} : void 0,
|
|
2776
|
+
"aria-label": "Main navigation",
|
|
2777
|
+
children: [
|
|
2778
|
+
showToggle && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2779
|
+
"div",
|
|
2780
|
+
{
|
|
2781
|
+
className: `
|
|
2782
|
+
flex items-center justify-between
|
|
2783
|
+
px-4 py-3 border-b border-border
|
|
2784
|
+
${collapsed ? "justify-center" : ""}
|
|
2785
|
+
`,
|
|
2786
|
+
children: [
|
|
2787
|
+
!collapsed && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-foreground", children: "Navigation" }),
|
|
2788
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2789
|
+
"button",
|
|
2790
|
+
{
|
|
2791
|
+
onClick: toggleCollapsed,
|
|
2792
|
+
className: "\n hidden lg:flex items-center justify-center\n w-8 h-8 rounded\n text-foreground/70 hover:text-foreground\n hover:bg-muted\n transition-colors\n focus:outline-none focus:ring-2 focus:ring-ring\n ",
|
|
2793
|
+
"aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
2794
|
+
type: "button",
|
|
2795
|
+
children: collapsed ? /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconChevronRight, { size: 20 }) : /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconChevronLeft, { size: 20 })
|
|
2796
|
+
}
|
|
2797
|
+
)
|
|
2798
|
+
]
|
|
2799
|
+
}
|
|
2800
|
+
),
|
|
2801
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2802
|
+
"nav",
|
|
2803
|
+
{
|
|
2804
|
+
ref: navRef,
|
|
2805
|
+
className: "flex-1 overflow-y-auto overflow-x-visible scrollbar-thin",
|
|
2806
|
+
"data-collapsed": collapsed,
|
|
2807
|
+
onScroll: (e) => {
|
|
2808
|
+
scrollPosRef.current = e.currentTarget.scrollTop;
|
|
2809
|
+
},
|
|
2810
|
+
children: nav
|
|
2811
|
+
}
|
|
2812
|
+
)
|
|
2813
|
+
]
|
|
2814
|
+
}
|
|
2815
|
+
),
|
|
2816
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2817
|
+
"div",
|
|
2818
|
+
{
|
|
2819
|
+
className: `flex-1 flex flex-col min-w-0 ${!embedded ? "transition-[margin-left] duration-300 ease-in-out" : ""} ${!embedded && collapsed ? navWidthCollapsed === "4.5rem" ? "lg:ml-[4.5rem]" : "" : !embedded && navWidth === "16rem" ? "lg:ml-64" : ""}`,
|
|
2820
|
+
style: !embedded && (collapsed && navWidthCollapsed !== "4.5rem" || !collapsed && navWidth !== "16rem") ? {
|
|
2821
|
+
marginLeft: window.innerWidth >= 1024 ? collapsed ? navWidthCollapsed : navWidth : "0"
|
|
2822
|
+
} : void 0,
|
|
2823
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("main", { ref: contentRef, className: `flex-1 overflow-auto ${embedded ? "h-60" : ""} ${contentClassName}`, children })
|
|
2824
|
+
}
|
|
2825
|
+
)
|
|
2826
|
+
] });
|
|
2827
|
+
}
|
|
2828
|
+
LeftNavLayout.displayName = "LeftNavLayout";
|
|
2829
|
+
var left_nav_layout_default = LeftNavLayout;
|
|
2830
|
+
function LeftNavItem({
|
|
2831
|
+
icon,
|
|
2832
|
+
children,
|
|
2833
|
+
active = false,
|
|
2834
|
+
className = "",
|
|
2835
|
+
badge,
|
|
2836
|
+
href = "#",
|
|
2837
|
+
title,
|
|
2838
|
+
preventNavigation = false
|
|
2839
|
+
}) {
|
|
2840
|
+
const navRef = react.useRef(null);
|
|
2841
|
+
const [isCollapsed, setIsCollapsed] = react.useState(() => {
|
|
2842
|
+
if (typeof window !== "undefined") {
|
|
2843
|
+
const navElement = document.querySelector("nav[data-collapsed]");
|
|
2844
|
+
return navElement?.getAttribute("data-collapsed") === "true";
|
|
2845
|
+
}
|
|
2846
|
+
return false;
|
|
2847
|
+
});
|
|
2848
|
+
react.useEffect(() => {
|
|
2849
|
+
const checkCollapsed = () => {
|
|
2850
|
+
const navElement2 = navRef.current?.closest("nav");
|
|
2851
|
+
if (navElement2) {
|
|
2852
|
+
setIsCollapsed(navElement2.getAttribute("data-collapsed") === "true");
|
|
2853
|
+
}
|
|
2854
|
+
};
|
|
2855
|
+
checkCollapsed();
|
|
2856
|
+
const navElement = navRef.current?.closest("nav");
|
|
2857
|
+
if (navElement) {
|
|
2858
|
+
const observer = new MutationObserver(checkCollapsed);
|
|
2859
|
+
observer.observe(navElement, {
|
|
2860
|
+
attributes: true,
|
|
2861
|
+
attributeFilter: ["data-collapsed"]
|
|
2862
|
+
});
|
|
2863
|
+
return () => observer.disconnect();
|
|
2864
|
+
}
|
|
2865
|
+
return void 0;
|
|
2866
|
+
}, []);
|
|
2867
|
+
const itemTitle = title || (typeof children === "string" ? children : void 0);
|
|
2868
|
+
const navLink = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2869
|
+
reactRouterDom.NavLink,
|
|
2870
|
+
{
|
|
2871
|
+
ref: navRef,
|
|
2872
|
+
to: href,
|
|
2873
|
+
onClick: (e) => {
|
|
2874
|
+
if (preventNavigation) {
|
|
2875
|
+
e.preventDefault();
|
|
2876
|
+
}
|
|
2877
|
+
},
|
|
2878
|
+
className: ({ isActive }) => `
|
|
2879
|
+
group relative flex items-center gap-3
|
|
2880
|
+
px-3 py-2.5 rounded-lg
|
|
2881
|
+
mx-2
|
|
2882
|
+
[nav[data-collapsed='true']_&]:mx-2
|
|
2883
|
+
[nav[data-collapsed='true']_&]:px-0
|
|
2884
|
+
[nav[data-collapsed='true']_&]:w-12
|
|
2885
|
+
[nav[data-collapsed='true']_&]:justify-center
|
|
2886
|
+
text-sm font-medium
|
|
2887
|
+
transition-colors duration-200
|
|
2888
|
+
focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-card
|
|
2889
|
+
${isActive || active ? "bg-primary text-primary-foreground shadow-sm" : "text-foreground hover:bg-muted hover:text-foreground"}
|
|
2890
|
+
${className}
|
|
2891
|
+
`,
|
|
2892
|
+
"aria-current": active ? "page" : void 0,
|
|
2893
|
+
"aria-label": itemTitle,
|
|
2894
|
+
end: true,
|
|
2895
|
+
children: [
|
|
2896
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", "aria-hidden": "true", children: icon }),
|
|
2897
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2898
|
+
"span",
|
|
2899
|
+
{
|
|
2900
|
+
className: "\n flex-1 truncate\n [nav[data-collapsed='true']_&]:hidden\n ",
|
|
2901
|
+
children
|
|
2902
|
+
}
|
|
2903
|
+
),
|
|
2904
|
+
badge && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2905
|
+
"span",
|
|
2906
|
+
{
|
|
2907
|
+
className: "\n flex-shrink-0\n [nav[data-collapsed='true']_&]:hidden\n ",
|
|
2908
|
+
children: badge
|
|
2909
|
+
}
|
|
2910
|
+
)
|
|
2911
|
+
]
|
|
2912
|
+
}
|
|
2913
|
+
);
|
|
2914
|
+
if (!isCollapsed) {
|
|
2915
|
+
return navLink;
|
|
2916
|
+
}
|
|
2917
|
+
const tooltipContent = typeof children === "string" ? children : itemTitle || "Menu Item";
|
|
2918
|
+
return /* @__PURE__ */ jsxRuntime.jsx(tooltip_default, { content: tooltipContent, position: "right", variant: "default", usePortal: true, className: "w-full block", children: navLink });
|
|
2919
|
+
}
|
|
2920
|
+
LeftNavItem.displayName = "LeftNavItem";
|
|
2921
|
+
var left_nav_item_default = LeftNavItem;
|
|
2922
|
+
function LeftNavSection({ children, label, className = "" }) {
|
|
2923
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `py-2 ${className}`, children: [
|
|
2924
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2925
|
+
"h3",
|
|
2926
|
+
{
|
|
2927
|
+
className: "\n px-5 mb-2 mt-2\n text-xs font-semibold uppercase tracking-wider\n text-muted-foreground\n [nav[data-collapsed='true']_&]:hidden\n ",
|
|
2928
|
+
children: label
|
|
2929
|
+
}
|
|
2930
|
+
),
|
|
2931
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1", children }),
|
|
2932
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-px bg-border mx-3 mt-2", "aria-hidden": "true" })
|
|
2933
|
+
] });
|
|
2934
|
+
}
|
|
2935
|
+
LeftNavSection.displayName = "LeftNavSection";
|
|
2936
|
+
var left_nav_section_default = LeftNavSection;
|
|
2937
|
+
function Code({ children, block = false, variant = "default", className = "" }) {
|
|
2938
|
+
const variantClasses = {
|
|
2939
|
+
default: "bg-muted text-foreground",
|
|
2940
|
+
primary: "text-primary",
|
|
2941
|
+
muted: "text-muted-foreground"
|
|
2942
|
+
};
|
|
2943
|
+
const baseClasses = `font-mono ${variantClasses[variant]}`;
|
|
2944
|
+
if (block) {
|
|
2945
|
+
return /* @__PURE__ */ jsxRuntime.jsx("pre", { className: `${baseClasses} p-4 rounded-lg overflow-x-auto border border-border ${className}`, children: /* @__PURE__ */ jsxRuntime.jsx("code", { children }) });
|
|
2946
|
+
}
|
|
2947
|
+
return /* @__PURE__ */ jsxRuntime.jsx("code", { className: `${baseClasses} px-1.5 py-0.5 rounded text-sm ${className}`, children });
|
|
2948
|
+
}
|
|
2949
|
+
Code.displayName = "Code";
|
|
2950
|
+
var code_default = Code;
|
|
2951
|
+
var ThemeContext = react.createContext(void 0);
|
|
2952
|
+
function ThemeProvider({
|
|
2953
|
+
children,
|
|
2954
|
+
defaultTheme = "light",
|
|
2955
|
+
storageKey = "hydn-theme",
|
|
2956
|
+
themes = ["light", "dark"]
|
|
2957
|
+
}) {
|
|
2958
|
+
const [theme, setThemeState] = react.useState(() => {
|
|
2959
|
+
if (typeof window !== "undefined") {
|
|
2960
|
+
const stored = localStorage.getItem(storageKey);
|
|
2961
|
+
return stored && themes.includes(stored) ? stored : defaultTheme;
|
|
2962
|
+
}
|
|
2963
|
+
return defaultTheme;
|
|
2964
|
+
});
|
|
2965
|
+
react.useEffect(() => {
|
|
2966
|
+
const root = window.document.documentElement;
|
|
2967
|
+
root.classList.remove(...themes);
|
|
2968
|
+
root.classList.add(theme);
|
|
2969
|
+
}, [theme, themes]);
|
|
2970
|
+
const setTheme = react.useCallback(
|
|
2971
|
+
(newTheme) => {
|
|
2972
|
+
if (themes.includes(newTheme)) {
|
|
2973
|
+
localStorage.setItem(storageKey, newTheme);
|
|
2974
|
+
setThemeState(newTheme);
|
|
2975
|
+
} else {
|
|
2976
|
+
console.warn(`Theme "${newTheme}" is not in availableThemes. Add it to the themes prop.`);
|
|
2977
|
+
}
|
|
2978
|
+
},
|
|
2979
|
+
[themes, storageKey]
|
|
2980
|
+
);
|
|
2981
|
+
const value = react.useMemo(
|
|
2982
|
+
() => ({
|
|
2983
|
+
theme,
|
|
2984
|
+
setTheme,
|
|
2985
|
+
availableThemes: themes
|
|
2986
|
+
}),
|
|
2987
|
+
[theme, themes, setTheme]
|
|
2988
|
+
);
|
|
2989
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.Provider, { value, children });
|
|
2990
|
+
}
|
|
2991
|
+
function useTheme() {
|
|
2992
|
+
const context = react.useContext(ThemeContext);
|
|
2993
|
+
if (!context) {
|
|
2994
|
+
throw new Error("useTheme must be used within a ThemeProvider");
|
|
2995
|
+
}
|
|
2996
|
+
return context;
|
|
2997
|
+
}
|
|
2998
|
+
function ColorModeToggle({ className = "" }) {
|
|
2999
|
+
const { theme, setTheme } = useTheme();
|
|
3000
|
+
const toggleTheme = () => {
|
|
3001
|
+
setTheme(theme === "light" ? "dark" : "light");
|
|
3002
|
+
};
|
|
3003
|
+
const getIcon = () => {
|
|
3004
|
+
if (theme === "dark") {
|
|
3005
|
+
return /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3006
|
+
"path",
|
|
3007
|
+
{
|
|
3008
|
+
strokeLinecap: "round",
|
|
3009
|
+
strokeLinejoin: "round",
|
|
3010
|
+
strokeWidth: 2,
|
|
3011
|
+
d: "M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"
|
|
3012
|
+
}
|
|
3013
|
+
) });
|
|
3014
|
+
}
|
|
3015
|
+
return /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3016
|
+
"path",
|
|
3017
|
+
{
|
|
3018
|
+
strokeLinecap: "round",
|
|
3019
|
+
strokeLinejoin: "round",
|
|
3020
|
+
strokeWidth: 2,
|
|
3021
|
+
d: "M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"
|
|
3022
|
+
}
|
|
3023
|
+
) });
|
|
3024
|
+
};
|
|
3025
|
+
const getLabel = () => {
|
|
3026
|
+
return `Switch to ${theme === "light" ? "dark" : "light"} theme`;
|
|
3027
|
+
};
|
|
3028
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3029
|
+
"button",
|
|
3030
|
+
{
|
|
3031
|
+
onClick: toggleTheme,
|
|
3032
|
+
className: `p-2 rounded-md hover:bg-accent hover:text-accent-foreground transition-colors cursor-pointer ${className}`,
|
|
3033
|
+
"aria-label": getLabel(),
|
|
3034
|
+
title: getLabel(),
|
|
3035
|
+
children: getIcon()
|
|
3036
|
+
}
|
|
3037
|
+
);
|
|
3038
|
+
}
|
|
3039
|
+
ColorModeToggle.displayName = "ColorModeToggle";
|
|
3040
|
+
var color_mode_toggle_default = ColorModeToggle;
|
|
3041
|
+
|
|
3042
|
+
exports.Accordion = accordion_default;
|
|
3043
|
+
exports.AccordionItem = AccordionItem;
|
|
3044
|
+
exports.Alert = alert_default;
|
|
3045
|
+
exports.Avatar = avatar_default;
|
|
3046
|
+
exports.Badge = badge_default;
|
|
3047
|
+
exports.Breadcrumbs = breadcrumbs_default;
|
|
3048
|
+
exports.Button = button_default;
|
|
3049
|
+
exports.ButtonGroup = button_group_default;
|
|
3050
|
+
exports.Card = card_default;
|
|
3051
|
+
exports.CardFooter = card_footer_default;
|
|
3052
|
+
exports.CardHeader = card_header_default;
|
|
3053
|
+
exports.Checkbox = checkbox_default;
|
|
3054
|
+
exports.Chip = chip_default;
|
|
3055
|
+
exports.Code = code_default;
|
|
3056
|
+
exports.CodeBlock = code_block_default;
|
|
3057
|
+
exports.ColorModeToggle = color_mode_toggle_default;
|
|
3058
|
+
exports.Container = container_default;
|
|
3059
|
+
exports.DataTable = data_table_default;
|
|
3060
|
+
exports.DeleteDialog = delete_dialog_default;
|
|
3061
|
+
exports.Dialog = dialog_default;
|
|
3062
|
+
exports.Divider = divider_default;
|
|
3063
|
+
exports.Drawer = drawer_default;
|
|
3064
|
+
exports.Dropdown = dropdown_default;
|
|
3065
|
+
exports.EmptyState = empty_state_default;
|
|
3066
|
+
exports.FeatureSection = feature_section_default;
|
|
3067
|
+
exports.Footer = footer_default;
|
|
3068
|
+
exports.FormField = form_field_default;
|
|
3069
|
+
exports.Grid = grid_default;
|
|
3070
|
+
exports.Heading = heading_default;
|
|
3071
|
+
exports.Hero = hero_default;
|
|
3072
|
+
exports.Input = input_default;
|
|
3073
|
+
exports.InputGroup = input_group_default;
|
|
3074
|
+
exports.LeftNavItem = left_nav_item_default;
|
|
3075
|
+
exports.LeftNavLayout = left_nav_layout_default;
|
|
3076
|
+
exports.LeftNavSection = left_nav_section_default;
|
|
3077
|
+
exports.Link = link_default;
|
|
3078
|
+
exports.List = List;
|
|
3079
|
+
exports.ListItem = ListItem;
|
|
3080
|
+
exports.Modal = modal_default;
|
|
3081
|
+
exports.Nav = nav_default;
|
|
3082
|
+
exports.Navbar = navbar_default;
|
|
3083
|
+
exports.NavbarBrand = navbar_brand_default;
|
|
3084
|
+
exports.NavbarLink = navbar_link_default;
|
|
3085
|
+
exports.Page = page_default;
|
|
3086
|
+
exports.Pagination = pagination_default;
|
|
3087
|
+
exports.Popover = popover_default;
|
|
3088
|
+
exports.PricingTable = pricing_table_default;
|
|
3089
|
+
exports.PricingTier = pricing_tier_default;
|
|
3090
|
+
exports.ProgressBar = progress_bar_default;
|
|
3091
|
+
exports.Radio = radio_default;
|
|
3092
|
+
exports.RadioGroup = radio_group_default;
|
|
3093
|
+
exports.Select = select_default;
|
|
3094
|
+
exports.SelectItem = select_item_default;
|
|
3095
|
+
exports.Sidebar = sidebar_default;
|
|
3096
|
+
exports.Skeleton = skeleton_default;
|
|
3097
|
+
exports.Slider = slider_default;
|
|
3098
|
+
exports.Spinner = spinner_default;
|
|
3099
|
+
exports.Stack = stack_default;
|
|
3100
|
+
exports.StatusLabel = status_label_default;
|
|
3101
|
+
exports.Stepper = stepper_default;
|
|
3102
|
+
exports.Switch = switch_default;
|
|
3103
|
+
exports.Table = Table;
|
|
3104
|
+
exports.TableBody = TableBody;
|
|
3105
|
+
exports.TableCell = TableCell;
|
|
3106
|
+
exports.TableFooter = TableFooter;
|
|
3107
|
+
exports.TableHeadCell = TableHeadCell;
|
|
3108
|
+
exports.TableHeader = TableHeader;
|
|
3109
|
+
exports.TableRow = TableRow;
|
|
3110
|
+
exports.Tabs = tabs_default;
|
|
3111
|
+
exports.Text = text_default;
|
|
3112
|
+
exports.Textarea = textarea_default;
|
|
3113
|
+
exports.ThemeProvider = ThemeProvider;
|
|
3114
|
+
exports.Timeline = timeline_default;
|
|
3115
|
+
exports.TimelineItem = TimelineItem;
|
|
3116
|
+
exports.Toast = toast_default;
|
|
3117
|
+
exports.Tooltip = tooltip_default;
|
|
3118
|
+
exports.useTable = useTable;
|
|
3119
|
+
exports.useTheme = useTheme;
|
|
3120
|
+
//# sourceMappingURL=index.cjs.map
|
|
3121
|
+
//# sourceMappingURL=index.cjs.map
|