@thetinycode/hash-ui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +189 -0
- package/dist/index.cjs +1111 -0
- package/dist/index.d.cts +182 -0
- package/dist/index.d.ts +182 -0
- package/dist/index.js +1000 -0
- package/dist/styles.css +1 -0
- package/package.json +43 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1000 @@
|
|
|
1
|
+
// src/components/forms/button.tsx
|
|
2
|
+
import "react";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
|
|
5
|
+
// src/lib/cn.ts
|
|
6
|
+
import { clsx } from "clsx";
|
|
7
|
+
import { twMerge } from "tailwind-merge";
|
|
8
|
+
function cn(...inputs) {
|
|
9
|
+
return twMerge(clsx(inputs));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// src/components/forms/button.tsx
|
|
13
|
+
import { jsx } from "react/jsx-runtime";
|
|
14
|
+
var buttonVariants = cva(
|
|
15
|
+
"inline-flex items-center justify-center rounded-xl font-medium transition-colors focus:outline-none disabled:pointer-events-none disabled:opacity-50",
|
|
16
|
+
{
|
|
17
|
+
variants: {
|
|
18
|
+
variant: {
|
|
19
|
+
primary: "bg-blue-600 text-white hover:bg-blue-700",
|
|
20
|
+
secondary: "bg-gray-100 text-gray-900 hover:bg-gray-200",
|
|
21
|
+
outline: "border border-gray-300 bg-white text-gray-900 hover:bg-gray-50",
|
|
22
|
+
ghost: "hover:bg-gray-100 text-gray-900"
|
|
23
|
+
},
|
|
24
|
+
size: {
|
|
25
|
+
sm: "h-9 px-3 text-sm",
|
|
26
|
+
md: "h-10 px-4 text-sm",
|
|
27
|
+
lg: "h-12 px-6 text-base"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
variant: "primary",
|
|
32
|
+
size: "md"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
function Button({
|
|
37
|
+
className,
|
|
38
|
+
variant,
|
|
39
|
+
size,
|
|
40
|
+
...props
|
|
41
|
+
}) {
|
|
42
|
+
return /* @__PURE__ */ jsx(
|
|
43
|
+
"button",
|
|
44
|
+
{
|
|
45
|
+
className: cn(buttonVariants({ variant, size }), className),
|
|
46
|
+
...props
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// src/components/forms/input.tsx
|
|
52
|
+
import * as React2 from "react";
|
|
53
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
54
|
+
var Input = React2.forwardRef(
|
|
55
|
+
({ className, type = "text", ...props }, ref) => {
|
|
56
|
+
return /* @__PURE__ */ jsx2(
|
|
57
|
+
"input",
|
|
58
|
+
{
|
|
59
|
+
ref,
|
|
60
|
+
type,
|
|
61
|
+
className: cn(
|
|
62
|
+
"flex h-10 w-full rounded-xl border border-gray-300 bg-white px-3 py-2 text-sm text-gray-900 outline-none transition-colors placeholder:text-gray-400 focus:border-gray-400 disabled:cursor-not-allowed disabled:opacity-50",
|
|
63
|
+
className
|
|
64
|
+
),
|
|
65
|
+
...props
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
Input.displayName = "Input";
|
|
71
|
+
|
|
72
|
+
// src/components/forms/label.tsx
|
|
73
|
+
import "react";
|
|
74
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
75
|
+
function Label({ className, ...props }) {
|
|
76
|
+
return /* @__PURE__ */ jsx3(
|
|
77
|
+
"label",
|
|
78
|
+
{
|
|
79
|
+
className: cn(
|
|
80
|
+
"text-sm font-medium leading-none text-gray-900",
|
|
81
|
+
className
|
|
82
|
+
),
|
|
83
|
+
...props
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// src/components/forms/select.tsx
|
|
89
|
+
import * as React4 from "react";
|
|
90
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
91
|
+
var Select = React4.forwardRef(
|
|
92
|
+
({ className, children, ...props }, ref) => {
|
|
93
|
+
return /* @__PURE__ */ jsx4(
|
|
94
|
+
"select",
|
|
95
|
+
{
|
|
96
|
+
ref,
|
|
97
|
+
className: cn(
|
|
98
|
+
"flex h-10 w-full rounded-xl border border-gray-300 bg-white px-3 py-2 text-sm text-gray-900 outline-none transition-colors focus:border-gray-400 disabled:cursor-not-allowed disabled:opacity-50",
|
|
99
|
+
className
|
|
100
|
+
),
|
|
101
|
+
...props,
|
|
102
|
+
children
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
Select.displayName = "Select";
|
|
108
|
+
|
|
109
|
+
// src/components/forms/switch.tsx
|
|
110
|
+
import * as React5 from "react";
|
|
111
|
+
import { jsx as jsx5, jsxs } from "react/jsx-runtime";
|
|
112
|
+
var Switch = React5.forwardRef(
|
|
113
|
+
({ className, ...props }, ref) => {
|
|
114
|
+
return /* @__PURE__ */ jsxs("label", { className: "inline-flex cursor-pointer items-center", children: [
|
|
115
|
+
/* @__PURE__ */ jsx5("input", { ref, type: "checkbox", className: "peer sr-only", ...props }),
|
|
116
|
+
/* @__PURE__ */ jsx5(
|
|
117
|
+
"span",
|
|
118
|
+
{
|
|
119
|
+
className: cn(
|
|
120
|
+
"relative h-6 w-11 rounded-full bg-gray-300 transition-colors after:absolute after:left-0.5 after:top-0.5 after:h-5 after:w-5 after:rounded-full after:bg-white after:transition-transform peer-checked:bg-gray-900 peer-checked:after:translate-x-5 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
121
|
+
className
|
|
122
|
+
)
|
|
123
|
+
}
|
|
124
|
+
)
|
|
125
|
+
] });
|
|
126
|
+
}
|
|
127
|
+
);
|
|
128
|
+
Switch.displayName = "Switch";
|
|
129
|
+
|
|
130
|
+
// src/components/forms/textarea.tsx
|
|
131
|
+
import * as React6 from "react";
|
|
132
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
133
|
+
var Textarea = React6.forwardRef(
|
|
134
|
+
({ className, ...props }, ref) => {
|
|
135
|
+
return /* @__PURE__ */ jsx6(
|
|
136
|
+
"textarea",
|
|
137
|
+
{
|
|
138
|
+
ref,
|
|
139
|
+
className: cn(
|
|
140
|
+
"flex min-h-[120px] w-full rounded-xl border border-gray-300 bg-white px-3 py-2 text-sm text-gray-900 outline-none transition-colors placeholder:text-gray-400 focus:border-gray-400 disabled:cursor-not-allowed disabled:opacity-50",
|
|
141
|
+
className
|
|
142
|
+
),
|
|
143
|
+
...props
|
|
144
|
+
}
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
);
|
|
148
|
+
Textarea.displayName = "Textarea";
|
|
149
|
+
|
|
150
|
+
// src/components/display/alert.tsx
|
|
151
|
+
import "react";
|
|
152
|
+
import { cva as cva2 } from "class-variance-authority";
|
|
153
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
154
|
+
var alertVariants = cva2("rounded-2xl border p-4", {
|
|
155
|
+
variants: {
|
|
156
|
+
variant: {
|
|
157
|
+
default: "border-gray-200 bg-white text-gray-900",
|
|
158
|
+
success: "border-green-200 bg-green-50 text-green-800",
|
|
159
|
+
warning: "border-yellow-200 bg-yellow-50 text-yellow-800",
|
|
160
|
+
danger: "border-red-200 bg-red-50 text-red-800",
|
|
161
|
+
info: "border-blue-200 bg-blue-50 text-blue-800"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
defaultVariants: {
|
|
165
|
+
variant: "default"
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
function Alert({ className, variant, ...props }) {
|
|
169
|
+
return /* @__PURE__ */ jsx7("div", { role: "alert", className: cn(alertVariants({ variant }), className), ...props });
|
|
170
|
+
}
|
|
171
|
+
function AlertTitle({
|
|
172
|
+
className,
|
|
173
|
+
...props
|
|
174
|
+
}) {
|
|
175
|
+
return /* @__PURE__ */ jsx7("h5", { className: cn("mb-1 font-semibold", className), ...props });
|
|
176
|
+
}
|
|
177
|
+
function AlertDescription({
|
|
178
|
+
className,
|
|
179
|
+
...props
|
|
180
|
+
}) {
|
|
181
|
+
return /* @__PURE__ */ jsx7("p", { className: cn("text-sm opacity-90", className), ...props });
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// src/components/display/avatar.tsx
|
|
185
|
+
import "react";
|
|
186
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
187
|
+
function Avatar({
|
|
188
|
+
className,
|
|
189
|
+
src,
|
|
190
|
+
alt,
|
|
191
|
+
fallback,
|
|
192
|
+
...props
|
|
193
|
+
}) {
|
|
194
|
+
return /* @__PURE__ */ jsx8(
|
|
195
|
+
"div",
|
|
196
|
+
{
|
|
197
|
+
className: cn(
|
|
198
|
+
"relative flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-full bg-gray-100 text-sm font-medium text-gray-700",
|
|
199
|
+
className
|
|
200
|
+
),
|
|
201
|
+
...props,
|
|
202
|
+
children: src ? /* @__PURE__ */ jsx8("img", { src, alt: alt ?? "Avatar", className: "h-full w-full object-cover" }) : /* @__PURE__ */ jsx8("span", { children: fallback ?? "UI" })
|
|
203
|
+
}
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
function AvatarGroup({
|
|
207
|
+
className,
|
|
208
|
+
...props
|
|
209
|
+
}) {
|
|
210
|
+
return /* @__PURE__ */ jsx8("div", { className: cn("flex -space-x-3", className), ...props });
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// src/components/display/badge.tsx
|
|
214
|
+
import "react";
|
|
215
|
+
import { cva as cva3 } from "class-variance-authority";
|
|
216
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
217
|
+
var badgeVariants = cva3(
|
|
218
|
+
"inline-flex items-center rounded-full px-2.5 py-1 text-xs font-medium",
|
|
219
|
+
{
|
|
220
|
+
variants: {
|
|
221
|
+
variant: {
|
|
222
|
+
default: "bg-gray-900 text-white",
|
|
223
|
+
secondary: "bg-gray-100 text-gray-900",
|
|
224
|
+
success: "bg-green-100 text-green-700",
|
|
225
|
+
warning: "bg-yellow-100 text-yellow-700",
|
|
226
|
+
danger: "bg-red-100 text-red-700",
|
|
227
|
+
info: "bg-blue-100 text-blue-700"
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
defaultVariants: {
|
|
231
|
+
variant: "default"
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
);
|
|
235
|
+
function Badge({ className, variant, ...props }) {
|
|
236
|
+
return /* @__PURE__ */ jsx9("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// src/components/display/card.tsx
|
|
240
|
+
import "react";
|
|
241
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
242
|
+
function Card({
|
|
243
|
+
className,
|
|
244
|
+
...props
|
|
245
|
+
}) {
|
|
246
|
+
return /* @__PURE__ */ jsx10(
|
|
247
|
+
"div",
|
|
248
|
+
{
|
|
249
|
+
className: cn("rounded-2xl border border-gray-200 bg-white shadow-sm", className),
|
|
250
|
+
...props
|
|
251
|
+
}
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
function CardHeader({
|
|
255
|
+
className,
|
|
256
|
+
...props
|
|
257
|
+
}) {
|
|
258
|
+
return /* @__PURE__ */ jsx10("div", { className: cn("p-6 pb-4", className), ...props });
|
|
259
|
+
}
|
|
260
|
+
function CardTitle({
|
|
261
|
+
className,
|
|
262
|
+
...props
|
|
263
|
+
}) {
|
|
264
|
+
return /* @__PURE__ */ jsx10("h3", { className: cn("text-lg font-semibold text-gray-900", className), ...props });
|
|
265
|
+
}
|
|
266
|
+
function CardDescription({
|
|
267
|
+
className,
|
|
268
|
+
...props
|
|
269
|
+
}) {
|
|
270
|
+
return /* @__PURE__ */ jsx10("p", { className: cn("text-sm text-gray-500", className), ...props });
|
|
271
|
+
}
|
|
272
|
+
function CardContent({
|
|
273
|
+
className,
|
|
274
|
+
...props
|
|
275
|
+
}) {
|
|
276
|
+
return /* @__PURE__ */ jsx10("div", { className: cn("p-6 pt-0", className), ...props });
|
|
277
|
+
}
|
|
278
|
+
function CardFooter({
|
|
279
|
+
className,
|
|
280
|
+
...props
|
|
281
|
+
}) {
|
|
282
|
+
return /* @__PURE__ */ jsx10("div", { className: cn("flex items-center p-6 pt-4", className), ...props });
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// src/components/display/empty-state.tsx
|
|
286
|
+
import "react";
|
|
287
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
288
|
+
function EmptyState({
|
|
289
|
+
className,
|
|
290
|
+
...props
|
|
291
|
+
}) {
|
|
292
|
+
return /* @__PURE__ */ jsx11(
|
|
293
|
+
"div",
|
|
294
|
+
{
|
|
295
|
+
className: cn(
|
|
296
|
+
"flex flex-col items-center justify-center rounded-2xl border border-dashed border-gray-300 bg-gray-50 p-10 text-center",
|
|
297
|
+
className
|
|
298
|
+
),
|
|
299
|
+
...props
|
|
300
|
+
}
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
function EmptyStateTitle({
|
|
304
|
+
className,
|
|
305
|
+
...props
|
|
306
|
+
}) {
|
|
307
|
+
return /* @__PURE__ */ jsx11("h3", { className: cn("mt-4 text-lg font-semibold text-gray-900", className), ...props });
|
|
308
|
+
}
|
|
309
|
+
function EmptyStateDescription({
|
|
310
|
+
className,
|
|
311
|
+
...props
|
|
312
|
+
}) {
|
|
313
|
+
return /* @__PURE__ */ jsx11("p", { className: cn("mt-2 max-w-md text-sm text-gray-500", className), ...props });
|
|
314
|
+
}
|
|
315
|
+
function EmptyStateActions({
|
|
316
|
+
className,
|
|
317
|
+
...props
|
|
318
|
+
}) {
|
|
319
|
+
return /* @__PURE__ */ jsx11("div", { className: cn("mt-6 flex items-center gap-3", className), ...props });
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
// src/components/display/stat.tsx
|
|
323
|
+
import "react";
|
|
324
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
325
|
+
function Stat({
|
|
326
|
+
className,
|
|
327
|
+
...props
|
|
328
|
+
}) {
|
|
329
|
+
return /* @__PURE__ */ jsx12(
|
|
330
|
+
"div",
|
|
331
|
+
{
|
|
332
|
+
className: cn("rounded-2xl border border-gray-200 bg-white p-6 shadow-sm", className),
|
|
333
|
+
...props
|
|
334
|
+
}
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
function StatLabel({
|
|
338
|
+
className,
|
|
339
|
+
...props
|
|
340
|
+
}) {
|
|
341
|
+
return /* @__PURE__ */ jsx12("p", { className: cn("text-sm text-gray-500", className), ...props });
|
|
342
|
+
}
|
|
343
|
+
function StatValue({
|
|
344
|
+
className,
|
|
345
|
+
...props
|
|
346
|
+
}) {
|
|
347
|
+
return /* @__PURE__ */ jsx12("p", { className: cn("mt-2 text-3xl font-semibold text-gray-900", className), ...props });
|
|
348
|
+
}
|
|
349
|
+
function StatChange({
|
|
350
|
+
className,
|
|
351
|
+
...props
|
|
352
|
+
}) {
|
|
353
|
+
return /* @__PURE__ */ jsx12("p", { className: cn("mt-2 text-sm font-medium text-gray-600", className), ...props });
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
// src/components/primitives/box.tsx
|
|
357
|
+
import "react";
|
|
358
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
359
|
+
function Box({
|
|
360
|
+
className,
|
|
361
|
+
...props
|
|
362
|
+
}) {
|
|
363
|
+
return /* @__PURE__ */ jsx13("div", { className: cn(className), ...props });
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
// src/components/primitives/container.tsx
|
|
367
|
+
import "react";
|
|
368
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
369
|
+
function Container({
|
|
370
|
+
className,
|
|
371
|
+
size = "lg",
|
|
372
|
+
...props
|
|
373
|
+
}) {
|
|
374
|
+
const sizes = {
|
|
375
|
+
sm: "max-w-3xl",
|
|
376
|
+
md: "max-w-5xl",
|
|
377
|
+
lg: "max-w-7xl",
|
|
378
|
+
full: "max-w-none"
|
|
379
|
+
};
|
|
380
|
+
return /* @__PURE__ */ jsx14(
|
|
381
|
+
"div",
|
|
382
|
+
{
|
|
383
|
+
className: cn("mx-auto w-full px-4 sm:px-6 lg:px-8", sizes[size], className),
|
|
384
|
+
...props
|
|
385
|
+
}
|
|
386
|
+
);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
// src/components/primitives/divider.tsx
|
|
390
|
+
import "react";
|
|
391
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
392
|
+
function Divider({
|
|
393
|
+
className,
|
|
394
|
+
orientation = "horizontal",
|
|
395
|
+
...props
|
|
396
|
+
}) {
|
|
397
|
+
if (orientation === "vertical") {
|
|
398
|
+
return /* @__PURE__ */ jsx15("div", { className: cn("h-full w-px bg-gray-200", className), ...props });
|
|
399
|
+
}
|
|
400
|
+
return /* @__PURE__ */ jsx15("hr", { className: cn("w-full border-0 border-t border-gray-200", className), ...props });
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
// src/components/primitives/grid.tsx
|
|
404
|
+
import "react";
|
|
405
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
406
|
+
function Grid({
|
|
407
|
+
className,
|
|
408
|
+
cols = 3,
|
|
409
|
+
gap = "md",
|
|
410
|
+
...props
|
|
411
|
+
}) {
|
|
412
|
+
const colsClasses = {
|
|
413
|
+
1: "grid-cols-1",
|
|
414
|
+
2: "grid-cols-2",
|
|
415
|
+
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
|
|
416
|
+
4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4",
|
|
417
|
+
5: "grid-cols-1 md:grid-cols-2 lg:grid-cols-5",
|
|
418
|
+
6: "grid-cols-1 md:grid-cols-2 lg:grid-cols-6",
|
|
419
|
+
12: "grid-cols-12"
|
|
420
|
+
};
|
|
421
|
+
const gapClasses = {
|
|
422
|
+
xs: "gap-1",
|
|
423
|
+
sm: "gap-2",
|
|
424
|
+
md: "gap-4",
|
|
425
|
+
lg: "gap-6",
|
|
426
|
+
xl: "gap-8"
|
|
427
|
+
};
|
|
428
|
+
return /* @__PURE__ */ jsx16(
|
|
429
|
+
"div",
|
|
430
|
+
{
|
|
431
|
+
className: cn("grid", colsClasses[cols], gapClasses[gap], className),
|
|
432
|
+
...props
|
|
433
|
+
}
|
|
434
|
+
);
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
// src/components/primitives/section.tsx
|
|
438
|
+
import "react";
|
|
439
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
440
|
+
function Section({
|
|
441
|
+
className,
|
|
442
|
+
spacing = "lg",
|
|
443
|
+
as: Comp = "section",
|
|
444
|
+
...props
|
|
445
|
+
}) {
|
|
446
|
+
const spacingClasses = {
|
|
447
|
+
sm: "py-8",
|
|
448
|
+
md: "py-12",
|
|
449
|
+
lg: "py-16",
|
|
450
|
+
xl: "py-24"
|
|
451
|
+
};
|
|
452
|
+
return /* @__PURE__ */ jsx17(Comp, { className: cn(spacingClasses[spacing], className), ...props });
|
|
453
|
+
}
|
|
454
|
+
function SectionHeader({
|
|
455
|
+
className,
|
|
456
|
+
...props
|
|
457
|
+
}) {
|
|
458
|
+
return /* @__PURE__ */ jsx17("div", { className: cn("mb-10 space-y-3", className), ...props });
|
|
459
|
+
}
|
|
460
|
+
function SectionTitle({
|
|
461
|
+
className,
|
|
462
|
+
...props
|
|
463
|
+
}) {
|
|
464
|
+
return /* @__PURE__ */ jsx17(
|
|
465
|
+
"h2",
|
|
466
|
+
{
|
|
467
|
+
className: cn("text-3xl font-semibold tracking-tight text-gray-900", className),
|
|
468
|
+
...props
|
|
469
|
+
}
|
|
470
|
+
);
|
|
471
|
+
}
|
|
472
|
+
function SectionDescription({
|
|
473
|
+
className,
|
|
474
|
+
...props
|
|
475
|
+
}) {
|
|
476
|
+
return /* @__PURE__ */ jsx17("p", { className: cn("max-w-2xl text-sm text-gray-500", className), ...props });
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
// src/components/primitives/stack.tsx
|
|
480
|
+
import "react";
|
|
481
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
482
|
+
function Stack({
|
|
483
|
+
className,
|
|
484
|
+
direction = "col",
|
|
485
|
+
gap = "md",
|
|
486
|
+
...props
|
|
487
|
+
}) {
|
|
488
|
+
const directionClasses = {
|
|
489
|
+
row: "flex flex-row",
|
|
490
|
+
col: "flex flex-col"
|
|
491
|
+
};
|
|
492
|
+
const gapClasses = {
|
|
493
|
+
xs: "gap-1",
|
|
494
|
+
sm: "gap-2",
|
|
495
|
+
md: "gap-4",
|
|
496
|
+
lg: "gap-6",
|
|
497
|
+
xl: "gap-8"
|
|
498
|
+
};
|
|
499
|
+
return /* @__PURE__ */ jsx18(
|
|
500
|
+
"div",
|
|
501
|
+
{
|
|
502
|
+
className: cn(directionClasses[direction], gapClasses[gap], className),
|
|
503
|
+
...props
|
|
504
|
+
}
|
|
505
|
+
);
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
// src/components/navigation/breadcrumb.tsx
|
|
509
|
+
import "react";
|
|
510
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
511
|
+
function Breadcrumb({
|
|
512
|
+
className,
|
|
513
|
+
...props
|
|
514
|
+
}) {
|
|
515
|
+
return /* @__PURE__ */ jsx19("nav", { "aria-label": "Breadcrumb", className: cn("text-sm text-gray-500", className), ...props });
|
|
516
|
+
}
|
|
517
|
+
function BreadcrumbList({
|
|
518
|
+
className,
|
|
519
|
+
...props
|
|
520
|
+
}) {
|
|
521
|
+
return /* @__PURE__ */ jsx19("ol", { className: cn("flex flex-wrap items-center gap-2", className), ...props });
|
|
522
|
+
}
|
|
523
|
+
function BreadcrumbItem({
|
|
524
|
+
className,
|
|
525
|
+
...props
|
|
526
|
+
}) {
|
|
527
|
+
return /* @__PURE__ */ jsx19("li", { className: cn("inline-flex items-center gap-2", className), ...props });
|
|
528
|
+
}
|
|
529
|
+
function BreadcrumbSeparator({
|
|
530
|
+
className,
|
|
531
|
+
children = "/",
|
|
532
|
+
...props
|
|
533
|
+
}) {
|
|
534
|
+
return /* @__PURE__ */ jsx19("span", { className: cn("text-gray-400", className), ...props, children });
|
|
535
|
+
}
|
|
536
|
+
function BreadcrumbPage({
|
|
537
|
+
className,
|
|
538
|
+
...props
|
|
539
|
+
}) {
|
|
540
|
+
return /* @__PURE__ */ jsx19("span", { className: cn("font-medium text-gray-900", className), ...props });
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
// src/components/navigation/header.tsx
|
|
544
|
+
import "react";
|
|
545
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
546
|
+
function Header({
|
|
547
|
+
className,
|
|
548
|
+
...props
|
|
549
|
+
}) {
|
|
550
|
+
return /* @__PURE__ */ jsx20(
|
|
551
|
+
"header",
|
|
552
|
+
{
|
|
553
|
+
className: cn("w-full border-b border-gray-200 bg-white", className),
|
|
554
|
+
...props
|
|
555
|
+
}
|
|
556
|
+
);
|
|
557
|
+
}
|
|
558
|
+
function HeaderInner({
|
|
559
|
+
className,
|
|
560
|
+
...props
|
|
561
|
+
}) {
|
|
562
|
+
return /* @__PURE__ */ jsx20(
|
|
563
|
+
"div",
|
|
564
|
+
{
|
|
565
|
+
className: cn(
|
|
566
|
+
"mx-auto flex h-16 max-w-7xl items-center justify-between px-4 sm:px-6 lg:px-8",
|
|
567
|
+
className
|
|
568
|
+
),
|
|
569
|
+
...props
|
|
570
|
+
}
|
|
571
|
+
);
|
|
572
|
+
}
|
|
573
|
+
function HeaderBrand({
|
|
574
|
+
className,
|
|
575
|
+
...props
|
|
576
|
+
}) {
|
|
577
|
+
return /* @__PURE__ */ jsx20("div", { className: cn("flex items-center gap-3 font-semibold text-gray-900", className), ...props });
|
|
578
|
+
}
|
|
579
|
+
function HeaderNav({
|
|
580
|
+
className,
|
|
581
|
+
...props
|
|
582
|
+
}) {
|
|
583
|
+
return /* @__PURE__ */ jsx20("nav", { className: cn("hidden items-center gap-6 md:flex", className), ...props });
|
|
584
|
+
}
|
|
585
|
+
function HeaderActions({
|
|
586
|
+
className,
|
|
587
|
+
...props
|
|
588
|
+
}) {
|
|
589
|
+
return /* @__PURE__ */ jsx20("div", { className: cn("flex items-center gap-3", className), ...props });
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
// src/components/navigation/pagination.tsx
|
|
593
|
+
import "react";
|
|
594
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
595
|
+
function Pagination({
|
|
596
|
+
className,
|
|
597
|
+
...props
|
|
598
|
+
}) {
|
|
599
|
+
return /* @__PURE__ */ jsx21("nav", { "aria-label": "Pagination", className: cn("flex items-center justify-center", className), ...props });
|
|
600
|
+
}
|
|
601
|
+
function PaginationList({
|
|
602
|
+
className,
|
|
603
|
+
...props
|
|
604
|
+
}) {
|
|
605
|
+
return /* @__PURE__ */ jsx21("ul", { className: cn("flex items-center gap-2", className), ...props });
|
|
606
|
+
}
|
|
607
|
+
function PaginationItem({
|
|
608
|
+
className,
|
|
609
|
+
...props
|
|
610
|
+
}) {
|
|
611
|
+
return /* @__PURE__ */ jsx21("li", { className: cn(className), ...props });
|
|
612
|
+
}
|
|
613
|
+
function PaginationLink({
|
|
614
|
+
className,
|
|
615
|
+
isActive,
|
|
616
|
+
...props
|
|
617
|
+
}) {
|
|
618
|
+
return /* @__PURE__ */ jsx21(
|
|
619
|
+
"a",
|
|
620
|
+
{
|
|
621
|
+
className: cn(
|
|
622
|
+
"inline-flex h-9 min-w-9 items-center justify-center rounded-lg px-3 text-sm transition-colors",
|
|
623
|
+
isActive ? "bg-gray-900 text-white" : "border border-gray-300 bg-white text-gray-900 hover:bg-gray-50",
|
|
624
|
+
className
|
|
625
|
+
),
|
|
626
|
+
...props
|
|
627
|
+
}
|
|
628
|
+
);
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
// src/components/navigation/tabs.tsx
|
|
632
|
+
import "react";
|
|
633
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
634
|
+
function Tabs({
|
|
635
|
+
className,
|
|
636
|
+
...props
|
|
637
|
+
}) {
|
|
638
|
+
return /* @__PURE__ */ jsx22("div", { className: cn("w-full", className), ...props });
|
|
639
|
+
}
|
|
640
|
+
function TabsList({
|
|
641
|
+
className,
|
|
642
|
+
...props
|
|
643
|
+
}) {
|
|
644
|
+
return /* @__PURE__ */ jsx22(
|
|
645
|
+
"div",
|
|
646
|
+
{
|
|
647
|
+
className: cn(
|
|
648
|
+
"inline-flex items-center rounded-xl bg-gray-100 p-1",
|
|
649
|
+
className
|
|
650
|
+
),
|
|
651
|
+
...props
|
|
652
|
+
}
|
|
653
|
+
);
|
|
654
|
+
}
|
|
655
|
+
function TabsTrigger({
|
|
656
|
+
className,
|
|
657
|
+
active,
|
|
658
|
+
...props
|
|
659
|
+
}) {
|
|
660
|
+
return /* @__PURE__ */ jsx22(
|
|
661
|
+
"button",
|
|
662
|
+
{
|
|
663
|
+
className: cn(
|
|
664
|
+
"inline-flex items-center rounded-lg px-3 py-2 text-sm font-medium transition-colors",
|
|
665
|
+
active ? "bg-white text-gray-900 shadow-sm" : "text-gray-600 hover:text-gray-900",
|
|
666
|
+
className
|
|
667
|
+
),
|
|
668
|
+
...props
|
|
669
|
+
}
|
|
670
|
+
);
|
|
671
|
+
}
|
|
672
|
+
function TabsContent({
|
|
673
|
+
className,
|
|
674
|
+
...props
|
|
675
|
+
}) {
|
|
676
|
+
return /* @__PURE__ */ jsx22("div", { className: cn("mt-4", className), ...props });
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
// src/components/overlays/drawer.tsx
|
|
680
|
+
import "react";
|
|
681
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
682
|
+
function Drawer({
|
|
683
|
+
className,
|
|
684
|
+
open = true,
|
|
685
|
+
side = "right",
|
|
686
|
+
...props
|
|
687
|
+
}) {
|
|
688
|
+
if (!open) return null;
|
|
689
|
+
return /* @__PURE__ */ jsx23("div", { className: "fixed inset-0 z-50 bg-black/40", children: /* @__PURE__ */ jsx23(
|
|
690
|
+
"div",
|
|
691
|
+
{
|
|
692
|
+
className: cn(
|
|
693
|
+
"absolute top-0 h-full w-full max-w-md bg-white shadow-xl",
|
|
694
|
+
side === "right" ? "right-0" : "left-0",
|
|
695
|
+
className
|
|
696
|
+
),
|
|
697
|
+
...props
|
|
698
|
+
}
|
|
699
|
+
) });
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
// src/components/overlays/dropdown.tsx
|
|
703
|
+
import "react";
|
|
704
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
705
|
+
function Dropdown({
|
|
706
|
+
className,
|
|
707
|
+
...props
|
|
708
|
+
}) {
|
|
709
|
+
return /* @__PURE__ */ jsx24("div", { className: cn("relative inline-block text-left", className), ...props });
|
|
710
|
+
}
|
|
711
|
+
function DropdownMenu({
|
|
712
|
+
className,
|
|
713
|
+
...props
|
|
714
|
+
}) {
|
|
715
|
+
return /* @__PURE__ */ jsx24(
|
|
716
|
+
"div",
|
|
717
|
+
{
|
|
718
|
+
className: cn(
|
|
719
|
+
"absolute right-0 z-50 mt-2 min-w-48 rounded-xl border border-gray-200 bg-white p-2 shadow-lg",
|
|
720
|
+
className
|
|
721
|
+
),
|
|
722
|
+
...props
|
|
723
|
+
}
|
|
724
|
+
);
|
|
725
|
+
}
|
|
726
|
+
function DropdownItem({
|
|
727
|
+
className,
|
|
728
|
+
...props
|
|
729
|
+
}) {
|
|
730
|
+
return /* @__PURE__ */ jsx24(
|
|
731
|
+
"button",
|
|
732
|
+
{
|
|
733
|
+
className: cn(
|
|
734
|
+
"flex w-full items-center rounded-lg px-3 py-2 text-sm text-gray-700 transition-colors hover:bg-gray-100",
|
|
735
|
+
className
|
|
736
|
+
),
|
|
737
|
+
...props
|
|
738
|
+
}
|
|
739
|
+
);
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
// src/components/overlays/modal.tsx
|
|
743
|
+
import "react";
|
|
744
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
745
|
+
function Modal({
|
|
746
|
+
className,
|
|
747
|
+
open = true,
|
|
748
|
+
...props
|
|
749
|
+
}) {
|
|
750
|
+
if (!open) return null;
|
|
751
|
+
return /* @__PURE__ */ jsx25(
|
|
752
|
+
"div",
|
|
753
|
+
{
|
|
754
|
+
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",
|
|
755
|
+
"aria-modal": "true",
|
|
756
|
+
role: "dialog",
|
|
757
|
+
children: /* @__PURE__ */ jsx25(
|
|
758
|
+
"div",
|
|
759
|
+
{
|
|
760
|
+
className: cn(
|
|
761
|
+
"w-full max-w-lg rounded-2xl bg-white shadow-xl",
|
|
762
|
+
className
|
|
763
|
+
),
|
|
764
|
+
...props
|
|
765
|
+
}
|
|
766
|
+
)
|
|
767
|
+
}
|
|
768
|
+
);
|
|
769
|
+
}
|
|
770
|
+
function ModalHeader({
|
|
771
|
+
className,
|
|
772
|
+
...props
|
|
773
|
+
}) {
|
|
774
|
+
return /* @__PURE__ */ jsx25("div", { className: cn("border-b border-gray-200 p-6", className), ...props });
|
|
775
|
+
}
|
|
776
|
+
function ModalTitle({
|
|
777
|
+
className,
|
|
778
|
+
...props
|
|
779
|
+
}) {
|
|
780
|
+
return /* @__PURE__ */ jsx25("h2", { className: cn("text-lg font-semibold text-gray-900", className), ...props });
|
|
781
|
+
}
|
|
782
|
+
function ModalDescription({
|
|
783
|
+
className,
|
|
784
|
+
...props
|
|
785
|
+
}) {
|
|
786
|
+
return /* @__PURE__ */ jsx25("p", { className: cn("mt-1 text-sm text-gray-500", className), ...props });
|
|
787
|
+
}
|
|
788
|
+
function ModalContent({
|
|
789
|
+
className,
|
|
790
|
+
...props
|
|
791
|
+
}) {
|
|
792
|
+
return /* @__PURE__ */ jsx25("div", { className: cn("p-6", className), ...props });
|
|
793
|
+
}
|
|
794
|
+
function ModalFooter({
|
|
795
|
+
className,
|
|
796
|
+
...props
|
|
797
|
+
}) {
|
|
798
|
+
return /* @__PURE__ */ jsx25("div", { className: cn("flex items-center justify-end gap-3 border-t border-gray-200 p-6", className), ...props });
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
// src/components/overlays/toast.tsx
|
|
802
|
+
import "react";
|
|
803
|
+
import { cva as cva4 } from "class-variance-authority";
|
|
804
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
805
|
+
var toastVariants = cva4(
|
|
806
|
+
"w-full max-w-sm rounded-2xl border p-4 shadow-lg",
|
|
807
|
+
{
|
|
808
|
+
variants: {
|
|
809
|
+
variant: {
|
|
810
|
+
default: "border-gray-200 bg-white text-gray-900",
|
|
811
|
+
success: "border-green-200 bg-green-50 text-green-800",
|
|
812
|
+
warning: "border-yellow-200 bg-yellow-50 text-yellow-800",
|
|
813
|
+
danger: "border-red-200 bg-red-50 text-red-800",
|
|
814
|
+
info: "border-blue-200 bg-blue-50 text-blue-800"
|
|
815
|
+
}
|
|
816
|
+
},
|
|
817
|
+
defaultVariants: {
|
|
818
|
+
variant: "default"
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
);
|
|
822
|
+
function Toast({ className, variant, ...props }) {
|
|
823
|
+
return /* @__PURE__ */ jsx26("div", { className: cn(toastVariants({ variant }), className), ...props });
|
|
824
|
+
}
|
|
825
|
+
function ToastTitle({
|
|
826
|
+
className,
|
|
827
|
+
...props
|
|
828
|
+
}) {
|
|
829
|
+
return /* @__PURE__ */ jsx26("h4", { className: cn("font-semibold", className), ...props });
|
|
830
|
+
}
|
|
831
|
+
function ToastDescription({
|
|
832
|
+
className,
|
|
833
|
+
...props
|
|
834
|
+
}) {
|
|
835
|
+
return /* @__PURE__ */ jsx26("p", { className: cn("mt-1 text-sm opacity-90", className), ...props });
|
|
836
|
+
}
|
|
837
|
+
function ToastViewport({
|
|
838
|
+
className,
|
|
839
|
+
...props
|
|
840
|
+
}) {
|
|
841
|
+
return /* @__PURE__ */ jsx26(
|
|
842
|
+
"div",
|
|
843
|
+
{
|
|
844
|
+
className: cn("fixed right-4 top-4 z-50 flex flex-col gap-3", className),
|
|
845
|
+
...props
|
|
846
|
+
}
|
|
847
|
+
);
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
// src/components/overlays/tooltip.tsx
|
|
851
|
+
import "react";
|
|
852
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
853
|
+
function Tooltip({
|
|
854
|
+
className,
|
|
855
|
+
...props
|
|
856
|
+
}) {
|
|
857
|
+
return /* @__PURE__ */ jsx27(
|
|
858
|
+
"div",
|
|
859
|
+
{
|
|
860
|
+
role: "tooltip",
|
|
861
|
+
className: cn(
|
|
862
|
+
"inline-flex rounded-lg bg-gray-900 px-2 py-1 text-xs text-white shadow-md",
|
|
863
|
+
className
|
|
864
|
+
),
|
|
865
|
+
...props
|
|
866
|
+
}
|
|
867
|
+
);
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
// src/components/marketing/hero.tsx
|
|
871
|
+
import "react";
|
|
872
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
873
|
+
function Hero({
|
|
874
|
+
className,
|
|
875
|
+
...props
|
|
876
|
+
}) {
|
|
877
|
+
return /* @__PURE__ */ jsx28(
|
|
878
|
+
"section",
|
|
879
|
+
{
|
|
880
|
+
className: cn("relative overflow-hidden py-20 sm:py-28", className),
|
|
881
|
+
...props
|
|
882
|
+
}
|
|
883
|
+
);
|
|
884
|
+
}
|
|
885
|
+
function HeroContent({
|
|
886
|
+
className,
|
|
887
|
+
...props
|
|
888
|
+
}) {
|
|
889
|
+
return /* @__PURE__ */ jsx28("div", { className: cn("mx-auto max-w-3xl text-center", className), ...props });
|
|
890
|
+
}
|
|
891
|
+
function HeroBadge({
|
|
892
|
+
className,
|
|
893
|
+
...props
|
|
894
|
+
}) {
|
|
895
|
+
return /* @__PURE__ */ jsx28(
|
|
896
|
+
"div",
|
|
897
|
+
{
|
|
898
|
+
className: cn(
|
|
899
|
+
"mb-6 inline-flex items-center rounded-full border border-gray-200 bg-white px-3 py-1 text-sm text-gray-600 shadow-sm",
|
|
900
|
+
className
|
|
901
|
+
),
|
|
902
|
+
...props
|
|
903
|
+
}
|
|
904
|
+
);
|
|
905
|
+
}
|
|
906
|
+
function HeroTitle({
|
|
907
|
+
className,
|
|
908
|
+
...props
|
|
909
|
+
}) {
|
|
910
|
+
return /* @__PURE__ */ jsx28("h1", { className: cn("text-4xl font-semibold tracking-tight text-gray-900 sm:text-6xl", className), ...props });
|
|
911
|
+
}
|
|
912
|
+
function HeroDescription({
|
|
913
|
+
className,
|
|
914
|
+
...props
|
|
915
|
+
}) {
|
|
916
|
+
return /* @__PURE__ */ jsx28("p", { className: cn("mx-auto mt-6 max-w-2xl text-base text-gray-500 sm:text-lg", className), ...props });
|
|
917
|
+
}
|
|
918
|
+
function HeroActions({
|
|
919
|
+
className,
|
|
920
|
+
...props
|
|
921
|
+
}) {
|
|
922
|
+
return /* @__PURE__ */ jsx28("div", { className: cn("mt-8 flex flex-wrap items-center justify-center gap-3", className), ...props });
|
|
923
|
+
}
|
|
924
|
+
export {
|
|
925
|
+
Alert,
|
|
926
|
+
AlertDescription,
|
|
927
|
+
AlertTitle,
|
|
928
|
+
Avatar,
|
|
929
|
+
AvatarGroup,
|
|
930
|
+
Badge,
|
|
931
|
+
Box,
|
|
932
|
+
Breadcrumb,
|
|
933
|
+
BreadcrumbItem,
|
|
934
|
+
BreadcrumbList,
|
|
935
|
+
BreadcrumbPage,
|
|
936
|
+
BreadcrumbSeparator,
|
|
937
|
+
Button,
|
|
938
|
+
Card,
|
|
939
|
+
CardContent,
|
|
940
|
+
CardDescription,
|
|
941
|
+
CardFooter,
|
|
942
|
+
CardHeader,
|
|
943
|
+
CardTitle,
|
|
944
|
+
Container,
|
|
945
|
+
Divider,
|
|
946
|
+
Drawer,
|
|
947
|
+
Dropdown,
|
|
948
|
+
DropdownItem,
|
|
949
|
+
DropdownMenu,
|
|
950
|
+
EmptyState,
|
|
951
|
+
EmptyStateActions,
|
|
952
|
+
EmptyStateDescription,
|
|
953
|
+
EmptyStateTitle,
|
|
954
|
+
Grid,
|
|
955
|
+
Header,
|
|
956
|
+
HeaderActions,
|
|
957
|
+
HeaderBrand,
|
|
958
|
+
HeaderInner,
|
|
959
|
+
HeaderNav,
|
|
960
|
+
Hero,
|
|
961
|
+
HeroActions,
|
|
962
|
+
HeroBadge,
|
|
963
|
+
HeroContent,
|
|
964
|
+
HeroDescription,
|
|
965
|
+
HeroTitle,
|
|
966
|
+
Input,
|
|
967
|
+
Label,
|
|
968
|
+
Modal,
|
|
969
|
+
ModalContent,
|
|
970
|
+
ModalDescription,
|
|
971
|
+
ModalFooter,
|
|
972
|
+
ModalHeader,
|
|
973
|
+
ModalTitle,
|
|
974
|
+
Pagination,
|
|
975
|
+
PaginationItem,
|
|
976
|
+
PaginationLink,
|
|
977
|
+
PaginationList,
|
|
978
|
+
Section,
|
|
979
|
+
SectionDescription,
|
|
980
|
+
SectionHeader,
|
|
981
|
+
SectionTitle,
|
|
982
|
+
Select,
|
|
983
|
+
Stack,
|
|
984
|
+
Stat,
|
|
985
|
+
StatChange,
|
|
986
|
+
StatLabel,
|
|
987
|
+
StatValue,
|
|
988
|
+
Switch,
|
|
989
|
+
Tabs,
|
|
990
|
+
TabsContent,
|
|
991
|
+
TabsList,
|
|
992
|
+
TabsTrigger,
|
|
993
|
+
Textarea,
|
|
994
|
+
Toast,
|
|
995
|
+
ToastDescription,
|
|
996
|
+
ToastTitle,
|
|
997
|
+
ToastViewport,
|
|
998
|
+
Tooltip,
|
|
999
|
+
cn
|
|
1000
|
+
};
|