@filip.mazev/blocks-core 1.0.28 → 1.0.31
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/fesm2022/filip.mazev-blocks-core.mjs +44 -30
- package/fesm2022/filip.mazev-blocks-core.mjs.map +1 -1
- package/package.json +3 -2
- package/src/lib/styles/_index.scss +1 -1
- package/src/lib/styles/_palettes.scss +24 -24
- package/src/lib/styles/_theme-engine.scss +249 -0
- package/src/lib/styles/_utilities.scss +8 -0
- package/src/lib/styles/themes/_green-theme.scss +3 -98
- package/src/lib/styles/themes/_high-contrast-theme.scss +121 -96
- package/src/lib/styles/themes/_orange-theme.scss +3 -98
- package/src/lib/styles/themes/_purple-theme.scss +3 -98
- package/src/lib/styles/themes/_red-theme.scss +3 -98
- package/types/filip.mazev-blocks-core.d.ts +3 -2
- package/src/lib/styles/_theme-provider.scss +0 -37
|
@@ -1,99 +1,4 @@
|
|
|
1
|
-
@use '../
|
|
1
|
+
@use '../theme-engine' as *;
|
|
2
2
|
|
|
3
|
-
$orange-light-theme: (
|
|
4
|
-
|
|
5
|
-
'bg-surface': #ffffff,
|
|
6
|
-
'bg-surface-alt': get-color-from-palette('orange', 50),
|
|
7
|
-
'bg-element': get-color-from-palette('neutral', 100),
|
|
8
|
-
'bg-element-hover': get-color-from-palette('orange', 200),
|
|
9
|
-
|
|
10
|
-
'primary': get-color-from-palette('orange', 500),
|
|
11
|
-
'primary-hover': get-color-from-palette('orange', 600),
|
|
12
|
-
'primary-active': get-color-from-palette('orange', 700),
|
|
13
|
-
'primary-subtle': rgba(get-color-from-palette('orange', 300), 0.6),
|
|
14
|
-
'on-primary': get-color-from-palette('neutral', 100),
|
|
15
|
-
|
|
16
|
-
'text-heading': get-color-from-palette('neutral', 900),
|
|
17
|
-
'text-primary': get-color-from-palette('neutral', 700),
|
|
18
|
-
'text-secondary': get-color-from-palette('neutral', 500),
|
|
19
|
-
'text-brand': get-color-from-palette('orange', 700),
|
|
20
|
-
'text-inverse': get-color-from-palette('neutral', 100),
|
|
21
|
-
|
|
22
|
-
'border-subtle': get-color-from-palette('neutral', 200),
|
|
23
|
-
'border-default': get-color-from-palette('neutral', 300),
|
|
24
|
-
'border-strong': get-color-from-palette('neutral', 400),
|
|
25
|
-
'border-brand': get-color-from-palette('orange', 400),
|
|
26
|
-
|
|
27
|
-
'info-bg': get-color-from-palette('information', 100),
|
|
28
|
-
'info-bg-subtle': rgba(get-color-from-palette('information', 50), 0.95),
|
|
29
|
-
'info-border': get-color-from-palette('information', 200),
|
|
30
|
-
'info-text': get-color-from-palette('information', 700),
|
|
31
|
-
|
|
32
|
-
'success-bg': get-color-from-palette('success', 100),
|
|
33
|
-
'success-bg-subtle': rgba(get-color-from-palette('success', 50), 0.95),
|
|
34
|
-
'success-border': get-color-from-palette('success', 200),
|
|
35
|
-
'success-text': get-color-from-palette('success', 700),
|
|
36
|
-
|
|
37
|
-
'warn-bg': get-color-from-palette('warn', 100),
|
|
38
|
-
'warn-bg-subtle': rgba(get-color-from-palette('warn', 50), 0.95),
|
|
39
|
-
'warn-border': get-color-from-palette('warn', 200),
|
|
40
|
-
'warn-text': get-color-from-palette('warn', 700),
|
|
41
|
-
|
|
42
|
-
'error-bg': get-color-from-palette('error', 100),
|
|
43
|
-
'error-bg-subtle': rgba(get-color-from-palette('error', 50), 0.95),
|
|
44
|
-
'error-border': get-color-from-palette('error', 200),
|
|
45
|
-
'error-text': get-color-from-palette('error', 700),
|
|
46
|
-
|
|
47
|
-
'scroll-bg': get-color-from-palette('orange', 100),
|
|
48
|
-
'scroll-thumb': linear-gradient(278deg, get-color-from-palette('orange', 300) -10.44%, get-color-from-palette('orange', 400) 100%),
|
|
49
|
-
'scroll-thumb-hover': linear-gradient(278deg, get-color-from-palette('orange', 400) -10.44%, get-color-from-palette('orange', 700) 100%),
|
|
50
|
-
) !default;
|
|
51
|
-
|
|
52
|
-
$orange-dark-theme: (
|
|
53
|
-
'bg-canvas': #000000,
|
|
54
|
-
'bg-surface': get-color-from-palette('neutral', 1000),
|
|
55
|
-
'bg-surface-alt': get-color-from-palette('neutral', 900),
|
|
56
|
-
'bg-element': get-color-from-palette('neutral', 800),
|
|
57
|
-
'bg-element-hover': get-color-from-palette('orange', 700),
|
|
58
|
-
|
|
59
|
-
'primary': get-color-from-palette('orange', 500),
|
|
60
|
-
'primary-hover': get-color-from-palette('orange', 400),
|
|
61
|
-
'primary-active': get-color-from-palette('orange', 300),
|
|
62
|
-
'primary-subtle': rgba(get-color-from-palette('orange', 700), 0.6),
|
|
63
|
-
'on-primary': #ffffff,
|
|
64
|
-
|
|
65
|
-
'text-heading': #ffffff,
|
|
66
|
-
'text-primary': get-color-from-palette('neutral', 200),
|
|
67
|
-
'text-secondary': get-color-from-palette('neutral', 400),
|
|
68
|
-
'text-brand': get-color-from-palette('orange', 300),
|
|
69
|
-
'text-inverse': get-color-from-palette('neutral', 900),
|
|
70
|
-
|
|
71
|
-
'border-subtle': get-color-from-palette('neutral', 900),
|
|
72
|
-
'border-default': get-color-from-palette('neutral', 800),
|
|
73
|
-
'border-strong': get-color-from-palette('neutral', 700),
|
|
74
|
-
'border-brand': get-color-from-palette('orange', 600),
|
|
75
|
-
|
|
76
|
-
'info-bg': get-color-from-palette('information', 900),
|
|
77
|
-
'info-bg-subtle': rgba(get-color-from-palette('information', 1000), 0.95),
|
|
78
|
-
'info-border': get-color-from-palette('information', 900),
|
|
79
|
-
'info-text': get-color-from-palette('information', 400),
|
|
80
|
-
|
|
81
|
-
'success-bg': get-color-from-palette('success', 900),
|
|
82
|
-
'success-bg-subtle': rgba(get-color-from-palette('success', 1000), 0.95),
|
|
83
|
-
'success-border': get-color-from-palette('success', 900),
|
|
84
|
-
'success-text': get-color-from-palette('success', 400),
|
|
85
|
-
|
|
86
|
-
'warn-bg': get-color-from-palette('warn', 900),
|
|
87
|
-
'warn-bg-subtle': rgba(get-color-from-palette('warn', 1000), 0.95),
|
|
88
|
-
'warn-border': get-color-from-palette('warn', 900),
|
|
89
|
-
'warn-text': get-color-from-palette('warn', 400),
|
|
90
|
-
|
|
91
|
-
'error-bg': get-color-from-palette('error', 900),
|
|
92
|
-
'error-bg-subtle': rgba(get-color-from-palette('error', 1000), 0.95),
|
|
93
|
-
'error-border': get-color-from-palette('error', 900),
|
|
94
|
-
'error-text': get-color-from-palette('error', 400),
|
|
95
|
-
|
|
96
|
-
'scroll-bg': get-color-from-palette('orange', 900),
|
|
97
|
-
'scroll-thumb': linear-gradient(278deg, get-color-from-palette('orange', 700) -10.44%, get-color-from-palette('orange', 500) 100%),
|
|
98
|
-
'scroll-thumb-hover': linear-gradient(278deg, get-color-from-palette('orange', 500) -10.44%, get-color-from-palette('orange', 400) 100%),
|
|
99
|
-
) !default;
|
|
3
|
+
$orange-light-theme: make-light-theme('orange');
|
|
4
|
+
$orange-dark-theme: make-dark-theme('orange');
|
|
@@ -1,99 +1,4 @@
|
|
|
1
|
-
@use '../
|
|
1
|
+
@use '../theme-engine' as *;
|
|
2
2
|
|
|
3
|
-
$purple-light-theme: (
|
|
4
|
-
|
|
5
|
-
'bg-surface': #ffffff,
|
|
6
|
-
'bg-surface-alt': get-color-from-palette('purple', 50),
|
|
7
|
-
'bg-element': get-color-from-palette('neutral', 100),
|
|
8
|
-
'bg-element-hover': get-color-from-palette('purple', 200),
|
|
9
|
-
|
|
10
|
-
'primary': get-color-from-palette('purple', 500),
|
|
11
|
-
'primary-hover': get-color-from-palette('purple', 600),
|
|
12
|
-
'primary-active': get-color-from-palette('purple', 700),
|
|
13
|
-
'primary-subtle': rgba(get-color-from-palette('purple', 300), 0.6),
|
|
14
|
-
'on-primary': get-color-from-palette('neutral', 100),
|
|
15
|
-
|
|
16
|
-
'text-heading': get-color-from-palette('neutral', 900),
|
|
17
|
-
'text-primary': get-color-from-palette('neutral', 700),
|
|
18
|
-
'text-secondary': get-color-from-palette('neutral', 500),
|
|
19
|
-
'text-brand': get-color-from-palette('purple', 700),
|
|
20
|
-
'text-inverse': get-color-from-palette('neutral', 100),
|
|
21
|
-
|
|
22
|
-
'border-subtle': get-color-from-palette('neutral', 200),
|
|
23
|
-
'border-default': get-color-from-palette('neutral', 300),
|
|
24
|
-
'border-strong': get-color-from-palette('neutral', 400),
|
|
25
|
-
'border-brand': get-color-from-palette('purple', 400),
|
|
26
|
-
|
|
27
|
-
'info-bg': get-color-from-palette('information', 100),
|
|
28
|
-
'info-bg-subtle': rgba(get-color-from-palette('information', 50), 0.95),
|
|
29
|
-
'info-border': get-color-from-palette('information', 200),
|
|
30
|
-
'info-text': get-color-from-palette('information', 700),
|
|
31
|
-
|
|
32
|
-
'success-bg': get-color-from-palette('success', 100),
|
|
33
|
-
'success-bg-subtle': rgba(get-color-from-palette('success', 50), 0.95),
|
|
34
|
-
'success-border': get-color-from-palette('success', 200),
|
|
35
|
-
'success-text': get-color-from-palette('success', 700),
|
|
36
|
-
|
|
37
|
-
'warn-bg': get-color-from-palette('warn', 100),
|
|
38
|
-
'warn-bg-subtle': rgba(get-color-from-palette('warn', 50), 0.95),
|
|
39
|
-
'warn-border': get-color-from-palette('warn', 200),
|
|
40
|
-
'warn-text': get-color-from-palette('warn', 700),
|
|
41
|
-
|
|
42
|
-
'error-bg': get-color-from-palette('error', 100),
|
|
43
|
-
'error-bg-subtle': rgba(get-color-from-palette('error', 50), 0.95),
|
|
44
|
-
'error-border': get-color-from-palette('error', 200),
|
|
45
|
-
'error-text': get-color-from-palette('error', 700),
|
|
46
|
-
|
|
47
|
-
'scroll-bg': get-color-from-palette('purple', 100),
|
|
48
|
-
'scroll-thumb': linear-gradient(278deg, get-color-from-palette('purple', 300) -10.44%, get-color-from-palette('purple', 400) 100%),
|
|
49
|
-
'scroll-thumb-hover': linear-gradient(278deg, get-color-from-palette('purple', 400) -10.44%, get-color-from-palette('purple', 700) 100%),
|
|
50
|
-
) !default;
|
|
51
|
-
|
|
52
|
-
$purple-dark-theme: (
|
|
53
|
-
'bg-canvas': #000000,
|
|
54
|
-
'bg-surface': get-color-from-palette('neutral', 1000),
|
|
55
|
-
'bg-surface-alt': get-color-from-palette('neutral', 900),
|
|
56
|
-
'bg-element': get-color-from-palette('neutral', 800),
|
|
57
|
-
'bg-element-hover': get-color-from-palette('purple', 700),
|
|
58
|
-
|
|
59
|
-
'primary': get-color-from-palette('purple', 500),
|
|
60
|
-
'primary-hover': get-color-from-palette('purple', 400),
|
|
61
|
-
'primary-active': get-color-from-palette('purple', 300),
|
|
62
|
-
'primary-subtle': rgba(get-color-from-palette('purple', 700), 0.6),
|
|
63
|
-
'on-primary': #ffffff,
|
|
64
|
-
|
|
65
|
-
'text-heading': #ffffff,
|
|
66
|
-
'text-primary': get-color-from-palette('neutral', 200),
|
|
67
|
-
'text-secondary': get-color-from-palette('neutral', 400),
|
|
68
|
-
'text-brand': get-color-from-palette('purple', 300),
|
|
69
|
-
'text-inverse': get-color-from-palette('neutral', 900),
|
|
70
|
-
|
|
71
|
-
'border-subtle': get-color-from-palette('neutral', 900),
|
|
72
|
-
'border-default': get-color-from-palette('neutral', 800),
|
|
73
|
-
'border-strong': get-color-from-palette('neutral', 700),
|
|
74
|
-
'border-brand': get-color-from-palette('purple', 600),
|
|
75
|
-
|
|
76
|
-
'info-bg': get-color-from-palette('information', 900),
|
|
77
|
-
'info-bg-subtle': rgba(get-color-from-palette('information', 1000), 0.95),
|
|
78
|
-
'info-border': get-color-from-palette('information', 900),
|
|
79
|
-
'info-text': get-color-from-palette('information', 400),
|
|
80
|
-
|
|
81
|
-
'success-bg': get-color-from-palette('success', 900),
|
|
82
|
-
'success-bg-subtle': rgba(get-color-from-palette('success', 1000), 0.95),
|
|
83
|
-
'success-border': get-color-from-palette('success', 900),
|
|
84
|
-
'success-text': get-color-from-palette('success', 400),
|
|
85
|
-
|
|
86
|
-
'warn-bg': get-color-from-palette('warn', 900),
|
|
87
|
-
'warn-bg-subtle': rgba(get-color-from-palette('warn', 1000), 0.95),
|
|
88
|
-
'warn-border': get-color-from-palette('warn', 900),
|
|
89
|
-
'warn-text': get-color-from-palette('warn', 400),
|
|
90
|
-
|
|
91
|
-
'error-bg': get-color-from-palette('error', 900),
|
|
92
|
-
'error-bg-subtle': rgba(get-color-from-palette('error', 1000), 0.95),
|
|
93
|
-
'error-border': get-color-from-palette('error', 900),
|
|
94
|
-
'error-text': get-color-from-palette('error', 400),
|
|
95
|
-
|
|
96
|
-
'scroll-bg': get-color-from-palette('purple', 900),
|
|
97
|
-
'scroll-thumb': linear-gradient(278deg, get-color-from-palette('purple', 700) -10.44%, get-color-from-palette('purple', 500) 100%),
|
|
98
|
-
'scroll-thumb-hover': linear-gradient(278deg, get-color-from-palette('purple', 500) -10.44%, get-color-from-palette('purple', 400) 100%),
|
|
99
|
-
) !default;
|
|
3
|
+
$purple-light-theme: make-light-theme('purple');
|
|
4
|
+
$purple-dark-theme: make-dark-theme('purple');
|
|
@@ -1,99 +1,4 @@
|
|
|
1
|
-
@use '../
|
|
1
|
+
@use '../theme-engine' as *;
|
|
2
2
|
|
|
3
|
-
$red-light-theme: (
|
|
4
|
-
|
|
5
|
-
'bg-surface': #ffffff,
|
|
6
|
-
'bg-surface-alt': get-color-from-palette('red', 50),
|
|
7
|
-
'bg-element': get-color-from-palette('neutral', 100),
|
|
8
|
-
'bg-element-hover': get-color-from-palette('red', 200),
|
|
9
|
-
|
|
10
|
-
'primary': get-color-from-palette('red', 500),
|
|
11
|
-
'primary-hover': get-color-from-palette('red', 600),
|
|
12
|
-
'primary-active': get-color-from-palette('red', 700),
|
|
13
|
-
'primary-subtle': rgba(get-color-from-palette('red', 300), 0.6),
|
|
14
|
-
'on-primary': get-color-from-palette('neutral', 100),
|
|
15
|
-
|
|
16
|
-
'text-heading': get-color-from-palette('neutral', 900),
|
|
17
|
-
'text-primary': get-color-from-palette('neutral', 700),
|
|
18
|
-
'text-secondary': get-color-from-palette('neutral', 500),
|
|
19
|
-
'text-brand': get-color-from-palette('red', 700),
|
|
20
|
-
'text-inverse': get-color-from-palette('neutral', 100),
|
|
21
|
-
|
|
22
|
-
'border-subtle': get-color-from-palette('neutral', 200),
|
|
23
|
-
'border-default': get-color-from-palette('neutral', 300),
|
|
24
|
-
'border-strong': get-color-from-palette('neutral', 400),
|
|
25
|
-
'border-brand': get-color-from-palette('red', 400),
|
|
26
|
-
|
|
27
|
-
'info-bg': get-color-from-palette('information', 100),
|
|
28
|
-
'info-bg-subtle': rgba(get-color-from-palette('information', 50), 0.95),
|
|
29
|
-
'info-border': get-color-from-palette('information', 200),
|
|
30
|
-
'info-text': get-color-from-palette('information', 700),
|
|
31
|
-
|
|
32
|
-
'success-bg': get-color-from-palette('success', 100),
|
|
33
|
-
'success-bg-subtle': rgba(get-color-from-palette('success', 50), 0.95),
|
|
34
|
-
'success-border': get-color-from-palette('success', 200),
|
|
35
|
-
'success-text': get-color-from-palette('success', 700),
|
|
36
|
-
|
|
37
|
-
'warn-bg': get-color-from-palette('warn', 100),
|
|
38
|
-
'warn-bg-subtle': rgba(get-color-from-palette('warn', 50), 0.95),
|
|
39
|
-
'warn-border': get-color-from-palette('warn', 200),
|
|
40
|
-
'warn-text': get-color-from-palette('warn', 700),
|
|
41
|
-
|
|
42
|
-
'error-bg': get-color-from-palette('error', 100),
|
|
43
|
-
'error-bg-subtle': rgba(get-color-from-palette('error', 50), 0.95),
|
|
44
|
-
'error-border': get-color-from-palette('error', 200),
|
|
45
|
-
'error-text': get-color-from-palette('error', 700),
|
|
46
|
-
|
|
47
|
-
'scroll-bg': get-color-from-palette('red', 100),
|
|
48
|
-
'scroll-thumb': linear-gradient(278deg, get-color-from-palette('red', 300) -10.44%, get-color-from-palette('red', 400) 100%),
|
|
49
|
-
'scroll-thumb-hover': linear-gradient(278deg, get-color-from-palette('red', 400) -10.44%, get-color-from-palette('red', 700) 100%),
|
|
50
|
-
) !default;
|
|
51
|
-
|
|
52
|
-
$red-dark-theme: (
|
|
53
|
-
'bg-canvas': #000000,
|
|
54
|
-
'bg-surface': get-color-from-palette('neutral', 1000),
|
|
55
|
-
'bg-surface-alt': get-color-from-palette('neutral', 900),
|
|
56
|
-
'bg-element': get-color-from-palette('neutral', 800),
|
|
57
|
-
'bg-element-hover': get-color-from-palette('red', 700),
|
|
58
|
-
|
|
59
|
-
'primary': get-color-from-palette('red', 500),
|
|
60
|
-
'primary-hover': get-color-from-palette('red', 400),
|
|
61
|
-
'primary-active': get-color-from-palette('red', 300),
|
|
62
|
-
'primary-subtle': rgba(get-color-from-palette('red', 700), 0.6),
|
|
63
|
-
'on-primary': #ffffff,
|
|
64
|
-
|
|
65
|
-
'text-heading': #ffffff,
|
|
66
|
-
'text-primary': get-color-from-palette('neutral', 200),
|
|
67
|
-
'text-secondary': get-color-from-palette('neutral', 400),
|
|
68
|
-
'text-brand': get-color-from-palette('red', 300),
|
|
69
|
-
'text-inverse': get-color-from-palette('neutral', 900),
|
|
70
|
-
|
|
71
|
-
'border-subtle': get-color-from-palette('neutral', 900),
|
|
72
|
-
'border-default': get-color-from-palette('neutral', 800),
|
|
73
|
-
'border-strong': get-color-from-palette('neutral', 700),
|
|
74
|
-
'border-brand': get-color-from-palette('red', 600),
|
|
75
|
-
|
|
76
|
-
'info-bg': get-color-from-palette('information', 900),
|
|
77
|
-
'info-bg-subtle': rgba(get-color-from-palette('information', 1000), 0.95),
|
|
78
|
-
'info-border': get-color-from-palette('information', 900),
|
|
79
|
-
'info-text': get-color-from-palette('information', 400),
|
|
80
|
-
|
|
81
|
-
'success-bg': get-color-from-palette('success', 900),
|
|
82
|
-
'success-bg-subtle': rgba(get-color-from-palette('success', 1000), 0.95),
|
|
83
|
-
'success-border': get-color-from-palette('success', 900),
|
|
84
|
-
'success-text': get-color-from-palette('success', 400),
|
|
85
|
-
|
|
86
|
-
'warn-bg': get-color-from-palette('warn', 900),
|
|
87
|
-
'warn-bg-subtle': rgba(get-color-from-palette('warn', 1000), 0.95),
|
|
88
|
-
'warn-border': get-color-from-palette('warn', 900),
|
|
89
|
-
'warn-text': get-color-from-palette('warn', 400),
|
|
90
|
-
|
|
91
|
-
'error-bg': get-color-from-palette('error', 900),
|
|
92
|
-
'error-bg-subtle': rgba(get-color-from-palette('error', 1000), 0.95),
|
|
93
|
-
'error-border': get-color-from-palette('error', 900),
|
|
94
|
-
'error-text': get-color-from-palette('error', 400),
|
|
95
|
-
|
|
96
|
-
'scroll-bg': get-color-from-palette('red', 900),
|
|
97
|
-
'scroll-thumb': linear-gradient(278deg, get-color-from-palette('red', 700) -10.44%, get-color-from-palette('red', 500) 100%),
|
|
98
|
-
'scroll-thumb-hover': linear-gradient(278deg, get-color-from-palette('red', 500) -10.44%, get-color-from-palette('red', 400) 100%),
|
|
99
|
-
) !default;
|
|
3
|
+
$red-light-theme: make-light-theme('red');
|
|
4
|
+
$red-dark-theme: make-dark-theme('red');
|
|
@@ -141,7 +141,9 @@ declare class ThemingService implements OnDestroy {
|
|
|
141
141
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ThemingService>;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
|
|
144
|
+
type SemanticColorToken = 'bg-canvas' | 'bg-surface' | 'bg-surface-alt' | 'bg-element' | 'bg-element-hover' | 'bg-element-active' | 'primary' | 'primary-hover' | 'primary-active' | 'primary-subtle' | 'on-primary' | 'text-heading' | 'text-primary' | 'text-secondary' | 'text-brand' | 'text-inverse' | 'text-info' | 'text-warn' | 'text-success' | 'text-danger' | 'border-subtle' | 'border-default' | 'border-strong' | 'border-brand' | 'border-info' | 'border-success' | 'border-warn' | 'border-danger' | 'bg-info' | 'bg-info-hover' | 'bg-info-active' | 'bg-info-disabled' | 'bg-info-subtle' | 'bg-success' | 'bg-success-hover' | 'bg-success-active' | 'bg-success-disabled' | 'bg-success-subtle' | 'bg-warn' | 'bg-warn-hover' | 'bg-warn-active' | 'bg-warn-disabled' | 'bg-warn-subtle' | 'bg-danger' | 'bg-danger-hover' | 'bg-danger-active' | 'bg-danger-disabled' | 'bg-danger-subtle' | 'scroll-bg' | 'scroll-thumb' | 'scroll-thumb-hover';
|
|
145
|
+
|
|
146
|
+
declare const PALETTE_NAMES: readonly ["orange", "purple", "red", "green", "danger", "success", "information", "neutral"];
|
|
145
147
|
declare const SHADE_NUMBERS: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000];
|
|
146
148
|
declare const TOKEN_PREFIX = "bx";
|
|
147
149
|
declare const TOKEN_DELIMITER = "-";
|
|
@@ -178,7 +180,6 @@ type MSStreamWindow = Window & {
|
|
|
178
180
|
|
|
179
181
|
type ThemePalette = (typeof PALETTE_NAMES)[number];
|
|
180
182
|
type ThemeShade = (typeof SHADE_NUMBERS)[number];
|
|
181
|
-
type SemanticColorToken = 'bg-canvas' | 'bg-surface' | 'bg-surface-alt' | 'bg-element' | 'bg-element-hover' | 'primary' | 'primary-hover' | 'primary-active' | 'primary-subtle' | 'on-primary' | 'text-heading' | 'text-primary' | 'text-secondary' | 'text-brand' | 'text-inverse' | 'border-subtle' | 'border-default' | 'border-strong' | 'border-brand' | 'info-bg' | 'info-bg-subtle' | 'info-border' | 'info-text' | 'success-bg' | 'success-bg-subtle' | 'success-border' | 'success-text' | 'warn-bg' | 'warn-bg-subtle' | 'warn-border' | 'warn-text' | 'error-bg' | 'error-bg-subtle' | 'error-border' | 'error-text' | 'scroll-bg' | 'scroll-thumb' | 'scroll-thumb-hover';
|
|
182
183
|
type ThemeColorToken = `${ThemePalette}-${ThemeShade}`;
|
|
183
184
|
type Color = ThemeColorToken | SemanticColorToken;
|
|
184
185
|
type ThemedColor = Color | {
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
@use 'palettes' as *;
|
|
3
|
-
@use './themes/orange-theme' as *;
|
|
4
|
-
|
|
5
|
-
$semantic-keys: map-keys($orange-light-theme);
|
|
6
|
-
|
|
7
|
-
@mixin core-theme($config) {
|
|
8
|
-
@each $key, $value in $config {
|
|
9
|
-
|
|
10
|
-
@if $key !='meta-brand-palette' {
|
|
11
|
-
--bx-#{$key}: #{$value};
|
|
12
|
-
|
|
13
|
-
.bx-bg-#{$key} {
|
|
14
|
-
background-color: var(--bx-#{$key});
|
|
15
|
-
transition: background-color 0.2s ease-in-out;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.bx-text-#{$key} {
|
|
19
|
-
color: var(--bx-#{$key});
|
|
20
|
-
transition: color 0.2s ease-in-out;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.bx-border-#{$key} {
|
|
24
|
-
border-color: var(--bx-#{$key});
|
|
25
|
-
transition: border-color 0.2s ease-in-out;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
@if $key =='meta-brand-palette' {
|
|
30
|
-
$brand-palette: get-palette($value);
|
|
31
|
-
|
|
32
|
-
@each $shade, $color in $brand-palette {
|
|
33
|
-
--bx-color-primary-#{$shade}: #{$color};
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|