@xjur-ui/react 1.0.0
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/.turbo/turbo-build.log +57 -0
- package/dist/components/resources/icons.d.ts +4 -0
- package/dist/components/resources/icons.js +133 -0
- package/dist/components/resources/logo/horizontal.d.ts +12 -0
- package/dist/components/resources/logo/horizontal.js +107 -0
- package/dist/components/resources/logo/icon.d.ts +12 -0
- package/dist/components/resources/logo/icon.js +79 -0
- package/dist/components/resources/logo/index.d.ts +4 -0
- package/dist/components/resources/logo/index.js +291 -0
- package/dist/components/resources/logo/vertical.d.ts +12 -0
- package/dist/components/resources/logo/vertical.js +107 -0
- package/dist/components/ui/accordion.d.ts +5 -0
- package/dist/components/ui/accordion.js +8 -0
- package/dist/components/ui/button.d.ts +16 -0
- package/dist/components/ui/button.js +95 -0
- package/dist/components/ui/icon.d.ts +12 -0
- package/dist/components/ui/icon.js +158 -0
- package/dist/components/ui/index.d.ts +17 -0
- package/dist/components/ui/index.js +788 -0
- package/dist/components/ui/input/content.d.ts +9 -0
- package/dist/components/ui/input/content.js +183 -0
- package/dist/components/ui/input/index.d.ts +12 -0
- package/dist/components/ui/input/index.js +335 -0
- package/dist/components/ui/input/label.d.ts +12 -0
- package/dist/components/ui/input/label.js +165 -0
- package/dist/components/ui/input/message.d.ts +10 -0
- package/dist/components/ui/input/message.js +128 -0
- package/dist/components/ui/input/root.d.ts +18 -0
- package/dist/components/ui/input/root.js +163 -0
- package/dist/components/ui/input/slot.d.ts +10 -0
- package/dist/components/ui/input/slot.js +20 -0
- package/dist/components/ui/input/text.d.ts +10 -0
- package/dist/components/ui/input/text.js +195 -0
- package/dist/components/ui/logo.d.ts +10 -0
- package/dist/components/ui/logo.js +324 -0
- package/dist/components/ui/otp-input.d.ts +13 -0
- package/dist/components/ui/otp-input.js +47 -0
- package/dist/components/ui/typography.d.ts +17 -0
- package/dist/components/ui/typography.js +78 -0
- package/dist/index.css +770 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +788 -0
- package/eslint.config.js +3 -0
- package/package.json +41 -0
- package/postcss.config.js +5 -0
- package/prettier.config.js +7 -0
- package/src/components/resources/icons.ts +131 -0
- package/src/components/resources/logo/horizontal.tsx +70 -0
- package/src/components/resources/logo/icon.tsx +54 -0
- package/src/components/resources/logo/index.ts +3 -0
- package/src/components/resources/logo/vertical.tsx +70 -0
- package/src/components/ui/accordion.tsx +3 -0
- package/src/components/ui/button.tsx +105 -0
- package/src/components/ui/icon.tsx +29 -0
- package/src/components/ui/index.ts +13 -0
- package/src/components/ui/input/content.tsx +59 -0
- package/src/components/ui/input/index.ts +6 -0
- package/src/components/ui/input/label.tsx +41 -0
- package/src/components/ui/input/message.tsx +37 -0
- package/src/components/ui/input/root.tsx +57 -0
- package/src/components/ui/input/slot.tsx +21 -0
- package/src/components/ui/input/text.tsx +69 -0
- package/src/components/ui/logo.tsx +39 -0
- package/src/components/ui/otp-input.tsx +45 -0
- package/src/components/ui/typography.tsx +85 -0
- package/src/index.css +2 -0
- package/src/index.ts +2 -0
- package/src/types.d.ts +4 -0
- package/tsconfig.json +4 -0
- package/tsup.config.ts +12 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// src/components/ui/typography.tsx
|
|
2
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
+
import { cva } from "@xjur-ui/util";
|
|
4
|
+
import { memo } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
var typographyVariants = cva("", {
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
body: "",
|
|
10
|
+
label: "",
|
|
11
|
+
title: "",
|
|
12
|
+
headline: ""
|
|
13
|
+
},
|
|
14
|
+
size: {
|
|
15
|
+
"sm-2x": "",
|
|
16
|
+
"sm-1x": "",
|
|
17
|
+
sm: "",
|
|
18
|
+
md: "",
|
|
19
|
+
lg: ""
|
|
20
|
+
},
|
|
21
|
+
weight: {
|
|
22
|
+
thin: "font-thin",
|
|
23
|
+
extraLight: "font-extralight",
|
|
24
|
+
light: "font-light",
|
|
25
|
+
normal: "font-normal",
|
|
26
|
+
medium: "font-medium",
|
|
27
|
+
semibold: "font-semibold",
|
|
28
|
+
bold: "font-bold",
|
|
29
|
+
extraBold: "font-extrabold",
|
|
30
|
+
black: "font-black"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
compoundVariants: [
|
|
34
|
+
{ variant: "body", size: "sm-1x", class: "text-size-body-sm-1x" },
|
|
35
|
+
{ variant: "body", size: "sm", class: "text-size-body-sm" },
|
|
36
|
+
{ variant: "body", size: "md", class: "text-size-body-md" },
|
|
37
|
+
{ variant: "body", size: "lg", class: "text-size-body-lg" },
|
|
38
|
+
{ variant: "label", size: "sm-2x", class: "text-size-label-sm-2x" },
|
|
39
|
+
{ variant: "label", size: "sm-1x", class: "text-size-label-sm-1x" },
|
|
40
|
+
{ variant: "label", size: "sm", class: "text-size-label-sm" },
|
|
41
|
+
{ variant: "label", size: "md", class: "text-size-label-md" },
|
|
42
|
+
{ variant: "label", size: "lg", class: "text-size-label-lg" },
|
|
43
|
+
{ variant: "title", size: "sm", class: "text-size-title-sm" },
|
|
44
|
+
{ variant: "title", size: "md", class: "text-size-title-md" },
|
|
45
|
+
{ variant: "title", size: "lg", class: "text-size-title-lg" },
|
|
46
|
+
{ variant: "headline", size: "sm", class: "text-size-headline-sm" },
|
|
47
|
+
{ variant: "headline", size: "md", class: "text-size-headline-md" },
|
|
48
|
+
{ variant: "headline", size: "lg", class: "text-size-headline-lg" }
|
|
49
|
+
],
|
|
50
|
+
defaultVariants: {
|
|
51
|
+
variant: "body",
|
|
52
|
+
size: "md",
|
|
53
|
+
weight: "normal"
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
var Typography = memo(
|
|
57
|
+
({
|
|
58
|
+
variant,
|
|
59
|
+
size,
|
|
60
|
+
weight,
|
|
61
|
+
asChild,
|
|
62
|
+
className,
|
|
63
|
+
...props
|
|
64
|
+
}) => {
|
|
65
|
+
const Component = asChild ? Slot : "span";
|
|
66
|
+
return /* @__PURE__ */ jsx(
|
|
67
|
+
Component,
|
|
68
|
+
{
|
|
69
|
+
className: typographyVariants({ variant, size, weight, className }),
|
|
70
|
+
...props
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
Typography.displayName = "Typography";
|
|
76
|
+
export {
|
|
77
|
+
Typography
|
|
78
|
+
};
|