@a2v2ai/uikit 0.0.23 → 0.0.25
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/Input/Input.d.ts +4 -0
- package/Input/Input.js +5 -4
- package/Label/Label.d.ts +5 -4
- package/Label/Label.js +7 -8
- package/Select/Select.d.ts +4 -0
- package/Select/Select.js +3 -2
- package/Textarea/Textarea.d.ts +4 -0
- package/Textarea/Textarea.js +3 -2
- package/Typography/Typography.d.ts +5 -4
- package/Typography/Typography.js +3 -90
- package/index.d.ts +1 -1
- package/lib/typography-types.d.ts +4 -0
- package/lib/typography-types.js +93 -0
- package/package.json +1 -1
package/Input/Input.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { type TextVariant, type TextColor } from "../lib/typography-types";
|
|
2
3
|
type InputSize = "mini" | "small" | "regular" | "large";
|
|
3
4
|
type InputRoundness = "default" | "round";
|
|
4
5
|
type InputVariant = "default" | "error";
|
|
@@ -11,6 +12,9 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
|
|
|
11
12
|
size?: InputSize;
|
|
12
13
|
roundness?: InputRoundness;
|
|
13
14
|
variant?: InputVariant;
|
|
15
|
+
label?: string;
|
|
16
|
+
labelVariant?: TextVariant;
|
|
17
|
+
labelColor?: TextColor;
|
|
14
18
|
leftIcon?: React.ReactNode;
|
|
15
19
|
rightIcon?: React.ReactNode;
|
|
16
20
|
leftAddon?: React.ReactNode;
|
package/Input/Input.js
CHANGED
|
@@ -39,6 +39,7 @@ const React = __importStar(require("react"));
|
|
|
39
39
|
const class_variance_authority_1 = require("class-variance-authority");
|
|
40
40
|
const utils_1 = require("../lib/utils");
|
|
41
41
|
const Typography_1 = require("../Typography/Typography");
|
|
42
|
+
const Label_1 = require("../Label/Label");
|
|
42
43
|
const inputVariants = (0, class_variance_authority_1.cva)("flex w-full bg-white border font-normal font-sans transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-grey-400 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-grey-50", {
|
|
43
44
|
variants: {
|
|
44
45
|
size: {
|
|
@@ -63,15 +64,15 @@ const inputVariants = (0, class_variance_authority_1.cva)("flex w-full bg-white
|
|
|
63
64
|
},
|
|
64
65
|
});
|
|
65
66
|
exports.inputVariants = inputVariants;
|
|
66
|
-
const Input = React.forwardRef(({ className, type = "text", size, roundness, variant, leftIcon, rightIcon, leftAddon, rightAddon, rightElement, error, ...props }, ref) => {
|
|
67
|
+
const Input = React.forwardRef(({ className, type = "text", size, roundness, variant, label, labelVariant = "body2", labelColor = "main-800", leftIcon, rightIcon, leftAddon, rightAddon, rightElement, error, id, ...props }, ref) => {
|
|
67
68
|
const hasAddons = leftIcon || rightIcon || leftAddon || rightAddon || rightElement;
|
|
68
69
|
const computedVariant = error ? "error" : variant;
|
|
69
70
|
if (hasAddons) {
|
|
70
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col w-full", children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)("flex items-center gap-2 bg-white border font-sans transition-colors w-full", "focus-within:ring-[3px]", computedVariant === "error"
|
|
71
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2 w-full", children: [label && ((0, jsx_runtime_1.jsx)(Label_1.Label, { htmlFor: id, variant: labelVariant, color: labelColor, children: label })), (0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)("flex items-center gap-2 bg-white border font-sans transition-colors w-full", "focus-within:ring-[3px]", computedVariant === "error"
|
|
71
72
|
? "border-error-500 focus-within:border-error-500 focus-within:ring-error-200"
|
|
72
|
-
: "border-grey-300 focus-within:border-grey-300 focus-within:ring-grey-300/50", size === "mini" && "h-6 pl-3 pr-0.5 text-xs rounded-md", size === "small" && "h-8 pl-3 pr-0.5 text-sm rounded-md", size === "regular" && "h-9 pl-3 pr-0.5 text-sm rounded-lg", size === "large" && "h-10 pl-3 pr-0.5 text-base rounded-lg", !size && "h-9 pl-3 pr-0.5 text-sm rounded-lg", !rightElement && "pr-3", roundness === "round" && "!rounded-full", props.disabled && "opacity-50 cursor-not-allowed bg-grey-50", className), children: [leftIcon && ((0, jsx_runtime_1.jsx)("span", { className: "shrink-0 text-grey-500 [&_svg]:size-4", children: leftIcon })), leftAddon && ((0, jsx_runtime_1.jsx)("span", { className: "shrink-0 text-grey-500", children: leftAddon })), (0, jsx_runtime_1.jsx)("input", { type: type, className: (0, utils_1.cn)("flex-1 min-w-0 bg-transparent border-0 outline-none placeholder:text-grey-400", "disabled:cursor-not-allowed"), ref: ref, ...props }), rightAddon && ((0, jsx_runtime_1.jsx)("span", { className: "shrink-0 text-grey-500", children: rightAddon })), rightIcon && ((0, jsx_runtime_1.jsx)("span", { className: "shrink-0 text-grey-500 [&_svg]:size-4", children: rightIcon })), rightElement && ((0, jsx_runtime_1.jsx)("span", { className: "shrink-0", children: rightElement }))] }), error && ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: "error-600", className: "mt-1", children: error }))] }));
|
|
73
|
+
: "border-grey-300 focus-within:border-grey-300 focus-within:ring-grey-300/50", size === "mini" && "h-6 pl-3 pr-0.5 text-xs rounded-md", size === "small" && "h-8 pl-3 pr-0.5 text-sm rounded-md", size === "regular" && "h-9 pl-3 pr-0.5 text-sm rounded-lg", size === "large" && "h-10 pl-3 pr-0.5 text-base rounded-lg", !size && "h-9 pl-3 pr-0.5 text-sm rounded-lg", !rightElement && "pr-3", roundness === "round" && "!rounded-full", props.disabled && "opacity-50 cursor-not-allowed bg-grey-50", className), children: [leftIcon && ((0, jsx_runtime_1.jsx)("span", { className: "shrink-0 text-grey-500 [&_svg]:size-4", children: leftIcon })), leftAddon && ((0, jsx_runtime_1.jsx)("span", { className: "shrink-0 text-grey-500", children: leftAddon })), (0, jsx_runtime_1.jsx)("input", { type: type, id: id, className: (0, utils_1.cn)("flex-1 min-w-0 bg-transparent border-0 outline-none placeholder:text-grey-400", "disabled:cursor-not-allowed"), ref: ref, ...props }), rightAddon && ((0, jsx_runtime_1.jsx)("span", { className: "shrink-0 text-grey-500", children: rightAddon })), rightIcon && ((0, jsx_runtime_1.jsx)("span", { className: "shrink-0 text-grey-500 [&_svg]:size-4", children: rightIcon })), rightElement && ((0, jsx_runtime_1.jsx)("span", { className: "shrink-0", children: rightElement }))] }), error && ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: "error-600", className: "mt-1", children: error }))] }));
|
|
73
74
|
}
|
|
74
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col w-full", children: [(0, jsx_runtime_1.jsx)("input", { type: type, className: (0, utils_1.cn)(inputVariants({ size, roundness, variant: computedVariant, className })), ref: ref, ...props }), error && ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: "error-600", className: "mt-1", children: error }))] }));
|
|
75
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2 w-full", children: [label && ((0, jsx_runtime_1.jsx)(Label_1.Label, { htmlFor: id, variant: labelVariant, color: labelColor, children: label })), (0, jsx_runtime_1.jsx)("input", { type: type, id: id, className: (0, utils_1.cn)(inputVariants({ size, roundness, variant: computedVariant, className })), ref: ref, ...props }), error && ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: "error-600", className: "mt-1", children: error }))] }));
|
|
75
76
|
});
|
|
76
77
|
exports.Input = Input;
|
|
77
78
|
Input.displayName = "Input";
|
package/Label/Label.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
-
type
|
|
3
|
+
import { type TextVariant, type TextColor } from "../lib/typography-types";
|
|
4
4
|
declare const labelVariants: (props?: ({
|
|
5
|
-
|
|
5
|
+
textVariant?: TextVariant | null | undefined;
|
|
6
|
+
color?: TextColor | null | undefined;
|
|
6
7
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
8
|
export interface LabelProps extends React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> {
|
|
8
|
-
variant?:
|
|
9
|
+
variant?: TextVariant;
|
|
10
|
+
color?: TextColor;
|
|
9
11
|
}
|
|
10
12
|
declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
11
13
|
export { Label, labelVariants };
|
|
12
|
-
export type { LabelVariant };
|
package/Label/Label.js
CHANGED
|
@@ -39,19 +39,18 @@ const React = __importStar(require("react"));
|
|
|
39
39
|
const LabelPrimitive = __importStar(require("@radix-ui/react-label"));
|
|
40
40
|
const class_variance_authority_1 = require("class-variance-authority");
|
|
41
41
|
const utils_1 = require("../lib/utils");
|
|
42
|
-
const
|
|
42
|
+
const typography_types_1 = require("../lib/typography-types");
|
|
43
|
+
const labelVariants = (0, class_variance_authority_1.cva)("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", {
|
|
43
44
|
variants: {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
muted: "text-grey-500",
|
|
47
|
-
error: "text-error-600",
|
|
48
|
-
},
|
|
45
|
+
textVariant: typography_types_1.textVariantClasses,
|
|
46
|
+
color: typography_types_1.textColorClasses,
|
|
49
47
|
},
|
|
50
48
|
defaultVariants: {
|
|
51
|
-
|
|
49
|
+
textVariant: "body2",
|
|
50
|
+
color: "main-950",
|
|
52
51
|
},
|
|
53
52
|
});
|
|
54
53
|
exports.labelVariants = labelVariants;
|
|
55
|
-
const Label = React.forwardRef(({ className, variant, ...props }, ref) => ((0, jsx_runtime_1.jsx)(LabelPrimitive.Root, { ref: ref, className: (0, utils_1.cn)(labelVariants({ variant }), className), ...props })));
|
|
54
|
+
const Label = React.forwardRef(({ className, variant, color, ...props }, ref) => ((0, jsx_runtime_1.jsx)(LabelPrimitive.Root, { ref: ref, className: (0, utils_1.cn)(labelVariants({ textVariant: variant, color }), className), ...props })));
|
|
56
55
|
exports.Label = Label;
|
|
57
56
|
Label.displayName = LabelPrimitive.Root.displayName;
|
package/Select/Select.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
|
+
import { type TextVariant, type TextColor } from "../lib/typography-types";
|
|
3
4
|
type SelectTriggerSize = "small" | "regular" | "large";
|
|
4
5
|
type SelectTriggerVariant = "default" | "error";
|
|
5
6
|
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
@@ -12,6 +13,9 @@ declare const selectTriggerVariants: (props?: ({
|
|
|
12
13
|
export interface SelectTriggerProps extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> {
|
|
13
14
|
size?: SelectTriggerSize;
|
|
14
15
|
variant?: SelectTriggerVariant;
|
|
16
|
+
label?: string;
|
|
17
|
+
labelVariant?: TextVariant;
|
|
18
|
+
labelColor?: TextColor;
|
|
15
19
|
error?: string;
|
|
16
20
|
}
|
|
17
21
|
declare const SelectTrigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
package/Select/Select.js
CHANGED
|
@@ -41,6 +41,7 @@ const lucide_react_1 = require("lucide-react");
|
|
|
41
41
|
const class_variance_authority_1 = require("class-variance-authority");
|
|
42
42
|
const utils_1 = require("../lib/utils");
|
|
43
43
|
const Typography_1 = require("../Typography/Typography");
|
|
44
|
+
const Label_1 = require("../Label/Label");
|
|
44
45
|
const Select = SelectPrimitive.Root;
|
|
45
46
|
exports.Select = Select;
|
|
46
47
|
const SelectGroup = SelectPrimitive.Group;
|
|
@@ -65,9 +66,9 @@ const selectTriggerVariants = (0, class_variance_authority_1.cva)("flex w-full i
|
|
|
65
66
|
},
|
|
66
67
|
});
|
|
67
68
|
exports.selectTriggerVariants = selectTriggerVariants;
|
|
68
|
-
const SelectTrigger = React.forwardRef(({ className, size, variant, error, children, ...props }, ref) => {
|
|
69
|
+
const SelectTrigger = React.forwardRef(({ className, size, variant, label, labelVariant = "body2", labelColor = "main-800", error, children, id, ...props }, ref) => {
|
|
69
70
|
const computedVariant = error ? "error" : variant;
|
|
70
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col w-full", children: [(0, jsx_runtime_1.jsxs)(SelectPrimitive.Trigger, { ref: ref, className: (0, utils_1.cn)(selectTriggerVariants({ size, variant: computedVariant }), className), ...props, children: [children, (0, jsx_runtime_1.jsx)(SelectPrimitive.Icon, { asChild: true, children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "size-4 opacity-50" }) })] }), error && ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: "error-600", className: "mt-1", children: error }))] }));
|
|
71
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2 w-full", children: [label && ((0, jsx_runtime_1.jsx)(Label_1.Label, { htmlFor: id, variant: labelVariant, color: labelColor, children: label })), (0, jsx_runtime_1.jsxs)(SelectPrimitive.Trigger, { ref: ref, id: id, className: (0, utils_1.cn)(selectTriggerVariants({ size, variant: computedVariant }), className), ...props, children: [children, (0, jsx_runtime_1.jsx)(SelectPrimitive.Icon, { asChild: true, children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "size-4 opacity-50" }) })] }), error && ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: "error-600", className: "mt-1", children: error }))] }));
|
|
71
72
|
});
|
|
72
73
|
exports.SelectTrigger = SelectTrigger;
|
|
73
74
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
package/Textarea/Textarea.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { type TextVariant, type TextColor } from "../lib/typography-types";
|
|
2
3
|
type TextareaVariant = "default" | "error";
|
|
3
4
|
type TextareaResize = "none" | "vertical" | "horizontal" | "both";
|
|
4
5
|
declare const textareaVariants: (props?: ({
|
|
@@ -8,6 +9,9 @@ declare const textareaVariants: (props?: ({
|
|
|
8
9
|
export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
9
10
|
variant?: TextareaVariant;
|
|
10
11
|
resize?: TextareaResize;
|
|
12
|
+
label?: string;
|
|
13
|
+
labelVariant?: TextVariant;
|
|
14
|
+
labelColor?: TextColor;
|
|
11
15
|
}
|
|
12
16
|
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
13
17
|
export { Textarea, textareaVariants };
|
package/Textarea/Textarea.js
CHANGED
|
@@ -38,6 +38,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
38
38
|
const React = __importStar(require("react"));
|
|
39
39
|
const class_variance_authority_1 = require("class-variance-authority");
|
|
40
40
|
const utils_1 = require("../lib/utils");
|
|
41
|
+
const Label_1 = require("../Label/Label");
|
|
41
42
|
const textareaVariants = (0, class_variance_authority_1.cva)("flex min-h-[80px] w-full rounded-lg border bg-white px-3 py-2 text-sm font-normal font-sans transition-colors placeholder:text-grey-400 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-grey-50", {
|
|
42
43
|
variants: {
|
|
43
44
|
variant: {
|
|
@@ -57,8 +58,8 @@ const textareaVariants = (0, class_variance_authority_1.cva)("flex min-h-[80px]
|
|
|
57
58
|
},
|
|
58
59
|
});
|
|
59
60
|
exports.textareaVariants = textareaVariants;
|
|
60
|
-
const Textarea = React.forwardRef(({ className, variant, resize, ...props }, ref) => {
|
|
61
|
-
return ((0, jsx_runtime_1.jsx)("textarea", { className: (0, utils_1.cn)(textareaVariants({ variant, resize }), className), ref: ref, ...props }));
|
|
61
|
+
const Textarea = React.forwardRef(({ className, variant, resize, label, labelVariant = "body2", labelColor = "main-800", id, ...props }, ref) => {
|
|
62
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2 w-full", children: [label && ((0, jsx_runtime_1.jsx)(Label_1.Label, { htmlFor: id, variant: labelVariant, color: labelColor, children: label })), (0, jsx_runtime_1.jsx)("textarea", { id: id, className: (0, utils_1.cn)(textareaVariants({ variant, resize }), className), ref: ref, ...props })] }));
|
|
62
63
|
});
|
|
63
64
|
exports.Textarea = Textarea;
|
|
64
65
|
Textarea.displayName = "Textarea";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { type TextVariant, type TextColor } from "../lib/typography-types";
|
|
2
3
|
declare const typographyVariants: (props?: ({
|
|
3
4
|
align?: "center" | "left" | "right" | "justify" | null | undefined;
|
|
4
|
-
variant?:
|
|
5
|
-
color?:
|
|
5
|
+
variant?: TextVariant | null | undefined;
|
|
6
|
+
color?: TextColor | null | undefined;
|
|
6
7
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
-
type TypographyVariant =
|
|
8
|
-
type TypographyColor =
|
|
8
|
+
type TypographyVariant = TextVariant;
|
|
9
|
+
type TypographyColor = TextColor;
|
|
9
10
|
type TypographyAlign = "left" | "center" | "right" | "justify";
|
|
10
11
|
type TypographyProps<T extends React.ElementType = "p"> = {
|
|
11
12
|
as?: T;
|
package/Typography/Typography.js
CHANGED
|
@@ -6,6 +6,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
6
6
|
const react_slot_1 = require("@radix-ui/react-slot");
|
|
7
7
|
const class_variance_authority_1 = require("class-variance-authority");
|
|
8
8
|
const utils_1 = require("../lib/utils");
|
|
9
|
+
const typography_types_1 = require("../lib/typography-types");
|
|
9
10
|
const typographyVariants = (0, class_variance_authority_1.cva)("", {
|
|
10
11
|
variants: {
|
|
11
12
|
align: {
|
|
@@ -14,96 +15,8 @@ const typographyVariants = (0, class_variance_authority_1.cva)("", {
|
|
|
14
15
|
right: "text-right",
|
|
15
16
|
justify: "text-justify",
|
|
16
17
|
},
|
|
17
|
-
variant:
|
|
18
|
-
|
|
19
|
-
h2: "font-bold text-[48px] leading-none tracking-normal font-sans",
|
|
20
|
-
h3: "font-bold text-[32px] leading-none tracking-normal font-sans",
|
|
21
|
-
h4: "font-bold text-[24px] leading-[1.2] tracking-[-0.48px] font-sans",
|
|
22
|
-
h5: "font-bold text-[20px] leading-none tracking-normal font-sans",
|
|
23
|
-
h6: "font-semibold text-[20px] leading-none tracking-normal font-sans",
|
|
24
|
-
subtitle1: "font-semibold text-[20px] leading-none tracking-normal font-sans",
|
|
25
|
-
subtitle2: "font-semibold text-[18px] leading-none tracking-normal font-sans",
|
|
26
|
-
subtitle3: "font-semibold text-[16px] leading-none tracking-normal font-sans",
|
|
27
|
-
body1: "font-normal text-[16px] leading-none tracking-normal font-sans",
|
|
28
|
-
body2: "font-normal text-[14px] leading-none tracking-normal font-sans",
|
|
29
|
-
body3: "font-normal text-[12px] leading-none tracking-normal font-sans",
|
|
30
|
-
caption: "font-light text-[12px] leading-none tracking-normal font-sans",
|
|
31
|
-
},
|
|
32
|
-
color: {
|
|
33
|
-
default: "text-foreground",
|
|
34
|
-
// Main colors
|
|
35
|
-
"main-50": "text-main-50",
|
|
36
|
-
"main-100": "text-main-100",
|
|
37
|
-
"main-200": "text-main-200",
|
|
38
|
-
"main-300": "text-main-300",
|
|
39
|
-
"main-400": "text-main-400",
|
|
40
|
-
"main-500": "text-main-500",
|
|
41
|
-
"main-600": "text-main-600",
|
|
42
|
-
"main-700": "text-main-700",
|
|
43
|
-
"main-800": "text-main-800",
|
|
44
|
-
"main-900": "text-main-900",
|
|
45
|
-
"main-950": "text-main-950",
|
|
46
|
-
// Success colors
|
|
47
|
-
"success-50": "text-success-50",
|
|
48
|
-
"success-100": "text-success-100",
|
|
49
|
-
"success-200": "text-success-200",
|
|
50
|
-
"success-300": "text-success-300",
|
|
51
|
-
"success-400": "text-success-400",
|
|
52
|
-
"success-500": "text-success-500",
|
|
53
|
-
"success-600": "text-success-600",
|
|
54
|
-
"success-700": "text-success-700",
|
|
55
|
-
"success-800": "text-success-800",
|
|
56
|
-
"success-900": "text-success-900",
|
|
57
|
-
"success-950": "text-success-950",
|
|
58
|
-
// Accent colors
|
|
59
|
-
"accent-50": "text-accent-50",
|
|
60
|
-
"accent-100": "text-accent-100",
|
|
61
|
-
"accent-200": "text-accent-200",
|
|
62
|
-
"accent-300": "text-accent-300",
|
|
63
|
-
"accent-400": "text-accent-400",
|
|
64
|
-
"accent-500": "text-accent-500",
|
|
65
|
-
"accent-600": "text-accent-600",
|
|
66
|
-
"accent-700": "text-accent-700",
|
|
67
|
-
"accent-800": "text-accent-800",
|
|
68
|
-
"accent-900": "text-accent-900",
|
|
69
|
-
"accent-950": "text-accent-950",
|
|
70
|
-
// Error colors
|
|
71
|
-
"error-50": "text-error-50",
|
|
72
|
-
"error-100": "text-error-100",
|
|
73
|
-
"error-200": "text-error-200",
|
|
74
|
-
"error-300": "text-error-300",
|
|
75
|
-
"error-400": "text-error-400",
|
|
76
|
-
"error-500": "text-error-500",
|
|
77
|
-
"error-600": "text-error-600",
|
|
78
|
-
"error-700": "text-error-700",
|
|
79
|
-
"error-800": "text-error-800",
|
|
80
|
-
"error-900": "text-error-900",
|
|
81
|
-
"error-950": "text-error-950",
|
|
82
|
-
// Warning colors
|
|
83
|
-
"warning-50": "text-warning-50",
|
|
84
|
-
"warning-100": "text-warning-100",
|
|
85
|
-
"warning-200": "text-warning-200",
|
|
86
|
-
"warning-300": "text-warning-300",
|
|
87
|
-
"warning-400": "text-warning-400",
|
|
88
|
-
"warning-500": "text-warning-500",
|
|
89
|
-
"warning-600": "text-warning-600",
|
|
90
|
-
"warning-700": "text-warning-700",
|
|
91
|
-
"warning-800": "text-warning-800",
|
|
92
|
-
"warning-900": "text-warning-900",
|
|
93
|
-
"warning-950": "text-warning-950",
|
|
94
|
-
// Grey colors
|
|
95
|
-
"grey-50": "text-grey-50",
|
|
96
|
-
"grey-100": "text-grey-100",
|
|
97
|
-
"grey-200": "text-grey-200",
|
|
98
|
-
"grey-300": "text-grey-300",
|
|
99
|
-
"grey-400": "text-grey-400",
|
|
100
|
-
"grey-500": "text-grey-500",
|
|
101
|
-
"grey-600": "text-grey-600",
|
|
102
|
-
"grey-700": "text-grey-700",
|
|
103
|
-
"grey-800": "text-grey-800",
|
|
104
|
-
"grey-900": "text-grey-900",
|
|
105
|
-
"grey-950": "text-grey-950",
|
|
106
|
-
},
|
|
18
|
+
variant: typography_types_1.textVariantClasses,
|
|
19
|
+
color: typography_types_1.textColorClasses,
|
|
107
20
|
},
|
|
108
21
|
defaultVariants: {
|
|
109
22
|
variant: "body1",
|
package/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export { Flex, flexVariants, type FlexProps, type FlexDirection, type FlexAlign,
|
|
|
17
17
|
export { IconButton, iconButtonVariants, type IconButtonProps, type IconButtonVariant, type IconButtonSize, type IconButtonRoundness } from "./IconButton/IconButton";
|
|
18
18
|
export { Input, inputVariants, type InputProps, type InputSize, type InputRoundness, type InputVariant } from "./Input/Input";
|
|
19
19
|
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator, inputOTPVariants, inputOTPSlotVariants, type InputOTPProps, type InputOTPSlotProps, type InputOTPSlotSize, } from "./InputOTP/InputOTP";
|
|
20
|
-
export { Label, labelVariants, type LabelProps
|
|
20
|
+
export { Label, labelVariants, type LabelProps } from "./Label/Label";
|
|
21
21
|
export { Loader, loaderVariants, type LoaderProps, type LoaderSize, type LoaderColor } from "./Loader/Loader";
|
|
22
22
|
export { Menubar, MenubarPortal, MenubarMenu, MenubarTrigger, MenubarContent, MenubarGroup, MenubarSeparator, MenubarLabel, MenubarItem, MenubarShortcut, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarSub, MenubarSubTrigger, MenubarSubContent, } from "./Menubar/Menubar";
|
|
23
23
|
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor } from "./Popover/Popover";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type TextVariant = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "subtitle1" | "subtitle2" | "subtitle3" | "body1" | "body2" | "body3" | "caption";
|
|
2
|
+
export type TextColor = "default" | "main-50" | "main-100" | "main-200" | "main-300" | "main-400" | "main-500" | "main-600" | "main-700" | "main-800" | "main-900" | "main-950" | "success-50" | "success-100" | "success-200" | "success-300" | "success-400" | "success-500" | "success-600" | "success-700" | "success-800" | "success-900" | "success-950" | "accent-50" | "accent-100" | "accent-200" | "accent-300" | "accent-400" | "accent-500" | "accent-600" | "accent-700" | "accent-800" | "accent-900" | "accent-950" | "error-50" | "error-100" | "error-200" | "error-300" | "error-400" | "error-500" | "error-600" | "error-700" | "error-800" | "error-900" | "error-950" | "warning-50" | "warning-100" | "warning-200" | "warning-300" | "warning-400" | "warning-500" | "warning-600" | "warning-700" | "warning-800" | "warning-900" | "warning-950" | "grey-50" | "grey-100" | "grey-200" | "grey-300" | "grey-400" | "grey-500" | "grey-600" | "grey-700" | "grey-800" | "grey-900" | "grey-950";
|
|
3
|
+
export declare const textVariantClasses: Record<TextVariant, string>;
|
|
4
|
+
export declare const textColorClasses: Record<TextColor, string>;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.textColorClasses = exports.textVariantClasses = void 0;
|
|
4
|
+
exports.textVariantClasses = {
|
|
5
|
+
h1: "font-extrabold text-[64px] leading-none tracking-normal font-sans",
|
|
6
|
+
h2: "font-bold text-[48px] leading-none tracking-normal font-sans",
|
|
7
|
+
h3: "font-bold text-[32px] leading-none tracking-normal font-sans",
|
|
8
|
+
h4: "font-bold text-[24px] leading-[1.2] tracking-[-0.48px] font-sans",
|
|
9
|
+
h5: "font-bold text-[20px] leading-none tracking-normal font-sans",
|
|
10
|
+
h6: "font-semibold text-[20px] leading-none tracking-normal font-sans",
|
|
11
|
+
subtitle1: "font-semibold text-[20px] leading-none tracking-normal font-sans",
|
|
12
|
+
subtitle2: "font-semibold text-[18px] leading-none tracking-normal font-sans",
|
|
13
|
+
subtitle3: "font-semibold text-[16px] leading-none tracking-normal font-sans",
|
|
14
|
+
body1: "font-normal text-[16px] leading-none tracking-normal font-sans",
|
|
15
|
+
body2: "font-normal text-[14px] leading-none tracking-normal font-sans",
|
|
16
|
+
body3: "font-normal text-[12px] leading-none tracking-normal font-sans",
|
|
17
|
+
caption: "font-light text-[12px] leading-none tracking-normal font-sans",
|
|
18
|
+
};
|
|
19
|
+
exports.textColorClasses = {
|
|
20
|
+
default: "text-main-800",
|
|
21
|
+
// Main colors
|
|
22
|
+
"main-50": "text-main-50",
|
|
23
|
+
"main-100": "text-main-100",
|
|
24
|
+
"main-200": "text-main-200",
|
|
25
|
+
"main-300": "text-main-300",
|
|
26
|
+
"main-400": "text-main-400",
|
|
27
|
+
"main-500": "text-main-500",
|
|
28
|
+
"main-600": "text-main-600",
|
|
29
|
+
"main-700": "text-main-700",
|
|
30
|
+
"main-800": "text-main-800",
|
|
31
|
+
"main-900": "text-main-900",
|
|
32
|
+
"main-950": "text-main-950",
|
|
33
|
+
// Success colors
|
|
34
|
+
"success-50": "text-success-50",
|
|
35
|
+
"success-100": "text-success-100",
|
|
36
|
+
"success-200": "text-success-200",
|
|
37
|
+
"success-300": "text-success-300",
|
|
38
|
+
"success-400": "text-success-400",
|
|
39
|
+
"success-500": "text-success-500",
|
|
40
|
+
"success-600": "text-success-600",
|
|
41
|
+
"success-700": "text-success-700",
|
|
42
|
+
"success-800": "text-success-800",
|
|
43
|
+
"success-900": "text-success-900",
|
|
44
|
+
"success-950": "text-success-950",
|
|
45
|
+
// Accent colors
|
|
46
|
+
"accent-50": "text-accent-50",
|
|
47
|
+
"accent-100": "text-accent-100",
|
|
48
|
+
"accent-200": "text-accent-200",
|
|
49
|
+
"accent-300": "text-accent-300",
|
|
50
|
+
"accent-400": "text-accent-400",
|
|
51
|
+
"accent-500": "text-accent-500",
|
|
52
|
+
"accent-600": "text-accent-600",
|
|
53
|
+
"accent-700": "text-accent-700",
|
|
54
|
+
"accent-800": "text-accent-800",
|
|
55
|
+
"accent-900": "text-accent-900",
|
|
56
|
+
"accent-950": "text-accent-950",
|
|
57
|
+
// Error colors
|
|
58
|
+
"error-50": "text-error-50",
|
|
59
|
+
"error-100": "text-error-100",
|
|
60
|
+
"error-200": "text-error-200",
|
|
61
|
+
"error-300": "text-error-300",
|
|
62
|
+
"error-400": "text-error-400",
|
|
63
|
+
"error-500": "text-error-500",
|
|
64
|
+
"error-600": "text-error-600",
|
|
65
|
+
"error-700": "text-error-700",
|
|
66
|
+
"error-800": "text-error-800",
|
|
67
|
+
"error-900": "text-error-900",
|
|
68
|
+
"error-950": "text-error-950",
|
|
69
|
+
// Warning colors
|
|
70
|
+
"warning-50": "text-warning-50",
|
|
71
|
+
"warning-100": "text-warning-100",
|
|
72
|
+
"warning-200": "text-warning-200",
|
|
73
|
+
"warning-300": "text-warning-300",
|
|
74
|
+
"warning-400": "text-warning-400",
|
|
75
|
+
"warning-500": "text-warning-500",
|
|
76
|
+
"warning-600": "text-warning-600",
|
|
77
|
+
"warning-700": "text-warning-700",
|
|
78
|
+
"warning-800": "text-warning-800",
|
|
79
|
+
"warning-900": "text-warning-900",
|
|
80
|
+
"warning-950": "text-warning-950",
|
|
81
|
+
// Grey colors
|
|
82
|
+
"grey-50": "text-grey-50",
|
|
83
|
+
"grey-100": "text-grey-100",
|
|
84
|
+
"grey-200": "text-grey-200",
|
|
85
|
+
"grey-300": "text-grey-300",
|
|
86
|
+
"grey-400": "text-grey-400",
|
|
87
|
+
"grey-500": "text-grey-500",
|
|
88
|
+
"grey-600": "text-grey-600",
|
|
89
|
+
"grey-700": "text-grey-700",
|
|
90
|
+
"grey-800": "text-grey-800",
|
|
91
|
+
"grey-900": "text-grey-900",
|
|
92
|
+
"grey-950": "text-grey-950",
|
|
93
|
+
};
|