@groupeactual/design-tokens 1.7.9 → 2.0.0-beta.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/dist/cjs/index.js +23 -1
- package/dist/es/index.d.ts +244 -63
- package/dist/es/index.js +23 -1
- package/dist/types/helpers/theme.helper.d.ts +5 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/interfaces/theme.interface.d.ts +242 -0
- package/dist/types/styled/Accordion.d.ts +4 -0
- package/dist/types/styled/Alert.d.ts +4 -0
- package/dist/types/styled/Autocomplete.d.ts +4 -0
- package/dist/types/styled/Breadcrumbs.d.ts +4 -0
- package/dist/types/styled/Button.d.ts +4 -0
- package/dist/types/styled/Checkbox.d.ts +4 -0
- package/dist/types/styled/Chip.d.ts +4 -0
- package/dist/types/styled/Divider.d.ts +4 -0
- package/dist/types/styled/FormHelperText.d.ts +4 -0
- package/dist/types/styled/FormLabel.d.ts +4 -0
- package/dist/types/styled/IconButton.d.ts +4 -0
- package/dist/types/styled/InputLabel.d.ts +4 -0
- package/dist/types/styled/MenuItem.d.ts +4 -0
- package/dist/types/styled/OutlinedInput.d.ts +4 -0
- package/dist/types/styled/PaginationItem.d.ts +4 -0
- package/dist/types/styled/Radio.d.ts +4 -0
- package/dist/types/styled/Select.d.ts +4 -0
- package/dist/types/styled/Switch.d.ts +4 -0
- package/dist/types/styled/Table.d.ts +4 -0
- package/dist/types/styled/TextField.d.ts +4 -0
- package/dist/types/styled/Typography.d.ts +4 -0
- package/dist/types/theme/theme.d.ts +4 -0
- package/package.json +22 -14
- package/src/helpers/theme.helper.ts +229 -0
- package/src/index.ts +2 -4
- package/src/interfaces/theme.interface.ts +270 -0
- package/src/styled/Accordion.ts +49 -0
- package/src/styled/Alert.ts +83 -0
- package/src/styled/Autocomplete.ts +24 -0
- package/src/styled/Breadcrumbs.ts +29 -0
- package/src/styled/Button.ts +109 -0
- package/src/styled/Checkbox.ts +81 -0
- package/src/styled/Chip.ts +201 -0
- package/src/styled/Divider.ts +24 -0
- package/src/styled/FormHelperText.ts +28 -0
- package/src/styled/FormLabel.ts +30 -0
- package/src/styled/IconButton.ts +161 -0
- package/src/styled/InputLabel.ts +30 -0
- package/src/styled/MenuItem.ts +73 -0
- package/src/styled/OutlinedInput.ts +89 -0
- package/src/styled/PaginationItem.ts +72 -0
- package/src/styled/Radio.ts +67 -0
- package/src/styled/Select.ts +38 -0
- package/src/styled/Switch.ts +62 -0
- package/src/styled/Table.ts +54 -0
- package/src/styled/TextField.ts +105 -0
- package/src/styled/Typography.ts +67 -0
- package/src/theme/theme.tsx +23 -0
- package/src/tokens/tokens.json +667 -6
- package/dist/types/src/css/accordionCss.d.ts +0 -3
- package/dist/types/src/css/bannerNotificationCss.d.ts +0 -3
- package/dist/types/src/css/breadcrumbsCss.d.ts +0 -3
- package/dist/types/src/css/buttonCss.d.ts +0 -3
- package/dist/types/src/css/chipCss.d.ts +0 -3
- package/dist/types/src/css/datatable/datatableCss.d.ts +0 -3
- package/dist/types/src/css/form/autoCompleteCss.d.ts +0 -3
- package/dist/types/src/css/form/checkboxCss.d.ts +0 -3
- package/dist/types/src/css/form/checkboxGroupCss.d.ts +0 -3
- package/dist/types/src/css/form/datePickerCss.d.ts +0 -3
- package/dist/types/src/css/form/radioCss.d.ts +0 -3
- package/dist/types/src/css/form/selectCss.d.ts +0 -3
- package/dist/types/src/css/form/snackbarCss.d.ts +0 -3
- package/dist/types/src/css/form/textFieldCss.d.ts +0 -3
- package/dist/types/src/css/iconButtonCss.d.ts +0 -3
- package/dist/types/src/css/index.d.ts +0 -20
- package/dist/types/src/css/linkCss.d.ts +0 -3
- package/dist/types/src/css/menuItemCss.d.ts +0 -3
- package/dist/types/src/css/paginationCss.d.ts +0 -3
- package/dist/types/src/css/switchCss.d.ts +0 -3
- package/dist/types/src/css/tooltipCss.d.ts +0 -2
- package/dist/types/src/helpers/theme.d.ts +0 -4
- package/dist/types/src/index.d.ts +0 -4
- package/dist/types/src/interfaces/theme.d.ts +0 -16
- package/dist/types/src/themes/tokens.d.ts +0 -167
- package/dist/types/src/useMaterialThemeTokens.d.ts +0 -6
- package/dist/types/src/useThemeTokens.d.ts +0 -6
- package/src/css/accordionCss.ts +0 -30
- package/src/css/bannerNotificationCss.ts +0 -52
- package/src/css/breadcrumbsCss.ts +0 -19
- package/src/css/buttonCss.ts +0 -80
- package/src/css/chipCss.ts +0 -142
- package/src/css/datatable/datatableCss.ts +0 -32
- package/src/css/form/autoCompleteCss.ts +0 -340
- package/src/css/form/checkboxCss.ts +0 -128
- package/src/css/form/checkboxGroupCss.ts +0 -42
- package/src/css/form/datePickerCss.ts +0 -117
- package/src/css/form/radioCss.ts +0 -102
- package/src/css/form/selectCss.ts +0 -233
- package/src/css/form/snackbarCss.ts +0 -42
- package/src/css/form/textFieldCss.ts +0 -188
- package/src/css/iconButtonCss.ts +0 -64
- package/src/css/index.ts +0 -20
- package/src/css/linkCss.ts +0 -15
- package/src/css/menuItemCss.ts +0 -31
- package/src/css/paginationCss.ts +0 -59
- package/src/css/switchCss.ts +0 -58
- package/src/css/tooltipCss.ts +0 -5
- package/src/helpers/theme.ts +0 -89
- package/src/interfaces/theme.ts +0 -34
- package/src/themes/tokens.ts +0 -169
- package/src/useMaterialThemeTokens.ts +0 -218
- package/src/useThemeTokens.ts +0 -30
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { Components } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
CustomColors,
|
|
5
|
+
Spacing,
|
|
6
|
+
TokenStructure,
|
|
7
|
+
} from '@/interfaces/theme.interface';
|
|
8
|
+
|
|
9
|
+
const Chip = (
|
|
10
|
+
spacing: Spacing,
|
|
11
|
+
tokens: TokenStructure & CustomColors,
|
|
12
|
+
): Components<unknown> => {
|
|
13
|
+
return {
|
|
14
|
+
MuiChip: {
|
|
15
|
+
styleOverrides: {
|
|
16
|
+
root: {
|
|
17
|
+
borderRadius: '4px',
|
|
18
|
+
fontSize: '14px',
|
|
19
|
+
paddingLeft: `${spacing(2)} !important`,
|
|
20
|
+
paddingRight: `${spacing(2)} !important`,
|
|
21
|
+
variants: [
|
|
22
|
+
{
|
|
23
|
+
props: (props) =>
|
|
24
|
+
props.variant === 'filled' && props.color === 'default',
|
|
25
|
+
style: {
|
|
26
|
+
'.MuiChip-iconAction': {
|
|
27
|
+
color: tokens.palette?.primary?.main?.value,
|
|
28
|
+
'&:hover': {
|
|
29
|
+
color: tokens.palette?.primary?.main?.value,
|
|
30
|
+
opacity: 0.8,
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
props: (props) =>
|
|
37
|
+
props.variant === 'filled' && props.color === 'primary',
|
|
38
|
+
style: {
|
|
39
|
+
fontWeight: '500',
|
|
40
|
+
'.MuiChip-iconAction': {
|
|
41
|
+
color: tokens.palette?.background.default?.value,
|
|
42
|
+
'&:hover': {
|
|
43
|
+
opacity: 0.8,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
props: (props) =>
|
|
50
|
+
props.variant === 'outlined' && props.color === 'secondary',
|
|
51
|
+
style: {
|
|
52
|
+
border: '1px solid',
|
|
53
|
+
borderColor: tokens.palette?.border?.default?.value,
|
|
54
|
+
color: tokens.palette?.text.primary?.value,
|
|
55
|
+
'.MuiChip-iconAction': {
|
|
56
|
+
color: tokens.palette?.primary?.main?.value,
|
|
57
|
+
'&:hover': {
|
|
58
|
+
color: tokens.palette?.primary?.main?.value,
|
|
59
|
+
opacity: 0.8,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
props: (props) => props.variant === 'statusFilled',
|
|
66
|
+
style: {
|
|
67
|
+
color: tokens.palette?.text.primary?.value,
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
props: (props) =>
|
|
72
|
+
props.variant === 'statusFilled' && props.color === 'info',
|
|
73
|
+
style: {
|
|
74
|
+
backgroundColor: tokens.palette?.infos['light 2']?.value,
|
|
75
|
+
'.MuiChip-avatar': {
|
|
76
|
+
color: tokens.palette?.infos?.main?.value,
|
|
77
|
+
},
|
|
78
|
+
'.MuiChip-icon': {
|
|
79
|
+
color: tokens.palette?.infos?.main?.value,
|
|
80
|
+
'&:hover': {
|
|
81
|
+
color: tokens.palette?.infos?.main?.value,
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
props: (props) =>
|
|
88
|
+
props.variant === 'statusFilled' && props.color === 'success',
|
|
89
|
+
style: {
|
|
90
|
+
backgroundColor: tokens.palette?.success['light 2']?.value,
|
|
91
|
+
'.MuiChip-avatar': {
|
|
92
|
+
color: tokens.palette?.success?.main?.value,
|
|
93
|
+
},
|
|
94
|
+
'.MuiChip-icon': {
|
|
95
|
+
color: tokens.palette?.infos?.main?.value,
|
|
96
|
+
'&:hover': {
|
|
97
|
+
color: tokens.palette?.infos?.main?.value,
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
props: (props) =>
|
|
104
|
+
props.variant === 'statusFilled' && props.color === 'error',
|
|
105
|
+
style: {
|
|
106
|
+
backgroundColor: tokens.palette?.error['light 2']?.value,
|
|
107
|
+
'.MuiChip-avatar': {
|
|
108
|
+
color: tokens.palette?.error?.main?.value,
|
|
109
|
+
},
|
|
110
|
+
'.MuiChip-icon': {
|
|
111
|
+
color: tokens.palette?.infos?.main?.value,
|
|
112
|
+
'&:hover': {
|
|
113
|
+
color: tokens.palette?.infos?.main?.value,
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
props: (props) =>
|
|
120
|
+
props.variant === 'statusFilled' && props.color === 'warning',
|
|
121
|
+
style: {
|
|
122
|
+
backgroundColor: tokens.palette?.warning['light 2']?.value,
|
|
123
|
+
'.MuiChip-avatar': {
|
|
124
|
+
color: tokens.palette?.warning?.main?.value,
|
|
125
|
+
},
|
|
126
|
+
'.MuiChip-icon': {
|
|
127
|
+
color: tokens.palette?.infos?.main?.value,
|
|
128
|
+
'&:hover': {
|
|
129
|
+
color: tokens.palette?.infos?.main?.value,
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
props: (props) => props.variant === 'status',
|
|
136
|
+
style: {
|
|
137
|
+
backgroundColor: tokens.palette?.background.default?.value,
|
|
138
|
+
border: '1px solid',
|
|
139
|
+
fontWeight: '500',
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
props: (props) =>
|
|
144
|
+
props.variant === 'status' && props.color === 'info',
|
|
145
|
+
style: {
|
|
146
|
+
color: tokens.palette?.infos?.main?.value,
|
|
147
|
+
borderColor: tokens.palette?.infos?.main?.value,
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
props: (props) =>
|
|
152
|
+
props.variant === 'status' && props.color === 'success',
|
|
153
|
+
style: {
|
|
154
|
+
color: tokens.palette?.success?.main?.value,
|
|
155
|
+
borderColor: tokens.palette?.success?.main?.value,
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
props: (props) =>
|
|
160
|
+
props.variant === 'status' && props.color === 'error',
|
|
161
|
+
style: {
|
|
162
|
+
color: tokens.palette?.error?.main?.value,
|
|
163
|
+
borderColor: tokens.palette?.error?.main?.value,
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
props: (props) =>
|
|
168
|
+
props.variant === 'status' && props.color === 'warning',
|
|
169
|
+
style: {
|
|
170
|
+
color: tokens.palette?.warning?.main?.value,
|
|
171
|
+
borderColor: tokens.palette?.warning?.main?.value,
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
],
|
|
175
|
+
'&.Mui-disabled': {
|
|
176
|
+
color: tokens.palette?.text.secondary?.value + ' !important',
|
|
177
|
+
backgroundColor:
|
|
178
|
+
tokens.palette?.background.grey?.value + ' !important',
|
|
179
|
+
border: '1px solid',
|
|
180
|
+
borderColor: tokens.palette?.border.grey?.value + ' !important',
|
|
181
|
+
'.MuiChip-iconAction': {
|
|
182
|
+
color: tokens.palette?.text.disabled?.value + ' !important',
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
deleteIcon: {
|
|
187
|
+
padding: 0,
|
|
188
|
+
margin: `0 0 0 ${spacing(2)}`,
|
|
189
|
+
},
|
|
190
|
+
label: {
|
|
191
|
+
padding: 0,
|
|
192
|
+
},
|
|
193
|
+
avatar: {
|
|
194
|
+
margin: `0 ${spacing(1)} 0 0`,
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
export default Chip;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Components } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
CustomColors,
|
|
5
|
+
Spacing,
|
|
6
|
+
TokenStructure,
|
|
7
|
+
} from '@/interfaces/theme.interface';
|
|
8
|
+
|
|
9
|
+
const Divider = (
|
|
10
|
+
_spacing: Spacing,
|
|
11
|
+
tokens: TokenStructure & CustomColors,
|
|
12
|
+
): Components<unknown> => {
|
|
13
|
+
return {
|
|
14
|
+
MuiDivider: {
|
|
15
|
+
styleOverrides: {
|
|
16
|
+
root: {
|
|
17
|
+
color: tokens?.palette?.border.default?.value,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default Divider;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Components } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
CustomColors,
|
|
5
|
+
Spacing,
|
|
6
|
+
TokenStructure,
|
|
7
|
+
} from '@/interfaces/theme.interface';
|
|
8
|
+
|
|
9
|
+
const FormHelperText = (
|
|
10
|
+
_spacing: Spacing,
|
|
11
|
+
tokens: TokenStructure & CustomColors,
|
|
12
|
+
): Components<unknown> => {
|
|
13
|
+
return {
|
|
14
|
+
MuiFormHelperText: {
|
|
15
|
+
styleOverrides: {
|
|
16
|
+
root: {
|
|
17
|
+
fontWeight: '400',
|
|
18
|
+
fontSize: '11px',
|
|
19
|
+
'&.Mui-success': {
|
|
20
|
+
color: tokens.palette?.success?.main?.value,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default FormHelperText;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Components } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
CustomColors,
|
|
5
|
+
Spacing,
|
|
6
|
+
TokenStructure,
|
|
7
|
+
} from '@/interfaces/theme.interface';
|
|
8
|
+
|
|
9
|
+
const FormLabel = (
|
|
10
|
+
_spacing: Spacing,
|
|
11
|
+
tokens: TokenStructure & CustomColors,
|
|
12
|
+
): Components<unknown> => {
|
|
13
|
+
return {
|
|
14
|
+
MuiFormLabel: {
|
|
15
|
+
styleOverrides: {
|
|
16
|
+
root: {
|
|
17
|
+
color: tokens?.palette?.text.primary?.value,
|
|
18
|
+
fontSize: '13px',
|
|
19
|
+
fontWeight: '500',
|
|
20
|
+
lineHeight: '16px',
|
|
21
|
+
'&.Mui-focused': {
|
|
22
|
+
color: tokens?.palette?.text.primary?.value + ' !important',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default FormLabel;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { Components } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
CustomColors,
|
|
5
|
+
Spacing,
|
|
6
|
+
TokenStructure,
|
|
7
|
+
} from '@/interfaces/theme.interface';
|
|
8
|
+
|
|
9
|
+
const IconButton = (
|
|
10
|
+
spacing: Spacing,
|
|
11
|
+
tokens: TokenStructure & CustomColors,
|
|
12
|
+
): Components<unknown> => {
|
|
13
|
+
return {
|
|
14
|
+
MuiIconButton: {
|
|
15
|
+
styleOverrides: {
|
|
16
|
+
root: {
|
|
17
|
+
borderRadius: '4px',
|
|
18
|
+
'&.Mui-disabled': {
|
|
19
|
+
color: tokens.palette?.text.disabled.value,
|
|
20
|
+
},
|
|
21
|
+
'&.MuiIconButton-colorPrimary': {
|
|
22
|
+
color: tokens.palette?.primary.main?.value,
|
|
23
|
+
'&:hover': {
|
|
24
|
+
color: tokens.palette?.primary.dark?.value,
|
|
25
|
+
'&.IconButtonVariant-outlined': {
|
|
26
|
+
borderColor: tokens.palette?.primary.dark?.value,
|
|
27
|
+
backgroundColor:
|
|
28
|
+
tokens.palette?.background.default + ' !important',
|
|
29
|
+
},
|
|
30
|
+
'&.IconButtonVariant-plain': {
|
|
31
|
+
backgroundColor: tokens.palette?.primary.mainChannel?.value,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
'&:active': {
|
|
35
|
+
borderColor: tokens.palette?.primary.dark?.value + ' !important',
|
|
36
|
+
backgroundColor: tokens.palette?.primary.mainChannel?.value,
|
|
37
|
+
color: tokens.palette?.primary.dark?.value,
|
|
38
|
+
'.MuiTouchRipple-root': {
|
|
39
|
+
opacity: 0,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
'&.MuiIconButton-colorSuccess': {
|
|
44
|
+
'&:hover': {
|
|
45
|
+
color: tokens.palette?.success.dark?.value,
|
|
46
|
+
backgroundColor:
|
|
47
|
+
tokens.palette?.success['light 3']?.value + ' !important',
|
|
48
|
+
'&.IconButtonVariant-outlined': {
|
|
49
|
+
borderColor: tokens.palette?.success.dark?.value,
|
|
50
|
+
'--IconButton-hoverBg':
|
|
51
|
+
tokens.palette?.background.default + ' !important',
|
|
52
|
+
},
|
|
53
|
+
'&.IconButtonVariant-plain': {
|
|
54
|
+
backgroundColor: tokens.palette?.success['light 3']?.value,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
'&:active': {
|
|
58
|
+
backgroundColor:
|
|
59
|
+
tokens.palette?.success['light 3']?.value + ' !important',
|
|
60
|
+
borderColor: tokens.palette?.success.dark?.value + ' !important',
|
|
61
|
+
color: tokens.palette?.success.dark?.value,
|
|
62
|
+
'.MuiTouchRipple-root': {
|
|
63
|
+
opacity: 0,
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
'&.MuiIconButton-colorWarning': {
|
|
68
|
+
'&:hover': {
|
|
69
|
+
color: tokens.palette?.warning.dark?.value,
|
|
70
|
+
backgroundColor:
|
|
71
|
+
tokens.palette?.warning['light 3']?.value + ' !important',
|
|
72
|
+
'&.IconButtonVariant-outlined': {
|
|
73
|
+
borderColor: tokens.palette?.warning.dark?.value,
|
|
74
|
+
'--IconButton-hoverBg':
|
|
75
|
+
tokens.palette?.background.default + ' !important',
|
|
76
|
+
},
|
|
77
|
+
'&.IconButtonVariant-plain': {
|
|
78
|
+
backgroundColor: tokens.palette?.warning.mainChannel?.value,
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
'&:active': {
|
|
82
|
+
borderColor: tokens.palette?.warning.dark?.value + ' !important',
|
|
83
|
+
backgroundColor:
|
|
84
|
+
tokens.palette?.warning['light 3']?.value + ' !important',
|
|
85
|
+
color: tokens.palette?.warning.dark?.value,
|
|
86
|
+
'.MuiTouchRipple-root': {
|
|
87
|
+
opacity: 0,
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
'&.MuiIconButton-colorError': {
|
|
92
|
+
'&:hover': {
|
|
93
|
+
color: tokens.palette?.error.dark?.value,
|
|
94
|
+
backgroundColor: tokens.palette?.error['light 3']?.value,
|
|
95
|
+
'&.IconButtonVariant-outlined': {
|
|
96
|
+
borderColor: tokens.palette?.error.dark?.value,
|
|
97
|
+
'--IconButton-hoverBg':
|
|
98
|
+
tokens.palette?.background.default + ' !important',
|
|
99
|
+
},
|
|
100
|
+
'&.IconButtonVariant-plain': {
|
|
101
|
+
backgroundColor: tokens.palette?.error.mainChannel?.value,
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
'&:active': {
|
|
105
|
+
borderColor: tokens.palette?.error.dark?.value + ' !important',
|
|
106
|
+
backgroundColor: tokens.palette?.error['light 3']?.value,
|
|
107
|
+
color: tokens.palette?.error.dark?.value,
|
|
108
|
+
'.MuiTouchRipple-root': {
|
|
109
|
+
opacity: 0,
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
'&.IconButtonVariant-outlined': {
|
|
114
|
+
width: `${spacing(11)} !important`,
|
|
115
|
+
height: `${spacing(11)} !important`,
|
|
116
|
+
border: '1px solid',
|
|
117
|
+
borderColor: tokens.palette?.border?.default.value,
|
|
118
|
+
'&.Mui-disabled': {
|
|
119
|
+
color: tokens.palette?.text.disabled.value,
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
'&.IconButtonVariant-plain': {
|
|
123
|
+
width: `${spacing(10.5)} !important`,
|
|
124
|
+
height: `${spacing(10.5)} !important`,
|
|
125
|
+
border: '0px',
|
|
126
|
+
'&:active': {
|
|
127
|
+
border: '1px solid',
|
|
128
|
+
},
|
|
129
|
+
'&.Mui-disabled': {
|
|
130
|
+
color: tokens.palette?.text.disabled.value,
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
'&.IconButtonPositionGroup-left': {
|
|
134
|
+
borderRadius: '4px 0px 0px 4px',
|
|
135
|
+
'& .MuiTouchRipple-root .MuiTouchRipple-child': {
|
|
136
|
+
borderRadius: '4px 0px 0px 4px',
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
'&.IconButtonPositionGroup-middle': {
|
|
140
|
+
borderRadius: '0px',
|
|
141
|
+
'& .MuiTouchRipple-root .MuiTouchRipple-child': {
|
|
142
|
+
borderRadius: '0px',
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
'&.IconButtonPositionGroup-right': {
|
|
146
|
+
borderRadius: '0px 4px 4px 0px',
|
|
147
|
+
'& .MuiTouchRipple-root .MuiTouchRipple-child': {
|
|
148
|
+
borderRadius: '0px 4px 4px 0px',
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
'&.IconButtonSize-small': {
|
|
152
|
+
width: `${spacing(6)} !important`,
|
|
153
|
+
height: `${spacing(6)} !important`,
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
export default IconButton;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Components } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
CustomColors,
|
|
5
|
+
Spacing,
|
|
6
|
+
TokenStructure,
|
|
7
|
+
} from '@/interfaces/theme.interface';
|
|
8
|
+
|
|
9
|
+
const InputLabel = (
|
|
10
|
+
spacing: Spacing,
|
|
11
|
+
tokens: TokenStructure & CustomColors,
|
|
12
|
+
): Components<unknown> => {
|
|
13
|
+
return {
|
|
14
|
+
MuiInputLabel: {
|
|
15
|
+
styleOverrides: {
|
|
16
|
+
root: {
|
|
17
|
+
marginBottom: spacing(2),
|
|
18
|
+
'&.Mui-success': {
|
|
19
|
+
color: tokens.palette?.success?.main?.value + ' !important',
|
|
20
|
+
},
|
|
21
|
+
'&.Mui-error': {
|
|
22
|
+
color: tokens.palette?.error?.main?.value + ' !important',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default InputLabel;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Components } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
CustomColors,
|
|
5
|
+
Spacing,
|
|
6
|
+
TokenStructure,
|
|
7
|
+
} from '@/interfaces/theme.interface';
|
|
8
|
+
|
|
9
|
+
const MenuItem = (
|
|
10
|
+
spacing: Spacing,
|
|
11
|
+
tokens: TokenStructure & CustomColors,
|
|
12
|
+
): Components<unknown> => {
|
|
13
|
+
return {
|
|
14
|
+
MuiMenuItem: {
|
|
15
|
+
styleOverrides: {
|
|
16
|
+
root: {
|
|
17
|
+
padding: spacing(3.25, 4),
|
|
18
|
+
'.MuiTypography-root': {
|
|
19
|
+
paddingTop: spacing(0.5),
|
|
20
|
+
color: tokens?.greyXDark?.value,
|
|
21
|
+
},
|
|
22
|
+
'.itemIcon': {
|
|
23
|
+
color: tokens?.textColors.greyDark?.value,
|
|
24
|
+
marginRight: spacing(2),
|
|
25
|
+
},
|
|
26
|
+
'&.Mui-selected': {
|
|
27
|
+
backgroundColor:
|
|
28
|
+
tokens.palette?.background?.grey?.value + ' !important',
|
|
29
|
+
'.MuiTypography-root': {
|
|
30
|
+
fontWeight: 500,
|
|
31
|
+
},
|
|
32
|
+
'.itemIcon': {
|
|
33
|
+
color: tokens?.blueHoverClickable?.value,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
'&:hover': {
|
|
37
|
+
backgroundColor:
|
|
38
|
+
tokens?.palette?.primary?.mainChannel?.value + ' !important',
|
|
39
|
+
'.MuiTypography-root': {
|
|
40
|
+
color: tokens?.blueHoverClickable?.value + ' !important',
|
|
41
|
+
fontWeight: 500 + ' !important',
|
|
42
|
+
},
|
|
43
|
+
'.itemIcon': {
|
|
44
|
+
color: tokens?.blueHoverClickable?.value,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
'&:focus': {
|
|
48
|
+
backgroundColor: tokens.backgroundColors?.white?.value,
|
|
49
|
+
'.MuiTypography-root': {
|
|
50
|
+
color: tokens?.greyXDark?.value,
|
|
51
|
+
fontWeight: 400,
|
|
52
|
+
},
|
|
53
|
+
'.itemIcon': {
|
|
54
|
+
color: tokens?.textColors.greyDark?.value,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
'&.Mui-disabled': {
|
|
58
|
+
backgroundColor: tokens?.backgroundColors.greyXLight?.value,
|
|
59
|
+
'.MuiTypography-root': {
|
|
60
|
+
color: tokens?.textColors.greyDark?.value,
|
|
61
|
+
fontWeight: 500,
|
|
62
|
+
},
|
|
63
|
+
'.itemIcon': {
|
|
64
|
+
color: tokens?.greyMediumInactive?.value,
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export default MenuItem;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Components } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
CustomColors,
|
|
5
|
+
Spacing,
|
|
6
|
+
TokenStructure,
|
|
7
|
+
} from '@/interfaces/theme.interface';
|
|
8
|
+
|
|
9
|
+
const OutlinedInput = (
|
|
10
|
+
spacing: Spacing,
|
|
11
|
+
tokens: TokenStructure & CustomColors,
|
|
12
|
+
): Components<unknown> => {
|
|
13
|
+
return {
|
|
14
|
+
MuiOutlinedInput: {
|
|
15
|
+
styleOverrides: {
|
|
16
|
+
root: {
|
|
17
|
+
height: '44px',
|
|
18
|
+
padding: 0,
|
|
19
|
+
backgroundColor: tokens.palette?.background?.default?.value,
|
|
20
|
+
'&:hover': {
|
|
21
|
+
'.MuiOutlinedInput-notchedOutline': {
|
|
22
|
+
borderColor: tokens.palette?.text?.secondary?.value,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
'&.Mui-focused': {
|
|
26
|
+
'.MuiOutlinedInput-notchedOutline': {
|
|
27
|
+
borderWidth: '1px',
|
|
28
|
+
borderColor: tokens.palette?.primary?.main?.value + ' !important',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
'&.MuiInputBase-multiline': {
|
|
32
|
+
height: 'auto !important',
|
|
33
|
+
minHeight: '44px',
|
|
34
|
+
textarea: {
|
|
35
|
+
padding: spacing(2.75, 2, 2.75, 2),
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
'&.Mui-error': {
|
|
39
|
+
'.MuiOutlinedInput-notchedOutline': {
|
|
40
|
+
borderColor: tokens.palette?.error?.main?.value + ' !important',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
'&.Mui-success': {
|
|
44
|
+
'.MuiOutlinedInput-notchedOutline': {
|
|
45
|
+
borderColor: tokens.palette?.success?.main?.value + ' !important',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
'&.Mui-disabled': {
|
|
49
|
+
backgroundColor: tokens.palette?.background?.grey?.value,
|
|
50
|
+
'.MuiOutlinedInput-notchedOutline': {
|
|
51
|
+
borderColor:
|
|
52
|
+
tokens.palette?.border?.default?.value + ' !important',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
'.Mui-success': {
|
|
56
|
+
color: tokens.palette?.success?.main?.value,
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
input: {
|
|
60
|
+
padding: spacing(3.25, 2, 3.25, 2),
|
|
61
|
+
'&:-webkit-autofill': {
|
|
62
|
+
'-webkit-box-shadow': 'none !important',
|
|
63
|
+
'-webkit-text-fill-color': 'inherit !important',
|
|
64
|
+
},
|
|
65
|
+
'&:-internal-autofill-selected': {
|
|
66
|
+
backgroundColor:
|
|
67
|
+
tokens.palette?.background?.default?.value + ' !important',
|
|
68
|
+
},
|
|
69
|
+
'&:-webkit-autofill:focus': {
|
|
70
|
+
transition:
|
|
71
|
+
'background-color 0s 600000s, color 0s 600000s !important',
|
|
72
|
+
backgroundColor:
|
|
73
|
+
tokens.palette?.background?.default?.value + ' !important',
|
|
74
|
+
},
|
|
75
|
+
'&::placeholder': {
|
|
76
|
+
color: tokens.palette?.text?.secondary?.value,
|
|
77
|
+
opacity: 1 + ' !important',
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
notchedOutline: {
|
|
81
|
+
borderWidth: '1px',
|
|
82
|
+
borderColor: tokens.palette?.border?.default?.value,
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export default OutlinedInput;
|