@a2v2ai/uikit 0.0.8 → 0.0.10
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/Flex/Flex.js +1 -1
- package/Typography/Typography.d.ts +2 -2
- package/Typography/Typography.js +3 -1
- package/package.json +1 -1
package/Flex/Flex.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
declare const typographyVariants: (props?: ({
|
|
3
3
|
align?: "center" | "left" | "right" | "justify" | null | undefined;
|
|
4
|
-
variant?: "h5" | "h2" | "h3" | "caption" | "h1" | "h4" | "h6" | "subtitle1" | "subtitle2" | "body1" | "body2" | "body3" | null | undefined;
|
|
4
|
+
variant?: "h5" | "h2" | "h3" | "caption" | "h1" | "h4" | "h6" | "subtitle1" | "subtitle2" | "body1" | "body2" | "body3" | "subtitle3" | null | undefined;
|
|
5
5
|
color?: "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" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
-
type TypographyVariant = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "subtitle1" | "subtitle2" | "body1" | "body2" | "body3" | "caption";
|
|
7
|
+
type TypographyVariant = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "subtitle1" | "subtitle2" | "subtitle3" | "body1" | "body2" | "body3" | "caption";
|
|
8
8
|
type TypographyColor = "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";
|
|
9
9
|
type TypographyAlign = "left" | "center" | "right" | "justify";
|
|
10
10
|
type TypographyProps<T extends React.ElementType = "p"> = {
|
package/Typography/Typography.js
CHANGED
|
@@ -23,6 +23,7 @@ const typographyVariants = (0, class_variance_authority_1.cva)("", {
|
|
|
23
23
|
h6: "font-semibold text-[20px] leading-none tracking-normal font-sans",
|
|
24
24
|
subtitle1: "font-semibold text-[20px] leading-none tracking-normal font-sans",
|
|
25
25
|
subtitle2: "font-semibold text-[18px] leading-none tracking-normal font-sans",
|
|
26
|
+
subtitle3: "font-semibold text-[16px] leading-none tracking-normal font-sans",
|
|
26
27
|
body1: "font-normal text-[16px] leading-none tracking-normal font-sans",
|
|
27
28
|
body2: "font-normal text-[14px] leading-none tracking-normal font-sans",
|
|
28
29
|
body3: "font-normal text-[12px] leading-none tracking-normal font-sans",
|
|
@@ -119,6 +120,7 @@ const variantElementMap = {
|
|
|
119
120
|
h6: "h6",
|
|
120
121
|
subtitle1: "p",
|
|
121
122
|
subtitle2: "p",
|
|
123
|
+
subtitle3: "p",
|
|
122
124
|
body1: "p",
|
|
123
125
|
body2: "p",
|
|
124
126
|
body3: "p",
|
|
@@ -126,6 +128,6 @@ const variantElementMap = {
|
|
|
126
128
|
};
|
|
127
129
|
function Typography({ className, variant = "body1", color = "default", align, as, asChild = false, ...props }) {
|
|
128
130
|
const defaultElement = variant ? variantElementMap[variant] : "p";
|
|
129
|
-
const Component = asChild ? react_slot_1.Slot :
|
|
131
|
+
const Component = asChild ? react_slot_1.Slot : as ?? defaultElement;
|
|
130
132
|
return ((0, jsx_runtime_1.jsx)(Component, { "data-slot": "typography", className: (0, utils_1.cn)(typographyVariants({ variant, color, align, className })), ...props }));
|
|
131
133
|
}
|