@linagora/twake-mui 1.6.0 → 2.0.0
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/CHANGELOG.md +27 -0
- package/README.md +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/lib/makeDarkOverrides.d.ts +2 -2
- package/dist/lib/makeDarkOverrides.js +7 -47
- package/dist/lib/makeLightOverrides.d.ts +2 -2
- package/dist/lib/makeLightOverrides.js +519 -39
- package/dist/lib/makePalette.d.ts +2 -1
- package/dist/lib/makePalette.js +40 -40
- package/dist/stories/Alert.stories.d.ts +7 -0
- package/dist/stories/Alert.stories.js +81 -0
- package/dist/stories/Button.stories.js +39 -4
- package/dist/stories/Dialog.stories.js +1 -1
- package/dist/stories/Typography.stories.js +32 -27
- package/package.json +8 -6
- package/dist/lib/overrides/accordionOverrides.d.ts +0 -2
- package/dist/lib/overrides/accordionOverrides.js +0 -63
- package/dist/lib/overrides/autocompleteOverrides.d.ts +0 -2
- package/dist/lib/overrides/autocompleteOverrides.js +0 -31
- package/dist/lib/overrides/avatarOverrides.d.ts +0 -2
- package/dist/lib/overrides/avatarOverrides.js +0 -85
- package/dist/lib/overrides/backdropOverrides.d.ts +0 -2
- package/dist/lib/overrides/backdropOverrides.js +0 -17
- package/dist/lib/overrides/buttonOverrides.d.ts +0 -2
- package/dist/lib/overrides/buttonOverrides.js +0 -86
- package/dist/lib/overrides/checkboxOverrides.d.ts +0 -2
- package/dist/lib/overrides/checkboxOverrides.js +0 -11
- package/dist/lib/overrides/datePickerOverrides.d.ts +0 -2
- package/dist/lib/overrides/datePickerOverrides.js +0 -150
- package/dist/lib/overrides/dialogOverrides.d.ts +0 -5
- package/dist/lib/overrides/dialogOverrides.js +0 -43
- package/dist/lib/overrides/iconButtonOverrides.d.ts +0 -2
- package/dist/lib/overrides/iconButtonOverrides.js +0 -13
- package/dist/lib/overrides/menuItemOverrides.d.ts +0 -2
- package/dist/lib/overrides/menuItemOverrides.js +0 -22
- package/dist/lib/overrides/popoverOverrides.d.ts +0 -2
- package/dist/lib/overrides/popoverOverrides.js +0 -11
- package/dist/lib/overrides/swipeableDrawerOverrides.d.ts +0 -2
- package/dist/lib/overrides/swipeableDrawerOverrides.js +0 -26
- package/dist/lib/overrides/textFieldOverrides.d.ts +0 -5
- package/dist/lib/overrides/textFieldOverrides.js +0 -95
- package/dist/lib/overrides/toggleButtonOverrides.d.ts +0 -3
- package/dist/lib/overrides/toggleButtonOverrides.js +0 -42
|
@@ -1,39 +1,436 @@
|
|
|
1
|
+
import { menuItemClasses } from '@mui/material/MenuItem';
|
|
1
2
|
import { alpha } from '@mui/material/styles';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { backdropOverrides } from './overrides/backdropOverrides';
|
|
6
|
-
import { buttonOverrides } from './overrides/buttonOverrides';
|
|
7
|
-
import { checkboxOverrides } from './overrides/checkboxOverrides';
|
|
8
|
-
import { datePickerOverrides } from './overrides/datePickerOverrides';
|
|
9
|
-
import { dialogOverrides, dialogTitleOverrides, dialogContentOverrides, dialogActionsOverrides } from './overrides/dialogOverrides';
|
|
10
|
-
import { iconButtonOverrides } from './overrides/iconButtonOverrides';
|
|
11
|
-
import { menuItemOverrides } from './overrides/menuItemOverrides';
|
|
12
|
-
import { popoverOverrides } from './overrides/popoverOverrides';
|
|
13
|
-
import { swipeableDrawerOverrides } from './overrides/swipeableDrawerOverrides';
|
|
14
|
-
import { textFieldOverrides, outlinedInputOverrides, inputBaseOverrides, selectOverrides } from './overrides/textFieldOverrides';
|
|
15
|
-
import { toggleButtonGroupOverrides, toggleButtonOverrides } from './overrides/toggleButtonOverrides';
|
|
3
|
+
import paletteJson from './palette.json';
|
|
4
|
+
import { radius } from './radius';
|
|
5
|
+
const paletteData = paletteJson;
|
|
16
6
|
export const makeLightOverrides = (theme) => {
|
|
17
|
-
const datePickerOverridesResult = datePickerOverrides(theme);
|
|
18
|
-
const accordionOverridesResult = accordionOverrides(theme);
|
|
19
7
|
return {
|
|
20
|
-
MuiButton:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
8
|
+
MuiButton: {
|
|
9
|
+
styleOverrides: {
|
|
10
|
+
root: {
|
|
11
|
+
borderRadius: radius.pill,
|
|
12
|
+
boxShadow: 'none',
|
|
13
|
+
'&:hover': {
|
|
14
|
+
boxShadow: 'none'
|
|
15
|
+
},
|
|
16
|
+
'&:active': {
|
|
17
|
+
boxShadow: 'none'
|
|
18
|
+
},
|
|
19
|
+
'&:focus': {
|
|
20
|
+
boxShadow: 'none'
|
|
21
|
+
},
|
|
22
|
+
variants: [
|
|
23
|
+
{
|
|
24
|
+
props: { variant: 'contained', color: 'secondary' },
|
|
25
|
+
style: {
|
|
26
|
+
backgroundColor: theme.palette.secondary.main,
|
|
27
|
+
color: alpha(theme.palette.text.primary, 0.9),
|
|
28
|
+
borderRadius: radius.sm,
|
|
29
|
+
'&:hover': {
|
|
30
|
+
backgroundColor: paletteData.Secondary[700],
|
|
31
|
+
color: alpha(theme.palette.text.primary, 0.9)
|
|
32
|
+
},
|
|
33
|
+
'&.Mui-disabled': {
|
|
34
|
+
backgroundColor: theme.palette.action.disabledBackground
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
props: { size: 'small' },
|
|
40
|
+
style: {
|
|
41
|
+
padding: '6px 16px'
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
props: { size: 'medium' },
|
|
46
|
+
style: {
|
|
47
|
+
padding: '9px 24px'
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
props: { size: 'large' },
|
|
52
|
+
style: {
|
|
53
|
+
padding: '12px 32px'
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
props: { variant: 'contained', size: 'small' },
|
|
58
|
+
style: {
|
|
59
|
+
paddingTop: '7px',
|
|
60
|
+
paddingBottom: '7px'
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
props: { variant: 'contained', size: 'medium' },
|
|
65
|
+
style: {
|
|
66
|
+
paddingTop: '10px',
|
|
67
|
+
paddingBottom: '10px'
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
props: { variant: 'contained', size: 'large' },
|
|
72
|
+
style: {
|
|
73
|
+
paddingTop: '13px',
|
|
74
|
+
paddingBottom: '13px'
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
contained: {
|
|
80
|
+
boxShadow: 'none',
|
|
81
|
+
'&:hover': {
|
|
82
|
+
boxShadow: 'none'
|
|
83
|
+
},
|
|
84
|
+
'&:active': {
|
|
85
|
+
boxShadow: 'none'
|
|
86
|
+
},
|
|
87
|
+
'&:focus': {
|
|
88
|
+
boxShadow: 'none'
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
outlined: {
|
|
92
|
+
backgroundColor: theme.palette.background.paper,
|
|
93
|
+
borderColor: alpha(paletteData.Grey.A900, 0.28),
|
|
94
|
+
color: alpha(theme.palette.text.primary, 0.9),
|
|
95
|
+
'&:hover': {
|
|
96
|
+
backgroundColor: alpha(theme.palette.primary.main, 0.04),
|
|
97
|
+
color: theme.palette.primary.main,
|
|
98
|
+
borderColor: alpha(theme.palette.primary.main, 0.32)
|
|
99
|
+
},
|
|
100
|
+
'&.Mui-disabled': {
|
|
101
|
+
backgroundColor: theme.palette.background.paper,
|
|
102
|
+
color: alpha(theme.palette.grey[900], 0.38),
|
|
103
|
+
borderColor: alpha(paletteData.Grey.A900, 0.28)
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
MuiTextField: {
|
|
109
|
+
defaultProps: {
|
|
110
|
+
size: 'medium'
|
|
111
|
+
},
|
|
112
|
+
styleOverrides: {
|
|
113
|
+
root: {
|
|
114
|
+
'& .MuiOutlinedInput-root': {
|
|
115
|
+
borderRadius: radius.sm,
|
|
116
|
+
'& fieldset': {
|
|
117
|
+
borderRadius: radius.sm
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
MuiOutlinedInput: {
|
|
124
|
+
styleOverrides: {
|
|
125
|
+
root: {
|
|
126
|
+
borderRadius: radius.sm,
|
|
127
|
+
'&.Mui-focused fieldset': {
|
|
128
|
+
borderWidth: '1px'
|
|
129
|
+
},
|
|
130
|
+
'& input::placeholder': {
|
|
131
|
+
color: '#8C9CAF',
|
|
132
|
+
opacity: 1
|
|
133
|
+
},
|
|
134
|
+
'& .MuiSvgIcon-root': {
|
|
135
|
+
fontSize: '18px'
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
input: {
|
|
139
|
+
padding: '11px 16px', // Default medium: 48px height
|
|
140
|
+
height: 'auto',
|
|
141
|
+
lineHeight: '24px',
|
|
142
|
+
variants: [
|
|
143
|
+
{
|
|
144
|
+
props: { size: 'small' },
|
|
145
|
+
style: {
|
|
146
|
+
padding: '8px 16px',
|
|
147
|
+
fontSize: '14px',
|
|
148
|
+
fontWeight: 400,
|
|
149
|
+
lineHeight: '20px',
|
|
150
|
+
minHeight: '26px'
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
variants: [
|
|
157
|
+
{
|
|
158
|
+
props: { size: 'large' },
|
|
159
|
+
style: {
|
|
160
|
+
'& .MuiOutlinedInput-input': {
|
|
161
|
+
padding: '14px 16px' // Large: 54px height
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
MuiInputBase: {
|
|
168
|
+
styleOverrides: {
|
|
169
|
+
root: {
|
|
170
|
+
'&.MuiInputBase-sizeLarge': {
|
|
171
|
+
fontSize: '16px'
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
MuiSelect: {
|
|
177
|
+
styleOverrides: {
|
|
178
|
+
root: {
|
|
179
|
+
'&.MuiOutlinedInput-root': {
|
|
180
|
+
'& .MuiSvgIcon-root': {
|
|
181
|
+
fontSize: '25px'
|
|
182
|
+
},
|
|
183
|
+
'&.MuiInputBase-sizeSmall': {
|
|
184
|
+
'& .MuiSelect-select': {
|
|
185
|
+
padding: '10px 25px 10px 15px',
|
|
186
|
+
fontSize: '14px',
|
|
187
|
+
lineHeight: '20px',
|
|
188
|
+
// Note: :has() selector removed due to jsdom compatibility in tests
|
|
189
|
+
// If SVG is present, padding should be handled via component-level sx prop
|
|
190
|
+
'& svg': {
|
|
191
|
+
marginRight: '8px'
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
MuiAutocomplete: {
|
|
200
|
+
styleOverrides: {
|
|
201
|
+
root: {
|
|
202
|
+
// Using "&&" to increase CSS specificity
|
|
203
|
+
'&&': {
|
|
204
|
+
'& .MuiOutlinedInput-root': {
|
|
205
|
+
paddingLeft: '16px',
|
|
206
|
+
borderRadius: radius.sm,
|
|
207
|
+
'& fieldset.MuiOutlinedInput-notchedOutline': {
|
|
208
|
+
borderRadius: radius.sm
|
|
209
|
+
},
|
|
210
|
+
'&.MuiInputBase-sizeSmall': {
|
|
211
|
+
paddingTop: '8px',
|
|
212
|
+
paddingBottom: '8px',
|
|
213
|
+
paddingLeft: '16px',
|
|
214
|
+
'& .MuiAutocomplete-input': {
|
|
215
|
+
padding: '0px 4px 0px 8px'
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
// Styling for chips in Autocomplete
|
|
222
|
+
tag: {
|
|
223
|
+
margin: '2px'
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
MuiDialog: {
|
|
228
|
+
styleOverrides: {
|
|
229
|
+
paper: {
|
|
230
|
+
borderRadius: radius.md,
|
|
231
|
+
boxShadow: '0 1px 3px 0 rgba(0, 0, 0, 0.30), 0 4px 8px 3px rgba(0, 0, 0, 0.15)',
|
|
232
|
+
maxWidth: '570px'
|
|
233
|
+
},
|
|
234
|
+
paperFullScreen: {
|
|
235
|
+
borderRadius: 0,
|
|
236
|
+
maxWidth: '100%'
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
MuiDialogTitle: {
|
|
241
|
+
styleOverrides: {
|
|
242
|
+
root: {
|
|
243
|
+
padding: '12px 32px',
|
|
244
|
+
fontSize: 17,
|
|
245
|
+
fontWeight: 400,
|
|
246
|
+
lineHeight: 1.273,
|
|
247
|
+
letterSpacing: '0'
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
MuiDialogContent: {
|
|
252
|
+
styleOverrides: {
|
|
253
|
+
root: {
|
|
254
|
+
padding: '24px 32px'
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
MuiDialogActions: {
|
|
259
|
+
styleOverrides: {
|
|
260
|
+
root: {
|
|
261
|
+
padding: '16px 32px'
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
MuiPopover: {
|
|
266
|
+
styleOverrides: {
|
|
267
|
+
paper: {
|
|
268
|
+
borderRadius: radius.md,
|
|
269
|
+
boxShadow: '0 1px 3px 0 rgba(0, 0, 0, 0.30), 0 4px 8px 3px rgba(0, 0, 0, 0.15)'
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
MuiAvatar: {
|
|
274
|
+
styleOverrides: {
|
|
275
|
+
root: {
|
|
276
|
+
fontWeight: 600,
|
|
277
|
+
'&.size-xs': {
|
|
278
|
+
width: 18,
|
|
279
|
+
height: 18,
|
|
280
|
+
fontSize: '9.109px',
|
|
281
|
+
fontWeight: 500,
|
|
282
|
+
lineHeight: '18.219px',
|
|
283
|
+
'& svg': {
|
|
284
|
+
width: '50%',
|
|
285
|
+
height: '50%'
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
'&.size-s': {
|
|
289
|
+
width: 28,
|
|
290
|
+
height: 28,
|
|
291
|
+
fontSize: '12.525px',
|
|
292
|
+
fontWeight: 500,
|
|
293
|
+
lineHeight: '18.219px',
|
|
294
|
+
'& svg': {
|
|
295
|
+
width: '50%',
|
|
296
|
+
height: '50%'
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
'&.size-m': {
|
|
300
|
+
width: 36,
|
|
301
|
+
height: 36,
|
|
302
|
+
fontSize: '18.219px',
|
|
303
|
+
fontWeight: 500,
|
|
304
|
+
lineHeight: '27.328px',
|
|
305
|
+
'& svg': {
|
|
306
|
+
width: '50%',
|
|
307
|
+
height: '50%'
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
'&.size-l': {
|
|
311
|
+
width: 54,
|
|
312
|
+
height: 54,
|
|
313
|
+
fontSize: '27.328px',
|
|
314
|
+
fontWeight: 600,
|
|
315
|
+
lineHeight: '36.438px',
|
|
316
|
+
'& svg': {
|
|
317
|
+
width: '50%',
|
|
318
|
+
height: '50%'
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
'&.size-xl': {
|
|
322
|
+
width: 72,
|
|
323
|
+
height: 72,
|
|
324
|
+
fontSize: '36.438px',
|
|
325
|
+
fontWeight: 600,
|
|
326
|
+
lineHeight: '45.547px',
|
|
327
|
+
'& svg': {
|
|
328
|
+
width: '50%',
|
|
329
|
+
height: '50%'
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
'&.disabled': {
|
|
333
|
+
color: theme.palette.primary.contrastText,
|
|
334
|
+
background: theme.palette.grey[300],
|
|
335
|
+
'& img': {
|
|
336
|
+
filter: 'grayscale(1) brightness(2)',
|
|
337
|
+
opacity: 0.5
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
'&.displayInline': {
|
|
341
|
+
display: 'inline-flex'
|
|
342
|
+
},
|
|
343
|
+
'&.border': {
|
|
344
|
+
border: `2px solid ${theme.palette.background.paper}`
|
|
345
|
+
},
|
|
346
|
+
'&.innerBorder': {
|
|
347
|
+
boxShadow: `inset 0px 0px 0px 1px ${theme.palette.divider}`
|
|
348
|
+
},
|
|
349
|
+
variants: [
|
|
350
|
+
{
|
|
351
|
+
props: { color: 'default' },
|
|
352
|
+
style: {
|
|
353
|
+
backgroundColor: theme.palette.background.paper,
|
|
354
|
+
color: theme.palette.text.secondary
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
]
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
MuiToggleButtonGroup: {
|
|
362
|
+
styleOverrides: {
|
|
363
|
+
root: {
|
|
364
|
+
borderColor: '#AEAEC0',
|
|
365
|
+
'& .MuiToggleButton-root:not(.Mui-selected)': {
|
|
366
|
+
color: '#8C9CAF',
|
|
367
|
+
backgroundColor: alpha('#49454F', 0.08),
|
|
368
|
+
'&:hover': {
|
|
369
|
+
backgroundColor: alpha('#49454F', 0.08)
|
|
370
|
+
},
|
|
371
|
+
'& svg, & .MuiSvgIcon-root': {
|
|
372
|
+
color: '#8C9CAF'
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
MuiToggleButton: {
|
|
379
|
+
styleOverrides: {
|
|
380
|
+
root: {
|
|
381
|
+
color: '#525256',
|
|
382
|
+
'&.Mui-selected': {
|
|
383
|
+
color: '#243B55',
|
|
384
|
+
backgroundColor: 'transparent',
|
|
385
|
+
'&:hover': {
|
|
386
|
+
backgroundColor: 'transparent'
|
|
387
|
+
},
|
|
388
|
+
'& svg, & .MuiSvgIcon-root': {
|
|
389
|
+
color: theme.palette.primary.main
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
variants: [
|
|
393
|
+
{
|
|
394
|
+
props: { size: 'medium' },
|
|
395
|
+
style: {
|
|
396
|
+
padding: '9px 24px'
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
]
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
MuiIconButton: {
|
|
404
|
+
styleOverrides: {
|
|
405
|
+
root: {
|
|
406
|
+
color: alpha(paletteData.Grey[900], 0.48),
|
|
407
|
+
padding: '4px'
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
MuiCheckbox: {
|
|
412
|
+
styleOverrides: {
|
|
413
|
+
root: {
|
|
414
|
+
'&.MuiCheckbox-sizeSmall': {
|
|
415
|
+
padding: '6px'
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
MuiBackdrop: {
|
|
421
|
+
styleOverrides: {
|
|
422
|
+
root: {
|
|
423
|
+
variants: [
|
|
424
|
+
{
|
|
425
|
+
props: { invisible: false },
|
|
426
|
+
style: {
|
|
427
|
+
backgroundColor: alpha(theme.palette.text.primary, theme.palette.action.focusOpacity)
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
]
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
},
|
|
37
434
|
MuiTypography: {
|
|
38
435
|
styleOverrides: {
|
|
39
436
|
root: {
|
|
@@ -44,15 +441,98 @@ export const makeLightOverrides = (theme) => {
|
|
|
44
441
|
}
|
|
45
442
|
}
|
|
46
443
|
},
|
|
47
|
-
|
|
48
|
-
|
|
444
|
+
MuiAccordion: {
|
|
445
|
+
styleOverrides: {
|
|
446
|
+
root: {
|
|
447
|
+
'&::before': {
|
|
448
|
+
display: 'none'
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
MuiAccordionSummary: {
|
|
454
|
+
styleOverrides: {
|
|
455
|
+
root: {
|
|
456
|
+
padding: '0',
|
|
457
|
+
minHeight: '32px',
|
|
458
|
+
'&.Mui-expanded': {
|
|
459
|
+
minHeight: '32px'
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
content: {
|
|
463
|
+
fontSize: '14px',
|
|
464
|
+
fontWeight: 500,
|
|
465
|
+
lineHeight: '20px',
|
|
466
|
+
color: alpha(paletteData.Grey[900], 0.9),
|
|
467
|
+
margin: 0,
|
|
468
|
+
'&.Mui-expanded': {
|
|
469
|
+
margin: 0
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
expandIconWrapper: {
|
|
473
|
+
padding: '4px',
|
|
474
|
+
color: alpha(paletteData.Grey[900], 0.48),
|
|
475
|
+
borderRadius: '50%',
|
|
476
|
+
'&:hover': {
|
|
477
|
+
backgroundColor: alpha(paletteData.Primary.A400, 0.04)
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
},
|
|
49
482
|
MuiCssBaseline: {
|
|
50
483
|
styleOverrides: {
|
|
51
|
-
|
|
52
|
-
|
|
484
|
+
'.MuiAccordion-root .MuiListItem-root': {
|
|
485
|
+
padding: '0',
|
|
486
|
+
borderRadius: '4px',
|
|
487
|
+
'&:hover': {
|
|
488
|
+
backgroundColor: alpha(paletteData.Grey.A900, 0.04)
|
|
489
|
+
}
|
|
490
|
+
},
|
|
491
|
+
'.MuiAccordion-root .MuiListItem-root label': {
|
|
492
|
+
fontSize: '14px',
|
|
493
|
+
fontStyle: 'normal',
|
|
494
|
+
fontWeight: 400,
|
|
495
|
+
color: alpha(paletteData.Grey[900], 0.9)
|
|
496
|
+
}
|
|
53
497
|
}
|
|
54
498
|
},
|
|
55
|
-
MuiMenuItem:
|
|
56
|
-
|
|
499
|
+
MuiMenuItem: {
|
|
500
|
+
styleOverrides: {
|
|
501
|
+
root: {
|
|
502
|
+
borderRadius: radius.md,
|
|
503
|
+
'&&&:hover': {
|
|
504
|
+
backgroundColor: `${alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity)}`
|
|
505
|
+
},
|
|
506
|
+
[`&.${menuItemClasses.selected}`]: {
|
|
507
|
+
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
|
|
508
|
+
'&:hover': {
|
|
509
|
+
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity +
|
|
510
|
+
theme.palette.action.hoverOpacity)
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
MuiSwipeableDrawer: {
|
|
517
|
+
defaultProps: {
|
|
518
|
+
sx: {
|
|
519
|
+
'& .MuiDrawer-paper': {
|
|
520
|
+
borderTopLeftRadius: radius.md,
|
|
521
|
+
borderTopRightRadius: radius.md,
|
|
522
|
+
'&::before': {
|
|
523
|
+
content: '""',
|
|
524
|
+
display: 'block',
|
|
525
|
+
width: '64px',
|
|
526
|
+
height: '4px',
|
|
527
|
+
backgroundColor: theme.palette.action.disabledBackground,
|
|
528
|
+
borderRadius: radius.md,
|
|
529
|
+
margin: '12px auto',
|
|
530
|
+
marginTop: '30px',
|
|
531
|
+
flexShrink: 0
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
57
537
|
};
|
|
58
538
|
};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { PaletteOptions } from '@mui/material/styles';
|
|
2
|
-
|
|
2
|
+
import { PaletteJson } from './types';
|
|
3
|
+
export declare const makePalette: (mode?: "light" | "dark", palette?: PaletteJson) => PaletteOptions;
|
package/dist/lib/makePalette.js
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
1
|
import paletteJson from './palette.json';
|
|
2
2
|
const paletteData = paletteJson;
|
|
3
|
-
export const makePalette = (mode = 'light') => {
|
|
3
|
+
export const makePalette = (mode = 'light', palette = paletteData) => {
|
|
4
4
|
return {
|
|
5
5
|
mode,
|
|
6
6
|
primary: {
|
|
7
|
-
light:
|
|
8
|
-
main:
|
|
9
|
-
dark:
|
|
10
|
-
contrastText:
|
|
7
|
+
light: palette.Primary[300],
|
|
8
|
+
main: palette.Primary[600],
|
|
9
|
+
dark: palette.Primary[800],
|
|
10
|
+
contrastText: palette.Primary.ContrastText
|
|
11
11
|
},
|
|
12
12
|
secondary: {
|
|
13
|
-
light:
|
|
14
|
-
main:
|
|
15
|
-
dark:
|
|
16
|
-
contrastText:
|
|
13
|
+
light: palette.Secondary[300],
|
|
14
|
+
main: palette.Secondary[600],
|
|
15
|
+
dark: palette.Secondary[800],
|
|
16
|
+
contrastText: palette.Secondary.ContrastText
|
|
17
17
|
},
|
|
18
18
|
error: {
|
|
19
|
-
light:
|
|
20
|
-
main:
|
|
21
|
-
dark:
|
|
22
|
-
contrastText:
|
|
19
|
+
light: palette.Error[300],
|
|
20
|
+
main: palette.Error[600],
|
|
21
|
+
dark: palette.Error[800],
|
|
22
|
+
contrastText: palette.Error.ContrastText
|
|
23
23
|
},
|
|
24
24
|
warning: {
|
|
25
|
-
light:
|
|
26
|
-
main:
|
|
27
|
-
dark:
|
|
28
|
-
contrastText:
|
|
25
|
+
light: palette.Warning[300],
|
|
26
|
+
main: palette.Warning[500],
|
|
27
|
+
dark: palette.Warning[700],
|
|
28
|
+
contrastText: palette.Warning.ContrastText
|
|
29
29
|
},
|
|
30
30
|
success: {
|
|
31
|
-
light:
|
|
32
|
-
main:
|
|
33
|
-
dark:
|
|
34
|
-
contrastText:
|
|
31
|
+
light: palette.Success[300],
|
|
32
|
+
main: palette.Success[600],
|
|
33
|
+
dark: palette.Success[800],
|
|
34
|
+
contrastText: palette.Success.ContrastText
|
|
35
35
|
},
|
|
36
36
|
info: {
|
|
37
|
-
light:
|
|
38
|
-
main:
|
|
39
|
-
dark:
|
|
37
|
+
light: palette.Info[300],
|
|
38
|
+
main: palette.Info[600],
|
|
39
|
+
dark: palette.Info[800],
|
|
40
40
|
contrastText: '#fff'
|
|
41
41
|
},
|
|
42
42
|
grey: {
|
|
43
|
-
50:
|
|
44
|
-
100:
|
|
45
|
-
200:
|
|
46
|
-
300:
|
|
47
|
-
400:
|
|
48
|
-
500:
|
|
49
|
-
600:
|
|
50
|
-
700:
|
|
51
|
-
800:
|
|
52
|
-
900:
|
|
53
|
-
A100:
|
|
54
|
-
A200:
|
|
55
|
-
A400:
|
|
56
|
-
A700:
|
|
57
|
-
A900:
|
|
43
|
+
50: palette.Grey[50],
|
|
44
|
+
100: palette.Grey[100],
|
|
45
|
+
200: palette.Grey[200],
|
|
46
|
+
300: palette.Grey[300],
|
|
47
|
+
400: palette.Grey[400],
|
|
48
|
+
500: palette.Grey[500],
|
|
49
|
+
600: palette.Grey[600],
|
|
50
|
+
700: palette.Grey[700],
|
|
51
|
+
800: palette.Grey[800],
|
|
52
|
+
900: palette.Grey[900],
|
|
53
|
+
A100: palette.Grey.A100,
|
|
54
|
+
A200: palette.Grey.A200,
|
|
55
|
+
A400: palette.Grey.A400,
|
|
56
|
+
A700: palette.Grey.A700,
|
|
57
|
+
A900: palette.Grey.A900
|
|
58
58
|
},
|
|
59
59
|
text: {
|
|
60
60
|
primary: '#000000',
|
|
@@ -67,7 +67,7 @@ export const makePalette = (mode = 'light') => {
|
|
|
67
67
|
},
|
|
68
68
|
divider: '#E1E3E6',
|
|
69
69
|
action: {
|
|
70
|
-
active:
|
|
70
|
+
active: palette.Primary['A400'],
|
|
71
71
|
hover: 'rgba(246, 126, 53, 0.04)',
|
|
72
72
|
selected: 'rgba(246, 126, 53, 0.08)',
|
|
73
73
|
disabled: 'rgba(0, 0, 0, 0.32)',
|