oneslash-design-system 1.2.12 → 1.2.13
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/.claude/settings.local.json +9 -0
- package/.eslintrc.json +3 -0
- package/components/alert.tsx +132 -0
- package/components/button.tsx +120 -0
- package/components/checkBox.tsx +60 -0
- package/components/emptyBox.tsx +33 -0
- package/components/iconButton.tsx +103 -0
- package/components/loadingScreen.tsx +30 -0
- package/components/menu.tsx +35 -0
- package/components/menuItem.tsx +117 -0
- package/components/modal.tsx +85 -0
- package/components/navigation.tsx +27 -0
- package/components/popover.tsx +69 -0
- package/components/radioGroup.tsx +50 -0
- package/components/select.tsx +253 -0
- package/components/tab.tsx +85 -0
- package/components/tableCell.tsx +15 -0
- package/components/tableContainer.tsx +15 -0
- package/components/tableHeader.tsx +15 -0
- package/components/tableHeaderCell.tsx +15 -0
- package/components/tableRow.tsx +15 -0
- package/components/tabsContainer.tsx +23 -0
- package/components/tag.tsx +81 -0
- package/components/textField.tsx +116 -0
- package/components/textarea.tsx +120 -0
- package/components/timeStamp.tsx +65 -0
- package/components/tooltip.tsx +66 -0
- package/components/userImage.tsx +64 -0
- package/designTokens.js +234 -0
- package/dist/components/loadingScreen.jsx +2 -2
- package/dist/components/menuItem.d.ts +2 -8
- package/dist/components/menuItem.jsx +14 -34
- package/dist/components/tag.d.ts +2 -1
- package/dist/components/tag.jsx +22 -22
- package/index.css +8 -0
- package/index.ts +21 -0
- package/next.config.mjs +4 -0
- package/package.json +4 -28
- package/postcss.config.mjs +8 -0
- package/tailwind.config.ts +232 -0
- package/tsconfig.json +37 -0
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import type { Config } from "tailwindcss";
|
|
2
|
+
|
|
3
|
+
const designTokens = require('./designTokens');
|
|
4
|
+
|
|
5
|
+
const config: Config = {
|
|
6
|
+
content: [
|
|
7
|
+
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
|
8
|
+
],
|
|
9
|
+
theme: {
|
|
10
|
+
extend: {
|
|
11
|
+
colors: {
|
|
12
|
+
// Light: text colors
|
|
13
|
+
'light-text-primary': designTokens.colors.light.text.primary,
|
|
14
|
+
'light-text-secondary': designTokens.colors.light.text.secondary,
|
|
15
|
+
'light-text-disabled': designTokens.colors.light.text.disabled,
|
|
16
|
+
'light-text-contrast': designTokens.colors.light.text.contrast,
|
|
17
|
+
|
|
18
|
+
// Dark: text colors
|
|
19
|
+
'dark-text-primary': designTokens.colors.dark.text.primary,
|
|
20
|
+
'dark-text-secondary': designTokens.colors.dark.text.secondary,
|
|
21
|
+
'dark-text-disabled': designTokens.colors.dark.text.disabled,
|
|
22
|
+
'dark-text-contrast': designTokens.colors.dark.text.contrast,
|
|
23
|
+
|
|
24
|
+
// light: accent colors
|
|
25
|
+
'light-accent-main': designTokens.colors.light.accent.main,
|
|
26
|
+
'light-accent-dark': designTokens.colors.light.accent.dark,
|
|
27
|
+
'light-accent-light': designTokens.colors.light.accent.light,
|
|
28
|
+
'light-accent-contrast': designTokens.colors.light.accent.contrast,
|
|
29
|
+
|
|
30
|
+
// dark: accent colors
|
|
31
|
+
'dark-accent-main': designTokens.colors.dark.accent.main,
|
|
32
|
+
'dark-accent-dark': designTokens.colors.dark.accent.dark,
|
|
33
|
+
'dark-accent-light': designTokens.colors.dark.accent.light,
|
|
34
|
+
'dark-accent-contrast': designTokens.colors.dark.accent.contrast,
|
|
35
|
+
|
|
36
|
+
// Light: primary colors
|
|
37
|
+
'light-primary-main': designTokens.colors.light.primary.main,
|
|
38
|
+
'light-primary-dark': designTokens.colors.light.primary.dark,
|
|
39
|
+
'light-primary-light': designTokens.colors.light.primary.light,
|
|
40
|
+
'light-primary-contrast': designTokens.colors.light.primary.contrast,
|
|
41
|
+
|
|
42
|
+
// Dark: primary colors
|
|
43
|
+
'dark-primary-main': designTokens.colors.dark.primary.main,
|
|
44
|
+
'dark-primary-dark': designTokens.colors.dark.primary.dark,
|
|
45
|
+
'dark-primary-light': designTokens.colors.dark.primary.light,
|
|
46
|
+
'dark-primary-contrast': designTokens.colors.dark.primary.contrast,
|
|
47
|
+
|
|
48
|
+
// light: secondary colors
|
|
49
|
+
'light-secondary-main': designTokens.colors.light.secondary.main,
|
|
50
|
+
'light-secondary-dark': designTokens.colors.light.secondary.dark,
|
|
51
|
+
'light-secondary-light': designTokens.colors.light.secondary.light,
|
|
52
|
+
|
|
53
|
+
// dark: secondary colors
|
|
54
|
+
'dark-secondary-main': designTokens.colors.dark.secondary.main,
|
|
55
|
+
'dark-secondary-dark': designTokens.colors.dark.secondary.dark,
|
|
56
|
+
'dark-secondary-light': designTokens.colors.dark.secondary.light,
|
|
57
|
+
|
|
58
|
+
// light: error colors
|
|
59
|
+
'light-error-main': designTokens.colors.light.error.main,
|
|
60
|
+
'light-error-dark': designTokens.colors.light.error.dark,
|
|
61
|
+
'light-error-light': designTokens.colors.light.error.light,
|
|
62
|
+
|
|
63
|
+
// dark: error colors
|
|
64
|
+
'dark-error-main': designTokens.colors.dark.error.main,
|
|
65
|
+
'dark-error-dark': designTokens.colors.dark.error.dark,
|
|
66
|
+
'dark-error-light': designTokens.colors.dark.error.light,
|
|
67
|
+
|
|
68
|
+
// light: warning colors
|
|
69
|
+
'light-warning-main': designTokens.colors.light.warning.main,
|
|
70
|
+
'light-warning-dark': designTokens.colors.light.warning.dark,
|
|
71
|
+
'light-warning-light': designTokens.colors.light.warning.light,
|
|
72
|
+
|
|
73
|
+
// dark: warning colors
|
|
74
|
+
'dark-warning-main': designTokens.colors.dark.warning.main,
|
|
75
|
+
'dark-warning-dark': designTokens.colors.dark.warning.dark,
|
|
76
|
+
'dark-warning-light': designTokens.colors.dark.warning.light,
|
|
77
|
+
|
|
78
|
+
// light: info colors
|
|
79
|
+
'light-info-main': designTokens.colors.light.info.main,
|
|
80
|
+
'light-info-dark': designTokens.colors.light.info.dark,
|
|
81
|
+
'light-info-light': designTokens.colors.light.info.light,
|
|
82
|
+
|
|
83
|
+
// dark: info colors
|
|
84
|
+
'dark-info-main': designTokens.colors.dark.info.main,
|
|
85
|
+
'dark-info-dark': designTokens.colors.dark.info.dark,
|
|
86
|
+
'dark-info-light': designTokens.colors.dark.info.light,
|
|
87
|
+
|
|
88
|
+
// light: success colors
|
|
89
|
+
'light-success-main': designTokens.colors.light.success.main,
|
|
90
|
+
'light-success-dark': designTokens.colors.light.success.dark,
|
|
91
|
+
'light-success-light': designTokens.colors.light.success.light,
|
|
92
|
+
|
|
93
|
+
// dark: success colors
|
|
94
|
+
'dark-success-main': designTokens.colors.dark.success.main,
|
|
95
|
+
'dark-success-dark': designTokens.colors.dark.success.dark,
|
|
96
|
+
'dark-success-light': designTokens.colors.dark.success.light,
|
|
97
|
+
|
|
98
|
+
// Light: background colors
|
|
99
|
+
'light-background-default': designTokens.colors.light.background.default,
|
|
100
|
+
'light-background-accent100': designTokens.colors.light.background.accent100,
|
|
101
|
+
'light-background-accent200': designTokens.colors.light.background.accent200,
|
|
102
|
+
'light-background-accent300': designTokens.colors.light.background.accent300,
|
|
103
|
+
|
|
104
|
+
// Dark: background colors
|
|
105
|
+
'dark-background-default': designTokens.colors.dark.background.default,
|
|
106
|
+
'dark-background-accent100': designTokens.colors.dark.background.accent100,
|
|
107
|
+
'dark-background-accent200': designTokens.colors.dark.background.accent200,
|
|
108
|
+
'dark-background-accent300': designTokens.colors.dark.background.accent300,
|
|
109
|
+
|
|
110
|
+
// Light: action colors
|
|
111
|
+
'light-action-active': designTokens.colors.light.action.active,
|
|
112
|
+
'light-action-hover': designTokens.colors.light.action.hover,
|
|
113
|
+
'light-action-selected': designTokens.colors.light.action.selected,
|
|
114
|
+
'light-action-disabledBackground': designTokens.colors.light.action.disabledBackground,
|
|
115
|
+
'light-action-disabled': designTokens.colors.light.action.disabled,
|
|
116
|
+
|
|
117
|
+
// Dark: action colors
|
|
118
|
+
'dark-action-active': designTokens.colors.dark.action.active,
|
|
119
|
+
'dark-action-hover': designTokens.colors.dark.action.hover,
|
|
120
|
+
'dark-action-selected': designTokens.colors.dark.action.selected,
|
|
121
|
+
'dark-action-disabledBackground': designTokens.colors.dark.action.disabledBackground,
|
|
122
|
+
'dark-action-disabled': designTokens.colors.dark.action.disabled,
|
|
123
|
+
|
|
124
|
+
// light: action background
|
|
125
|
+
'light-actionBackground-enabled': designTokens.colors.light.actionBackground.enabled,
|
|
126
|
+
'light-actionBackground-hovered': designTokens.colors.light.actionBackground.hovered,
|
|
127
|
+
'light-actionBackground-selected': designTokens.colors.light.actionBackground.selected,
|
|
128
|
+
'light-actionBackground-disabled': designTokens.colors.light.actionBackground.disabled,
|
|
129
|
+
|
|
130
|
+
// dark: action background
|
|
131
|
+
'dark-actionBackground-enabled': designTokens.colors.dark.actionBackground.enabled,
|
|
132
|
+
'dark-actionBackground-hovered': designTokens.colors.dark.actionBackground.hovered,
|
|
133
|
+
'dark-actionBackground-selected': designTokens.colors.dark.actionBackground.selected,
|
|
134
|
+
'dark-actionBackground-disabled': designTokens.colors.dark.actionBackground.disabled,
|
|
135
|
+
|
|
136
|
+
// light: action outlinedBorder
|
|
137
|
+
'light-actionOutlinedBorder-enabled': designTokens.colors.light.actionOutlinedBorder.enabled,
|
|
138
|
+
'light-actionOutlinedBorder-hovered': designTokens.colors.light.actionOutlinedBorder.hovered,
|
|
139
|
+
'light-actionOutlinedBorder-selected': designTokens.colors.light.actionOutlinedBorder.selected,
|
|
140
|
+
'light-actionOutlinedBorder-disabled': designTokens.colors.light.actionOutlinedBorder.disabled,
|
|
141
|
+
|
|
142
|
+
// dark: action outlinedBorder
|
|
143
|
+
'dark-actionOutlinedBorder-enabled': designTokens.colors.dark.actionOutlinedBorder.enabled,
|
|
144
|
+
'dark-actionOutlinedBorder-hovered': designTokens.colors.dark.actionOutlinedBorder.hovered,
|
|
145
|
+
'dark-actionOutlinedBorder-selected': designTokens.colors.dark.actionOutlinedBorder.selected,
|
|
146
|
+
'dark-actionOutlinedBorder-disabled': designTokens.colors.dark.actionOutlinedBorder.disabled,
|
|
147
|
+
|
|
148
|
+
// misc light colors
|
|
149
|
+
'light-misc-divider': designTokens.colors.light.misc.divider,
|
|
150
|
+
|
|
151
|
+
// misc dark colors
|
|
152
|
+
'dark-misc-divider': designTokens.colors.dark.misc.divider,
|
|
153
|
+
|
|
154
|
+
'dark-misc-scrollbar-bg': designTokens.colors.dark.background.default,
|
|
155
|
+
'dark-misc-scrollbar-thumb': designTokens.colors.dark.background.accent200,
|
|
156
|
+
},
|
|
157
|
+
spacing: {
|
|
158
|
+
small: designTokens.spacing.small,
|
|
159
|
+
medium: designTokens.spacing.medium,
|
|
160
|
+
large: designTokens.spacing.large,
|
|
161
|
+
},
|
|
162
|
+
fontSize: {
|
|
163
|
+
h1: designTokens.typography.h1.size,
|
|
164
|
+
h2: designTokens.typography.h2.size,
|
|
165
|
+
h3: designTokens.typography.h3.size,
|
|
166
|
+
h4: designTokens.typography.h4.size,
|
|
167
|
+
h5: designTokens.typography.h5.size,
|
|
168
|
+
h6: designTokens.typography.h6.size,
|
|
169
|
+
subtitle1: designTokens.typography.subtitle1.size,
|
|
170
|
+
subtitle2: designTokens.typography.subtitle2.size,
|
|
171
|
+
body1: designTokens.typography.body1.size,
|
|
172
|
+
body2: designTokens.typography.body2.size,
|
|
173
|
+
caption: designTokens.typography.caption.size,
|
|
174
|
+
},
|
|
175
|
+
fontFamily: {
|
|
176
|
+
inter: designTokens.typography.family,
|
|
177
|
+
},
|
|
178
|
+
fontWeight: {
|
|
179
|
+
h1: designTokens.typography.h1.weight,
|
|
180
|
+
h2: designTokens.typography.h2.weight,
|
|
181
|
+
h3: designTokens.typography.h3.weight,
|
|
182
|
+
h4: designTokens.typography.h4.weight,
|
|
183
|
+
h5: designTokens.typography.h5.weight,
|
|
184
|
+
h6: designTokens.typography.h6.weight,
|
|
185
|
+
subtitle1: designTokens.typography.subtitle1.weight,
|
|
186
|
+
subtitle2: designTokens.typography.subtitle2.weight,
|
|
187
|
+
body1: designTokens.typography.body1.weight,
|
|
188
|
+
body2: designTokens.typography.body2.weight,
|
|
189
|
+
caption: designTokens.typography.caption.weight,
|
|
190
|
+
},
|
|
191
|
+
letterSpacing: {
|
|
192
|
+
h1: designTokens.typography.h1.letterSpacing,
|
|
193
|
+
h2: designTokens.typography.h2.letterSpacing,
|
|
194
|
+
h3: designTokens.typography.h3.letterSpacing,
|
|
195
|
+
h4: designTokens.typography.h4.letterSpacing,
|
|
196
|
+
h5: designTokens.typography.h5.letterSpacing,
|
|
197
|
+
h6: designTokens.typography.h6.letterSpacing,
|
|
198
|
+
subtitle1: designTokens.typography.subtitle1.letterSpacing,
|
|
199
|
+
subtitle2: designTokens.typography.subtitle2.letterSpacing,
|
|
200
|
+
body1: designTokens.typography.body1.letterSpacing,
|
|
201
|
+
body2: designTokens.typography.body2.letterSpacing,
|
|
202
|
+
caption: designTokens.typography.caption.letterSpacing,
|
|
203
|
+
},
|
|
204
|
+
lineHeight: {
|
|
205
|
+
h1: designTokens.typography.h1.lineHeight,
|
|
206
|
+
h2: designTokens.typography.h2.lineHeight,
|
|
207
|
+
h3: designTokens.typography.h3.lineHeight,
|
|
208
|
+
h4: designTokens.typography.h4.lineHeight,
|
|
209
|
+
h5: designTokens.typography.h5.lineHeight,
|
|
210
|
+
h6: designTokens.typography.h6.lineHeight,
|
|
211
|
+
subtitle1: designTokens.typography.subtitle1.lineHeight,
|
|
212
|
+
subtitle2: designTokens.typography.subtitle2.lineHeight,
|
|
213
|
+
body1: designTokens.typography.body1.lineHeight,
|
|
214
|
+
body2: designTokens.typography.body2.lineHeight,
|
|
215
|
+
caption: designTokens.typography.caption.lineHeight,
|
|
216
|
+
},
|
|
217
|
+
textAlign: {
|
|
218
|
+
left: designTokens.typography.alignments.left,
|
|
219
|
+
center: designTokens.typography.alignments.center,
|
|
220
|
+
right: designTokens.typography.alignments.right,
|
|
221
|
+
justify: designTokens.typography.alignments.justify,
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
plugins: [
|
|
226
|
+
require('tailwindcss'),
|
|
227
|
+
require('autoprefixer'),
|
|
228
|
+
require('tailwind-scrollbar'),
|
|
229
|
+
|
|
230
|
+
],
|
|
231
|
+
};
|
|
232
|
+
export default config;
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"lib": [ "dom", "dom.iterable", "esnext" ],
|
|
4
|
+
"allowJs": true,
|
|
5
|
+
"skipLibCheck": true,
|
|
6
|
+
"strict": true,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"module": "esnext",
|
|
9
|
+
"moduleResolution": "node",
|
|
10
|
+
"resolveJsonModule": true,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"jsx": "preserve",
|
|
13
|
+
"incremental": true,
|
|
14
|
+
"plugins": [
|
|
15
|
+
{
|
|
16
|
+
"name": "next"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"paths": {
|
|
20
|
+
"@/*": [ "./*" ]
|
|
21
|
+
},
|
|
22
|
+
"forceConsistentCasingInFileNames": true,
|
|
23
|
+
"declaration": true,
|
|
24
|
+
"declarationDir": "./dist", // Output .d.ts files to dist
|
|
25
|
+
"outDir": "./dist", // Output compiled .js files to dist
|
|
26
|
+
"emitDeclarationOnly": false
|
|
27
|
+
},
|
|
28
|
+
"include": [
|
|
29
|
+
"next-env.d.ts",
|
|
30
|
+
"**/*.ts",
|
|
31
|
+
"**/*.tsx",
|
|
32
|
+
"components/*.tsx",
|
|
33
|
+
"*.js",
|
|
34
|
+
"index.css"
|
|
35
|
+
],
|
|
36
|
+
"exclude": [ "node_modules", "dist" ]
|
|
37
|
+
}
|