@incognia/cosmik 0.0.1
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/.eslintrc.cjs +18 -0
- package/.github/CODEOWNERS +4 -0
- package/.storybook/main.ts +19 -0
- package/.storybook/preview.ts +17 -0
- package/CONTRIBUTING.md +20 -0
- package/README.md +39 -0
- package/components.json +12 -0
- package/dist/Button/Button.stories.d.ts +23 -0
- package/dist/Button/Button.stories.d.ts.map +1 -0
- package/dist/Button/index.d.ts +12 -0
- package/dist/Button/index.d.ts.map +1 -0
- package/dist/Colors.d.ts +53 -0
- package/dist/Colors.d.ts.map +1 -0
- package/dist/cosmik.css +666 -0
- package/dist/index.cjs.js +2 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.cjs10.js +2 -0
- package/dist/index.cjs10.js.map +1 -0
- package/dist/index.cjs11.js +2 -0
- package/dist/index.cjs11.js.map +1 -0
- package/dist/index.cjs12.js +10 -0
- package/dist/index.cjs12.js.map +1 -0
- package/dist/index.cjs13.js +20 -0
- package/dist/index.cjs13.js.map +1 -0
- package/dist/index.cjs14.js +2 -0
- package/dist/index.cjs14.js.map +1 -0
- package/dist/index.cjs15.js +2 -0
- package/dist/index.cjs15.js.map +1 -0
- package/dist/index.cjs16.js +2 -0
- package/dist/index.cjs16.js.map +1 -0
- package/dist/index.cjs17.js +2 -0
- package/dist/index.cjs17.js.map +1 -0
- package/dist/index.cjs18.js +2 -0
- package/dist/index.cjs18.js.map +1 -0
- package/dist/index.cjs19.js +2 -0
- package/dist/index.cjs19.js.map +1 -0
- package/dist/index.cjs2.js +2 -0
- package/dist/index.cjs2.js.map +1 -0
- package/dist/index.cjs20.js +2 -0
- package/dist/index.cjs20.js.map +1 -0
- package/dist/index.cjs21.js +2 -0
- package/dist/index.cjs21.js.map +1 -0
- package/dist/index.cjs22.js +2 -0
- package/dist/index.cjs22.js.map +1 -0
- package/dist/index.cjs3.js +2 -0
- package/dist/index.cjs3.js.map +1 -0
- package/dist/index.cjs4.js +2 -0
- package/dist/index.cjs4.js.map +1 -0
- package/dist/index.cjs5.js +2 -0
- package/dist/index.cjs5.js.map +1 -0
- package/dist/index.cjs6.js +2 -0
- package/dist/index.cjs6.js.map +1 -0
- package/dist/index.cjs7.js +2 -0
- package/dist/index.cjs7.js.map +1 -0
- package/dist/index.cjs8.js +2 -0
- package/dist/index.cjs8.js.map +1 -0
- package/dist/index.cjs9.js +2 -0
- package/dist/index.cjs9.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.es.js +10 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.es10.js +37 -0
- package/dist/index.es10.js.map +1 -0
- package/dist/index.es11.js +5 -0
- package/dist/index.es11.js.map +1 -0
- package/dist/index.es12.js +33 -0
- package/dist/index.es12.js.map +1 -0
- package/dist/index.es13.js +602 -0
- package/dist/index.es13.js.map +1 -0
- package/dist/index.es14.js +5 -0
- package/dist/index.es14.js.map +1 -0
- package/dist/index.es15.js +154 -0
- package/dist/index.es15.js.map +1 -0
- package/dist/index.es16.js +19 -0
- package/dist/index.es16.js.map +1 -0
- package/dist/index.es17.js +345 -0
- package/dist/index.es17.js.map +1 -0
- package/dist/index.es18.js +48 -0
- package/dist/index.es18.js.map +1 -0
- package/dist/index.es19.js +5 -0
- package/dist/index.es19.js.map +1 -0
- package/dist/index.es2.js +55 -0
- package/dist/index.es2.js.map +1 -0
- package/dist/index.es20.js +5 -0
- package/dist/index.es20.js.map +1 -0
- package/dist/index.es21.js +5 -0
- package/dist/index.es21.js.map +1 -0
- package/dist/index.es22.js +7 -0
- package/dist/index.es22.js.map +1 -0
- package/dist/index.es3.js +242 -0
- package/dist/index.es3.js.map +1 -0
- package/dist/index.es4.js +46 -0
- package/dist/index.es4.js.map +1 -0
- package/dist/index.es5.js +266 -0
- package/dist/index.es5.js.map +1 -0
- package/dist/index.es6.js +9 -0
- package/dist/index.es6.js.map +1 -0
- package/dist/index.es7.js +9 -0
- package/dist/index.es7.js.map +1 -0
- package/dist/index.es8.js +7 -0
- package/dist/index.es8.js.map +1 -0
- package/dist/index.es9.js +108 -0
- package/dist/index.es9.js.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/tailwind-theme-config.d.ts +198 -0
- package/dist/tailwind-theme-config.d.ts.map +1 -0
- package/package.json +69 -0
- package/postcss.config.js +6 -0
- package/src/Button/Button.stories.tsx +88 -0
- package/src/Button/index.tsx +56 -0
- package/src/Colors.ts +60 -0
- package/src/css/font.css +68 -0
- package/src/css/index.css +37 -0
- package/src/index.css +5 -0
- package/src/index.ts +10 -0
- package/src/lib/utils.ts +6 -0
- package/src/tailwind-theme-config.ts +240 -0
- package/tailwind.config.js +7 -0
- package/tsconfig.json +21 -0
- package/vite.config.ts +33 -0
package/src/css/font.css
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/* Adapted from https://use.typekit.net/jsf0fxl.css */
|
|
2
|
+
|
|
3
|
+
/* Neue Haas Grotesk Text */
|
|
4
|
+
@font-face {
|
|
5
|
+
font-family: 'neue-haas-grotesk-text';
|
|
6
|
+
src: url('https://use.typekit.net/af/0230dd/00000000000000007735bb33/30/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3')
|
|
7
|
+
format('woff2'),
|
|
8
|
+
url('https://use.typekit.net/af/0230dd/00000000000000007735bb33/30/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3')
|
|
9
|
+
format('woff'),
|
|
10
|
+
url('https://use.typekit.net/af/0230dd/00000000000000007735bb33/30/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3')
|
|
11
|
+
format('opentype');
|
|
12
|
+
font-display: auto;
|
|
13
|
+
font-style: normal;
|
|
14
|
+
font-weight: 400;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@font-face {
|
|
18
|
+
font-family: 'neue-haas-grotesk-text';
|
|
19
|
+
src: url('https://use.typekit.net/af/160664/00000000000000007735bb32/30/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n5&v=3')
|
|
20
|
+
format('woff2'),
|
|
21
|
+
url('https://use.typekit.net/af/160664/00000000000000007735bb32/30/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n5&v=3')
|
|
22
|
+
format('woff'),
|
|
23
|
+
url('https://use.typekit.net/af/160664/00000000000000007735bb32/30/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n5&v=3')
|
|
24
|
+
format('opentype');
|
|
25
|
+
font-display: auto;
|
|
26
|
+
font-style: normal;
|
|
27
|
+
font-weight: 500;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Neue Haas Grotesk Display */
|
|
31
|
+
@font-face {
|
|
32
|
+
font-family: 'neue-haas-grotesk-display';
|
|
33
|
+
src: url('https://use.typekit.net/af/99b799/00000000000000007735bb38/30/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n2&v=3')
|
|
34
|
+
format('woff2'),
|
|
35
|
+
url('https://use.typekit.net/af/99b799/00000000000000007735bb38/30/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n2&v=3')
|
|
36
|
+
format('woff'),
|
|
37
|
+
url('https://use.typekit.net/af/99b799/00000000000000007735bb38/30/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n2&v=3')
|
|
38
|
+
format('opentype');
|
|
39
|
+
font-display: auto;
|
|
40
|
+
font-style: normal;
|
|
41
|
+
font-weight: 200;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@font-face {
|
|
45
|
+
font-family: 'neue-haas-grotesk-display';
|
|
46
|
+
src: url('https://use.typekit.net/af/1ba16c/00000000000000007735bb5a/30/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n5&v=3')
|
|
47
|
+
format('woff2'),
|
|
48
|
+
url('https://use.typekit.net/af/1ba16c/00000000000000007735bb5a/30/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n5&v=3')
|
|
49
|
+
format('woff'),
|
|
50
|
+
url('https://use.typekit.net/af/1ba16c/00000000000000007735bb5a/30/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n5&v=3')
|
|
51
|
+
format('opentype');
|
|
52
|
+
font-display: auto;
|
|
53
|
+
font-style: normal;
|
|
54
|
+
font-weight: 400;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@font-face {
|
|
58
|
+
font-family: 'neue-haas-grotesk-display';
|
|
59
|
+
src: url('https://use.typekit.net/af/153042/00000000000000007735bb62/30/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n6&v=3')
|
|
60
|
+
format('woff2'),
|
|
61
|
+
url('https://use.typekit.net/af/153042/00000000000000007735bb62/30/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n6&v=3')
|
|
62
|
+
format('woff'),
|
|
63
|
+
url('https://use.typekit.net/af/153042/00000000000000007735bb62/30/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n6&v=3')
|
|
64
|
+
format('opentype');
|
|
65
|
+
font-display: auto;
|
|
66
|
+
font-style: normal;
|
|
67
|
+
font-weight: 500;
|
|
68
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
@import './font.css';
|
|
2
|
+
|
|
3
|
+
* {
|
|
4
|
+
-webkit-font-smoothing: antialiased;
|
|
5
|
+
-moz-osx-font-smoothing: grayscale;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
body {
|
|
9
|
+
@apply font-default text-gray-900 leading-20 text-base;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
h1,
|
|
13
|
+
h2 {
|
|
14
|
+
@apply font-display font-medium text-lg text-gray-800 leading-24;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
a {
|
|
18
|
+
@apply text-robinblue-500 font-medium;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
a:hover {
|
|
22
|
+
@apply text-robinblue-600;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
a:active {
|
|
26
|
+
@apply text-robinblue-700;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
::placeholder,
|
|
30
|
+
input::placeholder,
|
|
31
|
+
textarea::placeholder {
|
|
32
|
+
@apply text-gray-700 opacity-100;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
label {
|
|
36
|
+
@apply text-gray-800 text-sm leading-14;
|
|
37
|
+
}
|
package/src/index.css
ADDED
package/src/index.ts
ADDED
package/src/lib/utils.ts
ADDED
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import Color from 'color'
|
|
2
|
+
import Colors from './Colors'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
screens: {
|
|
6
|
+
sm: '640px',
|
|
7
|
+
md: '768px',
|
|
8
|
+
lg: '1024px',
|
|
9
|
+
xl: '1280px',
|
|
10
|
+
'2xl': '1536px'
|
|
11
|
+
},
|
|
12
|
+
colors: {
|
|
13
|
+
transparent: 'transparent',
|
|
14
|
+
white: '#fff',
|
|
15
|
+
gray: {
|
|
16
|
+
50: Colors.GRAY_50,
|
|
17
|
+
100: Colors.GRAY_100,
|
|
18
|
+
200: Colors.GRAY_200,
|
|
19
|
+
300: Colors.GRAY_300,
|
|
20
|
+
400: Colors.GRAY_400,
|
|
21
|
+
500: Colors.GRAY_500,
|
|
22
|
+
600: Colors.GRAY_600,
|
|
23
|
+
700: Colors.GRAY_700,
|
|
24
|
+
800: Colors.GRAY_800,
|
|
25
|
+
900: Colors.GRAY_900
|
|
26
|
+
},
|
|
27
|
+
green: {
|
|
28
|
+
50: Colors.GREEN_50,
|
|
29
|
+
500: Colors.GREEN_500,
|
|
30
|
+
600: Colors.GREEN_600,
|
|
31
|
+
700: Colors.GREEN_700,
|
|
32
|
+
800: Colors.GREEN_800
|
|
33
|
+
},
|
|
34
|
+
magenta: {
|
|
35
|
+
50: Colors.MAGENTA_50,
|
|
36
|
+
500: Colors.MAGENTA_500,
|
|
37
|
+
600: Colors.MAGENTA_600,
|
|
38
|
+
700: Colors.MAGENTA_700
|
|
39
|
+
},
|
|
40
|
+
purple: {
|
|
41
|
+
50: Colors.PURPLE_50,
|
|
42
|
+
100: Colors.PURPLE_100,
|
|
43
|
+
200: Colors.PURPLE_200,
|
|
44
|
+
300: Colors.PURPLE_300,
|
|
45
|
+
400: Colors.PURPLE_400,
|
|
46
|
+
500: Colors.PURPLE_500,
|
|
47
|
+
600: Colors.PURPLE_600,
|
|
48
|
+
700: Colors.PURPLE_700,
|
|
49
|
+
800: Colors.PURPLE_800,
|
|
50
|
+
900: Colors.PURPLE_900
|
|
51
|
+
},
|
|
52
|
+
robinblue: {
|
|
53
|
+
50: Colors.ROBINBLUE_50,
|
|
54
|
+
100: Colors.ROBINBLUE_100,
|
|
55
|
+
200: Colors.ROBINBLUE_200,
|
|
56
|
+
300: Colors.ROBINBLUE_300,
|
|
57
|
+
400: Colors.ROBINBLUE_400,
|
|
58
|
+
500: Colors.ROBINBLUE_500,
|
|
59
|
+
600: Colors.ROBINBLUE_600,
|
|
60
|
+
700: Colors.ROBINBLUE_700,
|
|
61
|
+
800: Colors.ROBINBLUE_800,
|
|
62
|
+
900: Colors.ROBINBLUE_900
|
|
63
|
+
},
|
|
64
|
+
yellow: {
|
|
65
|
+
50: Colors.YELLOW_50,
|
|
66
|
+
500: Colors.YELLOW_500,
|
|
67
|
+
600: Colors.YELLOW_600,
|
|
68
|
+
700: Colors.YELLOW_700
|
|
69
|
+
},
|
|
70
|
+
chart: {
|
|
71
|
+
purple: Colors.CHART_PURPLE,
|
|
72
|
+
magenta: Colors.CHART_MAGENTA,
|
|
73
|
+
yellow: Colors.CHART_YELLOW,
|
|
74
|
+
green: Colors.CHART_GREEN,
|
|
75
|
+
robinblue: Colors.CHART_ROBINBLUE
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
spacing: {
|
|
79
|
+
0: '0',
|
|
80
|
+
2: '2px',
|
|
81
|
+
4: '4px',
|
|
82
|
+
8: '8px',
|
|
83
|
+
12: '12px',
|
|
84
|
+
16: '16px',
|
|
85
|
+
24: '24px',
|
|
86
|
+
32: '32px',
|
|
87
|
+
40: '40px',
|
|
88
|
+
48: '48px',
|
|
89
|
+
64: '64px',
|
|
90
|
+
96: '96px'
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
backgroundColor: (theme: any) => ({
|
|
94
|
+
transparent: 'transparent',
|
|
95
|
+
white: theme('colors.white'),
|
|
96
|
+
gray: {
|
|
97
|
+
...theme('colors.gray'),
|
|
98
|
+
'50-80': Color(theme('colors').gray['50']).alpha(0.8).string(),
|
|
99
|
+
'900-4': Color(theme('colors').gray['900']).alpha(0.04).string(),
|
|
100
|
+
'900-8': Color(theme('colors').gray['900']).alpha(0.08).string(),
|
|
101
|
+
'900-12': Color(theme('colors').gray['900']).alpha(0.12).string(),
|
|
102
|
+
'900-16': Color(theme('colors').gray['900']).alpha(0.16).string(),
|
|
103
|
+
'900-24': Color(theme('colors').gray['900']).alpha(0.24).string(),
|
|
104
|
+
'900-32': Color(theme('colors').gray['900']).alpha(0.32).string()
|
|
105
|
+
},
|
|
106
|
+
robinblue: {
|
|
107
|
+
...theme('colors.robinblue'),
|
|
108
|
+
'500-8': Color(theme('colors').robinblue['500']).alpha(0.08).string(),
|
|
109
|
+
'500-16': Color(theme('colors').robinblue['500']).alpha(0.16).string(),
|
|
110
|
+
'500-40': Color(theme('colors').robinblue['500']).alpha(0.4).string()
|
|
111
|
+
},
|
|
112
|
+
purple: {
|
|
113
|
+
...theme('colors.purple'),
|
|
114
|
+
'700-48': Color(theme('colors').purple['700']).alpha(0.48).string()
|
|
115
|
+
},
|
|
116
|
+
green: theme('colors.green'),
|
|
117
|
+
yellow: theme('colors.yellow'),
|
|
118
|
+
magenta: theme('colors.magenta'),
|
|
119
|
+
chart: {
|
|
120
|
+
...theme('colors.chart'),
|
|
121
|
+
'purple-80': Color(theme('colors').chart['purple']).alpha(0.8).string()
|
|
122
|
+
}
|
|
123
|
+
}),
|
|
124
|
+
borderColor: (theme: any) => ({
|
|
125
|
+
DEFAULT: theme('colors.gray.400'),
|
|
126
|
+
gray: {
|
|
127
|
+
400: Color(theme('colors').gray['400']).string(),
|
|
128
|
+
700: Color(theme('colors').gray['700']).string(),
|
|
129
|
+
'900-8': Color(theme('colors').gray['900']).alpha(0.08).string(),
|
|
130
|
+
'900-16': Color(theme('colors').gray['900']).alpha(0.16).string(),
|
|
131
|
+
'900-24': Color(theme('colors').gray['900']).alpha(0.24).string()
|
|
132
|
+
},
|
|
133
|
+
purple: {
|
|
134
|
+
...theme('colors.purple'),
|
|
135
|
+
'900-8': Color(theme('colors').purple['900']).alpha(0.08).string()
|
|
136
|
+
},
|
|
137
|
+
robinblue: theme('colors.robinblue'),
|
|
138
|
+
green: theme('colors.green'),
|
|
139
|
+
yellow: theme('colors.yellow'),
|
|
140
|
+
magenta: theme('colors.magenta'),
|
|
141
|
+
white: theme('colors.white'),
|
|
142
|
+
transparent: theme('colors.transparent')
|
|
143
|
+
}),
|
|
144
|
+
borderRadius: {
|
|
145
|
+
none: '0',
|
|
146
|
+
small: '4px',
|
|
147
|
+
DEFAULT: '8px',
|
|
148
|
+
full: '9999px'
|
|
149
|
+
},
|
|
150
|
+
borderWidth: {
|
|
151
|
+
DEFAULT: '1px',
|
|
152
|
+
2: '2px',
|
|
153
|
+
1: '1px',
|
|
154
|
+
0: '0'
|
|
155
|
+
},
|
|
156
|
+
boxShadow: {
|
|
157
|
+
100: '0 0 0 1px rgba(61, 63, 62, .16)',
|
|
158
|
+
200: '0 4px 6px -1px rgba(61, 63, 62, .16)',
|
|
159
|
+
300: '0 8px 10px -4px rgba(61, 63, 62, .16)',
|
|
160
|
+
400: '0 16px 24px -6px rgba(61, 63, 62, .16)',
|
|
161
|
+
500: '0 24px 32px 0px rgba(61, 63, 62, .16)',
|
|
162
|
+
DEFAULT: '0 4px 16px -1px rgba(61, 63, 62, .16)',
|
|
163
|
+
'field-hover': 'inset 0 0px 0px 1px rgba(61, 63, 62, .16)',
|
|
164
|
+
'field-active': '0 0px 0px 1px rgba(61, 63, 62, .48)',
|
|
165
|
+
'error-field-hover': '0 0px 0px 1px rgba(201, 44, 70, .32)',
|
|
166
|
+
'error-field-active': '0 0px 0px 1px rgba(201, 44, 70, .48)',
|
|
167
|
+
'warning-field-hover': '0 0px 0px 1px rgba(176, 88, 0, .32)',
|
|
168
|
+
'warning-field-active': '0 0px 0px 1px rgba(176, 88, 0, .48)',
|
|
169
|
+
none: 'none'
|
|
170
|
+
},
|
|
171
|
+
fontFamily: {
|
|
172
|
+
default: ['neue-haas-grotesk-text', 'sans-serif'],
|
|
173
|
+
display: ['neue-haas-grotesk-display', 'sans-serif'],
|
|
174
|
+
icons: ['"Material Icons"'],
|
|
175
|
+
iconsOutlined: ['"Material Icons Outlined"']
|
|
176
|
+
},
|
|
177
|
+
fontSize: {
|
|
178
|
+
sm: '12px',
|
|
179
|
+
base: '14px',
|
|
180
|
+
lg: '18px',
|
|
181
|
+
xl: '20px',
|
|
182
|
+
'icon-sm': '16px',
|
|
183
|
+
'icon-md': '20px'
|
|
184
|
+
},
|
|
185
|
+
fontWeight: {
|
|
186
|
+
thin: '200',
|
|
187
|
+
normal: '400',
|
|
188
|
+
medium: '500'
|
|
189
|
+
},
|
|
190
|
+
letterSpacing: {
|
|
191
|
+
normal: '0'
|
|
192
|
+
},
|
|
193
|
+
lineHeight: {
|
|
194
|
+
// 12/14, 14/20, 20/24, 24/28
|
|
195
|
+
14: '14px',
|
|
196
|
+
20: '20px',
|
|
197
|
+
24: '24px',
|
|
198
|
+
// TODO: refactor line heights to use 14/20, 12/18, 18/24
|
|
199
|
+
18: '18px',
|
|
200
|
+
26: '26px'
|
|
201
|
+
},
|
|
202
|
+
minHeight: (theme: any) => ({
|
|
203
|
+
0: '0',
|
|
204
|
+
...theme('spacing'),
|
|
205
|
+
full: '100%',
|
|
206
|
+
screen: '100vh',
|
|
207
|
+
min: 'min-content',
|
|
208
|
+
max: 'max-content',
|
|
209
|
+
fit: 'fit-content'
|
|
210
|
+
}),
|
|
211
|
+
minWidth: (theme: any) => ({
|
|
212
|
+
0: '0',
|
|
213
|
+
...theme('spacing'),
|
|
214
|
+
full: '100%',
|
|
215
|
+
min: 'min-content',
|
|
216
|
+
max: 'max-content',
|
|
217
|
+
fit: 'fit-content'
|
|
218
|
+
}),
|
|
219
|
+
opacity: {
|
|
220
|
+
0: '0',
|
|
221
|
+
8: '0.08',
|
|
222
|
+
16: '0.16',
|
|
223
|
+
24: '0.24',
|
|
224
|
+
32: '0.32',
|
|
225
|
+
40: '0.40',
|
|
226
|
+
48: '0.48',
|
|
227
|
+
64: '0.64',
|
|
228
|
+
80: '0.80',
|
|
229
|
+
100: '1'
|
|
230
|
+
},
|
|
231
|
+
textColor: (theme: any) => ({
|
|
232
|
+
white: theme('colors.white'),
|
|
233
|
+
gray: theme('colors.gray'),
|
|
234
|
+
robinblue: theme('colors.robinblue'),
|
|
235
|
+
green: theme('colors.green'),
|
|
236
|
+
magenta: theme('colors.magenta'),
|
|
237
|
+
yellow: theme('colors.yellow'),
|
|
238
|
+
purple: theme('colors.purple')
|
|
239
|
+
})
|
|
240
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"allowJs": false,
|
|
4
|
+
"allowSyntheticDefaultImports": true,
|
|
5
|
+
"declaration": true,
|
|
6
|
+
"declarationMap": true,
|
|
7
|
+
"esModuleInterop": false,
|
|
8
|
+
"forceConsistentCasingInFileNames": true,
|
|
9
|
+
"isolatedModules": true,
|
|
10
|
+
"jsx": "react-jsx",
|
|
11
|
+
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
|
12
|
+
"moduleResolution": "Node",
|
|
13
|
+
"outDir": "dist",
|
|
14
|
+
"resolveJsonModule": true,
|
|
15
|
+
"skipLibCheck": false,
|
|
16
|
+
"strict": true,
|
|
17
|
+
"target": "ESNext",
|
|
18
|
+
"useDefineForClassFields": true,
|
|
19
|
+
},
|
|
20
|
+
"include": ["src", "src/tailwind-theme-config.ts"]
|
|
21
|
+
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import react from '@vitejs/plugin-react'
|
|
2
|
+
import path from 'path'
|
|
3
|
+
import { defineConfig } from 'vite'
|
|
4
|
+
import dts from 'vite-plugin-dts'
|
|
5
|
+
import { dependencies, peerDependencies } from './package.json'
|
|
6
|
+
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
plugins: [
|
|
9
|
+
react(),
|
|
10
|
+
dts({
|
|
11
|
+
include: 'src/**/*.{ts,tsx}'
|
|
12
|
+
})
|
|
13
|
+
],
|
|
14
|
+
build: {
|
|
15
|
+
lib: {
|
|
16
|
+
entry: path.resolve(__dirname, 'src/index.ts'),
|
|
17
|
+
formats: ['es', 'cjs'],
|
|
18
|
+
fileName: format => `index.${format}.js`
|
|
19
|
+
},
|
|
20
|
+
rollupOptions: {
|
|
21
|
+
external: [
|
|
22
|
+
...Object.keys(peerDependencies),
|
|
23
|
+
...Object.keys(dependencies)
|
|
24
|
+
],
|
|
25
|
+
output: {
|
|
26
|
+
preserveModules: true,
|
|
27
|
+
exports: 'named'
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
target: 'esnext',
|
|
31
|
+
sourcemap: true
|
|
32
|
+
}
|
|
33
|
+
})
|