@zentauri-ui/zentauri-components 0.0.84 → 0.0.92
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 +47 -29
- package/dist/chunk-BZSIXBA7.js +70 -0
- package/dist/chunk-BZSIXBA7.js.map +1 -0
- package/dist/chunk-E5UX537J.js +11 -0
- package/dist/chunk-E5UX537J.js.map +1 -0
- package/dist/chunk-MEWYFWBX.mjs +14 -0
- package/dist/chunk-MEWYFWBX.mjs.map +1 -0
- package/dist/chunk-VJHD7QZH.mjs +73 -0
- package/dist/chunk-VJHD7QZH.mjs.map +1 -0
- package/dist/ui/accordion.d.mts +70 -0
- package/dist/ui/accordion.d.ts +70 -0
- package/dist/ui/accordion.js +280 -0
- package/dist/ui/accordion.js.map +1 -0
- package/dist/ui/accordion.mjs +282 -0
- package/dist/ui/accordion.mjs.map +1 -0
- package/dist/ui/alert.d.mts +66 -0
- package/dist/ui/alert.d.ts +66 -0
- package/dist/ui/alert.js +218 -0
- package/dist/ui/alert.js.map +1 -0
- package/dist/ui/alert.mjs +220 -0
- package/dist/ui/alert.mjs.map +1 -0
- package/dist/ui/badge.d.mts +37 -0
- package/dist/ui/badge.d.ts +37 -0
- package/dist/ui/badge.js +159 -0
- package/dist/ui/badge.js.map +1 -0
- package/dist/ui/badge.mjs +161 -0
- package/dist/ui/badge.mjs.map +1 -0
- package/dist/ui/buttons.d.mts +27 -0
- package/dist/ui/buttons.d.ts +27 -0
- package/dist/ui/buttons.js +107 -0
- package/dist/ui/buttons.js.map +1 -0
- package/dist/ui/buttons.mjs +109 -0
- package/dist/ui/buttons.mjs.map +1 -0
- package/dist/ui/card.d.mts +77 -0
- package/dist/ui/card.d.ts +77 -0
- package/dist/ui/card.js +252 -0
- package/dist/ui/card.js.map +1 -0
- package/dist/ui/card.mjs +254 -0
- package/dist/ui/card.mjs.map +1 -0
- package/dist/ui/divider.d.mts +39 -0
- package/dist/ui/divider.d.ts +39 -0
- package/dist/ui/divider.js +194 -0
- package/dist/ui/divider.js.map +1 -0
- package/dist/ui/divider.mjs +196 -0
- package/dist/ui/divider.mjs.map +1 -0
- package/dist/ui/drawer.d.mts +81 -0
- package/dist/ui/drawer.d.ts +81 -0
- package/dist/ui/drawer.js +377 -0
- package/dist/ui/drawer.js.map +1 -0
- package/dist/ui/drawer.mjs +379 -0
- package/dist/ui/drawer.mjs.map +1 -0
- package/dist/ui/dropdown.d.mts +50 -0
- package/dist/ui/dropdown.d.ts +50 -0
- package/dist/ui/dropdown.js +272 -0
- package/dist/ui/dropdown.js.map +1 -0
- package/dist/ui/dropdown.mjs +274 -0
- package/dist/ui/dropdown.mjs.map +1 -0
- package/dist/ui/empty-state.d.mts +55 -0
- package/dist/ui/empty-state.d.ts +55 -0
- package/dist/ui/empty-state.js +148 -0
- package/dist/ui/empty-state.js.map +1 -0
- package/dist/ui/empty-state.mjs +150 -0
- package/dist/ui/empty-state.mjs.map +1 -0
- package/dist/ui/inputs.d.mts +35 -0
- package/dist/ui/inputs.d.ts +35 -0
- package/dist/ui/inputs.js +426 -0
- package/dist/ui/inputs.js.map +1 -0
- package/dist/ui/inputs.mjs +428 -0
- package/dist/ui/inputs.mjs.map +1 -0
- package/dist/ui/modal.d.mts +84 -0
- package/dist/ui/modal.d.ts +84 -0
- package/dist/ui/modal.js +378 -0
- package/dist/ui/modal.js.map +1 -0
- package/dist/ui/modal.mjs +380 -0
- package/dist/ui/modal.mjs.map +1 -0
- package/dist/ui/pagination.d.mts +114 -0
- package/dist/ui/pagination.d.ts +114 -0
- package/dist/ui/pagination.js +425 -0
- package/dist/ui/pagination.js.map +1 -0
- package/dist/ui/pagination.mjs +427 -0
- package/dist/ui/pagination.mjs.map +1 -0
- package/dist/ui/progress.d.mts +61 -0
- package/dist/ui/progress.d.ts +61 -0
- package/dist/ui/progress.js +231 -0
- package/dist/ui/progress.js.map +1 -0
- package/dist/ui/progress.mjs +233 -0
- package/dist/ui/progress.mjs.map +1 -0
- package/dist/ui/select.d.mts +73 -0
- package/dist/ui/select.d.ts +73 -0
- package/dist/ui/select.js +321 -0
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/select.mjs +323 -0
- package/dist/ui/select.mjs.map +1 -0
- package/dist/ui/skeleton.d.mts +90 -0
- package/dist/ui/skeleton.d.ts +90 -0
- package/dist/ui/skeleton.js +538 -0
- package/dist/ui/skeleton.js.map +1 -0
- package/dist/ui/skeleton.mjs +540 -0
- package/dist/ui/skeleton.mjs.map +1 -0
- package/dist/ui/spinner.d.mts +27 -0
- package/dist/ui/spinner.d.ts +27 -0
- package/dist/ui/spinner.js +187 -0
- package/dist/ui/spinner.js.map +1 -0
- package/dist/ui/spinner.mjs +189 -0
- package/dist/ui/spinner.mjs.map +1 -0
- package/dist/ui/table.d.mts +81 -0
- package/dist/ui/table.d.ts +81 -0
- package/dist/ui/table.js +287 -0
- package/dist/ui/table.js.map +1 -0
- package/dist/ui/table.mjs +289 -0
- package/dist/ui/table.mjs.map +1 -0
- package/dist/ui/tabs.d.mts +58 -0
- package/dist/ui/tabs.d.ts +58 -0
- package/dist/ui/tabs.js +268 -0
- package/dist/ui/tabs.js.map +1 -0
- package/dist/ui/tabs.mjs +270 -0
- package/dist/ui/tabs.mjs.map +1 -0
- package/dist/ui/toast.d.mts +86 -0
- package/dist/ui/toast.d.ts +86 -0
- package/dist/ui/toast.js +252 -0
- package/dist/ui/toast.js.map +1 -0
- package/dist/ui/toast.mjs +254 -0
- package/dist/ui/toast.mjs.map +1 -0
- package/dist/ui/toggle.d.mts +37 -0
- package/dist/ui/toggle.d.ts +37 -0
- package/dist/ui/toggle.js +152 -0
- package/dist/ui/toggle.js.map +1 -0
- package/dist/ui/toggle.mjs +154 -0
- package/dist/ui/toggle.mjs.map +1 -0
- package/dist/ui/tooltip.d.mts +46 -0
- package/dist/ui/tooltip.d.ts +46 -0
- package/dist/ui/tooltip.js +208 -0
- package/dist/ui/tooltip.js.map +1 -0
- package/dist/ui/tooltip.mjs +210 -0
- package/dist/ui/tooltip.mjs.map +1 -0
- package/dist/variants-Dd9pe-ov.d.mts +8 -0
- package/dist/variants-Dd9pe-ov.d.ts +8 -0
- package/package.json +15 -14
- package/dist/ui/index.cjs +0 -5764
- package/dist/ui/index.cjs.map +0 -1
- package/dist/ui/index.d.cts +0 -1164
- package/dist/ui/index.d.ts +0 -1164
- package/dist/ui/index.js +0 -5626
- package/dist/ui/index.js.map +0 -1
package/dist/ui/card.mjs
ADDED
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
cn
|
|
5
|
+
} from "../chunk-MEWYFWBX.mjs";
|
|
6
|
+
|
|
7
|
+
// src/ui/card/card.tsx
|
|
8
|
+
import { createContext, useContext, useMemo } from "react";
|
|
9
|
+
import { motion } from "framer-motion";
|
|
10
|
+
|
|
11
|
+
// src/ui/card/animations.ts
|
|
12
|
+
var cardAnimationPresets = {
|
|
13
|
+
none: {},
|
|
14
|
+
lift: {
|
|
15
|
+
whileHover: { y: -4, scale: 1.01 },
|
|
16
|
+
whileTap: { y: 0, scale: 0.995 },
|
|
17
|
+
transition: { type: "spring", stiffness: 380, damping: 26 }
|
|
18
|
+
},
|
|
19
|
+
glow: {
|
|
20
|
+
whileHover: {
|
|
21
|
+
boxShadow: "0 0 0 1px rgba(255,255,255,0.18), 0 22px 48px rgba(15,23,42,0.45)"
|
|
22
|
+
},
|
|
23
|
+
transition: { duration: 0.22, ease: "easeOut" }
|
|
24
|
+
},
|
|
25
|
+
tilt: {
|
|
26
|
+
whileHover: { rotateX: 4, rotateY: -4, scale: 1.01 },
|
|
27
|
+
whileTap: { rotateX: 0, rotateY: 0, scale: 0.99 },
|
|
28
|
+
transition: { type: "spring", stiffness: 280, damping: 22 },
|
|
29
|
+
style: { transformStyle: "preserve-3d" }
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// src/ui/card/variants.ts
|
|
34
|
+
import { cva } from "class-variance-authority";
|
|
35
|
+
var cardVariants = cva(
|
|
36
|
+
[
|
|
37
|
+
"relative flex w-full flex-col overflow-hidden text-slate-50",
|
|
38
|
+
"ring-offset-slate-950 transition-colors",
|
|
39
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-300 focus-visible:ring-offset-2"
|
|
40
|
+
],
|
|
41
|
+
{
|
|
42
|
+
variants: {
|
|
43
|
+
appearance: {
|
|
44
|
+
default: "border border-white/10 bg-white/5 shadow-[0_1px_2px_rgba(15,23,42,0.12)]",
|
|
45
|
+
glass: "border border-white/15 bg-white/10 backdrop-blur-md shadow-[0_18px_48px_rgba(15,23,42,0.35)]",
|
|
46
|
+
outline: "border border-white/15 bg-transparent",
|
|
47
|
+
ghost: "border border-transparent bg-transparent",
|
|
48
|
+
elevated: "border border-white/10 bg-slate-900/80 shadow-[0_24px_64px_rgba(15,23,42,0.45)]",
|
|
49
|
+
sky: "border border-sky-600 bg-sky-950/70 backdrop-blur-xl",
|
|
50
|
+
rose: "border border-rose-600 bg-rose-950/70 backdrop-blur-xl",
|
|
51
|
+
purple: "border border-purple-600 bg-purple-950/70 backdrop-blur-xl",
|
|
52
|
+
pink: "border border-pink-600 bg-pink-950/70 backdrop-blur-xl",
|
|
53
|
+
orange: "border border-orange-600 bg-orange-950/70 backdrop-blur-xl",
|
|
54
|
+
yellow: "border border-yellow-600 bg-yellow-950/70 backdrop-blur-xl",
|
|
55
|
+
teal: "border border-teal-600 bg-teal-950/70 backdrop-blur-xl",
|
|
56
|
+
indigo: "border border-indigo-600 bg-indigo-950/70 backdrop-blur-xl",
|
|
57
|
+
emerald: "border border-emerald-600 bg-emerald-950/70 backdrop-blur-xl",
|
|
58
|
+
gray: "border border-gray-600 bg-gray-950/70 backdrop-blur-xl",
|
|
59
|
+
amber: "border border-amber-600 bg-amber-950/70 backdrop-blur-xl",
|
|
60
|
+
violet: "border border-violet-600 bg-violet-950/70 backdrop-blur-xl",
|
|
61
|
+
"gradient-blue": "border 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",
|
|
62
|
+
"gradient-green": "border 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",
|
|
63
|
+
"gradient-red": "border 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",
|
|
64
|
+
"gradient-yellow": "border 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",
|
|
65
|
+
"gradient-purple": "border 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",
|
|
66
|
+
"gradient-teal": "border 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",
|
|
67
|
+
"gradient-indigo": "border 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",
|
|
68
|
+
"gradient-pink": "border 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",
|
|
69
|
+
"gradient-orange": "border 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"
|
|
70
|
+
},
|
|
71
|
+
size: {
|
|
72
|
+
sm: "gap-2 p-3 text-sm",
|
|
73
|
+
md: "gap-3 p-4 text-sm",
|
|
74
|
+
lg: "gap-4 p-6 text-base"
|
|
75
|
+
},
|
|
76
|
+
rounded: {
|
|
77
|
+
sm: "rounded-lg",
|
|
78
|
+
md: "rounded-xl",
|
|
79
|
+
lg: "rounded-2xl",
|
|
80
|
+
full: "rounded-3xl"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
defaultVariants: {
|
|
84
|
+
appearance: "default",
|
|
85
|
+
size: "md",
|
|
86
|
+
rounded: "md"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
var cardHeaderVariants = cva(
|
|
91
|
+
"flex flex-col gap-1 border-b border-white/10 pb-3",
|
|
92
|
+
{
|
|
93
|
+
variants: {
|
|
94
|
+
size: {
|
|
95
|
+
sm: "pb-2",
|
|
96
|
+
md: "pb-3",
|
|
97
|
+
lg: "pb-4"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
defaultVariants: { size: "md" }
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
var cardFooterVariants = cva(
|
|
104
|
+
"flex flex-col gap-2 border-t border-white/10 pt-3",
|
|
105
|
+
{
|
|
106
|
+
variants: {
|
|
107
|
+
size: {
|
|
108
|
+
sm: "pt-2",
|
|
109
|
+
md: "pt-3",
|
|
110
|
+
lg: "pt-4"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
defaultVariants: { size: "md" }
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
var cardTitleVariants = cva("font-semibold tracking-tight text-slate-50", {
|
|
117
|
+
variants: {
|
|
118
|
+
size: {
|
|
119
|
+
sm: "text-sm",
|
|
120
|
+
md: "text-base",
|
|
121
|
+
lg: "text-lg"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
defaultVariants: { size: "md" }
|
|
125
|
+
});
|
|
126
|
+
var cardDescriptionVariants = cva("text-slate-400", {
|
|
127
|
+
variants: {
|
|
128
|
+
size: {
|
|
129
|
+
sm: "text-xs",
|
|
130
|
+
md: "text-sm",
|
|
131
|
+
lg: "text-base"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
defaultVariants: { size: "md" }
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
// src/ui/card/card.tsx
|
|
138
|
+
import { jsx } from "react/jsx-runtime";
|
|
139
|
+
var CardSizeContext = createContext("md");
|
|
140
|
+
function useCardSize() {
|
|
141
|
+
return useContext(CardSizeContext);
|
|
142
|
+
}
|
|
143
|
+
function Card(props) {
|
|
144
|
+
const {
|
|
145
|
+
className,
|
|
146
|
+
appearance,
|
|
147
|
+
size = "md",
|
|
148
|
+
rounded,
|
|
149
|
+
animation = "none",
|
|
150
|
+
children,
|
|
151
|
+
ref,
|
|
152
|
+
...rest
|
|
153
|
+
} = props;
|
|
154
|
+
const motionProps = cardAnimationPresets[animation];
|
|
155
|
+
const ctx = useMemo(() => size ?? "md", [size]);
|
|
156
|
+
return /* @__PURE__ */ jsx(CardSizeContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx(
|
|
157
|
+
motion.article,
|
|
158
|
+
{
|
|
159
|
+
ref,
|
|
160
|
+
"data-slot": "card",
|
|
161
|
+
className: cn(cardVariants({ appearance, size, rounded }), className),
|
|
162
|
+
initial: false,
|
|
163
|
+
...motionProps,
|
|
164
|
+
...rest,
|
|
165
|
+
children
|
|
166
|
+
}
|
|
167
|
+
) });
|
|
168
|
+
}
|
|
169
|
+
Card.displayName = "Card";
|
|
170
|
+
function CardHeader({ className, children }) {
|
|
171
|
+
const size = useCardSize();
|
|
172
|
+
return /* @__PURE__ */ jsx(
|
|
173
|
+
"header",
|
|
174
|
+
{
|
|
175
|
+
"data-slot": "card-header",
|
|
176
|
+
className: cn(cardHeaderVariants({ size }), className),
|
|
177
|
+
children
|
|
178
|
+
}
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
CardHeader.displayName = "CardHeader";
|
|
182
|
+
function CardBody({ className, children }) {
|
|
183
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "card-body", className: cn("flex flex-1 flex-col gap-2", className), children });
|
|
184
|
+
}
|
|
185
|
+
CardBody.displayName = "CardBody";
|
|
186
|
+
function CardFooter({ className, children }) {
|
|
187
|
+
const size = useCardSize();
|
|
188
|
+
return /* @__PURE__ */ jsx(
|
|
189
|
+
"footer",
|
|
190
|
+
{
|
|
191
|
+
"data-slot": "card-footer",
|
|
192
|
+
className: cn(cardFooterVariants({ size }), className),
|
|
193
|
+
children
|
|
194
|
+
}
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
CardFooter.displayName = "CardFooter";
|
|
198
|
+
function CardTitle({
|
|
199
|
+
className,
|
|
200
|
+
children,
|
|
201
|
+
as = "h3",
|
|
202
|
+
ref,
|
|
203
|
+
...rest
|
|
204
|
+
}) {
|
|
205
|
+
const size = useCardSize();
|
|
206
|
+
const Tag = as;
|
|
207
|
+
return /* @__PURE__ */ jsx(
|
|
208
|
+
Tag,
|
|
209
|
+
{
|
|
210
|
+
ref,
|
|
211
|
+
"data-slot": "card-title",
|
|
212
|
+
className: cn(cardTitleVariants({ size }), className),
|
|
213
|
+
...rest,
|
|
214
|
+
children
|
|
215
|
+
}
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
CardTitle.displayName = "CardTitle";
|
|
219
|
+
function CardDescription({
|
|
220
|
+
className,
|
|
221
|
+
children,
|
|
222
|
+
as = "p",
|
|
223
|
+
ref,
|
|
224
|
+
...rest
|
|
225
|
+
}) {
|
|
226
|
+
const size = useCardSize();
|
|
227
|
+
const Tag = as;
|
|
228
|
+
return /* @__PURE__ */ jsx(
|
|
229
|
+
Tag,
|
|
230
|
+
{
|
|
231
|
+
ref,
|
|
232
|
+
"data-slot": "card-description",
|
|
233
|
+
className: cn(cardDescriptionVariants({ size }), className),
|
|
234
|
+
...rest,
|
|
235
|
+
children
|
|
236
|
+
}
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
CardDescription.displayName = "CardDescription";
|
|
240
|
+
export {
|
|
241
|
+
Card,
|
|
242
|
+
CardBody,
|
|
243
|
+
CardDescription,
|
|
244
|
+
CardFooter,
|
|
245
|
+
CardHeader,
|
|
246
|
+
CardTitle,
|
|
247
|
+
cardAnimationPresets,
|
|
248
|
+
cardDescriptionVariants,
|
|
249
|
+
cardFooterVariants,
|
|
250
|
+
cardHeaderVariants,
|
|
251
|
+
cardTitleVariants,
|
|
252
|
+
cardVariants
|
|
253
|
+
};
|
|
254
|
+
//# sourceMappingURL=card.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/ui/card/card.tsx","../../src/ui/card/animations.ts","../../src/ui/card/variants.ts"],"sourcesContent":["\"use client\";\n\nimport { createContext, useContext, useMemo } from \"react\";\nimport { motion } from \"framer-motion\";\n\nimport { cn } from \"../../lib/utils\";\n\nimport { cardAnimationPresets } from \"./animations\";\nimport type {\n CardDescriptionProps,\n CardProps,\n CardSectionProps,\n CardTitleProps,\n} from \"./types\";\nimport {\n cardDescriptionVariants,\n cardFooterVariants,\n cardHeaderVariants,\n cardTitleVariants,\n cardVariants,\n} from \"./variants\";\n\ntype CardSize = NonNullable<CardProps[\"size\"]>;\n\nconst CardSizeContext = createContext<CardSize>(\"md\");\n\nfunction useCardSize(): CardSize {\n return useContext(CardSizeContext);\n}\n\nexport function Card(props: CardProps) {\n const {\n className,\n appearance,\n size = \"md\",\n rounded,\n animation = \"none\",\n children,\n ref,\n ...rest\n } = props;\n const motionProps = cardAnimationPresets[animation];\n const ctx = useMemo(() => size ?? \"md\", [size]);\n\n return (\n <CardSizeContext.Provider value={ctx}>\n <motion.article\n ref={ref}\n data-slot=\"card\"\n className={cn(cardVariants({ appearance, size, rounded }), className)}\n initial={false}\n {...motionProps}\n {...rest}\n >\n {children}\n </motion.article>\n </CardSizeContext.Provider>\n );\n}\n\nCard.displayName = \"Card\";\n\nexport function CardHeader({ className, children }: CardSectionProps) {\n const size = useCardSize();\n return (\n <header\n data-slot=\"card-header\"\n className={cn(cardHeaderVariants({ size }), className)}\n >\n {children}\n </header>\n );\n}\n\nCardHeader.displayName = \"CardHeader\";\n\nexport function CardBody({ className, children }: CardSectionProps) {\n return (\n <div data-slot=\"card-body\" className={cn(\"flex flex-1 flex-col gap-2\", className)}>\n {children}\n </div>\n );\n}\n\nCardBody.displayName = \"CardBody\";\n\nexport function CardFooter({ className, children }: CardSectionProps) {\n const size = useCardSize();\n return (\n <footer\n data-slot=\"card-footer\"\n className={cn(cardFooterVariants({ size }), className)}\n >\n {children}\n </footer>\n );\n}\n\nCardFooter.displayName = \"CardFooter\";\n\nexport function CardTitle({\n className,\n children,\n as = \"h3\",\n ref,\n ...rest\n}: CardTitleProps) {\n const size = useCardSize();\n const Tag = as;\n return (\n <Tag\n ref={ref as never}\n data-slot=\"card-title\"\n className={cn(cardTitleVariants({ size }), className)}\n {...rest}\n >\n {children}\n </Tag>\n );\n}\n\nCardTitle.displayName = \"CardTitle\";\n\nexport function CardDescription({\n className,\n children,\n as = \"p\",\n ref,\n ...rest\n}: CardDescriptionProps) {\n const size = useCardSize();\n const Tag = as;\n return (\n <Tag\n ref={ref as never}\n data-slot=\"card-description\"\n className={cn(cardDescriptionVariants({ size }), className)}\n {...rest}\n >\n {children}\n </Tag>\n );\n}\n\nCardDescription.displayName = \"CardDescription\";\n","import type { HTMLMotionProps } from \"framer-motion\";\n\nimport type { CardAnimation } from \"./types\";\n\ntype CardPresetMotionProps = Pick<\n HTMLMotionProps<\"article\">,\n \"style\" | \"transition\" | \"whileHover\" | \"whileTap\"\n>;\n\nexport type CardAnimationPresets = Record<CardAnimation, CardPresetMotionProps>;\n\nexport const cardAnimationPresets: CardAnimationPresets = {\n none: {},\n lift: {\n whileHover: { y: -4, scale: 1.01 },\n whileTap: { y: 0, scale: 0.995 },\n transition: { type: \"spring\", stiffness: 380, damping: 26 },\n },\n glow: {\n whileHover: {\n boxShadow:\n \"0 0 0 1px rgba(255,255,255,0.18), 0 22px 48px rgba(15,23,42,0.45)\",\n },\n transition: { duration: 0.22, ease: \"easeOut\" },\n },\n tilt: {\n whileHover: { rotateX: 4, rotateY: -4, scale: 1.01 },\n whileTap: { rotateX: 0, rotateY: 0, scale: 0.99 },\n transition: { type: \"spring\", stiffness: 280, damping: 22 },\n style: { transformStyle: \"preserve-3d\" },\n },\n};\n","import { cva } from \"class-variance-authority\";\n\nexport const cardVariants = cva(\n [\n \"relative flex w-full flex-col overflow-hidden text-slate-50\",\n \"ring-offset-slate-950 transition-colors\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-300 focus-visible:ring-offset-2\",\n ],\n {\n variants: {\n appearance: {\n default:\n \"border border-white/10 bg-white/5 shadow-[0_1px_2px_rgba(15,23,42,0.12)]\",\n glass:\n \"border border-white/15 bg-white/10 backdrop-blur-md shadow-[0_18px_48px_rgba(15,23,42,0.35)]\",\n outline: \"border border-white/15 bg-transparent\",\n ghost: \"border border-transparent bg-transparent\",\n elevated:\n \"border border-white/10 bg-slate-900/80 shadow-[0_24px_64px_rgba(15,23,42,0.45)]\",\n sky: \"border border-sky-600 bg-sky-950/70 backdrop-blur-xl\",\n rose: \"border border-rose-600 bg-rose-950/70 backdrop-blur-xl\",\n purple: \"border border-purple-600 bg-purple-950/70 backdrop-blur-xl\",\n pink: \"border border-pink-600 bg-pink-950/70 backdrop-blur-xl\",\n orange: \"border border-orange-600 bg-orange-950/70 backdrop-blur-xl\",\n yellow: \"border border-yellow-600 bg-yellow-950/70 backdrop-blur-xl\",\n teal: \"border border-teal-600 bg-teal-950/70 backdrop-blur-xl\",\n indigo: \"border border-indigo-600 bg-indigo-950/70 backdrop-blur-xl\",\n emerald: \"border border-emerald-600 bg-emerald-950/70 backdrop-blur-xl\",\n gray: \"border border-gray-600 bg-gray-950/70 backdrop-blur-xl\",\n amber: \"border border-amber-600 bg-amber-950/70 backdrop-blur-xl\",\n violet: \"border border-violet-600 bg-violet-950/70 backdrop-blur-xl\",\n \"gradient-blue\": \"border 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\",\n \"gradient-green\": \"border 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\",\n \"gradient-red\": \"border 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\",\n \"gradient-yellow\": \"border 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\",\n \"gradient-purple\": \"border 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\",\n \"gradient-teal\": \"border 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\",\n \"gradient-indigo\": \"border 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\",\n \"gradient-pink\": \"border 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\",\n \"gradient-orange\": \"border 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\",\n },\n size: {\n sm: \"gap-2 p-3 text-sm\",\n md: \"gap-3 p-4 text-sm\",\n lg: \"gap-4 p-6 text-base\",\n },\n rounded: {\n sm: \"rounded-lg\",\n md: \"rounded-xl\",\n lg: \"rounded-2xl\",\n full: \"rounded-3xl\",\n },\n },\n defaultVariants: {\n appearance: \"default\",\n size: \"md\",\n rounded: \"md\",\n },\n },\n);\n\nexport const cardHeaderVariants = cva(\n \"flex flex-col gap-1 border-b border-white/10 pb-3\",\n {\n variants: {\n size: {\n sm: \"pb-2\",\n md: \"pb-3\",\n lg: \"pb-4\",\n },\n },\n defaultVariants: { size: \"md\" },\n },\n);\n\nexport const cardFooterVariants = cva(\n \"flex flex-col gap-2 border-t border-white/10 pt-3\",\n {\n variants: {\n size: {\n sm: \"pt-2\",\n md: \"pt-3\",\n lg: \"pt-4\",\n },\n },\n defaultVariants: { size: \"md\" },\n },\n);\n\nexport const cardTitleVariants = cva(\"font-semibold tracking-tight text-slate-50\", {\n variants: {\n size: {\n sm: \"text-sm\",\n md: \"text-base\",\n lg: \"text-lg\",\n },\n },\n defaultVariants: { size: \"md\" },\n});\n\nexport const cardDescriptionVariants = cva(\"text-slate-400\", {\n variants: {\n size: {\n sm: \"text-xs\",\n md: \"text-sm\",\n lg: \"text-base\",\n },\n },\n defaultVariants: { size: \"md\" },\n});\n"],"mappings":";;;;;;;AAEA,SAAS,eAAe,YAAY,eAAe;AACnD,SAAS,cAAc;;;ACQhB,IAAM,uBAA6C;AAAA,EACxD,MAAM,CAAC;AAAA,EACP,MAAM;AAAA,IACJ,YAAY,EAAE,GAAG,IAAI,OAAO,KAAK;AAAA,IACjC,UAAU,EAAE,GAAG,GAAG,OAAO,MAAM;AAAA,IAC/B,YAAY,EAAE,MAAM,UAAU,WAAW,KAAK,SAAS,GAAG;AAAA,EAC5D;AAAA,EACA,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,WACE;AAAA,IACJ;AAAA,IACA,YAAY,EAAE,UAAU,MAAM,MAAM,UAAU;AAAA,EAChD;AAAA,EACA,MAAM;AAAA,IACJ,YAAY,EAAE,SAAS,GAAG,SAAS,IAAI,OAAO,KAAK;AAAA,IACnD,UAAU,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,KAAK;AAAA,IAChD,YAAY,EAAE,MAAM,UAAU,WAAW,KAAK,SAAS,GAAG;AAAA,IAC1D,OAAO,EAAE,gBAAgB,cAAc;AAAA,EACzC;AACF;;;AC/BA,SAAS,WAAW;AAEb,IAAM,eAAe;AAAA,EAC1B;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,YAAY;AAAA,QACV,SACE;AAAA,QACF,OACE;AAAA,QACF,SAAS;AAAA,QACT,OAAO;AAAA,QACP,UACE;AAAA,QACF,KAAK;AAAA,QACL,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,QAAQ;AAAA,QACR,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,SAAS;AAAA,QACT,MAAM;AAAA,QACN,OAAO;AAA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BAAmB,EAAE,KAAK,CAAC,GAAG,SAAS;AAAA,MAEpD;AAAA;AAAA,EACH;AAEJ;AAEA,WAAW,cAAc;AAElB,SAAS,UAAU;AAAA,EACxB;AAAA,EACA;AAAA,EACA,KAAK;AAAA,EACL;AAAA,EACA,GAAG;AACL,GAAmB;AACjB,QAAM,OAAO,YAAY;AACzB,QAAM,MAAM;AACZ,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,aAAU;AAAA,MACV,WAAW,GAAG,kBAAkB,EAAE,KAAK,CAAC,GAAG,SAAS;AAAA,MACnD,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;AAEA,UAAU,cAAc;AAEjB,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA,KAAK;AAAA,EACL;AAAA,EACA,GAAG;AACL,GAAyB;AACvB,QAAM,OAAO,YAAY;AACzB,QAAM,MAAM;AACZ,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,aAAU;AAAA,MACV,WAAW,GAAG,wBAAwB,EAAE,KAAK,CAAC,GAAG,SAAS;AAAA,MACzD,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;AAEA,gBAAgB,cAAc;","names":[]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { HTMLMotionProps } from 'framer-motion';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
|
+
|
|
7
|
+
declare const dividerToneVariants: (props?: ({
|
|
8
|
+
appearance?: "default" | "muted" | "primary" | "destructive" | "ghost" | "sky" | "rose" | "purple" | "pink" | "orange" | "yellow" | "teal" | "indigo" | "emerald" | "gray" | "amber" | "violet" | "gradient-blue" | "gradient-green" | "gradient-red" | "gradient-yellow" | "gradient-purple" | "gradient-teal" | "gradient-indigo" | "gradient-pink" | "gradient-orange" | null | undefined;
|
|
9
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
|
+
declare const dividerVariants: (props?: ({
|
|
11
|
+
appearance?: "default" | "muted" | "primary" | "destructive" | "ghost" | "sky" | "rose" | "purple" | "pink" | "orange" | "yellow" | "teal" | "indigo" | "emerald" | "gray" | "amber" | "violet" | "gradient-blue" | "gradient-green" | "gradient-red" | "gradient-yellow" | "gradient-purple" | "gradient-teal" | "gradient-indigo" | "gradient-pink" | "gradient-orange" | null | undefined;
|
|
12
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
13
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
14
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
|
+
declare const dividerLineVariants: (props?: ({
|
|
16
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
17
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
18
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
19
|
+
declare const dividerLabelVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
20
|
+
|
|
21
|
+
type DividerAnimation = "none" | "expand" | "fade";
|
|
22
|
+
type DividerVariantProps = VariantProps<typeof dividerVariants>;
|
|
23
|
+
type DividerProps = DividerVariantProps & Omit<HTMLMotionProps<"div">, "children"> & {
|
|
24
|
+
animation?: DividerAnimation;
|
|
25
|
+
/** Optional label between divider lines. */
|
|
26
|
+
label?: ReactNode;
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
declare function Divider(props: DividerProps): react_jsx_runtime.JSX.Element;
|
|
31
|
+
declare namespace Divider {
|
|
32
|
+
var displayName: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
type DividerPresetMotionProps = Pick<HTMLMotionProps<"div">, "initial" | "animate" | "transition" | "whileHover">;
|
|
36
|
+
type DividerAnimationPresets = Record<DividerAnimation, DividerPresetMotionProps>;
|
|
37
|
+
declare const dividerAnimationPresets: DividerAnimationPresets;
|
|
38
|
+
|
|
39
|
+
export { Divider, type DividerAnimation, type DividerProps, dividerAnimationPresets, dividerLabelVariants, dividerLineVariants, dividerToneVariants, dividerVariants };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { HTMLMotionProps } from 'framer-motion';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
|
+
|
|
7
|
+
declare const dividerToneVariants: (props?: ({
|
|
8
|
+
appearance?: "default" | "muted" | "primary" | "destructive" | "ghost" | "sky" | "rose" | "purple" | "pink" | "orange" | "yellow" | "teal" | "indigo" | "emerald" | "gray" | "amber" | "violet" | "gradient-blue" | "gradient-green" | "gradient-red" | "gradient-yellow" | "gradient-purple" | "gradient-teal" | "gradient-indigo" | "gradient-pink" | "gradient-orange" | null | undefined;
|
|
9
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
|
+
declare const dividerVariants: (props?: ({
|
|
11
|
+
appearance?: "default" | "muted" | "primary" | "destructive" | "ghost" | "sky" | "rose" | "purple" | "pink" | "orange" | "yellow" | "teal" | "indigo" | "emerald" | "gray" | "amber" | "violet" | "gradient-blue" | "gradient-green" | "gradient-red" | "gradient-yellow" | "gradient-purple" | "gradient-teal" | "gradient-indigo" | "gradient-pink" | "gradient-orange" | null | undefined;
|
|
12
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
13
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
14
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
|
+
declare const dividerLineVariants: (props?: ({
|
|
16
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
17
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
18
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
19
|
+
declare const dividerLabelVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
20
|
+
|
|
21
|
+
type DividerAnimation = "none" | "expand" | "fade";
|
|
22
|
+
type DividerVariantProps = VariantProps<typeof dividerVariants>;
|
|
23
|
+
type DividerProps = DividerVariantProps & Omit<HTMLMotionProps<"div">, "children"> & {
|
|
24
|
+
animation?: DividerAnimation;
|
|
25
|
+
/** Optional label between divider lines. */
|
|
26
|
+
label?: ReactNode;
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
declare function Divider(props: DividerProps): react_jsx_runtime.JSX.Element;
|
|
31
|
+
declare namespace Divider {
|
|
32
|
+
var displayName: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
type DividerPresetMotionProps = Pick<HTMLMotionProps<"div">, "initial" | "animate" | "transition" | "whileHover">;
|
|
36
|
+
type DividerAnimationPresets = Record<DividerAnimation, DividerPresetMotionProps>;
|
|
37
|
+
declare const dividerAnimationPresets: DividerAnimationPresets;
|
|
38
|
+
|
|
39
|
+
export { Divider, type DividerAnimation, type DividerProps, dividerAnimationPresets, dividerLabelVariants, dividerLineVariants, dividerToneVariants, dividerVariants };
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
|
+
|
|
3
|
+
var _chunkE5UX537Jjs = require('../chunk-E5UX537J.js');
|
|
4
|
+
|
|
5
|
+
// src/ui/divider/divider.tsx
|
|
6
|
+
var _framermotion = require('framer-motion');
|
|
7
|
+
|
|
8
|
+
// src/ui/divider/animations.ts
|
|
9
|
+
var dividerAnimationPresets = {
|
|
10
|
+
none: {},
|
|
11
|
+
expand: {
|
|
12
|
+
initial: { scaleX: 0.6, opacity: 0.4 },
|
|
13
|
+
animate: { scaleX: 1, opacity: 1 },
|
|
14
|
+
transition: { duration: 0.35, ease: "easeOut" }
|
|
15
|
+
},
|
|
16
|
+
fade: {
|
|
17
|
+
initial: { opacity: 0 },
|
|
18
|
+
animate: { opacity: 1 },
|
|
19
|
+
transition: { duration: 0.25 }
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
// src/ui/divider/variants.ts
|
|
24
|
+
var _classvarianceauthority = require('class-variance-authority');
|
|
25
|
+
var APPEARANCES = {
|
|
26
|
+
default: "text-slate-200",
|
|
27
|
+
muted: "text-slate-500",
|
|
28
|
+
primary: "text-cyan-300",
|
|
29
|
+
destructive: "text-rose-400",
|
|
30
|
+
ghost: "text-slate-600",
|
|
31
|
+
sky: "text-sky-400",
|
|
32
|
+
rose: "text-rose-400",
|
|
33
|
+
purple: "text-purple-400",
|
|
34
|
+
pink: "text-pink-400",
|
|
35
|
+
orange: "text-orange-400",
|
|
36
|
+
yellow: "text-yellow-400",
|
|
37
|
+
teal: "text-teal-400",
|
|
38
|
+
indigo: "text-indigo-400",
|
|
39
|
+
emerald: "text-emerald-400",
|
|
40
|
+
gray: "text-gray-400",
|
|
41
|
+
amber: "text-amber-400",
|
|
42
|
+
violet: "text-violet-400",
|
|
43
|
+
"gradient-blue": "text-blue-400",
|
|
44
|
+
"gradient-green": "text-green-400",
|
|
45
|
+
"gradient-red": "text-red-400",
|
|
46
|
+
"gradient-yellow": "text-yellow-400",
|
|
47
|
+
"gradient-purple": "text-purple-400",
|
|
48
|
+
"gradient-teal": "text-teal-400",
|
|
49
|
+
"gradient-indigo": "text-indigo-400",
|
|
50
|
+
"gradient-pink": "text-pink-400",
|
|
51
|
+
"gradient-orange": "text-orange-400"
|
|
52
|
+
};
|
|
53
|
+
var dividerToneVariants = _classvarianceauthority.cva.call(void 0, "", {
|
|
54
|
+
variants: {
|
|
55
|
+
appearance: APPEARANCES
|
|
56
|
+
},
|
|
57
|
+
defaultVariants: { appearance: "default" }
|
|
58
|
+
});
|
|
59
|
+
var dividerVariants = _classvarianceauthority.cva.call(void 0, "flex w-full items-center gap-3", {
|
|
60
|
+
variants: {
|
|
61
|
+
appearance: APPEARANCES,
|
|
62
|
+
orientation: {
|
|
63
|
+
horizontal: "w-full flex-row",
|
|
64
|
+
vertical: "h-full min-h-[2rem] w-auto flex-col self-stretch"
|
|
65
|
+
},
|
|
66
|
+
size: {
|
|
67
|
+
sm: "",
|
|
68
|
+
md: "",
|
|
69
|
+
lg: ""
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
compoundVariants: [
|
|
73
|
+
{ orientation: "horizontal", size: "sm", class: "min-h-px" },
|
|
74
|
+
{ orientation: "horizontal", size: "md", class: "min-h-[2px]" },
|
|
75
|
+
{ orientation: "horizontal", size: "lg", class: "min-h-[3px]" },
|
|
76
|
+
{ orientation: "vertical", size: "sm", class: "min-w-px" },
|
|
77
|
+
{ orientation: "vertical", size: "md", class: "min-w-[2px]" },
|
|
78
|
+
{ orientation: "vertical", size: "lg", class: "min-w-[3px]" }
|
|
79
|
+
],
|
|
80
|
+
defaultVariants: {
|
|
81
|
+
appearance: "default",
|
|
82
|
+
orientation: "horizontal",
|
|
83
|
+
size: "md"
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
var dividerLineVariants = _classvarianceauthority.cva.call(void 0,
|
|
87
|
+
"shrink grow rounded-full bg-current opacity-80",
|
|
88
|
+
{
|
|
89
|
+
variants: {
|
|
90
|
+
orientation: {
|
|
91
|
+
horizontal: "h-px",
|
|
92
|
+
vertical: "w-px flex-1"
|
|
93
|
+
},
|
|
94
|
+
size: {
|
|
95
|
+
sm: "",
|
|
96
|
+
md: "",
|
|
97
|
+
lg: ""
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
compoundVariants: [
|
|
101
|
+
{ orientation: "horizontal", size: "sm", class: "h-px" },
|
|
102
|
+
{ orientation: "horizontal", size: "md", class: "h-0.5" },
|
|
103
|
+
{ orientation: "horizontal", size: "lg", class: "h-1" },
|
|
104
|
+
{ orientation: "vertical", size: "sm", class: "w-px" },
|
|
105
|
+
{ orientation: "vertical", size: "md", class: "w-0.5" },
|
|
106
|
+
{ orientation: "vertical", size: "lg", class: "w-1" }
|
|
107
|
+
],
|
|
108
|
+
defaultVariants: {
|
|
109
|
+
orientation: "horizontal",
|
|
110
|
+
size: "md"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
var dividerLabelVariants = _classvarianceauthority.cva.call(void 0,
|
|
115
|
+
"shrink-0 text-xs font-medium uppercase tracking-wide text-current"
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
// src/ui/divider/divider.tsx
|
|
119
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
120
|
+
function Divider(props) {
|
|
121
|
+
const {
|
|
122
|
+
className,
|
|
123
|
+
appearance,
|
|
124
|
+
orientation,
|
|
125
|
+
size,
|
|
126
|
+
animation = "none",
|
|
127
|
+
label,
|
|
128
|
+
children,
|
|
129
|
+
ref,
|
|
130
|
+
...rest
|
|
131
|
+
} = props;
|
|
132
|
+
const motionProps = dividerAnimationPresets[animation];
|
|
133
|
+
const slot = _nullishCoalesce(label, () => ( children));
|
|
134
|
+
if (!slot) {
|
|
135
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
136
|
+
_framermotion.motion.div,
|
|
137
|
+
{
|
|
138
|
+
ref,
|
|
139
|
+
"data-slot": "divider",
|
|
140
|
+
role: "separator",
|
|
141
|
+
"aria-orientation": orientation === "vertical" ? "vertical" : "horizontal",
|
|
142
|
+
className: _chunkE5UX537Jjs.cn.call(void 0,
|
|
143
|
+
dividerToneVariants({ appearance }),
|
|
144
|
+
orientation === "horizontal" ? "flex w-full min-h-px flex-row items-stretch" : "flex h-full min-h-8 w-auto min-w-0 flex-col items-stretch self-stretch",
|
|
145
|
+
className
|
|
146
|
+
),
|
|
147
|
+
initial: animation === "none" ? false : void 0,
|
|
148
|
+
...motionProps,
|
|
149
|
+
...rest,
|
|
150
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkE5UX537Jjs.cn.call(void 0, dividerLineVariants({ orientation, size })), "aria-hidden": true })
|
|
151
|
+
}
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
155
|
+
_framermotion.motion.div,
|
|
156
|
+
{
|
|
157
|
+
ref,
|
|
158
|
+
"data-slot": "divider",
|
|
159
|
+
role: "separator",
|
|
160
|
+
"aria-orientation": orientation === "vertical" ? "vertical" : "horizontal",
|
|
161
|
+
className: _chunkE5UX537Jjs.cn.call(void 0, dividerVariants({ appearance, orientation, size }), className),
|
|
162
|
+
initial: animation === "none" ? false : void 0,
|
|
163
|
+
...motionProps,
|
|
164
|
+
...rest,
|
|
165
|
+
children: [
|
|
166
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
167
|
+
"span",
|
|
168
|
+
{
|
|
169
|
+
className: _chunkE5UX537Jjs.cn.call(void 0, dividerLineVariants({ orientation, size })),
|
|
170
|
+
"aria-hidden": true
|
|
171
|
+
}
|
|
172
|
+
),
|
|
173
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { "data-slot": "divider-label", className: dividerLabelVariants(), children: slot }),
|
|
174
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
175
|
+
"span",
|
|
176
|
+
{
|
|
177
|
+
className: _chunkE5UX537Jjs.cn.call(void 0, dividerLineVariants({ orientation, size })),
|
|
178
|
+
"aria-hidden": true
|
|
179
|
+
}
|
|
180
|
+
)
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
Divider.displayName = "Divider";
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
exports.Divider = Divider; exports.dividerAnimationPresets = dividerAnimationPresets; exports.dividerLabelVariants = dividerLabelVariants; exports.dividerLineVariants = dividerLineVariants; exports.dividerToneVariants = dividerToneVariants; exports.dividerVariants = dividerVariants;
|
|
194
|
+
//# sourceMappingURL=divider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/Users/shubham/Desktop/Repos/NEXT%20JS/zentauri-ui/packages/components/dist/ui/divider.js"],"names":[],"mappings":"AAAA;AACE;AACF,uDAA6B;AAC7B;AACA;AACA,6CAAsC;AACtC;AACA;AACA,IAAI,wBAAwB,EAAE;AAC9B,EAAE,IAAI,EAAE,CAAC,CAAC;AACV,EAAE,MAAM,EAAE;AACV,IAAI,OAAO,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC;AAC1C,IAAI,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC;AACtC,IAAI,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU;AAClD,EAAE,CAAC;AACH,EAAE,IAAI,EAAE;AACR,IAAI,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,CAAC;AAC3B,IAAI,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,CAAC;AAC3B,IAAI,UAAU,EAAE,EAAE,QAAQ,EAAE,KAAK;AACjC,EAAE;AACF,CAAC;AACD;AACA;AACA,kEAA8C;AAC9C,IAAI,YAAY,EAAE;AAClB,EAAE,OAAO,EAAE,gBAAgB;AAC3B,EAAE,KAAK,EAAE,gBAAgB;AACzB,EAAE,OAAO,EAAE,eAAe;AAC1B,EAAE,WAAW,EAAE,eAAe;AAC9B,EAAE,KAAK,EAAE,gBAAgB;AACzB,EAAE,GAAG,EAAE,cAAc;AACrB,EAAE,IAAI,EAAE,eAAe;AACvB,EAAE,MAAM,EAAE,iBAAiB;AAC3B,EAAE,IAAI,EAAE,eAAe;AACvB,EAAE,MAAM,EAAE,iBAAiB;AAC3B,EAAE,MAAM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