oneslash-design-system 1.1.10 → 1.1.12
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/components/button.tsx +3 -23
- package/components/iconButton.tsx +2 -2
- package/components/menuItem.tsx +0 -1
- package/components/modal.tsx +14 -17
- package/components/popover.tsx +1 -5
- package/components/tab.tsx +2 -2
- package/components/tag.tsx +0 -2
- package/dist/components/alert.d.ts +9 -0
- package/dist/components/alert.jsx +38 -0
- package/dist/components/button.d.ts +13 -0
- package/dist/components/button.jsx +141 -0
- package/dist/components/checkBox.d.ts +7 -0
- package/dist/components/checkBox.jsx +29 -0
- package/dist/components/emptyBox.d.ts +7 -0
- package/dist/components/emptyBox.jsx +17 -0
- package/dist/components/iconButton.d.ts +11 -0
- package/dist/components/iconButton.jsx +126 -0
- package/dist/components/loadingScreen.d.ts +3 -0
- package/dist/components/loadingScreen.jsx +14 -0
- package/dist/components/menuItem.d.ts +12 -0
- package/dist/components/menuItem.jsx +100 -0
- package/dist/components/modal.d.ts +11 -0
- package/dist/components/modal.jsx +47 -0
- package/dist/components/popover.d.ts +10 -0
- package/dist/components/popover.jsx +52 -0
- package/dist/components/radioGroup.d.ts +13 -0
- package/dist/components/radioGroup.jsx +17 -0
- package/dist/components/tab.d.ts +12 -0
- package/dist/components/tab.jsx +113 -0
- package/dist/components/tag.d.ts +14 -0
- package/dist/components/tag.jsx +123 -0
- package/dist/components/textField.d.ts +20 -0
- package/dist/components/textField.jsx +55 -0
- package/dist/components/timeStamp.d.ts +7 -0
- package/dist/components/timeStamp.jsx +58 -0
- package/dist/components/tooltip.d.ts +7 -0
- package/dist/components/tooltip.jsx +41 -0
- package/dist/components/userImage.d.ts +7 -0
- package/dist/components/userImage.jsx +13 -0
- package/dist/designTokens.d.ts +354 -0
- package/dist/designTokens.js +232 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +17 -0
- package/dist/output.css +1185 -0
- package/dist/tailwind.config.d.ts +3 -0
- package/dist/tailwind.config.js +202 -0
- package/package.json +1 -1
- package/{tailwind.config.js → tailwind.config.ts} +7 -99
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
var designTokens = require('./designTokens');
|
|
2
|
+
var config = {
|
|
3
|
+
content: [
|
|
4
|
+
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
|
5
|
+
],
|
|
6
|
+
theme: {
|
|
7
|
+
extend: {
|
|
8
|
+
colors: {
|
|
9
|
+
// Light: text colors
|
|
10
|
+
'light-text-primary': designTokens.colors.light.text.primary,
|
|
11
|
+
'light-text-secondary': designTokens.colors.light.text.secondary,
|
|
12
|
+
'light-text-disabled': designTokens.colors.light.text.disabled,
|
|
13
|
+
'light-text-contrast': designTokens.colors.light.text.contrast,
|
|
14
|
+
// Dark: text colors
|
|
15
|
+
'dark-text-primary': designTokens.colors.dark.text.primary,
|
|
16
|
+
'dark-text-secondary': designTokens.colors.dark.text.secondary,
|
|
17
|
+
'dark-text-disabled': designTokens.colors.dark.text.disabled,
|
|
18
|
+
'dark-text-contrast': designTokens.colors.dark.text.contrast,
|
|
19
|
+
// light: accent colors
|
|
20
|
+
'light-accent-main': designTokens.colors.light.accent.main,
|
|
21
|
+
'light-accent-dark': designTokens.colors.light.accent.dark,
|
|
22
|
+
'light-accent-light': designTokens.colors.light.accent.light,
|
|
23
|
+
'light-accent-contrast': designTokens.colors.light.accent.contrast,
|
|
24
|
+
// dark: accent colors
|
|
25
|
+
'dark-accent-main': designTokens.colors.dark.accent.main,
|
|
26
|
+
'dark-accent-dark': designTokens.colors.dark.accent.dark,
|
|
27
|
+
'dark-accent-light': designTokens.colors.dark.accent.light,
|
|
28
|
+
'dark-accent-contrast': designTokens.colors.dark.accent.contrast,
|
|
29
|
+
// Light: primary colors
|
|
30
|
+
'light-primary-main': designTokens.colors.light.primary.main,
|
|
31
|
+
'light-primary-dark': designTokens.colors.light.primary.dark,
|
|
32
|
+
'light-primary-light': designTokens.colors.light.primary.light,
|
|
33
|
+
'light-primary-contrast': designTokens.colors.light.primary.contrast,
|
|
34
|
+
// Dark: primary colors
|
|
35
|
+
'dark-primary-main': designTokens.colors.dark.primary.main,
|
|
36
|
+
'dark-primary-dark': designTokens.colors.dark.primary.dark,
|
|
37
|
+
'dark-primary-light': designTokens.colors.dark.primary.light,
|
|
38
|
+
'dark-primary-contrast': designTokens.colors.dark.primary.contrast,
|
|
39
|
+
// light: secondary colors
|
|
40
|
+
'light-secondary-main': designTokens.colors.light.secondary.main,
|
|
41
|
+
'light-secondary-dark': designTokens.colors.light.secondary.dark,
|
|
42
|
+
'light-secondary-light': designTokens.colors.light.secondary.light,
|
|
43
|
+
// dark: secondary colors
|
|
44
|
+
'dark-secondary-main': designTokens.colors.dark.secondary.main,
|
|
45
|
+
'dark-secondary-dark': designTokens.colors.dark.secondary.dark,
|
|
46
|
+
'dark-secondary-light': designTokens.colors.dark.secondary.light,
|
|
47
|
+
// light: error colors
|
|
48
|
+
'light-error-main': designTokens.colors.light.error.main,
|
|
49
|
+
'light-error-dark': designTokens.colors.light.error.dark,
|
|
50
|
+
'light-error-light': designTokens.colors.light.error.light,
|
|
51
|
+
// dark: error colors
|
|
52
|
+
'dark-error-main': designTokens.colors.dark.error.main,
|
|
53
|
+
'dark-error-dark': designTokens.colors.dark.error.dark,
|
|
54
|
+
'dark-error-light': designTokens.colors.dark.error.light,
|
|
55
|
+
// light: warning colors
|
|
56
|
+
'light-warning-main': designTokens.colors.light.warning.main,
|
|
57
|
+
'light-warning-dark': designTokens.colors.light.warning.dark,
|
|
58
|
+
'light-warning-light': designTokens.colors.light.warning.light,
|
|
59
|
+
// dark: warning colors
|
|
60
|
+
'dark-warning-main': designTokens.colors.dark.warning.main,
|
|
61
|
+
'dark-warning-dark': designTokens.colors.dark.warning.dark,
|
|
62
|
+
'dark-warning-light': designTokens.colors.dark.warning.light,
|
|
63
|
+
// light: info colors
|
|
64
|
+
'light-info-main': designTokens.colors.light.info.main,
|
|
65
|
+
'light-info-dark': designTokens.colors.light.info.dark,
|
|
66
|
+
'light-info-light': designTokens.colors.light.info.light,
|
|
67
|
+
// dark: info colors
|
|
68
|
+
'dark-info-main': designTokens.colors.dark.info.main,
|
|
69
|
+
'dark-info-dark': designTokens.colors.dark.info.dark,
|
|
70
|
+
'dark-info-light': designTokens.colors.dark.info.light,
|
|
71
|
+
// light: success colors
|
|
72
|
+
'light-success-main': designTokens.colors.light.success.main,
|
|
73
|
+
'light-success-dark': designTokens.colors.light.success.dark,
|
|
74
|
+
'light-success-light': designTokens.colors.light.success.light,
|
|
75
|
+
// dark: success colors
|
|
76
|
+
'dark-success-main': designTokens.colors.dark.success.main,
|
|
77
|
+
'dark-success-dark': designTokens.colors.dark.success.dark,
|
|
78
|
+
'dark-success-light': designTokens.colors.dark.success.light,
|
|
79
|
+
// Light: background colors
|
|
80
|
+
'light-background-default': designTokens.colors.light.background.default,
|
|
81
|
+
'light-background-accent100': designTokens.colors.light.background.accent100,
|
|
82
|
+
'light-background-accent200': designTokens.colors.light.background.accent200,
|
|
83
|
+
'light-background-accent300': designTokens.colors.light.background.accent300,
|
|
84
|
+
// Dark: background colors
|
|
85
|
+
'dark-background-default': designTokens.colors.dark.background.default,
|
|
86
|
+
'dark-background-accent100': designTokens.colors.dark.background.accent100,
|
|
87
|
+
'dark-background-accent200': designTokens.colors.dark.background.accent200,
|
|
88
|
+
'dark-background-accent300': designTokens.colors.dark.background.accent300,
|
|
89
|
+
// Light: action colors
|
|
90
|
+
'light-action-active': designTokens.colors.light.action.active,
|
|
91
|
+
'light-action-hover': designTokens.colors.light.action.hover,
|
|
92
|
+
'light-action-selected': designTokens.colors.light.action.selected,
|
|
93
|
+
'light-action-disabledBackground': designTokens.colors.light.action.disabledBackground,
|
|
94
|
+
'light-action-disabled': designTokens.colors.light.action.disabled,
|
|
95
|
+
// Dark: action colors
|
|
96
|
+
'dark-action-active': designTokens.colors.dark.action.active,
|
|
97
|
+
'dark-action-hover': designTokens.colors.dark.action.hover,
|
|
98
|
+
'dark-action-selected': designTokens.colors.dark.action.selected,
|
|
99
|
+
'dark-action-disabledBackground': designTokens.colors.dark.action.disabledBackground,
|
|
100
|
+
'dark-action-disabled': designTokens.colors.dark.action.disabled,
|
|
101
|
+
// light: action background
|
|
102
|
+
'light-actionBackground-enabled': designTokens.colors.light.actionBackground.enabled,
|
|
103
|
+
'light-actionBackground-hovered': designTokens.colors.light.actionBackground.hovered,
|
|
104
|
+
'light-actionBackground-selected': designTokens.colors.light.actionBackground.selected,
|
|
105
|
+
'light-actionBackground-disabled': designTokens.colors.light.actionBackground.disabled,
|
|
106
|
+
// dark: action background
|
|
107
|
+
'dark-actionBackground-enabled': designTokens.colors.dark.actionBackground.enabled,
|
|
108
|
+
'dark-actionBackground-hovered': designTokens.colors.dark.actionBackground.hovered,
|
|
109
|
+
'dark-actionBackground-selected': designTokens.colors.dark.actionBackground.selected,
|
|
110
|
+
'dark-actionBackground-disabled': designTokens.colors.dark.actionBackground.disabled,
|
|
111
|
+
// light: action outlinedBorder
|
|
112
|
+
'light-actionOutlinedBorder-enabled': designTokens.colors.light.actionOutlinedBorder.enabled,
|
|
113
|
+
'light-actionOutlinedBorder-hovered': designTokens.colors.light.actionOutlinedBorder.hovered,
|
|
114
|
+
'light-actionOutlinedBorder-selected': designTokens.colors.light.actionOutlinedBorder.selected,
|
|
115
|
+
'light-actionOutlinedBorder-disabled': designTokens.colors.light.actionOutlinedBorder.disabled,
|
|
116
|
+
// dark: action outlinedBorder
|
|
117
|
+
'dark-actionOutlinedBorder-enabled': designTokens.colors.dark.actionOutlinedBorder.enabled,
|
|
118
|
+
'dark-actionOutlinedBorder-hovered': designTokens.colors.dark.actionOutlinedBorder.hovered,
|
|
119
|
+
'dark-actionOutlinedBorder-selected': designTokens.colors.dark.actionOutlinedBorder.selected,
|
|
120
|
+
'dark-actionOutlinedBorder-disabled': designTokens.colors.dark.actionOutlinedBorder.disabled,
|
|
121
|
+
// misc light colors
|
|
122
|
+
'light-misc-divider': designTokens.colors.light.misc.divider,
|
|
123
|
+
// misc dark colors
|
|
124
|
+
'dark-misc-divider': designTokens.colors.dark.misc.divider,
|
|
125
|
+
'dark-misc-scrollbar-bg': designTokens.colors.dark.background.default,
|
|
126
|
+
'dark-misc-scrollbar-thumb': designTokens.colors.dark.background.accent200,
|
|
127
|
+
},
|
|
128
|
+
spacing: {
|
|
129
|
+
small: designTokens.spacing.small,
|
|
130
|
+
medium: designTokens.spacing.medium,
|
|
131
|
+
large: designTokens.spacing.large,
|
|
132
|
+
},
|
|
133
|
+
fontSize: {
|
|
134
|
+
h1: designTokens.typography.h1.size,
|
|
135
|
+
h2: designTokens.typography.h2.size,
|
|
136
|
+
h3: designTokens.typography.h3.size,
|
|
137
|
+
h4: designTokens.typography.h4.size,
|
|
138
|
+
h5: designTokens.typography.h5.size,
|
|
139
|
+
h6: designTokens.typography.h6.size,
|
|
140
|
+
subtitle1: designTokens.typography.subtitle1.size,
|
|
141
|
+
subtitle2: designTokens.typography.subtitle2.size,
|
|
142
|
+
body1: designTokens.typography.body1.size,
|
|
143
|
+
body2: designTokens.typography.body2.size,
|
|
144
|
+
caption: designTokens.typography.caption.size,
|
|
145
|
+
},
|
|
146
|
+
fontFamily: {
|
|
147
|
+
inter: designTokens.typography.family,
|
|
148
|
+
},
|
|
149
|
+
fontWeight: {
|
|
150
|
+
h1: designTokens.typography.h1.weight,
|
|
151
|
+
h2: designTokens.typography.h2.weight,
|
|
152
|
+
h3: designTokens.typography.h3.weight,
|
|
153
|
+
h4: designTokens.typography.h4.weight,
|
|
154
|
+
h5: designTokens.typography.h5.weight,
|
|
155
|
+
h6: designTokens.typography.h6.weight,
|
|
156
|
+
subtitle1: designTokens.typography.subtitle1.weight,
|
|
157
|
+
subtitle2: designTokens.typography.subtitle2.weight,
|
|
158
|
+
body1: designTokens.typography.body1.weight,
|
|
159
|
+
body2: designTokens.typography.body2.weight,
|
|
160
|
+
caption: designTokens.typography.caption.weight,
|
|
161
|
+
},
|
|
162
|
+
letterSpacing: {
|
|
163
|
+
h1: designTokens.typography.h1.letterSpacing,
|
|
164
|
+
h2: designTokens.typography.h2.letterSpacing,
|
|
165
|
+
h3: designTokens.typography.h3.letterSpacing,
|
|
166
|
+
h4: designTokens.typography.h4.letterSpacing,
|
|
167
|
+
h5: designTokens.typography.h5.letterSpacing,
|
|
168
|
+
h6: designTokens.typography.h6.letterSpacing,
|
|
169
|
+
subtitle1: designTokens.typography.subtitle1.letterSpacing,
|
|
170
|
+
subtitle2: designTokens.typography.subtitle2.letterSpacing,
|
|
171
|
+
body1: designTokens.typography.body1.letterSpacing,
|
|
172
|
+
body2: designTokens.typography.body2.letterSpacing,
|
|
173
|
+
caption: designTokens.typography.caption.letterSpacing,
|
|
174
|
+
},
|
|
175
|
+
lineHeight: {
|
|
176
|
+
h1: designTokens.typography.h1.lineHeight,
|
|
177
|
+
h2: designTokens.typography.h2.lineHeight,
|
|
178
|
+
h3: designTokens.typography.h3.lineHeight,
|
|
179
|
+
h4: designTokens.typography.h4.lineHeight,
|
|
180
|
+
h5: designTokens.typography.h5.lineHeight,
|
|
181
|
+
h6: designTokens.typography.h6.lineHeight,
|
|
182
|
+
subtitle1: designTokens.typography.subtitle1.lineHeight,
|
|
183
|
+
subtitle2: designTokens.typography.subtitle2.lineHeight,
|
|
184
|
+
body1: designTokens.typography.body1.lineHeight,
|
|
185
|
+
body2: designTokens.typography.body2.lineHeight,
|
|
186
|
+
caption: designTokens.typography.caption.lineHeight,
|
|
187
|
+
},
|
|
188
|
+
textAlign: {
|
|
189
|
+
left: designTokens.typography.alignments.left,
|
|
190
|
+
center: designTokens.typography.alignments.center,
|
|
191
|
+
right: designTokens.typography.alignments.right,
|
|
192
|
+
justify: designTokens.typography.alignments.justify,
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
plugins: [
|
|
197
|
+
require('tailwindcss'),
|
|
198
|
+
require('autoprefixer'),
|
|
199
|
+
require('tailwind-scrollbar'),
|
|
200
|
+
],
|
|
201
|
+
};
|
|
202
|
+
export default config;
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type { Config } from "tailwindcss";
|
|
2
|
+
|
|
1
3
|
const designTokens = require('./designTokens');
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
darkMode: 'class',
|
|
5
|
+
const config: Config = {
|
|
5
6
|
content: [
|
|
6
|
-
"./components/**/*.{js,ts,jsx,tsx}",
|
|
7
|
+
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
|
7
8
|
],
|
|
8
9
|
theme: {
|
|
9
10
|
extend: {
|
|
@@ -225,100 +226,7 @@ module.exports = {
|
|
|
225
226
|
require('tailwindcss'),
|
|
226
227
|
require('autoprefixer'),
|
|
227
228
|
require('tailwind-scrollbar'),
|
|
228
|
-
|
|
229
|
-
const newUtilities = {
|
|
230
|
-
'.text-h1': {
|
|
231
|
-
fontSize: theme('fontSize.h1'),
|
|
232
|
-
fontWeight: theme('fontWeight.h1'),
|
|
233
|
-
letterSpacing: theme('letterSpacing.h1'),
|
|
234
|
-
lineHeight: theme('lineHeight.h1'),
|
|
235
|
-
fontFamily: theme('fontFamily.inter'),
|
|
236
|
-
},
|
|
237
|
-
'.text-h2': {
|
|
238
|
-
fontSize: theme('fontSize.h2'),
|
|
239
|
-
fontWeight: theme('fontWeight.h2'),
|
|
240
|
-
letterSpacing: theme('letterSpacing.h2'),
|
|
241
|
-
lineHeight: theme('lineHeight.h2'),
|
|
242
|
-
fontFamily: theme('fontFamily.inter'),
|
|
243
|
-
},
|
|
244
|
-
'.text-h3': {
|
|
245
|
-
fontSize: theme('fontSize.h3'),
|
|
246
|
-
fontWeight: theme('fontWeight.h3'),
|
|
247
|
-
letterSpacing: theme('letterSpacing.h3'),
|
|
248
|
-
lineHeight: theme('lineHeight.h3'),
|
|
249
|
-
fontFamily: theme('fontFamily.inter'),
|
|
250
|
-
},
|
|
251
|
-
'.text-h4': {
|
|
252
|
-
fontSize: theme('fontSize.h4'),
|
|
253
|
-
fontWeight: theme('fontWeight.h4'),
|
|
254
|
-
letterSpacing: theme('letterSpacing.h4'),
|
|
255
|
-
lineHeight: theme('lineHeight.h4'),
|
|
256
|
-
fontFamily: theme('fontFamily.inter'),
|
|
257
|
-
},
|
|
258
|
-
'.text-h5': {
|
|
259
|
-
fontSize: theme('fontSize.h5'),
|
|
260
|
-
fontWeight: theme('fontWeight.h5'),
|
|
261
|
-
letterSpacing: theme('letterSpacing.h5'),
|
|
262
|
-
lineHeight: theme('lineHeight.h5'),
|
|
263
|
-
fontFamily: theme('fontFamily.inter'),
|
|
264
|
-
},
|
|
265
|
-
'.text-h6': {
|
|
266
|
-
fontSize: theme('fontSize.h6'),
|
|
267
|
-
fontWeight: theme('fontWeight.h6'),
|
|
268
|
-
letterSpacing: theme('letterSpacing.h6'),
|
|
269
|
-
lineHeight: theme('lineHeight.h6'),
|
|
270
|
-
fontFamily: theme('fontFamily.inter'),
|
|
271
|
-
},
|
|
272
|
-
'.text-subtitle1': {
|
|
273
|
-
fontSize: theme('fontSize.subtitle1'),
|
|
274
|
-
fontWeight: theme('fontWeight.subtitle1'),
|
|
275
|
-
letterSpacing: theme('letterSpacing.subtitle1'),
|
|
276
|
-
lineHeight: theme('lineHeight.subtitle1'),
|
|
277
|
-
fontFamily: theme('fontFamily.inter'),
|
|
278
|
-
},
|
|
279
|
-
'.text-subtitle2': {
|
|
280
|
-
fontSize: theme('fontSize.subtitle2'),
|
|
281
|
-
fontWeight: theme('fontWeight.subtitle2'),
|
|
282
|
-
letterSpacing: theme('letterSpacing.subtitle2'),
|
|
283
|
-
lineHeight: theme('lineHeight.subtitle2'),
|
|
284
|
-
fontFamily: theme('fontFamily.inter'),
|
|
285
|
-
},
|
|
286
|
-
'.text-body1': {
|
|
287
|
-
fontSize: theme('fontSize.body1'),
|
|
288
|
-
fontWeight: theme('fontWeight.body1'),
|
|
289
|
-
letterSpacing: theme('letterSpacing.body1'),
|
|
290
|
-
lineHeight: theme('lineHeight.body1'),
|
|
291
|
-
fontFamily: theme('fontFamily.inter'),
|
|
292
|
-
},
|
|
293
|
-
'.text-body2': {
|
|
294
|
-
fontSize: theme('fontSize.body2'),
|
|
295
|
-
fontWeight: theme('fontWeight.body2'),
|
|
296
|
-
letterSpacing: theme('letterSpacing.body2'),
|
|
297
|
-
lineHeight: theme('lineHeight.body2'),
|
|
298
|
-
fontFamily: theme('fontFamily.inter'),
|
|
299
|
-
},
|
|
300
|
-
'.text-caption': {
|
|
301
|
-
fontSize: theme('fontSize.caption'),
|
|
302
|
-
fontWeight: theme('fontWeight.caption'),
|
|
303
|
-
letterSpacing: theme('letterSpacing.caption'),
|
|
304
|
-
lineHeight: theme('lineHeight.caption'),
|
|
305
|
-
fontFamily: theme('fontFamily.inter'),
|
|
306
|
-
},
|
|
307
|
-
'.text-left': {
|
|
308
|
-
textAlign: theme('textAlign.left'),
|
|
309
|
-
},
|
|
310
|
-
'.text-center': {
|
|
311
|
-
textAlign: theme('textAlign.center'),
|
|
312
|
-
},
|
|
313
|
-
'.text-right': {
|
|
314
|
-
textAlign: theme('textAlign.right'),
|
|
315
|
-
},
|
|
316
|
-
'.text-justify': {
|
|
317
|
-
textAlign: theme('textAlign.justify'),
|
|
318
|
-
},
|
|
319
|
-
};
|
|
320
|
-
|
|
321
|
-
addUtilities(newUtilities);
|
|
322
|
-
},
|
|
229
|
+
|
|
323
230
|
],
|
|
324
|
-
}
|
|
231
|
+
};
|
|
232
|
+
export default config;
|