@alveole/theme 0.6.0 → 0.9.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/constants/Grille.d.ts +17 -0
- package/dist/constants/Grille.d.ts.map +1 -0
- package/dist/constants/Grille.js +14 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +1 -0
- package/dist/helpers/useThemeBuilder.d.ts.map +1 -1
- package/dist/helpers/useThemeBuilder.js +3 -1
- package/dist/type/Theme.d.ts +2 -1
- package/dist/type/Theme.d.ts.map +1 -1
- package/package.json +7 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const Grilles: {
|
|
2
|
+
/** @experimental */
|
|
3
|
+
readonly '2 colonnes': 180;
|
|
4
|
+
/** @experimental */
|
|
5
|
+
readonly '3 colonnes': 282;
|
|
6
|
+
/** @experimental */
|
|
7
|
+
readonly '4 colonnes': 384;
|
|
8
|
+
/** @experimental */
|
|
9
|
+
readonly '6 colonnes': 588;
|
|
10
|
+
/** @experimental */
|
|
11
|
+
readonly '7 colonnes': 792;
|
|
12
|
+
/** @experimental */
|
|
13
|
+
readonly '9 colonnes': 894;
|
|
14
|
+
};
|
|
15
|
+
export type GrilleKey = keyof typeof Grilles;
|
|
16
|
+
export type GrilleValue = (typeof Grilles)[GrilleKey];
|
|
17
|
+
//# sourceMappingURL=Grille.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Grille.d.ts","sourceRoot":"","sources":["../../src/constants/Grille.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;IAClB,oBAAoB;;IAEpB,oBAAoB;;IAEpB,oBAAoB;;IAEpB,oBAAoB;;IAEpB,oBAAoB;;IAEpB,oBAAoB;;CAEZ,CAAC;AAGX,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,OAAO,CAAC;AAC7C,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const Grilles = {
|
|
2
|
+
/** @experimental */
|
|
3
|
+
'2 colonnes': 180,
|
|
4
|
+
/** @experimental */
|
|
5
|
+
'3 colonnes': 282,
|
|
6
|
+
/** @experimental */
|
|
7
|
+
'4 colonnes': 384,
|
|
8
|
+
/** @experimental */
|
|
9
|
+
'6 colonnes': 588,
|
|
10
|
+
/** @experimental */
|
|
11
|
+
'7 colonnes': 792,
|
|
12
|
+
/** @experimental */
|
|
13
|
+
'9 colonnes': 894,
|
|
14
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,WAAW,CAAC"}
|
package/dist/constants/index.js
CHANGED
|
@@ -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,EAKX,OAAO,EAGR,MAAM,cAAc,CAAC;AAMtB,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CAC9B,CAAC;AAEF,wBAAgB,eAAe,CAAC,MAAM,EAAE,aAAa,GAAG,KAAK,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CA+CnF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFonts } from 'expo-font';
|
|
2
2
|
import { useCallback, useMemo } from 'react';
|
|
3
3
|
import { useWindowDimensions } from 'react-native';
|
|
4
|
-
import { breakpointToVariant, Colors, CustomPalette, CustomTypography, Fonts, FontsMap, Heights, Sizes, Spacings, } from '../constants';
|
|
4
|
+
import { breakpointToVariant, Colors, CustomPalette, CustomTypography, Fonts, FontsMap, Grilles, Heights, Sizes, Spacings, } from '../constants';
|
|
5
5
|
import { RadiusList } from '../constants/Radius';
|
|
6
6
|
import { alpha } from './alphaColor';
|
|
7
7
|
import { deepMerge } from './deepMerge';
|
|
@@ -17,6 +17,8 @@ export function useThemeBuilder(params) {
|
|
|
17
17
|
spacing: key => Spacings[key],
|
|
18
18
|
// Radius
|
|
19
19
|
radius: key => RadiusList[key],
|
|
20
|
+
// Grilles
|
|
21
|
+
grilles: Grilles,
|
|
20
22
|
// Breakpoints
|
|
21
23
|
variant,
|
|
22
24
|
isVariant: useCallback(match => variant === match, [variant]),
|
package/dist/type/Theme.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Colors, CustomPalette, CustomTypography, Fonts, Spacing, SpacingKey, Variant } from '../constants';
|
|
1
|
+
import type { Colors, CustomPalette, CustomTypography, Fonts, Grilles, Spacing, SpacingKey, Variant } from '../constants';
|
|
2
2
|
import { Radius, RadiusKey } from '../constants/Radius';
|
|
3
3
|
import { alpha } from '../helpers/alphaColor';
|
|
4
4
|
import { elevationStyle } from '../helpers/elevationStyle';
|
|
@@ -9,6 +9,7 @@ export interface Theme {
|
|
|
9
9
|
isVariant: (variant: Variant) => boolean;
|
|
10
10
|
shadows: typeof elevationStyle;
|
|
11
11
|
radius: (key: RadiusKey) => Radius;
|
|
12
|
+
grilles: typeof Grilles;
|
|
12
13
|
text: Typography & typeof CustomTypography;
|
|
13
14
|
font: typeof Fonts;
|
|
14
15
|
color: {
|
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,EAAE,MAAM,EAAE,aAAa,EAAE,gBAAgB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Theme.d.ts","sourceRoot":"","sources":["../../src/type/Theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,gBAAgB,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC1H,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,OAAO,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,OAAO,CAAC;IAGtC,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,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;KAC3B,GAAG,OAAO,aAAa,GAAG;QACvB,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": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Shared theme tokens and utilities.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,7 +11,12 @@
|
|
|
11
11
|
],
|
|
12
12
|
"sideEffects": false,
|
|
13
13
|
"scripts": {
|
|
14
|
-
"build": "tsc -p tsconfig.build.json && rm -rf assets && cp -R src/assets assets"
|
|
14
|
+
"build": "tsc -p tsconfig.build.json && rm -rf assets && cp -R src/assets assets",
|
|
15
|
+
"lint": "eslint ."
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@alveole/eslint-config": "file:../eslint-config",
|
|
19
|
+
"eslint": "^9.39.2"
|
|
15
20
|
},
|
|
16
21
|
"peerDependencies": {
|
|
17
22
|
"@tamagui/core": "*",
|