@rovula/ui 0.0.4 → 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 +41 -10
- 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/style.css +0 -3
- 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
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var resloveTimestamp = function (timestamp) {
|
|
2
|
+
if (String(timestamp).length > 10)
|
|
3
|
+
return timestamp / 1000;
|
|
4
|
+
return timestamp;
|
|
5
|
+
};
|
|
6
|
+
// Set the time to the start of the day (00:00:00)
|
|
7
|
+
var getStartDateOfDay = function (date) {
|
|
8
|
+
var startDate = new Date(date);
|
|
9
|
+
startDate.setHours(0, 0, 0, 0);
|
|
10
|
+
return startDate;
|
|
11
|
+
};
|
|
12
|
+
// Set the time to the end of the day (23:59:59.999)
|
|
13
|
+
var getEndDateOfDay = function (date) {
|
|
14
|
+
var startDate = new Date(date);
|
|
15
|
+
startDate.setHours(23, 59, 59, 999);
|
|
16
|
+
return startDate;
|
|
17
|
+
};
|
|
18
|
+
var getStartEndTimestampOfDay = function () {
|
|
19
|
+
var startTime = getStartDateOfDay(new Date());
|
|
20
|
+
var endTime = getEndDateOfDay(startTime);
|
|
21
|
+
return {
|
|
22
|
+
startTime: startTime,
|
|
23
|
+
endTime: endTime,
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
var getTimestampUTC = function (date) {
|
|
27
|
+
var dateUtc = Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds());
|
|
28
|
+
return resloveTimestamp(dateUtc);
|
|
29
|
+
};
|
|
30
|
+
export { resloveTimestamp, getStartDateOfDay, getEndDateOfDay, getStartEndTimestampOfDay, getTimestampUTC, };
|
package/package.json
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rovula/ui",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"main": "dist/
|
|
5
|
-
"
|
|
3
|
+
"version": "0.0.5",
|
|
4
|
+
"main": "dist/cjs/bundle.js",
|
|
5
|
+
"module": "dist/esm/bundle.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
6
7
|
"scripts": {
|
|
7
8
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
9
|
"build": "tsc",
|
|
9
|
-
"prepare": "npm run build ",
|
|
10
|
-
"build:css": "copyfiles src/style.css dist"
|
|
10
|
+
"prepare": "npm run build && npm run build-css && npm run build:css",
|
|
11
|
+
"build:css": "copyfiles src/styles/style.css dist",
|
|
12
|
+
"build-css": "npx tailwindcss -i ./src/theme/global.css -o ./dist/src/theme/global.css && copyfiles -u 1 \"src/theme/**/*\" dist",
|
|
13
|
+
"clean": "rm -rf dist",
|
|
14
|
+
"build:package": "npm run clean && rollup -c",
|
|
15
|
+
"public": "npm run build:package && npm publish --access=public",
|
|
16
|
+
"storybook:serve-css": "npx tailwindcss -i ./src/theme/global.css -o ./dist/src/theme/global.css",
|
|
17
|
+
"storybook": "storybook dev -p 6006",
|
|
18
|
+
"build-storybook": "storybook build"
|
|
11
19
|
},
|
|
12
20
|
"files": [
|
|
13
21
|
"dist/**/*",
|
|
@@ -21,12 +29,37 @@
|
|
|
21
29
|
"@babel/preset-env": "^7.24.5",
|
|
22
30
|
"@babel/preset-react": "^7.24.1",
|
|
23
31
|
"@babel/preset-typescript": "^7.24.1",
|
|
32
|
+
"@chromatic-com/storybook": "^1.4.0",
|
|
33
|
+
"@rollup/plugin-commonjs": "^25.0.8",
|
|
34
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
35
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
24
36
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
37
|
+
"@storybook/addon-essentials": "^8.1.3",
|
|
38
|
+
"@storybook/addon-interactions": "^8.1.3",
|
|
39
|
+
"@storybook/addon-links": "^8.1.3",
|
|
40
|
+
"@storybook/addon-onboarding": "^8.1.3",
|
|
41
|
+
"@storybook/addon-postcss": "^2.0.0",
|
|
42
|
+
"@storybook/addon-styling": "^1.3.7",
|
|
43
|
+
"@storybook/addon-styling-webpack": "^1.0.0",
|
|
44
|
+
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
|
|
45
|
+
"@storybook/addon-webpack5-compiler-swc": "^1.0.2",
|
|
46
|
+
"@storybook/blocks": "^8.1.3",
|
|
47
|
+
"@storybook/react": "^8.1.3",
|
|
48
|
+
"@storybook/react-webpack5": "^8.1.3",
|
|
49
|
+
"@storybook/test": "^8.1.3",
|
|
25
50
|
"@types/node": "^20.12.12",
|
|
51
|
+
"autoprefixer": "^10.4.19",
|
|
26
52
|
"babel-loader": "^9.1.3",
|
|
27
53
|
"copyfiles": "^2.4.1",
|
|
28
54
|
"css-loader": "^7.1.2",
|
|
55
|
+
"postcss": "^8.4.38",
|
|
56
|
+
"rollup": "^4.18.0",
|
|
57
|
+
"rollup-plugin-dts": "^6.1.1",
|
|
58
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
59
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
60
|
+
"storybook": "^8.1.3",
|
|
29
61
|
"style-loader": "^4.0.0",
|
|
62
|
+
"tailwindcss": "^3.4.3",
|
|
30
63
|
"typescript": "^5.4.5",
|
|
31
64
|
"webpack": "^5.91.0",
|
|
32
65
|
"webpack-cli": "^5.1.4"
|
|
@@ -35,14 +68,12 @@
|
|
|
35
68
|
"@headlessui/react": "^2.0.3",
|
|
36
69
|
"@heroicons/react": "^2.1.3",
|
|
37
70
|
"@types/react": "^18.3.2",
|
|
38
|
-
"autoprefixer": "^10.4.19",
|
|
39
71
|
"axios": "^1.6.4",
|
|
72
|
+
"class-variance-authority": "^0.7.0",
|
|
40
73
|
"clsx": "^2.1.1",
|
|
41
|
-
"postcss": "^8.1.0",
|
|
42
74
|
"react": "^17.0.0 || ^18.0.0",
|
|
43
75
|
"react-dom": "^17.0.0 || ^18.0.0",
|
|
44
|
-
"
|
|
45
|
-
"tailwindcss": "^3.4.3",
|
|
76
|
+
"tailwind-merge": "^2.3.0",
|
|
46
77
|
"yup": "^1.4.0"
|
|
47
78
|
},
|
|
48
79
|
"peerDependencies": {
|
|
@@ -51,7 +82,7 @@
|
|
|
51
82
|
},
|
|
52
83
|
"repository": {
|
|
53
84
|
"type": "git",
|
|
54
|
-
"url": "
|
|
85
|
+
"url": ""
|
|
55
86
|
},
|
|
56
87
|
"bugs": {
|
|
57
88
|
"url": "https://gitlab.com/cloud_arv/subsea/common/ui/issues"
|