@zentauri-ui/zentauri-components 0.0.6 → 0.0.8
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 +109 -0
- package/dist/ui/index.cjs +190 -67
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +28 -28
- package/dist/ui/index.d.ts +28 -28
- package/dist/ui/index.js +190 -67
- package/dist/ui/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# @zentauri-ui/zentauri-components
|
|
2
|
+
|
|
3
|
+
A React UI kit for building product interfaces with Tailwind CSS. Components are implemented in TypeScript, ship with declaration files, and are bundled as ESM and CommonJS for broad bundler compatibility.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The library targets **React 18+** apps that use **Tailwind CSS v4** (or an equivalent setup where Tailwind can scan this package via `@source`). Styling uses utility classes; **class-variance-authority** powers variant APIs (size, appearance, and similar props), with **clsx** and **tailwind-merge** for predictable `className` composition. **Framer Motion** backs motion where components animate, and **react-icons** is used for iconography where applicable.
|
|
8
|
+
|
|
9
|
+
Published artifacts live under `dist/`; consumers import the UI barrel at `@zentauri-ui/zentauri-components/ui`. A compiled stylesheet is also exposed at `@zentauri-ui/zentauri-components/styles.css` for setups that import CSS explicitly (many apps rely on Tailwind scanning alone—see installation).
|
|
10
|
+
|
|
11
|
+
## Package exports
|
|
12
|
+
|
|
13
|
+
| Subpath | Description |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| `@zentauri-ui/zentauri-components/ui` | Components, hooks, and types (ESM `.js`, CJS `.cjs`, `.d.ts`) |
|
|
16
|
+
| `@zentauri-ui/zentauri-components/styles.css` | Compiled CSS emitted by the build |
|
|
17
|
+
|
|
18
|
+
## Requirements
|
|
19
|
+
|
|
20
|
+
- **React** and **React DOM** `>= 18` (peer dependencies)
|
|
21
|
+
- A Tailwind pipeline that can **scan** this package (see Step 2 below)
|
|
22
|
+
|
|
23
|
+
## Components
|
|
24
|
+
|
|
25
|
+
Modules re-exported from the UI entry include:
|
|
26
|
+
|
|
27
|
+
Accordion, Alert, Badge, Button, Card, Divider, Drawer, Dropdown, Empty state, Input, Modal, Pagination, Progress, Select, Skeleton, Spinner, Table, Tabs, Toast, Toggle, Tooltip.
|
|
28
|
+
|
|
29
|
+
## Installation
|
|
30
|
+
|
|
31
|
+
**Getting started** — Add the package, point Tailwind at the library sources, then import components from the UI entry.
|
|
32
|
+
|
|
33
|
+
### Step 1 — Install the package
|
|
34
|
+
|
|
35
|
+
Choose your package manager.
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install @zentauri-ui/zentauri-components
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pnpm install @zentauri-ui/zentauri-components
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
yarn add @zentauri-ui/zentauri-components
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Step 2 — Include library paths in globals.css
|
|
50
|
+
|
|
51
|
+
Add an `@source` entry so Tailwind scans class names inside `@zentauri-ui/zentauri-components`. The path is relative to this CSS file—adjust `../` if your file lives elsewhere.
|
|
52
|
+
|
|
53
|
+
```css
|
|
54
|
+
@import "tailwindcss";
|
|
55
|
+
@source "../node_modules/@zentauri-ui/zentauri-components";
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Step 3 — Import and use components
|
|
59
|
+
|
|
60
|
+
Import from the UI barrel, then compose primitives in your JSX.
|
|
61
|
+
|
|
62
|
+
#### Imports
|
|
63
|
+
|
|
64
|
+
```tsx
|
|
65
|
+
import {
|
|
66
|
+
Accordion,
|
|
67
|
+
AccordionContent,
|
|
68
|
+
AccordionItem,
|
|
69
|
+
AccordionTrigger,
|
|
70
|
+
} from "@zentauri-ui/zentauri-components/ui";
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
#### Usage
|
|
74
|
+
|
|
75
|
+
```tsx
|
|
76
|
+
<div className="rounded-3xl border border-white/10 bg-white/5 p-5 shadow-2xl shadow-slate-950/40 backdrop-blur-xl">
|
|
77
|
+
<Accordion type="single" defaultValue="item-1" appearance="separated" size="md">
|
|
78
|
+
<AccordionItem value="item-1">
|
|
79
|
+
<AccordionTrigger>Shipping</AccordionTrigger>
|
|
80
|
+
<AccordionContent>
|
|
81
|
+
<p className="text-sm text-slate-300">
|
|
82
|
+
Standard delivery in 3-5 business days. Express options at
|
|
83
|
+
checkout.
|
|
84
|
+
</p>
|
|
85
|
+
</AccordionContent>
|
|
86
|
+
</AccordionItem>
|
|
87
|
+
<AccordionItem value="item-2">
|
|
88
|
+
<AccordionTrigger>Returns</AccordionTrigger>
|
|
89
|
+
<AccordionContent>
|
|
90
|
+
<p className="text-sm text-slate-300">
|
|
91
|
+
Free returns within 30 days of delivery in original condition.
|
|
92
|
+
</p>
|
|
93
|
+
</AccordionContent>
|
|
94
|
+
</AccordionItem>
|
|
95
|
+
</Accordion>
|
|
96
|
+
</div>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Development
|
|
100
|
+
|
|
101
|
+
From this package directory in the monorepo:
|
|
102
|
+
|
|
103
|
+
- `pnpm build` (or `npm run build`) — production bundle via `tsup`
|
|
104
|
+
- `pnpm dev` — `tsup` watch mode
|
|
105
|
+
- `pnpm test` / `pnpm test:watch` — **Vitest** and **Testing Library** unit tests
|
|
106
|
+
|
|
107
|
+
## License
|
|
108
|
+
|
|
109
|
+
MIT
|
package/dist/ui/index.cjs
CHANGED
|
@@ -223,7 +223,16 @@ var accordionVariants = (0, import_class_variance_authority.cva)("w-full", {
|
|
|
223
223
|
yellow: "divide-y divide-yellow-600 rounded-xl border border-yellow-600",
|
|
224
224
|
teal: "divide-y divide-teal-600 rounded-xl border border-teal-600",
|
|
225
225
|
indigo: "divide-y divide-indigo-600 rounded-xl border border-indigo-600",
|
|
226
|
-
emerald: "divide-y divide-emerald-600 rounded-xl border border-emerald-600"
|
|
226
|
+
emerald: "divide-y divide-emerald-600 rounded-xl border border-emerald-600",
|
|
227
|
+
"gradient-blue": "divide-y divide-gradient-to-r from-blue-600 to-purple-600 rounded-xl border border-gradient-to-r from-blue-600 to-purple-600",
|
|
228
|
+
"gradient-green": "divide-y divide-gradient-to-r from-green-600 to-lime-600 rounded-xl border border-gradient-to-r from-green-600 to-lime-600",
|
|
229
|
+
"gradient-red": "divide-y divide-gradient-to-r from-red-600 to-pink-600 rounded-xl border border-gradient-to-r from-red-600 to-pink-600",
|
|
230
|
+
"gradient-yellow": "divide-y divide-gradient-to-r from-yellow-600 to-orange-600 rounded-xl border border-gradient-to-r from-yellow-600 to-orange-600",
|
|
231
|
+
"gradient-purple": "divide-y divide-gradient-to-r from-purple-600 to-pink-600 rounded-xl border border-gradient-to-r from-purple-600 to-pink-600",
|
|
232
|
+
"gradient-teal": "divide-y divide-gradient-to-r from-teal-600 to-cyan-600 rounded-xl border border-gradient-to-r from-teal-600 to-cyan-600",
|
|
233
|
+
"gradient-indigo": "divide-y divide-gradient-to-r from-indigo-600 to-purple-600 rounded-xl border border-gradient-to-r from-indigo-600 to-purple-600",
|
|
234
|
+
"gradient-pink": "divide-y divide-gradient-to-r from-pink-600 to-rose-600 rounded-xl border border-gradient-to-r from-pink-600 to-rose-600",
|
|
235
|
+
"gradient-orange": "divide-y divide-gradient-to-r from-orange-600 to-red-600 rounded-xl border border-gradient-to-r from-orange-600 to-red-600"
|
|
227
236
|
},
|
|
228
237
|
size: {
|
|
229
238
|
sm: "px-3 py-2 text-sm",
|
|
@@ -252,7 +261,16 @@ var accordionItemVariants = (0, import_class_variance_authority.cva)("", {
|
|
|
252
261
|
yellow: "rounded-xl border border-yellow-600 bg-yellow-600/[0.03] p-2",
|
|
253
262
|
teal: "rounded-xl border border-teal-600 bg-teal-600/[0.03] p-2",
|
|
254
263
|
indigo: "rounded-xl border border-indigo-600 bg-indigo-600/[0.03] p-2",
|
|
255
|
-
emerald: "rounded-xl border border-emerald-600 bg-emerald-600/[0.03] p-2"
|
|
264
|
+
emerald: "rounded-xl border border-emerald-600 bg-emerald-600/[0.03] p-2",
|
|
265
|
+
"gradient-blue": "rounded-xl bg-linear-to-r from-blue-600 to-purple-600/[0.03] p-2 text-white",
|
|
266
|
+
"gradient-green": "rounded-xl bg-linear-to-r from-green-600 to-lime-600/[0.03] p-2 text-white",
|
|
267
|
+
"gradient-red": "rounded-xl bg-linear-to-r from-red-600 to-pink-600/[0.03] p-2 text-white",
|
|
268
|
+
"gradient-yellow": "rounded-xl bg-linear-to-r from-yellow-600 to-orange-600/[0.03] p-2 text-white",
|
|
269
|
+
"gradient-purple": "rounded-xl bg-linear-to-r from-purple-600 to-pink-600/[0.03] p-2 text-white",
|
|
270
|
+
"gradient-teal": "rounded-xl bg-linear-to-r from-teal-600 to-cyan-600/[0.03] p-2 text-white",
|
|
271
|
+
"gradient-indigo": "rounded-xl bg-linear-to-r from-indigo-600 to-purple-600/[0.03] p-2 text-white",
|
|
272
|
+
"gradient-pink": "rounded-xl bg-linear-to-r from-pink-600 to-rose-600/[0.03] p-2 text-white",
|
|
273
|
+
"gradient-orange": "rounded-xl bg-linear-to-r from-orange-600 to-red-600/[0.03] p-2 text-white"
|
|
256
274
|
}
|
|
257
275
|
},
|
|
258
276
|
defaultVariants: { appearance: "default" }
|
|
@@ -270,7 +288,7 @@ var accordionTriggerVariants = (0, import_class_variance_authority.cva)(
|
|
|
270
288
|
defaultVariants: { size: "md" }
|
|
271
289
|
}
|
|
272
290
|
);
|
|
273
|
-
var accordionContentVariants = (0, import_class_variance_authority.cva)("pb-3 text-sm
|
|
291
|
+
var accordionContentVariants = (0, import_class_variance_authority.cva)("pb-3 text-sm", {
|
|
274
292
|
variants: {
|
|
275
293
|
size: {
|
|
276
294
|
sm: "pb-2 text-xs",
|
|
@@ -684,7 +702,8 @@ var buttonLikeSolidAppearances = {
|
|
|
684
702
|
"gradient-purple": "bg-gradient-to-r from-purple-600 to-pink-600 text-white",
|
|
685
703
|
"gradient-teal": "bg-gradient-to-r from-teal-600 to-cyan-600 text-white",
|
|
686
704
|
"gradient-indigo": "bg-gradient-to-r from-indigo-600 to-purple-600 text-white",
|
|
687
|
-
"gradient-pink": "bg-gradient-to-r from-pink-600 to-rose-600 text-white"
|
|
705
|
+
"gradient-pink": "bg-gradient-to-r from-pink-600 to-rose-600 text-white",
|
|
706
|
+
"gradient-orange": "bg-gradient-to-r from-orange-600 to-red-600 text-white"
|
|
688
707
|
};
|
|
689
708
|
var badgeAppearances = {
|
|
690
709
|
...buttonLikeSolidAppearances,
|
|
@@ -848,6 +867,9 @@ var buttonVariants = (0, import_class_variance_authority4.cva)(
|
|
|
848
867
|
teal: "bg-teal-600 text-white hover:bg-teal-600",
|
|
849
868
|
yellow: "bg-yellow-600 text-white hover:bg-yellow-600",
|
|
850
869
|
orange: "bg-orange-600 text-white hover:bg-orange-600",
|
|
870
|
+
gray: "bg-gray-600 text-white hover:bg-gray-600",
|
|
871
|
+
amber: "bg-amber-600 text-white hover:bg-amber-600",
|
|
872
|
+
violet: "bg-violet-600 text-white hover:bg-violet-600",
|
|
851
873
|
"gradient-blue": "bg-gradient-to-r from-blue-600 to-purple-600 text-white hover:from-blue-600 hover:to-purple-600",
|
|
852
874
|
"gradient-green": "bg-gradient-to-r from-green-600 to-lime-600 text-white hover:from-green-600 hover:to-lime-600",
|
|
853
875
|
"gradient-red": "bg-gradient-to-r from-red-600 to-pink-600 text-white hover:from-red-600 hover:to-pink-600",
|
|
@@ -855,7 +877,8 @@ var buttonVariants = (0, import_class_variance_authority4.cva)(
|
|
|
855
877
|
"gradient-purple": "bg-gradient-to-r from-purple-600 to-pink-600 text-white hover:from-purple-600 hover:to-pink-600",
|
|
856
878
|
"gradient-teal": "bg-gradient-to-r from-teal-600 to-cyan-600 text-white hover:from-teal-600 hover:to-cyan-600",
|
|
857
879
|
"gradient-indigo": "bg-gradient-to-r from-indigo-600 to-purple-600 text-white hover:from-indigo-600 hover:to-purple-600",
|
|
858
|
-
"gradient-pink": "bg-gradient-to-r from-pink-600 to-rose-600 text-white hover:from-pink-600 hover:to-rose-600"
|
|
880
|
+
"gradient-pink": "bg-gradient-to-r from-pink-600 to-rose-600 text-white hover:from-pink-600 hover:to-rose-600",
|
|
881
|
+
"gradient-orange": "bg-gradient-to-r from-orange-600 to-red-600 text-white hover:from-orange-600 hover:to-red-600"
|
|
859
882
|
},
|
|
860
883
|
size: {
|
|
861
884
|
sm: "h-7 md:h-9 px-3 text-xs",
|
|
@@ -2188,7 +2211,8 @@ var inputVariants = (0, import_class_variance_authority10.cva)(
|
|
|
2188
2211
|
violet: "border-violet-500/80 text-violet-50 placeholder:text-violet-300/70 focus-visible:border-violet-400 focus-visible:ring-violet-400/80",
|
|
2189
2212
|
amber: "border-amber-500/80 text-amber-50 placeholder:text-amber-300/70 focus-visible:border-amber-400 focus-visible:ring-amber-400/80",
|
|
2190
2213
|
pink: "border-pink-500/80 text-pink-50 placeholder:text-pink-300/70 focus-visible:border-pink-400 focus-visible:ring-pink-400/80",
|
|
2191
|
-
indigo: "border-indigo-500/80 text-indigo-50 placeholder:text-indigo-300/70 focus-visible:border-indigo-400 focus-visible:ring-indigo-400/80"
|
|
2214
|
+
indigo: "border-indigo-500/80 text-indigo-50 placeholder:text-indigo-300/70 focus-visible:border-indigo-400 focus-visible:ring-indigo-400/80",
|
|
2215
|
+
orange: "border-orange-500/80 text-orange-50 placeholder:text-orange-300/70 focus-visible:border-orange-400 focus-visible:ring-orange-400/80"
|
|
2192
2216
|
},
|
|
2193
2217
|
size: {
|
|
2194
2218
|
sm: "h-8 px-3 text-xs",
|
|
@@ -3000,6 +3024,9 @@ var paginationListVariants = (0, import_class_variance_authority12.cva)(
|
|
|
3000
3024
|
teal: "border-teal-500/25 bg-teal-950/20",
|
|
3001
3025
|
yellow: "border-yellow-500/25 bg-yellow-950/20",
|
|
3002
3026
|
orange: "border-orange-500/25 bg-orange-950/20",
|
|
3027
|
+
gray: "border-gray-500/25 bg-gray-950/20",
|
|
3028
|
+
amber: "border-amber-500/25 bg-amber-950/20",
|
|
3029
|
+
violet: "border-violet-500/25 bg-violet-950/20",
|
|
3003
3030
|
"gradient-blue": "border-blue-500/30 bg-gradient-to-r from-blue-950/30 to-purple-950/30",
|
|
3004
3031
|
"gradient-green": "border-lime-500/30 bg-gradient-to-r from-green-950/30 to-lime-950/30",
|
|
3005
3032
|
"gradient-red": "border-pink-500/30 bg-gradient-to-r from-red-950/30 to-pink-950/30",
|
|
@@ -3007,7 +3034,8 @@ var paginationListVariants = (0, import_class_variance_authority12.cva)(
|
|
|
3007
3034
|
"gradient-purple": "border-pink-500/30 bg-gradient-to-r from-purple-950/30 to-pink-950/30",
|
|
3008
3035
|
"gradient-teal": "border-cyan-500/30 bg-gradient-to-r from-teal-950/30 to-cyan-950/30",
|
|
3009
3036
|
"gradient-indigo": "border-purple-500/30 bg-gradient-to-r from-indigo-950/30 to-purple-950/30",
|
|
3010
|
-
"gradient-pink": "border-rose-500/30 bg-gradient-to-r from-pink-950/30 to-rose-950/30"
|
|
3037
|
+
"gradient-pink": "border-rose-500/30 bg-gradient-to-r from-pink-950/30 to-rose-950/30",
|
|
3038
|
+
"gradient-orange": "border-orange-500/30 bg-gradient-to-r from-orange-950/30 to-red-950/30"
|
|
3011
3039
|
},
|
|
3012
3040
|
size: {
|
|
3013
3041
|
sm: "gap-0.5",
|
|
@@ -3302,7 +3330,8 @@ var progressVariants = (0, import_class_variance_authority13.cva)("w-full text-s
|
|
|
3302
3330
|
"gradient-purple": "[--progress-fill:linear-gradient(90deg,theme(colors.purple.500),theme(colors.pink.500))]",
|
|
3303
3331
|
"gradient-teal": "[--progress-fill:linear-gradient(90deg,theme(colors.teal.500),theme(colors.cyan.500))]",
|
|
3304
3332
|
"gradient-indigo": "[--progress-fill:linear-gradient(90deg,theme(colors.indigo.500),theme(colors.purple.500))]",
|
|
3305
|
-
"gradient-pink": "[--progress-fill:linear-gradient(90deg,theme(colors.pink.500),theme(colors.rose.500))]"
|
|
3333
|
+
"gradient-pink": "[--progress-fill:linear-gradient(90deg,theme(colors.pink.500),theme(colors.rose.500))]",
|
|
3334
|
+
"gradient-orange": "[--progress-fill:linear-gradient(90deg,theme(colors.orange.500),theme(colors.red.500))]"
|
|
3306
3335
|
},
|
|
3307
3336
|
size: {
|
|
3308
3337
|
xs: "text-[0.65rem]",
|
|
@@ -4332,7 +4361,8 @@ var spinnerAppearances = {
|
|
|
4332
4361
|
"gradient-purple": "text-purple-400",
|
|
4333
4362
|
"gradient-teal": "text-teal-400",
|
|
4334
4363
|
"gradient-indigo": "text-indigo-400",
|
|
4335
|
-
"gradient-pink": "text-pink-400"
|
|
4364
|
+
"gradient-pink": "text-pink-400",
|
|
4365
|
+
"gradient-orange": "text-orange-400"
|
|
4336
4366
|
};
|
|
4337
4367
|
var spinnerVariants = (0, import_class_variance_authority16.cva)("inline-flex items-center justify-center", {
|
|
4338
4368
|
variants: {
|
|
@@ -4498,52 +4528,91 @@ var tableAnimationPresets = {
|
|
|
4498
4528
|
|
|
4499
4529
|
// src/ui/table/variants.ts
|
|
4500
4530
|
var import_class_variance_authority17 = require("class-variance-authority");
|
|
4501
|
-
var tableVariants = (0, import_class_variance_authority17.cva)(
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4531
|
+
var tableVariants = (0, import_class_variance_authority17.cva)(
|
|
4532
|
+
"w-full table-auto border-collapse caption-bottom text-sm text-slate-200 md:table-fixed",
|
|
4533
|
+
{
|
|
4534
|
+
variants: {
|
|
4535
|
+
appearance: {
|
|
4536
|
+
default: "",
|
|
4537
|
+
striped: "",
|
|
4538
|
+
bordered: "border border-white/10",
|
|
4539
|
+
ghost: "",
|
|
4540
|
+
sky: "border border-sky-600",
|
|
4541
|
+
rose: "border border-rose-600",
|
|
4542
|
+
purple: "border border-purple-600",
|
|
4543
|
+
pink: "border border-pink-600",
|
|
4544
|
+
orange: "border border-orange-600",
|
|
4545
|
+
yellow: "border border-yellow-600",
|
|
4546
|
+
teal: "border border-teal-600",
|
|
4547
|
+
indigo: "border border-indigo-600",
|
|
4548
|
+
emerald: "border border-emerald-600",
|
|
4549
|
+
gray: "border border-gray-600",
|
|
4550
|
+
amber: "border border-amber-600",
|
|
4551
|
+
violet: "border border-violet-600"
|
|
4552
|
+
},
|
|
4553
|
+
size: {
|
|
4554
|
+
sm: "text-xs",
|
|
4555
|
+
md: "text-sm",
|
|
4556
|
+
lg: "text-base"
|
|
4557
|
+
},
|
|
4558
|
+
stickyHeader: {
|
|
4559
|
+
true: "",
|
|
4560
|
+
false: ""
|
|
4561
|
+
}
|
|
4513
4562
|
},
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
},
|
|
4519
|
-
compoundVariants: [
|
|
4520
|
-
{
|
|
4521
|
-
stickyHeader: true,
|
|
4522
|
-
class: "[&_thead>tr]:sticky [&_thead>tr]:top-0 [&_thead>tr]:z-10 [&_thead>tr]:bg-slate-950/95 [&_thead>tr]:backdrop-blur"
|
|
4563
|
+
defaultVariants: {
|
|
4564
|
+
appearance: "default",
|
|
4565
|
+
size: "md",
|
|
4566
|
+
stickyHeader: false
|
|
4523
4567
|
}
|
|
4524
|
-
],
|
|
4525
|
-
defaultVariants: {
|
|
4526
|
-
appearance: "default",
|
|
4527
|
-
size: "md",
|
|
4528
|
-
stickyHeader: false
|
|
4529
4568
|
}
|
|
4530
|
-
|
|
4569
|
+
);
|
|
4531
4570
|
var tableRowVariants = (0, import_class_variance_authority17.cva)(
|
|
4532
|
-
"border-b border-white/5 transition-colors
|
|
4571
|
+
"border-b border-white/5 transition-colors data-[state=selected]:bg-white/[0.06]",
|
|
4533
4572
|
{
|
|
4534
4573
|
variants: {
|
|
4535
4574
|
appearance: {
|
|
4536
4575
|
default: "",
|
|
4537
4576
|
striped: "odd:bg-white/[0.03]",
|
|
4538
4577
|
bordered: "",
|
|
4539
|
-
ghost: "border-transparent hover:bg-white/[0.03]"
|
|
4578
|
+
ghost: "border-transparent hover:bg-white/[0.03]",
|
|
4579
|
+
sky: "border-sky-600 hover:bg-sky-600",
|
|
4580
|
+
rose: "border-rose-600 hover:bg-rose-900",
|
|
4581
|
+
purple: "border-purple-600 hover:bg-purple-900",
|
|
4582
|
+
pink: "border-pink-600 hover:bg-pink-900",
|
|
4583
|
+
orange: "border-orange-600 hover:bg-orange-900",
|
|
4584
|
+
yellow: "border-yellow-600 hover:bg-yellow-900",
|
|
4585
|
+
teal: "border-teal-600 hover:bg-teal-900",
|
|
4586
|
+
indigo: "border-indigo-600 hover:bg-indigo-900",
|
|
4587
|
+
emerald: "border-emerald-600 hover:bg-emerald-900",
|
|
4588
|
+
gray: "border-gray-600 hover:bg-gray-900",
|
|
4589
|
+
amber: "border-amber-600 hover:bg-amber-900",
|
|
4590
|
+
violet: "border-violet-600 hover:bg-violet-900"
|
|
4540
4591
|
}
|
|
4541
4592
|
},
|
|
4542
4593
|
defaultVariants: { appearance: "default" }
|
|
4543
4594
|
}
|
|
4544
4595
|
);
|
|
4545
|
-
var tableCellVariants = (0, import_class_variance_authority17.cva)("p-3 align-middle", {
|
|
4596
|
+
var tableCellVariants = (0, import_class_variance_authority17.cva)("min-w-0 border p-3 align-middle break-words", {
|
|
4546
4597
|
variants: {
|
|
4598
|
+
appearance: {
|
|
4599
|
+
default: "border-white/10",
|
|
4600
|
+
striped: "border-white/10",
|
|
4601
|
+
bordered: "border-white/10",
|
|
4602
|
+
ghost: "border-white/10",
|
|
4603
|
+
sky: "border-sky-600",
|
|
4604
|
+
rose: "border-rose-600",
|
|
4605
|
+
purple: "border-purple-600",
|
|
4606
|
+
pink: "border-pink-600",
|
|
4607
|
+
orange: "border-orange-600",
|
|
4608
|
+
yellow: "border-yellow-600",
|
|
4609
|
+
teal: "border-teal-600",
|
|
4610
|
+
indigo: "border-indigo-600",
|
|
4611
|
+
emerald: "border-emerald-600",
|
|
4612
|
+
gray: "border-gray-600",
|
|
4613
|
+
amber: "border-amber-600",
|
|
4614
|
+
violet: "border-violet-600"
|
|
4615
|
+
},
|
|
4547
4616
|
size: {
|
|
4548
4617
|
sm: "p-2",
|
|
4549
4618
|
md: "p-3",
|
|
@@ -4555,7 +4624,7 @@ var tableCellVariants = (0, import_class_variance_authority17.cva)("p-3 align-mi
|
|
|
4555
4624
|
right: "text-right"
|
|
4556
4625
|
}
|
|
4557
4626
|
},
|
|
4558
|
-
defaultVariants: { size: "md" }
|
|
4627
|
+
defaultVariants: { appearance: "default", size: "md" }
|
|
4559
4628
|
});
|
|
4560
4629
|
|
|
4561
4630
|
// src/ui/table/table.tsx
|
|
@@ -4578,7 +4647,6 @@ function Table(props) {
|
|
|
4578
4647
|
rowAnimation = "none",
|
|
4579
4648
|
children,
|
|
4580
4649
|
ref,
|
|
4581
|
-
overflow = "auto",
|
|
4582
4650
|
...rest
|
|
4583
4651
|
} = props;
|
|
4584
4652
|
const ctx = (0, import_react15.useMemo)(
|
|
@@ -4591,17 +4659,17 @@ function Table(props) {
|
|
|
4591
4659
|
}),
|
|
4592
4660
|
[appearance, rowAnimation, size, stickyHeader, textAlign]
|
|
4593
4661
|
);
|
|
4594
|
-
|
|
4595
|
-
"min-w-0 max-lg:overflow-x-auto max-lg:overscroll-x-contain lg:overflow-x-visible",
|
|
4596
|
-
"max-lg:[&_[data-slot=table]]:w-full max-lg:[&_[data-slot=table]]:min-w-max"
|
|
4597
|
-
) : "overflow-hidden";
|
|
4598
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableContext.Provider, { value: ctx, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { "data-slot": "table-scroll", className: cn("relative w-full"), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
4662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableContext.Provider, { value: ctx, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { "data-slot": "table-scroll", className: "relative w-full overflow-auto", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
4599
4663
|
"table",
|
|
4600
4664
|
{
|
|
4601
4665
|
ref,
|
|
4602
4666
|
"data-slot": "table",
|
|
4603
4667
|
role: "table",
|
|
4604
|
-
className: cn(
|
|
4668
|
+
className: cn(
|
|
4669
|
+
tableVariants({ appearance, size, stickyHeader }),
|
|
4670
|
+
"w-full min-w-0 table",
|
|
4671
|
+
className
|
|
4672
|
+
),
|
|
4605
4673
|
...rest,
|
|
4606
4674
|
children
|
|
4607
4675
|
}
|
|
@@ -4609,7 +4677,9 @@ function Table(props) {
|
|
|
4609
4677
|
}
|
|
4610
4678
|
Table.displayName = "Table";
|
|
4611
4679
|
function TableHeader({ className, children }) {
|
|
4612
|
-
|
|
4680
|
+
const { stickyHeader } = useTableContext("TableHeader");
|
|
4681
|
+
const stickyClass = stickyHeader ? "sticky top-0 z-10 bg-slate-950/95 backdrop-blur" : "";
|
|
4682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("thead", { "data-slot": "table-header", className: cn(stickyClass, className), children });
|
|
4613
4683
|
}
|
|
4614
4684
|
TableHeader.displayName = "TableHeader";
|
|
4615
4685
|
function TableBody({ className, children }) {
|
|
@@ -4621,13 +4691,21 @@ function TableFooter({ className, children }) {
|
|
|
4621
4691
|
"tfoot",
|
|
4622
4692
|
{
|
|
4623
4693
|
"data-slot": "table-footer",
|
|
4624
|
-
className: cn(
|
|
4694
|
+
className: cn(
|
|
4695
|
+
"border-t border-white/10 bg-white/3 font-medium",
|
|
4696
|
+
className
|
|
4697
|
+
),
|
|
4625
4698
|
children
|
|
4626
4699
|
}
|
|
4627
4700
|
);
|
|
4628
4701
|
}
|
|
4629
4702
|
TableFooter.displayName = "TableFooter";
|
|
4630
|
-
function TableRow({
|
|
4703
|
+
function TableRow({
|
|
4704
|
+
className,
|
|
4705
|
+
children,
|
|
4706
|
+
ref,
|
|
4707
|
+
...rest
|
|
4708
|
+
}) {
|
|
4631
4709
|
const { appearance, rowAnimation } = useTableContext("TableRow");
|
|
4632
4710
|
const motionProps = tableAnimationPresets[rowAnimation];
|
|
4633
4711
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
@@ -4644,8 +4722,15 @@ function TableRow({ className, children, ref, ...rest }) {
|
|
|
4644
4722
|
);
|
|
4645
4723
|
}
|
|
4646
4724
|
TableRow.displayName = "TableRow";
|
|
4647
|
-
function TableHead({
|
|
4648
|
-
|
|
4725
|
+
function TableHead({
|
|
4726
|
+
className,
|
|
4727
|
+
children,
|
|
4728
|
+
scope = "col",
|
|
4729
|
+
sortDirection,
|
|
4730
|
+
ref,
|
|
4731
|
+
...rest
|
|
4732
|
+
}) {
|
|
4733
|
+
const { appearance, size, textAlign } = useTableContext("TableHead");
|
|
4649
4734
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
4650
4735
|
"th",
|
|
4651
4736
|
{
|
|
@@ -4653,21 +4738,32 @@ function TableHead({ className, children, scope = "col", sortDirection, ref, ...
|
|
|
4653
4738
|
"data-slot": "table-head",
|
|
4654
4739
|
scope,
|
|
4655
4740
|
"aria-sort": sortDirection,
|
|
4656
|
-
className: cn(
|
|
4741
|
+
className: cn(
|
|
4742
|
+
tableCellVariants({ appearance, size, textAlign }),
|
|
4743
|
+
className
|
|
4744
|
+
),
|
|
4657
4745
|
...rest,
|
|
4658
4746
|
children
|
|
4659
4747
|
}
|
|
4660
4748
|
);
|
|
4661
4749
|
}
|
|
4662
4750
|
TableHead.displayName = "TableHead";
|
|
4663
|
-
function TableCell({
|
|
4664
|
-
|
|
4751
|
+
function TableCell({
|
|
4752
|
+
className,
|
|
4753
|
+
children,
|
|
4754
|
+
ref,
|
|
4755
|
+
...rest
|
|
4756
|
+
}) {
|
|
4757
|
+
const { appearance, size, textAlign } = useTableContext("TableCell");
|
|
4665
4758
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
4666
4759
|
"td",
|
|
4667
4760
|
{
|
|
4668
4761
|
ref,
|
|
4669
4762
|
"data-slot": "table-cell",
|
|
4670
|
-
className: cn(
|
|
4763
|
+
className: cn(
|
|
4764
|
+
tableCellVariants({ appearance, size, textAlign }),
|
|
4765
|
+
className
|
|
4766
|
+
),
|
|
4671
4767
|
...rest,
|
|
4672
4768
|
children
|
|
4673
4769
|
}
|
|
@@ -4675,7 +4771,14 @@ function TableCell({ className, children, ref, ...rest }) {
|
|
|
4675
4771
|
}
|
|
4676
4772
|
TableCell.displayName = "TableCell";
|
|
4677
4773
|
function TableCaption({ className, children }) {
|
|
4678
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
4774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
4775
|
+
"caption",
|
|
4776
|
+
{
|
|
4777
|
+
"data-slot": "table-caption",
|
|
4778
|
+
className: cn("mt-3 text-left text-xs text-slate-500", className),
|
|
4779
|
+
children
|
|
4780
|
+
}
|
|
4781
|
+
);
|
|
4679
4782
|
}
|
|
4680
4783
|
TableCaption.displayName = "TableCaption";
|
|
4681
4784
|
|
|
@@ -4976,7 +5079,27 @@ var toastRootVariants = (0, import_class_variance_authority19.cva)(
|
|
|
4976
5079
|
success: "border-emerald-500/40 bg-emerald-950",
|
|
4977
5080
|
warning: "border-amber-500/40 bg-amber-950",
|
|
4978
5081
|
error: "border-rose-500/50 bg-rose-950",
|
|
4979
|
-
info: "border-sky-500/40 bg-sky-950"
|
|
5082
|
+
info: "border-sky-500/40 bg-sky-950",
|
|
5083
|
+
ghost: "border-transparent bg-transparent text-slate-200",
|
|
5084
|
+
purple: "border-purple-600 bg-purple-950/70 backdrop-blur-xl",
|
|
5085
|
+
pink: "border-pink-600 bg-pink-950/70 backdrop-blur-xl",
|
|
5086
|
+
orange: "border-orange-600 bg-orange-950/70 backdrop-blur-xl",
|
|
5087
|
+
yellow: "border-yellow-600 bg-yellow-950/70 backdrop-blur-xl",
|
|
5088
|
+
teal: "border-teal-600 bg-teal-950/70 backdrop-blur-xl",
|
|
5089
|
+
indigo: "border-indigo-600 bg-indigo-950/70 backdrop-blur-xl",
|
|
5090
|
+
emerald: "border-emerald-600 bg-emerald-950/70 backdrop-blur-xl",
|
|
5091
|
+
gray: "border-gray-600 bg-gray-950/70 backdrop-blur-xl",
|
|
5092
|
+
amber: "border-amber-600 bg-amber-950/70 backdrop-blur-xl",
|
|
5093
|
+
violet: "border-violet-600 bg-violet-950/70 backdrop-blur-xl",
|
|
5094
|
+
"gradient-blue": "border-gradient-to-r from-blue-600 to-purple-600 bg-gradient-to-r from-blue-950/70 to-purple-950/70 backdrop-blur-xl",
|
|
5095
|
+
"gradient-green": "border-gradient-to-r from-green-600 to-lime-600 bg-gradient-to-r from-green-950/70 to-lime-950/70 backdrop-blur-xl",
|
|
5096
|
+
"gradient-red": "border-gradient-to-r from-red-600 to-pink-600 bg-gradient-to-r from-red-950/70 to-pink-950/70 backdrop-blur-xl",
|
|
5097
|
+
"gradient-yellow": "border-gradient-to-r from-yellow-600 to-orange-600 bg-gradient-to-r from-yellow-950/70 to-orange-950/70 backdrop-blur-xl",
|
|
5098
|
+
"gradient-purple": "border-gradient-to-r from-purple-600 to-pink-600 bg-gradient-to-r from-purple-950/70 to-pink-950/70 backdrop-blur-xl",
|
|
5099
|
+
"gradient-teal": "border-gradient-to-r from-teal-600 to-cyan-600 bg-gradient-to-r from-teal-950/70 to-cyan-950/70 backdrop-blur-xl",
|
|
5100
|
+
"gradient-indigo": "border-gradient-to-r from-indigo-600 to-purple-600 bg-gradient-to-r from-indigo-950/70 to-purple-950/70 backdrop-blur-xl",
|
|
5101
|
+
"gradient-pink": "border-gradient-to-r from-pink-600 to-rose-600 bg-gradient-to-r from-pink-950/70 to-rose-950/70 backdrop-blur-xl",
|
|
5102
|
+
"gradient-orange": "border-gradient-to-r from-orange-600 to-red-600 bg-gradient-to-r from-orange-950/70 to-red-950/70 backdrop-blur-xl"
|
|
4980
5103
|
},
|
|
4981
5104
|
size: {
|
|
4982
5105
|
sm: "p-3 text-xs",
|
|
@@ -5317,13 +5440,13 @@ var tooltipVariants = (0, import_class_variance_authority21.cva)(
|
|
|
5317
5440
|
lg: "text-base px-4 py-2"
|
|
5318
5441
|
},
|
|
5319
5442
|
width: {
|
|
5320
|
-
fit: "w-
|
|
5321
|
-
xs: "w-
|
|
5322
|
-
sm: "w-
|
|
5323
|
-
md: "w-
|
|
5324
|
-
lg: "w-
|
|
5325
|
-
xl: "w-
|
|
5326
|
-
"2xl": "w-
|
|
5443
|
+
fit: "min-w-75 md:min-w-fit",
|
|
5444
|
+
xs: "min-w-75 md:min-w-xs",
|
|
5445
|
+
sm: "min-w-75 md:min-w-sm",
|
|
5446
|
+
md: "min-w-75 md:min-w-md",
|
|
5447
|
+
lg: "min-w-75 md:min-w-lg",
|
|
5448
|
+
xl: "min-w-75 md:min-w-xl",
|
|
5449
|
+
"2xl": "min-w-75 md:min-w-2xl"
|
|
5327
5450
|
}
|
|
5328
5451
|
},
|
|
5329
5452
|
defaultVariants: {
|
|
@@ -5451,8 +5574,8 @@ var TooltipContent = ({
|
|
|
5451
5574
|
const { open, position } = useTooltip();
|
|
5452
5575
|
if (!open) return null;
|
|
5453
5576
|
const positionStyles = {
|
|
5454
|
-
top: "bottom-full
|
|
5455
|
-
bottom: "top-full
|
|
5577
|
+
top: "bottom-full mb-2",
|
|
5578
|
+
bottom: "top-full mt-2",
|
|
5456
5579
|
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
5457
5580
|
right: "left-full top-1/2 -translate-y-1/2 ml-2"
|
|
5458
5581
|
};
|