@filip.mazev/blocks-core 1.0.28 → 1.0.30
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 +32 -18
- package/fesm2022/filip.mazev-blocks-core.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/styles/_index.scss +1 -1
- package/src/lib/styles/_palettes.scss +24 -24
- package/src/lib/styles/_theme-engine.scss +246 -0
- package/src/lib/styles/themes/_green-theme.scss +3 -98
- package/src/lib/styles/themes/_high-contrast-theme.scss +119 -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
|
@@ -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' | '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
|
-
}
|