@vaneui/ui 0.0.1 → 0.0.3

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.
@@ -1,51 +1,51 @@
1
- export const fontWeightClasses = {
2
- thin: "font-thin",
3
- extralight: "font-extralight",
4
- light: "font-light",
5
- normal: "font-normal",
6
- medium: "font-medium",
7
- semibold: "font-semibold",
8
- bold: "font-bold",
9
- extrabold: "font-extrabold",
10
- black: "font-black",
11
- }
12
-
13
- export const fontStyleClasses = {
14
- italic: "italic",
15
- notItalic: "not-italic",
16
- }
17
-
18
- export const fontFamilyClasses = {
19
- sans: "font-sans",
20
- serif: "font-serif",
21
- mono: "font-mono",
22
- }
23
-
24
- export const textDecorationClasses = {
25
- underline: "underline",
26
- lineThrough: "line-through",
27
- noUnderline: "no-underline",
28
- overline: "overline",
29
- }
30
-
31
- export const textTransformClasses = {
32
- uppercase: "uppercase",
33
- lowercase: "lowercase",
34
- capitalize: "capitalize",
35
- normalCase: "normal-case",
36
- }
37
-
38
- export const textAppearanceClasses = {
39
- default: "text-(--text-color-default)",
40
- primary: "text-(--text-color-primary)",
41
- secondary: "text-(--text-color-secondary)",
42
- tertiary: "text-(--text-color-tertiary)",
43
- muted: "text-(--text-color-muted)",
44
- link: "text-(--text-color-link)",
45
-
46
- accent: "text-(--text-color-accent)",
47
- success: "text-(--text-color-success)",
48
- danger: "text-(--text-color-danger)",
49
- warning: "text-(--text-color-warning)",
50
- info: "text-(--text-color-info)",
51
- }
1
+ export const fontWeightClasses = {
2
+ thin: "font-thin",
3
+ extralight: "font-extralight",
4
+ light: "font-light",
5
+ normal: "font-normal",
6
+ medium: "font-medium",
7
+ semibold: "font-semibold",
8
+ bold: "font-bold",
9
+ extrabold: "font-extrabold",
10
+ black: "font-black",
11
+ }
12
+
13
+ export const fontStyleClasses = {
14
+ italic: "italic",
15
+ notItalic: "not-italic",
16
+ }
17
+
18
+ export const fontFamilyClasses = {
19
+ sans: "font-sans",
20
+ serif: "font-serif",
21
+ mono: "font-mono",
22
+ }
23
+
24
+ export const textDecorationClasses = {
25
+ underline: "underline",
26
+ lineThrough: "line-through",
27
+ noUnderline: "no-underline",
28
+ overline: "overline",
29
+ }
30
+
31
+ export const textTransformClasses = {
32
+ uppercase: "uppercase",
33
+ lowercase: "lowercase",
34
+ capitalize: "capitalize",
35
+ normalCase: "normal-case",
36
+ }
37
+
38
+ export const textAppearanceClasses = {
39
+ default: "text-(--text-color-default)",
40
+ primary: "text-(--text-color-primary)",
41
+ secondary: "text-(--text-color-secondary)",
42
+ tertiary: "text-(--text-color-tertiary)",
43
+ muted: "text-(--text-color-muted)",
44
+ link: "text-(--text-color-link)",
45
+
46
+ accent: "text-(--text-color-accent)",
47
+ success: "text-(--text-color-success)",
48
+ danger: "text-(--text-color-danger)",
49
+ warning: "text-(--text-color-warning)",
50
+ info: "text-(--text-color-info)",
51
+ }
@@ -1,7 +1,7 @@
1
- import React from 'react';
2
- import { componentBuilder } from "./utils";
3
- import { BaseComponentProps } from "./props";
4
-
5
- export const Divider: React.FC<BaseComponentProps> = (props) =>
6
- componentBuilder(props, "div", "bg-gray-200 w-full h-px")
7
- .build();
1
+ import React from 'react';
2
+ import { componentBuilder } from "./utils";
3
+ import { BaseComponentProps } from "./props";
4
+
5
+ export const Divider: React.FC<BaseComponentProps> = (props) =>
6
+ componentBuilder(props, "div", "bg-gray-200 w-full h-px")
7
+ .build();
@@ -1,102 +1,102 @@
1
- import React from 'react';
2
- import { GridProps, LayoutComponentProps, ColProps, RowProps } from "./props";
3
- import { componentBuilder } from "./utils";
4
-
5
- const centeredClasses = {
6
- centered: "items-center justify-center",
7
- vCentered: "items-center",
8
- hCentered: "justify-center"
9
- }
10
-
11
- export const Section: React.FC<LayoutComponentProps> = (props) =>
12
- componentBuilder(props, "section", "w-full flex flex-col items-start")
13
- .withCentered(centeredClasses)
14
- .withSizes({
15
- xs: "py-6 max-lg:py-4 max-md:py-2",
16
- sm: "py-8 max-lg:py-6 max-md:py-4",
17
- md: "py-10 max-lg:py-8 max-md:py-6",
18
- lg: "py-12 max-lg:py-10 max-md:py-8",
19
- xl: "py-14 max-lg:py-12 max-md:py-10",
20
- })
21
- .withSizes({
22
- xs: "px-4 max-lg:px-2 max-md:px-0",
23
- sm: "px-6 max-lg:px-6 max-md:px-2",
24
- md: "px-8 max-lg:px-6 max-md:px-4",
25
- lg: "px-10 max-lg:px-8 max-md:px-6",
26
- xl: "px-12 max-lg:px-10 max-md:px-8",
27
- })
28
- .build();
29
-
30
- export const Container: React.FC<LayoutComponentProps> = (props) =>
31
- componentBuilder(props, "div", "flex flex-col mx-auto w-full")
32
- .withCentered(centeredClasses)
33
- .withSizes({
34
- xs: "max-w-3xl gap-2 max-lg:gap-1",
35
- sm: "max-w-4xl gap-4 max-lg:gap-3 max-md:gap-2",
36
- md: "max-w-5xl gap-6 max-lg:gap-5 max-md:gap-4",
37
- lg: "max-w-6xl gap-8 max-lg:gap-7 max-md:gap-6",
38
- xl: "max-w-7xl gap-10 max-lg:gap-9 max-md:gap-8",
39
- })
40
- .build();
41
-
42
- const commonGaps = {
43
- xs: "gap-1",
44
- sm: "gap-2 max-lg:gap-1",
45
- md: "gap-4 max-lg:gap-3 max-md:gap-2",
46
- lg: "gap-6 max-lg:gap-5 max-md:gap-4",
47
- xl: "gap-8 max-lg:gap-7 max-md:gap-6",
48
- }
49
-
50
- export const Col: React.FC<ColProps> = (props) =>
51
- componentBuilder(props, "div", "flex flex-col")
52
- .withGaps({ noGap: "gap-0" }, commonGaps)
53
- .withReverse({
54
- reverse: "flex-col-reverse"
55
- })
56
- .withCentered(centeredClasses)
57
- .build();
58
-
59
- export const Row: React.FC<RowProps> = (props) =>
60
- componentBuilder(props, "div", "flex flex-row")
61
- .withGaps({ noGap: "gap-0" }, commonGaps)
62
- .withReverse({
63
- reverse: "flex-row-reverse"
64
- })
65
- .withCentered(centeredClasses)
66
- .withBreakpoints({
67
- xsCol: "max-xs:flex-col",
68
- smCol: "max-sm:flex-col",
69
- mdCol: "max-md:flex-col",
70
- lgCol: "max-lg:flex-col",
71
- xlCol: "max-xl:flex-col"
72
- })
73
- .withBooleanProps({
74
- justifyStart: "justify-start",
75
- justifyEnd: "justify-end",
76
- justifyCenter: "justify-center",
77
- justifyBetween: "justify-between",
78
- justifyAround: "justify-around",
79
- justifyEvenly: "justify-evenly",
80
- justifyStretch: "justify-stretch",
81
- justifyBaseline: "justify-baseline",
82
- })
83
- .build();
84
-
85
- const gridGaps = {
86
- xs: "gap-2",
87
- sm: "gap-4 max-lg:gap-2",
88
- md: "gap-6 max-lg:gap-4",
89
- lg: "gap-8 max-lg:gap-6 max-md:gap-4",
90
- xl: "gap-10 max-lg:gap-8 max-md:gap-6",
91
- }
92
-
93
- export const Grid3: React.FC<GridProps> = (props) =>
94
- componentBuilder(props, "div", "w-full grid grid-cols-3 max-lg:grid-cols-2 max-md:grid-cols-1")
95
- .withGaps({ noGap: "gap-0" }, gridGaps)
96
- .build();
97
-
98
- export const Grid4: React.FC<GridProps> = (props) =>
99
- componentBuilder(props, "div", "w-full grid grid-cols-4 max-lg:grid-cols-3 max-md:grid-cols-2 max-sm:grid-cols-1")
100
- .withGaps({ noGap: "gap-0" }, gridGaps)
101
- .build();
102
-
1
+ import React from 'react';
2
+ import { GridProps, LayoutComponentProps, ColProps, RowProps } from "./props";
3
+ import { componentBuilder } from "./utils";
4
+
5
+ const centeredClasses = {
6
+ centered: "items-center justify-center",
7
+ vCentered: "items-center",
8
+ hCentered: "justify-center"
9
+ }
10
+
11
+ export const Section: React.FC<LayoutComponentProps> = (props) =>
12
+ componentBuilder(props, "section", "w-full flex flex-col items-start")
13
+ .withCentered(centeredClasses)
14
+ .withSizes({
15
+ xs: "py-6 max-lg:py-4 max-md:py-2",
16
+ sm: "py-8 max-lg:py-6 max-md:py-4",
17
+ md: "py-10 max-lg:py-8 max-md:py-6",
18
+ lg: "py-12 max-lg:py-10 max-md:py-8",
19
+ xl: "py-14 max-lg:py-12 max-md:py-10",
20
+ })
21
+ .withSizes({
22
+ xs: "px-4 max-lg:px-2 max-md:px-0",
23
+ sm: "px-6 max-lg:px-6 max-md:px-2",
24
+ md: "px-8 max-lg:px-6 max-md:px-4",
25
+ lg: "px-10 max-lg:px-8 max-md:px-6",
26
+ xl: "px-12 max-lg:px-10 max-md:px-8",
27
+ })
28
+ .build();
29
+
30
+ export const Container: React.FC<LayoutComponentProps> = (props) =>
31
+ componentBuilder(props, "div", "flex flex-col mx-auto w-full")
32
+ .withCentered(centeredClasses)
33
+ .withSizes({
34
+ xs: "max-w-3xl gap-2 max-lg:gap-1",
35
+ sm: "max-w-4xl gap-4 max-lg:gap-3 max-md:gap-2",
36
+ md: "max-w-5xl gap-6 max-lg:gap-5 max-md:gap-4",
37
+ lg: "max-w-6xl gap-8 max-lg:gap-7 max-md:gap-6",
38
+ xl: "max-w-7xl gap-10 max-lg:gap-9 max-md:gap-8",
39
+ })
40
+ .build();
41
+
42
+ const commonGaps = {
43
+ xs: "gap-1",
44
+ sm: "gap-2 max-lg:gap-1",
45
+ md: "gap-4 max-lg:gap-3 max-md:gap-2",
46
+ lg: "gap-6 max-lg:gap-5 max-md:gap-4",
47
+ xl: "gap-8 max-lg:gap-7 max-md:gap-6",
48
+ }
49
+
50
+ export const Col: React.FC<ColProps> = (props) =>
51
+ componentBuilder(props, "div", "flex flex-col")
52
+ .withGaps({ noGap: "gap-0" }, commonGaps)
53
+ .withReverse({
54
+ reverse: "flex-col-reverse"
55
+ })
56
+ .withCentered(centeredClasses)
57
+ .build();
58
+
59
+ export const Row: React.FC<RowProps> = (props) =>
60
+ componentBuilder(props, "div", "flex flex-row")
61
+ .withGaps({ noGap: "gap-0" }, commonGaps)
62
+ .withReverse({
63
+ reverse: "flex-row-reverse"
64
+ })
65
+ .withCentered(centeredClasses)
66
+ .withBreakpoints({
67
+ xsCol: "max-xs:flex-col",
68
+ smCol: "max-sm:flex-col",
69
+ mdCol: "max-md:flex-col",
70
+ lgCol: "max-lg:flex-col",
71
+ xlCol: "max-xl:flex-col"
72
+ })
73
+ .withBooleanProps({
74
+ justifyStart: "justify-start",
75
+ justifyEnd: "justify-end",
76
+ justifyCenter: "justify-center",
77
+ justifyBetween: "justify-between",
78
+ justifyAround: "justify-around",
79
+ justifyEvenly: "justify-evenly",
80
+ justifyStretch: "justify-stretch",
81
+ justifyBaseline: "justify-baseline",
82
+ })
83
+ .build();
84
+
85
+ const gridGaps = {
86
+ xs: "gap-2",
87
+ sm: "gap-4 max-lg:gap-2",
88
+ md: "gap-6 max-lg:gap-4",
89
+ lg: "gap-8 max-lg:gap-6 max-md:gap-4",
90
+ xl: "gap-10 max-lg:gap-8 max-md:gap-6",
91
+ }
92
+
93
+ export const Grid3: React.FC<GridProps> = (props) =>
94
+ componentBuilder(props, "div", "w-full grid grid-cols-3 max-lg:grid-cols-2 max-md:grid-cols-1")
95
+ .withGaps({ noGap: "gap-0" }, gridGaps)
96
+ .build();
97
+
98
+ export const Grid4: React.FC<GridProps> = (props) =>
99
+ componentBuilder(props, "div", "w-full grid grid-cols-4 max-lg:grid-cols-3 max-md:grid-cols-2 max-sm:grid-cols-1")
100
+ .withGaps({ noGap: "gap-0" }, gridGaps)
101
+ .build();
102
+
@@ -1,128 +1,128 @@
1
- export interface SizeProps {
2
- xs?: boolean;
3
- sm?: boolean;
4
- md?: boolean;
5
- lg?: boolean;
6
- xl?: boolean;
7
- }
8
-
9
- export interface FontFamilyProps {
10
- sans?: boolean;
11
- serif?: boolean;
12
- mono?: boolean;
13
- }
14
-
15
- export interface FontWeightProps {
16
- thin?: boolean;
17
- extralight?: boolean;
18
- light?: boolean;
19
- normal?: boolean;
20
- medium?: boolean;
21
- semibold?: boolean;
22
- bold?: boolean;
23
- extrabold?: boolean;
24
- black?: boolean;
25
- }
26
-
27
- export interface FontStyleProps {
28
- italic?: boolean;
29
- notItalic?: boolean;
30
- }
31
-
32
- export interface TextDecorationProps {
33
- underline?: boolean;
34
- lineThrough?: boolean;
35
- noUnderline?: boolean;
36
- overline?: boolean;
37
- }
38
-
39
- export interface TextTransformProps {
40
- uppercase?: boolean;
41
- lowercase?: boolean;
42
- capitalize?: boolean;
43
- normalCase?: boolean;
44
- }
45
-
46
- export interface TextAppearanceProps {
47
- muted?: boolean;
48
- link?: boolean;
49
- }
50
-
51
- export interface CommonAppearanceProps {
52
- default?: boolean;
53
- accent?: boolean;
54
- primary?: boolean;
55
- secondary?: boolean;
56
- tertiary?: boolean;
57
- success?: boolean;
58
- danger?: boolean;
59
- warning?: boolean;
60
- info?: boolean;
61
- }
62
-
63
- export interface BreakpointProps {
64
- xsCol?: boolean;
65
- smCol?: boolean;
66
- mdCol?: boolean;
67
- lgCol?: boolean;
68
- xlCol?: boolean;
69
- }
70
-
71
- export interface HideProps {
72
- xsHide?: boolean;
73
- smHide?: boolean;
74
- mdHide?: boolean;
75
- lgHide?: boolean;
76
- xlHide?: boolean;
77
- }
78
-
79
- export interface PositionProps {
80
- relative?: boolean;
81
- absolute?: boolean;
82
- fixed?: boolean;
83
- sticky?: boolean;
84
- static?: boolean;
85
- }
86
-
87
- export interface TagProps {
88
- tag?: React.ElementType | string;
89
- }
90
-
91
- export interface ReverseProps {
92
- reverse?: boolean;
93
- }
94
-
95
- export interface GapProps {
96
- noGap?: boolean;
97
- }
98
-
99
- export interface CenteredProps {
100
- centered?: boolean;
101
- vCentered?: boolean;
102
- hCentered?: boolean;
103
- }
104
-
105
- export interface JustifyProps {
106
- justifyStart?: boolean;
107
- justifyEnd?: boolean;
108
- justifyCenter?: boolean;
109
- justifyBetween?: boolean;
110
- justifyAround?: boolean;
111
- justifyEvenly?: boolean;
112
- justifyStretch?: boolean;
113
- justifyBaseline?: boolean;
114
- }
115
-
116
- export type BaseComponentProps = TagProps & Partial<SizeProps & HideProps & PositionProps> & React.HTMLProps<HTMLElement>;
117
-
118
- export type LayoutComponentProps = BaseComponentProps & ReverseProps & CenteredProps;
119
-
120
- export type FontProps = FontWeightProps & FontStyleProps & TextDecorationProps & TextTransformProps & FontFamilyProps & TextAppearanceProps & CommonAppearanceProps;
121
-
122
- export type TypographyComponentProps = BaseComponentProps & FontProps;
123
-
124
- export type GridProps = BaseComponentProps & GapProps;
125
-
126
- export type RowProps = BaseComponentProps & GapProps & ReverseProps & CenteredProps & BreakpointProps & JustifyProps;
127
-
128
- export type ColProps = BaseComponentProps & GapProps & ReverseProps & CenteredProps;
1
+ export interface SizeProps {
2
+ xs?: boolean;
3
+ sm?: boolean;
4
+ md?: boolean;
5
+ lg?: boolean;
6
+ xl?: boolean;
7
+ }
8
+
9
+ export interface FontFamilyProps {
10
+ sans?: boolean;
11
+ serif?: boolean;
12
+ mono?: boolean;
13
+ }
14
+
15
+ export interface FontWeightProps {
16
+ thin?: boolean;
17
+ extralight?: boolean;
18
+ light?: boolean;
19
+ normal?: boolean;
20
+ medium?: boolean;
21
+ semibold?: boolean;
22
+ bold?: boolean;
23
+ extrabold?: boolean;
24
+ black?: boolean;
25
+ }
26
+
27
+ export interface FontStyleProps {
28
+ italic?: boolean;
29
+ notItalic?: boolean;
30
+ }
31
+
32
+ export interface TextDecorationProps {
33
+ underline?: boolean;
34
+ lineThrough?: boolean;
35
+ noUnderline?: boolean;
36
+ overline?: boolean;
37
+ }
38
+
39
+ export interface TextTransformProps {
40
+ uppercase?: boolean;
41
+ lowercase?: boolean;
42
+ capitalize?: boolean;
43
+ normalCase?: boolean;
44
+ }
45
+
46
+ export interface TextAppearanceProps {
47
+ muted?: boolean;
48
+ link?: boolean;
49
+ }
50
+
51
+ export interface CommonAppearanceProps {
52
+ default?: boolean;
53
+ accent?: boolean;
54
+ primary?: boolean;
55
+ secondary?: boolean;
56
+ tertiary?: boolean;
57
+ success?: boolean;
58
+ danger?: boolean;
59
+ warning?: boolean;
60
+ info?: boolean;
61
+ }
62
+
63
+ export interface BreakpointProps {
64
+ xsCol?: boolean;
65
+ smCol?: boolean;
66
+ mdCol?: boolean;
67
+ lgCol?: boolean;
68
+ xlCol?: boolean;
69
+ }
70
+
71
+ export interface HideProps {
72
+ xsHide?: boolean;
73
+ smHide?: boolean;
74
+ mdHide?: boolean;
75
+ lgHide?: boolean;
76
+ xlHide?: boolean;
77
+ }
78
+
79
+ export interface PositionProps {
80
+ relative?: boolean;
81
+ absolute?: boolean;
82
+ fixed?: boolean;
83
+ sticky?: boolean;
84
+ static?: boolean;
85
+ }
86
+
87
+ export interface TagProps {
88
+ tag?: React.ElementType | string;
89
+ }
90
+
91
+ export interface ReverseProps {
92
+ reverse?: boolean;
93
+ }
94
+
95
+ export interface GapProps {
96
+ noGap?: boolean;
97
+ }
98
+
99
+ export interface CenteredProps {
100
+ centered?: boolean;
101
+ vCentered?: boolean;
102
+ hCentered?: boolean;
103
+ }
104
+
105
+ export interface JustifyProps {
106
+ justifyStart?: boolean;
107
+ justifyEnd?: boolean;
108
+ justifyCenter?: boolean;
109
+ justifyBetween?: boolean;
110
+ justifyAround?: boolean;
111
+ justifyEvenly?: boolean;
112
+ justifyStretch?: boolean;
113
+ justifyBaseline?: boolean;
114
+ }
115
+
116
+ export type BaseComponentProps = TagProps & Partial<SizeProps & HideProps & PositionProps> & React.HTMLProps<HTMLElement>;
117
+
118
+ export type LayoutComponentProps = BaseComponentProps & ReverseProps & CenteredProps;
119
+
120
+ export type FontProps = FontWeightProps & FontStyleProps & TextDecorationProps & TextTransformProps & FontFamilyProps & TextAppearanceProps & CommonAppearanceProps;
121
+
122
+ export type TypographyComponentProps = BaseComponentProps & FontProps;
123
+
124
+ export type GridProps = BaseComponentProps & GapProps;
125
+
126
+ export type RowProps = BaseComponentProps & GapProps & ReverseProps & CenteredProps & BreakpointProps & JustifyProps;
127
+
128
+ export type ColProps = BaseComponentProps & GapProps & ReverseProps & CenteredProps;
@@ -1,19 +1,19 @@
1
- import { CommonAppearanceProps, FontFamilyProps, FontStyleProps, FontWeightProps, TextAppearanceProps, TextDecorationProps, TextTransformProps } from "./props";
2
-
3
- export type CommonAppearanceSettings = { [key in keyof CommonAppearanceProps]: boolean; };
4
-
5
- export type FontFamilySettings = { [key in keyof FontFamilyProps]: boolean; };
6
- export type FontWeightSettings = { [key in keyof FontWeightProps]: boolean; };
7
- export type FontStyleSettings = { [key in keyof FontStyleProps]: boolean; };
8
- export type TextAppearanceSettings = { [key in keyof TextAppearanceProps & CommonAppearanceProps]: boolean; };
9
- export type TextDecorationSettings = { [key in keyof TextDecorationProps]: boolean; };
10
- export type TextTransformSettings = { [key in keyof TextTransformProps]: boolean; };
11
-
12
- export type TypographySettings = {
13
- fontFamily?: FontFamilySettings;
14
- fontWeight?: FontWeightSettings;
15
- fontStyle?: FontStyleSettings;
16
- textAppearance?: TextAppearanceSettings;
17
- textDecoration?: TextDecorationSettings;
18
- textTransform?: TextTransformSettings;
19
- };
1
+ import { CommonAppearanceProps, FontFamilyProps, FontStyleProps, FontWeightProps, TextAppearanceProps, TextDecorationProps, TextTransformProps } from "./props";
2
+
3
+ export type CommonAppearanceSettings = { [key in keyof CommonAppearanceProps]: boolean; };
4
+
5
+ export type FontFamilySettings = { [key in keyof FontFamilyProps]: boolean; };
6
+ export type FontWeightSettings = { [key in keyof FontWeightProps]: boolean; };
7
+ export type FontStyleSettings = { [key in keyof FontStyleProps]: boolean; };
8
+ export type TextAppearanceSettings = { [key in keyof TextAppearanceProps & CommonAppearanceProps]: boolean; };
9
+ export type TextDecorationSettings = { [key in keyof TextDecorationProps]: boolean; };
10
+ export type TextTransformSettings = { [key in keyof TextTransformProps]: boolean; };
11
+
12
+ export type TypographySettings = {
13
+ fontFamily?: FontFamilySettings;
14
+ fontWeight?: FontWeightSettings;
15
+ fontStyle?: FontStyleSettings;
16
+ textAppearance?: TextAppearanceSettings;
17
+ textDecoration?: TextDecorationSettings;
18
+ textTransform?: TextTransformSettings;
19
+ };