@zentauri-ui/zentauri-components 0.0.8 → 0.0.9
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 +27 -2
- package/dist/ui/accordion.cjs +311 -0
- package/dist/ui/accordion.cjs.map +1 -0
- package/dist/ui/accordion.d.cts +70 -0
- package/dist/ui/accordion.d.ts +70 -0
- package/dist/ui/accordion.js +286 -0
- package/dist/ui/accordion.js.map +1 -0
- package/dist/ui/alert.cjs +257 -0
- package/dist/ui/alert.cjs.map +1 -0
- package/dist/ui/alert.d.cts +66 -0
- package/dist/ui/alert.d.ts +66 -0
- package/dist/ui/alert.js +224 -0
- package/dist/ui/alert.js.map +1 -0
- package/dist/ui/badge.cjs +192 -0
- package/dist/ui/badge.cjs.map +1 -0
- package/dist/ui/badge.d.cts +37 -0
- package/dist/ui/badge.d.ts +37 -0
- package/dist/ui/badge.js +165 -0
- package/dist/ui/badge.js.map +1 -0
- package/dist/ui/buttons.cjs +202 -0
- package/dist/ui/buttons.cjs.map +1 -0
- package/dist/ui/buttons.d.cts +27 -0
- package/dist/ui/buttons.d.ts +27 -0
- package/dist/ui/buttons.js +176 -0
- package/dist/ui/buttons.js.map +1 -0
- package/dist/ui/card.cjs +293 -0
- package/dist/ui/card.cjs.map +1 -0
- package/dist/ui/card.d.cts +77 -0
- package/dist/ui/card.d.ts +77 -0
- package/dist/ui/card.js +258 -0
- package/dist/ui/card.js.map +1 -0
- package/dist/ui/divider.cjs +229 -0
- package/dist/ui/divider.cjs.map +1 -0
- package/dist/ui/divider.d.cts +39 -0
- package/dist/ui/divider.d.ts +39 -0
- package/dist/ui/divider.js +200 -0
- package/dist/ui/divider.js.map +1 -0
- package/dist/ui/drawer.cjs +408 -0
- package/dist/ui/drawer.cjs.map +1 -0
- package/dist/ui/drawer.d.cts +81 -0
- package/dist/ui/drawer.d.ts +81 -0
- package/dist/ui/drawer.js +383 -0
- package/dist/ui/drawer.js.map +1 -0
- package/dist/ui/dropdown.cjs +302 -0
- package/dist/ui/dropdown.cjs.map +1 -0
- package/dist/ui/dropdown.d.cts +50 -0
- package/dist/ui/dropdown.d.ts +50 -0
- package/dist/ui/dropdown.js +278 -0
- package/dist/ui/dropdown.js.map +1 -0
- package/dist/ui/empty-state.cjs +186 -0
- package/dist/ui/empty-state.cjs.map +1 -0
- package/dist/ui/empty-state.d.cts +55 -0
- package/dist/ui/empty-state.d.ts +55 -0
- package/dist/ui/empty-state.js +154 -0
- package/dist/ui/empty-state.js.map +1 -0
- package/dist/ui/index.d.cts +27 -1164
- package/dist/ui/index.d.ts +27 -1164
- package/dist/ui/inputs.cjs +458 -0
- package/dist/ui/inputs.cjs.map +1 -0
- package/dist/ui/inputs.d.cts +35 -0
- package/dist/ui/inputs.d.ts +35 -0
- package/dist/ui/inputs.js +432 -0
- package/dist/ui/inputs.js.map +1 -0
- package/dist/ui/modal.cjs +406 -0
- package/dist/ui/modal.cjs.map +1 -0
- package/dist/ui/modal.d.cts +84 -0
- package/dist/ui/modal.d.ts +84 -0
- package/dist/ui/modal.js +384 -0
- package/dist/ui/modal.js.map +1 -0
- package/dist/ui/pagination.cjs +523 -0
- package/dist/ui/pagination.cjs.map +1 -0
- package/dist/ui/pagination.d.cts +114 -0
- package/dist/ui/pagination.d.ts +114 -0
- package/dist/ui/pagination.js +494 -0
- package/dist/ui/pagination.js.map +1 -0
- package/dist/ui/progress.cjs +268 -0
- package/dist/ui/progress.cjs.map +1 -0
- package/dist/ui/progress.d.cts +61 -0
- package/dist/ui/progress.d.ts +61 -0
- package/dist/ui/progress.js +237 -0
- package/dist/ui/progress.js.map +1 -0
- package/dist/ui/select.cjs +360 -0
- package/dist/ui/select.cjs.map +1 -0
- package/dist/ui/select.d.cts +73 -0
- package/dist/ui/select.d.ts +73 -0
- package/dist/ui/select.js +327 -0
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/skeleton.cjs +576 -0
- package/dist/ui/skeleton.cjs.map +1 -0
- package/dist/ui/skeleton.d.cts +90 -0
- package/dist/ui/skeleton.d.ts +90 -0
- package/dist/ui/skeleton.js +544 -0
- package/dist/ui/skeleton.js.map +1 -0
- package/dist/ui/spinner.cjs +219 -0
- package/dist/ui/spinner.cjs.map +1 -0
- package/dist/ui/spinner.d.cts +27 -0
- package/dist/ui/spinner.d.ts +27 -0
- package/dist/ui/spinner.js +193 -0
- package/dist/ui/spinner.js.map +1 -0
- package/dist/ui/table.cjs +328 -0
- package/dist/ui/table.cjs.map +1 -0
- package/dist/ui/table.d.cts +81 -0
- package/dist/ui/table.d.ts +81 -0
- package/dist/ui/table.js +293 -0
- package/dist/ui/table.js.map +1 -0
- package/dist/ui/tabs.cjs +300 -0
- package/dist/ui/tabs.cjs.map +1 -0
- package/dist/ui/tabs.d.cts +58 -0
- package/dist/ui/tabs.d.ts +58 -0
- package/dist/ui/tabs.js +274 -0
- package/dist/ui/tabs.js.map +1 -0
- package/dist/ui/toast.cjs +285 -0
- package/dist/ui/toast.cjs.map +1 -0
- package/dist/ui/toast.d.cts +86 -0
- package/dist/ui/toast.d.ts +86 -0
- package/dist/ui/toast.js +258 -0
- package/dist/ui/toast.js.map +1 -0
- package/dist/ui/toggle.cjs +185 -0
- package/dist/ui/toggle.cjs.map +1 -0
- package/dist/ui/toggle.d.cts +37 -0
- package/dist/ui/toggle.d.ts +37 -0
- package/dist/ui/toggle.js +158 -0
- package/dist/ui/toggle.js.map +1 -0
- package/dist/ui/tooltip.cjs +242 -0
- package/dist/ui/tooltip.cjs.map +1 -0
- package/dist/ui/tooltip.d.cts +46 -0
- package/dist/ui/tooltip.d.ts +46 -0
- package/dist/ui/tooltip.js +214 -0
- package/dist/ui/tooltip.js.map +1 -0
- package/dist/variants-1Bx3BEeS.d.cts +8 -0
- package/dist/variants-1Bx3BEeS.d.ts +8 -0
- package/package.json +7 -3
|
@@ -0,0 +1,77 @@
|
|
|
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, Ref, HTMLAttributes } from 'react';
|
|
5
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
|
+
|
|
7
|
+
declare const cardVariants: (props?: ({
|
|
8
|
+
appearance?: "default" | "outline" | "ghost" | "sky" | "rose" | "purple" | "pink" | "orange" | "yellow" | "teal" | "indigo" | "emerald" | "gradient-blue" | "gradient-green" | "gradient-red" | "gradient-yellow" | "gradient-purple" | "gradient-teal" | "gradient-indigo" | "gradient-pink" | "gradient-orange" | "gray" | "violet" | "glass" | "amber" | "elevated" | null | undefined;
|
|
9
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
10
|
+
rounded?: "sm" | "md" | "lg" | "full" | null | undefined;
|
|
11
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
12
|
+
declare const cardHeaderVariants: (props?: ({
|
|
13
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
14
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
|
+
declare const cardFooterVariants: (props?: ({
|
|
16
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
17
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
18
|
+
declare const cardTitleVariants: (props?: ({
|
|
19
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
20
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
21
|
+
declare const cardDescriptionVariants: (props?: ({
|
|
22
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
23
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
24
|
+
|
|
25
|
+
type CardAnimation = "none" | "lift" | "glow" | "tilt";
|
|
26
|
+
type CardVariantProps = VariantProps<typeof cardVariants>;
|
|
27
|
+
type CardProps = CardVariantProps & Omit<HTMLMotionProps<"article">, "children"> & {
|
|
28
|
+
animation?: CardAnimation;
|
|
29
|
+
children?: ReactNode;
|
|
30
|
+
};
|
|
31
|
+
type CardSectionProps = {
|
|
32
|
+
className?: string;
|
|
33
|
+
children?: ReactNode;
|
|
34
|
+
};
|
|
35
|
+
type CardTitleProps = {
|
|
36
|
+
as?: "h2" | "h3" | "h4" | "h5" | "h6";
|
|
37
|
+
className?: string;
|
|
38
|
+
children?: ReactNode;
|
|
39
|
+
ref?: Ref<HTMLHeadingElement>;
|
|
40
|
+
} & Omit<HTMLAttributes<HTMLHeadingElement>, "className" | "children">;
|
|
41
|
+
type CardDescriptionProps = {
|
|
42
|
+
as?: "p" | "span" | "div";
|
|
43
|
+
className?: string;
|
|
44
|
+
children?: ReactNode;
|
|
45
|
+
ref?: Ref<HTMLElement>;
|
|
46
|
+
} & Omit<HTMLAttributes<HTMLElement>, "className" | "children">;
|
|
47
|
+
|
|
48
|
+
declare function Card(props: CardProps): react_jsx_runtime.JSX.Element;
|
|
49
|
+
declare namespace Card {
|
|
50
|
+
var displayName: string;
|
|
51
|
+
}
|
|
52
|
+
declare function CardHeader({ className, children }: CardSectionProps): react_jsx_runtime.JSX.Element;
|
|
53
|
+
declare namespace CardHeader {
|
|
54
|
+
var displayName: string;
|
|
55
|
+
}
|
|
56
|
+
declare function CardBody({ className, children }: CardSectionProps): react_jsx_runtime.JSX.Element;
|
|
57
|
+
declare namespace CardBody {
|
|
58
|
+
var displayName: string;
|
|
59
|
+
}
|
|
60
|
+
declare function CardFooter({ className, children }: CardSectionProps): react_jsx_runtime.JSX.Element;
|
|
61
|
+
declare namespace CardFooter {
|
|
62
|
+
var displayName: string;
|
|
63
|
+
}
|
|
64
|
+
declare function CardTitle({ className, children, as, ref, ...rest }: CardTitleProps): react_jsx_runtime.JSX.Element;
|
|
65
|
+
declare namespace CardTitle {
|
|
66
|
+
var displayName: string;
|
|
67
|
+
}
|
|
68
|
+
declare function CardDescription({ className, children, as, ref, ...rest }: CardDescriptionProps): react_jsx_runtime.JSX.Element;
|
|
69
|
+
declare namespace CardDescription {
|
|
70
|
+
var displayName: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
type CardPresetMotionProps = Pick<HTMLMotionProps<"article">, "style" | "transition" | "whileHover" | "whileTap">;
|
|
74
|
+
type CardAnimationPresets = Record<CardAnimation, CardPresetMotionProps>;
|
|
75
|
+
declare const cardAnimationPresets: CardAnimationPresets;
|
|
76
|
+
|
|
77
|
+
export { Card, type CardAnimation, CardBody, CardDescription, type CardDescriptionProps, CardFooter, CardHeader, type CardProps, type CardSectionProps, CardTitle, type CardTitleProps, cardAnimationPresets, cardDescriptionVariants, cardFooterVariants, cardHeaderVariants, cardTitleVariants, cardVariants };
|
package/dist/ui/card.js
ADDED
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
// src/ui/card/card.tsx
|
|
5
|
+
import { createContext, useContext, useMemo } from "react";
|
|
6
|
+
import { motion } from "framer-motion";
|
|
7
|
+
|
|
8
|
+
// src/lib/utils.ts
|
|
9
|
+
import { clsx } from "clsx";
|
|
10
|
+
import { twMerge } from "tailwind-merge";
|
|
11
|
+
function cn(...inputs) {
|
|
12
|
+
return twMerge(clsx(inputs));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// src/ui/card/animations.ts
|
|
16
|
+
var cardAnimationPresets = {
|
|
17
|
+
none: {},
|
|
18
|
+
lift: {
|
|
19
|
+
whileHover: { y: -4, scale: 1.01 },
|
|
20
|
+
whileTap: { y: 0, scale: 0.995 },
|
|
21
|
+
transition: { type: "spring", stiffness: 380, damping: 26 }
|
|
22
|
+
},
|
|
23
|
+
glow: {
|
|
24
|
+
whileHover: {
|
|
25
|
+
boxShadow: "0 0 0 1px rgba(255,255,255,0.18), 0 22px 48px rgba(15,23,42,0.45)"
|
|
26
|
+
},
|
|
27
|
+
transition: { duration: 0.22, ease: "easeOut" }
|
|
28
|
+
},
|
|
29
|
+
tilt: {
|
|
30
|
+
whileHover: { rotateX: 4, rotateY: -4, scale: 1.01 },
|
|
31
|
+
whileTap: { rotateX: 0, rotateY: 0, scale: 0.99 },
|
|
32
|
+
transition: { type: "spring", stiffness: 280, damping: 22 },
|
|
33
|
+
style: { transformStyle: "preserve-3d" }
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
// src/ui/card/variants.ts
|
|
38
|
+
import { cva } from "class-variance-authority";
|
|
39
|
+
var cardVariants = cva(
|
|
40
|
+
[
|
|
41
|
+
"relative flex w-full flex-col overflow-hidden text-slate-50",
|
|
42
|
+
"ring-offset-slate-950 transition-colors",
|
|
43
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-300 focus-visible:ring-offset-2"
|
|
44
|
+
],
|
|
45
|
+
{
|
|
46
|
+
variants: {
|
|
47
|
+
appearance: {
|
|
48
|
+
default: "border border-white/10 bg-white/5 shadow-[0_1px_2px_rgba(15,23,42,0.12)]",
|
|
49
|
+
glass: "border border-white/15 bg-white/10 backdrop-blur-md shadow-[0_18px_48px_rgba(15,23,42,0.35)]",
|
|
50
|
+
outline: "border border-white/15 bg-transparent",
|
|
51
|
+
ghost: "border border-transparent bg-transparent",
|
|
52
|
+
elevated: "border border-white/10 bg-slate-900/80 shadow-[0_24px_64px_rgba(15,23,42,0.45)]",
|
|
53
|
+
sky: "border border-sky-600 bg-sky-950/70 backdrop-blur-xl",
|
|
54
|
+
rose: "border border-rose-600 bg-rose-950/70 backdrop-blur-xl",
|
|
55
|
+
purple: "border border-purple-600 bg-purple-950/70 backdrop-blur-xl",
|
|
56
|
+
pink: "border border-pink-600 bg-pink-950/70 backdrop-blur-xl",
|
|
57
|
+
orange: "border border-orange-600 bg-orange-950/70 backdrop-blur-xl",
|
|
58
|
+
yellow: "border border-yellow-600 bg-yellow-950/70 backdrop-blur-xl",
|
|
59
|
+
teal: "border border-teal-600 bg-teal-950/70 backdrop-blur-xl",
|
|
60
|
+
indigo: "border border-indigo-600 bg-indigo-950/70 backdrop-blur-xl",
|
|
61
|
+
emerald: "border border-emerald-600 bg-emerald-950/70 backdrop-blur-xl",
|
|
62
|
+
gray: "border border-gray-600 bg-gray-950/70 backdrop-blur-xl",
|
|
63
|
+
amber: "border border-amber-600 bg-amber-950/70 backdrop-blur-xl",
|
|
64
|
+
violet: "border border-violet-600 bg-violet-950/70 backdrop-blur-xl",
|
|
65
|
+
"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",
|
|
66
|
+
"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",
|
|
67
|
+
"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",
|
|
68
|
+
"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",
|
|
69
|
+
"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",
|
|
70
|
+
"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",
|
|
71
|
+
"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",
|
|
72
|
+
"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",
|
|
73
|
+
"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"
|
|
74
|
+
},
|
|
75
|
+
size: {
|
|
76
|
+
sm: "gap-2 p-3 text-sm",
|
|
77
|
+
md: "gap-3 p-4 text-sm",
|
|
78
|
+
lg: "gap-4 p-6 text-base"
|
|
79
|
+
},
|
|
80
|
+
rounded: {
|
|
81
|
+
sm: "rounded-lg",
|
|
82
|
+
md: "rounded-xl",
|
|
83
|
+
lg: "rounded-2xl",
|
|
84
|
+
full: "rounded-3xl"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
defaultVariants: {
|
|
88
|
+
appearance: "default",
|
|
89
|
+
size: "md",
|
|
90
|
+
rounded: "md"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
var cardHeaderVariants = cva(
|
|
95
|
+
"flex flex-col gap-1 border-b border-white/10 pb-3",
|
|
96
|
+
{
|
|
97
|
+
variants: {
|
|
98
|
+
size: {
|
|
99
|
+
sm: "pb-2",
|
|
100
|
+
md: "pb-3",
|
|
101
|
+
lg: "pb-4"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
defaultVariants: { size: "md" }
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
var cardFooterVariants = cva(
|
|
108
|
+
"flex flex-col gap-2 border-t border-white/10 pt-3",
|
|
109
|
+
{
|
|
110
|
+
variants: {
|
|
111
|
+
size: {
|
|
112
|
+
sm: "pt-2",
|
|
113
|
+
md: "pt-3",
|
|
114
|
+
lg: "pt-4"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
defaultVariants: { size: "md" }
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
var cardTitleVariants = cva("font-semibold tracking-tight text-slate-50", {
|
|
121
|
+
variants: {
|
|
122
|
+
size: {
|
|
123
|
+
sm: "text-sm",
|
|
124
|
+
md: "text-base",
|
|
125
|
+
lg: "text-lg"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
defaultVariants: { size: "md" }
|
|
129
|
+
});
|
|
130
|
+
var cardDescriptionVariants = cva("text-slate-400", {
|
|
131
|
+
variants: {
|
|
132
|
+
size: {
|
|
133
|
+
sm: "text-xs",
|
|
134
|
+
md: "text-sm",
|
|
135
|
+
lg: "text-base"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
defaultVariants: { size: "md" }
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
// src/ui/card/card.tsx
|
|
142
|
+
import { jsx } from "react/jsx-runtime";
|
|
143
|
+
var CardSizeContext = createContext("md");
|
|
144
|
+
function useCardSize() {
|
|
145
|
+
return useContext(CardSizeContext);
|
|
146
|
+
}
|
|
147
|
+
function Card(props) {
|
|
148
|
+
const {
|
|
149
|
+
className,
|
|
150
|
+
appearance,
|
|
151
|
+
size = "md",
|
|
152
|
+
rounded,
|
|
153
|
+
animation = "none",
|
|
154
|
+
children,
|
|
155
|
+
ref,
|
|
156
|
+
...rest
|
|
157
|
+
} = props;
|
|
158
|
+
const motionProps = cardAnimationPresets[animation];
|
|
159
|
+
const ctx = useMemo(() => size ?? "md", [size]);
|
|
160
|
+
return /* @__PURE__ */ jsx(CardSizeContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx(
|
|
161
|
+
motion.article,
|
|
162
|
+
{
|
|
163
|
+
ref,
|
|
164
|
+
"data-slot": "card",
|
|
165
|
+
className: cn(cardVariants({ appearance, size, rounded }), className),
|
|
166
|
+
initial: false,
|
|
167
|
+
...motionProps,
|
|
168
|
+
...rest,
|
|
169
|
+
children
|
|
170
|
+
}
|
|
171
|
+
) });
|
|
172
|
+
}
|
|
173
|
+
Card.displayName = "Card";
|
|
174
|
+
function CardHeader({ className, children }) {
|
|
175
|
+
const size = useCardSize();
|
|
176
|
+
return /* @__PURE__ */ jsx(
|
|
177
|
+
"header",
|
|
178
|
+
{
|
|
179
|
+
"data-slot": "card-header",
|
|
180
|
+
className: cn(cardHeaderVariants({ size }), className),
|
|
181
|
+
children
|
|
182
|
+
}
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
CardHeader.displayName = "CardHeader";
|
|
186
|
+
function CardBody({ className, children }) {
|
|
187
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "card-body", className: cn("flex flex-1 flex-col gap-2", className), children });
|
|
188
|
+
}
|
|
189
|
+
CardBody.displayName = "CardBody";
|
|
190
|
+
function CardFooter({ className, children }) {
|
|
191
|
+
const size = useCardSize();
|
|
192
|
+
return /* @__PURE__ */ jsx(
|
|
193
|
+
"footer",
|
|
194
|
+
{
|
|
195
|
+
"data-slot": "card-footer",
|
|
196
|
+
className: cn(cardFooterVariants({ size }), className),
|
|
197
|
+
children
|
|
198
|
+
}
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
CardFooter.displayName = "CardFooter";
|
|
202
|
+
function CardTitle({
|
|
203
|
+
className,
|
|
204
|
+
children,
|
|
205
|
+
as = "h3",
|
|
206
|
+
ref,
|
|
207
|
+
...rest
|
|
208
|
+
}) {
|
|
209
|
+
const size = useCardSize();
|
|
210
|
+
const Tag = as;
|
|
211
|
+
return /* @__PURE__ */ jsx(
|
|
212
|
+
Tag,
|
|
213
|
+
{
|
|
214
|
+
ref,
|
|
215
|
+
"data-slot": "card-title",
|
|
216
|
+
className: cn(cardTitleVariants({ size }), className),
|
|
217
|
+
...rest,
|
|
218
|
+
children
|
|
219
|
+
}
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
CardTitle.displayName = "CardTitle";
|
|
223
|
+
function CardDescription({
|
|
224
|
+
className,
|
|
225
|
+
children,
|
|
226
|
+
as = "p",
|
|
227
|
+
ref,
|
|
228
|
+
...rest
|
|
229
|
+
}) {
|
|
230
|
+
const size = useCardSize();
|
|
231
|
+
const Tag = as;
|
|
232
|
+
return /* @__PURE__ */ jsx(
|
|
233
|
+
Tag,
|
|
234
|
+
{
|
|
235
|
+
ref,
|
|
236
|
+
"data-slot": "card-description",
|
|
237
|
+
className: cn(cardDescriptionVariants({ size }), className),
|
|
238
|
+
...rest,
|
|
239
|
+
children
|
|
240
|
+
}
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
CardDescription.displayName = "CardDescription";
|
|
244
|
+
export {
|
|
245
|
+
Card,
|
|
246
|
+
CardBody,
|
|
247
|
+
CardDescription,
|
|
248
|
+
CardFooter,
|
|
249
|
+
CardHeader,
|
|
250
|
+
CardTitle,
|
|
251
|
+
cardAnimationPresets,
|
|
252
|
+
cardDescriptionVariants,
|
|
253
|
+
cardFooterVariants,
|
|
254
|
+
cardHeaderVariants,
|
|
255
|
+
cardTitleVariants,
|
|
256
|
+
cardVariants
|
|
257
|
+
};
|
|
258
|
+
//# sourceMappingURL=card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/ui/card/card.tsx","../../src/lib/utils.ts","../../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 ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\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;;;ACHvB,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACMO,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,E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 +1,229 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/ui/divider/index.ts
|
|
21
|
+
var divider_exports = {};
|
|
22
|
+
__export(divider_exports, {
|
|
23
|
+
Divider: () => Divider,
|
|
24
|
+
dividerAnimationPresets: () => dividerAnimationPresets,
|
|
25
|
+
dividerLabelVariants: () => dividerLabelVariants,
|
|
26
|
+
dividerLineVariants: () => dividerLineVariants,
|
|
27
|
+
dividerToneVariants: () => dividerToneVariants,
|
|
28
|
+
dividerVariants: () => dividerVariants
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(divider_exports);
|
|
31
|
+
|
|
32
|
+
// src/ui/divider/divider.tsx
|
|
33
|
+
var import_framer_motion = require("framer-motion");
|
|
34
|
+
|
|
35
|
+
// src/lib/utils.ts
|
|
36
|
+
var import_clsx = require("clsx");
|
|
37
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
38
|
+
function cn(...inputs) {
|
|
39
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// src/ui/divider/animations.ts
|
|
43
|
+
var dividerAnimationPresets = {
|
|
44
|
+
none: {},
|
|
45
|
+
expand: {
|
|
46
|
+
initial: { scaleX: 0.6, opacity: 0.4 },
|
|
47
|
+
animate: { scaleX: 1, opacity: 1 },
|
|
48
|
+
transition: { duration: 0.35, ease: "easeOut" }
|
|
49
|
+
},
|
|
50
|
+
fade: {
|
|
51
|
+
initial: { opacity: 0 },
|
|
52
|
+
animate: { opacity: 1 },
|
|
53
|
+
transition: { duration: 0.25 }
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
// src/ui/divider/variants.ts
|
|
58
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
59
|
+
var APPEARANCES = {
|
|
60
|
+
default: "text-slate-200",
|
|
61
|
+
muted: "text-slate-500",
|
|
62
|
+
primary: "text-cyan-300",
|
|
63
|
+
destructive: "text-rose-400",
|
|
64
|
+
ghost: "text-slate-600",
|
|
65
|
+
sky: "text-sky-400",
|
|
66
|
+
rose: "text-rose-400",
|
|
67
|
+
purple: "text-purple-400",
|
|
68
|
+
pink: "text-pink-400",
|
|
69
|
+
orange: "text-orange-400",
|
|
70
|
+
yellow: "text-yellow-400",
|
|
71
|
+
teal: "text-teal-400",
|
|
72
|
+
indigo: "text-indigo-400",
|
|
73
|
+
emerald: "text-emerald-400",
|
|
74
|
+
gray: "text-gray-400",
|
|
75
|
+
amber: "text-amber-400",
|
|
76
|
+
violet: "text-violet-400",
|
|
77
|
+
"gradient-blue": "text-blue-400",
|
|
78
|
+
"gradient-green": "text-green-400",
|
|
79
|
+
"gradient-red": "text-red-400",
|
|
80
|
+
"gradient-yellow": "text-yellow-400",
|
|
81
|
+
"gradient-purple": "text-purple-400",
|
|
82
|
+
"gradient-teal": "text-teal-400",
|
|
83
|
+
"gradient-indigo": "text-indigo-400",
|
|
84
|
+
"gradient-pink": "text-pink-400",
|
|
85
|
+
"gradient-orange": "text-orange-400"
|
|
86
|
+
};
|
|
87
|
+
var dividerToneVariants = (0, import_class_variance_authority.cva)("", {
|
|
88
|
+
variants: {
|
|
89
|
+
appearance: APPEARANCES
|
|
90
|
+
},
|
|
91
|
+
defaultVariants: { appearance: "default" }
|
|
92
|
+
});
|
|
93
|
+
var dividerVariants = (0, import_class_variance_authority.cva)("flex w-full items-center gap-3", {
|
|
94
|
+
variants: {
|
|
95
|
+
appearance: APPEARANCES,
|
|
96
|
+
orientation: {
|
|
97
|
+
horizontal: "w-full flex-row",
|
|
98
|
+
vertical: "h-full min-h-[2rem] w-auto flex-col self-stretch"
|
|
99
|
+
},
|
|
100
|
+
size: {
|
|
101
|
+
sm: "",
|
|
102
|
+
md: "",
|
|
103
|
+
lg: ""
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
compoundVariants: [
|
|
107
|
+
{ orientation: "horizontal", size: "sm", class: "min-h-px" },
|
|
108
|
+
{ orientation: "horizontal", size: "md", class: "min-h-[2px]" },
|
|
109
|
+
{ orientation: "horizontal", size: "lg", class: "min-h-[3px]" },
|
|
110
|
+
{ orientation: "vertical", size: "sm", class: "min-w-px" },
|
|
111
|
+
{ orientation: "vertical", size: "md", class: "min-w-[2px]" },
|
|
112
|
+
{ orientation: "vertical", size: "lg", class: "min-w-[3px]" }
|
|
113
|
+
],
|
|
114
|
+
defaultVariants: {
|
|
115
|
+
appearance: "default",
|
|
116
|
+
orientation: "horizontal",
|
|
117
|
+
size: "md"
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
var dividerLineVariants = (0, import_class_variance_authority.cva)(
|
|
121
|
+
"shrink grow rounded-full bg-current opacity-80",
|
|
122
|
+
{
|
|
123
|
+
variants: {
|
|
124
|
+
orientation: {
|
|
125
|
+
horizontal: "h-px",
|
|
126
|
+
vertical: "w-px flex-1"
|
|
127
|
+
},
|
|
128
|
+
size: {
|
|
129
|
+
sm: "",
|
|
130
|
+
md: "",
|
|
131
|
+
lg: ""
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
compoundVariants: [
|
|
135
|
+
{ orientation: "horizontal", size: "sm", class: "h-px" },
|
|
136
|
+
{ orientation: "horizontal", size: "md", class: "h-0.5" },
|
|
137
|
+
{ orientation: "horizontal", size: "lg", class: "h-1" },
|
|
138
|
+
{ orientation: "vertical", size: "sm", class: "w-px" },
|
|
139
|
+
{ orientation: "vertical", size: "md", class: "w-0.5" },
|
|
140
|
+
{ orientation: "vertical", size: "lg", class: "w-1" }
|
|
141
|
+
],
|
|
142
|
+
defaultVariants: {
|
|
143
|
+
orientation: "horizontal",
|
|
144
|
+
size: "md"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
);
|
|
148
|
+
var dividerLabelVariants = (0, import_class_variance_authority.cva)(
|
|
149
|
+
"shrink-0 text-xs font-medium uppercase tracking-wide text-current"
|
|
150
|
+
);
|
|
151
|
+
|
|
152
|
+
// src/ui/divider/divider.tsx
|
|
153
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
154
|
+
function Divider(props) {
|
|
155
|
+
const {
|
|
156
|
+
className,
|
|
157
|
+
appearance,
|
|
158
|
+
orientation,
|
|
159
|
+
size,
|
|
160
|
+
animation = "none",
|
|
161
|
+
label,
|
|
162
|
+
children,
|
|
163
|
+
ref,
|
|
164
|
+
...rest
|
|
165
|
+
} = props;
|
|
166
|
+
const motionProps = dividerAnimationPresets[animation];
|
|
167
|
+
const slot = label ?? children;
|
|
168
|
+
if (!slot) {
|
|
169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
170
|
+
import_framer_motion.motion.div,
|
|
171
|
+
{
|
|
172
|
+
ref,
|
|
173
|
+
"data-slot": "divider",
|
|
174
|
+
role: "separator",
|
|
175
|
+
"aria-orientation": orientation === "vertical" ? "vertical" : "horizontal",
|
|
176
|
+
className: cn(
|
|
177
|
+
dividerToneVariants({ appearance }),
|
|
178
|
+
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",
|
|
179
|
+
className
|
|
180
|
+
),
|
|
181
|
+
initial: animation === "none" ? false : void 0,
|
|
182
|
+
...motionProps,
|
|
183
|
+
...rest,
|
|
184
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: cn(dividerLineVariants({ orientation, size })), "aria-hidden": true })
|
|
185
|
+
}
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
189
|
+
import_framer_motion.motion.div,
|
|
190
|
+
{
|
|
191
|
+
ref,
|
|
192
|
+
"data-slot": "divider",
|
|
193
|
+
role: "separator",
|
|
194
|
+
"aria-orientation": orientation === "vertical" ? "vertical" : "horizontal",
|
|
195
|
+
className: cn(dividerVariants({ appearance, orientation, size }), className),
|
|
196
|
+
initial: animation === "none" ? false : void 0,
|
|
197
|
+
...motionProps,
|
|
198
|
+
...rest,
|
|
199
|
+
children: [
|
|
200
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
201
|
+
"span",
|
|
202
|
+
{
|
|
203
|
+
className: cn(dividerLineVariants({ orientation, size })),
|
|
204
|
+
"aria-hidden": true
|
|
205
|
+
}
|
|
206
|
+
),
|
|
207
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "data-slot": "divider-label", className: dividerLabelVariants(), children: slot }),
|
|
208
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
209
|
+
"span",
|
|
210
|
+
{
|
|
211
|
+
className: cn(dividerLineVariants({ orientation, size })),
|
|
212
|
+
"aria-hidden": true
|
|
213
|
+
}
|
|
214
|
+
)
|
|
215
|
+
]
|
|
216
|
+
}
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
Divider.displayName = "Divider";
|
|
220
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
221
|
+
0 && (module.exports = {
|
|
222
|
+
Divider,
|
|
223
|
+
dividerAnimationPresets,
|
|
224
|
+
dividerLabelVariants,
|
|
225
|
+
dividerLineVariants,
|
|
226
|
+
dividerToneVariants,
|
|
227
|
+
dividerVariants
|
|
228
|
+
});
|
|
229
|
+
//# sourceMappingURL=divider.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/ui/divider/index.ts","../../src/ui/divider/divider.tsx","../../src/lib/utils.ts","../../src/ui/divider/animations.ts","../../src/ui/divider/variants.ts"],"sourcesContent":["export { Divider } from \"./divider\";\nexport type { DividerAnimation, DividerProps } from \"./types\";\nexport { dividerAnimationPresets } from \"./animations\";\nexport {\n dividerVariants,\n dividerToneVariants,\n dividerLineVariants,\n dividerLabelVariants,\n} from \"./variants\";\n","\"use client\";\n\nimport { motion } from \"framer-motion\";\n\nimport { cn } from \"../../lib/utils\";\n\nimport { dividerAnimationPresets } from \"./animations\";\nimport type { DividerProps } from \"./types\";\nimport {\n dividerLabelVariants,\n dividerLineVariants,\n dividerToneVariants,\n dividerVariants,\n} from \"./variants\";\n\nexport function Divider(props: DividerProps) {\n const {\n className,\n appearance,\n orientation,\n size,\n animation = \"none\",\n label,\n children,\n ref,\n ...rest\n } = props;\n const motionProps = dividerAnimationPresets[animation];\n const slot = label ?? children;\n\n if (!slot) {\n return (\n <motion.div\n ref={ref}\n data-slot=\"divider\"\n role=\"separator\"\n aria-orientation={orientation === \"vertical\" ? \"vertical\" : \"horizontal\"}\n className={cn(\n dividerToneVariants({ appearance }),\n orientation === \"horizontal\"\n ? \"flex w-full min-h-px flex-row items-stretch\"\n : \"flex h-full min-h-8 w-auto min-w-0 flex-col items-stretch self-stretch\",\n className,\n )}\n initial={animation === \"none\" ? false : undefined}\n {...motionProps}\n {...rest}\n >\n <span className={cn(dividerLineVariants({ orientation, size }))} aria-hidden />\n </motion.div>\n );\n }\n\n return (\n <motion.div\n ref={ref}\n data-slot=\"divider\"\n role=\"separator\"\n aria-orientation={orientation === \"vertical\" ? \"vertical\" : \"horizontal\"}\n className={cn(dividerVariants({ appearance, orientation, size }), className)}\n initial={animation === \"none\" ? false : undefined}\n {...motionProps}\n {...rest}\n >\n <span\n className={cn(dividerLineVariants({ orientation, size }))}\n aria-hidden\n />\n <span data-slot=\"divider-label\" className={dividerLabelVariants()}>\n {slot}\n </span>\n <span\n className={cn(dividerLineVariants({ orientation, size }))}\n aria-hidden\n />\n </motion.div>\n );\n}\n\nDivider.displayName = \"Divider\";\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}","import type { HTMLMotionProps } from \"framer-motion\";\n\nimport type { DividerAnimation } from \"./types\";\n\ntype DividerPresetMotionProps = Pick<\n HTMLMotionProps<\"div\">,\n \"initial\" | \"animate\" | \"transition\" | \"whileHover\"\n>;\n\nexport type DividerAnimationPresets = Record<\n DividerAnimation,\n DividerPresetMotionProps\n>;\n\nexport const dividerAnimationPresets: DividerAnimationPresets = {\n none: {},\n expand: {\n initial: { scaleX: 0.6, opacity: 0.4 },\n animate: { scaleX: 1, opacity: 1 },\n transition: { duration: 0.35, ease: \"easeOut\" },\n },\n fade: {\n initial: { opacity: 0 },\n animate: { opacity: 1 },\n transition: { duration: 0.25 },\n },\n};\n","import { cva } from \"class-variance-authority\";\n\nconst APPEARANCES = {\n default: \"text-slate-200\",\n muted: \"text-slate-500\",\n primary: \"text-cyan-300\",\n destructive: \"text-rose-400\",\n ghost: \"text-slate-600\",\n sky: \"text-sky-400\",\n rose: \"text-rose-400\",\n purple: \"text-purple-400\",\n pink: \"text-pink-400\",\n orange: \"text-orange-400\",\n yellow: \"text-yellow-400\",\n teal: \"text-teal-400\",\n indigo: \"text-indigo-400\",\n emerald: \"text-emerald-400\",\n gray: \"text-gray-400\",\n amber: \"text-amber-400\",\n violet: \"text-violet-400\",\n \"gradient-blue\": \"text-blue-400\",\n \"gradient-green\": \"text-green-400\",\n \"gradient-red\": \"text-red-400\",\n \"gradient-yellow\": \"text-yellow-400\",\n \"gradient-purple\": \"text-purple-400\",\n \"gradient-teal\": \"text-teal-400\",\n \"gradient-indigo\": \"text-indigo-400\",\n \"gradient-pink\": \"text-pink-400\",\n \"gradient-orange\": \"text-orange-400\",\n};\n\nexport const dividerToneVariants = cva(\"\", {\n variants: {\n appearance: APPEARANCES,\n },\n defaultVariants: { appearance: \"default\" },\n});\n\nexport const dividerVariants = cva(\"flex w-full items-center gap-3\", {\n variants: {\n appearance: APPEARANCES,\n orientation: {\n horizontal: \"w-full flex-row\",\n vertical: \"h-full min-h-[2rem] w-auto flex-col self-stretch\",\n },\n size: {\n sm: \"\",\n md: \"\",\n lg: \"\",\n },\n },\n compoundVariants: [\n { orientation: \"horizontal\", size: \"sm\", class: \"min-h-px\" },\n { orientation: \"horizontal\", size: \"md\", class: \"min-h-[2px]\" },\n { orientation: \"horizontal\", size: \"lg\", class: \"min-h-[3px]\" },\n { orientation: \"vertical\", size: \"sm\", class: \"min-w-px\" },\n { orientation: \"vertical\", size: \"md\", class: \"min-w-[2px]\" },\n { orientation: \"vertical\", size: \"lg\", class: \"min-w-[3px]\" },\n ],\n defaultVariants: {\n appearance: \"default\",\n orientation: \"horizontal\",\n size: \"md\",\n },\n});\n\nexport const dividerLineVariants = cva(\n \"shrink grow rounded-full bg-current opacity-80\",\n {\n variants: {\n orientation: {\n horizontal: \"h-px\",\n vertical: \"w-px flex-1\",\n },\n size: {\n sm: \"\",\n md: \"\",\n lg: \"\",\n },\n },\n compoundVariants: [\n { orientation: \"horizontal\", size: \"sm\", class: \"h-px\" },\n { orientation: \"horizontal\", size: \"md\", class: \"h-0.5\" },\n { orientation: \"horizontal\", size: \"lg\", class: \"h-1\" },\n { orientation: \"vertical\", size: \"sm\", class: \"w-px\" },\n { orientation: \"vertical\", size: \"md\", class: \"w-0.5\" },\n { orientation: \"vertical\", size: \"lg\", class: \"w-1\" },\n ],\n defaultVariants: {\n orientation: \"horizontal\",\n size: \"md\",\n },\n },\n);\n\nexport const dividerLabelVariants = cva(\n \"shrink-0 text-xs font-medium uppercase tracking-wide text-current\",\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,2BAAuB;;;ACFvB,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ACSO,IAAM,0BAAmD;AAAA,EAC9D,MAAM,CAAC;AAAA,EACP,QAAQ;AAAA,IACN,SAAS,EAAE,QAAQ,KAAK,SAAS,IAAI;AAAA,IACrC,SAAS,EAAE,QAAQ,GAAG,SAAS,EAAE;AAAA,IACjC,YAAY,EAAE,UAAU,MAAM,MAAM,UAAU;AAAA,EAChD;AAAA,EACA,MAAM;AAAA,IACJ,SAAS,EAAE,SAAS,EAAE;AAAA,IACtB,SAAS,EAAE,SAAS,EAAE;AAAA,IACtB,YAAY,EAAE,UAAU,KAAK;AAAA,EAC/B;AACF;;;AC1BA,sCAAoB;AAEpB,IAAM,cAAc;AAAA,EAClB,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AAAA,EACT,aAAa;AAAA,EACb,OAAO;AAAA,EACP,KAAK;AAAA,EACL,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,mBAAmB;AACrB;AAEO,IAAM,0BAAsB,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MAEJ;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,GAAG,oBAAoB,EAAE,aAAa,KAAK,CAAC,CAAC;AAAA,YACxD,eAAW;AAAA;AAAA,QACb;AAAA,QACA,4CAAC,UAAK,aAAU,iBAAgB,WAAW,qBAAqB,GAC7D,gBACH;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,GAAG,oBAAoB,EAAE,aAAa,KAAK,CAAC,CAAC;AAAA,YACxD,eAAW;AAAA;AAAA,QACb;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,QAAQ,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" | "ghost" | "sky" | "rose" | "purple" | "pink" | "orange" | "yellow" | "teal" | "indigo" | "emerald" | "gradient-blue" | "gradient-green" | "gradient-red" | "gradient-yellow" | "gradient-purple" | "gradient-teal" | "gradient-indigo" | "gradient-pink" | "gradient-orange" | "gray" | "violet" | "destructive" | "amber" | "muted" | "primary" | null | undefined;
|
|
9
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
|
+
declare const dividerVariants: (props?: ({
|
|
11
|
+
appearance?: "default" | "ghost" | "sky" | "rose" | "purple" | "pink" | "orange" | "yellow" | "teal" | "indigo" | "emerald" | "gradient-blue" | "gradient-green" | "gradient-red" | "gradient-yellow" | "gradient-purple" | "gradient-teal" | "gradient-indigo" | "gradient-pink" | "gradient-orange" | "gray" | "violet" | "destructive" | "amber" | "muted" | "primary" | 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 };
|