@rovula/ui 0.0.3 → 0.0.5
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/cjs/bundle.css +1207 -0
- package/dist/cjs/bundle.js +2 -0
- package/dist/cjs/bundle.js.map +1 -0
- package/dist/cjs/types/components/Button/Button.d.ts +15 -0
- package/dist/cjs/types/components/Button/Button.styles.d.ts +7 -0
- package/dist/cjs/types/components/Button/Buttons.stories.d.ts +375 -0
- package/dist/cjs/types/components/Text/Text.d.ts +12 -0
- package/dist/cjs/types/components/Text/Text.stories.d.ts +35 -0
- package/dist/cjs/types/index.d.ts +7 -0
- package/dist/components/Button/Button.js +31 -0
- package/dist/components/Button/Button.styles.js +90 -0
- package/dist/components/Button/Buttons.stories.js +66 -0
- package/dist/components/Form/Form.js +106 -0
- package/dist/components/Form/Text.js +6 -0
- package/dist/components/Form/TextInput.js +6 -0
- package/dist/components/Table/Table.js +6 -0
- package/dist/components/Tabs/Tabs.js +8 -0
- package/dist/components/Text/Text.js +6 -0
- package/dist/components/Text/Text.stories.js +73 -0
- package/dist/esm/bundle.css +1207 -0
- package/dist/esm/bundle.js +2 -0
- package/dist/esm/bundle.js.map +1 -0
- package/dist/esm/types/components/Button/Button.d.ts +15 -0
- package/dist/esm/types/components/Button/Button.styles.d.ts +7 -0
- package/dist/esm/types/components/Button/Buttons.stories.d.ts +375 -0
- package/dist/esm/types/components/Form/Form.d.ts +12 -0
- package/dist/esm/types/components/Form/Text.d.ts +9 -0
- package/dist/esm/types/components/Form/TextInput.d.ts +11 -0
- package/dist/esm/types/components/Table/Table.d.ts +11 -0
- package/dist/esm/types/components/Tabs/Tabs.d.ts +11 -0
- package/dist/esm/types/components/Text/Text.d.ts +12 -0
- package/dist/esm/types/components/Text/Text.stories.d.ts +35 -0
- package/dist/esm/types/index.d.ts +7 -0
- package/dist/esm/types/utils/datetime.d.ts +9 -0
- package/dist/index.d.ts +67 -0
- package/dist/index.js +12 -0
- package/dist/src/theme/global.css +1485 -0
- package/dist/theme/global.css +136 -0
- package/dist/theme/main-preset.js +159 -0
- package/dist/theme/plugins/utilities/typography.js +69 -0
- package/dist/theme/presets/colors.js +140 -0
- package/dist/utils/datetime.js +30 -0
- package/package.json +42 -9
- package/src/components/Button/Button.styles.ts +98 -0
- package/src/components/Button/Button.tsx +48 -18
- package/src/components/Button/Buttons.stories.tsx +120 -0
- package/src/components/Text/Text.stories.tsx +112 -0
- package/src/components/Text/Text.tsx +59 -0
- package/src/index.ts +21 -0
- package/src/stories/Typography.mdx +160 -0
- package/src/theme/global.css +136 -0
- package/src/theme/main-preset.js +159 -0
- package/src/theme/plugins/utilities/typography.js +69 -0
- package/src/theme/presets/colors.js +140 -0
- package/dist/main.d.ts +0 -7
- package/dist/main.js +0 -25
- package/dist/src/components/Button/Button.d.ts +0 -12
- package/dist/src/components/Button/Button.js +0 -10
- package/dist/src/components/Form/Form.js +0 -91
- package/dist/src/components/Form/Text.js +0 -10
- package/dist/src/components/Form/TextInput.js +0 -10
- package/dist/src/components/Table/Table.js +0 -13
- package/dist/src/components/Tabs/Tabs.js +0 -33
- package/dist/src/utils/datetime.js +0 -37
- package/src/style.css +0 -3
- /package/dist/{src → cjs/types}/components/Form/Form.d.ts +0 -0
- /package/dist/{src → cjs/types}/components/Form/Text.d.ts +0 -0
- /package/dist/{src → cjs/types}/components/Form/TextInput.d.ts +0 -0
- /package/dist/{src → cjs/types}/components/Table/Table.d.ts +0 -0
- /package/dist/{src → cjs/types}/components/Tabs/Tabs.d.ts +0 -0
- /package/dist/{src → cjs/types}/utils/datetime.d.ts +0 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
|
|
5
|
+
@layer base {
|
|
6
|
+
:root {
|
|
7
|
+
--white: 255 255 255; /* #ffffff */
|
|
8
|
+
--black: 28 28 28; /* #1c1c1c */
|
|
9
|
+
|
|
10
|
+
--theme-50: 232 242 255; /* #E8F2FF -> 232 242 255 */
|
|
11
|
+
--theme-100: 213 230 255; /* #D5E6FF -> 213 230 255 */
|
|
12
|
+
--theme-200: 179 207 255; /* #B3CFFF -> 179 207 255 */
|
|
13
|
+
--theme-300: 136 174 255; /* #85AEFF -> 136 174 255 */
|
|
14
|
+
--theme-400: 86 126 255; /* #567EFF -> 86 126 255 */
|
|
15
|
+
--theme-500: 47 78 255; /* #2F4EFF -> 47 78 255 */
|
|
16
|
+
--theme-600: 12 26 255; /* #0C1AFF -> 12 26 255 */
|
|
17
|
+
--theme-700: 0 12 255; /* #000CFF -> 0 12 255 */
|
|
18
|
+
--theme-800: 6 18 205; /* #0612CD -> 6 18 205 */
|
|
19
|
+
--theme-900: 16 29 159; /* #101D9F -> 16 29 159 */
|
|
20
|
+
--theme-default: var(--theme-100);
|
|
21
|
+
--theme-foreground: var(--white);
|
|
22
|
+
|
|
23
|
+
--primary-5: 242 242 246; /* #F2F2F6 */
|
|
24
|
+
--primary-10: 230 230 236; /* #E6E6EC */
|
|
25
|
+
--primary-20: 204 204 218; /* #CCCCDA */
|
|
26
|
+
--primary-30: 179 179 199; /* #B3B3C7 */
|
|
27
|
+
--primary-40: 153 153 180; /* #9999B4 */
|
|
28
|
+
--primary-50: 128 128 161; /* #8080A1 */
|
|
29
|
+
--primary-60: 103 103 143; /* #67678F */
|
|
30
|
+
--primary-70: 77 77 124; /* #4D4D7C */
|
|
31
|
+
--primary-80: 52 52 105; /* #343469 */
|
|
32
|
+
--primary-90: 26 26 87; /* #1A1A57 */
|
|
33
|
+
--primary-100: 1 1 68; /* #010144 */
|
|
34
|
+
--primary-110: 1 1 61; /* #01013D */
|
|
35
|
+
--primary-120: 1 1 54; /* #010136 */
|
|
36
|
+
--primary-130: 1 1 48; /* #010130 */
|
|
37
|
+
--primary-140: 1 1 41; /* #010129 */
|
|
38
|
+
--primary-150: 1 1 34; /* #010122 */
|
|
39
|
+
--primary-default: var(--primary-100);
|
|
40
|
+
--primary-foreground: var(--white);
|
|
41
|
+
|
|
42
|
+
--secondary-5: 254 254 255; /* #FEFEFF */
|
|
43
|
+
--secondary-10: 253 254 255; /* #FDFEFF */
|
|
44
|
+
--secondary-20: 251 252 255; /* #FBFCFF */
|
|
45
|
+
--secondary-30: 249 251 255; /* #F9FBFF */
|
|
46
|
+
--secondary-40: 247 249 255; /* #F7F9FF */
|
|
47
|
+
--secondary-50: 245 248 255; /* #F5F8FF */
|
|
48
|
+
--secondary-60: 242 247 255; /* #F2F7FF */
|
|
49
|
+
--secondary-70: 240 245 255; /* #F0F5FF */
|
|
50
|
+
--secondary-80: 238 244 255; /* #EEF4FF */
|
|
51
|
+
--secondary-90: 236 242 255; /* #ECF2FF */
|
|
52
|
+
--secondary-100: 234 241 255; /* #EAF1FF */
|
|
53
|
+
--secondary-110: 211 217 229; /* #D3D9E5 */
|
|
54
|
+
--secondary-120: 187 193 204; /* #BBC1CC */
|
|
55
|
+
--secondary-130: 164 169 178; /* #A4A9B2 */
|
|
56
|
+
--secondary-140: 140 145 153; /* #8C9199 */
|
|
57
|
+
--secondary-150: 117 121 128; /* #757980 */
|
|
58
|
+
--secondary-default: var(--secondary-100);
|
|
59
|
+
--secondary-foreground: 1 1 68;
|
|
60
|
+
|
|
61
|
+
--tertiary-5: 245 246 255; /* #F5F6FF */
|
|
62
|
+
--tertiary-10: 234 237 255; /* #EAEDFF */
|
|
63
|
+
--tertiary-20: 213 220 255; /* #D5DCFF */
|
|
64
|
+
--tertiary-30: 193 202 255; /* #C1CAFF */
|
|
65
|
+
--tertiary-40: 172 184 255; /* #ACB8FF */
|
|
66
|
+
--tertiary-50: 151 166 255; /* #97A6FF */
|
|
67
|
+
--tertiary-60: 132 149 255; /* #8295FF */
|
|
68
|
+
--tertiary-70: 109 131 255; /* #6D83FF */
|
|
69
|
+
--tertiary-80: 89 113 255; /* #5971FF */
|
|
70
|
+
--tertiary-90: 68 96 255; /* #4460FF */
|
|
71
|
+
--tertiary-100: 47 78 255; /* #2F4EFF */
|
|
72
|
+
--tertiary-110: 42 70 229; /* #2A46E5 */
|
|
73
|
+
--tertiary-120: 38 62 204; /* #263ECC */
|
|
74
|
+
--tertiary-130: 33 55 178; /* #2137B2 */
|
|
75
|
+
--tertiary-140: 28 47 153; /* #1C2F99 */
|
|
76
|
+
--tertiary-150: 24 39 128; /* #182780 */
|
|
77
|
+
--tertiary-default: var(--tertiary-100);
|
|
78
|
+
--tertiary-foreground: var(--white);
|
|
79
|
+
|
|
80
|
+
--grey-5: 250 250 250; /* #FAFAFA */
|
|
81
|
+
--grey-10: 245 245 245; /* #F5F5F5 */
|
|
82
|
+
--grey-20: 236 236 236; /* #ECECEC */
|
|
83
|
+
--grey-30: 226 226 226; /* #E2E2E2 */
|
|
84
|
+
--grey-40: 216 216 216; /* #D8D8D8 */
|
|
85
|
+
--grey-50: 207 207 207; /* #CFCFCF */
|
|
86
|
+
--grey-60: 197 197 197; /* #C5C5C5 */
|
|
87
|
+
--grey-70: 187 187 187; /* #BBBBBB */
|
|
88
|
+
--grey-80: 177 177 177; /* #B1B1B1 */
|
|
89
|
+
--grey-90: 168 168 168; /* #A8A8A8 */
|
|
90
|
+
--grey-100: 158 158 158; /* #9E9E9E */
|
|
91
|
+
--grey-110: 142 142 142; /* #8E8E8E */
|
|
92
|
+
--grey-120: 126 126 126; /* #7E7E7E */
|
|
93
|
+
--grey-130: 111 111 111; /* #6F6F6F */
|
|
94
|
+
--grey-140: 95 95 95; /* #5F5F5F */
|
|
95
|
+
--grey-150: 79 79 79; /* #4F4F4F */
|
|
96
|
+
--grey-default: var(--grey-100);
|
|
97
|
+
--grey-foreground: 1 1 68;
|
|
98
|
+
|
|
99
|
+
--grey2-100: 249 250 251; /* #F9FAFB */
|
|
100
|
+
--grey2-200: 244 246 248; /* #F4F6F8 */
|
|
101
|
+
--grey2-300: 223 227 232; /* #DFE3E8 */
|
|
102
|
+
--grey2-400: 196 205 213; /* #C4CDD5 */
|
|
103
|
+
--grey2-500: 145 158 171; /* #919EAB */
|
|
104
|
+
--grey2-600: 99 115 129; /* #637381 */
|
|
105
|
+
--grey2-700: 69 79 91; /* #454F5B */
|
|
106
|
+
--grey2-800: 33 43 54; /* #212B36 */
|
|
107
|
+
--grey2-900: 22 28 36; /* #161C24 */
|
|
108
|
+
--grey-default: var(--grey-100);
|
|
109
|
+
--grey-foreground: var(--white);
|
|
110
|
+
|
|
111
|
+
--info-100: 41 152 255; /* #2998FF */
|
|
112
|
+
--info-120: 33 122 204; /* #217ACC */
|
|
113
|
+
--info-default: var(--info-100);
|
|
114
|
+
--info-foreground: var(--white);
|
|
115
|
+
|
|
116
|
+
--success-100: 84 214 44; /* #54D62C */
|
|
117
|
+
--success-120: 67 171 35; /* #43AB23 */
|
|
118
|
+
--success-default: var(--success-100);
|
|
119
|
+
--success-foreground: var(--white);
|
|
120
|
+
|
|
121
|
+
--warning-100: 255 193 7; /* #FFC107 */
|
|
122
|
+
--warning-120: 204 154 6; /* #CC9A06 */
|
|
123
|
+
--warning-default: var(--warning-100);
|
|
124
|
+
--warning-foreground: var(--white);
|
|
125
|
+
|
|
126
|
+
--error-100: 255 77 53; /* #FF4D35 */
|
|
127
|
+
--error-120: 204 62 42; /* #CC3E2A */
|
|
128
|
+
--error-default: var(--error-100);
|
|
129
|
+
--error-foreground: var(--white);
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
--btn-rounded-sm: 10px;
|
|
133
|
+
--btn-rounded-md: 12px;
|
|
134
|
+
--btn-rounded-lg: 16px;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/** @type {import('tailwindcss').Config} */
|
|
2
|
+
module.exports = {
|
|
3
|
+
darkMode: "class",
|
|
4
|
+
theme: {
|
|
5
|
+
extend: {
|
|
6
|
+
fontSize: {
|
|
7
|
+
h1: [
|
|
8
|
+
"64px",
|
|
9
|
+
{
|
|
10
|
+
lineHeight: "80px",
|
|
11
|
+
fontWeight: "700",
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
h2: [
|
|
15
|
+
"48px",
|
|
16
|
+
{
|
|
17
|
+
lineHeight: "60px",
|
|
18
|
+
fontWeight: "700",
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
h3: [
|
|
22
|
+
"32px",
|
|
23
|
+
{
|
|
24
|
+
lineHeight: "48px",
|
|
25
|
+
fontWeight: "700",
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
h4: [
|
|
29
|
+
"24px",
|
|
30
|
+
{
|
|
31
|
+
lineHeight: "32px",
|
|
32
|
+
fontWeight: "700",
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
h5: [
|
|
36
|
+
"20px",
|
|
37
|
+
{
|
|
38
|
+
lineHeight: "28px",
|
|
39
|
+
fontWeight: "700",
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
h6: [
|
|
43
|
+
"18px",
|
|
44
|
+
{
|
|
45
|
+
lineHeight: "24px",
|
|
46
|
+
fontWeight: "700",
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
subtitile1: [
|
|
50
|
+
"16px",
|
|
51
|
+
{
|
|
52
|
+
lineHeight: "24px",
|
|
53
|
+
fontWeight: "400",
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
subtitile2: [
|
|
57
|
+
"16px",
|
|
58
|
+
{
|
|
59
|
+
lineHeight: "24px",
|
|
60
|
+
fontWeight: "500",
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
subtitile3: [
|
|
64
|
+
"16px",
|
|
65
|
+
{
|
|
66
|
+
lineHeight: "24px",
|
|
67
|
+
fontWeight: "600",
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
subtitile4: [
|
|
71
|
+
"14px",
|
|
72
|
+
{
|
|
73
|
+
lineHeight: "22px",
|
|
74
|
+
fontWeight: "400",
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
subtitile5: [
|
|
78
|
+
"14px",
|
|
79
|
+
{
|
|
80
|
+
lineHeight: "22px",
|
|
81
|
+
fontWeight: "500",
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
subtitile6: [
|
|
85
|
+
"14px",
|
|
86
|
+
{
|
|
87
|
+
lineHeight: "22px",
|
|
88
|
+
fontWeight: "600",
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
body1: [
|
|
92
|
+
"16px",
|
|
93
|
+
{
|
|
94
|
+
lineHeight: "20px",
|
|
95
|
+
fontWeight: "400",
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
body2: [
|
|
99
|
+
"16px",
|
|
100
|
+
{
|
|
101
|
+
lineHeight: "20px",
|
|
102
|
+
fontWeight: "500",
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
body3: [
|
|
106
|
+
"14px",
|
|
107
|
+
{
|
|
108
|
+
lineHeight: "18px",
|
|
109
|
+
fontWeight: "400",
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
body4: [
|
|
113
|
+
"14px",
|
|
114
|
+
{
|
|
115
|
+
lineHeight: "18px",
|
|
116
|
+
fontWeight: "500",
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
small1: [
|
|
120
|
+
"12px",
|
|
121
|
+
{
|
|
122
|
+
lineHeight: "14px",
|
|
123
|
+
fontWeight: "400",
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
small2: [
|
|
127
|
+
"12px",
|
|
128
|
+
{
|
|
129
|
+
lineHeight: "14px",
|
|
130
|
+
fontWeight: "500",
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
small3: [
|
|
134
|
+
"10px",
|
|
135
|
+
{
|
|
136
|
+
lineHeight: "12px",
|
|
137
|
+
fontWeight: "400",
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
label1: [
|
|
141
|
+
"12px",
|
|
142
|
+
{
|
|
143
|
+
lineHeight: "12px",
|
|
144
|
+
fontWeight: "400",
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
label2: [
|
|
148
|
+
"10px",
|
|
149
|
+
{
|
|
150
|
+
lineHeight: "10px",
|
|
151
|
+
fontWeight: "400",
|
|
152
|
+
},
|
|
153
|
+
],
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
presets: [require("./presets/colors")],
|
|
158
|
+
plugins: [require("./plugins/utilities/typography")],
|
|
159
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
const plugin = require("tailwindcss/plugin");
|
|
2
|
+
|
|
3
|
+
module.exports = plugin(function ({ addUtilities }) {
|
|
4
|
+
addUtilities({
|
|
5
|
+
".typography-h1": {
|
|
6
|
+
"@apply text-h1": {},
|
|
7
|
+
},
|
|
8
|
+
".typography-h2": {
|
|
9
|
+
"@apply text-h2": {},
|
|
10
|
+
},
|
|
11
|
+
".typography-h3": {
|
|
12
|
+
"@apply text-h3": {},
|
|
13
|
+
},
|
|
14
|
+
".typography-h4": {
|
|
15
|
+
"@apply text-h4": {},
|
|
16
|
+
},
|
|
17
|
+
".typography-h5": {
|
|
18
|
+
"@apply text-h5": {},
|
|
19
|
+
},
|
|
20
|
+
".typography-h6": {
|
|
21
|
+
"@apply text-h6": {},
|
|
22
|
+
},
|
|
23
|
+
".typography-subtitile1": {
|
|
24
|
+
"@apply text-subtitile1": {},
|
|
25
|
+
},
|
|
26
|
+
".typography-subtitile2": {
|
|
27
|
+
"@apply text-subtitile2": {},
|
|
28
|
+
},
|
|
29
|
+
".typography-subtitile3": {
|
|
30
|
+
"@apply text-subtitile3": {},
|
|
31
|
+
},
|
|
32
|
+
".typography-subtitile4": {
|
|
33
|
+
"@apply text-subtitile4": {},
|
|
34
|
+
},
|
|
35
|
+
".typography-subtitile5": {
|
|
36
|
+
"@apply text-subtitile5": {},
|
|
37
|
+
},
|
|
38
|
+
".typography-subtitile6": {
|
|
39
|
+
"@apply text-subtitile6": {},
|
|
40
|
+
},
|
|
41
|
+
".typography-body1": {
|
|
42
|
+
"@apply text-body1": {},
|
|
43
|
+
},
|
|
44
|
+
".typography-body2": {
|
|
45
|
+
"@apply text-body2": {},
|
|
46
|
+
},
|
|
47
|
+
".typography-body3": {
|
|
48
|
+
"@apply text-body3": {},
|
|
49
|
+
},
|
|
50
|
+
".typography-body4": {
|
|
51
|
+
"@apply text-body4": {},
|
|
52
|
+
},
|
|
53
|
+
".typography-small1": {
|
|
54
|
+
"@apply text-small1": {},
|
|
55
|
+
},
|
|
56
|
+
".typography-small2": {
|
|
57
|
+
"@apply text-small2": {},
|
|
58
|
+
},
|
|
59
|
+
".typography-small3": {
|
|
60
|
+
"@apply text-small3": {},
|
|
61
|
+
},
|
|
62
|
+
".typography-label1": {
|
|
63
|
+
"@apply text-label1": {},
|
|
64
|
+
},
|
|
65
|
+
".typography-label2": {
|
|
66
|
+
"@apply text-label2": {},
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
});
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/** @type {import('tailwindcss').Config} */
|
|
2
|
+
module.exports = {
|
|
3
|
+
theme: {
|
|
4
|
+
extend: {
|
|
5
|
+
colors: {
|
|
6
|
+
themes: {
|
|
7
|
+
50: "rgb(var(--themes-50) / <alpha-value>)",
|
|
8
|
+
100: "rgb(var(--themes-100) / <alpha-value>)",
|
|
9
|
+
200: "rgb(var(--themes-200) / <alpha-value>)",
|
|
10
|
+
300: "rgb(var(--themes-300) / <alpha-value>)",
|
|
11
|
+
400: "rgb(var(--themes-400) / <alpha-value>)",
|
|
12
|
+
500: "rgb(var(--themes-500) / <alpha-value>)",
|
|
13
|
+
600: "rgb(var(--themes-600) / <alpha-value>)",
|
|
14
|
+
700: "rgb(var(--themes-700) / <alpha-value>)",
|
|
15
|
+
800: "rgb(var(--themes-800) / <alpha-value>)",
|
|
16
|
+
900: "rgb(var(--themes-900) / <alpha-value>)",
|
|
17
|
+
DEFAULT: "rgb(var(--themes-default) / <alpha-value>)",
|
|
18
|
+
foreground: "rgb(var(--themes-foreground) / <alpha-value>)",
|
|
19
|
+
},
|
|
20
|
+
primary: {
|
|
21
|
+
5: "rgb(var(--primary-5) / <alpha-value>)",
|
|
22
|
+
10: "rgb(var(--primary-10) / <alpha-value>)",
|
|
23
|
+
20: "rgb(var(--primary-20) / <alpha-value>)",
|
|
24
|
+
30: "rgb(var(--primary-30) / <alpha-value>)",
|
|
25
|
+
40: "rgb(var(--primary-40) / <alpha-value>)",
|
|
26
|
+
50: "rgb(var(--primary-50) / <alpha-value>)",
|
|
27
|
+
60: "rgb(var(--primary-60) / <alpha-value>)",
|
|
28
|
+
70: "rgb(var(--primary-70) / <alpha-value>)",
|
|
29
|
+
80: "rgb(var(--primary-80) / <alpha-value>)",
|
|
30
|
+
90: "rgb(var(--primary-90) / <alpha-value>)",
|
|
31
|
+
100: "rgb(var(--primary-100) / <alpha-value>)",
|
|
32
|
+
110: "rgb(var(--primary-110) / <alpha-value>)",
|
|
33
|
+
120: "rgb(var(--primary-120) / <alpha-value>)",
|
|
34
|
+
130: "rgb(var(--primary-130) / <alpha-value>)",
|
|
35
|
+
140: "rgb(var(--primary-140) / <alpha-value>)",
|
|
36
|
+
150: "rgb(var(--primary-150) / <alpha-value>)",
|
|
37
|
+
DEFAULT: "rgb(var(--primary-default) / <alpha-value>)",
|
|
38
|
+
foreground: "rgb(var(--primary-foreground) / <alpha-value>)",
|
|
39
|
+
},
|
|
40
|
+
secondary: {
|
|
41
|
+
5: "rgb(var(--secondary-5) / <alpha-value>)",
|
|
42
|
+
10: "rgb(var(--secondary-10) / <alpha-value>)",
|
|
43
|
+
20: "rgb(var(--secondary-20) / <alpha-value>)",
|
|
44
|
+
30: "rgb(var(--secondary-30) / <alpha-value>)",
|
|
45
|
+
40: "rgb(var(--secondary-40) / <alpha-value>)",
|
|
46
|
+
50: "rgb(var(--secondary-50) / <alpha-value>)",
|
|
47
|
+
60: "rgb(var(--secondary-60) / <alpha-value>)",
|
|
48
|
+
70: "rgb(var(--secondary-70) / <alpha-value>)",
|
|
49
|
+
80: "rgb(var(--secondary-80) / <alpha-value>)",
|
|
50
|
+
90: "rgb(var(--secondary-90) / <alpha-value>)",
|
|
51
|
+
100: "rgb(var(--secondary-100) / <alpha-value>)",
|
|
52
|
+
110: "rgb(var(--secondary-110) / <alpha-value>)",
|
|
53
|
+
120: "rgb(var(--secondary-120) / <alpha-value>)",
|
|
54
|
+
130: "rgb(var(--secondary-130) / <alpha-value>)",
|
|
55
|
+
140: "rgb(var(--secondary-140) / <alpha-value>)",
|
|
56
|
+
150: "rgb(var(--secondary-150) / <alpha-value>)",
|
|
57
|
+
DEFAULT: "rgb(var(--secondary-default) / <alpha-value>)",
|
|
58
|
+
foreground: "rgb(var(--secondary-foreground) / <alpha-value>)",
|
|
59
|
+
},
|
|
60
|
+
tertiary: {
|
|
61
|
+
5: "rgb(var(--tertiary-5) / <alpha-value>)",
|
|
62
|
+
10: "rgb(var(--tertiary-10) / <alpha-value>)",
|
|
63
|
+
20: "rgb(var(--tertiary-20) / <alpha-value>)",
|
|
64
|
+
30: "rgb(var(--tertiary-30) / <alpha-value>)",
|
|
65
|
+
40: "rgb(var(--tertiary-40) / <alpha-value>)",
|
|
66
|
+
50: "rgb(var(--tertiary-50) / <alpha-value>)",
|
|
67
|
+
60: "rgb(var(--tertiary-60) / <alpha-value>)",
|
|
68
|
+
70: "rgb(var(--tertiary-70) / <alpha-value>)",
|
|
69
|
+
80: "rgb(var(--tertiary-80) / <alpha-value>)",
|
|
70
|
+
90: "rgb(var(--tertiary-90) / <alpha-value>)",
|
|
71
|
+
100: "rgb(var(--tertiary-100) / <alpha-value>)",
|
|
72
|
+
110: "rgb(var(--tertiary-110) / <alpha-value>)",
|
|
73
|
+
120: "rgb(var(--tertiary-120) / <alpha-value>)",
|
|
74
|
+
130: "rgb(var(--tertiary-130) / <alpha-value>)",
|
|
75
|
+
140: "rgb(var(--tertiary-140) / <alpha-value>)",
|
|
76
|
+
150: "rgb(var(--tertiary-150) / <alpha-value>)",
|
|
77
|
+
DEFAULT: "rgb(var(--tertiary-default) / <alpha-value>)",
|
|
78
|
+
foreground: "rgb(var(--tertiary-foreground) / <alpha-value>)",
|
|
79
|
+
},
|
|
80
|
+
grey: {
|
|
81
|
+
5: "rgb(var(--grey-5) / <alpha-value>)",
|
|
82
|
+
10: "rgb(var(--grey-10) / <alpha-value>)",
|
|
83
|
+
20: "rgb(var(--grey-20) / <alpha-value>)",
|
|
84
|
+
30: "rgb(var(--grey-30) / <alpha-value>)",
|
|
85
|
+
40: "rgb(var(--grey-40) / <alpha-value>)",
|
|
86
|
+
50: "rgb(var(--grey-50) / <alpha-value>)",
|
|
87
|
+
60: "rgb(var(--grey-60) / <alpha-value>)",
|
|
88
|
+
70: "rgb(var(--grey-70) / <alpha-value>)",
|
|
89
|
+
80: "rgb(var(--grey-80) / <alpha-value>)",
|
|
90
|
+
90: "rgb(var(--grey-90) / <alpha-value>)",
|
|
91
|
+
100: "rgb(var(--grey-100) / <alpha-value>)",
|
|
92
|
+
110: "rgb(var(--grey-110) / <alpha-value>)",
|
|
93
|
+
120: "rgb(var(--grey-120) / <alpha-value>)",
|
|
94
|
+
130: "rgb(var(--grey-130) / <alpha-value>)",
|
|
95
|
+
140: "rgb(var(--grey-140) / <alpha-value>)",
|
|
96
|
+
150: "rgb(var(--grey-150) / <alpha-value>)",
|
|
97
|
+
DEFAULT: "rgb(var(--grey-default) / <alpha-value>)",
|
|
98
|
+
foreground: "rgb(var(--grey-foreground) / <alpha-value>)",
|
|
99
|
+
},
|
|
100
|
+
grey2: {
|
|
101
|
+
100: "rgb(var(--grey2-100) / <alpha-value>)",
|
|
102
|
+
200: "rgb(var(--grey2-200) / <alpha-value>)",
|
|
103
|
+
300: "rgb(var(--grey2-300) / <alpha-value>)",
|
|
104
|
+
400: "rgb(var(--grey2-400) / <alpha-value>)",
|
|
105
|
+
500: "rgb(var(--grey2-500) / <alpha-value>)",
|
|
106
|
+
600: "rgb(var(--grey2-600) / <alpha-value>)",
|
|
107
|
+
700: "rgb(var(--grey2-700) / <alpha-value>)",
|
|
108
|
+
800: "rgb(var(--grey2-800) / <alpha-value>)",
|
|
109
|
+
900: "rgb(var(--grey2-900) / <alpha-value>)",
|
|
110
|
+
DEFAULT: "rgb(var(--grey2-default) / <alpha-value>)",
|
|
111
|
+
foreground: "rgb(var(--grey2-foreground) / <alpha-value>)",
|
|
112
|
+
},
|
|
113
|
+
info: {
|
|
114
|
+
100: "rgb(var(--info-100)) / <alpha-value>)",
|
|
115
|
+
120: "rgb(var(--info-120)) / <alpha-value>)",
|
|
116
|
+
DEFAULT: "rgb(var(--info-default) / <alpha-value>)",
|
|
117
|
+
foreground: "rgb(var(--info-foreground) / <alpha-value>)",
|
|
118
|
+
},
|
|
119
|
+
success: {
|
|
120
|
+
100: "rgb(var(--success-100)) / <alpha-value>)",
|
|
121
|
+
120: "rgb(var(--success-120)) / <alpha-value>)",
|
|
122
|
+
DEFAULT: "rgb(var(--success-default) / <alpha-value>)",
|
|
123
|
+
foreground: "rgb(var(--success-foreground) / <alpha-value>)",
|
|
124
|
+
},
|
|
125
|
+
warning: {
|
|
126
|
+
100: "rgb(var(--warning-100) / <alpha-value>)",
|
|
127
|
+
120: "rgb(var(--warning-120) / <alpha-value>)",
|
|
128
|
+
DEFAULT: "rgb(var(--warning-default) / <alpha-value>)",
|
|
129
|
+
foreground: "rgb(var(--warning-foreground) / <alpha-value>)",
|
|
130
|
+
},
|
|
131
|
+
error: {
|
|
132
|
+
100: "rgb(var(--error-100) / <alpha-value>)",
|
|
133
|
+
120: "rgb(var(--error-120) / <alpha-value>)",
|
|
134
|
+
DEFAULT: "rgb(var(--error-100) / <alpha-value>)",
|
|
135
|
+
foreground: "rgb(var(--error-foreground) / <alpha-value>)",
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
};
|
package/dist/main.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import "./src/style.css";
|
|
2
|
-
export { default as Button } from "./src/components/Button/Button";
|
|
3
|
-
export { default as Table } from "./src/components/Table/Table";
|
|
4
|
-
export { default as TextInput } from "./src/components/Form/TextInput";
|
|
5
|
-
export { default as Text } from "./src/components/Form/Text";
|
|
6
|
-
export { default as Tabs } from "./src/components/Tabs/Tabs";
|
|
7
|
-
export { resloveTimestamp, getStartDateOfDay, getEndDateOfDay, getStartEndTimestampOfDay, getTimestampUTC, } from "./src/utils/datetime";
|
package/dist/main.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getTimestampUTC = exports.getStartEndTimestampOfDay = exports.getEndDateOfDay = exports.getStartDateOfDay = exports.resloveTimestamp = exports.Tabs = exports.Text = exports.TextInput = exports.Table = exports.Button = void 0;
|
|
7
|
-
// UI Components
|
|
8
|
-
require("./src/style.css");
|
|
9
|
-
var Button_1 = require("./src/components/Button/Button");
|
|
10
|
-
Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return __importDefault(Button_1).default; } });
|
|
11
|
-
var Table_1 = require("./src/components/Table/Table");
|
|
12
|
-
Object.defineProperty(exports, "Table", { enumerable: true, get: function () { return __importDefault(Table_1).default; } });
|
|
13
|
-
var TextInput_1 = require("./src/components/Form/TextInput");
|
|
14
|
-
Object.defineProperty(exports, "TextInput", { enumerable: true, get: function () { return __importDefault(TextInput_1).default; } });
|
|
15
|
-
var Text_1 = require("./src/components/Form/Text");
|
|
16
|
-
Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return __importDefault(Text_1).default; } });
|
|
17
|
-
var Tabs_1 = require("./src/components/Tabs/Tabs");
|
|
18
|
-
Object.defineProperty(exports, "Tabs", { enumerable: true, get: function () { return __importDefault(Tabs_1).default; } });
|
|
19
|
-
// UTILS
|
|
20
|
-
var datetime_1 = require("./src/utils/datetime");
|
|
21
|
-
Object.defineProperty(exports, "resloveTimestamp", { enumerable: true, get: function () { return datetime_1.resloveTimestamp; } });
|
|
22
|
-
Object.defineProperty(exports, "getStartDateOfDay", { enumerable: true, get: function () { return datetime_1.getStartDateOfDay; } });
|
|
23
|
-
Object.defineProperty(exports, "getEndDateOfDay", { enumerable: true, get: function () { return datetime_1.getEndDateOfDay; } });
|
|
24
|
-
Object.defineProperty(exports, "getStartEndTimestampOfDay", { enumerable: true, get: function () { return datetime_1.getStartEndTimestampOfDay; } });
|
|
25
|
-
Object.defineProperty(exports, "getTimestampUTC", { enumerable: true, get: function () { return datetime_1.getTimestampUTC; } });
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
interface ButtonProps {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
5
|
-
type?: "button" | "submit" | "reset";
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
className?: string;
|
|
8
|
-
isLoading?: boolean;
|
|
9
|
-
variant?: "primary" | "secondary";
|
|
10
|
-
}
|
|
11
|
-
declare const Button: React.FC<ButtonProps>;
|
|
12
|
-
export default Button;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const Button = ({ children, onClick, type = "button", disabled = false, className = "", isLoading = false, variant = "primary", }) => {
|
|
8
|
-
return (react_1.default.createElement("button", { className: `btn ${className} ${variant}`, onClick: onClick, type: type, disabled: disabled || isLoading }, isLoading ? "Loading..." : children));
|
|
9
|
-
};
|
|
10
|
-
exports.default = Button;
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
// src/Form.tsx
|
|
36
|
-
const react_1 = __importStar(require("react"));
|
|
37
|
-
const yup = __importStar(require("yup"));
|
|
38
|
-
const schema = yup.object().shape({
|
|
39
|
-
name: yup.string().required("Name is required"),
|
|
40
|
-
email: yup.string().email("Invalid email").required("Email is required"),
|
|
41
|
-
password: yup
|
|
42
|
-
.string()
|
|
43
|
-
.min(6, "Password must be at least 6 characters")
|
|
44
|
-
.required("Password is required"),
|
|
45
|
-
});
|
|
46
|
-
const Form = ({ onSubmit, className = "" }) => {
|
|
47
|
-
const [values, setValues] = (0, react_1.useState)({
|
|
48
|
-
name: "",
|
|
49
|
-
email: "",
|
|
50
|
-
password: "",
|
|
51
|
-
});
|
|
52
|
-
const [errors, setErrors] = (0, react_1.useState)({});
|
|
53
|
-
const handleChange = (e) => {
|
|
54
|
-
const { name, value } = e.target;
|
|
55
|
-
setValues(Object.assign(Object.assign({}, values), { [name]: value }));
|
|
56
|
-
};
|
|
57
|
-
const handleSubmit = (e) => __awaiter(void 0, void 0, void 0, function* () {
|
|
58
|
-
e.preventDefault();
|
|
59
|
-
try {
|
|
60
|
-
yield schema.validate(values, { abortEarly: false });
|
|
61
|
-
setErrors({});
|
|
62
|
-
onSubmit(values);
|
|
63
|
-
}
|
|
64
|
-
catch (err) {
|
|
65
|
-
if (err instanceof yup.ValidationError) {
|
|
66
|
-
const validationErrors = {};
|
|
67
|
-
err.inner.forEach((error) => {
|
|
68
|
-
if (error.path) {
|
|
69
|
-
validationErrors[error.path] = error.message;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
setErrors(validationErrors);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
return (react_1.default.createElement("form", { className: `form ${className}`, onSubmit: handleSubmit },
|
|
77
|
-
react_1.default.createElement("div", { className: "form-group" },
|
|
78
|
-
react_1.default.createElement("label", { htmlFor: "name" }, "Name"),
|
|
79
|
-
react_1.default.createElement("input", { id: "name", name: "name", type: "text", value: values.name, onChange: handleChange }),
|
|
80
|
-
errors.name && react_1.default.createElement("span", { className: "error" }, errors.name)),
|
|
81
|
-
react_1.default.createElement("div", { className: "form-group" },
|
|
82
|
-
react_1.default.createElement("label", { htmlFor: "email" }, "Email"),
|
|
83
|
-
react_1.default.createElement("input", { id: "email", name: "email", type: "email", value: values.email, onChange: handleChange }),
|
|
84
|
-
errors.email && react_1.default.createElement("span", { className: "error" }, errors.email)),
|
|
85
|
-
react_1.default.createElement("div", { className: "form-group" },
|
|
86
|
-
react_1.default.createElement("label", { htmlFor: "password" }, "Password"),
|
|
87
|
-
react_1.default.createElement("input", { id: "password", name: "password", type: "password", value: values.password, onChange: handleChange }),
|
|
88
|
-
errors.password && react_1.default.createElement("span", { className: "error" }, errors.password)),
|
|
89
|
-
react_1.default.createElement("button", { type: "submit" }, "Submit")));
|
|
90
|
-
};
|
|
91
|
-
exports.default = Form;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const Text = ({ children, size = "medium", color = "black", className = "", }) => {
|
|
8
|
-
return (react_1.default.createElement("span", { className: `text ${size} ${className}`, style: { color } }, children));
|
|
9
|
-
};
|
|
10
|
-
exports.default = Text;
|