@zentauri-ui/zentauri-components 0.0.84 → 0.0.91
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/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 -1
|
@@ -0,0 +1,37 @@
|
|
|
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 { MouseEventHandler, ReactNode } from 'react';
|
|
5
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
|
+
|
|
7
|
+
declare const badgeVariants: (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" | "secondary" | "destructive" | "glass" | null | undefined;
|
|
9
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
10
|
+
shape?: "pill" | "square" | "dot" | null | undefined;
|
|
11
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
12
|
+
declare const badgeCloseButtonVariants: (props?: ({
|
|
13
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
14
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
|
+
|
|
16
|
+
type BadgeAnimation = "none" | "pop" | "bounce" | "fade";
|
|
17
|
+
type BadgeVariantProps = VariantProps<typeof badgeVariants>;
|
|
18
|
+
type BadgeProps = BadgeVariantProps & Omit<HTMLMotionProps<"span">, "children"> & {
|
|
19
|
+
animation?: BadgeAnimation;
|
|
20
|
+
closable?: boolean;
|
|
21
|
+
onClose?: MouseEventHandler<HTMLButtonElement>;
|
|
22
|
+
closeLabel?: string;
|
|
23
|
+
children?: ReactNode;
|
|
24
|
+
/** Dot shape hides text; set for accessibility. */
|
|
25
|
+
"aria-label"?: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
declare function Badge(props: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
29
|
+
declare namespace Badge {
|
|
30
|
+
var displayName: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
type BadgePresetMotionProps = Pick<HTMLMotionProps<"span">, "style" | "transition" | "whileHover" | "whileTap" | "animate" | "initial">;
|
|
34
|
+
type BadgeAnimationPresets = Record<BadgeAnimation, BadgePresetMotionProps>;
|
|
35
|
+
declare const badgeAnimationPresets: BadgeAnimationPresets;
|
|
36
|
+
|
|
37
|
+
export { Badge, type BadgeAnimation, type BadgeProps, badgeAnimationPresets, badgeCloseButtonVariants, badgeVariants };
|
package/dist/ui/badge.js
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
// src/ui/badge/badge.tsx
|
|
5
|
+
import { motion } from "framer-motion";
|
|
6
|
+
import { HiXMark } from "react-icons/hi2";
|
|
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/badge/animations.ts
|
|
16
|
+
var badgeAnimationPresets = {
|
|
17
|
+
none: {},
|
|
18
|
+
pop: {
|
|
19
|
+
initial: { scale: 0.92, opacity: 0 },
|
|
20
|
+
animate: { scale: 1, opacity: 1 },
|
|
21
|
+
transition: { type: "spring", stiffness: 520, damping: 28 }
|
|
22
|
+
},
|
|
23
|
+
bounce: {
|
|
24
|
+
whileHover: { y: -2, scale: 1.04 },
|
|
25
|
+
whileTap: { scale: 0.96 },
|
|
26
|
+
transition: { type: "spring", bounce: 0.45, stiffness: 420, damping: 18 }
|
|
27
|
+
},
|
|
28
|
+
fade: {
|
|
29
|
+
initial: { opacity: 0 },
|
|
30
|
+
animate: { opacity: 1 },
|
|
31
|
+
transition: { duration: 0.2 }
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// src/ui/badge/variants.ts
|
|
36
|
+
import { cva } from "class-variance-authority";
|
|
37
|
+
var buttonLikeSolidAppearances = {
|
|
38
|
+
default: "bg-slate-50 text-slate-950 shadow-[0_1px_2px_rgba(15,23,42,0.12)]",
|
|
39
|
+
secondary: "bg-slate-800 text-slate-50",
|
|
40
|
+
destructive: "bg-rose-600 text-white",
|
|
41
|
+
outline: "border border-white/10 bg-white/5 text-slate-50",
|
|
42
|
+
ghost: "bg-transparent text-slate-200",
|
|
43
|
+
glass: "border border-white/15 bg-white/10 text-white backdrop-blur-md",
|
|
44
|
+
emerald: "bg-emerald-600 text-white",
|
|
45
|
+
indigo: "bg-indigo-600 text-white",
|
|
46
|
+
purple: "bg-purple-600 text-white",
|
|
47
|
+
pink: "bg-pink-600 text-white",
|
|
48
|
+
rose: "bg-rose-600 text-white",
|
|
49
|
+
sky: "bg-sky-600 text-white",
|
|
50
|
+
teal: "bg-teal-600 text-white",
|
|
51
|
+
yellow: "bg-yellow-600 text-white",
|
|
52
|
+
orange: "bg-orange-600 text-white",
|
|
53
|
+
"gradient-blue": "bg-gradient-to-r from-blue-600 to-purple-600 text-white",
|
|
54
|
+
"gradient-green": "bg-gradient-to-r from-green-600 to-lime-600 text-white",
|
|
55
|
+
"gradient-red": "bg-gradient-to-r from-red-600 to-pink-600 text-white",
|
|
56
|
+
"gradient-yellow": "bg-gradient-to-r from-yellow-600 to-orange-600 text-white",
|
|
57
|
+
"gradient-purple": "bg-gradient-to-r from-purple-600 to-pink-600 text-white",
|
|
58
|
+
"gradient-teal": "bg-gradient-to-r from-teal-600 to-cyan-600 text-white",
|
|
59
|
+
"gradient-indigo": "bg-gradient-to-r from-indigo-600 to-purple-600 text-white",
|
|
60
|
+
"gradient-pink": "bg-gradient-to-r from-pink-600 to-rose-600 text-white",
|
|
61
|
+
"gradient-orange": "bg-gradient-to-r from-orange-600 to-red-600 text-white"
|
|
62
|
+
};
|
|
63
|
+
var badgeAppearances = {
|
|
64
|
+
...buttonLikeSolidAppearances,
|
|
65
|
+
outline: "border border-white/15 bg-transparent text-slate-200 shadow-none",
|
|
66
|
+
ghost: "bg-transparent text-slate-300 shadow-none"
|
|
67
|
+
};
|
|
68
|
+
var badgeVariants = cva(
|
|
69
|
+
[
|
|
70
|
+
"inline-flex max-w-full items-center justify-center gap-1 font-medium",
|
|
71
|
+
"whitespace-nowrap ring-offset-slate-950 transition-colors",
|
|
72
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-300 focus-visible:ring-offset-2",
|
|
73
|
+
"select-none"
|
|
74
|
+
],
|
|
75
|
+
{
|
|
76
|
+
variants: {
|
|
77
|
+
appearance: badgeAppearances,
|
|
78
|
+
size: {
|
|
79
|
+
sm: "h-6 min-h-6 px-2 text-[0.65rem] leading-none",
|
|
80
|
+
md: "h-7 min-h-7 px-2.5 text-xs leading-none",
|
|
81
|
+
lg: "h-8 min-h-8 px-3 text-sm leading-none"
|
|
82
|
+
},
|
|
83
|
+
shape: {
|
|
84
|
+
pill: "rounded-full",
|
|
85
|
+
square: "rounded-md",
|
|
86
|
+
dot: "h-2.5 min-h-2.5 w-2.5 min-w-2.5 rounded-full p-0 px-0 text-[0]"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
defaultVariants: {
|
|
90
|
+
appearance: "default",
|
|
91
|
+
size: "md",
|
|
92
|
+
shape: "pill"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
var badgeCloseButtonVariants = cva(
|
|
97
|
+
"inline-flex shrink-0 items-center justify-center rounded-md p-0.5 text-current opacity-70 transition hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40",
|
|
98
|
+
{
|
|
99
|
+
variants: {
|
|
100
|
+
size: {
|
|
101
|
+
sm: "size-4",
|
|
102
|
+
md: "size-5",
|
|
103
|
+
lg: "size-6"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
defaultVariants: { size: "md" }
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
// src/ui/badge/badge.tsx
|
|
111
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
112
|
+
function Badge(props) {
|
|
113
|
+
const {
|
|
114
|
+
className,
|
|
115
|
+
appearance,
|
|
116
|
+
size,
|
|
117
|
+
shape,
|
|
118
|
+
animation = "none",
|
|
119
|
+
closable = false,
|
|
120
|
+
onClose,
|
|
121
|
+
closeLabel = "Remove",
|
|
122
|
+
children,
|
|
123
|
+
ref,
|
|
124
|
+
"aria-label": ariaLabel,
|
|
125
|
+
...rest
|
|
126
|
+
} = props;
|
|
127
|
+
const motionProps = badgeAnimationPresets[animation];
|
|
128
|
+
const isDot = shape === "dot";
|
|
129
|
+
const resolvedAriaLabel = ariaLabel ?? (isDot ? "Status indicator" : void 0);
|
|
130
|
+
return /* @__PURE__ */ jsxs(
|
|
131
|
+
motion.span,
|
|
132
|
+
{
|
|
133
|
+
ref,
|
|
134
|
+
role: "status",
|
|
135
|
+
"data-slot": "badge",
|
|
136
|
+
"aria-label": resolvedAriaLabel,
|
|
137
|
+
className: cn(badgeVariants({ appearance, size, shape }), className),
|
|
138
|
+
initial: animation === "none" ? false : void 0,
|
|
139
|
+
...motionProps,
|
|
140
|
+
...rest,
|
|
141
|
+
children: [
|
|
142
|
+
!isDot ? children : null,
|
|
143
|
+
closable ? /* @__PURE__ */ jsx(
|
|
144
|
+
"button",
|
|
145
|
+
{
|
|
146
|
+
type: "button",
|
|
147
|
+
"data-slot": "badge-close",
|
|
148
|
+
"aria-label": closeLabel,
|
|
149
|
+
onClick: onClose,
|
|
150
|
+
className: badgeCloseButtonVariants({ size }),
|
|
151
|
+
children: /* @__PURE__ */ jsx(HiXMark, { className: "size-3.5", "aria-hidden": true })
|
|
152
|
+
}
|
|
153
|
+
) : null
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
Badge.displayName = "Badge";
|
|
159
|
+
export {
|
|
160
|
+
Badge,
|
|
161
|
+
badgeAnimationPresets,
|
|
162
|
+
badgeCloseButtonVariants,
|
|
163
|
+
badgeVariants
|
|
164
|
+
};
|
|
165
|
+
//# sourceMappingURL=badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/ui/badge/badge.tsx","../../src/lib/utils.ts","../../src/ui/badge/animations.ts","../../src/ui/badge/variants.ts"],"sourcesContent":["\"use client\";\n\nimport { motion } from \"framer-motion\";\nimport { HiXMark } from \"react-icons/hi2\";\n\nimport { cn } from \"../../lib/utils\";\n\nimport { badgeAnimationPresets } from \"./animations\";\nimport type { BadgeProps } from \"./types\";\nimport { badgeCloseButtonVariants, badgeVariants } from \"./variants\";\n\nexport function Badge(props: BadgeProps) {\n const {\n className,\n appearance,\n size,\n shape,\n animation = \"none\",\n closable = false,\n onClose,\n closeLabel = \"Remove\",\n children,\n ref,\n \"aria-label\": ariaLabel,\n ...rest\n } = props;\n const motionProps = badgeAnimationPresets[animation];\n const isDot = shape === \"dot\";\n const resolvedAriaLabel =\n ariaLabel ?? (isDot ? \"Status indicator\" : undefined);\n\n return (\n <motion.span\n ref={ref}\n role=\"status\"\n data-slot=\"badge\"\n aria-label={resolvedAriaLabel}\n className={cn(badgeVariants({ appearance, size, shape }), className)}\n initial={animation === \"none\" ? false : undefined}\n {...motionProps}\n {...rest}\n >\n {!isDot ? children : null}\n {closable ? (\n <button\n type=\"button\"\n data-slot=\"badge-close\"\n aria-label={closeLabel}\n onClick={onClose}\n className={badgeCloseButtonVariants({ size })}\n >\n <HiXMark className=\"size-3.5\" aria-hidden />\n </button>\n ) : null}\n </motion.span>\n );\n}\n\nBadge.displayName = \"Badge\";\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 { BadgeAnimation } from \"./types\";\n\ntype BadgePresetMotionProps = Pick<\n HTMLMotionProps<\"span\">,\n \"style\" | \"transition\" | \"whileHover\" | \"whileTap\" | \"animate\" | \"initial\"\n>;\n\nexport type BadgeAnimationPresets = Record<\n BadgeAnimation,\n BadgePresetMotionProps\n>;\n\nexport const badgeAnimationPresets: BadgeAnimationPresets = {\n none: {},\n pop: {\n initial: { scale: 0.92, opacity: 0 },\n animate: { scale: 1, opacity: 1 },\n transition: { type: \"spring\", stiffness: 520, damping: 28 },\n },\n bounce: {\n whileHover: { y: -2, scale: 1.04 },\n whileTap: { scale: 0.96 },\n transition: { type: \"spring\", bounce: 0.45, stiffness: 420, damping: 18 },\n },\n fade: {\n initial: { opacity: 0 },\n animate: { opacity: 1 },\n transition: { duration: 0.2 },\n },\n};\n","import { cva } from \"class-variance-authority\";\n\n/**\n * Tailwind class maps mirroring `buttons/variants.ts` appearance tokens.\n * Reused by primitives that should stay visually aligned with Button.\n */\nexport const buttonLikeSolidAppearances = {\n default:\n \"bg-slate-50 text-slate-950 shadow-[0_1px_2px_rgba(15,23,42,0.12)]\",\n secondary: \"bg-slate-800 text-slate-50\",\n destructive: \"bg-rose-600 text-white\",\n outline: \"border border-white/10 bg-white/5 text-slate-50\",\n ghost: \"bg-transparent text-slate-200\",\n glass: \"border border-white/15 bg-white/10 text-white backdrop-blur-md\",\n emerald: \"bg-emerald-600 text-white\",\n indigo: \"bg-indigo-600 text-white\",\n purple: \"bg-purple-600 text-white\",\n pink: \"bg-pink-600 text-white\",\n rose: \"bg-rose-600 text-white\",\n sky: \"bg-sky-600 text-white\",\n teal: \"bg-teal-600 text-white\",\n yellow: \"bg-yellow-600 text-white\",\n orange: \"bg-orange-600 text-white\",\n \"gradient-blue\":\n \"bg-gradient-to-r from-blue-600 to-purple-600 text-white\",\n \"gradient-green\":\n \"bg-gradient-to-r from-green-600 to-lime-600 text-white\",\n \"gradient-red\":\n \"bg-gradient-to-r from-red-600 to-pink-600 text-white\",\n \"gradient-yellow\":\n \"bg-gradient-to-r from-yellow-600 to-orange-600 text-white\",\n \"gradient-purple\":\n \"bg-gradient-to-r from-purple-600 to-pink-600 text-white\",\n \"gradient-teal\":\n \"bg-gradient-to-r from-teal-600 to-cyan-600 text-white\",\n \"gradient-indigo\":\n \"bg-gradient-to-r from-indigo-600 to-purple-600 text-white\",\n \"gradient-pink\":\n \"bg-gradient-to-r from-pink-600 to-rose-600 text-white\",\n \"gradient-orange\":\n \"bg-gradient-to-r from-orange-600 to-red-600 text-white\",\n} as const;\n\nexport type ButtonLikeSolidAppearance = keyof typeof buttonLikeSolidAppearances;\n\n\nconst badgeAppearances = {\n ...buttonLikeSolidAppearances,\n outline:\n \"border border-white/15 bg-transparent text-slate-200 shadow-none\",\n ghost: \"bg-transparent text-slate-300 shadow-none\",\n} as const;\n\nexport const badgeVariants = cva(\n [\n \"inline-flex max-w-full items-center justify-center gap-1 font-medium\",\n \"whitespace-nowrap 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 \"select-none\",\n ],\n {\n variants: {\n appearance: badgeAppearances,\n size: {\n sm: \"h-6 min-h-6 px-2 text-[0.65rem] leading-none\",\n md: \"h-7 min-h-7 px-2.5 text-xs leading-none\",\n lg: \"h-8 min-h-8 px-3 text-sm leading-none\",\n },\n shape: {\n pill: \"rounded-full\",\n square: \"rounded-md\",\n dot: \"h-2.5 min-h-2.5 w-2.5 min-w-2.5 rounded-full p-0 px-0 text-[0]\",\n },\n },\n defaultVariants: {\n appearance: \"default\",\n size: \"md\",\n shape: \"pill\",\n },\n },\n);\n\nexport const badgeCloseButtonVariants = cva(\n \"inline-flex shrink-0 items-center justify-center rounded-md p-0.5 text-current opacity-70 transition hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40\",\n {\n variants: {\n size: {\n sm: \"size-4\",\n md: \"size-5\",\n lg: \"size-6\",\n },\n },\n defaultVariants: { size: \"md\" },\n },\n);\n"],"mappings":";;;;AAEA,SAAS,cAAc;AACvB,SAAS,eAAe;;;ACHxB,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB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AAAA,YACZ,SAAS;AAAA,YACT,WAAW,yBAAyB,EAAE,KAAK,CAAC;AAAA,YAE5C,8BAAC,WAAQ,WAAU,YAAW,eAAW,MAAC;AAAA;AAAA,QAC5C,IACE;AAAA;AAAA;AAAA,EACN;AAEJ;AAEA,MAAM,cAAc;","names":[]}
|
|
@@ -0,0 +1,202 @@
|
|
|
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/buttons/index.ts
|
|
21
|
+
var buttons_exports = {};
|
|
22
|
+
__export(buttons_exports, {
|
|
23
|
+
Button: () => Button,
|
|
24
|
+
buttonAnimationPresets: () => buttonAnimationPresets,
|
|
25
|
+
buttonVariants: () => buttonVariants
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(buttons_exports);
|
|
28
|
+
|
|
29
|
+
// src/ui/buttons/button.tsx
|
|
30
|
+
var import_framer_motion = require("framer-motion");
|
|
31
|
+
|
|
32
|
+
// src/lib/utils.ts
|
|
33
|
+
var import_clsx = require("clsx");
|
|
34
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
35
|
+
function cn(...inputs) {
|
|
36
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// src/ui/buttons/animations.ts
|
|
40
|
+
var buttonAnimationPresets = {
|
|
41
|
+
none: {},
|
|
42
|
+
lift: {
|
|
43
|
+
whileHover: { y: -2, scale: 1.02 },
|
|
44
|
+
whileTap: { y: 0, scale: 0.98 },
|
|
45
|
+
transition: { type: "spring", stiffness: 420, damping: 28 }
|
|
46
|
+
},
|
|
47
|
+
press: {
|
|
48
|
+
whileTap: { scale: 0.96 },
|
|
49
|
+
transition: { type: "spring", stiffness: 520, damping: 30 }
|
|
50
|
+
},
|
|
51
|
+
glow: {
|
|
52
|
+
whileHover: {
|
|
53
|
+
boxShadow: "0 0 0 1px rgba(255,255,255,0.25), 0 18px 42px rgba(15,23,42,0.35)",
|
|
54
|
+
scale: 1.01
|
|
55
|
+
},
|
|
56
|
+
whileTap: { scale: 0.98 },
|
|
57
|
+
transition: { duration: 0.2, ease: "easeOut" }
|
|
58
|
+
},
|
|
59
|
+
tilt: {
|
|
60
|
+
whileHover: { rotateX: 6, rotateY: -6, scale: 1.01 },
|
|
61
|
+
whileTap: { scale: 0.98, rotateX: 0, rotateY: 0 },
|
|
62
|
+
transition: { type: "spring", stiffness: 300, damping: 20 },
|
|
63
|
+
style: { transformStyle: "preserve-3d" }
|
|
64
|
+
},
|
|
65
|
+
bounce: {
|
|
66
|
+
whileHover: { y: -4, scale: 1.03 },
|
|
67
|
+
whileTap: { y: 0, scale: 0.97 },
|
|
68
|
+
transition: { type: "spring", bounce: 0.45, duration: 0.45 }
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
// src/ui/buttons/variants.ts
|
|
73
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
74
|
+
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
75
|
+
[
|
|
76
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-xl",
|
|
77
|
+
"text-sm font-medium ring-offset-slate-950 transition-colors",
|
|
78
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-300 focus-visible:ring-offset-2",
|
|
79
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
80
|
+
"select-none"
|
|
81
|
+
],
|
|
82
|
+
{
|
|
83
|
+
variants: {
|
|
84
|
+
appearance: {
|
|
85
|
+
default: "bg-slate-50 text-slate-950 shadow-[0_1px_2px_rgba(15,23,42,0.12)] hover:bg-white",
|
|
86
|
+
secondary: "bg-slate-800 text-slate-50 hover:bg-slate-700",
|
|
87
|
+
destructive: "bg-rose-600 text-white hover:bg-rose-600",
|
|
88
|
+
outline: "border border-white/10 bg-white/5 text-slate-50 hover:bg-white/10",
|
|
89
|
+
ghost: "bg-transparent text-slate-200 hover:bg-white/5",
|
|
90
|
+
link: "bg-transparent text-cyan-300 underline-offset-4 hover:underline",
|
|
91
|
+
glass: "border border-white/15 bg-white/10 text-white backdrop-blur-md hover:bg-white/15",
|
|
92
|
+
emerald: "bg-emerald-600 text-white hover:bg-emerald-600",
|
|
93
|
+
indigo: "bg-indigo-600 text-white hover:bg-indigo-600",
|
|
94
|
+
purple: "bg-purple-600 text-white hover:bg-purple-600",
|
|
95
|
+
pink: "bg-pink-600 text-white hover:bg-pink-600",
|
|
96
|
+
rose: "bg-rose-600 text-white hover:bg-rose-600",
|
|
97
|
+
sky: "bg-sky-600 text-white hover:bg-sky-600",
|
|
98
|
+
teal: "bg-teal-600 text-white hover:bg-teal-600",
|
|
99
|
+
yellow: "bg-yellow-600 text-white hover:bg-yellow-600",
|
|
100
|
+
orange: "bg-orange-600 text-white hover:bg-orange-600",
|
|
101
|
+
gray: "bg-gray-600 text-white hover:bg-gray-600",
|
|
102
|
+
amber: "bg-amber-600 text-white hover:bg-amber-600",
|
|
103
|
+
violet: "bg-violet-600 text-white hover:bg-violet-600",
|
|
104
|
+
"gradient-blue": "bg-gradient-to-r from-blue-600 to-purple-600 text-white hover:from-blue-600 hover:to-purple-600",
|
|
105
|
+
"gradient-green": "bg-gradient-to-r from-green-600 to-lime-600 text-white hover:from-green-600 hover:to-lime-600",
|
|
106
|
+
"gradient-red": "bg-gradient-to-r from-red-600 to-pink-600 text-white hover:from-red-600 hover:to-pink-600",
|
|
107
|
+
"gradient-yellow": "bg-gradient-to-r from-yellow-600 to-orange-600 text-white hover:from-yellow-600 hover:to-orange-600",
|
|
108
|
+
"gradient-purple": "bg-gradient-to-r from-purple-600 to-pink-600 text-white hover:from-purple-600 hover:to-pink-600",
|
|
109
|
+
"gradient-teal": "bg-gradient-to-r from-teal-600 to-cyan-600 text-white hover:from-teal-600 hover:to-cyan-600",
|
|
110
|
+
"gradient-indigo": "bg-gradient-to-r from-indigo-600 to-purple-600 text-white hover:from-indigo-600 hover:to-purple-600",
|
|
111
|
+
"gradient-pink": "bg-gradient-to-r from-pink-600 to-rose-600 text-white hover:from-pink-600 hover:to-rose-600",
|
|
112
|
+
"gradient-orange": "bg-gradient-to-r from-orange-600 to-red-600 text-white hover:from-orange-600 hover:to-red-600"
|
|
113
|
+
},
|
|
114
|
+
size: {
|
|
115
|
+
sm: "h-7 md:h-9 px-3 text-xs",
|
|
116
|
+
md: "h-9 md:h-11 px-4",
|
|
117
|
+
lg: "h-10 md:h-12 px-5 text-base",
|
|
118
|
+
xl: "h-12 md:h-14 px-6 text-lg",
|
|
119
|
+
"2xl": "h-14 md:h-16 px-6 md:px-8 text-xl",
|
|
120
|
+
"3xl": "h-16 md:h-18 px-8 md:px-10 text-2xl",
|
|
121
|
+
"4xl": "h-18 md:h-20 px-10 md:px-12 text-2xl",
|
|
122
|
+
"5xl": "h-20 md:h-22 px-12 md:px-14 text-2xl",
|
|
123
|
+
"6xl": "h-22 md:h-24 px-14 md:px-16 text-2xl",
|
|
124
|
+
"7xl": "h-24 md:h-26 px-16 md:px-18 text-2xl",
|
|
125
|
+
"8xl": "h-26 md:h-28 px-20 text-2xl",
|
|
126
|
+
"9xl": "h-24 md:h-30 px-18 md:px-22 text-2xl",
|
|
127
|
+
"10xl": "h-26 md:h-32 px-20 md:px-24 text-2xl",
|
|
128
|
+
icon: "h-10 w-10"
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
defaultVariants: {
|
|
132
|
+
appearance: "default",
|
|
133
|
+
size: "md"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
// src/ui/buttons/button.tsx
|
|
139
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
140
|
+
var Button = (props) => {
|
|
141
|
+
if (props.as === "link") {
|
|
142
|
+
const {
|
|
143
|
+
className: className2,
|
|
144
|
+
appearance: appearance2,
|
|
145
|
+
size: size2,
|
|
146
|
+
children: children2,
|
|
147
|
+
ref: ref2,
|
|
148
|
+
href,
|
|
149
|
+
target,
|
|
150
|
+
animation: animation2 = "none",
|
|
151
|
+
...rest2
|
|
152
|
+
} = props;
|
|
153
|
+
const motionProps2 = buttonAnimationPresets[animation2];
|
|
154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
155
|
+
import_framer_motion.motion.a,
|
|
156
|
+
{
|
|
157
|
+
ref: ref2,
|
|
158
|
+
href,
|
|
159
|
+
target,
|
|
160
|
+
rel: target === "_blank" ? "noopener noreferrer" : void 0,
|
|
161
|
+
"data-slot": "button",
|
|
162
|
+
className: cn(buttonVariants({ appearance: appearance2, size: size2 }), className2),
|
|
163
|
+
initial: false,
|
|
164
|
+
...motionProps2,
|
|
165
|
+
...rest2,
|
|
166
|
+
children: children2
|
|
167
|
+
}
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
const {
|
|
171
|
+
className,
|
|
172
|
+
appearance,
|
|
173
|
+
size,
|
|
174
|
+
type = "button",
|
|
175
|
+
children,
|
|
176
|
+
ref,
|
|
177
|
+
animation = "none",
|
|
178
|
+
...rest
|
|
179
|
+
} = props;
|
|
180
|
+
const motionProps = buttonAnimationPresets[animation];
|
|
181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
182
|
+
import_framer_motion.motion.button,
|
|
183
|
+
{
|
|
184
|
+
ref,
|
|
185
|
+
type,
|
|
186
|
+
"data-slot": "button",
|
|
187
|
+
className: cn(buttonVariants({ appearance, size }), className),
|
|
188
|
+
initial: false,
|
|
189
|
+
...motionProps,
|
|
190
|
+
...rest,
|
|
191
|
+
children
|
|
192
|
+
}
|
|
193
|
+
);
|
|
194
|
+
};
|
|
195
|
+
Button.displayName = "Button";
|
|
196
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
197
|
+
0 && (module.exports = {
|
|
198
|
+
Button,
|
|
199
|
+
buttonAnimationPresets,
|
|
200
|
+
buttonVariants
|
|
201
|
+
});
|
|
202
|
+
//# sourceMappingURL=buttons.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/ui/buttons/index.ts","../../src/ui/buttons/button.tsx","../../src/lib/utils.ts","../../src/ui/buttons/animations.ts","../../src/ui/buttons/variants.ts"],"sourcesContent":["export { Button } from \"./button\";\nexport type { ButtonProps, ButtonAnimation } from \"./types\";\nexport { buttonAnimationPresets } from \"./animations\";\nexport { buttonVariants } from \"./variants\";","\"use client\";\n\nimport { motion } from \"framer-motion\";\n\nimport { cn } from \"../../lib/utils\";\nimport type { ButtonProps } from \"./types\";\nimport { buttonAnimationPresets } from \"./animations\";\nimport { buttonVariants } from \"./variants\";\n\nexport const Button = (props: ButtonProps) => {\n if (props.as === \"link\") {\n const {\n className,\n appearance,\n size,\n children,\n ref,\n href,\n target,\n animation = \"none\",\n ...rest\n } = props;\n const motionProps = buttonAnimationPresets[animation];\n\n return (\n <motion.a\n ref={ref}\n href={href}\n target={target}\n rel={target === \"_blank\" ? \"noopener noreferrer\" : undefined}\n data-slot=\"button\"\n className={cn(buttonVariants({ appearance, size }), className)}\n initial={false}\n {...motionProps}\n {...rest}\n >\n {children}\n </motion.a>\n );\n }\n\n const {\n className,\n appearance,\n size,\n type = \"button\",\n children,\n ref,\n animation = \"none\",\n ...rest\n } = props;\n const motionProps = buttonAnimationPresets[animation];\n\n return (\n <motion.button\n ref={ref}\n type={type}\n data-slot=\"button\"\n className={cn(buttonVariants({ appearance, size }), className)}\n initial={false}\n {...motionProps}\n {...rest}\n >\n {children}\n </motion.button>\n );\n};\n\nButton.displayName = \"Button\";\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 { AnimationPresets } from \"./types\";\n\nexport const buttonAnimationPresets: AnimationPresets = {\n none: {},\n lift: {\n whileHover: { y: -2, scale: 1.02 },\n whileTap: { y: 0, scale: 0.98 },\n transition: { type: \"spring\", stiffness: 420, damping: 28 },\n },\n press: {\n whileTap: { scale: 0.96 },\n transition: { type: \"spring\", stiffness: 520, damping: 30 },\n },\n glow: {\n whileHover: {\n boxShadow:\n \"0 0 0 1px rgba(255,255,255,0.25), 0 18px 42px rgba(15,23,42,0.35)\",\n scale: 1.01,\n },\n whileTap: { scale: 0.98 },\n transition: { duration: 0.2, ease: \"easeOut\" },\n },\n tilt: {\n whileHover: { rotateX: 6, rotateY: -6, scale: 1.01 },\n whileTap: { scale: 0.98, rotateX: 0, rotateY: 0 },\n transition: { type: \"spring\", stiffness: 300, damping: 20 },\n style: { transformStyle: \"preserve-3d\" },\n },\n bounce: {\n whileHover: { y: -4, scale: 1.03 },\n whileTap: { y: 0, scale: 0.97 },\n transition: { type: \"spring\", bounce: 0.45, duration: 0.45 },\n },\n};\n","import { cva } from \"class-variance-authority\";\n\nexport const buttonVariants = cva(\n [\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-xl\",\n \"text-sm font-medium 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 \"disabled:pointer-events-none disabled:opacity-50\",\n \"select-none\",\n ],\n {\n variants: {\n appearance: {\n default:\n \"bg-slate-50 text-slate-950 shadow-[0_1px_2px_rgba(15,23,42,0.12)] hover:bg-white\",\n secondary: \"bg-slate-800 text-slate-50 hover:bg-slate-700\",\n destructive: \"bg-rose-600 text-white hover:bg-rose-600\",\n outline:\n \"border border-white/10 bg-white/5 text-slate-50 hover:bg-white/10\",\n ghost: \"bg-transparent text-slate-200 hover:bg-white/5\",\n link: \"bg-transparent text-cyan-300 underline-offset-4 hover:underline\",\n glass:\n \"border border-white/15 bg-white/10 text-white backdrop-blur-md hover:bg-white/15\",\n emerald: \"bg-emerald-600 text-white hover:bg-emerald-600\",\n indigo: \"bg-indigo-600 text-white hover:bg-indigo-600\",\n purple: \"bg-purple-600 text-white hover:bg-purple-600\",\n pink: \"bg-pink-600 text-white hover:bg-pink-600\",\n rose: \"bg-rose-600 text-white hover:bg-rose-600\",\n sky: \"bg-sky-600 text-white hover:bg-sky-600\",\n teal: \"bg-teal-600 text-white hover:bg-teal-600\",\n yellow: \"bg-yellow-600 text-white hover:bg-yellow-600\",\n orange: \"bg-orange-600 text-white hover:bg-orange-600\",\n gray: \"bg-gray-600 text-white hover:bg-gray-600\",\n amber: \"bg-amber-600 text-white hover:bg-amber-600\",\n violet: \"bg-violet-600 text-white hover:bg-violet-600\",\n \"gradient-blue\": \"bg-gradient-to-r from-blue-600 to-purple-600 text-white hover:from-blue-600 hover:to-purple-600\",\n \"gradient-green\": \"bg-gradient-to-r from-green-600 to-lime-600 text-white hover:from-green-600 hover:to-lime-600\",\n \"gradient-red\": \"bg-gradient-to-r from-red-600 to-pink-600 text-white hover:from-red-600 hover:to-pink-600\",\n \"gradient-yellow\": \"bg-gradient-to-r from-yellow-600 to-orange-600 text-white hover:from-yellow-600 hover:to-orange-600\",\n \"gradient-purple\": \"bg-gradient-to-r from-purple-600 to-pink-600 text-white hover:from-purple-600 hover:to-pink-600\",\n \"gradient-teal\": \"bg-gradient-to-r from-teal-600 to-cyan-600 text-white hover:from-teal-600 hover:to-cyan-600\",\n \"gradient-indigo\": \"bg-gradient-to-r from-indigo-600 to-purple-600 text-white hover:from-indigo-600 hover:to-purple-600\",\n \"gradient-pink\": \"bg-gradient-to-r from-pink-600 to-rose-600 text-white hover:from-pink-600 hover:to-rose-600\",\n \"gradient-orange\": \"bg-gradient-to-r from-orange-600 to-red-600 text-white hover:from-orange-600 hover:to-red-600\",\n },\n size: {\n sm: \"h-7 md:h-9 px-3 text-xs\",\n md: \"h-9 md:h-11 px-4\",\n lg: \"h-10 md:h-12 px-5 text-base\",\n xl: \"h-12 md:h-14 px-6 text-lg\",\n \"2xl\": \"h-14 md:h-16 px-6 md:px-8 text-xl\",\n \"3xl\": \"h-16 md:h-18 px-8 md:px-10 text-2xl\",\n \"4xl\": \"h-18 md:h-20 px-10 md:px-12 text-2xl\",\n \"5xl\": \"h-20 md:h-22 px-12 md:px-14 text-2xl\",\n \"6xl\": \"h-22 md:h-24 px-14 md:px-16 text-2xl\",\n \"7xl\": \"h-24 md:h-26 px-16 md:px-18 text-2xl\",\n \"8xl\": \"h-26 md:h-28 px-20 text-2xl\",\n \"9xl\": \"h-24 md:h-30 px-18 md:px-22 text-2xl\",\n \"10xl\": \"h-26 md:h-32 px-20 md:px-24 text-2xl\",\n icon: \"h-10 w-10\",\n },\n },\n defaultVariants: {\n appearance: \"default\",\n size: \"md\",\n },\n },\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,2BAAuB;;;ACFvB,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ACHO,IAAM,yBAA2C;AAAA,EACtD,MAAM,CAAC;AAAA,EACP,MAAM;AAAA,IACJ,YAAY,EAAE,GAAG,IAAI,OAAO,KAAK;AAAA,I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GD;AAAA,QAEH,UAAAH;AAAA;AAAA,IACH;AAAA,EAEJ;AAEA,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,YAAY;AAAA,IACZ,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,cAAc,uBAAuB,SAAS;AAEpD,SACE;AAAA,IAAC,4BAAO;AAAA,IAAP;AAAA,MACC;AAAA,MACA;AAAA,MACA,aAAU;AAAA,MACV,WAAW,GAAG,eAAe,EAAE,YAAY,KAAK,CAAC,GAAG,SAAS;AAAA,MAC7D,SAAS;AAAA,MACR,GAAG;AAAA,MACH,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;AAEA,OAAO,cAAc;","names":["className","appearance","size","children","ref","animation","rest","motionProps"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
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 { b as buttonVariants } from '../variants-1Bx3BEeS.cjs';
|
|
5
|
+
import 'class-variance-authority/types';
|
|
6
|
+
|
|
7
|
+
type ButtonAnimation = "none" | "lift" | "press" | "glow" | "tilt" | "bounce";
|
|
8
|
+
type ButtonSharedProps = VariantProps<typeof buttonVariants> & {
|
|
9
|
+
animation?: ButtonAnimation;
|
|
10
|
+
};
|
|
11
|
+
/** Motion props applied by presets; valid on both `motion.button` and `motion.a`. */
|
|
12
|
+
type ButtonPresetMotionProps = Pick<HTMLMotionProps<"button">, "style" | "transition" | "whileHover" | "whileTap">;
|
|
13
|
+
type ButtonProps = (ButtonSharedProps & HTMLMotionProps<"button"> & {
|
|
14
|
+
as?: "button";
|
|
15
|
+
}) | (ButtonSharedProps & HTMLMotionProps<"a"> & {
|
|
16
|
+
as: "link";
|
|
17
|
+
});
|
|
18
|
+
type AnimationPresets = Record<ButtonAnimation, ButtonPresetMotionProps>;
|
|
19
|
+
|
|
20
|
+
declare const Button: {
|
|
21
|
+
(props: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
declare const buttonAnimationPresets: AnimationPresets;
|
|
26
|
+
|
|
27
|
+
export { Button, type ButtonAnimation, type ButtonProps, buttonAnimationPresets, buttonVariants };
|
|
@@ -0,0 +1,27 @@
|
|
|
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 { b as buttonVariants } from '../variants-1Bx3BEeS.js';
|
|
5
|
+
import 'class-variance-authority/types';
|
|
6
|
+
|
|
7
|
+
type ButtonAnimation = "none" | "lift" | "press" | "glow" | "tilt" | "bounce";
|
|
8
|
+
type ButtonSharedProps = VariantProps<typeof buttonVariants> & {
|
|
9
|
+
animation?: ButtonAnimation;
|
|
10
|
+
};
|
|
11
|
+
/** Motion props applied by presets; valid on both `motion.button` and `motion.a`. */
|
|
12
|
+
type ButtonPresetMotionProps = Pick<HTMLMotionProps<"button">, "style" | "transition" | "whileHover" | "whileTap">;
|
|
13
|
+
type ButtonProps = (ButtonSharedProps & HTMLMotionProps<"button"> & {
|
|
14
|
+
as?: "button";
|
|
15
|
+
}) | (ButtonSharedProps & HTMLMotionProps<"a"> & {
|
|
16
|
+
as: "link";
|
|
17
|
+
});
|
|
18
|
+
type AnimationPresets = Record<ButtonAnimation, ButtonPresetMotionProps>;
|
|
19
|
+
|
|
20
|
+
declare const Button: {
|
|
21
|
+
(props: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
declare const buttonAnimationPresets: AnimationPresets;
|
|
26
|
+
|
|
27
|
+
export { Button, type ButtonAnimation, type ButtonProps, buttonAnimationPresets, buttonVariants };
|