@atb-as/theme 10.4.0 → 11.0.0-alpha.1
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/index.d.ts +0 -1
- package/lib/index.js +2 -15
- package/lib/index.js.map +1 -1
- package/lib/sizes.d.ts +5 -5
- package/lib/sizes.js +4 -7
- package/lib/sizes.js.map +1 -1
- package/lib/theme.d.ts +1539 -65
- package/lib/theme.js +32 -35
- package/lib/theme.js.map +1 -1
- package/lib/themes/atb-theme/dark.d.ts +726 -0
- package/lib/themes/atb-theme/dark.js +726 -0
- package/lib/themes/atb-theme/dark.js.map +1 -0
- package/lib/themes/atb-theme/light.d.ts +726 -0
- package/lib/themes/atb-theme/light.js +726 -0
- package/lib/themes/atb-theme/light.js.map +1 -0
- package/lib/themes/atb-theme/theme.d.ts +1444 -107
- package/lib/themes/atb-theme/theme.js +10 -482
- package/lib/themes/atb-theme/theme.js.map +1 -1
- package/lib/themes/index.d.ts +0 -4
- package/lib/themes/index.js +5 -16
- package/lib/themes/index.js.map +1 -1
- package/lib/typography/android.js +51 -32
- package/lib/typography/android.js.map +1 -1
- package/lib/typography/index.js +19 -40
- package/lib/typography/index.js.map +1 -1
- package/lib/typography/ios.js +51 -32
- package/lib/typography/ios.js.map +1 -1
- package/lib/typography/types.js +1 -4
- package/lib/typography/types.js.map +1 -1
- package/lib/utils/override-config.js +4 -19
- package/lib/utils/override-config.js.map +1 -1
- package/package.json +12 -6
- package/lib/themes/atb-theme/theme.css +0 -803
- package/lib/themes/atb-theme/theme.module.css +0 -803
- package/lib/themes/fram-theme/theme.css +0 -803
- package/lib/themes/fram-theme/theme.d.ts +0 -215
- package/lib/themes/fram-theme/theme.js +0 -603
- package/lib/themes/fram-theme/theme.js.map +0 -1
- package/lib/themes/fram-theme/theme.module.css +0 -803
- package/lib/themes/innlandet-theme/theme.css +0 -803
- package/lib/themes/innlandet-theme/theme.d.ts +0 -113
- package/lib/themes/innlandet-theme/theme.js +0 -483
- package/lib/themes/innlandet-theme/theme.js.map +0 -1
- package/lib/themes/innlandet-theme/theme.module.css +0 -803
- package/lib/themes/nfk-theme/theme.css +0 -803
- package/lib/themes/nfk-theme/theme.d.ts +0 -185
- package/lib/themes/nfk-theme/theme.js +0 -576
- package/lib/themes/nfk-theme/theme.js.map +0 -1
- package/lib/themes/nfk-theme/theme.module.css +0 -803
- package/lib/themes/troms-theme/theme.css +0 -803
- package/lib/themes/troms-theme/theme.d.ts +0 -118
- package/lib/themes/troms-theme/theme.js +0 -488
- package/lib/themes/troms-theme/theme.js.map +0 -1
- package/lib/themes/troms-theme/theme.module.css +0 -803
- package/lib/typography.css +0 -260
- package/lib/typography.module.css +0 -260
package/lib/theme.js
CHANGED
|
@@ -1,45 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var themes_1 = require("./themes");
|
|
1
|
+
import merge from 'ts-deepmerge';
|
|
2
|
+
import { overrideConfig } from './utils/override-config';
|
|
3
|
+
import { AtBThemes,
|
|
4
|
+
// NfkThemes,
|
|
5
|
+
// FRAMThemes,
|
|
6
|
+
// TromsThemes,
|
|
7
|
+
// InnlandetThemes,
|
|
8
|
+
} from './themes';
|
|
10
9
|
// The colors can be changed, but should follow standard practice as commented:
|
|
11
|
-
var GeofencingZoneCodes;
|
|
10
|
+
export var GeofencingZoneCodes;
|
|
12
11
|
(function (GeofencingZoneCodes) {
|
|
13
|
-
GeofencingZoneCodes["
|
|
14
|
-
GeofencingZoneCodes["
|
|
15
|
-
GeofencingZoneCodes["
|
|
16
|
-
GeofencingZoneCodes["
|
|
17
|
-
})(GeofencingZoneCodes
|
|
18
|
-
|
|
12
|
+
GeofencingZoneCodes["allowed"] = "Allowed";
|
|
13
|
+
GeofencingZoneCodes["slow"] = "Slow";
|
|
14
|
+
GeofencingZoneCodes["noParking"] = "NoParking";
|
|
15
|
+
GeofencingZoneCodes["noEntry"] = "NoEntry";
|
|
16
|
+
})(GeofencingZoneCodes || (GeofencingZoneCodes = {}));
|
|
17
|
+
;
|
|
18
|
+
export var ThemeVariant;
|
|
19
19
|
(function (ThemeVariant) {
|
|
20
20
|
ThemeVariant[ThemeVariant["AtB"] = 0] = "AtB";
|
|
21
21
|
ThemeVariant[ThemeVariant["Nfk"] = 1] = "Nfk";
|
|
22
22
|
ThemeVariant[ThemeVariant["FRAM"] = 2] = "FRAM";
|
|
23
23
|
ThemeVariant[ThemeVariant["Troms"] = 3] = "Troms";
|
|
24
24
|
ThemeVariant[ThemeVariant["Innlandet"] = 4] = "Innlandet";
|
|
25
|
-
})(ThemeVariant
|
|
26
|
-
function createThemesFor(themeVariant) {
|
|
25
|
+
})(ThemeVariant || (ThemeVariant = {}));
|
|
26
|
+
export function createThemesFor(themeVariant) {
|
|
27
27
|
switch (themeVariant) {
|
|
28
28
|
case ThemeVariant.AtB:
|
|
29
|
-
return
|
|
30
|
-
case ThemeVariant.Nfk:
|
|
31
|
-
|
|
32
|
-
case ThemeVariant.FRAM:
|
|
33
|
-
|
|
34
|
-
case ThemeVariant.Troms:
|
|
35
|
-
|
|
36
|
-
case ThemeVariant.Innlandet:
|
|
37
|
-
|
|
29
|
+
return AtBThemes;
|
|
30
|
+
// case ThemeVariant.Nfk:
|
|
31
|
+
// return NfkThemes;
|
|
32
|
+
// case ThemeVariant.FRAM:
|
|
33
|
+
// return FRAMThemes;
|
|
34
|
+
// case ThemeVariant.Troms:
|
|
35
|
+
// return TromsThemes;
|
|
36
|
+
// case ThemeVariant.Innlandet:
|
|
37
|
+
// return InnlandetThemes;
|
|
38
38
|
default:
|
|
39
39
|
throw Error('A valid ThemeVariant must be provided');
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
exports.createThemesFor = createThemesFor;
|
|
43
42
|
/**
|
|
44
43
|
* Create new themes (light/dark) with optinally overriden defaults.
|
|
45
44
|
*
|
|
@@ -60,12 +59,11 @@ exports.createThemesFor = createThemesFor;
|
|
|
60
59
|
* @param overrides - Properties to override base themes with, on `Theme` level
|
|
61
60
|
* @returns themes
|
|
62
61
|
*/
|
|
63
|
-
function createThemes(themes, overrides) {
|
|
62
|
+
export function createThemes(themes, overrides) {
|
|
64
63
|
if (!overrides)
|
|
65
64
|
return themes;
|
|
66
|
-
return
|
|
65
|
+
return overrideConfig(themes, overrides);
|
|
67
66
|
}
|
|
68
|
-
exports.createThemes = createThemes;
|
|
69
67
|
/**
|
|
70
68
|
* Use Theme as base and extend with new properties. Properties
|
|
71
69
|
* can be nested and will be deep merged.
|
|
@@ -87,11 +85,10 @@ exports.createThemes = createThemes;
|
|
|
87
85
|
* @param extension - Object to extend original theme. Can be nested with same keys
|
|
88
86
|
* @returns new deep merged intersection themes
|
|
89
87
|
*/
|
|
90
|
-
function createExtendedThemes(themes, extension) {
|
|
88
|
+
export function createExtendedThemes(themes, extension) {
|
|
91
89
|
return {
|
|
92
|
-
light: (
|
|
93
|
-
dark: (
|
|
90
|
+
light: merge(themes.light, extension.light),
|
|
91
|
+
dark: merge(themes.dark, extension.dark),
|
|
94
92
|
};
|
|
95
93
|
}
|
|
96
|
-
exports.createExtendedThemes = createExtendedThemes;
|
|
97
94
|
//# sourceMappingURL=theme.js.map
|
package/lib/theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,cAAc,CAAC;AACjC,OAAO,EAAyB,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EACL,SAAS;AACT,aAAa;AACb,cAAc;AACd,eAAe;AACf,mBAAmB;EACpB,MAAM,UAAU,CAAC;AAuClB,+EAA+E;AAC/E,MAAM,CAAN,IAAY,mBAKX;AALD,WAAY,mBAAmB;IA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