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