@bravura/ui 5.1.1 → 5.2.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.
- package/CHANGELOG.md +12 -2
- package/_index.scss +5 -0
- package/esm2022/form-field/form-field.component.mjs +2 -2
- package/esm2022/radio-panel/radio-panel-item.component.mjs +3 -3
- package/esm2022/selection-panel/selection-panel-item.component.mjs +3 -6
- package/esm2022/stepper/stepper.component.mjs +3 -3
- package/fesm2022/bravura-ui-form-field.mjs +2 -2
- package/fesm2022/bravura-ui-form-field.mjs.map +1 -1
- package/fesm2022/bravura-ui-radio-panel.mjs +2 -2
- package/fesm2022/bravura-ui-radio-panel.mjs.map +1 -1
- package/fesm2022/bravura-ui-selection-panel.mjs +2 -5
- package/fesm2022/bravura-ui-selection-panel.mjs.map +1 -1
- package/fesm2022/bravura-ui-stepper.mjs +2 -2
- package/fesm2022/bravura-ui-stepper.mjs.map +1 -1
- package/m3-theme.scss +155 -0
- package/package.json +19 -18
- package/radio-panel/_radio-panel-theme.scss +11 -0
- package/selection-panel/_selection-panel-theme.scss +33 -0
- package/stepper/_stepper-theme.scss +16 -0
- package/theme/_ui-theme-legacy.scss +112 -0
- package/theme/_ui-theme.scss +58 -69
package/theme/_ui-theme.scss
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
@use '@angular/material' as mat;
|
|
3
3
|
@use './scrollbar.scss' as scrollbar;
|
|
4
4
|
@use './bui-card' as card;
|
|
5
|
+
@use './ui-theme-legacy' as legacy;
|
|
6
|
+
@use '../stepper/stepper-theme' as stepper;
|
|
7
|
+
@use '../radio-panel/radio-panel-theme' as radio;
|
|
8
|
+
@use '../selection-panel/selection-panel-theme' as selection;
|
|
5
9
|
|
|
6
10
|
$default-border-color-transition: border-color 100ms cubic-bezier(0.55, 0, 0.55, 0.2);
|
|
7
11
|
$mat-foreground-extract: (
|
|
@@ -17,96 +21,81 @@ $mat-background-extract: (
|
|
|
17
21
|
'background': 'body'
|
|
18
22
|
);
|
|
19
23
|
|
|
20
|
-
@mixin
|
|
21
|
-
.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
.bui-bg-#{$name} {
|
|
26
|
-
background-color: $color !important;
|
|
27
|
-
}
|
|
28
|
-
.bui-color-#{$name} {
|
|
29
|
-
color: $color !important;
|
|
30
|
-
}
|
|
31
|
-
.bui-outline-#{$name} {
|
|
32
|
-
outline-color: $color !important;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
24
|
+
@mixin all-component-colors($theme, $border-color-transition: $default-border-color-transition) {
|
|
25
|
+
@if (mat.get-theme-version($theme) == 1) {
|
|
26
|
+
@include stepper.color($theme);
|
|
27
|
+
@include radio.color($theme);
|
|
28
|
+
@include selection.color($theme);
|
|
35
29
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
transition: $border-color-transition;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
$color-config: mat.m2-get-color-config($theme);
|
|
43
|
-
@if $color-config != null {
|
|
44
|
-
@include card.bui-card($color-config);
|
|
45
|
-
@each $p in (primary, accent, warn) {
|
|
46
|
-
$primary-palette: map.get($color-config, $p);
|
|
47
|
-
$c: mat.m2-get-color-from-palette($primary-palette, text);
|
|
48
|
-
@include apply-color($p, $c, $border-color-transition);
|
|
30
|
+
.bui-border-emphasis:hover {
|
|
31
|
+
border-color: currentColor !important;
|
|
32
|
+
transition: $border-color-transition;
|
|
49
33
|
}
|
|
50
34
|
|
|
51
|
-
|
|
52
|
-
$
|
|
53
|
-
$
|
|
54
|
-
(
|
|
55
|
-
inactive: rgba(map.get($fg-original, base), 0.06)
|
|
56
|
-
)
|
|
57
|
-
);
|
|
58
|
-
|
|
59
|
-
@each $key, $name in $mat-foreground-extract {
|
|
60
|
-
$c: map.get($fg, $key);
|
|
61
|
-
@include apply-color($name, $c, $border-color-transition);
|
|
35
|
+
// @include card.bui-card($color-config);
|
|
36
|
+
@each $p in (primary, tertiary, secondary, error) {
|
|
37
|
+
$c: mat.get-theme-color($theme, $p);
|
|
38
|
+
@include apply-color($p, $c, $border-color-transition);
|
|
62
39
|
}
|
|
63
40
|
|
|
64
41
|
.bui-host {
|
|
65
|
-
@each $p in (primary,
|
|
66
|
-
$
|
|
67
|
-
$c: mat.m2-get-color-from-palette($primary-palette, text);
|
|
42
|
+
@each $p in (primary, tertiary, secondary, error) {
|
|
43
|
+
$c: mat.get-theme-color($theme, $p);
|
|
68
44
|
--bui-color-#{$p}: #{$c};
|
|
69
45
|
}
|
|
70
46
|
|
|
71
|
-
@
|
|
72
|
-
$c: map.get($fg, $key);
|
|
73
|
-
--bui-color-#{$name}: #{$c};
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
@each $key, $name in $mat-background-extract {
|
|
77
|
-
$bg: map.get($color-config, 'background');
|
|
78
|
-
$c: map.get($bg, $key);
|
|
79
|
-
--bui-bg-#{$name}: #{$c};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
@if map.get($color-config, 'is-dark') == false {
|
|
47
|
+
@if mat.get-theme-type($theme) != dark {
|
|
83
48
|
--bui-color-success: #519602;
|
|
84
49
|
--bui-color-info: #0dcaf0;
|
|
85
50
|
--bui-color-warning: #ffc107;
|
|
86
51
|
--bui-color-error: #dc3545;
|
|
87
52
|
}
|
|
88
53
|
}
|
|
54
|
+
} @else {
|
|
55
|
+
@include legacy.apply-colors($theme);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
89
58
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
59
|
+
@mixin apply-color($name, $color, $border-color-transition: $default-border-color-transition) {
|
|
60
|
+
.bui-border-#{$name} {
|
|
61
|
+
border-color: $color !important;
|
|
62
|
+
transition: $border-color-transition;
|
|
63
|
+
}
|
|
64
|
+
.bui-bg-#{$name} {
|
|
65
|
+
background-color: $color !important;
|
|
66
|
+
}
|
|
67
|
+
.bui-color-#{$name} {
|
|
68
|
+
color: $color !important;
|
|
69
|
+
}
|
|
70
|
+
.bui-outline-#{$name} {
|
|
71
|
+
outline-color: $color !important;
|
|
94
72
|
}
|
|
95
73
|
}
|
|
96
74
|
|
|
75
|
+
@mixin apply-colors($theme, $border-color-transition: $default-border-color-transition) {
|
|
76
|
+
@include all-component-colors($theme, $border-color-transition);
|
|
77
|
+
}
|
|
78
|
+
|
|
97
79
|
@mixin theme($theme, $border-color-transition: $default-border-color-transition) {
|
|
98
|
-
@
|
|
99
|
-
|
|
80
|
+
@if (mat.get-theme-version($theme) == 1) {
|
|
81
|
+
@include apply-colors($theme, $border-color-transition);
|
|
82
|
+
@include stepper.theme($theme);
|
|
83
|
+
@include radio.theme($theme);
|
|
84
|
+
@include selection.theme($theme);
|
|
85
|
+
@include scrollbar.bui-scrollbar;
|
|
100
86
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
87
|
+
.mat-icon {
|
|
88
|
+
&.fas,
|
|
89
|
+
&.far,
|
|
90
|
+
&.fab,
|
|
91
|
+
&.fa {
|
|
92
|
+
display: inline-flex;
|
|
93
|
+
justify-content: center;
|
|
94
|
+
align-items: center;
|
|
95
|
+
font-size: 20px;
|
|
96
|
+
}
|
|
110
97
|
}
|
|
98
|
+
} @else {
|
|
99
|
+
@include legacy.theme($theme);
|
|
111
100
|
}
|
|
112
101
|
}
|