@iobroker/gui-components 10.0.4 → 10.0.6

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.
@@ -0,0 +1,572 @@
1
+ import { alpha } from '@mui/material/styles';
2
+ export const MODERN_DARK = {
3
+ background: '#0A121D',
4
+ paper: '#121A26',
5
+ sidebar: '#141C29',
6
+ elevated: '#1A2434',
7
+ border: '#1E2837',
8
+ cardBorder: '#1B2533',
9
+ textPrimary: '#E8EDF5',
10
+ textSecondary: '#8B97A8',
11
+ textDisabled: '#586576',
12
+ primary: '#137BF8',
13
+ primaryDark: '#0B62D6',
14
+ primaryLight: '#4B9BFA',
15
+ secondary: '#436A93',
16
+ gradient: 'linear-gradient(90deg, #2E93F9 0%, #0B76F5 100%)',
17
+ gradientHover: 'linear-gradient(90deg, #48A1FA 0%, #1B84F8 100%)',
18
+ success: '#2EA043',
19
+ warning: '#E8A33D',
20
+ error: '#E5534B',
21
+ info: '#3FA9F5',
22
+ expert: '#2EA043',
23
+ nonAck: '#E5534B',
24
+ hover: 'rgba(255, 255, 255, 0.05)',
25
+ selected: 'rgba(19, 123, 248, 0.16)',
26
+ };
27
+ export const MODERN_LIGHT = {
28
+ background: '#F4F7FB',
29
+ paper: '#FFFFFF',
30
+ sidebar: '#FFFFFF',
31
+ elevated: '#FFFFFF',
32
+ border: '#E2E8F0',
33
+ cardBorder: '#E2E8F0',
34
+ textPrimary: '#101827',
35
+ textSecondary: '#5B6878',
36
+ textDisabled: '#98A4B3',
37
+ primary: '#137BF8',
38
+ primaryDark: '#0B62D6',
39
+ primaryLight: '#4B9BFA',
40
+ secondary: '#164477',
41
+ gradient: 'linear-gradient(90deg, #2E93F9 0%, #0B76F5 100%)',
42
+ gradientHover: 'linear-gradient(90deg, #48A1FA 0%, #1B84F8 100%)',
43
+ success: '#1E8E3E',
44
+ warning: '#C77700',
45
+ error: '#D93025',
46
+ info: '#0B72D9',
47
+ expert: '#1E8E3E',
48
+ nonAck: '#D93025',
49
+ hover: 'rgba(16, 24, 39, 0.04)',
50
+ selected: 'rgba(19, 123, 248, 0.10)',
51
+ };
52
+ const FONT_FAMILY = '"Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif';
53
+ /**
54
+ * Build the 25 MUI shadows. The default MUI shadows are too heavy for this design,
55
+ * so they are replaced by a soft two-layer shadow.
56
+ */
57
+ function buildShadows(type) {
58
+ const rgb = type === 'dark' ? '0, 0, 0' : '15, 23, 42';
59
+ const nearOpacity = type === 'dark' ? 0.24 : 0.04;
60
+ const farOpacity = type === 'dark' ? 0.36 : 0.08;
61
+ const shadows = ['none'];
62
+ for (let i = 1; i <= 24; i++) {
63
+ const y = Math.round(1 + i * 0.7);
64
+ const blur = Math.round(2 + i * 1.6);
65
+ shadows.push(`0px ${Math.max(1, Math.round(y / 2))}px ${Math.max(2, Math.round(blur / 2))}px rgba(${rgb}, ${nearOpacity}), ` +
66
+ `0px ${y}px ${blur}px rgba(${rgb}, ${farOpacity})`);
67
+ }
68
+ return shadows;
69
+ }
70
+ /**
71
+ * Options and component overrides of the "modern" themes (`modernDark` and `modernLight`).
72
+ */
73
+ export function getModernTheme(name, type) {
74
+ const t = type === 'dark' ? MODERN_DARK : MODERN_LIGHT;
75
+ const options = {
76
+ name,
77
+ shape: { borderRadius: 10 },
78
+ shadows: buildShadows(type),
79
+ typography: {
80
+ fontFamily: FONT_FAMILY,
81
+ h1: { fontWeight: 700, letterSpacing: '-0.02em' },
82
+ h2: { fontWeight: 700, letterSpacing: '-0.02em' },
83
+ h3: { fontWeight: 600, letterSpacing: '-0.02em' },
84
+ h4: { fontWeight: 600, letterSpacing: '-0.01em' },
85
+ h5: { fontWeight: 600 },
86
+ h6: { fontWeight: 600, fontSize: '1.05rem' },
87
+ subtitle1: { fontWeight: 500 },
88
+ subtitle2: { fontWeight: 500 },
89
+ body2: { fontSize: '0.875rem' },
90
+ button: { fontWeight: 500, textTransform: 'none', letterSpacing: 0 },
91
+ caption: { fontSize: '0.75rem' },
92
+ },
93
+ palette: {
94
+ mode: type,
95
+ background: {
96
+ default: t.background,
97
+ paper: t.paper,
98
+ },
99
+ primary: {
100
+ main: t.primary,
101
+ dark: t.primaryDark,
102
+ light: t.primaryLight,
103
+ contrastText: '#FFFFFF',
104
+ },
105
+ secondary: {
106
+ main: t.secondary,
107
+ contrastText: '#FFFFFF',
108
+ },
109
+ success: { main: t.success },
110
+ warning: { main: t.warning },
111
+ error: { main: t.error },
112
+ info: { main: t.info },
113
+ divider: t.border,
114
+ text: {
115
+ primary: t.textPrimary,
116
+ secondary: t.textSecondary,
117
+ disabled: t.textDisabled,
118
+ },
119
+ action: {
120
+ hover: t.hover,
121
+ hoverOpacity: type === 'dark' ? 0.06 : 0.04,
122
+ selected: t.selected,
123
+ selectedOpacity: type === 'dark' ? 0.16 : 0.1,
124
+ },
125
+ expert: t.expert,
126
+ nonAck: t.nonAck,
127
+ },
128
+ toolbar: {
129
+ height: 52,
130
+ },
131
+ saveToolbar: {
132
+ background: t.primary,
133
+ button: {
134
+ borderRadius: 8,
135
+ height: 34,
136
+ },
137
+ },
138
+ };
139
+ const components = {
140
+ MuiCssBaseline: {
141
+ styleOverrides: {
142
+ body: {
143
+ backgroundColor: t.background,
144
+ color: t.textPrimary,
145
+ scrollbarColor: `${t.border} transparent`,
146
+ },
147
+ '*::-webkit-scrollbar': {
148
+ width: 10,
149
+ height: 10,
150
+ },
151
+ '*::-webkit-scrollbar-track': {
152
+ backgroundColor: 'transparent',
153
+ },
154
+ '*::-webkit-scrollbar-thumb': {
155
+ backgroundColor: t.border,
156
+ borderRadius: 8,
157
+ border: `2px solid ${t.background}`,
158
+ },
159
+ '*::-webkit-scrollbar-thumb:hover': {
160
+ backgroundColor: t.textDisabled,
161
+ },
162
+ },
163
+ },
164
+ MuiPaper: {
165
+ defaultProps: {
166
+ elevation: 0,
167
+ },
168
+ styleOverrides: {
169
+ root: {
170
+ // remove the MUI overlay gradient of the dark mode - the colors are defined explicitly
171
+ backgroundImage: 'none',
172
+ backgroundColor: t.paper,
173
+ },
174
+ outlined: {
175
+ border: `1px solid ${t.border}`,
176
+ },
177
+ rounded: {
178
+ borderRadius: 12,
179
+ },
180
+ },
181
+ },
182
+ MuiCard: {
183
+ defaultProps: {
184
+ elevation: 0,
185
+ },
186
+ styleOverrides: {
187
+ root: {
188
+ backgroundColor: t.paper,
189
+ border: `1px solid ${t.cardBorder}`,
190
+ borderRadius: 12,
191
+ backgroundImage: 'none',
192
+ boxShadow: type === 'dark' ? '0 1px 3px rgba(0, 0, 0, 0.4)' : '0 1px 2px rgba(15, 23, 42, 0.05)',
193
+ },
194
+ },
195
+ },
196
+ MuiCardHeader: {
197
+ styleOverrides: {
198
+ root: {
199
+ padding: '16px 20px 8px 20px',
200
+ },
201
+ title: {
202
+ fontSize: '1rem',
203
+ fontWeight: 600,
204
+ },
205
+ subheader: {
206
+ fontSize: '0.8125rem',
207
+ color: t.textSecondary,
208
+ },
209
+ },
210
+ },
211
+ MuiCardContent: {
212
+ styleOverrides: {
213
+ root: {
214
+ padding: 20,
215
+ '&:last-child': { paddingBottom: 20 },
216
+ },
217
+ },
218
+ },
219
+ MuiAppBar: {
220
+ defaultProps: {
221
+ elevation: 0,
222
+ color: 'default',
223
+ },
224
+ styleOverrides: {
225
+ root: {
226
+ backgroundColor: t.paper,
227
+ backgroundImage: 'none',
228
+ color: t.textPrimary,
229
+ borderBottom: `1px solid ${t.border}`,
230
+ },
231
+ colorDefault: {
232
+ backgroundColor: t.paper,
233
+ },
234
+ colorPrimary: {
235
+ backgroundColor: t.paper,
236
+ color: t.textPrimary,
237
+ },
238
+ },
239
+ },
240
+ MuiToolbar: {
241
+ styleOverrides: {
242
+ root: {
243
+ minHeight: 52,
244
+ '@media (min-width: 600px)': { minHeight: 52 },
245
+ },
246
+ },
247
+ },
248
+ MuiDrawer: {
249
+ styleOverrides: {
250
+ paper: {
251
+ backgroundColor: t.sidebar,
252
+ backgroundImage: 'none',
253
+ borderRight: `1px solid ${t.border}`,
254
+ },
255
+ },
256
+ },
257
+ MuiDivider: {
258
+ styleOverrides: {
259
+ root: {
260
+ borderColor: t.border,
261
+ },
262
+ },
263
+ },
264
+ MuiListItemButton: {
265
+ styleOverrides: {
266
+ root: {
267
+ borderRadius: 8,
268
+ paddingTop: 7,
269
+ paddingBottom: 7,
270
+ '&:hover': {
271
+ backgroundColor: t.hover,
272
+ },
273
+ '&.Mui-selected': {
274
+ // the active navigation item is filled with a gradient
275
+ background: t.gradient,
276
+ color: '#FFFFFF',
277
+ boxShadow: `0 2px 8px ${alpha(t.primary, type === 'dark' ? 0.35 : 0.25)}`,
278
+ '& .MuiListItemIcon-root': { color: '#FFFFFF' },
279
+ '&:hover': { background: t.gradientHover },
280
+ },
281
+ },
282
+ },
283
+ },
284
+ MuiListItemIcon: {
285
+ styleOverrides: {
286
+ root: {
287
+ color: t.textSecondary,
288
+ minWidth: 36,
289
+ },
290
+ },
291
+ },
292
+ MuiListItemText: {
293
+ styleOverrides: {
294
+ primary: {
295
+ fontSize: '0.9rem',
296
+ },
297
+ },
298
+ },
299
+ MuiMenu: {
300
+ styleOverrides: {
301
+ paper: {
302
+ backgroundColor: t.elevated,
303
+ backgroundImage: 'none',
304
+ border: `1px solid ${t.border}`,
305
+ borderRadius: 10,
306
+ },
307
+ list: {
308
+ padding: 6,
309
+ },
310
+ },
311
+ },
312
+ MuiMenuItem: {
313
+ styleOverrides: {
314
+ root: {
315
+ borderRadius: 6,
316
+ fontSize: '0.875rem',
317
+ '&.Mui-selected': {
318
+ backgroundColor: t.selected,
319
+ },
320
+ },
321
+ },
322
+ },
323
+ MuiPopover: {
324
+ styleOverrides: {
325
+ paper: {
326
+ backgroundColor: t.elevated,
327
+ backgroundImage: 'none',
328
+ border: `1px solid ${t.border}`,
329
+ borderRadius: 10,
330
+ },
331
+ },
332
+ },
333
+ MuiDialog: {
334
+ styleOverrides: {
335
+ paper: {
336
+ backgroundColor: t.elevated,
337
+ backgroundImage: 'none',
338
+ border: `1px solid ${t.border}`,
339
+ borderRadius: 14,
340
+ },
341
+ },
342
+ },
343
+ MuiDialogTitle: {
344
+ styleOverrides: {
345
+ root: {
346
+ fontSize: '1.05rem',
347
+ fontWeight: 600,
348
+ },
349
+ },
350
+ },
351
+ MuiButton: {
352
+ defaultProps: {
353
+ disableElevation: true,
354
+ },
355
+ styleOverrides: {
356
+ root: {
357
+ borderRadius: 8,
358
+ textTransform: 'none',
359
+ fontWeight: 500,
360
+ boxShadow: 'none',
361
+ '&:hover': { boxShadow: 'none' },
362
+ },
363
+ sizeSmall: {
364
+ borderRadius: 6,
365
+ },
366
+ outlined: {
367
+ borderColor: t.border,
368
+ },
369
+ },
370
+ },
371
+ MuiIconButton: {
372
+ styleOverrides: {
373
+ root: {
374
+ borderRadius: 8,
375
+ color: t.textSecondary,
376
+ '&:hover': { backgroundColor: t.hover, color: t.textPrimary },
377
+ },
378
+ },
379
+ },
380
+ MuiToggleButton: {
381
+ styleOverrides: {
382
+ root: {
383
+ borderRadius: 8,
384
+ borderColor: t.border,
385
+ textTransform: 'none',
386
+ '&.Mui-selected': {
387
+ backgroundColor: t.selected,
388
+ color: t.primaryLight,
389
+ },
390
+ },
391
+ },
392
+ },
393
+ MuiChip: {
394
+ styleOverrides: {
395
+ root: {
396
+ borderRadius: 6,
397
+ fontWeight: 500,
398
+ fontSize: '0.75rem',
399
+ },
400
+ sizeSmall: {
401
+ height: 22,
402
+ },
403
+ outlined: {
404
+ borderColor: t.border,
405
+ },
406
+ },
407
+ },
408
+ MuiTooltip: {
409
+ styleOverrides: {
410
+ tooltip: {
411
+ backgroundColor: type === 'dark' ? '#242C37' : '#1F2937',
412
+ border: type === 'dark' ? `1px solid ${t.border}` : undefined,
413
+ borderRadius: 8,
414
+ fontSize: '0.75rem',
415
+ padding: '6px 10px',
416
+ },
417
+ arrow: {
418
+ color: type === 'dark' ? '#242C37' : '#1F2937',
419
+ },
420
+ },
421
+ },
422
+ MuiOutlinedInput: {
423
+ styleOverrides: {
424
+ root: {
425
+ borderRadius: 8,
426
+ backgroundColor: type === 'dark' ? alpha('#FFFFFF', 0.03) : alpha('#0F172A', 0.02),
427
+ '& .MuiOutlinedInput-notchedOutline': { borderColor: t.border },
428
+ '&:hover .MuiOutlinedInput-notchedOutline': { borderColor: t.textDisabled },
429
+ },
430
+ input: {
431
+ padding: '10px 12px',
432
+ },
433
+ },
434
+ },
435
+ MuiInputBase: {
436
+ styleOverrides: {
437
+ root: {
438
+ fontSize: '0.875rem',
439
+ },
440
+ },
441
+ },
442
+ MuiInputLabel: {
443
+ styleOverrides: {
444
+ root: {
445
+ color: t.textSecondary,
446
+ },
447
+ },
448
+ },
449
+ MuiSelect: {
450
+ styleOverrides: {
451
+ select: {
452
+ fontSize: '0.875rem',
453
+ },
454
+ },
455
+ },
456
+ MuiTabs: {
457
+ styleOverrides: {
458
+ root: {
459
+ minHeight: 42,
460
+ borderBottom: `1px solid ${t.border}`,
461
+ },
462
+ indicator: {
463
+ height: 2,
464
+ borderRadius: 2,
465
+ },
466
+ },
467
+ },
468
+ MuiTab: {
469
+ styleOverrides: {
470
+ root: {
471
+ minHeight: 42,
472
+ textTransform: 'none',
473
+ fontWeight: 500,
474
+ fontSize: '0.8125rem',
475
+ letterSpacing: '0.02em',
476
+ color: t.textSecondary,
477
+ '&.Mui-selected': { color: t.primaryLight },
478
+ },
479
+ },
480
+ },
481
+ MuiTable: {
482
+ styleOverrides: {
483
+ root: {
484
+ borderCollapse: 'separate',
485
+ },
486
+ },
487
+ },
488
+ MuiTableCell: {
489
+ styleOverrides: {
490
+ root: {
491
+ borderBottom: `1px solid ${t.border}`,
492
+ fontSize: '0.8125rem',
493
+ padding: '10px 14px',
494
+ },
495
+ head: {
496
+ color: t.textSecondary,
497
+ fontWeight: 600,
498
+ fontSize: '0.75rem',
499
+ backgroundColor: t.paper,
500
+ },
501
+ },
502
+ },
503
+ MuiTableRow: {
504
+ styleOverrides: {
505
+ root: {
506
+ '&:hover': { backgroundColor: t.hover },
507
+ '&.Mui-selected': {
508
+ backgroundColor: t.selected,
509
+ '&:hover': { backgroundColor: t.selected },
510
+ },
511
+ },
512
+ },
513
+ },
514
+ MuiLinearProgress: {
515
+ styleOverrides: {
516
+ root: {
517
+ height: 6,
518
+ borderRadius: 4,
519
+ backgroundColor: type === 'dark' ? alpha('#FFFFFF', 0.08) : alpha('#0F172A', 0.08),
520
+ },
521
+ bar: {
522
+ borderRadius: 4,
523
+ },
524
+ },
525
+ },
526
+ MuiSwitch: {
527
+ styleOverrides: {
528
+ track: {
529
+ borderRadius: 12,
530
+ },
531
+ },
532
+ },
533
+ MuiCheckbox: {
534
+ styleOverrides: {
535
+ root: {
536
+ color: t.textDisabled,
537
+ },
538
+ },
539
+ },
540
+ MuiAlert: {
541
+ styleOverrides: {
542
+ root: {
543
+ borderRadius: 10,
544
+ border: `1px solid ${t.border}`,
545
+ },
546
+ },
547
+ },
548
+ MuiAccordion: {
549
+ styleOverrides: {
550
+ root: {
551
+ backgroundColor: t.paper,
552
+ backgroundImage: 'none',
553
+ border: `1px solid ${t.border}`,
554
+ borderRadius: 10,
555
+ '&::before': { display: 'none' },
556
+ },
557
+ },
558
+ },
559
+ MuiLink: {
560
+ styleOverrides: {
561
+ root: {
562
+ color: t.primaryLight,
563
+ textDecorationColor: alpha(t.primaryLight, 0.4),
564
+ transition: 'color .2s ease',
565
+ '&:hover': { color: t.primary },
566
+ },
567
+ },
568
+ },
569
+ };
570
+ return { options, components };
571
+ }
572
+ //# sourceMappingURL=ThemeModern.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeModern.js","sourceRoot":"./src/","sources":["ThemeModern.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAgB,MAAM,sBAAsB,CAAC;AAgD3D,MAAM,CAAC,MAAM,WAAW,GAAiB;IACrC,UAAU,EAAE,SAAS;IACrB,KAAK,EAAE,SAAS;IAChB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,SAAS;IACnB,MAAM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J;KACJ,CAAC;IAEF,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AACnC,CAAC","sourcesContent":["import { alpha, type Shadows } from '@mui/material/styles';\n\nimport type { ThemeName, ThemeType } from './types';\nimport type { ThemeOptions } from './Theme';\n\n/**\n * Flat design tokens of the \"modern\" themes.\n * Everything that is used more than once in the theme definition below is listed here,\n * so a new variation can be created by copying this object only.\n */\nexport interface ModernTokens {\n /** Background of the page (behind the cards) */\n background: string;\n /** Background of cards, tables and dialogs */\n paper: string;\n /** Background of the left navigation */\n sidebar: string;\n /** Background of menus, popovers and dialogs (one step above `paper`) */\n elevated: string;\n /** Color of the dividers inside of the cards (table rows, lists) */\n border: string;\n /** Border of the cards. In the dark theme the cards are separated by the background, not by a border */\n cardBorder: string;\n textPrimary: string;\n textSecondary: string;\n textDisabled: string;\n primary: string;\n primaryDark: string;\n primaryLight: string;\n secondary: string;\n /** Background of the selected navigation item */\n gradient: string;\n /** Background of the selected navigation item if hovered */\n gradientHover: string;\n success: string;\n warning: string;\n error: string;\n info: string;\n /** Color of the expert-mode elements */\n expert: string;\n /** Color of the not acknowledged values in the object browser */\n nonAck: string;\n /** Background of the hovered rows and list items */\n hover: string;\n /** Background of the selected rows and list items */\n selected: string;\n}\n\nexport const MODERN_DARK: ModernTokens = {\n background: '#0A121D',\n paper: '#121A26',\n sidebar: '#141C29',\n elevated: '#1A2434',\n border: '#1E2837',\n cardBorder: '#1B2533',\n textPrimary: '#E8EDF5',\n textSecondary: '#8B97A8',\n textDisabled: '#586576',\n primary: '#137BF8',\n primaryDark: '#0B62D6',\n primaryLight: '#4B9BFA',\n secondary: '#436A93',\n gradient: 'linear-gradient(90deg, #2E93F9 0%, #0B76F5 100%)',\n gradientHover: 'linear-gradient(90deg, #48A1FA 0%, #1B84F8 100%)',\n success: '#2EA043',\n warning: '#E8A33D',\n error: '#E5534B',\n info: '#3FA9F5',\n expert: '#2EA043',\n nonAck: '#E5534B',\n hover: 'rgba(255, 255, 255, 0.05)',\n selected: 'rgba(19, 123, 248, 0.16)',\n};\n\nexport const MODERN_LIGHT: ModernTokens = {\n background: '#F4F7FB',\n paper: '#FFFFFF',\n sidebar: '#FFFFFF',\n elevated: '#FFFFFF',\n border: '#E2E8F0',\n cardBorder: '#E2E8F0',\n textPrimary: '#101827',\n textSecondary: '#5B6878',\n textDisabled: '#98A4B3',\n primary: '#137BF8',\n primaryDark: '#0B62D6',\n primaryLight: '#4B9BFA',\n secondary: '#164477',\n gradient: 'linear-gradient(90deg, #2E93F9 0%, #0B76F5 100%)',\n gradientHover: 'linear-gradient(90deg, #48A1FA 0%, #1B84F8 100%)',\n success: '#1E8E3E',\n warning: '#C77700',\n error: '#D93025',\n info: '#0B72D9',\n expert: '#1E8E3E',\n nonAck: '#D93025',\n hover: 'rgba(16, 24, 39, 0.04)',\n selected: 'rgba(19, 123, 248, 0.10)',\n};\n\nconst FONT_FAMILY = '\"Inter\", \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif';\n\n/**\n * Build the 25 MUI shadows. The default MUI shadows are too heavy for this design,\n * so they are replaced by a soft two-layer shadow.\n */\nfunction buildShadows(type: ThemeType): Shadows {\n const rgb = type === 'dark' ? '0, 0, 0' : '15, 23, 42';\n const nearOpacity = type === 'dark' ? 0.24 : 0.04;\n const farOpacity = type === 'dark' ? 0.36 : 0.08;\n\n const shadows: string[] = ['none'];\n for (let i = 1; i <= 24; i++) {\n const y = Math.round(1 + i * 0.7);\n const blur = Math.round(2 + i * 1.6);\n shadows.push(\n `0px ${Math.max(1, Math.round(y / 2))}px ${Math.max(2, Math.round(blur / 2))}px rgba(${rgb}, ${nearOpacity}), ` +\n `0px ${y}px ${blur}px rgba(${rgb}, ${farOpacity})`,\n );\n }\n\n return shadows as unknown as Shadows;\n}\n\n/**\n * Options and component overrides of the \"modern\" themes (`modernDark` and `modernLight`).\n */\nexport function getModernTheme(\n name: ThemeName,\n type: ThemeType,\n): { options: ThemeOptions; components: Record<string, any> } {\n const t: ModernTokens = type === 'dark' ? MODERN_DARK : MODERN_LIGHT;\n\n const options: ThemeOptions = {\n name,\n shape: { borderRadius: 10 },\n shadows: buildShadows(type),\n typography: {\n fontFamily: FONT_FAMILY,\n h1: { fontWeight: 700, letterSpacing: '-0.02em' },\n h2: { fontWeight: 700, letterSpacing: '-0.02em' },\n h3: { fontWeight: 600, letterSpacing: '-0.02em' },\n h4: { fontWeight: 600, letterSpacing: '-0.01em' },\n h5: { fontWeight: 600 },\n h6: { fontWeight: 600, fontSize: '1.05rem' },\n subtitle1: { fontWeight: 500 },\n subtitle2: { fontWeight: 500 },\n body2: { fontSize: '0.875rem' },\n button: { fontWeight: 500, textTransform: 'none', letterSpacing: 0 },\n caption: { fontSize: '0.75rem' },\n },\n palette: {\n mode: type,\n background: {\n default: t.background,\n paper: t.paper,\n },\n primary: {\n main: t.primary,\n dark: t.primaryDark,\n light: t.primaryLight,\n contrastText: '#FFFFFF',\n },\n secondary: {\n main: t.secondary,\n contrastText: '#FFFFFF',\n },\n success: { main: t.success },\n warning: { main: t.warning },\n error: { main: t.error },\n info: { main: t.info },\n divider: t.border,\n text: {\n primary: t.textPrimary,\n secondary: t.textSecondary,\n disabled: t.textDisabled,\n },\n action: {\n hover: t.hover,\n hoverOpacity: type === 'dark' ? 0.06 : 0.04,\n selected: t.selected,\n selectedOpacity: type === 'dark' ? 0.16 : 0.1,\n },\n expert: t.expert,\n nonAck: t.nonAck,\n },\n toolbar: {\n height: 52,\n },\n saveToolbar: {\n background: t.primary,\n button: {\n borderRadius: 8,\n height: 34,\n },\n },\n };\n\n const components: Record<string, any> = {\n MuiCssBaseline: {\n styleOverrides: {\n body: {\n backgroundColor: t.background,\n color: t.textPrimary,\n scrollbarColor: `${t.border} transparent`,\n },\n '*::-webkit-scrollbar': {\n width: 10,\n height: 10,\n },\n '*::-webkit-scrollbar-track': {\n backgroundColor: 'transparent',\n },\n '*::-webkit-scrollbar-thumb': {\n backgroundColor: t.border,\n borderRadius: 8,\n border: `2px solid ${t.background}`,\n },\n '*::-webkit-scrollbar-thumb:hover': {\n backgroundColor: t.textDisabled,\n },\n },\n },\n MuiPaper: {\n defaultProps: {\n elevation: 0,\n },\n styleOverrides: {\n root: {\n // remove the MUI overlay gradient of the dark mode - the colors are defined explicitly\n backgroundImage: 'none',\n backgroundColor: t.paper,\n },\n outlined: {\n border: `1px solid ${t.border}`,\n },\n rounded: {\n borderRadius: 12,\n },\n },\n },\n MuiCard: {\n defaultProps: {\n elevation: 0,\n },\n styleOverrides: {\n root: {\n backgroundColor: t.paper,\n border: `1px solid ${t.cardBorder}`,\n borderRadius: 12,\n backgroundImage: 'none',\n boxShadow: type === 'dark' ? '0 1px 3px rgba(0, 0, 0, 0.4)' : '0 1px 2px rgba(15, 23, 42, 0.05)',\n },\n },\n },\n MuiCardHeader: {\n styleOverrides: {\n root: {\n padding: '16px 20px 8px 20px',\n },\n title: {\n fontSize: '1rem',\n fontWeight: 600,\n },\n subheader: {\n fontSize: '0.8125rem',\n color: t.textSecondary,\n },\n },\n },\n MuiCardContent: {\n styleOverrides: {\n root: {\n padding: 20,\n '&:last-child': { paddingBottom: 20 },\n },\n },\n },\n MuiAppBar: {\n defaultProps: {\n elevation: 0,\n color: 'default',\n },\n styleOverrides: {\n root: {\n backgroundColor: t.paper,\n backgroundImage: 'none',\n color: t.textPrimary,\n borderBottom: `1px solid ${t.border}`,\n },\n colorDefault: {\n backgroundColor: t.paper,\n },\n colorPrimary: {\n backgroundColor: t.paper,\n color: t.textPrimary,\n },\n },\n },\n MuiToolbar: {\n styleOverrides: {\n root: {\n minHeight: 52,\n '@media (min-width: 600px)': { minHeight: 52 },\n },\n },\n },\n MuiDrawer: {\n styleOverrides: {\n paper: {\n backgroundColor: t.sidebar,\n backgroundImage: 'none',\n borderRight: `1px solid ${t.border}`,\n },\n },\n },\n MuiDivider: {\n styleOverrides: {\n root: {\n borderColor: t.border,\n },\n },\n },\n MuiListItemButton: {\n styleOverrides: {\n root: {\n borderRadius: 8,\n paddingTop: 7,\n paddingBottom: 7,\n '&:hover': {\n backgroundColor: t.hover,\n },\n '&.Mui-selected': {\n // the active navigation item is filled with a gradient\n background: t.gradient,\n color: '#FFFFFF',\n boxShadow: `0 2px 8px ${alpha(t.primary, type === 'dark' ? 0.35 : 0.25)}`,\n '& .MuiListItemIcon-root': { color: '#FFFFFF' },\n '&:hover': { background: t.gradientHover },\n },\n },\n },\n },\n MuiListItemIcon: {\n styleOverrides: {\n root: {\n color: t.textSecondary,\n minWidth: 36,\n },\n },\n },\n MuiListItemText: {\n styleOverrides: {\n primary: {\n fontSize: '0.9rem',\n },\n },\n },\n MuiMenu: {\n styleOverrides: {\n paper: {\n backgroundColor: t.elevated,\n backgroundImage: 'none',\n border: `1px solid ${t.border}`,\n borderRadius: 10,\n },\n list: {\n padding: 6,\n },\n },\n },\n MuiMenuItem: {\n styleOverrides: {\n root: {\n borderRadius: 6,\n fontSize: '0.875rem',\n '&.Mui-selected': {\n backgroundColor: t.selected,\n },\n },\n },\n },\n MuiPopover: {\n styleOverrides: {\n paper: {\n backgroundColor: t.elevated,\n backgroundImage: 'none',\n border: `1px solid ${t.border}`,\n borderRadius: 10,\n },\n },\n },\n MuiDialog: {\n styleOverrides: {\n paper: {\n backgroundColor: t.elevated,\n backgroundImage: 'none',\n border: `1px solid ${t.border}`,\n borderRadius: 14,\n },\n },\n },\n MuiDialogTitle: {\n styleOverrides: {\n root: {\n fontSize: '1.05rem',\n fontWeight: 600,\n },\n },\n },\n MuiButton: {\n defaultProps: {\n disableElevation: true,\n },\n styleOverrides: {\n root: {\n borderRadius: 8,\n textTransform: 'none',\n fontWeight: 500,\n boxShadow: 'none',\n '&:hover': { boxShadow: 'none' },\n },\n sizeSmall: {\n borderRadius: 6,\n },\n outlined: {\n borderColor: t.border,\n },\n },\n },\n MuiIconButton: {\n styleOverrides: {\n root: {\n borderRadius: 8,\n color: t.textSecondary,\n '&:hover': { backgroundColor: t.hover, color: t.textPrimary },\n },\n },\n },\n MuiToggleButton: {\n styleOverrides: {\n root: {\n borderRadius: 8,\n borderColor: t.border,\n textTransform: 'none',\n '&.Mui-selected': {\n backgroundColor: t.selected,\n color: t.primaryLight,\n },\n },\n },\n },\n MuiChip: {\n styleOverrides: {\n root: {\n borderRadius: 6,\n fontWeight: 500,\n fontSize: '0.75rem',\n },\n sizeSmall: {\n height: 22,\n },\n outlined: {\n borderColor: t.border,\n },\n },\n },\n MuiTooltip: {\n styleOverrides: {\n tooltip: {\n backgroundColor: type === 'dark' ? '#242C37' : '#1F2937',\n border: type === 'dark' ? `1px solid ${t.border}` : undefined,\n borderRadius: 8,\n fontSize: '0.75rem',\n padding: '6px 10px',\n },\n arrow: {\n color: type === 'dark' ? '#242C37' : '#1F2937',\n },\n },\n },\n MuiOutlinedInput: {\n styleOverrides: {\n root: {\n borderRadius: 8,\n backgroundColor: type === 'dark' ? alpha('#FFFFFF', 0.03) : alpha('#0F172A', 0.02),\n '& .MuiOutlinedInput-notchedOutline': { borderColor: t.border },\n '&:hover .MuiOutlinedInput-notchedOutline': { borderColor: t.textDisabled },\n },\n input: {\n padding: '10px 12px',\n },\n },\n },\n MuiInputBase: {\n styleOverrides: {\n root: {\n fontSize: '0.875rem',\n },\n },\n },\n MuiInputLabel: {\n styleOverrides: {\n root: {\n color: t.textSecondary,\n },\n },\n },\n MuiSelect: {\n styleOverrides: {\n select: {\n fontSize: '0.875rem',\n },\n },\n },\n MuiTabs: {\n styleOverrides: {\n root: {\n minHeight: 42,\n borderBottom: `1px solid ${t.border}`,\n },\n indicator: {\n height: 2,\n borderRadius: 2,\n },\n },\n },\n MuiTab: {\n styleOverrides: {\n root: {\n minHeight: 42,\n textTransform: 'none',\n fontWeight: 500,\n fontSize: '0.8125rem',\n letterSpacing: '0.02em',\n color: t.textSecondary,\n '&.Mui-selected': { color: t.primaryLight },\n },\n },\n },\n MuiTable: {\n styleOverrides: {\n root: {\n borderCollapse: 'separate',\n },\n },\n },\n MuiTableCell: {\n styleOverrides: {\n root: {\n borderBottom: `1px solid ${t.border}`,\n fontSize: '0.8125rem',\n padding: '10px 14px',\n },\n head: {\n color: t.textSecondary,\n fontWeight: 600,\n fontSize: '0.75rem',\n backgroundColor: t.paper,\n },\n },\n },\n MuiTableRow: {\n styleOverrides: {\n root: {\n '&:hover': { backgroundColor: t.hover },\n '&.Mui-selected': {\n backgroundColor: t.selected,\n '&:hover': { backgroundColor: t.selected },\n },\n },\n },\n },\n MuiLinearProgress: {\n styleOverrides: {\n root: {\n height: 6,\n borderRadius: 4,\n backgroundColor: type === 'dark' ? alpha('#FFFFFF', 0.08) : alpha('#0F172A', 0.08),\n },\n bar: {\n borderRadius: 4,\n },\n },\n },\n MuiSwitch: {\n styleOverrides: {\n track: {\n borderRadius: 12,\n },\n },\n },\n MuiCheckbox: {\n styleOverrides: {\n root: {\n color: t.textDisabled,\n },\n },\n },\n MuiAlert: {\n styleOverrides: {\n root: {\n borderRadius: 10,\n border: `1px solid ${t.border}`,\n },\n },\n },\n MuiAccordion: {\n styleOverrides: {\n root: {\n backgroundColor: t.paper,\n backgroundImage: 'none',\n border: `1px solid ${t.border}`,\n borderRadius: 10,\n '&::before': { display: 'none' },\n },\n },\n },\n MuiLink: {\n styleOverrides: {\n root: {\n color: t.primaryLight,\n textDecorationColor: alpha(t.primaryLight, 0.4),\n transition: 'color .2s ease',\n '&:hover': { color: t.primary },\n },\n },\n },\n };\n\n return { options, components };\n}\n"]}
package/build/i18n.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2018-2024 Denis Haev (bluefox) <dogafox@gmail.com>
2
+ * Copyright 2018-2026 Denis Haev (bluefox) <dogafox@gmail.com>
3
3
  *
