@atb-as/theme 3.1.0 → 5.0.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/README.md +20 -19
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/lib/theme.css +1 -1
- package/lib/theme.d.ts +15 -12
- package/lib/theme.js +24 -141
- package/lib/theme.js.map +1 -1
- package/lib/theme.module.css +1 -1
- package/lib/themes/atb-theme/colors.d.ts +76 -0
- package/lib/themes/atb-theme/colors.js +84 -0
- package/lib/themes/atb-theme/colors.js.map +1 -0
- package/lib/themes/atb-theme/theme.css +332 -0
- package/lib/themes/atb-theme/theme.d.ts +79 -0
- package/lib/themes/atb-theme/theme.js +215 -0
- package/lib/themes/atb-theme/theme.js.map +1 -0
- package/lib/themes/atb-theme/theme.module.css +332 -0
- package/lib/themes/index.d.ts +2 -0
- package/lib/themes/index.js +11 -0
- package/lib/themes/index.js.map +1 -0
- package/lib/themes/nfk-theme/colors.d.ts +76 -0
- package/lib/themes/nfk-theme/colors.js +84 -0
- package/lib/themes/nfk-theme/colors.js.map +1 -0
- package/lib/themes/nfk-theme/theme.css +332 -0
- package/lib/themes/nfk-theme/theme.d.ts +3 -0
- package/lib/themes/nfk-theme/theme.js +142 -0
- package/lib/themes/nfk-theme/theme.js.map +1 -0
- package/lib/themes/nfk-theme/theme.module.css +332 -0
- package/lib/typography/index.js +2 -2
- package/lib/typography/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -11,16 +11,10 @@ yarn add @atb-as/theme
|
|
|
11
11
|
|
|
12
12
|
Import through `ts`/`js`:
|
|
13
13
|
|
|
14
|
-
```ts
|
|
15
|
-
import {colors} from '@atb-as/theme';
|
|
16
|
-
|
|
17
|
-
console.log(colors.primary.gray_100); //=> #F5F5F6
|
|
18
|
-
console.log(colors.text.dark); //=> #000000
|
|
19
|
-
```
|
|
20
14
|
|
|
21
15
|
```ts
|
|
22
|
-
import {
|
|
23
|
-
|
|
16
|
+
import {createThemesFor,ThemeVariant} from '@atb-as/theme';
|
|
17
|
+
const themes = createThemesFor(ThemeVariant.AtB)
|
|
24
18
|
console.log(themes.light.colors.background_0);
|
|
25
19
|
```
|
|
26
20
|
|
|
@@ -33,28 +27,28 @@ Or you could import CSS files or as CSS Modules. The actual content is currently
|
|
|
33
27
|
```ts
|
|
34
28
|
// When using imports from bundlers
|
|
35
29
|
|
|
36
|
-
// With CSS Modules
|
|
37
|
-
import * as classNamesTheme from '@atb-as/theme/lib/theme.module.css';
|
|
30
|
+
// With CSS Modules for atb-theme
|
|
31
|
+
import * as classNamesTheme from '@atb-as/theme/lib/themes/atb-theme/theme.module.css';
|
|
38
32
|
import * as classNamesTypo from '@atb-as/theme/lib/typography.module.css';
|
|
39
33
|
|
|
40
34
|
|
|
41
|
-
// Without CSS Modules
|
|
42
|
-
import '@atb-as/theme/lib/theme.css';
|
|
35
|
+
// Without CSS Modules for atb-theme
|
|
36
|
+
import '@atb-as/theme/lib/themes/atb-theme/theme.css';
|
|
43
37
|
import '@atb-as/theme/lib/typography.css';
|
|
44
38
|
```
|
|
45
39
|
|
|
46
40
|
```css
|
|
47
41
|
/* Using css/postcss/bundlers */
|
|
48
|
-
@import '@atb-as/theme/lib/theme.module.css';
|
|
42
|
+
@import '@atb-as/theme/lib/themes/atb-theme/theme.module.css';
|
|
49
43
|
@import '@atb-as/theme/lib/typography.module.css';
|
|
50
44
|
|
|
51
45
|
/* or without modules */
|
|
52
|
-
@import '@atb-as/theme/lib/theme.css';
|
|
46
|
+
@import '@atb-as/theme/lib/themes/atb-theme/theme.css';
|
|
53
47
|
@import '@atb-as/theme/lib/typography.css';
|
|
54
48
|
|
|
55
49
|
|
|
56
50
|
/* And potentially */
|
|
57
|
-
@value myClassname from "@atb-as/theme/lib/theme.css";
|
|
51
|
+
@value myClassname from "@atb-as/theme/lib/themes/atb-theme/theme.css";
|
|
58
52
|
```
|
|
59
53
|
|
|
60
54
|
_(note: This all depends on how you setup bundlers and consumes styles.)_
|
|
@@ -109,12 +103,15 @@ With regular CSS.
|
|
|
109
103
|
|
|
110
104
|
### Theme API
|
|
111
105
|
|
|
112
|
-
#### `createThemes(overrides?: ConfigurationOverride<Theme>): Themes`
|
|
106
|
+
#### `createThemes(themes: Themes,overrides?: ConfigurationOverride<Theme>): Themes`
|
|
113
107
|
|
|
114
108
|
Create new themes (light/dark) with optinally overriden defaults
|
|
115
109
|
|
|
116
110
|
```ts
|
|
117
|
-
const
|
|
111
|
+
const themesVariant = createThemesFor(ThemeVariant.AtB)
|
|
112
|
+
const themes = createThemes(
|
|
113
|
+
themesVariant,
|
|
114
|
+
{
|
|
118
115
|
light: {
|
|
119
116
|
spacings: {
|
|
120
117
|
medium: 20,
|
|
@@ -126,7 +123,7 @@ themes.dark.spacings.medium;
|
|
|
126
123
|
```
|
|
127
124
|
|
|
128
125
|
|
|
129
|
-
#### `createExtendedThemes<T>(extension: T)`
|
|
126
|
+
#### `createExtendedThemes<T>(themes: Themes,extension: T)`
|
|
130
127
|
|
|
131
128
|
Use Theme as base and extend with new properties. Properties can be nested and will be deep merged.
|
|
132
129
|
|
|
@@ -134,7 +131,11 @@ Use Theme as base and extend with new properties. Properties can be nested and w
|
|
|
134
131
|
type FooExtension = {
|
|
135
132
|
statusBarStyle: 'dark' | 'light';
|
|
136
133
|
}
|
|
137
|
-
const
|
|
134
|
+
const themesVariant = createThemesFor(ThemeVariant.AtB)
|
|
135
|
+
|
|
136
|
+
const _themes = createExtendedThemes<FooExtension>(
|
|
137
|
+
themesVariant,
|
|
138
|
+
{
|
|
138
139
|
light: {statusBarStyle: 'dark'},
|
|
139
140
|
dark: {statusBarStyle: 'light'}
|
|
140
141
|
});
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -10,7 +10,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./colors"), exports);
|
|
14
13
|
__exportStar(require("./sizes"), exports);
|
|
15
14
|
__exportStar(require("./theme"), exports);
|
|
16
15
|
__exportStar(require("./typography"), exports);
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAAwB;AACxB,0CAAwB;AACxB,+CAA6B"}
|
package/lib/theme.css
CHANGED
package/lib/theme.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare type Themes = {
|
|
|
6
6
|
};
|
|
7
7
|
export declare type Mode = keyof Themes;
|
|
8
8
|
export declare type TextColor = 'primary' | 'secondary' | 'disabled';
|
|
9
|
-
declare type TextColorType = 'dark' | 'light';
|
|
9
|
+
export declare type TextColorType = 'dark' | 'light';
|
|
10
10
|
export declare type ContrastColor = {
|
|
11
11
|
backgroundColor: string;
|
|
12
12
|
color: string;
|
|
@@ -14,7 +14,6 @@ export declare type ContrastColor = {
|
|
|
14
14
|
};
|
|
15
15
|
declare type StatusColor = {
|
|
16
16
|
main: ContrastColor;
|
|
17
|
-
bg: ContrastColor;
|
|
18
17
|
};
|
|
19
18
|
export interface Theme {
|
|
20
19
|
spacings: typeof spacings;
|
|
@@ -23,7 +22,7 @@ export interface Theme {
|
|
|
23
22
|
background_1: ContrastColor;
|
|
24
23
|
background_2: ContrastColor;
|
|
25
24
|
background_3: ContrastColor;
|
|
26
|
-
|
|
25
|
+
background_accent: ContrastColor;
|
|
27
26
|
primary_1: ContrastColor;
|
|
28
27
|
primary_2: ContrastColor;
|
|
29
28
|
primary_3: ContrastColor;
|
|
@@ -40,6 +39,9 @@ export interface Theme {
|
|
|
40
39
|
transport_plane: ContrastColor;
|
|
41
40
|
transport_other: ContrastColor;
|
|
42
41
|
};
|
|
42
|
+
content: {
|
|
43
|
+
subtle_primary: ContrastColor;
|
|
44
|
+
};
|
|
43
45
|
status: {
|
|
44
46
|
valid: StatusColor;
|
|
45
47
|
info: StatusColor;
|
|
@@ -47,7 +49,9 @@ export interface Theme {
|
|
|
47
49
|
error: StatusColor;
|
|
48
50
|
};
|
|
49
51
|
text: {
|
|
50
|
-
colors:
|
|
52
|
+
colors: {
|
|
53
|
+
[key in TextColor]: string;
|
|
54
|
+
};
|
|
51
55
|
};
|
|
52
56
|
border: {
|
|
53
57
|
primary: string;
|
|
@@ -61,12 +65,11 @@ export interface Theme {
|
|
|
61
65
|
};
|
|
62
66
|
}
|
|
63
67
|
export declare type Statuses = keyof Theme['status'];
|
|
64
|
-
export declare
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
export declare const themes: Themes;
|
|
68
|
+
export declare enum ThemeVariant {
|
|
69
|
+
AtB = 0,
|
|
70
|
+
Nfk = 1
|
|
71
|
+
}
|
|
72
|
+
export declare function createThemesFor(themeVariant: ThemeVariant): Themes;
|
|
70
73
|
/**
|
|
71
74
|
* Create new themes (light/dark) with optinally overriden defaults.
|
|
72
75
|
*
|
|
@@ -87,7 +90,7 @@ export declare const themes: Themes;
|
|
|
87
90
|
* @param overrides - Properties to override base themes with, on `Theme` level
|
|
88
91
|
* @returns themes
|
|
89
92
|
*/
|
|
90
|
-
export declare function createThemes(overrides?: ConfigurationOverride<Themes>): Themes;
|
|
93
|
+
export declare function createThemes(themes: Themes, overrides?: ConfigurationOverride<Themes>): Themes;
|
|
91
94
|
/**
|
|
92
95
|
* Use Theme as base and extend with new properties. Properties
|
|
93
96
|
* can be nested and will be deep merged.
|
|
@@ -109,7 +112,7 @@ export declare function createThemes(overrides?: ConfigurationOverride<Themes>):
|
|
|
109
112
|
* @param extension - Object to extend original theme. Can be nested with same keys
|
|
110
113
|
* @returns new deep merged intersection themes
|
|
111
114
|
*/
|
|
112
|
-
export declare function createExtendedThemes<T>(extension: {
|
|
115
|
+
export declare function createExtendedThemes<T>(themes: Themes, extension: {
|
|
113
116
|
light: T;
|
|
114
117
|
dark: T;
|
|
115
118
|
}): {
|
package/lib/theme.js
CHANGED
|
@@ -3,143 +3,26 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.createExtendedThemes = exports.createThemes = exports.
|
|
7
|
-
var hex_to_rgba_1 = __importDefault(require("hex-to-rgba"));
|
|
6
|
+
exports.createExtendedThemes = exports.createThemes = exports.createThemesFor = exports.ThemeVariant = void 0;
|
|
8
7
|
var ts_deepmerge_1 = __importDefault(require("ts-deepmerge"));
|
|
9
|
-
var colors_1 = require("./colors");
|
|
10
|
-
var sizes_1 = require("./sizes");
|
|
11
8
|
var override_config_1 = require("./utils/override-config");
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
exports.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
exports.themes = {
|
|
30
|
-
light: {
|
|
31
|
-
spacings: sizes_1.spacings,
|
|
32
|
-
colors: {
|
|
33
|
-
background_0: contrastColor(colors_1.backgrounds.light.level0, 'dark'),
|
|
34
|
-
background_1: contrastColor(colors_1.backgrounds.light.level1, 'dark'),
|
|
35
|
-
background_2: contrastColor(colors_1.backgrounds.light.level2, 'dark'),
|
|
36
|
-
background_3: contrastColor(colors_1.backgrounds.light.level3, 'dark'),
|
|
37
|
-
background_gray: contrastColor(colors_1.colors.primary.gray_500, 'light'),
|
|
38
|
-
primary_1: contrastColor(colors_1.colors.primary.green_500, 'dark'),
|
|
39
|
-
primary_2: contrastColor(colors_1.colors.secondary.blue_500, 'light'),
|
|
40
|
-
primary_3: contrastColor(colors_1.colors.secondary.cyan_500, 'dark'),
|
|
41
|
-
primary_destructive: contrastColor(colors_1.colors.secondary.red_500, 'light'),
|
|
42
|
-
secondary_1: contrastColor(colors_1.colors.primary.gray_500, 'light'),
|
|
43
|
-
secondary_2: contrastColor(colors_1.colors.primary.gray_200, 'dark'),
|
|
44
|
-
secondary_3: contrastColor(colors_1.colors.primary.gray_400, 'light'),
|
|
45
|
-
secondary_4: contrastColor(colors_1.colors.primary.gray_50, 'dark'),
|
|
46
|
-
transport_city: contrastColor(colors_1.colors.primary.green_600),
|
|
47
|
-
transport_region: contrastColor(colors_1.colors.secondary.blue_500),
|
|
48
|
-
transport_boat: contrastColor(colors_1.colors.secondary.cyan_700),
|
|
49
|
-
transport_train: contrastColor(colors_1.colors.secondary.red_500),
|
|
50
|
-
transport_airport: contrastColor(colors_1.colors.other.ekspressen_600),
|
|
51
|
-
transport_plane: contrastColor(colors_1.colors.other.orange_500),
|
|
52
|
-
transport_other: contrastColor(colors_1.colors.primary.gray_400),
|
|
53
|
-
},
|
|
54
|
-
status: {
|
|
55
|
-
valid: {
|
|
56
|
-
main: contrastColor(colors_1.colors.primary.green_500, 'dark'),
|
|
57
|
-
bg: contrastColor(hex_to_rgba_1.default(colors_1.colors.primary.green_500, 0.25), 'dark'),
|
|
58
|
-
},
|
|
59
|
-
info: {
|
|
60
|
-
main: contrastColor(colors_1.colors.secondary.cyan_500, 'dark'),
|
|
61
|
-
bg: contrastColor(hex_to_rgba_1.default(colors_1.colors.secondary.cyan_500, 0.25), 'dark'),
|
|
62
|
-
},
|
|
63
|
-
warning: {
|
|
64
|
-
main: contrastColor(colors_1.colors.secondary.yellow_500, 'dark'),
|
|
65
|
-
bg: contrastColor(hex_to_rgba_1.default(colors_1.colors.secondary.yellow_500, 0.25), 'dark'),
|
|
66
|
-
},
|
|
67
|
-
error: {
|
|
68
|
-
main: contrastColor(colors_1.colors.secondary.red_500, 'light'),
|
|
69
|
-
bg: contrastColor(hex_to_rgba_1.default(colors_1.colors.secondary.red_500, 0.25), 'dark'),
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
text: {
|
|
73
|
-
colors: exports.defaultTextColors['dark'],
|
|
74
|
-
},
|
|
75
|
-
border: {
|
|
76
|
-
primary: colors_1.colors.primary.gray_50,
|
|
77
|
-
secondary: colors_1.colors.text.dark,
|
|
78
|
-
focus: colors_1.colors.secondary.blue_500,
|
|
79
|
-
radius: sizes_1.borderRadius,
|
|
80
|
-
width: sizes_1.borderWidth,
|
|
81
|
-
},
|
|
82
|
-
icon: {
|
|
83
|
-
size: sizes_1.iconSizes,
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
dark: {
|
|
87
|
-
spacings: sizes_1.spacings,
|
|
88
|
-
colors: {
|
|
89
|
-
background_0: contrastColor(colors_1.backgrounds.dark.level0, 'light'),
|
|
90
|
-
background_1: contrastColor(colors_1.backgrounds.dark.level1, 'light'),
|
|
91
|
-
background_2: contrastColor(colors_1.backgrounds.dark.level2, 'light'),
|
|
92
|
-
background_3: contrastColor(colors_1.backgrounds.dark.level3, 'light'),
|
|
93
|
-
background_gray: contrastColor(colors_1.colors.primary.gray_500, 'light'),
|
|
94
|
-
primary_1: contrastColor(colors_1.colors.primary.green_500, 'dark'),
|
|
95
|
-
primary_2: contrastColor(colors_1.colors.secondary.blue_500, 'light'),
|
|
96
|
-
primary_3: contrastColor(colors_1.colors.secondary.cyan_500, 'dark'),
|
|
97
|
-
primary_destructive: contrastColor(colors_1.colors.secondary.red_500, 'light'),
|
|
98
|
-
secondary_1: contrastColor(colors_1.colors.primary.gray_50, 'dark'),
|
|
99
|
-
secondary_2: contrastColor(colors_1.colors.primary.gray_500, 'light'),
|
|
100
|
-
secondary_3: contrastColor(colors_1.colors.secondary.blue_600, 'light'),
|
|
101
|
-
secondary_4: contrastColor(colors_1.colors.primary.gray_600, 'light'),
|
|
102
|
-
transport_city: contrastColor(colors_1.colors.primary.green_500),
|
|
103
|
-
transport_region: contrastColor(colors_1.colors.secondary.blue_500),
|
|
104
|
-
transport_boat: contrastColor(colors_1.colors.secondary.cyan_300),
|
|
105
|
-
transport_train: contrastColor(colors_1.colors.secondary.red_400),
|
|
106
|
-
transport_airport: contrastColor(colors_1.colors.other.ekspressen_500),
|
|
107
|
-
transport_plane: contrastColor(colors_1.colors.other.orange_500),
|
|
108
|
-
transport_other: contrastColor(colors_1.colors.primary.gray_300),
|
|
109
|
-
},
|
|
110
|
-
status: {
|
|
111
|
-
valid: {
|
|
112
|
-
main: contrastColor(colors_1.colors.primary.green_500, 'dark'),
|
|
113
|
-
bg: contrastColor(hex_to_rgba_1.default(colors_1.colors.primary.green_500, 0.25), 'light'),
|
|
114
|
-
},
|
|
115
|
-
info: {
|
|
116
|
-
main: contrastColor(colors_1.colors.secondary.cyan_500, 'dark'),
|
|
117
|
-
bg: contrastColor(hex_to_rgba_1.default(colors_1.colors.secondary.cyan_500, 0.25), 'light'),
|
|
118
|
-
},
|
|
119
|
-
warning: {
|
|
120
|
-
main: contrastColor(colors_1.colors.secondary.yellow_500, 'dark'),
|
|
121
|
-
bg: contrastColor(hex_to_rgba_1.default(colors_1.colors.secondary.yellow_500, 0.25), 'dark'),
|
|
122
|
-
},
|
|
123
|
-
error: {
|
|
124
|
-
main: contrastColor(colors_1.colors.secondary.red_500, 'light'),
|
|
125
|
-
bg: contrastColor(hex_to_rgba_1.default(colors_1.colors.secondary.red_500, 0.25), 'dark'),
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
text: {
|
|
129
|
-
colors: exports.defaultTextColors['light'],
|
|
130
|
-
},
|
|
131
|
-
border: {
|
|
132
|
-
primary: colors_1.colors.primary.gray_600,
|
|
133
|
-
secondary: colors_1.colors.text.light,
|
|
134
|
-
focus: colors_1.colors.secondary.cyan_500,
|
|
135
|
-
radius: sizes_1.borderRadius,
|
|
136
|
-
width: sizes_1.borderWidth,
|
|
137
|
-
},
|
|
138
|
-
icon: {
|
|
139
|
-
size: sizes_1.iconSizes,
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
};
|
|
9
|
+
var themes_1 = require("./themes");
|
|
10
|
+
var ThemeVariant;
|
|
11
|
+
(function (ThemeVariant) {
|
|
12
|
+
ThemeVariant[ThemeVariant["AtB"] = 0] = "AtB";
|
|
13
|
+
ThemeVariant[ThemeVariant["Nfk"] = 1] = "Nfk";
|
|
14
|
+
})(ThemeVariant = exports.ThemeVariant || (exports.ThemeVariant = {}));
|
|
15
|
+
function createThemesFor(themeVariant) {
|
|
16
|
+
switch (themeVariant) {
|
|
17
|
+
case ThemeVariant.AtB:
|
|
18
|
+
return themes_1.AtBThemes;
|
|
19
|
+
case ThemeVariant.Nfk:
|
|
20
|
+
return themes_1.NfkThemes;
|
|
21
|
+
default:
|
|
22
|
+
throw Error('A valid ThemeVariant must be provided');
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.createThemesFor = createThemesFor;
|
|
143
26
|
/**
|
|
144
27
|
* Create new themes (light/dark) with optinally overriden defaults.
|
|
145
28
|
*
|
|
@@ -160,10 +43,10 @@ exports.themes = {
|
|
|
160
43
|
* @param overrides - Properties to override base themes with, on `Theme` level
|
|
161
44
|
* @returns themes
|
|
162
45
|
*/
|
|
163
|
-
function createThemes(overrides) {
|
|
46
|
+
function createThemes(themes, overrides) {
|
|
164
47
|
if (!overrides)
|
|
165
|
-
return
|
|
166
|
-
return override_config_1.overrideConfig(
|
|
48
|
+
return themes;
|
|
49
|
+
return (0, override_config_1.overrideConfig)(themes, overrides);
|
|
167
50
|
}
|
|
168
51
|
exports.createThemes = createThemes;
|
|
169
52
|
/**
|
|
@@ -187,10 +70,10 @@ exports.createThemes = createThemes;
|
|
|
187
70
|
* @param extension - Object to extend original theme. Can be nested with same keys
|
|
188
71
|
* @returns new deep merged intersection themes
|
|
189
72
|
*/
|
|
190
|
-
function createExtendedThemes(extension) {
|
|
73
|
+
function createExtendedThemes(themes, extension) {
|
|
191
74
|
return {
|
|
192
|
-
light: ts_deepmerge_1.default(
|
|
193
|
-
dark: ts_deepmerge_1.default(
|
|
75
|
+
light: (0, ts_deepmerge_1.default)(themes.light, extension.light),
|
|
76
|
+
dark: (0, ts_deepmerge_1.default)(themes.dark, extension.dark),
|
|
194
77
|
};
|
|
195
78
|
}
|
|
196
79
|
exports.createExtendedThemes = createExtendedThemes;
|
package/lib/theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AAEjC,2DAA8E;AAC9E,mCAA8C;AA4E9C,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,6CAAG,CAAA;IACH,6CAAG,CAAA;AACL,CAAC,EAHW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAGvB;AAED,SAAgB,eAAe,CAAC,YAA0B;IACxD,QAAQ,YAAY,EAAE;QACpB,KAAK,YAAY,CAAC,GAAG;YACnB,OAAO,kBAAS,CAAC;QACnB,KAAK,YAAY,CAAC,GAAG;YACnB,OAAO,kBAAS,CAAC;QACnB;YACE,MAAM,KAAK,CAAC,uCAAuC,CAAC,CAAC;KACxD;AACH,CAAC;AATD,0CASC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,YAAY,CAC1B,MAAc,EACd,SAAyC;IAEzC,IAAI,CAAC,SAAS;QAAE,OAAO,MAAM,CAAC;IAC9B,OAAO,IAAA,gCAAc,EAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAC3C,CAAC;AAND,oCAMC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,SAAgB,oBAAoB,CAClC,MAAc,EACd,SAA8B;IAE9B,OAAO;QACL,KAAK,EAAE,IAAA,sBAAK,EAAC,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC;QAC3C,IAAI,EAAE,IAAA,sBAAK,EAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC;KACzC,CAAC;AACJ,CAAC;AARD,oDAQC"}
|
package/lib/theme.module.css
CHANGED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export declare const backgrounds: {
|
|
2
|
+
light: {
|
|
3
|
+
level0: string;
|
|
4
|
+
level1: string;
|
|
5
|
+
level2: string;
|
|
6
|
+
level3: string;
|
|
7
|
+
};
|
|
8
|
+
dark: {
|
|
9
|
+
level0: string;
|
|
10
|
+
level1: string;
|
|
11
|
+
level2: string;
|
|
12
|
+
level3: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export declare const colors: {
|
|
16
|
+
white: string;
|
|
17
|
+
black: string;
|
|
18
|
+
primary: {
|
|
19
|
+
gray_50: string;
|
|
20
|
+
gray_100: string;
|
|
21
|
+
gray_200: string;
|
|
22
|
+
gray_300: string;
|
|
23
|
+
gray_400: string;
|
|
24
|
+
gray_500: string;
|
|
25
|
+
gray_600: string;
|
|
26
|
+
gray_700: string;
|
|
27
|
+
gray_800: string;
|
|
28
|
+
gray_900: string;
|
|
29
|
+
gray_950: string;
|
|
30
|
+
green_100: string;
|
|
31
|
+
green_200: string;
|
|
32
|
+
green_300: string;
|
|
33
|
+
green_400: string;
|
|
34
|
+
green_500: string;
|
|
35
|
+
green_600: string;
|
|
36
|
+
green_700: string;
|
|
37
|
+
green_800: string;
|
|
38
|
+
green_900: string;
|
|
39
|
+
};
|
|
40
|
+
secondary: {
|
|
41
|
+
cyan_100: string;
|
|
42
|
+
cyan_200: string;
|
|
43
|
+
cyan_300: string;
|
|
44
|
+
cyan_400: string;
|
|
45
|
+
cyan_500: string;
|
|
46
|
+
cyan_600: string;
|
|
47
|
+
cyan_700: string;
|
|
48
|
+
cyan_800: string;
|
|
49
|
+
cyan_900: string;
|
|
50
|
+
blue_100: string;
|
|
51
|
+
blue_200: string;
|
|
52
|
+
blue_300: string;
|
|
53
|
+
blue_400: string;
|
|
54
|
+
blue_500: string;
|
|
55
|
+
blue_600: string;
|
|
56
|
+
blue_700: string;
|
|
57
|
+
blue_800: string;
|
|
58
|
+
blue_900: string;
|
|
59
|
+
brown: string;
|
|
60
|
+
orange: string;
|
|
61
|
+
yellow_100: string;
|
|
62
|
+
yellow_500: string;
|
|
63
|
+
red_100: string;
|
|
64
|
+
red_400: string;
|
|
65
|
+
red_500: string;
|
|
66
|
+
};
|
|
67
|
+
text: {
|
|
68
|
+
light: string;
|
|
69
|
+
dark: string;
|
|
70
|
+
};
|
|
71
|
+
other: {
|
|
72
|
+
orange_500: string;
|
|
73
|
+
ekspressen_500: string;
|
|
74
|
+
ekspressen_600: string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.colors = exports.backgrounds = void 0;
|
|
4
|
+
exports.backgrounds = {
|
|
5
|
+
light: {
|
|
6
|
+
level0: '#FFFFFF',
|
|
7
|
+
level1: '#E7E8E9',
|
|
8
|
+
level2: '#DBDDDE',
|
|
9
|
+
level3: '#CFD2D3',
|
|
10
|
+
},
|
|
11
|
+
dark: {
|
|
12
|
+
level0: '#000000',
|
|
13
|
+
level1: '#242B30',
|
|
14
|
+
level2: '#37424A',
|
|
15
|
+
level3: '#555E65',
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
exports.colors = {
|
|
19
|
+
white: '#ffffff',
|
|
20
|
+
black: '#000000',
|
|
21
|
+
primary: {
|
|
22
|
+
// grays
|
|
23
|
+
gray_50: '#E7E8E9',
|
|
24
|
+
gray_100: '#F5F5F6',
|
|
25
|
+
gray_200: '#AFB3B7',
|
|
26
|
+
gray_300: '#878E92',
|
|
27
|
+
gray_400: '#5F686E',
|
|
28
|
+
gray_500: '#37424A',
|
|
29
|
+
gray_600: '#2C353B',
|
|
30
|
+
gray_700: '#21282C',
|
|
31
|
+
gray_800: '#161A1E',
|
|
32
|
+
gray_900: '#101416',
|
|
33
|
+
gray_950: '#1B1C1D',
|
|
34
|
+
// greens
|
|
35
|
+
green_100: '#E3E6B3',
|
|
36
|
+
green_200: '#DADE99',
|
|
37
|
+
green_300: '#C7CE66',
|
|
38
|
+
green_400: '#B5BD33',
|
|
39
|
+
green_500: '#A2AD00',
|
|
40
|
+
green_600: '#828A00',
|
|
41
|
+
green_700: '#616800',
|
|
42
|
+
green_800: '#414500',
|
|
43
|
+
green_900: '#313400',
|
|
44
|
+
},
|
|
45
|
+
secondary: {
|
|
46
|
+
// cyan
|
|
47
|
+
cyan_100: '#D4F3F6',
|
|
48
|
+
cyan_200: '#C6EFF3',
|
|
49
|
+
cyan_300: '#AAE6EC',
|
|
50
|
+
cyan_400: '#8DDEE6',
|
|
51
|
+
cyan_500: '#71D6E0',
|
|
52
|
+
cyan_600: '#5AABB3',
|
|
53
|
+
cyan_700: '#448086',
|
|
54
|
+
cyan_800: '#2D565A',
|
|
55
|
+
cyan_900: '#224043',
|
|
56
|
+
// i got the blues
|
|
57
|
+
blue_100: '#B3D8DE',
|
|
58
|
+
blue_200: '#99CBD3',
|
|
59
|
+
blue_300: '#66B0BE',
|
|
60
|
+
blue_400: '#3396A8',
|
|
61
|
+
blue_500: '#007C92',
|
|
62
|
+
blue_600: '#006375',
|
|
63
|
+
blue_700: '#004A58',
|
|
64
|
+
blue_800: '#00323A',
|
|
65
|
+
blue_900: '#00252C',
|
|
66
|
+
brown: '#584528',
|
|
67
|
+
orange: '#C75B12',
|
|
68
|
+
yellow_100: '#F7F3B2',
|
|
69
|
+
yellow_500: '#E4D700',
|
|
70
|
+
red_100: '#E4B8C6',
|
|
71
|
+
red_400: '#B74166',
|
|
72
|
+
red_500: '#A51140',
|
|
73
|
+
},
|
|
74
|
+
text: {
|
|
75
|
+
light: '#FFFFFF',
|
|
76
|
+
dark: '#000000',
|
|
77
|
+
},
|
|
78
|
+
other: {
|
|
79
|
+
orange_500: '#BE5604',
|
|
80
|
+
ekspressen_500: '#ED6C05',
|
|
81
|
+
ekspressen_600: '#C75B12',
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
//# sourceMappingURL=colors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../../../src/themes/atb-theme/colors.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;IACzB,KAAK,EAAE;QACL,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,SAAS;KAClB;IACD,IAAI,EAAE;QACJ,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,SAAS;KAClB;CACF,CAAC;AAEW,QAAA,MAAM,GAAG;IACpB,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;IAChB,OAAO,EAAE;QACP,QAAQ;QACR,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,SAAS;QACT,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,SAAS;KACrB;IACD,SAAS,EAAE;QACT,OAAO;QACP,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,kBAAkB;QAClB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QAEnB,KAAK,EAAE,SAAS;QAEhB,MAAM,EAAE,SAAS;QAEjB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,SAAS;QAErB,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,SAAS;KACnB;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;KAChB;IACD,KAAK,EAAE;QACL,UAAU,EAAE,SAAS;QACrB,cAAc,EAAE,SAAS;QACzB,cAAc,EAAE,SAAS;KAC1B;CACF,CAAC"}
|