@ataraui/ataraui-react 0.1.1
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/dist/index.d.mts +104 -0
- package/dist/index.d.ts +104 -0
- package/dist/index.js +193 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +178 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +51 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { ClassValue } from 'clsx';
|
|
2
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
7
|
+
|
|
8
|
+
declare const colors: {
|
|
9
|
+
readonly primary: {
|
|
10
|
+
readonly 50: "#FFF4EE";
|
|
11
|
+
readonly 100: "#FFE0CC";
|
|
12
|
+
readonly 200: "#FFBF99";
|
|
13
|
+
readonly 300: "#F08050";
|
|
14
|
+
readonly 400: "#D4602A";
|
|
15
|
+
readonly 500: "#C2440A";
|
|
16
|
+
readonly 600: "#A03808";
|
|
17
|
+
readonly 700: "#8F2F06";
|
|
18
|
+
readonly 800: "#5C1C03";
|
|
19
|
+
readonly 900: "#2E0D01";
|
|
20
|
+
};
|
|
21
|
+
readonly neutral: {
|
|
22
|
+
readonly 50: "#f9f7f5";
|
|
23
|
+
readonly 100: "#f0ece7";
|
|
24
|
+
readonly 200: "#ddd6cc";
|
|
25
|
+
readonly 300: "#c5bab0";
|
|
26
|
+
readonly 400: "#a89b8e";
|
|
27
|
+
readonly 500: "#8a7d72";
|
|
28
|
+
readonly 600: "#6f6358";
|
|
29
|
+
readonly 700: "#564d45";
|
|
30
|
+
readonly 800: "#3c3630";
|
|
31
|
+
readonly 900: "#252019";
|
|
32
|
+
};
|
|
33
|
+
readonly danger: {
|
|
34
|
+
readonly 500: "#ef4444";
|
|
35
|
+
readonly 600: "#dc2626";
|
|
36
|
+
};
|
|
37
|
+
readonly success: {
|
|
38
|
+
readonly 500: "#22c55e";
|
|
39
|
+
readonly 600: "#16a34a";
|
|
40
|
+
};
|
|
41
|
+
readonly warning: {
|
|
42
|
+
readonly 500: "#f59e0b";
|
|
43
|
+
readonly 600: "#d97706";
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
declare const radius: {
|
|
47
|
+
readonly none: "0";
|
|
48
|
+
readonly sm: "0.25rem";
|
|
49
|
+
readonly md: "0.375rem";
|
|
50
|
+
readonly lg: "0.5rem";
|
|
51
|
+
readonly xl: "0.75rem";
|
|
52
|
+
readonly '2xl': "1rem";
|
|
53
|
+
readonly full: "9999px";
|
|
54
|
+
};
|
|
55
|
+
declare const fontSize: {
|
|
56
|
+
readonly xs: readonly ["0.75rem", {
|
|
57
|
+
readonly lineHeight: "1rem";
|
|
58
|
+
}];
|
|
59
|
+
readonly sm: readonly ["0.875rem", {
|
|
60
|
+
readonly lineHeight: "1.25rem";
|
|
61
|
+
}];
|
|
62
|
+
readonly base: readonly ["1rem", {
|
|
63
|
+
readonly lineHeight: "1.5rem";
|
|
64
|
+
}];
|
|
65
|
+
readonly lg: readonly ["1.125rem", {
|
|
66
|
+
readonly lineHeight: "1.75rem";
|
|
67
|
+
}];
|
|
68
|
+
readonly xl: readonly ["1.25rem", {
|
|
69
|
+
readonly lineHeight: "1.75rem";
|
|
70
|
+
}];
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
declare const buttonVariants: (props?: ({
|
|
74
|
+
variant?: "primary" | "secondary" | "outline" | "ghost" | "destructive" | null | undefined;
|
|
75
|
+
size?: "sm" | "md" | "lg" | "icon" | null | undefined;
|
|
76
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
77
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
78
|
+
isLoading?: boolean;
|
|
79
|
+
}
|
|
80
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
81
|
+
|
|
82
|
+
declare const inputVariants: (props?: ({
|
|
83
|
+
state?: "default" | "error" | null | undefined;
|
|
84
|
+
inputSize?: "sm" | "md" | "lg" | null | undefined;
|
|
85
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
86
|
+
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof inputVariants> {
|
|
87
|
+
label?: string;
|
|
88
|
+
error?: string;
|
|
89
|
+
hint?: string;
|
|
90
|
+
}
|
|
91
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
92
|
+
|
|
93
|
+
declare const badgeVariants: (props?: ({
|
|
94
|
+
variant?: "secondary" | "outline" | "destructive" | "default" | "success" | "warning" | null | undefined;
|
|
95
|
+
size?: "sm" | "md" | null | undefined;
|
|
96
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
97
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
|
|
98
|
+
}
|
|
99
|
+
declare const Badge: {
|
|
100
|
+
({ className, variant, size, ...props }: BadgeProps): React.JSX.Element;
|
|
101
|
+
displayName: string;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export { Badge, type BadgeProps, Button, type ButtonProps, Input, type InputProps, badgeVariants, buttonVariants, cn, colors, fontSize, inputVariants, radius };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { ClassValue } from 'clsx';
|
|
2
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
7
|
+
|
|
8
|
+
declare const colors: {
|
|
9
|
+
readonly primary: {
|
|
10
|
+
readonly 50: "#FFF4EE";
|
|
11
|
+
readonly 100: "#FFE0CC";
|
|
12
|
+
readonly 200: "#FFBF99";
|
|
13
|
+
readonly 300: "#F08050";
|
|
14
|
+
readonly 400: "#D4602A";
|
|
15
|
+
readonly 500: "#C2440A";
|
|
16
|
+
readonly 600: "#A03808";
|
|
17
|
+
readonly 700: "#8F2F06";
|
|
18
|
+
readonly 800: "#5C1C03";
|
|
19
|
+
readonly 900: "#2E0D01";
|
|
20
|
+
};
|
|
21
|
+
readonly neutral: {
|
|
22
|
+
readonly 50: "#f9f7f5";
|
|
23
|
+
readonly 100: "#f0ece7";
|
|
24
|
+
readonly 200: "#ddd6cc";
|
|
25
|
+
readonly 300: "#c5bab0";
|
|
26
|
+
readonly 400: "#a89b8e";
|
|
27
|
+
readonly 500: "#8a7d72";
|
|
28
|
+
readonly 600: "#6f6358";
|
|
29
|
+
readonly 700: "#564d45";
|
|
30
|
+
readonly 800: "#3c3630";
|
|
31
|
+
readonly 900: "#252019";
|
|
32
|
+
};
|
|
33
|
+
readonly danger: {
|
|
34
|
+
readonly 500: "#ef4444";
|
|
35
|
+
readonly 600: "#dc2626";
|
|
36
|
+
};
|
|
37
|
+
readonly success: {
|
|
38
|
+
readonly 500: "#22c55e";
|
|
39
|
+
readonly 600: "#16a34a";
|
|
40
|
+
};
|
|
41
|
+
readonly warning: {
|
|
42
|
+
readonly 500: "#f59e0b";
|
|
43
|
+
readonly 600: "#d97706";
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
declare const radius: {
|
|
47
|
+
readonly none: "0";
|
|
48
|
+
readonly sm: "0.25rem";
|
|
49
|
+
readonly md: "0.375rem";
|
|
50
|
+
readonly lg: "0.5rem";
|
|
51
|
+
readonly xl: "0.75rem";
|
|
52
|
+
readonly '2xl': "1rem";
|
|
53
|
+
readonly full: "9999px";
|
|
54
|
+
};
|
|
55
|
+
declare const fontSize: {
|
|
56
|
+
readonly xs: readonly ["0.75rem", {
|
|
57
|
+
readonly lineHeight: "1rem";
|
|
58
|
+
}];
|
|
59
|
+
readonly sm: readonly ["0.875rem", {
|
|
60
|
+
readonly lineHeight: "1.25rem";
|
|
61
|
+
}];
|
|
62
|
+
readonly base: readonly ["1rem", {
|
|
63
|
+
readonly lineHeight: "1.5rem";
|
|
64
|
+
}];
|
|
65
|
+
readonly lg: readonly ["1.125rem", {
|
|
66
|
+
readonly lineHeight: "1.75rem";
|
|
67
|
+
}];
|
|
68
|
+
readonly xl: readonly ["1.25rem", {
|
|
69
|
+
readonly lineHeight: "1.75rem";
|
|
70
|
+
}];
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
declare const buttonVariants: (props?: ({
|
|
74
|
+
variant?: "primary" | "secondary" | "outline" | "ghost" | "destructive" | null | undefined;
|
|
75
|
+
size?: "sm" | "md" | "lg" | "icon" | null | undefined;
|
|
76
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
77
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
78
|
+
isLoading?: boolean;
|
|
79
|
+
}
|
|
80
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
81
|
+
|
|
82
|
+
declare const inputVariants: (props?: ({
|
|
83
|
+
state?: "default" | "error" | null | undefined;
|
|
84
|
+
inputSize?: "sm" | "md" | "lg" | null | undefined;
|
|
85
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
86
|
+
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof inputVariants> {
|
|
87
|
+
label?: string;
|
|
88
|
+
error?: string;
|
|
89
|
+
hint?: string;
|
|
90
|
+
}
|
|
91
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
92
|
+
|
|
93
|
+
declare const badgeVariants: (props?: ({
|
|
94
|
+
variant?: "secondary" | "outline" | "destructive" | "default" | "success" | "warning" | null | undefined;
|
|
95
|
+
size?: "sm" | "md" | null | undefined;
|
|
96
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
97
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
|
|
98
|
+
}
|
|
99
|
+
declare const Badge: {
|
|
100
|
+
({ className, variant, size, ...props }: BadgeProps): React.JSX.Element;
|
|
101
|
+
displayName: string;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export { Badge, type BadgeProps, Button, type ButtonProps, Input, type InputProps, badgeVariants, buttonVariants, cn, colors, fontSize, inputVariants, radius };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var clsx = require('clsx');
|
|
4
|
+
var tailwindMerge = require('tailwind-merge');
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
|
|
9
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
|
|
11
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
12
|
+
|
|
13
|
+
// src/utils/cn.ts
|
|
14
|
+
function cn(...inputs) {
|
|
15
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// src/tokens/index.ts
|
|
19
|
+
var colors = {
|
|
20
|
+
primary: {
|
|
21
|
+
50: "#FFF4EE",
|
|
22
|
+
100: "#FFE0CC",
|
|
23
|
+
200: "#FFBF99",
|
|
24
|
+
300: "#F08050",
|
|
25
|
+
400: "#D4602A",
|
|
26
|
+
500: "#C2440A",
|
|
27
|
+
600: "#A03808",
|
|
28
|
+
700: "#8F2F06",
|
|
29
|
+
800: "#5C1C03",
|
|
30
|
+
900: "#2E0D01"
|
|
31
|
+
},
|
|
32
|
+
neutral: {
|
|
33
|
+
50: "#f9f7f5",
|
|
34
|
+
100: "#f0ece7",
|
|
35
|
+
200: "#ddd6cc",
|
|
36
|
+
300: "#c5bab0",
|
|
37
|
+
400: "#a89b8e",
|
|
38
|
+
500: "#8a7d72",
|
|
39
|
+
600: "#6f6358",
|
|
40
|
+
700: "#564d45",
|
|
41
|
+
800: "#3c3630",
|
|
42
|
+
900: "#252019"
|
|
43
|
+
},
|
|
44
|
+
danger: {
|
|
45
|
+
500: "#ef4444",
|
|
46
|
+
600: "#dc2626"
|
|
47
|
+
},
|
|
48
|
+
success: {
|
|
49
|
+
500: "#22c55e",
|
|
50
|
+
600: "#16a34a"
|
|
51
|
+
},
|
|
52
|
+
warning: {
|
|
53
|
+
500: "#f59e0b",
|
|
54
|
+
600: "#d97706"
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
var radius = {
|
|
58
|
+
none: "0",
|
|
59
|
+
sm: "0.25rem",
|
|
60
|
+
md: "0.375rem",
|
|
61
|
+
lg: "0.5rem",
|
|
62
|
+
xl: "0.75rem",
|
|
63
|
+
"2xl": "1rem",
|
|
64
|
+
full: "9999px"
|
|
65
|
+
};
|
|
66
|
+
var fontSize = {
|
|
67
|
+
xs: ["0.75rem", { lineHeight: "1rem" }],
|
|
68
|
+
sm: ["0.875rem", { lineHeight: "1.25rem" }],
|
|
69
|
+
base: ["1rem", { lineHeight: "1.5rem" }],
|
|
70
|
+
lg: ["1.125rem", { lineHeight: "1.75rem" }],
|
|
71
|
+
xl: ["1.25rem", { lineHeight: "1.75rem" }]
|
|
72
|
+
};
|
|
73
|
+
var buttonVariants = classVarianceAuthority.cva(
|
|
74
|
+
"inline-flex items-center justify-center font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
75
|
+
{
|
|
76
|
+
variants: {
|
|
77
|
+
variant: {
|
|
78
|
+
primary: "bg-(--color-primary-500) text-white hover:bg-(--color-primary-600) focus-visible:ring-(--color-primary-500)",
|
|
79
|
+
secondary: "bg-(--color-neutral-100) text-(--color-neutral-900) hover:bg-(--color-neutral-200)",
|
|
80
|
+
outline: "border border-(--color-primary-500) text-(--color-primary-500) bg-transparent hover:bg-(--color-primary-50)",
|
|
81
|
+
ghost: "text-(--color-neutral-700) hover:bg-(--color-neutral-100)",
|
|
82
|
+
destructive: "bg-(--color-danger-500) text-white hover:bg-(--color-danger-600)"
|
|
83
|
+
},
|
|
84
|
+
size: {
|
|
85
|
+
sm: "h-8 px-3 text-sm rounded-(--radius-md) gap-1.5",
|
|
86
|
+
md: "h-10 px-4 text-sm rounded-(--radius-md) gap-2",
|
|
87
|
+
lg: "h-12 px-6 text-base rounded-(--radius-lg) gap-2",
|
|
88
|
+
icon: "h-10 w-10 rounded-(--radius-md)"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
defaultVariants: {
|
|
92
|
+
variant: "primary",
|
|
93
|
+
size: "md"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
var Button = React__default.default.forwardRef(
|
|
98
|
+
({ className, variant, size, isLoading, children, disabled, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
99
|
+
"button",
|
|
100
|
+
{
|
|
101
|
+
ref,
|
|
102
|
+
className: cn(buttonVariants({ variant, size }), className),
|
|
103
|
+
disabled: disabled || isLoading,
|
|
104
|
+
...props,
|
|
105
|
+
children: [
|
|
106
|
+
isLoading && /* @__PURE__ */ jsxRuntime.jsxs("svg", { className: "animate-spin h-4 w-4", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
|
|
107
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
108
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8v8z" })
|
|
109
|
+
] }),
|
|
110
|
+
children
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
);
|
|
115
|
+
Button.displayName = "Button";
|
|
116
|
+
var inputVariants = classVarianceAuthority.cva(
|
|
117
|
+
"w-full px-3 py-2 text-sm bg-white border rounded-(--radius-md) transition-colors placeholder:text-(--color-neutral-400) focus:outline-none focus:ring-2 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-(--color-neutral-50)",
|
|
118
|
+
{
|
|
119
|
+
variants: {
|
|
120
|
+
state: {
|
|
121
|
+
default: "border-(--color-neutral-300) text-(--color-neutral-900) focus:border-(--color-primary-500) focus:ring-(--color-primary-500)/20",
|
|
122
|
+
error: "border-(--color-danger-500) text-(--color-neutral-900) focus:border-(--color-danger-500) focus:ring-(--color-danger-500)/20"
|
|
123
|
+
},
|
|
124
|
+
inputSize: {
|
|
125
|
+
sm: "h-8 text-xs",
|
|
126
|
+
md: "h-10 text-sm",
|
|
127
|
+
lg: "h-12 text-base"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
defaultVariants: {
|
|
131
|
+
state: "default",
|
|
132
|
+
inputSize: "md"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
);
|
|
136
|
+
var Input = React__default.default.forwardRef(
|
|
137
|
+
({ className, label, error, hint, id, inputSize, ...props }, ref) => {
|
|
138
|
+
const inputId = id != null ? id : label == null ? void 0 : label.toLowerCase().replace(/\s+/g, "-");
|
|
139
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5 w-full", children: [
|
|
140
|
+
label && /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: inputId, className: "text-sm font-medium text-(--color-neutral-700)", children: label }),
|
|
141
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
142
|
+
"input",
|
|
143
|
+
{
|
|
144
|
+
ref,
|
|
145
|
+
id: inputId,
|
|
146
|
+
className: cn(inputVariants({ state: error ? "error" : "default", inputSize }), className),
|
|
147
|
+
...props
|
|
148
|
+
}
|
|
149
|
+
),
|
|
150
|
+
hint && !error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-(--color-neutral-500)", children: hint }),
|
|
151
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-(--color-danger-500)", children: error })
|
|
152
|
+
] });
|
|
153
|
+
}
|
|
154
|
+
);
|
|
155
|
+
Input.displayName = "Input";
|
|
156
|
+
var badgeVariants = classVarianceAuthority.cva(
|
|
157
|
+
"inline-flex items-center rounded-full font-medium",
|
|
158
|
+
{
|
|
159
|
+
variants: {
|
|
160
|
+
variant: {
|
|
161
|
+
default: "bg-(--color-primary-500) text-white",
|
|
162
|
+
secondary: "bg-(--color-neutral-100) text-(--color-neutral-700)",
|
|
163
|
+
outline: "border border-(--color-primary-500) text-(--color-primary-500)",
|
|
164
|
+
success: "bg-(--color-success-500)/10 text-(--color-success-600)",
|
|
165
|
+
warning: "bg-(--color-warning-500)/10 text-(--color-warning-600)",
|
|
166
|
+
destructive: "bg-(--color-danger-500)/10 text-(--color-danger-600)"
|
|
167
|
+
},
|
|
168
|
+
size: {
|
|
169
|
+
sm: "px-2 py-0.5 text-xs",
|
|
170
|
+
md: "px-2.5 py-0.5 text-sm"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
defaultVariants: {
|
|
174
|
+
variant: "default",
|
|
175
|
+
size: "md"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
);
|
|
179
|
+
var Badge = ({ className, variant, size, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(badgeVariants({ variant, size }), className), ...props });
|
|
180
|
+
Badge.displayName = "Badge";
|
|
181
|
+
|
|
182
|
+
exports.Badge = Badge;
|
|
183
|
+
exports.Button = Button;
|
|
184
|
+
exports.Input = Input;
|
|
185
|
+
exports.badgeVariants = badgeVariants;
|
|
186
|
+
exports.buttonVariants = buttonVariants;
|
|
187
|
+
exports.cn = cn;
|
|
188
|
+
exports.colors = colors;
|
|
189
|
+
exports.fontSize = fontSize;
|
|
190
|
+
exports.inputVariants = inputVariants;
|
|
191
|
+
exports.radius = radius;
|
|
192
|
+
//# sourceMappingURL=index.js.map
|
|
193
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/cn.ts","../src/tokens/index.ts","../src/components/Button/Button.tsx","../src/components/Input/Input.tsx","../src/components/Badge/Badge.tsx"],"names":["twMerge","clsx","cva","React","jsxs","jsx"],"mappings":";;;;;;;;;;;;;AAGO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAOA,qBAAA,CAAQC,SAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;;;ACLO,IAAM,MAAA,GAAS;AAAA,EACpB,OAAA,EAAS;AAAA,IACP,EAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK;AAAA,GACP;AAAA,EACA,OAAA,EAAS;AAAA,IACP,EAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK;AAAA,GACP;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK;AAAA,GACP;AAAA,EACA,OAAA,EAAS;AAAA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AA,GAAgBH,0BAAAA;AAAA,EAC3B,mDAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,OAAA,EAAa,qCAAA;AAAA,QACb,SAAA,EAAa,qDAAA;AAAA,QACb,OAAA,EAAa,gEAAA;AAAA,QACb,OAAA,EAAa,wDAAA;AAAA,QACb,OAAA,EAAa,wDAAA;AAAA,QACb,WAAA,EAAa;AAAA,OACf;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,EAAA,EAAI,qBAAA;AAAA,QACJ,EAAA,EAAI;AAAA;AACN,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,OAAA,EAAS,SAAA;AAAA,MACT,IAAA,EAAM;AAAA;AACR;AAEJ;AAMO,IAAM,KAAA,GAAQ,CAAC,EAAE,SAAA,EAAW,SAAS,IAAA,EAAM,GAAG,KAAA,EAAM,qBACzDG,cAAAA,CAAC,UAAK,SAAA,EAAW,EAAA,CAAG,aAAA,CAAc,EAAE,OAAA,EAAS,IAAA,EAAM,CAAA,EAAG,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO;AAE/E,KAAA,CAAM,WAAA,GAAc,OAAA","file":"index.js","sourcesContent":["import { clsx, type ClassValue } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}","export const colors = {\n primary: {\n 50: '#FFF4EE',\n 100: '#FFE0CC',\n 200: '#FFBF99',\n 300: '#F08050',\n 400: '#D4602A',\n 500: '#C2440A',\n 600: '#A03808',\n 700: '#8F2F06',\n 800: '#5C1C03',\n 900: '#2E0D01',\n },\n neutral: {\n 50: '#f9f7f5',\n 100: '#f0ece7',\n 200: '#ddd6cc',\n 300: '#c5bab0',\n 400: '#a89b8e',\n 500: '#8a7d72',\n 600: '#6f6358',\n 700: '#564d45',\n 800: '#3c3630',\n 900: '#252019',\n },\n danger: {\n 500: '#ef4444',\n 600: '#dc2626',\n },\n success: {\n 500: '#22c55e',\n 600: '#16a34a',\n },\n warning: {\n 500: '#f59e0b',\n 600: '#d97706',\n },\n} as const\n\nexport const radius = {\n none: '0',\n sm: '0.25rem',\n md: '0.375rem',\n lg: '0.5rem',\n xl: '0.75rem',\n '2xl':'1rem',\n full: '9999px',\n} as const\n\nexport const fontSize = {\n xs: ['0.75rem', { lineHeight: '1rem' }],\n sm: ['0.875rem', { lineHeight: '1.25rem' }],\n base: ['1rem', { lineHeight: '1.5rem' }],\n lg: ['1.125rem', { lineHeight: '1.75rem' }],\n xl: ['1.25rem', { lineHeight: '1.75rem' }],\n} as const","import React from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '../../utils/cn'\n\nexport const buttonVariants = cva(\n 'inline-flex items-center justify-center font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n variant: {\n primary: 'bg-(--color-primary-500) text-white hover:bg-(--color-primary-600) focus-visible:ring-(--color-primary-500)',\n secondary: 'bg-(--color-neutral-100) text-(--color-neutral-900) hover:bg-(--color-neutral-200)',\n outline: 'border border-(--color-primary-500) text-(--color-primary-500) bg-transparent hover:bg-(--color-primary-50)',\n ghost: 'text-(--color-neutral-700) hover:bg-(--color-neutral-100)',\n destructive: 'bg-(--color-danger-500) text-white hover:bg-(--color-danger-600)',\n },\n size: {\n sm: 'h-8 px-3 text-sm rounded-(--radius-md) gap-1.5',\n md: 'h-10 px-4 text-sm rounded-(--radius-md) gap-2',\n lg: 'h-12 px-6 text-base rounded-(--radius-lg) gap-2',\n icon: 'h-10 w-10 rounded-(--radius-md)',\n },\n },\n defaultVariants: {\n variant: 'primary',\n size: 'md',\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n isLoading?: boolean\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, isLoading, children, disabled, ...props }, ref) => (\n <button\n ref={ref}\n className={cn(buttonVariants({ variant, size }), className)}\n disabled={disabled || isLoading}\n {...props}\n >\n {isLoading && (\n <svg className=\"animate-spin h-4 w-4\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle className=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" strokeWidth=\"4\" />\n <path className=\"opacity-75\" fill=\"currentColor\" d=\"M4 12a8 8 0 018-8v8z\" />\n </svg>\n )}\n {children}\n </button>\n )\n)\nButton.displayName = 'Button'","import React from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '../../utils/cn'\n\nexport const inputVariants = cva(\n 'w-full px-3 py-2 text-sm bg-white border rounded-(--radius-md) transition-colors placeholder:text-(--color-neutral-400) focus:outline-none focus:ring-2 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-(--color-neutral-50)',\n {\n variants: {\n state: {\n default: 'border-(--color-neutral-300) text-(--color-neutral-900) focus:border-(--color-primary-500) focus:ring-(--color-primary-500)/20',\n error: 'border-(--color-danger-500) text-(--color-neutral-900) focus:border-(--color-danger-500) focus:ring-(--color-danger-500)/20',\n },\n inputSize: {\n sm: 'h-8 text-xs',\n md: 'h-10 text-sm',\n lg: 'h-12 text-base',\n },\n },\n defaultVariants: {\n state: 'default',\n inputSize: 'md',\n },\n }\n)\n\nexport interface InputProps\n extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>,\n VariantProps<typeof inputVariants> {\n label?: string\n error?: string\n hint?: string\n}\n\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, label, error, hint, id, inputSize, ...props }, ref) => {\n const inputId = id ?? label?.toLowerCase().replace(/\\s+/g, '-')\n return (\n <div className=\"flex flex-col gap-1.5 w-full\">\n {label && (\n <label htmlFor={inputId} className=\"text-sm font-medium text-(--color-neutral-700)\">\n {label}\n </label>\n )}\n <input\n ref={ref}\n id={inputId}\n className={cn(inputVariants({ state: error ? 'error' : 'default', inputSize }), className)}\n {...props}\n />\n {hint && !error && <p className=\"text-xs text-(--color-neutral-500)\">{hint}</p>}\n {error && <p className=\"text-xs text-(--color-danger-500)\">{error}</p>}\n </div>\n )\n }\n)\nInput.displayName = 'Input'","import React from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '../../utils/cn'\n\nexport const badgeVariants = cva(\n 'inline-flex items-center rounded-full font-medium',\n {\n variants: {\n variant: {\n default: 'bg-(--color-primary-500) text-white',\n secondary: 'bg-(--color-neutral-100) text-(--color-neutral-700)',\n outline: 'border border-(--color-primary-500) text-(--color-primary-500)',\n success: 'bg-(--color-success-500)/10 text-(--color-success-600)',\n warning: 'bg-(--color-warning-500)/10 text-(--color-warning-600)',\n destructive: 'bg-(--color-danger-500)/10 text-(--color-danger-600)',\n },\n size: {\n sm: 'px-2 py-0.5 text-xs',\n md: 'px-2.5 py-0.5 text-sm',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n },\n }\n)\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLSpanElement>,\n VariantProps<typeof badgeVariants> {}\n\nexport const Badge = ({ className, variant, size, ...props }: BadgeProps) => (\n <span className={cn(badgeVariants({ variant, size }), className)} {...props} />\n)\nBadge.displayName = 'Badge'"]}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
|
+
import { twMerge } from 'tailwind-merge';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
// src/utils/cn.ts
|
|
8
|
+
function cn(...inputs) {
|
|
9
|
+
return twMerge(clsx(inputs));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// src/tokens/index.ts
|
|
13
|
+
var colors = {
|
|
14
|
+
primary: {
|
|
15
|
+
50: "#FFF4EE",
|
|
16
|
+
100: "#FFE0CC",
|
|
17
|
+
200: "#FFBF99",
|
|
18
|
+
300: "#F08050",
|
|
19
|
+
400: "#D4602A",
|
|
20
|
+
500: "#C2440A",
|
|
21
|
+
600: "#A03808",
|
|
22
|
+
700: "#8F2F06",
|
|
23
|
+
800: "#5C1C03",
|
|
24
|
+
900: "#2E0D01"
|
|
25
|
+
},
|
|
26
|
+
neutral: {
|
|
27
|
+
50: "#f9f7f5",
|
|
28
|
+
100: "#f0ece7",
|
|
29
|
+
200: "#ddd6cc",
|
|
30
|
+
300: "#c5bab0",
|
|
31
|
+
400: "#a89b8e",
|
|
32
|
+
500: "#8a7d72",
|
|
33
|
+
600: "#6f6358",
|
|
34
|
+
700: "#564d45",
|
|
35
|
+
800: "#3c3630",
|
|
36
|
+
900: "#252019"
|
|
37
|
+
},
|
|
38
|
+
danger: {
|
|
39
|
+
500: "#ef4444",
|
|
40
|
+
600: "#dc2626"
|
|
41
|
+
},
|
|
42
|
+
success: {
|
|
43
|
+
500: "#22c55e",
|
|
44
|
+
600: "#16a34a"
|
|
45
|
+
},
|
|
46
|
+
warning: {
|
|
47
|
+
500: "#f59e0b",
|
|
48
|
+
600: "#d97706"
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
var radius = {
|
|
52
|
+
none: "0",
|
|
53
|
+
sm: "0.25rem",
|
|
54
|
+
md: "0.375rem",
|
|
55
|
+
lg: "0.5rem",
|
|
56
|
+
xl: "0.75rem",
|
|
57
|
+
"2xl": "1rem",
|
|
58
|
+
full: "9999px"
|
|
59
|
+
};
|
|
60
|
+
var fontSize = {
|
|
61
|
+
xs: ["0.75rem", { lineHeight: "1rem" }],
|
|
62
|
+
sm: ["0.875rem", { lineHeight: "1.25rem" }],
|
|
63
|
+
base: ["1rem", { lineHeight: "1.5rem" }],
|
|
64
|
+
lg: ["1.125rem", { lineHeight: "1.75rem" }],
|
|
65
|
+
xl: ["1.25rem", { lineHeight: "1.75rem" }]
|
|
66
|
+
};
|
|
67
|
+
var buttonVariants = cva(
|
|
68
|
+
"inline-flex items-center justify-center font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
69
|
+
{
|
|
70
|
+
variants: {
|
|
71
|
+
variant: {
|
|
72
|
+
primary: "bg-(--color-primary-500) text-white hover:bg-(--color-primary-600) focus-visible:ring-(--color-primary-500)",
|
|
73
|
+
secondary: "bg-(--color-neutral-100) text-(--color-neutral-900) hover:bg-(--color-neutral-200)",
|
|
74
|
+
outline: "border border-(--color-primary-500) text-(--color-primary-500) bg-transparent hover:bg-(--color-primary-50)",
|
|
75
|
+
ghost: "text-(--color-neutral-700) hover:bg-(--color-neutral-100)",
|
|
76
|
+
destructive: "bg-(--color-danger-500) text-white hover:bg-(--color-danger-600)"
|
|
77
|
+
},
|
|
78
|
+
size: {
|
|
79
|
+
sm: "h-8 px-3 text-sm rounded-(--radius-md) gap-1.5",
|
|
80
|
+
md: "h-10 px-4 text-sm rounded-(--radius-md) gap-2",
|
|
81
|
+
lg: "h-12 px-6 text-base rounded-(--radius-lg) gap-2",
|
|
82
|
+
icon: "h-10 w-10 rounded-(--radius-md)"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
defaultVariants: {
|
|
86
|
+
variant: "primary",
|
|
87
|
+
size: "md"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
var Button = React.forwardRef(
|
|
92
|
+
({ className, variant, size, isLoading, children, disabled, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
93
|
+
"button",
|
|
94
|
+
{
|
|
95
|
+
ref,
|
|
96
|
+
className: cn(buttonVariants({ variant, size }), className),
|
|
97
|
+
disabled: disabled || isLoading,
|
|
98
|
+
...props,
|
|
99
|
+
children: [
|
|
100
|
+
isLoading && /* @__PURE__ */ jsxs("svg", { className: "animate-spin h-4 w-4", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
|
|
101
|
+
/* @__PURE__ */ jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
102
|
+
/* @__PURE__ */ jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8v8z" })
|
|
103
|
+
] }),
|
|
104
|
+
children
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
);
|
|
109
|
+
Button.displayName = "Button";
|
|
110
|
+
var inputVariants = cva(
|
|
111
|
+
"w-full px-3 py-2 text-sm bg-white border rounded-(--radius-md) transition-colors placeholder:text-(--color-neutral-400) focus:outline-none focus:ring-2 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-(--color-neutral-50)",
|
|
112
|
+
{
|
|
113
|
+
variants: {
|
|
114
|
+
state: {
|
|
115
|
+
default: "border-(--color-neutral-300) text-(--color-neutral-900) focus:border-(--color-primary-500) focus:ring-(--color-primary-500)/20",
|
|
116
|
+
error: "border-(--color-danger-500) text-(--color-neutral-900) focus:border-(--color-danger-500) focus:ring-(--color-danger-500)/20"
|
|
117
|
+
},
|
|
118
|
+
inputSize: {
|
|
119
|
+
sm: "h-8 text-xs",
|
|
120
|
+
md: "h-10 text-sm",
|
|
121
|
+
lg: "h-12 text-base"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
defaultVariants: {
|
|
125
|
+
state: "default",
|
|
126
|
+
inputSize: "md"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
var Input = React.forwardRef(
|
|
131
|
+
({ className, label, error, hint, id, inputSize, ...props }, ref) => {
|
|
132
|
+
const inputId = id != null ? id : label == null ? void 0 : label.toLowerCase().replace(/\s+/g, "-");
|
|
133
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5 w-full", children: [
|
|
134
|
+
label && /* @__PURE__ */ jsx("label", { htmlFor: inputId, className: "text-sm font-medium text-(--color-neutral-700)", children: label }),
|
|
135
|
+
/* @__PURE__ */ jsx(
|
|
136
|
+
"input",
|
|
137
|
+
{
|
|
138
|
+
ref,
|
|
139
|
+
id: inputId,
|
|
140
|
+
className: cn(inputVariants({ state: error ? "error" : "default", inputSize }), className),
|
|
141
|
+
...props
|
|
142
|
+
}
|
|
143
|
+
),
|
|
144
|
+
hint && !error && /* @__PURE__ */ jsx("p", { className: "text-xs text-(--color-neutral-500)", children: hint }),
|
|
145
|
+
error && /* @__PURE__ */ jsx("p", { className: "text-xs text-(--color-danger-500)", children: error })
|
|
146
|
+
] });
|
|
147
|
+
}
|
|
148
|
+
);
|
|
149
|
+
Input.displayName = "Input";
|
|
150
|
+
var badgeVariants = cva(
|
|
151
|
+
"inline-flex items-center rounded-full font-medium",
|
|
152
|
+
{
|
|
153
|
+
variants: {
|
|
154
|
+
variant: {
|
|
155
|
+
default: "bg-(--color-primary-500) text-white",
|
|
156
|
+
secondary: "bg-(--color-neutral-100) text-(--color-neutral-700)",
|
|
157
|
+
outline: "border border-(--color-primary-500) text-(--color-primary-500)",
|
|
158
|
+
success: "bg-(--color-success-500)/10 text-(--color-success-600)",
|
|
159
|
+
warning: "bg-(--color-warning-500)/10 text-(--color-warning-600)",
|
|
160
|
+
destructive: "bg-(--color-danger-500)/10 text-(--color-danger-600)"
|
|
161
|
+
},
|
|
162
|
+
size: {
|
|
163
|
+
sm: "px-2 py-0.5 text-xs",
|
|
164
|
+
md: "px-2.5 py-0.5 text-sm"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
defaultVariants: {
|
|
168
|
+
variant: "default",
|
|
169
|
+
size: "md"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
);
|
|
173
|
+
var Badge = ({ className, variant, size, ...props }) => /* @__PURE__ */ jsx("span", { className: cn(badgeVariants({ variant, size }), className), ...props });
|
|
174
|
+
Badge.displayName = "Badge";
|
|
175
|
+
|
|
176
|
+
export { Badge, Button, Input, badgeVariants, buttonVariants, cn, colors, fontSize, inputVariants, radius };
|
|
177
|
+
//# sourceMappingURL=index.mjs.map
|
|
178
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/cn.ts","../src/tokens/index.ts","../src/components/Button/Button.tsx","../src/components/Input/Input.tsx","../src/components/Badge/Badge.tsx"],"names":["cva","React","jsxs","jsx"],"mappings":";;;;;;;AAGO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;;;ACLO,IAAM,MAAA,GAAS;AAAA,EACpB,OAAA,EAAS;AAAA,IACP,EAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK;AAAA,GACP;AAAA,EACA,OAAA,EAAS;AAAA,IACP,EAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK;AAAA,GACP;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK;AAAA,GACP;AAAA,EACA,OAAA,EAAS;AAAA,IACP,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK;AAAA,GACP;AAAA,EACA,OAAA,EAAS;AAAA,IAC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AA,QACP,OAAA,EAAa,qCAAA;AAAA,QACb,SAAA,EAAa,qDAAA;AAAA,QACb,OAAA,EAAa,gEAAA;AAAA,QACb,OAAA,EAAa,wDAAA;AAAA,QACb,OAAA,EAAa,wDAAA;AAAA,QACb,WAAA,EAAa;AAAA,OACf;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,EAAA,EAAI,qBAAA;AAAA,QACJ,EAAA,EAAI;AAAA;AACN,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,OAAA,EAAS,SAAA;AAAA,MACT,IAAA,EAAM;AAAA;AACR;AAEJ;AAMO,IAAM,KAAA,GAAQ,CAAC,EAAE,SAAA,EAAW,SAAS,IAAA,EAAM,GAAG,KAAA,EAAM,qBACzDG,GAAAA,CAAC,UAAK,SAAA,EAAW,EAAA,CAAG,aAAA,CAAc,EAAE,OAAA,EAAS,IAAA,EAAM,CAAA,EAAG,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO;AAE/E,KAAA,CAAM,WAAA,GAAc,OAAA","file":"index.mjs","sourcesContent":["import { clsx, type ClassValue } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}","export const colors = {\n primary: {\n 50: '#FFF4EE',\n 100: '#FFE0CC',\n 200: '#FFBF99',\n 300: '#F08050',\n 400: '#D4602A',\n 500: '#C2440A',\n 600: '#A03808',\n 700: '#8F2F06',\n 800: '#5C1C03',\n 900: '#2E0D01',\n },\n neutral: {\n 50: '#f9f7f5',\n 100: '#f0ece7',\n 200: '#ddd6cc',\n 300: '#c5bab0',\n 400: '#a89b8e',\n 500: '#8a7d72',\n 600: '#6f6358',\n 700: '#564d45',\n 800: '#3c3630',\n 900: '#252019',\n },\n danger: {\n 500: '#ef4444',\n 600: '#dc2626',\n },\n success: {\n 500: '#22c55e',\n 600: '#16a34a',\n },\n warning: {\n 500: '#f59e0b',\n 600: '#d97706',\n },\n} as const\n\nexport const radius = {\n none: '0',\n sm: '0.25rem',\n md: '0.375rem',\n lg: '0.5rem',\n xl: '0.75rem',\n '2xl':'1rem',\n full: '9999px',\n} as const\n\nexport const fontSize = {\n xs: ['0.75rem', { lineHeight: '1rem' }],\n sm: ['0.875rem', { lineHeight: '1.25rem' }],\n base: ['1rem', { lineHeight: '1.5rem' }],\n lg: ['1.125rem', { lineHeight: '1.75rem' }],\n xl: ['1.25rem', { lineHeight: '1.75rem' }],\n} as const","import React from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '../../utils/cn'\n\nexport const buttonVariants = cva(\n 'inline-flex items-center justify-center font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n variant: {\n primary: 'bg-(--color-primary-500) text-white hover:bg-(--color-primary-600) focus-visible:ring-(--color-primary-500)',\n secondary: 'bg-(--color-neutral-100) text-(--color-neutral-900) hover:bg-(--color-neutral-200)',\n outline: 'border border-(--color-primary-500) text-(--color-primary-500) bg-transparent hover:bg-(--color-primary-50)',\n ghost: 'text-(--color-neutral-700) hover:bg-(--color-neutral-100)',\n destructive: 'bg-(--color-danger-500) text-white hover:bg-(--color-danger-600)',\n },\n size: {\n sm: 'h-8 px-3 text-sm rounded-(--radius-md) gap-1.5',\n md: 'h-10 px-4 text-sm rounded-(--radius-md) gap-2',\n lg: 'h-12 px-6 text-base rounded-(--radius-lg) gap-2',\n icon: 'h-10 w-10 rounded-(--radius-md)',\n },\n },\n defaultVariants: {\n variant: 'primary',\n size: 'md',\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n isLoading?: boolean\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, isLoading, children, disabled, ...props }, ref) => (\n <button\n ref={ref}\n className={cn(buttonVariants({ variant, size }), className)}\n disabled={disabled || isLoading}\n {...props}\n >\n {isLoading && (\n <svg className=\"animate-spin h-4 w-4\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle className=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" strokeWidth=\"4\" />\n <path className=\"opacity-75\" fill=\"currentColor\" d=\"M4 12a8 8 0 018-8v8z\" />\n </svg>\n )}\n {children}\n </button>\n )\n)\nButton.displayName = 'Button'","import React from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '../../utils/cn'\n\nexport const inputVariants = cva(\n 'w-full px-3 py-2 text-sm bg-white border rounded-(--radius-md) transition-colors placeholder:text-(--color-neutral-400) focus:outline-none focus:ring-2 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-(--color-neutral-50)',\n {\n variants: {\n state: {\n default: 'border-(--color-neutral-300) text-(--color-neutral-900) focus:border-(--color-primary-500) focus:ring-(--color-primary-500)/20',\n error: 'border-(--color-danger-500) text-(--color-neutral-900) focus:border-(--color-danger-500) focus:ring-(--color-danger-500)/20',\n },\n inputSize: {\n sm: 'h-8 text-xs',\n md: 'h-10 text-sm',\n lg: 'h-12 text-base',\n },\n },\n defaultVariants: {\n state: 'default',\n inputSize: 'md',\n },\n }\n)\n\nexport interface InputProps\n extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>,\n VariantProps<typeof inputVariants> {\n label?: string\n error?: string\n hint?: string\n}\n\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, label, error, hint, id, inputSize, ...props }, ref) => {\n const inputId = id ?? label?.toLowerCase().replace(/\\s+/g, '-')\n return (\n <div className=\"flex flex-col gap-1.5 w-full\">\n {label && (\n <label htmlFor={inputId} className=\"text-sm font-medium text-(--color-neutral-700)\">\n {label}\n </label>\n )}\n <input\n ref={ref}\n id={inputId}\n className={cn(inputVariants({ state: error ? 'error' : 'default', inputSize }), className)}\n {...props}\n />\n {hint && !error && <p className=\"text-xs text-(--color-neutral-500)\">{hint}</p>}\n {error && <p className=\"text-xs text-(--color-danger-500)\">{error}</p>}\n </div>\n )\n }\n)\nInput.displayName = 'Input'","import React from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '../../utils/cn'\n\nexport const badgeVariants = cva(\n 'inline-flex items-center rounded-full font-medium',\n {\n variants: {\n variant: {\n default: 'bg-(--color-primary-500) text-white',\n secondary: 'bg-(--color-neutral-100) text-(--color-neutral-700)',\n outline: 'border border-(--color-primary-500) text-(--color-primary-500)',\n success: 'bg-(--color-success-500)/10 text-(--color-success-600)',\n warning: 'bg-(--color-warning-500)/10 text-(--color-warning-600)',\n destructive: 'bg-(--color-danger-500)/10 text-(--color-danger-600)',\n },\n size: {\n sm: 'px-2 py-0.5 text-xs',\n md: 'px-2.5 py-0.5 text-sm',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n },\n }\n)\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLSpanElement>,\n VariantProps<typeof badgeVariants> {}\n\nexport const Badge = ({ className, variant, size, ...props }: BadgeProps) => (\n <span className={cn(badgeVariants({ variant, size }), className)} {...props} />\n)\nBadge.displayName = 'Badge'"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ataraui/ataraui-react",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "AtaraUI — A calm, composable component library for React",
|
|
5
|
+
"author": "AtaraUI",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"module": "./dist/index.mjs",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/index.mjs",
|
|
13
|
+
"require": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"atara.css"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsup",
|
|
23
|
+
"dev": "tsup --watch",
|
|
24
|
+
"lint": "tsc --noEmit"
|
|
25
|
+
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"react": ">=17",
|
|
28
|
+
"react-dom": ">=17"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/react": "^18.3.0",
|
|
32
|
+
"@types/react-dom": "^18.3.0",
|
|
33
|
+
"react": "^18.3.0",
|
|
34
|
+
"react-dom": "^18.3.0",
|
|
35
|
+
"tailwindcss": "^4.0.0",
|
|
36
|
+
"tsup": "^8.0.0",
|
|
37
|
+
"typescript": "^5.4.0"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"class-variance-authority": "^0.7.0",
|
|
41
|
+
"clsx": "^2.1.0",
|
|
42
|
+
"tailwind-merge": "^2.3.0"
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
},
|
|
47
|
+
"repository": {
|
|
48
|
+
"type": "git",
|
|
49
|
+
"url": "https://github.com/ataraui/ataraui-react.git"
|
|
50
|
+
}
|
|
51
|
+
}
|