@atb-as/theme 11.0.0-alpha.1 → 11.0.0-alpha.10

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 (49) hide show
  1. package/lib/index.js +18 -2
  2. package/lib/index.js.map +1 -1
  3. package/lib/theme.d.ts +177 -1517
  4. package/lib/theme.js +38 -19
  5. package/lib/theme.js.map +1 -1
  6. package/lib/themes/atb-theme/dark.d.ts +365 -672
  7. package/lib/themes/atb-theme/dark.js +361 -666
  8. package/lib/themes/atb-theme/dark.js.map +1 -1
  9. package/lib/themes/atb-theme/light.d.ts +365 -672
  10. package/lib/themes/atb-theme/light.js +361 -666
  11. package/lib/themes/atb-theme/light.js.map +1 -1
  12. package/lib/themes/atb-theme/theme.css +760 -0
  13. package/lib/themes/atb-theme/theme.d.ts +730 -1344
  14. package/lib/themes/atb-theme/theme.js +11 -6
  15. package/lib/themes/atb-theme/theme.js.map +1 -1
  16. package/lib/themes/atb-theme/theme.module.css +760 -0
  17. package/lib/themes/index.js +8 -1
  18. package/lib/themes/index.js.map +1 -1
  19. package/lib/themes-fs/atb-theme/dark.d.ts +722 -0
  20. package/lib/themes-fs/atb-theme/dark.js +724 -0
  21. package/lib/themes-fs/atb-theme/dark.js.map +1 -0
  22. package/lib/themes-fs/atb-theme/light.d.ts +722 -0
  23. package/lib/themes-fs/atb-theme/light.js +724 -0
  24. package/lib/themes-fs/atb-theme/light.js.map +1 -0
  25. package/lib/themes-fs/atb-theme/theme.d.ts +1442 -0
  26. package/lib/themes-fs/atb-theme/theme.js +16 -0
  27. package/lib/themes-fs/atb-theme/theme.js.map +1 -0
  28. package/lib/themes-fs/index.d.ts +1 -0
  29. package/lib/themes-fs/index.js +13 -0
  30. package/lib/themes-fs/index.js.map +1 -0
  31. package/lib/typography/android.js +32 -51
  32. package/lib/typography/android.js.map +1 -1
  33. package/lib/typography/index.d.ts +3 -3
  34. package/lib/typography/index.js +44 -19
  35. package/lib/typography/index.js.map +1 -1
  36. package/lib/typography/ios.js +32 -51
  37. package/lib/typography/ios.js.map +1 -1
  38. package/lib/typography/types.d.ts +5 -5
  39. package/lib/typography/types.js +4 -1
  40. package/lib/typography/types.js.map +1 -1
  41. package/lib/typography.css +260 -0
  42. package/lib/typography.module.css +260 -0
  43. package/lib/utils/override-config.d.ts +1 -1
  44. package/lib/utils/override-config.js +18 -4
  45. package/lib/utils/override-config.js.map +1 -1
  46. package/package.json +17 -11
  47. package/lib/sizes.d.ts +0 -23
  48. package/lib/sizes.js +0 -23
  49. package/lib/sizes.js.map +0 -1
package/lib/theme.js CHANGED
@@ -1,32 +1,51 @@
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';
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.ThemeVariant = exports.GeofencingZoneCodes = void 0;
7
+ exports.createThemesFor = createThemesFor;
8
+ exports.createThemes = createThemes;
9
+ exports.createExtendedThemes = createExtendedThemes;
10
+ var ts_deepmerge_1 = __importDefault(require("ts-deepmerge"));
11
+ var override_config_1 = require("./utils/override-config");
12
+ var themes_1 = require("./themes");
13
+ var themes_fs_1 = require("./themes-fs");
9
14
  // The colors can be changed, but should follow standard practice as commented:
10
- export var GeofencingZoneCodes;
15
+ var GeofencingZoneCodes;
11
16
  (function (GeofencingZoneCodes) {
12
17
  GeofencingZoneCodes["allowed"] = "Allowed";
13
18
  GeofencingZoneCodes["slow"] = "Slow";
14
19
  GeofencingZoneCodes["noParking"] = "NoParking";
15
20
  GeofencingZoneCodes["noEntry"] = "NoEntry";
16
- })(GeofencingZoneCodes || (GeofencingZoneCodes = {}));
21
+ })(GeofencingZoneCodes || (exports.GeofencingZoneCodes = GeofencingZoneCodes = {}));
17
22
  ;
