@alveole/theme 2.0.0-alpha.2 → 2.0.0-alpha.21
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/constants/Color.d.ts +1 -1
- package/dist/constants/Color.js +1 -1
- package/dist/constants/FocusProps.d.ts +2 -5
- package/dist/constants/FocusProps.d.ts.map +1 -1
- package/dist/constants/FocusProps.js +2 -3
- package/dist/constants/LinkProps.d.ts +3 -7
- package/dist/constants/LinkProps.d.ts.map +1 -1
- package/dist/constants/LinkProps.js +4 -5
- package/dist/constants/Palette.d.ts +21 -8
- package/dist/constants/Palette.d.ts.map +1 -1
- package/dist/constants/Palette.js +7 -4
- package/dist/constants/marques.d.ts +11 -0
- package/dist/constants/marques.d.ts.map +1 -0
- package/dist/constants/marques.js +10 -0
- package/dist/default.css +2 -2
- package/dist/helpers/alphaColor.d.ts +3 -2
- package/dist/helpers/alphaColor.d.ts.map +1 -1
- package/dist/helpers/alphaColor.js +2 -2
- package/dist/helpers/useThemeBuilder.d.ts +2 -2
- package/dist/helpers/useThemeBuilder.d.ts.map +1 -1
- package/dist/helpers/useThemeBuilder.js +2 -2
- package/dist/type/Theme.d.ts +2 -2
- package/dist/type/Theme.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/constants/Color.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
+
import { Marques } from './marques';
|
|
1
2
|
/**
|
|
2
3
|
* `ring` pose la bague hors de l'element. `inset` la rentre a l'interieur, pour ce qui est a
|
|
3
4
|
* ras d'un bord ou rogne par un parent : cellules de tableau, items de barre laterale.
|
|
4
5
|
*/
|
|
5
6
|
export type FocusRingVariant = 'ring' | 'inset';
|
|
6
|
-
type FocusRingProps = {
|
|
7
|
-
dataSet: Record<string, string>;
|
|
8
|
-
};
|
|
9
7
|
/**
|
|
10
8
|
* Les props par lesquelles un composant demande la bague de focus du kit.
|
|
11
9
|
*
|
|
@@ -17,6 +15,5 @@ type FocusRingProps = {
|
|
|
17
15
|
* iOS (cf. UnsupportedCSSProperties), et un anneau natif demanderait une vue dessinee en
|
|
18
16
|
* absolu.
|
|
19
17
|
*/
|
|
20
|
-
export declare const focusRingProps: (variante?: FocusRingVariant) =>
|
|
21
|
-
export {};
|
|
18
|
+
export declare const focusRingProps: (variante?: FocusRingVariant) => Marques;
|
|
22
19
|
//# sourceMappingURL=FocusProps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FocusProps.d.ts","sourceRoot":"","sources":["../../src/constants/FocusProps.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FocusProps.d.ts","sourceRoot":"","sources":["../../src/constants/FocusProps.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAW,MAAM,WAAW,CAAC;AAE7C;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,OAAO,CAAC;AAEhD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,GAAI,WAAU,gBAAyB,KAAG,OACxB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FOCUS_DATA_SET_KEY } from './Focus';
|
|
2
|
+
import { marques } from './marques';
|
|
2
3
|
/**
|
|
3
4
|
* Les props par lesquelles un composant demande la bague de focus du kit.
|
|
4
5
|
*
|
|
@@ -10,6 +11,4 @@ import { FOCUS_DATA_SET_KEY } from './Focus';
|
|
|
10
11
|
* iOS (cf. UnsupportedCSSProperties), et un anneau natif demanderait une vue dessinee en
|
|
11
12
|
* absolu.
|
|
12
13
|
*/
|
|
13
|
-
export const focusRingProps = (variante = 'ring') => ({
|
|
14
|
-
dataSet: { [FOCUS_DATA_SET_KEY]: variante },
|
|
15
|
-
});
|
|
14
|
+
export const focusRingProps = (variante = 'ring') => marques({ [FOCUS_DATA_SET_KEY]: variante });
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Les props d'un lien de texte du kit : la marque de lien et la bague de focus
|
|
3
|
-
*
|
|
2
|
+
* Les props d'un lien de texte du kit : la marque de lien et la bague de focus, posees
|
|
3
|
+
* ensemble, sans quoi l'etalement de l'une ecraserait le `dataSet` de l'autre.
|
|
4
4
|
*/
|
|
5
|
-
export declare const linkProps: () =>
|
|
6
|
-
dataSet: {
|
|
7
|
-
alveoleLink: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
5
|
+
export declare const linkProps: () => import("./marques").Marques;
|
|
10
6
|
//# sourceMappingURL=LinkProps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkProps.d.ts","sourceRoot":"","sources":["../../src/constants/LinkProps.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LinkProps.d.ts","sourceRoot":"","sources":["../../src/constants/LinkProps.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,eAAO,MAAM,SAAS,mCAA8E,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { focusRingProps } from './FocusProps';
|
|
2
2
|
import { LINK_DATA_SET_KEY } from './Link';
|
|
3
|
+
import { marques } from './marques';
|
|
3
4
|
/**
|
|
4
|
-
* Les props d'un lien de texte du kit : la marque de lien et la bague de focus
|
|
5
|
-
*
|
|
5
|
+
* Les props d'un lien de texte du kit : la marque de lien et la bague de focus, posees
|
|
6
|
+
* ensemble, sans quoi l'etalement de l'une ecraserait le `dataSet` de l'autre.
|
|
6
7
|
*/
|
|
7
|
-
export const linkProps = () => ({
|
|
8
|
-
dataSet: { ...focusRingProps().dataSet, [LINK_DATA_SET_KEY]: 'text' },
|
|
9
|
-
});
|
|
8
|
+
export const linkProps = () => marques({ ...focusRingProps().dataSet, [LINK_DATA_SET_KEY]: 'text' });
|
|
@@ -8,7 +8,7 @@ export declare const CustomPalette: {
|
|
|
8
8
|
};
|
|
9
9
|
readonly background: {
|
|
10
10
|
readonly 'alt-primary': "#F2F9FF";
|
|
11
|
-
readonly 'alt-grey': "#
|
|
11
|
+
readonly 'alt-grey': "#F7FAFB";
|
|
12
12
|
readonly 'action-low-primary': "#D2E8FE";
|
|
13
13
|
readonly 'contrast-grey': "#EFF1F6";
|
|
14
14
|
readonly 'contrast-success': "#B9FDD5";
|
|
@@ -16,7 +16,7 @@ export declare const CustomPalette: {
|
|
|
16
16
|
readonly 'contrast-info': "#E5F1FE";
|
|
17
17
|
readonly 'contrast-warning': "#FFEEE5";
|
|
18
18
|
readonly 'default-grey': "#FFFFFF";
|
|
19
|
-
readonly 'default-grey-hover': "#
|
|
19
|
+
readonly 'default-grey-hover': "#EFF1F6";
|
|
20
20
|
readonly 'default-grey-active': "#E6EAF1";
|
|
21
21
|
readonly 'active-primary': "#002764";
|
|
22
22
|
readonly 'disabled-grey': "#E6EAF1";
|
|
@@ -285,7 +285,7 @@ export declare const CustomPalette: {
|
|
|
285
285
|
/** @deprecated Utiliser light.background['default-grey-active'] */
|
|
286
286
|
readonly 'default-active': "#EFF1F6";
|
|
287
287
|
/** @deprecated Utiliser light.background['alt-grey'] */
|
|
288
|
-
readonly 'alt-grey': "#
|
|
288
|
+
readonly 'alt-grey': "#F7FAFB";
|
|
289
289
|
/** @deprecated Utiliser light.background['active-inverted'] */
|
|
290
290
|
readonly inverse: "#012448";
|
|
291
291
|
/** @deprecated Utiliser light.background['action-high-primary'] */
|
|
@@ -293,7 +293,7 @@ export declare const CustomPalette: {
|
|
|
293
293
|
/** @deprecated Utiliser light.background['disabled-grey'] */
|
|
294
294
|
readonly 'disabled-grey': "#E6EAF1";
|
|
295
295
|
/** @deprecated Utiliser light.background['default-grey-hover'] */
|
|
296
|
-
readonly 'default-hover': "#
|
|
296
|
+
readonly 'default-hover': "#EFF1F6";
|
|
297
297
|
/** @deprecated Utiliser light.background['open-primary'] */
|
|
298
298
|
readonly 'open-bleu-captive': "#D2E8FE";
|
|
299
299
|
/** @deprecated Utiliser light.background['open-primary'] */
|
|
@@ -330,13 +330,13 @@ export declare const CustomPalette: {
|
|
|
330
330
|
/** @deprecated Utiliser light.background (transparent-hover) */
|
|
331
331
|
readonly secondary: {
|
|
332
332
|
readonly default: "transparent";
|
|
333
|
-
readonly hover: "#
|
|
333
|
+
readonly hover: "#EFF1F6";
|
|
334
334
|
readonly disabled: "transparent";
|
|
335
335
|
};
|
|
336
336
|
/** @deprecated Utiliser light.background (transparent-hover) */
|
|
337
337
|
readonly tertiary: {
|
|
338
338
|
readonly default: "transparent";
|
|
339
|
-
readonly hover: "#
|
|
339
|
+
readonly hover: "#EFF1F6";
|
|
340
340
|
readonly disabled: "transparent";
|
|
341
341
|
};
|
|
342
342
|
/** @deprecated Utiliser light.background['action-high-error'] et light.background['flat-error'] */
|
|
@@ -370,7 +370,7 @@ export declare const CustomPalette: {
|
|
|
370
370
|
readonly nav: {
|
|
371
371
|
readonly link: {
|
|
372
372
|
/** @deprecated Utiliser light.background['default-grey-hover'] */
|
|
373
|
-
readonly hover: "#
|
|
373
|
+
readonly hover: "#F7FAFB";
|
|
374
374
|
};
|
|
375
375
|
};
|
|
376
376
|
/** @deprecated Utiliser light.background et light.border pour le stepper */
|
|
@@ -389,13 +389,26 @@ export declare const CustomPalette: {
|
|
|
389
389
|
readonly focus: "#0A76F6";
|
|
390
390
|
};
|
|
391
391
|
};
|
|
392
|
+
export type ThemeColor = string & {
|
|
393
|
+
readonly __couleurDuTheme: true;
|
|
394
|
+
};
|
|
392
395
|
export type LeafStrings<T> = T extends string ? string : {
|
|
393
396
|
[K in keyof T]: LeafStrings<T[K]>;
|
|
394
397
|
};
|
|
398
|
+
export type LeafThemeColors<T> = T extends string ? ThemeColor : {
|
|
399
|
+
[K in keyof T]: LeafThemeColors<T[K]>;
|
|
400
|
+
};
|
|
395
401
|
export type LeafFlexible<T> = T extends string ? string : T extends number ? number | string : {
|
|
396
402
|
[K in keyof T]: LeafFlexible<T[K]>;
|
|
397
403
|
};
|
|
398
|
-
|
|
404
|
+
/** Palette telle qu'une app la fournit, en couleurs ecrites en dur. */
|
|
405
|
+
export type PaletteSource = LeafStrings<typeof CustomPalette>;
|
|
406
|
+
export type Palette = LeafThemeColors<typeof CustomPalette>;
|
|
407
|
+
/**
|
|
408
|
+
* Seul point ou une couleur ecrite en dur devient une couleur du theme. La marque n'existe qu'au
|
|
409
|
+
* typage : la surcharge la pose sans assertion, la palette rendue est celle recue.
|
|
410
|
+
*/
|
|
411
|
+
export declare function enCouleursDuTheme(palette: PaletteSource): Palette;
|
|
399
412
|
export type DeepPartial<T> = {
|
|
400
413
|
[K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
|
|
401
414
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Palette.d.ts","sourceRoot":"","sources":["../../src/constants/Palette.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa;;QAEtB,kDAAkD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8EpD,0DAA0D;;;YAGtD,0DAA0D;;;;YAI1D,0DAA0D;;YAE1D,0DAA0D;;;;IAK9D,kHAAkH;;IAElH,iGAAiG;;IAEjG,gGAAgG;;IAEhG,uFAAuF;;IAEvF,6FAA6F;;IAE7F,6FAA6F;;IAE7F,sDAAsD;;IAGtD,iEAAiE;;QAE/D,sDAAsD;;QAEtD,oDAAoD;;QAEpD,sDAAsD;;QAEtD,uDAAuD;;QAEvD,6DAA6D;;QAE7D,6DAA6D;;QAE7D,0DAA0D;;QAE1D,oDAAoD;;QAEpD,oDAAoD;;QAEpD,0DAA0D;;QAE1D,0DAA0D;;QAE1D,yDAAyD;;QAEzD,uDAAuD;;QAEvD,sDAAsD;;QAEtD,0DAA0D;;QAG1D,yFAAyF;;YAEvF,uDAAuD;;YAEvD,uDAAuD;;YAEvD,uDAAuD;;YAEvD,6FAA6F;;;QAI/F,0GAA0G;;YAExG,sDAAsD;;YAEtD,yDAAyD;;YAEzD,oDAAoD;;YAEpD,yDAAyD;;YAEzD,uD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
|
'contrast-info': Colors['BleuCaptive']['950'],
|
|
18
18
|
'contrast-warning': Colors['OrangeWarning']['950'],
|
|
19
19
|
'default-grey': Colors['Neutre']['1000'],
|
|
20
|
-
'default-grey-hover': Colors['Neutre']['
|
|
20
|
+
'default-grey-hover': Colors['Neutre']['950'],
|
|
21
21
|
'default-grey-active': Colors['Neutre']['925'],
|
|
22
22
|
'active-primary': Colors['BleuCaptive']['sun-172'],
|
|
23
23
|
'disabled-grey': Colors['Neutre']['925'],
|
|
@@ -294,7 +294,7 @@ export const CustomPalette = {
|
|
|
294
294
|
/** @deprecated Utiliser light.background['disabled-grey'] */
|
|
295
295
|
'disabled-grey': Colors['Neutre']['925'],
|
|
296
296
|
/** @deprecated Utiliser light.background['default-grey-hover'] */
|
|
297
|
-
'default-hover': Colors['Neutre']['
|
|
297
|
+
'default-hover': Colors['Neutre']['950'],
|
|
298
298
|
/** @deprecated Utiliser light.background['open-primary'] */
|
|
299
299
|
'open-bleu-captive': Colors['BleuCaptive']['925'],
|
|
300
300
|
/** @deprecated Utiliser light.background['open-primary'] */
|
|
@@ -331,13 +331,13 @@ export const CustomPalette = {
|
|
|
331
331
|
/** @deprecated Utiliser light.background (transparent-hover) */
|
|
332
332
|
secondary: {
|
|
333
333
|
default: 'transparent',
|
|
334
|
-
hover: Colors['Neutre']['
|
|
334
|
+
hover: Colors['Neutre']['950'],
|
|
335
335
|
disabled: 'transparent',
|
|
336
336
|
},
|
|
337
337
|
/** @deprecated Utiliser light.background (transparent-hover) */
|
|
338
338
|
tertiary: {
|
|
339
339
|
default: 'transparent',
|
|
340
|
-
hover: Colors['Neutre']['
|
|
340
|
+
hover: Colors['Neutre']['950'],
|
|
341
341
|
disabled: 'transparent',
|
|
342
342
|
},
|
|
343
343
|
/** @deprecated Utiliser light.background['action-high-error'] et light.background['flat-error'] */
|
|
@@ -390,3 +390,6 @@ export const CustomPalette = {
|
|
|
390
390
|
focus: Colors['Focus']['525'],
|
|
391
391
|
},
|
|
392
392
|
};
|
|
393
|
+
export function enCouleursDuTheme(palette) {
|
|
394
|
+
return palette;
|
|
395
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type Marques = {
|
|
2
|
+
dataSet: Record<string, string>;
|
|
3
|
+
[attribut: string]: string | Record<string, string>;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Pose des marques `data-*` sous les deux formes qu'un composant du kit peut recevoir :
|
|
7
|
+
* `dataSet`, que react-native-web traduit en attributs, et l'attribut direct, seule forme
|
|
8
|
+
* que Tamagui v2 transmet au DOM.
|
|
9
|
+
*/
|
|
10
|
+
export declare const marques: (valeurs: Record<string, string>) => Marques;
|
|
11
|
+
//# sourceMappingURL=marques.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marques.d.ts","sourceRoot":"","sources":["../../src/constants/marques.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,OAAO,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAAC;AAE/G;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAG,OAGxD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { dataSetAttribute } from './dataSetAttribute';
|
|
2
|
+
/**
|
|
3
|
+
* Pose des marques `data-*` sous les deux formes qu'un composant du kit peut recevoir :
|
|
4
|
+
* `dataSet`, que react-native-web traduit en attributs, et l'attribut direct, seule forme
|
|
5
|
+
* que Tamagui v2 transmet au DOM.
|
|
6
|
+
*/
|
|
7
|
+
export const marques = (valeurs) => ({
|
|
8
|
+
dataSet: valeurs,
|
|
9
|
+
...Object.fromEntries(Object.entries(valeurs).map(([cle, valeur]) => [dataSetAttribute(cle), valeur])),
|
|
10
|
+
});
|
package/dist/default.css
CHANGED
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
--color-Neutre-900: #DEE3EC;
|
|
196
196
|
--color-Neutre-925: #E6EAF1;
|
|
197
197
|
--color-Neutre-950: #EFF1F6;
|
|
198
|
-
--color-Neutre-975: #
|
|
198
|
+
--color-Neutre-975: #F7FAFB;
|
|
199
199
|
--color-Neutre-1000: #FFFFFF;
|
|
200
200
|
--color-BleuCaptive-75: #011E3A;
|
|
201
201
|
--color-BleuCaptive-100: #012448;
|
|
@@ -424,7 +424,7 @@
|
|
|
424
424
|
--background-contrast-info: var(--color-BleuCaptive-950);
|
|
425
425
|
--background-contrast-warning: var(--color-OrangeWarning-950);
|
|
426
426
|
--background-default-grey: var(--color-Neutre-1000);
|
|
427
|
-
--background-default-grey-hover: var(--color-Neutre-
|
|
427
|
+
--background-default-grey-hover: var(--color-Neutre-950);
|
|
428
428
|
--background-default-grey-active: var(--color-Neutre-925);
|
|
429
429
|
--background-active-primary: var(--color-BleuCaptive-sun-172);
|
|
430
430
|
--background-disabled-grey: var(--color-Neutre-925);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Color } from '../constants';
|
|
1
|
+
import { Color, ThemeColor } from '../constants';
|
|
2
2
|
type Between0And1 = number;
|
|
3
|
-
export declare
|
|
3
|
+
export declare function alpha(hexadecimalColor: ThemeColor, opacity: Between0And1): ThemeColor;
|
|
4
|
+
export declare function alpha(hexadecimalColor: Color, opacity: Between0And1): string;
|
|
4
5
|
export {};
|
|
5
6
|
//# sourceMappingURL=alphaColor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alphaColor.d.ts","sourceRoot":"","sources":["../../src/helpers/alphaColor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"alphaColor.d.ts","sourceRoot":"","sources":["../../src/helpers/alphaColor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAGjD,KAAK,YAAY,GAAG,MAAM,CAAC;AAG3B,wBAAgB,KAAK,CAAC,gBAAgB,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,GAAG,UAAU,CAAC;AACvF,wBAAgB,KAAK,CAAC,gBAAgB,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,GAAG,MAAM,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { hexToRgb } from './hexToRgb';
|
|
2
|
-
export
|
|
2
|
+
export function alpha(hexadecimalColor, opacity) {
|
|
3
3
|
if (hexadecimalColor.startsWith('var(')) {
|
|
4
4
|
return `color-mix(in srgb, ${hexadecimalColor} ${Math.round(opacity * 100)}%, transparent)`;
|
|
5
5
|
}
|
|
6
6
|
const [r, g, b] = hexToRgb(hexadecimalColor);
|
|
7
7
|
return `rgba(${r}, ${g}, ${b}, ${opacity})`;
|
|
8
|
-
}
|
|
8
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Theme } from '../type';
|
|
2
|
-
import { DeepPartial,
|
|
2
|
+
import { DeepPartial, PaletteSource } from '../constants';
|
|
3
3
|
export type CustomBuilder = {
|
|
4
|
-
color?: DeepPartial<
|
|
4
|
+
color?: DeepPartial<PaletteSource>;
|
|
5
5
|
};
|
|
6
6
|
export declare function useThemeBuilder(params: CustomBuilder): Theme & {
|
|
7
7
|
isReady: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useThemeBuilder.d.ts","sourceRoot":"","sources":["../../src/helpers/useThemeBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAKrC,OAAO,EAKL,WAAW,
|
|
1
|
+
{"version":3,"file":"useThemeBuilder.d.ts","sourceRoot":"","sources":["../../src/helpers/useThemeBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAKrC,OAAO,EAKL,WAAW,EAMX,aAAa,EAGd,MAAM,cAAc,CAAC;AAWtB,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,CAAC,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC;CACpC,CAAC;AAEF,wBAAgB,eAAe,CAAC,MAAM,EAAE,aAAa,GAAG,KAAK,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CA6EnF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFonts } from 'expo-font';
|
|
2
2
|
import { useCallback, useMemo } from 'react';
|
|
3
3
|
import { Platform, useWindowDimensions } from 'react-native';
|
|
4
|
-
import { breakpointToVariant, Colors, CustomPalette, CustomTypography, Fonts, FontsMap, Grilles, Heights, Sizes, Spacings, } from '../constants';
|
|
4
|
+
import { breakpointToVariant, Colors, CustomPalette, CustomTypography, enCouleursDuTheme, Fonts, FontsMap, Grilles, Heights, Sizes, Spacings, } from '../constants';
|
|
5
5
|
import { controlSizesFor } from '../constants/Control';
|
|
6
6
|
import { pillSizeFor } from '../constants/Pill';
|
|
7
7
|
import { RadiusList } from '../constants/Radius';
|
|
@@ -43,7 +43,7 @@ export function useThemeBuilder(params) {
|
|
|
43
43
|
variant,
|
|
44
44
|
isVariant: useCallback(match => variant === match, [variant]),
|
|
45
45
|
// Colors
|
|
46
|
-
color: { _constants: Colors, _rawLight: rawMergedPalette.light, alpha, ...mergedPalette },
|
|
46
|
+
color: { _constants: Colors, _rawLight: rawMergedPalette.light, alpha, ...enCouleursDuTheme(mergedPalette) },
|
|
47
47
|
// Shadows
|
|
48
48
|
shadows: elevationStyle,
|
|
49
49
|
// Typographies
|
package/dist/type/Theme.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Colors, CustomTypography, Fonts, Grilles, Palette, Spacing, SpacingKey, Variant } from '../constants';
|
|
1
|
+
import type { Colors, CustomTypography, Fonts, Grilles, Palette, PaletteSource, Spacing, SpacingKey, Variant } from '../constants';
|
|
2
2
|
import type { ControlSize, ControlSizeKey } from '../constants/Control';
|
|
3
3
|
import type { PillSize, PillSizeKey } from '../constants/Pill';
|
|
4
4
|
import { Radius, RadiusKey } from '../constants/Radius';
|
|
@@ -25,7 +25,7 @@ export interface Theme {
|
|
|
25
25
|
/** @deprecated Utiliser la palette */
|
|
26
26
|
_constants: typeof Colors;
|
|
27
27
|
/** Palette light avec valeurs hex brutes, utilisée par injectVariableCSS */
|
|
28
|
-
_rawLight:
|
|
28
|
+
_rawLight: PaletteSource['light'];
|
|
29
29
|
} & Palette & {
|
|
30
30
|
alpha: typeof alpha;
|
|
31
31
|
};
|
package/dist/type/Theme.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Theme.d.ts","sourceRoot":"","sources":["../../src/type/Theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Theme.d.ts","sourceRoot":"","sources":["../../src/type/Theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,gBAAgB,EAChB,KAAK,EACL,OAAO,EACP,OAAO,EACP,aAAa,EACb,OAAO,EACP,UAAU,EACV,OAAO,EACR,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,WAAW,KAAK;IAEpB,mHAAmH;IACnH,OAAO,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,MAAM,GAAG,MAAM,CAAC;IAC9C,wHAAwH;IACxH,YAAY,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,OAAO,CAAC;IAC3C,mEAAmE;IACnE,eAAe,EAAE,MAAM,MAAM,GAAG,MAAM,CAAC;IAGvC,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC;IAGzC,OAAO,EAAE,OAAO,cAAc,CAAC;IAG/B,MAAM,EAAE,CAAC,GAAG,EAAE,SAAS,KAAK,MAAM,CAAC;IAGnC,OAAO,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,WAAW,CAAC;IAG9C,IAAI,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,QAAQ,CAAC;IAGrC,OAAO,EAAE,OAAO,OAAO,CAAC;IAGxB,IAAI,EAAE,UAAU,GAAG,OAAO,gBAAgB,CAAC;IAG3C,IAAI,EAAE,OAAO,KAAK,CAAC;IAGnB,KAAK,EAAE;QACL,sCAAsC;QACtC,UAAU,EAAE,OAAO,MAAM,CAAC;QAC1B,4EAA4E;QAC5E,SAAS,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;KACnC,GAAG,OAAO,GAAG;QACV,KAAK,EAAE,OAAO,KAAK,CAAC;KACrB,CAAC;CACL"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alveole/theme",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.21",
|
|
4
4
|
"description": "Shared theme tokens and utilities.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@alveole/eslint-config": "file:../eslint-config",
|
|
15
15
|
"esbuild": "0.28.2",
|
|
16
|
-
"eslint": "10.
|
|
17
|
-
"react": "19.
|
|
18
|
-
"react-native": "0.
|
|
16
|
+
"eslint": "10.13.0",
|
|
17
|
+
"react": "19.3.0",
|
|
18
|
+
"react-native": "0.88.1"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"@tamagui/core": "
|
|
21
|
+
"@tamagui/core": "^3.0.0",
|
|
22
22
|
"expo-font": "*",
|
|
23
23
|
"expo-system-ui": "*",
|
|
24
24
|
"react": "*",
|