@atb-as/theme 11.0.0-alpha.8 → 11.0.0-alpha.9
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/lib/theme.d.ts +17 -16
- package/lib/theme.js.map +1 -1
- package/lib/typography/index.d.ts +3 -3
- package/lib/typography/index.js.map +1 -1
- package/lib/typography/types.d.ts +5 -5
- package/lib/utils/override-config.d.ts +1 -1
- package/lib/utils/override-config.js.map +1 -1
- package/package.json +11 -9
package/lib/theme.d.ts
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { ConfigurationOverride } from './utils/override-config';
|
|
2
|
-
export
|
|
2
|
+
export type Themes<T = Theme> = {
|
|
3
3
|
light: T;
|
|
4
4
|
dark: T;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
6
|
+
export type Mode = keyof Themes;
|
|
7
|
+
export type TextColor = 'primary' | 'secondary' | 'disabled';
|
|
8
|
+
export type TextColorType = 'dark' | 'light';
|
|
9
|
+
export type RadiusSizes = keyof Theme['border']['radius'];
|
|
10
|
+
export type ContrastColor = {
|
|
10
11
|
background: string;
|
|
11
12
|
text: string;
|
|
12
13
|
};
|
|
13
|
-
export
|
|
14
|
+
export type TransportColor<T = ContrastColor> = {
|
|
14
15
|
primary: T;
|
|
15
16
|
secondary: T;
|
|
16
17
|
};
|
|
17
|
-
export
|
|
18
|
+
export type StatusColor<T = ContrastColor> = {
|
|
18
19
|
primary: T;
|
|
19
20
|
secondary: T;
|
|
20
21
|
};
|
|
21
|
-
export
|
|
22
|
+
export type InteractiveColor<T = ContrastColor> = {
|
|
22
23
|
default: T;
|
|
23
24
|
hover: T;
|
|
24
25
|
active: T;
|
|
@@ -26,19 +27,19 @@ export declare type InteractiveColor<T = ContrastColor> = {
|
|
|
26
27
|
outline: T;
|
|
27
28
|
};
|
|
28
29
|
export declare enum GeofencingZoneCodes {
|
|
29
|
-
allowed = "Allowed"
|
|
30
|
-
slow = "Slow"
|
|
31
|
-
noParking = "NoParking"
|
|
30
|
+
allowed = "Allowed",// blue
|
|
31
|
+
slow = "Slow",// yellow
|
|
32
|
+
noParking = "NoParking",// red
|
|
32
33
|
noEntry = "NoEntry"
|
|
33
34
|
}
|
|
34
|
-
export
|
|
35
|
-
export
|
|
35
|
+
export type GeofencingZoneKeys = keyof typeof GeofencingZoneCodes;
|
|
36
|
+
export type GeofencingZoneStyle<T = ContrastColor> = {
|
|
36
37
|
color: T;
|
|
37
38
|
fillOpacity: number;
|
|
38
39
|
strokeOpacity: number;
|
|
39
40
|
layerIndexWeight: number;
|
|
40
41
|
};
|
|
41
|
-
export
|
|
42
|
+
export type GeofencingZoneStyles<T = ContrastColor> = {
|
|
42
43
|
[GZKey in GeofencingZoneKeys]: GeofencingZoneStyle<T>;
|
|
43
44
|
};
|
|
44
45
|
export interface Theme {
|
|
@@ -121,7 +122,7 @@ export interface Theme {
|
|
|
121
122
|
};
|
|
122
123
|
geofencingZones: GeofencingZoneStyles;
|
|
123
124
|
}
|
|
124
|
-
export
|
|
125
|
+
export type ContrastColorFs = {
|
|
125
126
|
background: string;
|
|
126
127
|
foreground: {
|
|
127
128
|
primary: string;
|
|
@@ -230,7 +231,7 @@ export interface ThemeFs {
|
|
|
230
231
|
};
|
|
231
232
|
};
|
|
232
233
|
}
|
|
233
|
-
export
|
|
234
|
+
export type Statuses = keyof Theme['status'];
|
|
234
235
|
export declare enum ThemeVariant {
|
|
235
236
|
AtB = 0,
|
|
236
237
|
Nfk = 1,
|
package/lib/theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,cAAc,CAAC;AACjC,OAAO,EAAwB,cAAc,EAAC,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EACL,SAAS;AACT,aAAa;AACb,cAAc;AACd,eAAe;AAC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uB;QACvB,2BAA2B;QAC3B,wBAAwB;QACxB,+BAA+B;QAC/B,4BAA4B;QAC5B;YACE,MAAM,KAAK,CAAC,uCAAuC,CAAC,CAAC;IACzD,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,YAAY,CAC1B,MAAc,EACd,SAAyC;IAEzC,IAAI,CAAC,SAAS;QAAE,OAAO,MAAM,CAAC;IAC9B,OAAO,cAAc,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,oBAAoB,CAClC,MAAiB,EACjB,SAAgC;IAKhC,OAAO;QACL,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC,KAAK,CAA2B;QACrE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,CAA0B;KAClE,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TextTypeStyles } from '.';
|
|
2
2
|
import { ConfigurationOverride } from '../utils/override-config';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type _MappedPlatforms = 'ios' | 'android';
|
|
4
|
+
type PlatformTypes = _MappedPlatforms | 'web';
|
|
5
5
|
export * from './types';
|
|
6
6
|
export declare const textTypeStyles: {
|
|
7
7
|
android: TextTypeStyles;
|
|
@@ -60,4 +60,4 @@ export declare function createTextTypeStyles(type: PlatformTypes, overrides?: Co
|
|
|
60
60
|
* @param extension - Object to extend original text type style. Can be nested with same keys as style
|
|
61
61
|
* @returns new deep merged intersection
|
|
62
62
|
*/
|
|
63
|
-
export declare function extendTextTypeStyles<T>(type: PlatformTypes, extension: T): ((k: TextTypeStyles) => void) | (T extends any ? (k: T) => void : never) extends (k: infer I) => void ? I : never;
|
|
63
|
+
export declare function extendTextTypeStyles<T extends {}>(type: PlatformTypes, extension: T): ((k: TextTypeStyles) => void) | (T extends any ? (k: T) => void : never) extends (k: infer I) => void ? I : never;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/typography/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,cAAc,CAAC;AAEjC,OAAO,EAAwB,cAAc,EAAC,MAAM,0BAA0B,CAAC;AAE/E,OAAO,EAAC,qBAAqB,EAAE,eAAe,EAAC,MAAM,WAAW,CAAC;AACjE,OAAO,EAAC,iBAAiB,EAAE,WAAW,EAAC,MAAM,OAAO,CAAC;AAIrD,MAAM,OAAO,GAAG,CAAC,CAAgB,EAAoB,EAAE,CACrD,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAElC,cAAc,SAAS,CAAC;AAExB,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,OAAO,EAAE,qBAAqB;IAC9B,GAAG,EAAE,iBAAiB;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,OAAO,EAAE,eAAe;IACxB,GAAG,EAAE,WAAW;CACjB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,IAAmB;IAC7C,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AAC9B,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,oBAAoB,CAClC,IAAmB,EACnB,SAAiD;IAEjD,IAAI,CAAC,SAAS;QAAE,OAAO,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACrD,OAAO,cAAc,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;AAClE,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/typography/index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body__primary", "body__primary--strike", "body__primary--bold", "body__primary--underline", "body__primary--big", "body__primary--big--bold", "body__primary--jumbo", "body__primary--jumbo--bold", "body__secondary", "body__secondary--bold", "body__tertiary", "body__tertiary--bold", "body__tertiary--uppercase", "body__tertiary--strike", "heading__title", "heading__component", "heading__paragraph", "heading--medium", "heading--big", "heading--jumbo", "label__uppercase"];
|
|
2
|
-
export
|
|
2
|
+
export type FontMetadata = {
|
|
3
3
|
url?: string;
|
|
4
4
|
fontFamily: string;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type FontBook = {
|
|
7
7
|
main: FontMetadata;
|
|
8
8
|
[fontName: string]: FontMetadata;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
11
|
-
export
|
|
10
|
+
export type TextNames = (typeof textNames)[number];
|
|
11
|
+
export type TextStyle = {
|
|
12
12
|
fontSize: number;
|
|
13
13
|
letterSpacing: number;
|
|
14
14
|
lineHeight: number;
|
|
@@ -16,6 +16,6 @@ export declare type TextStyle = {
|
|
|
16
16
|
fontWeight?: 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
17
17
|
textTransform?: 'uppercase' | 'lowercase' | 'capitalize' | 'none';
|
|
18
18
|
};
|
|
19
|
-
export
|
|
19
|
+
export type TextTypeStyles = {
|
|
20
20
|
[key in TextNames]: TextStyle;
|
|
21
21
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
interface Configuration {
|
|
2
2
|
[key: string]: any;
|
|
3
3
|
}
|
|
4
|
-
export
|
|
4
|
+
export type ConfigurationOverride<T> = {
|
|
5
5
|
[P in keyof T]?: ConfigurationOverride<T[P]>;
|
|
6
6
|
};
|
|
7
7
|
export declare function overrideConfig<T extends Configuration>(base: T, overrides: ConfigurationOverride<T>): T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"override-config.js","sourceRoot":"","sources":["../../src/utils/override-config.ts"],"names":[],"mappings":"AAOA,MAAM,U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,KAAK,iBAAiB,CAAC;IACnE,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atb-as/theme",
|
|
3
|
-
"version": "11.0.0-alpha.
|
|
3
|
+
"version": "11.0.0-alpha.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "AtB Design System Colors",
|
|
6
6
|
"license": "EUPL-1.2",
|
|
7
7
|
"type": "module",
|
|
8
|
-
"main": "lib/index.js",
|
|
9
|
-
"
|
|
8
|
+
"main": "./lib/index.js",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": "./lib/index.js"
|
|
11
|
+
},
|
|
12
|
+
"types": "./lib/index.d.ts",
|
|
10
13
|
"files": [
|
|
11
14
|
"lib"
|
|
12
15
|
],
|
|
@@ -15,7 +18,7 @@
|
|
|
15
18
|
"tsc": "tsc",
|
|
16
19
|
"clean": "rm -rf lib",
|
|
17
20
|
"test": "echo \"Error: run tests from root\" && exit 1",
|
|
18
|
-
"build": "
|
|
21
|
+
"build": "tsc -p tsconfig.build.json && yarn create-css && yarn copy-css",
|
|
19
22
|
"copy-css": "copyfiles -u 1 \"src/**/*.{css,woff,woff2,ttf,eot,svg,png}\" lib/",
|
|
20
23
|
"create-css": "tsx ./tools/create-css.ts",
|
|
21
24
|
"fetch-variables": "tsx ./tools/fetch-figma-variables.ts"
|
|
@@ -26,16 +29,15 @@
|
|
|
26
29
|
"copyfiles": "^2.4.1",
|
|
27
30
|
"style-dictionary": "^4.0.0",
|
|
28
31
|
"tsx": "^4.16.2",
|
|
29
|
-
"typescript": "^
|
|
32
|
+
"typescript": "^5.1.6"
|
|
30
33
|
},
|
|
31
34
|
"dependencies": {
|
|
32
|
-
"@tfk-samf/figma-to-dtcg": "0.3.
|
|
35
|
+
"@tfk-samf/figma-to-dtcg": "0.3.8",
|
|
33
36
|
"hex-to-rgba": "^2.0.1",
|
|
34
|
-
"ts-deepmerge": "^4.0.0"
|
|
35
|
-
"typescript": "^4.4.3"
|
|
37
|
+
"ts-deepmerge": "^4.0.0"
|
|
36
38
|
},
|
|
37
39
|
"publishConfig": {
|
|
38
40
|
"access": "public"
|
|
39
41
|
},
|
|
40
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "e306152c5f22b5c85b992b12e456e3f47a21d2e0"
|
|
41
43
|
}
|