18
- export var ThemeVariant;
23
+ var ThemeVariant;
19
24
  (function (ThemeVariant) {
20
25
  ThemeVariant[ThemeVariant["AtB"] = 0] = "AtB";
21
26
  ThemeVariant[ThemeVariant["Nfk"] = 1] = "Nfk";
22
27
  ThemeVariant[ThemeVariant["FRAM"] = 2] = "FRAM";
23
28
  ThemeVariant[ThemeVariant["Troms"] = 3] = "Troms";
24
29
  ThemeVariant[ThemeVariant["Innlandet"] = 4] = "Innlandet";
25
- })(ThemeVariant || (ThemeVariant = {}));
26
- export function createThemesFor(themeVariant) {
30
+ })(ThemeVariant || (exports.ThemeVariant = ThemeVariant = {}));
31
+ /**
32
+ * Get a theme object for a specific organization in the desired format.
33
+ *
34
+ * @param themeVariant Organization
35
+ * @param themeOptions Set if the new Figma structure should be used
36
+ * @returns Theme object
37
+ */
38
+ function createThemesFor(themeVariant, themeOptions) {
39
+ if (themeOptions === void 0) { themeOptions = { useFigmaStructure: false }; }
27
40
  switch (themeVariant) {
28
41
  case ThemeVariant.AtB:
29
- return AtBThemes;
42
+ if (themeOptions === null || themeOptions === void 0 ? void 0 : themeOptions.useFigmaStructure) {
43
+ return themes_fs_1.AtBThemesFs;
44
+ }
45
+ else {
46
+ return themes_1.AtBThemes;
47
+ ;
48
+ }
30
49
  // case ThemeVariant.Nfk:
31
50
  // return NfkThemes;
32
51
  // case ThemeVariant.FRAM:
@@ -59,10 +78,10 @@ export function createThemesFor(themeVariant) {
59
78
  * @param overrides - Properties to override base themes with, on `Theme` level
60
79
  * @returns themes
61
80
  */
62
- export function createThemes(themes, overrides) {
81
+ function createThemes(themes, overrides) {
63
82
  if (!overrides)
64
83
  return themes;
65
- return overrideConfig(themes, overrides);
84
+ return (0, override_config_1.overrideConfig)(themes, overrides);
66
85
  }
67
86
  /**
68
87
  * Use Theme as base and extend with new properties. Properties
@@ -85,10 +104,10 @@ export function createThemes(themes, overrides) {
85
104
  * @param extension - Object to extend original theme. Can be nested with same keys
86
105
  * @returns new deep merged intersection themes
87
106
  */
88
- export function createExtendedThemes(themes, extension) {
107
+ function createExtendedThemes(themes, extension) {
89
108
  return {
90
- light: merge(themes.light, extension.light),
91
- dark: merge(themes.dark, extension.dark),
109
+ light: (0, ts_deepmerge_1.default)(themes.light, extension.light),
110
+ dark: (0, ts_deepmerge_1.default)(themes.dark, extension.dark),
92
111
  };
93
112
  }
94
113
  //# 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,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;IAC7B,0CAAmB,CAAA;IACnB,oCAAa,CAAA;IACb,8CAAuB,CAAA;IACvB,0CAAmB,CAAA;AACrB,CAAC,EALW,mBAAmB,KAAnB,mBAAmB,QAK9B;AAmHA,CAAC;AAIF,MAAM,CAAN,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,6CAAG,CAAA;IACH,6CAAG,CAAA;IACH,+CAAI,CAAA;IACJ,iDAAK,CAAA;IACL,yDAAS,CAAA;AACX,CAAC,EANW,YAAY,KAAZ,YAAY,QAMvB;AAED,MAAM,UAAU,eAAe,CAAC,YAA0B;IACxD,QAAQ,YAAY,EAAE;QACpB,KAAK,YAAY,CAAC,GAAG;YACnB,OAAO,SAAS,CAAC;QACnB,yBAAyB;QACzB,sBAAsB;QACtB,0BAA0B;QAC1B,uBAAuB;QACvB,2BAA2B;QAC3B,wBAAwB;QACxB,+BAA+B;QAC/B,4BAA4B;QAC5B;YACE,MAAM,KAAK,CAAC,uCAAuC,CAAC,CAAC;KACxD;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