@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.
Files changed (56) hide show
  1. package/lib/index.d.ts +0 -1
  2. package/lib/index.js +2 -15
  3. package/lib/index.js.map +1 -1
  4. package/lib/sizes.d.ts +5 -5
  5. package/lib/sizes.js +4 -7
  6. package/lib/sizes.js.map +1 -1
  7. package/lib/theme.d.ts +1539 -65
  8. package/lib/theme.js +32 -35
  9. package/lib/theme.js.map +1 -1
  10. package/lib/themes/atb-theme/dark.d.ts +726 -0
  11. package/lib/themes/atb-theme/dark.js +726 -0
  12. package/lib/themes/atb-theme/dark.js.map +1 -0
  13. package/lib/themes/atb-theme/light.d.ts +726 -0
  14. package/lib/themes/atb-theme/light.js +726 -0
  15. package/lib/themes/atb-theme/light.js.map +1 -0
  16. package/lib/themes/atb-theme/theme.d.ts +1444 -107
  17. package/lib/themes/atb-theme/theme.js +10 -482
  18. package/lib/themes/atb-theme/theme.js.map +1 -1
  19. package/lib/themes/index.d.ts +0 -4
  20. package/lib/themes/index.js +5 -16
  21. package/lib/themes/index.js.map +1 -1
  22. package/lib/typography/android.js +51 -32
  23. package/lib/typography/android.js.map +1 -1
  24. package/lib/typography/index.js +19 -40
  25. package/lib/typography/index.js.map +1 -1
  26. package/lib/typography/ios.js +51 -32
  27. package/lib/typography/ios.js.map +1 -1
  28. package/lib/typography/types.js +1 -4
  29. package/lib/typography/types.js.map +1 -1
  30. package/lib/utils/override-config.js +4 -19
  31. package/lib/utils/override-config.js.map +1 -1
  32. package/package.json +12 -6
  33. package/lib/themes/atb-theme/theme.css +0 -803
  34. package/lib/themes/atb-theme/theme.module.css +0 -803
  35. package/lib/themes/fram-theme/theme.css +0 -803
  36. package/lib/themes/fram-theme/theme.d.ts +0 -215
  37. package/lib/themes/fram-theme/theme.js +0 -603
  38. package/lib/themes/fram-theme/theme.js.map +0 -1
  39. package/lib/themes/fram-theme/theme.module.css +0 -803
  40. package/lib/themes/innlandet-theme/theme.css +0 -803
  41. package/lib/themes/innlandet-theme/theme.d.ts +0 -113
  42. package/lib/themes/innlandet-theme/theme.js +0 -483
  43. package/lib/themes/innlandet-theme/theme.js.map +0 -1
  44. package/lib/themes/innlandet-theme/theme.module.css +0 -803
  45. package/lib/themes/nfk-theme/theme.css +0 -803
  46. package/lib/themes/nfk-theme/theme.d.ts +0 -185
  47. package/lib/themes/nfk-theme/theme.js +0 -576
  48. package/lib/themes/nfk-theme/theme.js.map +0 -1
  49. package/lib/themes/nfk-theme/theme.module.css +0 -803
  50. package/lib/themes/troms-theme/theme.css +0 -803
  51. package/lib/themes/troms-theme/theme.d.ts +0 -118
  52. package/lib/themes/troms-theme/theme.js +0 -488
  53. package/lib/themes/troms-theme/theme.js.map +0 -1
  54. package/lib/themes/troms-theme/theme.module.css +0 -803
  55. package/lib/typography.css +0 -260
  56. package/lib/typography.module.css +0 -260
package/lib/theme.js CHANGED
@@ -1,45 +1,44 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.createExtendedThemes = exports.createThemes = exports.createThemesFor = exports.ThemeVariant = exports.GeofencingZoneCodes = void 0;
7
- var ts_deepmerge_1 = __importDefault(require("ts-deepmerge"));
8
- var override_config_1 = require("./utils/override-config");
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["Allowed"] = "Allowed";
14
- GeofencingZoneCodes["Slow"] = "Slow";
15
- GeofencingZoneCodes["NoParking"] = "NoParking";
16
- GeofencingZoneCodes["NoEntry"] = "NoEntry";
17
- })(GeofencingZoneCodes = exports.GeofencingZoneCodes || (exports.GeofencingZoneCodes = {}));
18
- var ThemeVariant;
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 = exports.ThemeVariant || (exports.ThemeVariant = {}));
26
- function createThemesFor(themeVariant) {
25
+ })(ThemeVariant || (ThemeVariant = {}));
26
+ export function createThemesFor(themeVariant) {
27
27
  switch (themeVariant) {
28
28
  case ThemeVariant.AtB:
29
- return themes_1.AtBThemes;
30
- case ThemeVariant.Nfk:
31
- return themes_1.NfkThemes;
32
- case ThemeVariant.FRAM:
33
- return themes_1.FRAMThemes;
34
- case ThemeVariant.Troms:
35
- return themes_1.TromsThemes;
36
- case ThemeVariant.Innlandet:
37
- return themes_1.InnlandetThemes;
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 (0, override_config_1.overrideConfig)(themes, overrides);
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: (0, ts_deepmerge_1.default)(themes.light, extension.light),
93
- dark: (0, ts_deepmerge_1.default)(themes.dark, extension.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":";;;;;;AAAA,8DAAiC;AAEjC,2DAA8E;AAC9E,mCAMkB;AAkClB,+EAA+E;AAC/E,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,oCAAa,CAAA;IACb,8CAAuB,CAAA;IACvB,0CAAmB,CAAA;AACrB,CAAC,EALW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAK9B;AAsFD,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,6CAAG,CAAA;IACH,6CAAG,CAAA;IACH,+CAAI,CAAA;IACJ,iDAAK,CAAA;IACL,yDAAS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