@data-fair/lib-common-types 1.18.0 → 1.19.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/package.json +1 -1
- package/theme/.type/index.d.ts +4 -0
- package/theme/index.d.ts +8 -0
- package/theme/index.js +12 -2
- package/theme/schema.d.ts +38 -0
- package/theme/schema.js +32 -0
package/package.json
CHANGED
package/theme/.type/index.d.ts
CHANGED
|
@@ -27,6 +27,8 @@ export type CouleurDeFond = string;
|
|
|
27
27
|
export type CouleurDeTexteSurCouleurDeFond = string;
|
|
28
28
|
export type CouleurDesSurfacesVignettesListesEtc = string;
|
|
29
29
|
export type CouleurDeTexteSurCouleurDesSurfaces = string;
|
|
30
|
+
export type CouleurDesSurfacesAvecContrasteInverse = string;
|
|
31
|
+
export type CouleurDeTexteSurCouleurDesSurfacesAvecContrasteInverse = string;
|
|
30
32
|
export type CouleurPrincipale1 = string;
|
|
31
33
|
export type CouleurDeTexteSurCouleurPrincipale = string;
|
|
32
34
|
export type CouleurDeTextePrincipal = string;
|
|
@@ -83,6 +85,8 @@ export type Colors = {
|
|
|
83
85
|
"on-background": CouleurDeTexteSurCouleurDeFond;
|
|
84
86
|
surface: CouleurDesSurfacesVignettesListesEtc;
|
|
85
87
|
"on-surface": CouleurDeTexteSurCouleurDesSurfaces;
|
|
88
|
+
"surface-inverse"?: CouleurDesSurfacesAvecContrasteInverse;
|
|
89
|
+
"on-surface-inverse"?: CouleurDeTexteSurCouleurDesSurfacesAvecContrasteInverse;
|
|
86
90
|
primary: CouleurPrincipale1;
|
|
87
91
|
"on-primary": CouleurDeTexteSurCouleurPrincipale;
|
|
88
92
|
"text-primary"?: CouleurDeTextePrincipal;
|
package/theme/index.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ export declare const defaultTheme: {
|
|
|
12
12
|
'on-background': string;
|
|
13
13
|
surface: string;
|
|
14
14
|
'on-surface': string;
|
|
15
|
+
'surface-inverse': string;
|
|
16
|
+
'on-surface-inverse': string;
|
|
15
17
|
primary: string;
|
|
16
18
|
'on-primary': string;
|
|
17
19
|
'text-primary': string;
|
|
@@ -43,6 +45,8 @@ export declare const defaultTheme: {
|
|
|
43
45
|
'on-background': string;
|
|
44
46
|
surface: string;
|
|
45
47
|
'on-surface': string;
|
|
48
|
+
'surface-inverse': string;
|
|
49
|
+
'on-surface-inverse': string;
|
|
46
50
|
primary: string;
|
|
47
51
|
'on-primary': string;
|
|
48
52
|
'text-primary': string;
|
|
@@ -74,6 +78,8 @@ export declare const defaultTheme: {
|
|
|
74
78
|
'on-background': string;
|
|
75
79
|
surface: string;
|
|
76
80
|
'on-surface': string;
|
|
81
|
+
'surface-inverse': string;
|
|
82
|
+
'on-surface-inverse': string;
|
|
77
83
|
primary: string;
|
|
78
84
|
'on-primary': string;
|
|
79
85
|
'text-primary': undefined;
|
|
@@ -105,6 +111,8 @@ export declare const defaultTheme: {
|
|
|
105
111
|
'on-background': string;
|
|
106
112
|
surface: string;
|
|
107
113
|
'on-surface': string;
|
|
114
|
+
'surface-inverse': string;
|
|
115
|
+
'on-surface-inverse': string;
|
|
108
116
|
primary: string;
|
|
109
117
|
'on-primary': string;
|
|
110
118
|
'text-primary': string;
|
package/theme/index.js
CHANGED
|
@@ -14,6 +14,8 @@ export const defaultTheme = {
|
|
|
14
14
|
'on-background': '#424242', // grey-darken-3
|
|
15
15
|
surface: '#FFFFFF',
|
|
16
16
|
'on-surface': '#424242', // grey-darken-3
|
|
17
|
+
'surface-inverse': '#424242', // grey-darken-3
|
|
18
|
+
'on-surface-inverse': '#FFFFFF',
|
|
17
19
|
primary: '#1976D2', // blue-darken-2
|
|
18
20
|
'on-primary': '#FFFFFF',
|
|
19
21
|
'text-primary': '#1565C0',
|
|
@@ -43,8 +45,10 @@ export const defaultTheme = {
|
|
|
43
45
|
darkColors: {
|
|
44
46
|
background: '#121212',
|
|
45
47
|
'on-background': '#FFFFFF', // white
|
|
46
|
-
surface: '#212121',
|
|
48
|
+
surface: '#212121', // grey-darken-4
|
|
47
49
|
'on-surface': '#FFFFFF', // white
|
|
50
|
+
'surface-inverse': '#FAFAFA', // grey-lighten-5
|
|
51
|
+
'on-surface-inverse': '#424242', // grey-darken-3
|
|
48
52
|
primary: '#1976D2', // blue-darken-2
|
|
49
53
|
'on-primary': '#FFFFFF', // white
|
|
50
54
|
'text-primary': '#2196F3', // blue
|
|
@@ -77,6 +81,8 @@ export const defaultTheme = {
|
|
|
77
81
|
'on-background': '#000000',
|
|
78
82
|
surface: '#FFFFFF',
|
|
79
83
|
'on-surface': '#000000',
|
|
84
|
+
'surface-inverse': '#212121', // grey-darken-4
|
|
85
|
+
'on-surface-inverse': '#FFFFFF',
|
|
80
86
|
primary: '#0D47A1', // blue-darken-4
|
|
81
87
|
'on-primary': '#FFFFFF',
|
|
82
88
|
'text-primary': undefined,
|
|
@@ -108,6 +114,8 @@ export const defaultTheme = {
|
|
|
108
114
|
'on-background': '#FFFFFF', // white
|
|
109
115
|
surface: '#121212',
|
|
110
116
|
'on-surface': '#FFFFFF', // white
|
|
117
|
+
'surface-inverse': '#FFFFFF', // white
|
|
118
|
+
'on-surface-inverse': '#000000',
|
|
111
119
|
primary: '#0D47A1', // blue-darken-4
|
|
112
120
|
'on-primary': '#FFFFFF', // white
|
|
113
121
|
'text-primary': '#42A5F5', // blue-lighten-1
|
|
@@ -257,6 +265,7 @@ const messages = {
|
|
|
257
265
|
text: 'de texte',
|
|
258
266
|
background: 'd\'arrière plan',
|
|
259
267
|
surface: 'de surface',
|
|
268
|
+
'surface-inverse': 'de surface avec contraste inversé',
|
|
260
269
|
primary: 'primaire',
|
|
261
270
|
'text-primary': 'texte primaire',
|
|
262
271
|
secondary: 'secondaire',
|
|
@@ -285,6 +294,7 @@ const messages = {
|
|
|
285
294
|
text: 'text',
|
|
286
295
|
background: 'background',
|
|
287
296
|
surface: 'surface',
|
|
297
|
+
'surface-inverse': 'surface with inverted contrast',
|
|
288
298
|
primary: 'primary',
|
|
289
299
|
'text-primary': 'primary text',
|
|
290
300
|
secondary: 'secondary',
|
|
@@ -322,7 +332,7 @@ export function getColorsWarnings(locale, colors, themeName, readableOptions) {
|
|
|
322
332
|
warnings.push(readableWarning(readableOptions, locale, textColor, `text-${color}`, colors.background, 'background', themeName));
|
|
323
333
|
warnings.push(readableWarning(readableOptions, locale, textColor, `text-${color}`, colors.surface, 'surface', themeName));
|
|
324
334
|
}
|
|
325
|
-
for (const color of ['background', 'surface', 'primary', 'secondary', 'accent', 'info', 'success', 'error', 'warning', 'admin']) {
|
|
335
|
+
for (const color of ['background', 'surface', 'surface-inverse', 'primary', 'secondary', 'accent', 'info', 'success', 'error', 'warning', 'admin']) {
|
|
326
336
|
warnings.push(readableWarning(readableOptions, locale, colors[`on-${color}`], 'text', colors[color], color, themeName));
|
|
327
337
|
}
|
|
328
338
|
return warnings.filter(w => w !== undefined);
|
package/theme/schema.d.ts
CHANGED
|
@@ -405,6 +405,44 @@ declare const _default: {
|
|
|
405
405
|
};
|
|
406
406
|
};
|
|
407
407
|
};
|
|
408
|
+
'surface-inverse': {
|
|
409
|
+
type: string;
|
|
410
|
+
title: string;
|
|
411
|
+
'x-i18n-title': {
|
|
412
|
+
fr: string;
|
|
413
|
+
en: string;
|
|
414
|
+
es: string;
|
|
415
|
+
it: string;
|
|
416
|
+
pt: string;
|
|
417
|
+
de: string;
|
|
418
|
+
};
|
|
419
|
+
layout: {
|
|
420
|
+
comp: string;
|
|
421
|
+
cols: {
|
|
422
|
+
sm: number;
|
|
423
|
+
lg: number;
|
|
424
|
+
};
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
'on-surface-inverse': {
|
|
428
|
+
type: string;
|
|
429
|
+
title: string;
|
|
430
|
+
'x-i18n-title': {
|
|
431
|
+
fr: string;
|
|
432
|
+
en: string;
|
|
433
|
+
es: string;
|
|
434
|
+
it: string;
|
|
435
|
+
pt: string;
|
|
436
|
+
de: string;
|
|
437
|
+
};
|
|
438
|
+
layout: {
|
|
439
|
+
comp: string;
|
|
440
|
+
cols: {
|
|
441
|
+
sm: number;
|
|
442
|
+
lg: number;
|
|
443
|
+
};
|
|
444
|
+
};
|
|
445
|
+
};
|
|
408
446
|
primary: {
|
|
409
447
|
type: string;
|
|
410
448
|
title: string;
|
package/theme/schema.js
CHANGED
|
@@ -446,6 +446,38 @@ export default {
|
|
|
446
446
|
cols: { sm: 6, lg: 3 }
|
|
447
447
|
}
|
|
448
448
|
},
|
|
449
|
+
'surface-inverse': {
|
|
450
|
+
type: 'string',
|
|
451
|
+
title: 'Couleur des surfaces avec contraste inversé',
|
|
452
|
+
'x-i18n-title': {
|
|
453
|
+
fr: 'Couleur des surfaces avec contraste inversé',
|
|
454
|
+
en: 'Surface color with inverted contrast',
|
|
455
|
+
es: 'Color de las superficies con contraste invertido',
|
|
456
|
+
it: 'Colore delle superfici con contrasto invertito',
|
|
457
|
+
pt: 'Cor das superfícies com contraste invertido',
|
|
458
|
+
de: 'Oberflächenfarbe mit invertiertem Kontrast'
|
|
459
|
+
},
|
|
460
|
+
layout: {
|
|
461
|
+
comp: 'color-picker',
|
|
462
|
+
cols: { sm: 6, lg: 3 }
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
'on-surface-inverse': {
|
|
466
|
+
type: 'string',
|
|
467
|
+
title: 'Couleur de texte sur couleur des surfaces avec contraste inversé',
|
|
468
|
+
'x-i18n-title': {
|
|
469
|
+
fr: 'Couleur de texte sur couleur des surfaces avec contraste inversé',
|
|
470
|
+
en: 'Text color on surface color with inverted contrast',
|
|
471
|
+
es: 'Color de texto sobre color de superficie con contraste invertido',
|
|
472
|
+
it: 'Colore del testo sul colore della superficie con contrasto invertito',
|
|
473
|
+
pt: 'Cor do texto na cor da superfície com contraste invertido',
|
|
474
|
+
de: 'Textfarbe auf Oberflächenfarbe mit invertiertem Kontrast'
|
|
475
|
+
},
|
|
476
|
+
layout: {
|
|
477
|
+
comp: 'color-picker',
|
|
478
|
+
cols: { sm: 6, lg: 3 }
|
|
479
|
+
}
|
|
480
|
+
},
|
|
449
481
|
primary: {
|
|
450
482
|
type: 'string',
|
|
451
483
|
title: 'Couleur principale',
|