@iobroker/adapter-react-v5 4.9.11 → 4.10.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/Components/404.d.ts +5 -2
- package/Components/404.js +83 -105
- package/Components/ColorPicker.js.map +1 -1
- package/Components/FileViewer.d.ts +0 -1
- package/Components/FileViewer.js +1 -2
- package/Components/FileViewer.js.map +1 -1
- package/Components/Icon.d.ts +10 -17
- package/Components/Icon.js +104 -161
- package/Components/IconPicker.d.ts +16 -61
- package/Components/IconPicker.js +100 -158
- package/Components/Loader.d.ts +22 -33
- package/Components/Loader.js +276 -102
- package/Components/TabContainer.d.ts +1 -1
- package/Components/TextWithIcon.d.ts +21 -16
- package/Components/TextWithIcon.js +104 -125
- package/Components/UploadImage.d.ts +13 -1
- package/Components/UploadImage.js +499 -292
- package/Dialogs/TextInput.d.ts +2 -86
- package/Dialogs/TextInput.js +37 -130
- package/LegacyConnection.d.ts +3 -3
- package/README.md +6 -3
- package/Theme.d.ts +3 -4
- package/Theme.js +389 -382
- package/i18n.d.ts +38 -55
- package/i18n.js +164 -189
- package/package.json +1 -1
- package/types.d.ts +4 -2
- package/Components/404.js.map +0 -1
- package/Components/Icon.js.map +0 -1
- package/Components/IconPicker.js.map +0 -1
- package/Components/Loader.js.map +0 -1
- package/Components/TextWithIcon.js.map +0 -1
- package/Components/UploadImage.js.map +0 -1
- package/Dialogs/TextInput.js.map +0 -1
- package/Theme.js.map +0 -1
- package/i18n.js.map +0 -1
package/Theme.js
CHANGED
|
@@ -1,406 +1,413 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _styles = require("@mui/material/styles");
|
|
8
|
-
var _colors = require("@mui/material/colors");
|
|
9
|
-
var step = (16 - 5) / 23 / 100;
|
|
10
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const styles_1 = require("@mui/material/styles");
|
|
4
|
+
const colors_1 = require("@mui/material/colors");
|
|
5
|
+
const step = (16 - 5) / 23 / 100;
|
|
11
6
|
/**
|
|
12
7
|
* Convert hex color in the format '#rrggbb' or '#rgb' to an RGB object.
|
|
13
|
-
* @param {string} hex
|
|
14
|
-
* @returns {{r: number, g: number, b: number}}
|
|
15
8
|
*/
|
|
16
9
|
function toInt(hex) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
10
|
+
const rgb = {
|
|
11
|
+
r: 0,
|
|
12
|
+
g: 0,
|
|
13
|
+
b: 0,
|
|
14
|
+
};
|
|
15
|
+
if (hex.length === 7) {
|
|
16
|
+
rgb.r = parseInt(hex.substr(1, 2), 16);
|
|
17
|
+
rgb.g = parseInt(hex.substr(3, 2), 16);
|
|
18
|
+
rgb.b = parseInt(hex.substr(5, 2), 16);
|
|
19
|
+
}
|
|
20
|
+
else if (hex.length === 4) {
|
|
21
|
+
const r = hex.substr(1, 1);
|
|
22
|
+
const g = hex.substr(2, 1);
|
|
23
|
+
const b = hex.substr(3, 1);
|
|
24
|
+
rgb.r = parseInt(r + r, 16);
|
|
25
|
+
rgb.g = parseInt(g + g, 16);
|
|
26
|
+
rgb.b = parseInt(b + b, 16);
|
|
27
|
+
}
|
|
28
|
+
return rgb;
|
|
35
29
|
}
|
|
36
|
-
|
|
37
30
|
/**
|
|
38
31
|
* Convert an RGB object to a hex color string in the format '#rrggbb'.
|
|
39
|
-
* @param {{r: number, g: number, b: number}} int
|
|
40
|
-
* @returns {string}
|
|
41
32
|
*/
|
|
42
|
-
function toHex(
|
|
43
|
-
|
|
33
|
+
function toHex(int) {
|
|
34
|
+
return `#${Math.round(int.r).toString(16)}${Math.round(int.g).toString(16)}${Math.round(int.b).toString(16)}`;
|
|
44
35
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
*/
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
36
|
+
/** Returns the hex color string in the format '#rrggbb' */
|
|
37
|
+
function getElevation(
|
|
38
|
+
/** color in the format '#rrggbb' or '#rgb' */
|
|
39
|
+
color,
|
|
40
|
+
/** overlay color in the format '#rrggbb' or '#rgb' */
|
|
41
|
+
overlayColor,
|
|
42
|
+
/** elevation as an integer starting with 1 */
|
|
43
|
+
elevation) {
|
|
44
|
+
const rgb = toInt(color);
|
|
45
|
+
const overlay = toInt(overlayColor);
|
|
46
|
+
rgb.r += overlay.r * (0.05 + step * (elevation - 1));
|
|
47
|
+
rgb.g += overlay.g * (0.05 + step * (elevation - 1));
|
|
48
|
+
rgb.b += overlay.b * (0.05 + step * (elevation - 1));
|
|
49
|
+
return toHex(rgb);
|
|
59
50
|
}
|
|
60
|
-
|
|
61
51
|
/**
|
|
62
52
|
* Get all 24 elevations of the given color and overlay.
|
|
63
|
-
* @param {string} color color in the format '#rrggbb' or '#rgb'
|
|
64
|
-
* @param {string} overlay overlay color in the format '#rrggbb' or '#rgb'
|
|
65
|
-
* @returns {import('@mui/material/styles/withStyles').CSSProperties}
|
|
66
53
|
*/
|
|
67
|
-
function getElevations(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
var buttonsPalette = function buttonsPalette() {
|
|
78
|
-
return {
|
|
79
|
-
palette: {
|
|
80
|
-
// mode: "dark",
|
|
81
|
-
grey: {
|
|
82
|
-
main: _colors.grey[300],
|
|
83
|
-
dark: _colors.grey[400]
|
|
84
|
-
}
|
|
54
|
+
function getElevations(
|
|
55
|
+
/** color in the format '#rrggbb' or '#rgb' */
|
|
56
|
+
color,
|
|
57
|
+
/** overlay color in the format '#rrggbb' or '#rgb' */
|
|
58
|
+
overlay) {
|
|
59
|
+
const elevations = {};
|
|
60
|
+
for (let i = 1; i <= 24; i++) {
|
|
61
|
+
elevations[`elevation${i}`] = {
|
|
62
|
+
backgroundColor: getElevation(color, overlay, i),
|
|
63
|
+
};
|
|
85
64
|
}
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
|
|
65
|
+
return elevations;
|
|
66
|
+
}
|
|
67
|
+
// const buttonsPalette = () => ({
|
|
68
|
+
// palette: {
|
|
69
|
+
// // mode: "dark",
|
|
70
|
+
// grey: {
|
|
71
|
+
// main: grey[300],
|
|
72
|
+
// dark: grey[400],
|
|
73
|
+
// },
|
|
74
|
+
// },
|
|
75
|
+
// });
|
|
76
|
+
// const buttonsTheme = theme => ({
|
|
77
|
+
// components: {
|
|
78
|
+
// MuiButton: {
|
|
79
|
+
// variants: [
|
|
80
|
+
// {
|
|
81
|
+
// props: { variant: 'contained', color: 'grey' },
|
|
82
|
+
// style: {
|
|
83
|
+
// color: theme.palette.getContrastText(theme.palette.grey[300]),
|
|
84
|
+
// },
|
|
85
|
+
// },
|
|
86
|
+
// {
|
|
87
|
+
// props: { variant: 'outlined', color: 'grey' },
|
|
88
|
+
// style: {
|
|
89
|
+
// color: theme.palette.text.primary,
|
|
90
|
+
// borderColor:
|
|
91
|
+
// theme.palette.mode === 'light'
|
|
92
|
+
// ? 'rgba(0, 0, 0, 0.23)'
|
|
93
|
+
// : 'rgba(255, 255, 255, 0.23)',
|
|
94
|
+
// '&.Mui-disabled': {
|
|
95
|
+
// border: `1px solid ${theme.palette.action.disabledBackground}`,
|
|
96
|
+
// },
|
|
97
|
+
// '&:hover': {
|
|
98
|
+
// borderColor:
|
|
99
|
+
// theme.palette.mode === 'light'
|
|
100
|
+
// ? 'rgba(0, 0, 0, 0.23)'
|
|
101
|
+
// : 'rgba(255, 255, 255, 0.23)',
|
|
102
|
+
// backgroundColor: alpha(
|
|
103
|
+
// theme.palette.text.primary,
|
|
104
|
+
// theme.palette.action.hoverOpacity,
|
|
105
|
+
// ),
|
|
106
|
+
// },
|
|
107
|
+
// },
|
|
108
|
+
// },
|
|
109
|
+
// {
|
|
110
|
+
// props: { color: 'grey', variant: 'text' },
|
|
111
|
+
// style: {
|
|
112
|
+
// color: 'black',
|
|
113
|
+
// '&:hover': {
|
|
114
|
+
// backgroundColor: alpha(
|
|
115
|
+
// theme.palette.text.primary,
|
|
116
|
+
// theme.palette.action.hoverOpacity,
|
|
117
|
+
// ),
|
|
118
|
+
// },
|
|
119
|
+
// },
|
|
120
|
+
// },
|
|
121
|
+
// ],
|
|
122
|
+
// },
|
|
123
|
+
// },
|
|
124
|
+
// });
|
|
133
125
|
/**
|
|
134
126
|
* The theme creation factory function.
|
|
135
|
-
* @param {string} type
|
|
136
|
-
* @returns {import('./types').Theme}
|
|
137
127
|
*/
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
128
|
+
const CustomTheme = (type) => {
|
|
129
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
130
|
+
let options;
|
|
131
|
+
if (type === 'dark') {
|
|
132
|
+
options = {
|
|
133
|
+
name: type,
|
|
134
|
+
palette: {
|
|
135
|
+
mode: 'dark',
|
|
136
|
+
background: {
|
|
137
|
+
paper: '#121212',
|
|
138
|
+
default: '#121212',
|
|
139
|
+
},
|
|
140
|
+
primary: {
|
|
141
|
+
main: '#4dabf5',
|
|
142
|
+
},
|
|
143
|
+
secondary: {
|
|
144
|
+
main: '#436a93',
|
|
145
|
+
},
|
|
146
|
+
// @ts-expect-error Custom field
|
|
147
|
+
expert: '#14bb00',
|
|
148
|
+
text: {
|
|
149
|
+
primary: '#ffffff',
|
|
150
|
+
secondary: '#ffffff',
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
overrides: {
|
|
154
|
+
MuiAppBar: {
|
|
155
|
+
colorDefault: {
|
|
156
|
+
backgroundColor: '#272727',
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
MuiLink: {
|
|
160
|
+
root: {
|
|
161
|
+
textTransform: 'uppercase',
|
|
162
|
+
transition: 'color .3s ease',
|
|
163
|
+
color: colors_1.orange[200],
|
|
164
|
+
'&:hover': {
|
|
165
|
+
color: colors_1.orange[100],
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
MuiPaper: getElevations('#121212', '#fff'),
|
|
170
|
+
},
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
else if (type === 'blue') {
|
|
174
|
+
options = {
|
|
175
|
+
name: type,
|
|
176
|
+
palette: {
|
|
177
|
+
mode: 'dark',
|
|
178
|
+
background: {
|
|
179
|
+
paper: '#151d21',
|
|
180
|
+
default: '#151d21',
|
|
181
|
+
},
|
|
182
|
+
primary: {
|
|
183
|
+
main: '#4dabf5',
|
|
184
|
+
},
|
|
185
|
+
secondary: {
|
|
186
|
+
main: '#436a93',
|
|
187
|
+
},
|
|
188
|
+
// @ts-expect-error Custom field
|
|
189
|
+
expert: '#14bb00',
|
|
190
|
+
text: {
|
|
191
|
+
primary: '#ffffff',
|
|
192
|
+
secondary: '#ffffff',
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
overrides: {
|
|
196
|
+
MuiAppBar: {
|
|
197
|
+
colorDefault: {
|
|
198
|
+
backgroundColor: '#2a3135',
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
MuiLink: {
|
|
202
|
+
root: {
|
|
203
|
+
textTransform: 'uppercase',
|
|
204
|
+
transition: 'color .3s ease',
|
|
205
|
+
color: colors_1.orange[200],
|
|
206
|
+
'&:hover': {
|
|
207
|
+
color: colors_1.orange[100],
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
MuiPaper: getElevations('#151d21', '#fff'),
|
|
212
|
+
},
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
else if (type === 'colored') {
|
|
216
|
+
options = {
|
|
217
|
+
name: type,
|
|
218
|
+
palette: {
|
|
219
|
+
mode: 'light',
|
|
220
|
+
primary: {
|
|
221
|
+
main: '#3399CC',
|
|
222
|
+
},
|
|
223
|
+
secondary: {
|
|
224
|
+
main: '#164477',
|
|
225
|
+
},
|
|
226
|
+
// @ts-expect-error Custom field
|
|
227
|
+
expert: '#96fc96',
|
|
228
|
+
},
|
|
229
|
+
overrides: {
|
|
230
|
+
MuiAppBar: {
|
|
231
|
+
colorDefault: {
|
|
232
|
+
backgroundColor: '#3399CC',
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
MuiLink: {
|
|
236
|
+
root: {
|
|
237
|
+
textTransform: 'uppercase',
|
|
238
|
+
transition: 'color .3s ease',
|
|
239
|
+
color: colors_1.orange[400],
|
|
240
|
+
'&:hover': {
|
|
241
|
+
color: colors_1.orange[300],
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
else if (type === 'PT') {
|
|
249
|
+
options = {
|
|
250
|
+
name: type,
|
|
251
|
+
palette: {
|
|
252
|
+
mode: 'light',
|
|
253
|
+
primary: {
|
|
254
|
+
main: '#0F99DE',
|
|
255
|
+
},
|
|
256
|
+
secondary: {
|
|
257
|
+
main: '#88A536',
|
|
258
|
+
},
|
|
259
|
+
// @ts-expect-error Custom field
|
|
260
|
+
expert: '#BD1B24',
|
|
261
|
+
},
|
|
262
|
+
overrides: {
|
|
263
|
+
MuiAppBar: {
|
|
264
|
+
colorDefault: {
|
|
265
|
+
backgroundColor: '#0F99DE',
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
MuiLink: {
|
|
269
|
+
root: {
|
|
270
|
+
textTransform: 'uppercase',
|
|
271
|
+
transition: 'color .3s ease',
|
|
272
|
+
color: colors_1.orange[400],
|
|
273
|
+
'&:hover': {
|
|
274
|
+
color: colors_1.orange[300],
|
|
275
|
+
},
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
else if (type === 'DX') {
|
|
282
|
+
options = {
|
|
283
|
+
name: type,
|
|
284
|
+
palette: {
|
|
285
|
+
mode: 'light',
|
|
286
|
+
primary: {
|
|
287
|
+
main: '#F5F5F7',
|
|
288
|
+
},
|
|
289
|
+
secondary: {
|
|
290
|
+
main: '#a9a9a9',
|
|
291
|
+
},
|
|
292
|
+
// @ts-expect-error Custom field
|
|
293
|
+
expert: '#BD1B24',
|
|
294
|
+
text: {
|
|
295
|
+
primary: '#007AFE',
|
|
296
|
+
secondary: '#007AFE',
|
|
297
|
+
disabled: '#007AFEAA',
|
|
298
|
+
},
|
|
299
|
+
},
|
|
300
|
+
overrides: {
|
|
301
|
+
MuiAppBar: {
|
|
302
|
+
colorDefault: {
|
|
303
|
+
backgroundColor: '#a9a9a9',
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
MuiLink: {
|
|
307
|
+
root: {
|
|
308
|
+
textTransform: 'uppercase',
|
|
309
|
+
transition: 'color .3s ease',
|
|
310
|
+
color: colors_1.orange[400],
|
|
311
|
+
'&:hover': {
|
|
312
|
+
color: colors_1.orange[300],
|
|
313
|
+
},
|
|
314
|
+
},
|
|
315
|
+
},
|
|
316
|
+
},
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
else {
|
|
320
|
+
options = {
|
|
321
|
+
name: type,
|
|
322
|
+
palette: {
|
|
323
|
+
mode: 'light',
|
|
324
|
+
primary: {
|
|
325
|
+
main: '#3399CC',
|
|
326
|
+
light: undefined,
|
|
327
|
+
dark: undefined,
|
|
328
|
+
contrastText: undefined,
|
|
329
|
+
},
|
|
330
|
+
secondary: {
|
|
331
|
+
main: '#164477',
|
|
332
|
+
},
|
|
333
|
+
// @ts-ignore
|
|
334
|
+
expert: '#14bb00',
|
|
335
|
+
},
|
|
336
|
+
overrides: {
|
|
337
|
+
MuiLink: {
|
|
338
|
+
root: {
|
|
339
|
+
textTransform: 'uppercase',
|
|
340
|
+
transition: 'color .3s ease',
|
|
341
|
+
color: colors_1.orange[400],
|
|
342
|
+
'&:hover': {
|
|
343
|
+
color: colors_1.orange[300],
|
|
344
|
+
},
|
|
345
|
+
},
|
|
346
|
+
},
|
|
347
|
+
},
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
// @ts-expect-error Custom field
|
|
351
|
+
options.toolbar = {
|
|
352
|
+
height: 48,
|
|
317
353
|
};
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
main: '#3399CC'
|
|
354
|
+
// @ts-expect-error Custom field
|
|
355
|
+
options.saveToolbar = {
|
|
356
|
+
background: (_b = (_a = options.palette) === null || _a === void 0 ? void 0 : _a.primary) === null || _b === void 0 ? void 0 : _b.main,
|
|
357
|
+
button: {
|
|
358
|
+
borderRadius: 3,
|
|
359
|
+
height: 32,
|
|
325
360
|
},
|
|
326
|
-
secondary: {
|
|
327
|
-
main: '#164477'
|
|
328
|
-
},
|
|
329
|
-
expert: '#14bb00'
|
|
330
|
-
},
|
|
331
|
-
overrides: {
|
|
332
|
-
MuiLink: {
|
|
333
|
-
root: {
|
|
334
|
-
textTransform: 'uppercase',
|
|
335
|
-
transition: 'color .3s ease',
|
|
336
|
-
color: _colors.orange[400],
|
|
337
|
-
'&:hover': {
|
|
338
|
-
color: _colors.orange[300]
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
361
|
};
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
theme.saveToolbar = {
|
|
351
|
-
background: theme.palette.primary.main,
|
|
352
|
-
button: {
|
|
353
|
-
borderRadius: 3,
|
|
354
|
-
height: 32
|
|
362
|
+
if (options.palette) {
|
|
363
|
+
options.palette.grey = {
|
|
364
|
+
// @ts-expect-error Custom field
|
|
365
|
+
main: colors_1.grey[300],
|
|
366
|
+
dark: colors_1.grey[400],
|
|
367
|
+
};
|
|
355
368
|
}
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
369
|
+
const theme = (0, styles_1.createTheme)(options);
|
|
370
|
+
const palette = theme.palette;
|
|
371
|
+
return (0, styles_1.createTheme)(theme, {
|
|
372
|
+
components: {
|
|
373
|
+
MuiButton: {
|
|
374
|
+
variants: [
|
|
375
|
+
{
|
|
376
|
+
props: { variant: 'contained', color: 'grey' },
|
|
377
|
+
style: {
|
|
378
|
+
color: palette.getContrastText && palette.grey && palette.grey[300] ? palette.getContrastText(palette.grey[300]) : undefined,
|
|
379
|
+
},
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
props: { variant: 'outlined', color: 'grey' },
|
|
383
|
+
style: {
|
|
384
|
+
color: (_c = palette.text) === null || _c === void 0 ? void 0 : _c.primary,
|
|
385
|
+
borderColor: palette.mode === 'light'
|
|
386
|
+
? 'rgba(0, 0, 0, 0.23)'
|
|
387
|
+
: 'rgba(255, 255, 255, 0.23)',
|
|
388
|
+
'&.Mui-disabled': {
|
|
389
|
+
border: `1px solid ${(_d = palette.action) === null || _d === void 0 ? void 0 : _d.disabledBackground}`,
|
|
390
|
+
},
|
|
391
|
+
'&:hover': {
|
|
392
|
+
borderColor: palette.mode === 'light'
|
|
393
|
+
? 'rgba(0, 0, 0, 0.23)'
|
|
394
|
+
: 'rgba(255, 255, 255, 0.23)',
|
|
395
|
+
backgroundColor: (0, styles_1.alpha)(((_e = palette.text) === null || _e === void 0 ? void 0 : _e.primary) || '', ((_f = palette.action) === null || _f === void 0 ? void 0 : _f.hoverOpacity) || 0.04),
|
|
396
|
+
},
|
|
397
|
+
},
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
props: { variant: 'text', color: 'grey' },
|
|
401
|
+
style: {
|
|
402
|
+
color: (_g = palette.text) === null || _g === void 0 ? void 0 : _g.primary,
|
|
403
|
+
'&:hover': {
|
|
404
|
+
backgroundColor: (0, styles_1.alpha)(((_h = palette.text) === null || _h === void 0 ? void 0 : _h.primary) || '', ((_j = palette.action) === null || _j === void 0 ? void 0 : _j.hoverOpacity) || 0.04),
|
|
405
|
+
},
|
|
406
|
+
},
|
|
407
|
+
},
|
|
408
|
+
],
|
|
383
409
|
},
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
backgroundColor: (0, _styles.alpha)(theme.palette.text.primary, theme.palette.action.hoverOpacity)
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
}, {
|
|
390
|
-
props: {
|
|
391
|
-
variant: 'text',
|
|
392
|
-
color: 'grey'
|
|
393
|
-
},
|
|
394
|
-
style: {
|
|
395
|
-
color: theme.palette.text.primary,
|
|
396
|
-
'&:hover': {
|
|
397
|
-
backgroundColor: (0, _styles.alpha)(theme.palette.text.primary, theme.palette.action.hoverOpacity)
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
}]
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
});
|
|
410
|
+
},
|
|
411
|
+
});
|
|
404
412
|
};
|
|
405
|
-
|
|
406
|
-
//# sourceMappingURL=Theme.js.map
|
|
413
|
+
exports.default = CustomTheme;
|