@linagora/twake-mui 7.1.0 → 9.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 +58 -0
- package/dist/components/Apptitle/index.js +9 -5
- package/dist/components/Avatar/Avatar.stories.js +58 -37
- package/dist/components/Avatar/helpers.d.ts +0 -28
- package/dist/components/Avatar/helpers.js +0 -28
- package/dist/components/Avatar/index.d.ts +4 -6
- package/dist/components/Avatar/index.js +24 -31
- package/dist/components/Button/index.d.ts +12 -0
- package/dist/components/Button/index.js +8 -0
- package/dist/{stories → components/Dialog}/Dialog.stories.d.ts +2 -2
- package/dist/components/Dialog/Dialog.stories.js +81 -0
- package/dist/components/Dialog/index.d.ts +9 -0
- package/dist/components/Dialog/index.js +9 -0
- package/dist/components/Nav/index.d.ts +8 -0
- package/dist/components/Nav/index.js +14 -0
- package/dist/components/NavDesktopDropdown/index.d.ts +8 -0
- package/dist/components/NavDesktopDropdown/index.js +24 -0
- package/dist/components/NavDesktopLimiter/index.d.ts +6 -0
- package/dist/components/NavDesktopLimiter/index.js +31 -0
- package/dist/components/NavDesktopLimiter/locales/en.json +6 -0
- package/dist/components/NavDesktopLimiter/locales/fr.json +6 -0
- package/dist/components/NavDesktopLimiter/locales/ru.json +6 -0
- package/dist/components/NavDesktopLimiter/locales/vi.json +6 -0
- package/dist/components/NavIcon/index.d.ts +7 -0
- package/dist/components/NavIcon/index.js +17 -0
- package/dist/components/NavItem/index.d.ts +8 -0
- package/dist/components/NavItem/index.js +29 -0
- package/dist/components/NavLink/index.d.ts +3 -0
- package/dist/components/NavLink/index.js +36 -0
- package/dist/components/NavText/index.d.ts +7 -0
- package/dist/components/NavText/index.js +14 -0
- package/dist/components/Sidebar/Sidebar.stories.d.ts +7 -0
- package/dist/components/Sidebar/Sidebar.stories.js +57 -0
- package/dist/components/Sidebar/index.d.ts +7 -0
- package/dist/components/Sidebar/index.js +21 -0
- package/dist/components/Switch/Switch.stories.d.ts +7 -0
- package/dist/components/Switch/Switch.stories.js +58 -0
- package/dist/components/Switch/index.d.ts +9 -0
- package/dist/components/Switch/index.js +8 -0
- package/dist/components/Tabs/Tabs.stories.d.ts +7 -0
- package/dist/components/Tabs/Tabs.stories.js +52 -0
- package/dist/components/Tabs/index.d.ts +10 -0
- package/dist/components/Tabs/index.js +5 -0
- package/dist/components/ThemeProvider/index.js +9 -10
- package/dist/components/ThemeProvider/types.d.ts +6 -0
- package/dist/index.d.ts +26 -1
- package/dist/index.js +13 -1
- package/dist/lib/makePalette.d.ts +1 -1
- package/dist/lib/makePalette.js +3 -1
- package/dist/lib/makeShadows.d.ts +1 -1
- package/dist/lib/makeShadows.js +2 -2
- package/dist/lib/makeTheme.d.ts +3 -2
- package/dist/lib/makeTheme.js +15 -16
- package/dist/lib/overrides.d.ts +2 -0
- package/dist/lib/overrides.js +1027 -0
- package/dist/lib/types.d.ts +14 -0
- package/dist/stories/Alert.stories.js +57 -53
- package/dist/stories/Badge.stories.d.ts +7 -0
- package/dist/stories/Badge.stories.js +84 -0
- package/dist/stories/Button.stories.d.ts +3 -3
- package/dist/stories/Button.stories.js +67 -58
- package/dist/stories/{Selection.stories.d.ts → Checkbox.stories.d.ts} +1 -1
- package/dist/stories/Checkbox.stories.js +59 -0
- package/dist/stories/Divider.stories.d.ts +7 -0
- package/dist/stories/Divider.stories.js +56 -0
- package/dist/stories/Radio.stories.d.ts +7 -0
- package/dist/stories/Radio.stories.js +60 -0
- package/dist/stories/Snackbar.stories.d.ts +7 -0
- package/dist/stories/Snackbar.stories.js +60 -0
- package/dist/stories/{Input.stories.d.ts → TextField.stories.d.ts} +1 -1
- package/dist/stories/TextField.stories.js +86 -0
- package/dist/stories/ThemePlayground.stories.js +20 -113
- package/dist/stories/Typography.stories.d.ts +1 -1
- package/dist/stories/Typography.stories.js +48 -34
- package/package.json +5 -2
- package/dist/lib/darkOverrides.d.ts +0 -2
- package/dist/lib/darkOverrides.js +0 -3
- package/dist/lib/lightOverrides.d.ts +0 -2
- package/dist/lib/lightOverrides.js +0 -551
- package/dist/stories/Dialog.stories.js +0 -40
- package/dist/stories/Input.stories.js +0 -41
- package/dist/stories/Selection.stories.js +0 -37
|
@@ -1,551 +0,0 @@
|
|
|
1
|
-
import { menuItemClasses } from '@mui/material/MenuItem';
|
|
2
|
-
import { alpha, darken } from '@mui/material/styles';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { radius } from './radius';
|
|
5
|
-
import AccordionExpandIcon from '../components/AccordionExpandIcon';
|
|
6
|
-
export const lightOverrides = {
|
|
7
|
-
MuiButton: {
|
|
8
|
-
styleOverrides: {
|
|
9
|
-
root: {
|
|
10
|
-
borderRadius: radius.pill,
|
|
11
|
-
boxShadow: 'none',
|
|
12
|
-
'&:hover': {
|
|
13
|
-
boxShadow: 'none'
|
|
14
|
-
},
|
|
15
|
-
'&:active': {
|
|
16
|
-
boxShadow: 'none'
|
|
17
|
-
},
|
|
18
|
-
'&:focus': {
|
|
19
|
-
boxShadow: 'none'
|
|
20
|
-
},
|
|
21
|
-
variants: [
|
|
22
|
-
{
|
|
23
|
-
props: { variant: 'contained', color: 'secondary' },
|
|
24
|
-
style: ({ theme }) => ({
|
|
25
|
-
backgroundColor: theme.palette.secondary.main,
|
|
26
|
-
color: alpha(theme.palette.text.primary, 0.9),
|
|
27
|
-
borderRadius: radius.sm,
|
|
28
|
-
'&:hover': {
|
|
29
|
-
backgroundColor: theme.palette.secondary.dark,
|
|
30
|
-
color: alpha(theme.palette.text.primary, 0.9)
|
|
31
|
-
},
|
|
32
|
-
'&.Mui-disabled': {
|
|
33
|
-
backgroundColor: theme.palette.action.disabledBackground
|
|
34
|
-
}
|
|
35
|
-
})
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
props: { size: 'small' },
|
|
39
|
-
style: {
|
|
40
|
-
padding: '6px 16px'
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
props: { size: 'medium' },
|
|
45
|
-
style: {
|
|
46
|
-
padding: '9px 24px'
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
props: { size: 'large' },
|
|
51
|
-
style: {
|
|
52
|
-
padding: '12px 32px'
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
props: { variant: 'contained', size: 'small' },
|
|
57
|
-
style: {
|
|
58
|
-
paddingTop: '7px',
|
|
59
|
-
paddingBottom: '7px'
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
props: { variant: 'contained', size: 'medium' },
|
|
64
|
-
style: {
|
|
65
|
-
paddingTop: '10px',
|
|
66
|
-
paddingBottom: '10px'
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
props: { variant: 'contained', size: 'large' },
|
|
71
|
-
style: {
|
|
72
|
-
paddingTop: '13px',
|
|
73
|
-
paddingBottom: '13px'
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
]
|
|
77
|
-
},
|
|
78
|
-
contained: {
|
|
79
|
-
boxShadow: 'none',
|
|
80
|
-
'&:hover': {
|
|
81
|
-
boxShadow: 'none'
|
|
82
|
-
},
|
|
83
|
-
'&:active': {
|
|
84
|
-
boxShadow: 'none'
|
|
85
|
-
},
|
|
86
|
-
'&:focus': {
|
|
87
|
-
boxShadow: 'none'
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
outlined: ({ theme }) => ({
|
|
91
|
-
backgroundColor: theme.palette.background.paper,
|
|
92
|
-
borderColor: alpha(theme.palette.grey[900], 0.28),
|
|
93
|
-
color: alpha(theme.palette.text.primary, 0.9),
|
|
94
|
-
'&:hover': {
|
|
95
|
-
backgroundColor: alpha(theme.palette.primary.main, 0.04),
|
|
96
|
-
color: theme.palette.primary.main,
|
|
97
|
-
borderColor: alpha(theme.palette.primary.main, 0.32)
|
|
98
|
-
},
|
|
99
|
-
'&.Mui-disabled': {
|
|
100
|
-
backgroundColor: theme.palette.background.paper,
|
|
101
|
-
color: alpha(theme.palette.grey[900], 0.38),
|
|
102
|
-
borderColor: alpha(theme.palette.grey[900], 0.28)
|
|
103
|
-
}
|
|
104
|
-
})
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
MuiOutlinedInput: {
|
|
108
|
-
styleOverrides: {
|
|
109
|
-
root: ({ theme }) => ({
|
|
110
|
-
borderRadius: radius.sm,
|
|
111
|
-
'&.Mui-focused fieldset': {
|
|
112
|
-
borderWidth: '1px'
|
|
113
|
-
},
|
|
114
|
-
'& input::placeholder': {
|
|
115
|
-
color: theme.palette.secondary.dark,
|
|
116
|
-
opacity: 1
|
|
117
|
-
},
|
|
118
|
-
'& .MuiSvgIcon-root': {
|
|
119
|
-
fontSize: '18px'
|
|
120
|
-
}
|
|
121
|
-
}),
|
|
122
|
-
input: {
|
|
123
|
-
padding: '11px 16px', // Default medium: 48px height
|
|
124
|
-
height: 'auto',
|
|
125
|
-
lineHeight: '24px',
|
|
126
|
-
variants: [
|
|
127
|
-
{
|
|
128
|
-
props: { size: 'small' },
|
|
129
|
-
style: {
|
|
130
|
-
padding: '8px 16px',
|
|
131
|
-
fontSize: '14px',
|
|
132
|
-
fontWeight: 400,
|
|
133
|
-
lineHeight: '20px',
|
|
134
|
-
minHeight: '26px'
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
]
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
MuiSelect: {
|
|
142
|
-
styleOverrides: {
|
|
143
|
-
root: {
|
|
144
|
-
'&.MuiOutlinedInput-root': {
|
|
145
|
-
'& .MuiSvgIcon-root': {
|
|
146
|
-
fontSize: '25px'
|
|
147
|
-
},
|
|
148
|
-
'&.MuiInputBase-sizeSmall': {
|
|
149
|
-
'& .MuiSelect-select': {
|
|
150
|
-
padding: '10px 25px 10px 15px',
|
|
151
|
-
fontSize: '14px',
|
|
152
|
-
lineHeight: '20px',
|
|
153
|
-
// Note: :has() selector removed due to jsdom compatibility in tests
|
|
154
|
-
// If SVG is present, padding should be handled via component-level sx prop
|
|
155
|
-
'& svg': {
|
|
156
|
-
marginRight: '8px'
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
MuiAutocomplete: {
|
|
165
|
-
styleOverrides: {
|
|
166
|
-
root: {
|
|
167
|
-
// Using "&&" to increase CSS specificity
|
|
168
|
-
'&&': {
|
|
169
|
-
'& .MuiOutlinedInput-root': {
|
|
170
|
-
paddingLeft: '16px',
|
|
171
|
-
borderRadius: radius.sm,
|
|
172
|
-
'& fieldset.MuiOutlinedInput-notchedOutline': {
|
|
173
|
-
borderRadius: radius.sm
|
|
174
|
-
},
|
|
175
|
-
'&.MuiInputBase-sizeSmall': {
|
|
176
|
-
paddingTop: '8px',
|
|
177
|
-
paddingBottom: '8px',
|
|
178
|
-
paddingLeft: '16px',
|
|
179
|
-
'& .MuiAutocomplete-input': {
|
|
180
|
-
padding: '0px 4px 0px 8px'
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
},
|
|
186
|
-
// Styling for chips in Autocomplete
|
|
187
|
-
tag: {
|
|
188
|
-
margin: '2px'
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
},
|
|
192
|
-
MuiDialog: {
|
|
193
|
-
styleOverrides: {
|
|
194
|
-
paper: {
|
|
195
|
-
borderRadius: radius.md,
|
|
196
|
-
boxShadow: '0 1px 3px 0 rgba(0, 0, 0, 0.30), 0 4px 8px 3px rgba(0, 0, 0, 0.15)',
|
|
197
|
-
maxWidth: '570px'
|
|
198
|
-
},
|
|
199
|
-
paperFullScreen: {
|
|
200
|
-
borderRadius: 0,
|
|
201
|
-
maxWidth: '100%'
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
|
-
MuiDialogTitle: {
|
|
206
|
-
styleOverrides: {
|
|
207
|
-
root: ({ theme }) => ({
|
|
208
|
-
...theme.typography.h3,
|
|
209
|
-
padding: '12px 32px',
|
|
210
|
-
[theme.breakpoints.down('sm')]: {
|
|
211
|
-
...theme.typography.h4
|
|
212
|
-
}
|
|
213
|
-
})
|
|
214
|
-
}
|
|
215
|
-
},
|
|
216
|
-
MuiDialogContent: {
|
|
217
|
-
styleOverrides: {
|
|
218
|
-
root: {
|
|
219
|
-
padding: '24px 32px'
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
MuiDialogActions: {
|
|
224
|
-
styleOverrides: {
|
|
225
|
-
root: {
|
|
226
|
-
padding: '16px 32px'
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
MuiChip: {
|
|
231
|
-
styleOverrides: {
|
|
232
|
-
root: {
|
|
233
|
-
'&.square': {
|
|
234
|
-
borderRadius: radius.md
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
},
|
|
239
|
-
MuiAvatar: {
|
|
240
|
-
styleOverrides: {
|
|
241
|
-
root: ({ theme }) => ({
|
|
242
|
-
fontWeight: 600,
|
|
243
|
-
'&.size-xs': {
|
|
244
|
-
width: 18,
|
|
245
|
-
height: 18,
|
|
246
|
-
fontSize: '9.109px',
|
|
247
|
-
fontWeight: 500,
|
|
248
|
-
lineHeight: '18.219px',
|
|
249
|
-
'& svg': {
|
|
250
|
-
width: '50%',
|
|
251
|
-
height: '50%'
|
|
252
|
-
}
|
|
253
|
-
},
|
|
254
|
-
'&.size-s': {
|
|
255
|
-
width: 28,
|
|
256
|
-
height: 28,
|
|
257
|
-
fontSize: '12.525px',
|
|
258
|
-
fontWeight: 500,
|
|
259
|
-
lineHeight: '18.219px',
|
|
260
|
-
'& svg': {
|
|
261
|
-
width: '50%',
|
|
262
|
-
height: '50%'
|
|
263
|
-
}
|
|
264
|
-
},
|
|
265
|
-
'&.size-m': {
|
|
266
|
-
width: 36,
|
|
267
|
-
height: 36,
|
|
268
|
-
fontSize: '18.219px',
|
|
269
|
-
fontWeight: 500,
|
|
270
|
-
lineHeight: '27.328px',
|
|
271
|
-
'& svg': {
|
|
272
|
-
width: '50%',
|
|
273
|
-
height: '50%'
|
|
274
|
-
}
|
|
275
|
-
},
|
|
276
|
-
'&.size-l': {
|
|
277
|
-
width: 54,
|
|
278
|
-
height: 54,
|
|
279
|
-
fontSize: '27.328px',
|
|
280
|
-
fontWeight: 600,
|
|
281
|
-
lineHeight: '36.438px',
|
|
282
|
-
'& svg': {
|
|
283
|
-
width: '50%',
|
|
284
|
-
height: '50%'
|
|
285
|
-
}
|
|
286
|
-
},
|
|
287
|
-
'&.size-xl': {
|
|
288
|
-
width: 72,
|
|
289
|
-
height: 72,
|
|
290
|
-
fontSize: '36.438px',
|
|
291
|
-
fontWeight: 600,
|
|
292
|
-
lineHeight: '45.547px',
|
|
293
|
-
'& svg': {
|
|
294
|
-
width: '50%',
|
|
295
|
-
height: '50%'
|
|
296
|
-
}
|
|
297
|
-
},
|
|
298
|
-
'&.disabled': {
|
|
299
|
-
color: theme.palette.primary.contrastText,
|
|
300
|
-
background: theme.palette.grey[300],
|
|
301
|
-
'& img': {
|
|
302
|
-
filter: 'grayscale(1) brightness(2)',
|
|
303
|
-
opacity: 0.5
|
|
304
|
-
}
|
|
305
|
-
},
|
|
306
|
-
'&.displayInline': {
|
|
307
|
-
display: 'inline-flex'
|
|
308
|
-
},
|
|
309
|
-
'&.border': {
|
|
310
|
-
border: `2px solid ${theme.palette.background.paper}`
|
|
311
|
-
},
|
|
312
|
-
'&.innerBorder': {
|
|
313
|
-
boxShadow: `inset 0px 0px 0px 1px ${theme.palette.divider}`
|
|
314
|
-
},
|
|
315
|
-
variants: [
|
|
316
|
-
{
|
|
317
|
-
props: { color: 'default' },
|
|
318
|
-
style: {
|
|
319
|
-
backgroundColor: theme.palette.background.paper,
|
|
320
|
-
color: theme.palette.text.secondary
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
]
|
|
324
|
-
})
|
|
325
|
-
}
|
|
326
|
-
},
|
|
327
|
-
MuiToggleButtonGroup: {
|
|
328
|
-
styleOverrides: {
|
|
329
|
-
root: ({ theme }) => ({
|
|
330
|
-
borderColor: theme.palette.secondary.dark,
|
|
331
|
-
'& .MuiToggleButton-root:not(.Mui-selected)': {
|
|
332
|
-
color: theme.palette.text.secondary,
|
|
333
|
-
backgroundColor: alpha(theme.palette.text.secondary, 0.08),
|
|
334
|
-
'& svg, & .MuiSvgIcon-root': {
|
|
335
|
-
color: theme.palette.text.secondary
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
})
|
|
339
|
-
}
|
|
340
|
-
},
|
|
341
|
-
MuiToggleButton: {
|
|
342
|
-
styleOverrides: {
|
|
343
|
-
root: ({ theme }) => ({
|
|
344
|
-
color: theme.palette.text.primary,
|
|
345
|
-
'&.Mui-selected': {
|
|
346
|
-
color: theme.palette.text.primary,
|
|
347
|
-
backgroundColor: 'transparent',
|
|
348
|
-
'&:hover': {
|
|
349
|
-
backgroundColor: 'transparent'
|
|
350
|
-
},
|
|
351
|
-
'& svg, & .MuiSvgIcon-root': {
|
|
352
|
-
color: theme.palette.primary.main
|
|
353
|
-
}
|
|
354
|
-
},
|
|
355
|
-
variants: [
|
|
356
|
-
{
|
|
357
|
-
props: { size: 'medium' },
|
|
358
|
-
style: {
|
|
359
|
-
padding: '9px 24px'
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
]
|
|
363
|
-
})
|
|
364
|
-
}
|
|
365
|
-
},
|
|
366
|
-
MuiIconButton: {
|
|
367
|
-
defaultProps: { size: 'large' },
|
|
368
|
-
styleOverrides: {
|
|
369
|
-
root: ({ theme }) => ({
|
|
370
|
-
variants: [
|
|
371
|
-
{
|
|
372
|
-
props: { color: 'default' },
|
|
373
|
-
style: {
|
|
374
|
-
color: theme.palette.text.secondary
|
|
375
|
-
}
|
|
376
|
-
},
|
|
377
|
-
{
|
|
378
|
-
props: { size: 'xsmall' },
|
|
379
|
-
style: {
|
|
380
|
-
padding: '5px'
|
|
381
|
-
}
|
|
382
|
-
},
|
|
383
|
-
{
|
|
384
|
-
props: { size: 'small' },
|
|
385
|
-
style: {
|
|
386
|
-
padding: '8px'
|
|
387
|
-
}
|
|
388
|
-
},
|
|
389
|
-
{
|
|
390
|
-
props: { size: 'medium' },
|
|
391
|
-
style: {
|
|
392
|
-
padding: '12px'
|
|
393
|
-
}
|
|
394
|
-
},
|
|
395
|
-
{
|
|
396
|
-
props: { size: 'large' },
|
|
397
|
-
style: {
|
|
398
|
-
padding: '16px'
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
]
|
|
402
|
-
})
|
|
403
|
-
}
|
|
404
|
-
},
|
|
405
|
-
MuiCheckbox: {
|
|
406
|
-
styleOverrides: {
|
|
407
|
-
root: {
|
|
408
|
-
'&.MuiCheckbox-sizeSmall': {
|
|
409
|
-
padding: '6px'
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
},
|
|
414
|
-
MuiAccordion: {
|
|
415
|
-
styleOverrides: {
|
|
416
|
-
root: {
|
|
417
|
-
'&::before': {
|
|
418
|
-
display: 'none'
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
},
|
|
423
|
-
MuiAccordionSummary: {
|
|
424
|
-
defaultProps: { expandIcon: React.createElement(AccordionExpandIcon, null) },
|
|
425
|
-
styleOverrides: {
|
|
426
|
-
root: ({ theme }) => ({
|
|
427
|
-
backgroundColor: theme.palette.grey[100],
|
|
428
|
-
textTransform: 'uppercase',
|
|
429
|
-
fontWeight: 'bold',
|
|
430
|
-
fontSize: '0.875rem',
|
|
431
|
-
minHeight: '3.5rem',
|
|
432
|
-
padding: 0,
|
|
433
|
-
color: theme.palette.text.primary,
|
|
434
|
-
'&.Mui-expanded': {
|
|
435
|
-
minHeight: '3.5rem'
|
|
436
|
-
}
|
|
437
|
-
}),
|
|
438
|
-
expandIconWrapper: {
|
|
439
|
-
order: 0,
|
|
440
|
-
'&&': {
|
|
441
|
-
marginLeft: '0.3125rem'
|
|
442
|
-
},
|
|
443
|
-
transform: 'rotate(-90deg)',
|
|
444
|
-
'&.Mui-expanded': {
|
|
445
|
-
marginLeft: '0.3125rem',
|
|
446
|
-
transform: 'rotate(0deg)'
|
|
447
|
-
}
|
|
448
|
-
},
|
|
449
|
-
content: {
|
|
450
|
-
margin: '0.75rem 0',
|
|
451
|
-
paddingLeft: '0.5rem',
|
|
452
|
-
paddingRight: '0.25rem',
|
|
453
|
-
order: 1,
|
|
454
|
-
'& > :last-child': {
|
|
455
|
-
paddingRight: 0
|
|
456
|
-
},
|
|
457
|
-
'&.Mui-expanded': {
|
|
458
|
-
margin: '0.75rem 0'
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
},
|
|
463
|
-
MuiFab: {
|
|
464
|
-
defaultProps: { size: 'medium' },
|
|
465
|
-
styleOverrides: {
|
|
466
|
-
root: ({ theme }) => ({
|
|
467
|
-
borderRadius: 28,
|
|
468
|
-
width: 96,
|
|
469
|
-
height: 96,
|
|
470
|
-
color: theme.palette.text.primary,
|
|
471
|
-
backgroundColor: theme.palette.background.paper,
|
|
472
|
-
'&:hover': {
|
|
473
|
-
backgroundColor: darken(theme.palette.background.paper, 0.05)
|
|
474
|
-
},
|
|
475
|
-
'@media (hover: none)': {
|
|
476
|
-
backgroundColor: theme.palette.background.paper
|
|
477
|
-
}
|
|
478
|
-
}),
|
|
479
|
-
primary: ({ theme }) => ({
|
|
480
|
-
color: theme.palette.primary.dark,
|
|
481
|
-
backgroundColor: theme.palette.primary.light,
|
|
482
|
-
'&:hover': {
|
|
483
|
-
backgroundColor: darken(theme.palette.primary.light, 0.05)
|
|
484
|
-
},
|
|
485
|
-
'@media (hover: none)': {
|
|
486
|
-
backgroundColor: theme.palette.primary.light
|
|
487
|
-
}
|
|
488
|
-
}),
|
|
489
|
-
extended: {
|
|
490
|
-
borderRadius: 16,
|
|
491
|
-
width: 'auto',
|
|
492
|
-
height: 56,
|
|
493
|
-
minWidth: 56,
|
|
494
|
-
padding: '0 20px',
|
|
495
|
-
'&.MuiFab-sizeSmall': {
|
|
496
|
-
borderRadius: 16,
|
|
497
|
-
width: 'auto',
|
|
498
|
-
height: 42,
|
|
499
|
-
minWidth: 42,
|
|
500
|
-
padding: '0 12px'
|
|
501
|
-
},
|
|
502
|
-
'&.MuiFab-sizeMedium': {
|
|
503
|
-
borderRadius: 16,
|
|
504
|
-
width: 'auto',
|
|
505
|
-
height: 48,
|
|
506
|
-
minWidth: 48,
|
|
507
|
-
padding: '0 16px'
|
|
508
|
-
}
|
|
509
|
-
},
|
|
510
|
-
sizeSmall: {
|
|
511
|
-
borderRadius: 12,
|
|
512
|
-
width: 40,
|
|
513
|
-
height: 40
|
|
514
|
-
},
|
|
515
|
-
sizeMedium: {
|
|
516
|
-
borderRadius: 16,
|
|
517
|
-
width: 56,
|
|
518
|
-
height: 56
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
},
|
|
522
|
-
MuiTooltip: {
|
|
523
|
-
defaultProps: { arrow: true },
|
|
524
|
-
styleOverrides: {
|
|
525
|
-
tooltip: ({ theme }) => ({
|
|
526
|
-
backgroundColor: alpha(theme.palette.grey[800], 0.9),
|
|
527
|
-
fontSize: '1rem',
|
|
528
|
-
lineHeight: 1.3,
|
|
529
|
-
borderRadius: '4px',
|
|
530
|
-
padding: '8px 12px'
|
|
531
|
-
})
|
|
532
|
-
}
|
|
533
|
-
},
|
|
534
|
-
MuiMenuItem: {
|
|
535
|
-
styleOverrides: {
|
|
536
|
-
root: ({ theme }) => ({
|
|
537
|
-
borderRadius: radius.md,
|
|
538
|
-
'&&&:hover': {
|
|
539
|
-
backgroundColor: `${alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity)}`
|
|
540
|
-
},
|
|
541
|
-
[`&.${menuItemClasses.selected}`]: {
|
|
542
|
-
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
|
|
543
|
-
'&:hover': {
|
|
544
|
-
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity +
|
|
545
|
-
theme.palette.action.hoverOpacity)
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
})
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Dialog, DialogTitle, DialogContent, DialogContentText, DialogActions, Button, Stack } from '@mui/material';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
const meta = {
|
|
4
|
-
title: 'Dialog',
|
|
5
|
-
component: Dialog,
|
|
6
|
-
parameters: { layout: 'centered' },
|
|
7
|
-
tags: ['autodocs']
|
|
8
|
-
};
|
|
9
|
-
export default meta;
|
|
10
|
-
// Basic Dialog with open/close state
|
|
11
|
-
const BasicDialogComponent = () => {
|
|
12
|
-
const [open, setOpen] = React.useState(false);
|
|
13
|
-
return (React.createElement(React.Fragment, null,
|
|
14
|
-
React.createElement(Button, { variant: "contained", onClick: () => setOpen(true) }, "Open Dialog"),
|
|
15
|
-
React.createElement(Dialog, { open: open, onClose: () => setOpen(false) },
|
|
16
|
-
React.createElement(DialogTitle, null, "Dialog Title"),
|
|
17
|
-
React.createElement(DialogContent, null,
|
|
18
|
-
React.createElement(DialogContentText, null, "This is a basic dialog with a title, content, and action buttons. You can put any content here.")),
|
|
19
|
-
React.createElement(DialogActions, null,
|
|
20
|
-
React.createElement(Button, { onClick: () => setOpen(false) }, "Cancel"),
|
|
21
|
-
React.createElement(Button, { onClick: () => setOpen(false), variant: "contained" }, "Confirm")))));
|
|
22
|
-
};
|
|
23
|
-
export const Default = {
|
|
24
|
-
render: () => React.createElement(BasicDialogComponent, null)
|
|
25
|
-
};
|
|
26
|
-
// Visual Regression - Dialog styles
|
|
27
|
-
export const Screenshot = {
|
|
28
|
-
tags: ['argos'],
|
|
29
|
-
render: () => (React.createElement(Stack, { spacing: 4 },
|
|
30
|
-
React.createElement("section", null,
|
|
31
|
-
React.createElement("h3", { style: { marginBottom: '12px' } }, "Dialog Components"),
|
|
32
|
-
React.createElement(Stack, { spacing: 2 },
|
|
33
|
-
React.createElement(Dialog, { open: true, disableAutoFocus: true },
|
|
34
|
-
React.createElement(DialogTitle, null, "Standard Dialog"),
|
|
35
|
-
React.createElement(DialogContent, null,
|
|
36
|
-
React.createElement(DialogContentText, null, "This demonstrates the standard dialog appearance with all its subcomponents styled according to the Twake theme.")),
|
|
37
|
-
React.createElement(DialogActions, null,
|
|
38
|
-
React.createElement(Button, null, "Cancel"),
|
|
39
|
-
React.createElement(Button, { variant: "contained" }, "Confirm")))))))
|
|
40
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { TextField, Select, MenuItem, Stack, Box } from '@mui/material';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
const meta = {
|
|
4
|
-
title: 'Input',
|
|
5
|
-
component: TextField,
|
|
6
|
-
parameters: { layout: 'centered' },
|
|
7
|
-
tags: ['autodocs']
|
|
8
|
-
};
|
|
9
|
-
export default meta;
|
|
10
|
-
export const Default = {
|
|
11
|
-
args: {
|
|
12
|
-
label: 'Label',
|
|
13
|
-
variant: 'outlined',
|
|
14
|
-
defaultValue: 'Sample text'
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
// Visual Regression - All inputs combined
|
|
18
|
-
export const Screenshot = {
|
|
19
|
-
tags: ['argos'],
|
|
20
|
-
render: () => (React.createElement(Stack, { spacing: 4 },
|
|
21
|
-
React.createElement("section", null,
|
|
22
|
-
React.createElement("h3", { style: { marginBottom: '12px' } }, "TextField Variants"),
|
|
23
|
-
React.createElement(Stack, { spacing: 2 },
|
|
24
|
-
React.createElement(TextField, { label: "Outlined", variant: "outlined", defaultValue: "Sample text" }),
|
|
25
|
-
React.createElement(TextField, { label: "Filled", variant: "filled", defaultValue: "Sample text" }),
|
|
26
|
-
React.createElement(TextField, { label: "Standard", variant: "standard", defaultValue: "Sample text" }))),
|
|
27
|
-
React.createElement("section", null,
|
|
28
|
-
React.createElement("h3", { style: { marginBottom: '12px' } }, "TextField States"),
|
|
29
|
-
React.createElement(Stack, { spacing: 2 },
|
|
30
|
-
React.createElement(TextField, { label: "Normal", variant: "outlined", defaultValue: "Sample text" }),
|
|
31
|
-
React.createElement(TextField, { label: "Disabled", variant: "outlined", defaultValue: "Cannot edit", disabled: true }),
|
|
32
|
-
React.createElement(TextField, { label: "Error", variant: "outlined", defaultValue: "Invalid value", error: true, helperText: "This field has an error" }),
|
|
33
|
-
React.createElement(TextField, { label: "Required", variant: "outlined", required: true }))),
|
|
34
|
-
React.createElement("section", null,
|
|
35
|
-
React.createElement("h3", { style: { marginBottom: '12px' } }, "Select"),
|
|
36
|
-
React.createElement(Box, { sx: { minWidth: 200 } },
|
|
37
|
-
React.createElement(Select, { value: 10, fullWidth: true },
|
|
38
|
-
React.createElement(MenuItem, { value: 10 }, "Ten"),
|
|
39
|
-
React.createElement(MenuItem, { value: 20 }, "Twenty"),
|
|
40
|
-
React.createElement(MenuItem, { value: 30 }, "Thirty"))))))
|
|
41
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import FormatBoldIcon from '@mui/icons-material/FormatBold';
|
|
2
|
-
import FormatItalicIcon from '@mui/icons-material/FormatItalic';
|
|
3
|
-
import FormatUnderlinedIcon from '@mui/icons-material/FormatUnderlined';
|
|
4
|
-
import { Checkbox, FormControlLabel, ToggleButton, ToggleButtonGroup, Stack, Box } from '@mui/material';
|
|
5
|
-
import React from 'react';
|
|
6
|
-
const meta = {
|
|
7
|
-
title: 'Selection',
|
|
8
|
-
component: Checkbox,
|
|
9
|
-
parameters: { layout: 'centered' },
|
|
10
|
-
tags: ['autodocs']
|
|
11
|
-
};
|
|
12
|
-
export default meta;
|
|
13
|
-
export const Default = {
|
|
14
|
-
render: () => React.createElement(FormControlLabel, { control: React.createElement(Checkbox, null), label: "Checkbox" })
|
|
15
|
-
};
|
|
16
|
-
// Visual Regression - All selection components
|
|
17
|
-
export const Screenshot = {
|
|
18
|
-
tags: ['argos'],
|
|
19
|
-
render: () => (React.createElement(Stack, { spacing: 4 },
|
|
20
|
-
React.createElement("section", null,
|
|
21
|
-
React.createElement("h3", { style: { marginBottom: '12px' } }, "Checkbox States"),
|
|
22
|
-
React.createElement(Stack, { direction: "row", spacing: 4 },
|
|
23
|
-
React.createElement(FormControlLabel, { control: React.createElement(Checkbox, { checked: false }), label: "Unchecked" }),
|
|
24
|
-
React.createElement(FormControlLabel, { control: React.createElement(Checkbox, { checked: true }), label: "Checked" }),
|
|
25
|
-
React.createElement(FormControlLabel, { control: React.createElement(Checkbox, { indeterminate: true }), label: "Indeterminate" }),
|
|
26
|
-
React.createElement(FormControlLabel, { control: React.createElement(Checkbox, { disabled: true }), label: "Disabled" }))),
|
|
27
|
-
React.createElement("section", null,
|
|
28
|
-
React.createElement("h3", { style: { marginBottom: '12px' } }, "Toggle Buttons"),
|
|
29
|
-
React.createElement(Box, null,
|
|
30
|
-
React.createElement(ToggleButtonGroup, { value: ['bold'] },
|
|
31
|
-
React.createElement(ToggleButton, { value: "bold", "aria-label": "bold" },
|
|
32
|
-
React.createElement(FormatBoldIcon, null)),
|
|
33
|
-
React.createElement(ToggleButton, { value: "italic", "aria-label": "italic" },
|
|
34
|
-
React.createElement(FormatItalicIcon, null)),
|
|
35
|
-
React.createElement(ToggleButton, { value: "underlined", "aria-label": "underlined" },
|
|
36
|
-
React.createElement(FormatUnderlinedIcon, null)))))))
|
|
37
|
-
};
|