4
4
  * MIT License
5
5
  *
@@ -9,6 +9,8 @@ declare global {
9
9
  sysLang: ioBroker.Languages;
10
10
  i18nShow: (filter: string | RegExp) => void;
11
11
  i18nDisableWarning: (disable: boolean) => void;
12
+ /** List of all languages with their translations. */
13
+ i18nTranslations: I18nDictionary;
12
14
  }
13
15
  }
14
16
  type I18nWordDictionary = Record<ioBroker.Languages, string>;
@@ -24,12 +26,8 @@ type I18nWordsWithPrefix = I18nDictionary & {
24
26
  * Translation string management.
25
27
  */
26
28
  export declare class I18n {
27
- /** List of all languages with their translations. */
28
- static translations: I18nDictionary;
29
29
  /** List of unknown translations during development. */
30
30
  static unknownTranslations: string[];
31
- /** The currently displayed language. */
32
- static lang: ioBroker.Languages;
33
31
  static _disableWarning: boolean;
34
32
  /**
35
33
  * Set the language to display
@@ -50,6 +48,7 @@ export declare class I18n {
50
48
  /**
51
49
  * Sets all translations (in all languages).
52
50
  *
51
+ * @deprecated Use {@link extendTranslations}
53
52
  * @param translations The translations to add.
54
53
  */
55
54
  static setTranslations(translations: I18nDictionary): void;