igniteui-angular 20.0.0 → 20.0.2
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/igniteui-angular.mjs +9 -11
- package/fesm2022/igniteui-angular.mjs.map +1 -1
- package/index.d.ts +2 -2
- package/lib/core/styles/components/_common/_igx-vhelper.scss +1 -0
- package/lib/core/styles/components/action-strip/_action-strip-theme.scss +2 -7
- package/lib/core/styles/components/avatar/_avatar-theme.scss +7 -8
- package/lib/core/styles/components/badge/_badge-theme.scss +3 -8
- package/lib/core/styles/components/banner/_banner-theme.scss +6 -7
- package/lib/core/styles/components/bottom-nav/_bottom-nav-theme.scss +17 -28
- package/lib/core/styles/components/button/_button-theme.scss +219 -158
- package/lib/core/styles/components/button/_contained-button-theme.scss +302 -0
- package/lib/core/styles/components/button/_fab-button-theme.scss +296 -0
- package/lib/core/styles/components/button/_flat-button-theme.scss +356 -0
- package/lib/core/styles/components/button/_outlined-button-theme.scss +419 -0
- package/lib/core/styles/components/button-group/_button-group-theme.scss +113 -29
- package/lib/core/styles/components/calendar/_calendar-theme.scss +502 -112
- package/lib/core/styles/components/card/_card-theme.scss +5 -16
- package/lib/core/styles/components/carousel/_carousel-theme.scss +103 -23
- package/lib/core/styles/components/checkbox/_checkbox-component.scss +1 -1
- package/lib/core/styles/components/checkbox/_checkbox-theme.scss +63 -11
- package/lib/core/styles/components/chip/_chip-theme.scss +64 -47
- package/lib/core/styles/components/column-actions/_column-actions-theme.scss +2 -7
- package/lib/core/styles/components/combo/_combo-theme.scss +54 -12
- package/lib/core/styles/components/dialog/_dialog-theme.scss +9 -12
- package/lib/core/styles/components/divider/_divider-theme.scss +1 -6
- package/lib/core/styles/components/drop-down/_drop-down-theme.scss +52 -32
- package/lib/core/styles/components/expansion-panel/_expansion-panel-theme.scss +18 -13
- package/lib/core/styles/components/grid/_grid-theme.scss +115 -94
- package/lib/core/styles/components/grid/_pivot-data-selector-theme.scss +1 -6
- package/lib/core/styles/components/grid-summary/_grid-summary-theme.scss +12 -13
- package/lib/core/styles/components/grid-toolbar/_grid-toolbar-theme.scss +7 -12
- package/lib/core/styles/components/highlight/highlight-theme.scss +2 -3
- package/lib/core/styles/components/icon/_icon-theme.scss +0 -1
- package/lib/core/styles/components/icon-button/_contained-icon-button-theme.scss +196 -0
- package/lib/core/styles/components/icon-button/_flat-icon-button-theme.scss +188 -0
- package/lib/core/styles/components/icon-button/_icon-button-theme.scss +45 -32
- package/lib/core/styles/components/icon-button/_outlined-icon-button-theme.scss +232 -0
- package/lib/core/styles/components/input/_input-group-theme.scss +272 -21
- package/lib/core/styles/components/label/_label-theme.scss +2 -4
- package/lib/core/styles/components/list/_list-theme.scss +42 -66
- package/lib/core/styles/components/navbar/_navbar-theme.scss +25 -15
- package/lib/core/styles/components/navdrawer/_navdrawer-theme.scss +24 -22
- package/lib/core/styles/components/overlay/_overlay-theme.scss +0 -1
- package/lib/core/styles/components/paginator/_paginator-theme.scss +2 -7
- package/lib/core/styles/components/progress/circular/_circular-theme.scss +3 -8
- package/lib/core/styles/components/progress/linear/_linear-theme.scss +1 -6
- package/lib/core/styles/components/query-builder/_query-builder-theme.scss +28 -11
- package/lib/core/styles/components/radio/_radio-theme.scss +54 -10
- package/lib/core/styles/components/ripple/_ripple-theme.scss +0 -1
- package/lib/core/styles/components/scrollbar/scrollbar-theme.scss +0 -1
- package/lib/core/styles/components/select/_select-theme.scss +35 -7
- package/lib/core/styles/components/slider/_slider-theme.scss +92 -7
- package/lib/core/styles/components/snackbar/_snackbar-theme.scss +3 -8
- package/lib/core/styles/components/splitter/_splitter-theme.scss +15 -8
- package/lib/core/styles/components/stepper/_stepper-theme.scss +190 -22
- package/lib/core/styles/components/switch/_switch-theme.scss +112 -8
- package/lib/core/styles/components/tabs/_tabs-theme.scss +124 -56
- package/lib/core/styles/components/time-picker/_time-picker-theme.scss +35 -18
- package/lib/core/styles/components/toast/_toast-theme.scss +9 -10
- package/lib/core/styles/components/tooltip/_tooltip-theme.scss +2 -7
- package/lib/core/styles/components/tree/_tree-theme.scss +33 -10
- package/lib/core/styles/components/watermark/_watermark-theme.scss +0 -1
- package/lib/core/styles/themes/_core.scss +6 -0
- package/lib/core/styles/themes/generators/_base.scss +146 -58
- package/migrations/migration-collection.json +5 -0
- package/migrations/update-20_0_2/changes/theme-changes.json +11 -0
- package/migrations/update-20_0_2/index.d.ts +3 -0
- package/migrations/update-20_0_2/index.js +18 -0
- package/package.json +1 -1
- package/styles/igniteui-angular-dark.css +1 -1
- package/styles/igniteui-angular.css +1 -1
- package/styles/igniteui-bootstrap-dark.css +1 -1
- package/styles/igniteui-bootstrap-light.css +1 -1
- package/styles/igniteui-dark-green.css +1 -1
- package/styles/igniteui-fluent-dark-excel.css +1 -1
- package/styles/igniteui-fluent-dark-word.css +1 -1
- package/styles/igniteui-fluent-dark.css +1 -1
- package/styles/igniteui-fluent-light-excel.css +1 -1
- package/styles/igniteui-fluent-light-word.css +1 -1
- package/styles/igniteui-fluent-light.css +1 -1
- package/styles/igniteui-indigo-dark.css +1 -1
- package/styles/igniteui-indigo-light.css +1 -1
- package/styles/maps/igniteui-angular-dark.css.map +1 -1
- package/styles/maps/igniteui-angular.css.map +1 -1
- package/styles/maps/igniteui-bootstrap-dark.css.map +1 -1
- package/styles/maps/igniteui-bootstrap-light.css.map +1 -1
- package/styles/maps/igniteui-dark-green.css.map +1 -1
- package/styles/maps/igniteui-fluent-dark-excel.css.map +1 -1
- package/styles/maps/igniteui-fluent-dark-word.css.map +1 -1
- package/styles/maps/igniteui-fluent-dark.css.map +1 -1
- package/styles/maps/igniteui-fluent-light-excel.css.map +1 -1
- package/styles/maps/igniteui-fluent-light-word.css.map +1 -1
- package/styles/maps/igniteui-fluent-light.css.map +1 -1
- package/styles/maps/igniteui-indigo-dark.css.map +1 -1
- package/styles/maps/igniteui-indigo-light.css.map +1 -1
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use 'sass:meta';
|
|
3
|
+
@use 'sass:color';
|
|
4
|
+
@use 'sass:list';
|
|
5
|
+
@use 'sass:string';
|
|
6
|
+
@use '../../base' as *;
|
|
7
|
+
@use '../../themes/schemas' as *;
|
|
8
|
+
|
|
9
|
+
////
|
|
10
|
+
/// @group themes
|
|
11
|
+
/// @access public
|
|
12
|
+
/// @author <a href="https://github.com/desig9stein" target="_blank">Marin Popov</a>
|
|
13
|
+
/// @author <a href="https://github.com/simeonoff" target="_blank">Simeon Simeonoff</a>
|
|
14
|
+
////
|
|
15
|
+
|
|
16
|
+
/// If only background color is specified, text/icon color
|
|
17
|
+
/// will be assigned automatically to a contrasting color.
|
|
18
|
+
/// Does ___not___ apply for disabled state colors.
|
|
19
|
+
/// @param {Map} $schema [$light-material-schema] - The schema used as basis for styling the component.
|
|
20
|
+
/// @param {Color} $background [null] - The background color of the button.
|
|
21
|
+
/// @param {Color} $foreground [null] - The text color of the button.
|
|
22
|
+
/// @param {Color} $icon-color [null] - The icon color in the button.
|
|
23
|
+
/// @param {Color} $icon-color-hover [null] - The icon color in the button on hover.
|
|
24
|
+
/// @param {Color} $hover-background [null] - The hover background color of the button.
|
|
25
|
+
/// @param {Color} $hover-foreground [null] - The hover text color of the button.
|
|
26
|
+
/// @param {Color} $focus-background [null] - The focus background color of the button.
|
|
27
|
+
/// @param {Color} $focus-foreground [null] - The focus text color of the button.
|
|
28
|
+
/// @param {Color} $focus-hover-background [null] - The background color on focus hovered state of the button.
|
|
29
|
+
/// @param {Color} $focus-hover-foreground [null] - The text color on focus hovered state of the button.
|
|
30
|
+
/// @param {Color} $focus-visible-background [null] - The focus-visible background color of the button.
|
|
31
|
+
/// @param {Color} $focus-visible-foreground [null] - The focus-visible text color of the button.
|
|
32
|
+
/// @param {Color} $active-background [null] - The active background of the button.
|
|
33
|
+
/// @param {Color} $active-foreground [null] - The active text color of the button.
|
|
34
|
+
/// @param {List} $border-radius [null] - The border radius of the button.
|
|
35
|
+
/// @param {Color} $border-color [null] - The border color of the button.
|
|
36
|
+
/// @param {Color} $hover-border-color [null] - The hover border color of the button.
|
|
37
|
+
/// @param {Color} $focus-border-color [null] - The focus border color of the button.
|
|
38
|
+
/// @param {Color} $focus-visible-border-color [null] - The focus-visible border color of the button.
|
|
39
|
+
/// @param {Color} $active-border-color [null] - The active border color of the button.
|
|
40
|
+
/// @param {Color} $shadow-color [null] - The shadow color of the button.
|
|
41
|
+
/// @param {Color} $resting-shadow [null] - The shadow of the button in its idle state.
|
|
42
|
+
/// @param {Color} $hover-shadow [null] - The shadow of the button in its hover state.
|
|
43
|
+
/// @param {Color} $focus-shadow [null] - The shadow of the button in its focus state.
|
|
44
|
+
/// @param {Color} $active-shadow [null] - The shadow of the button in its focus state.
|
|
45
|
+
/// @param {Color} $disabled-background [null] - The disabled background color of the button.
|
|
46
|
+
/// @param {Color} $disabled-foreground [null] - The disabled text color of the button.
|
|
47
|
+
/// @param {Color} $disabled-icon-color [null] - The disabled icon color of the button.
|
|
48
|
+
/// @param {Color} $disabled-border-color [null] - The disabled border color of the button.
|
|
49
|
+
///
|
|
50
|
+
/// @requires $light-material-schema
|
|
51
|
+
///
|
|
52
|
+
/// @example scss Change the text colors in outlined buttons
|
|
53
|
+
/// $my-button-theme: outlined-button-theme(
|
|
54
|
+
/// $foreground: black,
|
|
55
|
+
/// );
|
|
56
|
+
/// // Pass the theme to the css-vars() mixin
|
|
57
|
+
/// @include css-vars($my-button-theme);
|
|
58
|
+
@function outlined-button-theme(
|
|
59
|
+
$schema: $light-material-schema,
|
|
60
|
+
|
|
61
|
+
$background: null,
|
|
62
|
+
$foreground: null,
|
|
63
|
+
|
|
64
|
+
$hover-background: null,
|
|
65
|
+
$hover-foreground: null,
|
|
66
|
+
|
|
67
|
+
$icon-color: $foreground,
|
|
68
|
+
$icon-color-hover: $hover-foreground,
|
|
69
|
+
|
|
70
|
+
$focus-background: null,
|
|
71
|
+
$focus-foreground: null,
|
|
72
|
+
|
|
73
|
+
$focus-hover-background: null,
|
|
74
|
+
$focus-hover-foreground: null,
|
|
75
|
+
|
|
76
|
+
$focus-visible-background: null,
|
|
77
|
+
$focus-visible-foreground: null,
|
|
78
|
+
|
|
79
|
+
$active-background: null,
|
|
80
|
+
$active-foreground: null,
|
|
81
|
+
|
|
82
|
+
$border-radius: null,
|
|
83
|
+
$border-color: null,
|
|
84
|
+
$hover-border-color: null,
|
|
85
|
+
$focus-border-color: null,
|
|
86
|
+
$focus-visible-border-color: null,
|
|
87
|
+
$active-border-color: null,
|
|
88
|
+
|
|
89
|
+
$shadow-color: null,
|
|
90
|
+
|
|
91
|
+
$resting-shadow: null,
|
|
92
|
+
$hover-shadow: null,
|
|
93
|
+
$focus-shadow: null,
|
|
94
|
+
$active-shadow: null,
|
|
95
|
+
|
|
96
|
+
$disabled-background: null,
|
|
97
|
+
$disabled-foreground: null,
|
|
98
|
+
$disabled-icon-color: $disabled-foreground,
|
|
99
|
+
$disabled-border-color: null,
|
|
100
|
+
$size: null
|
|
101
|
+
) {
|
|
102
|
+
$name: 'igx-outlined-button';
|
|
103
|
+
$button-schema: ();
|
|
104
|
+
|
|
105
|
+
@if map.has-key($schema, 'button') {
|
|
106
|
+
$button-schema: map.get($schema, 'button');
|
|
107
|
+
@if map.has-key($button-schema, 'outlined') {
|
|
108
|
+
$button-schema: map.get($button-schema, 'outlined');
|
|
109
|
+
} @else {
|
|
110
|
+
$button-schema: $schema;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
$theme: digest-schema($button-schema);
|
|
115
|
+
$variant: map.get($schema, '_meta', 'theme');
|
|
116
|
+
|
|
117
|
+
@if not($hover-foreground) and $hover-background {
|
|
118
|
+
$hover-foreground: adaptive-contrast(var(--hover-background));
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@if not($icon-color-hover) and $hover-foreground {
|
|
122
|
+
$icon-color-hover: var(--hover-foreground);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@if not($focus-foreground) and $focus-background {
|
|
126
|
+
$focus-foreground: adaptive-contrast(var(--focus-background));
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@if not($focus-hover-foreground) and $focus-hover-background {
|
|
130
|
+
$focus-hover-foreground: adaptive-contrast(var(--focus-hover-background));
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@if not($active-foreground) and $active-background {
|
|
134
|
+
$active-foreground: adaptive-contrast(var(--active-background));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@if not($focus-visible-background) and $focus-background {
|
|
138
|
+
$focus-visible-background: var(--focus-background);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
@if not($focus-visible-foreground) and $focus-visible-background {
|
|
142
|
+
$focus-visible-foreground: adaptive-contrast(var(--focus-visible-background));
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
@if not($focus-visible-border-color) and $focus-border-color {
|
|
146
|
+
$focus-visible-border-color: var(--focus-border-color);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
@if $variant == 'material' or $variant == 'fluent' {
|
|
150
|
+
@if not($hover-background) and $foreground {
|
|
151
|
+
$hover-background: hsla(from var(--foreground) h s l / 0.08);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
@if not($focus-background) and $foreground {
|
|
155
|
+
$focus-background: hsla(from var(--foreground) h s l / 0.32);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
@if not($focus-hover-background) and $foreground {
|
|
159
|
+
$focus-hover-background: hsla(from var(--foreground) h s l / 0.24);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
@if not($active-background) and $foreground {
|
|
163
|
+
$active-background: hsla(from var(--foreground) h s l / 0.16);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
@if not($hover-foreground) and $hover-background {
|
|
167
|
+
$hover-foreground: hsla(from var(--hover-background) h s l / 1);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
@if not($focus-foreground) and $focus-background {
|
|
171
|
+
$focus-foreground: hsla(from var(--focus-background) h s l / 1);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
@if not($focus-hover-foreground) and $focus-hover-background {
|
|
175
|
+
$focus-hover-foreground: hsla(
|
|
176
|
+
from var(--focus-hover-background) h s l / 1
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
@if not($active-foreground) and $active-background {
|
|
181
|
+
$active-foreground: hsla(from var(--active-background) h s l / 1);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
@if $variant == 'material' {
|
|
185
|
+
@if not($focus-visible-background) and $foreground {
|
|
186
|
+
$focus-visible-background: hsla(
|
|
187
|
+
from var(--foreground) h s l / 0.16
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
@if not($focus-visible-foreground) and $focus-visible-background {
|
|
192
|
+
$focus-visible-foreground: hsla(
|
|
193
|
+
from var(--focus-visible-background) h s l / 1
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
} @else {
|
|
197
|
+
@if not($focus-visible-foreground) and $focus-foreground {
|
|
198
|
+
$focus-visible-foreground: var(--focus-foreground);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
@if $variant == 'fluent' {
|
|
203
|
+
@if not($focus-visible-border-color) and $focus-visible-foreground {
|
|
204
|
+
$focus-visible-border-color: var(--focus-visible-foreground);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
@if $variant == 'indigo' {
|
|
210
|
+
@if not($hover-background) and $foreground {
|
|
211
|
+
$hover-background: hsla(from var(--foreground) h s l / 0.08);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
@if not($focus-background) and $foreground {
|
|
215
|
+
$focus-background: hsla(from var(--foreground) h s l / 0.08);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
@if not($focus-hover-background) and $foreground {
|
|
219
|
+
$focus-hover-background: hsla(from var(--foreground) h s l / 0.08);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
@if not($active-background) and $foreground {
|
|
223
|
+
$active-background: hsla(from var(--foreground) h s l / 0.08);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
@if not($hover-foreground) and $foreground {
|
|
227
|
+
$hover-foreground: hsl(from var(--foreground) h s calc(l * 0.9));
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
@if not($focus-foreground) and $foreground {
|
|
231
|
+
$focus-foreground: hsl(from var(--foreground) h s calc(l * 0.9));
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
@if not($focus-hover-foreground) and $foreground {
|
|
235
|
+
$focus-hover-foreground: hsl(
|
|
236
|
+
from var(--foreground) h s calc(l * 0.9)
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
@if not($focus-visible-foreground) and $foreground {
|
|
241
|
+
$focus-visible-foreground: var(--foreground);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
@if not($active-foreground) and $foreground {
|
|
245
|
+
$active-foreground: hsl(from var(--foreground) h s calc(l * 0.9));
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
@if not($shadow-color) and $focus-visible-foreground {
|
|
249
|
+
$shadow-color: hsla(
|
|
250
|
+
from var(--focus-visible-foreground) h s l / 0.2
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
@if $variant == 'bootstrap' {
|
|
256
|
+
@if not($hover-background) and $foreground {
|
|
257
|
+
$hover-background: var(--foreground);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
@if not($hover-foreground) and $hover-background {
|
|
261
|
+
$hover-foreground: adaptive-contrast(var(--hover-background));
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
@if not($focus-background) and $foreground {
|
|
265
|
+
$focus-background: hsl(from var(--foreground) h s calc(l * 0.8));
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
@if not($focus-foreground) and $focus-background {
|
|
269
|
+
$focus-foreground: adaptive-contrast(var(--focus-background));
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
@if not($focus-hover-background) and $hover-background {
|
|
273
|
+
$focus-hover-background: hsl(
|
|
274
|
+
from var(--hover-background) h s calc(l * 0.9)
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
@if not($focus-hover-foreground) and $focus-hover-background {
|
|
279
|
+
$focus-hover-foreground: adaptive-contrast(
|
|
280
|
+
var(--focus-hover-background)
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
@if not($focus-visible-background) and $hover-background {
|
|
285
|
+
$focus-visible-background: var(--hover-background);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
@if not($focus-visible-foreground) and $focus-visible-background {
|
|
289
|
+
$focus-visible-foreground: adaptive-contrast(
|
|
290
|
+
var(--focus-visible-background)
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
@if not($active-background) and $foreground {
|
|
295
|
+
$active-background: hsl(from var(--foreground) h s calc(l * 0.8));
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
@if not($active-foreground) and $active-background {
|
|
299
|
+
$active-foreground: adaptive-contrast(var(--active-background));
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
@if not($disabled-foreground) and $foreground {
|
|
303
|
+
$disabled-foreground: hsl(from (var(--foreground) h s l / 0.5));
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
@if not($disabled-icon-color) and $disabled-foreground {
|
|
307
|
+
$disabled-icon-color: var(--disabled-foreground);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
@if not($disabled-border-color) and $disabled-foreground {
|
|
311
|
+
$disabled-border-color: var(--disabled-foreground);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
@if not($hover-border-color) and $hover-background {
|
|
315
|
+
$hover-border-color: var(--hover-background);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
@if not($focus-border-color) and $focus-background {
|
|
319
|
+
$focus-border-color: var(--focus-background);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
@if not($focus-visible-border-color) and $focus-visible-background {
|
|
323
|
+
$focus-visible-border-color: var(--focus-visible-background);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
@if not($active-border-color) and $active-background {
|
|
327
|
+
$active-border-color: var(--active-background);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
@if not($shadow-color) and $focus-visible-background {
|
|
331
|
+
$shadow-color: hsla(
|
|
332
|
+
from var(--focus-visible-background) h s l / 0.5
|
|
333
|
+
);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
@if not($icon-color-hover) and $hover-foreground {
|
|
338
|
+
$icon-color-hover: var(--hover-foreground);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
@if variant != 'bootstrap' {
|
|
342
|
+
@if not($border-color) and $foreground {
|
|
343
|
+
$border-color: var(--foreground);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
@if not($hover-border-color) and $hover-foreground {
|
|
347
|
+
$hover-border-color: var(--hover-foreground);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
@if not($focus-border-color) and $focus-foreground {
|
|
351
|
+
$focus-border-color: var(--focus-foreground);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
@if not($focus-visible-border-color) and $focus-visible-foreground {
|
|
355
|
+
$focus-visible-border-color: var(--focus-visible-foreground);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
@if not($active-border-color) and $active-foreground {
|
|
359
|
+
$active-border-color: var(--active-foreground);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
@if not($resting-shadow) {
|
|
364
|
+
$resting-elevation: map.get($button-schema, 'resting-elevation');
|
|
365
|
+
$resting-shadow: elevation($resting-elevation);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
@if not($hover-shadow) {
|
|
369
|
+
$hover-elevation: map.get($button-schema, 'hover-elevation');
|
|
370
|
+
$hover-shadow: elevation($hover-elevation);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
@if not($focus-shadow) {
|
|
374
|
+
$focus-elevation: map.get($button-schema, 'focus-elevation');
|
|
375
|
+
$focus-shadow: elevation($focus-elevation);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
@if not($active-shadow) {
|
|
379
|
+
$active-elevation: map.get($button-schema, 'active-elevation');
|
|
380
|
+
$active-shadow: elevation($active-elevation);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
@return extend(
|
|
384
|
+
$theme,
|
|
385
|
+
(
|
|
386
|
+
name: $name,
|
|
387
|
+
background: $background,
|
|
388
|
+
foreground: $foreground,
|
|
389
|
+
icon-color: $icon-color,
|
|
390
|
+
icon-color-hover: $icon-color-hover,
|
|
391
|
+
hover-background: $hover-background,
|
|
392
|
+
hover-foreground: $hover-foreground,
|
|
393
|
+
focus-background: $focus-background,
|
|
394
|
+
focus-foreground: $focus-foreground,
|
|
395
|
+
focus-hover-background: $focus-hover-background,
|
|
396
|
+
focus-hover-foreground: $focus-hover-foreground,
|
|
397
|
+
focus-visible-background: $focus-visible-background,
|
|
398
|
+
focus-visible-foreground: $focus-visible-foreground,
|
|
399
|
+
active-background: $active-background,
|
|
400
|
+
active-foreground: $active-foreground,
|
|
401
|
+
border-radius: $border-radius,
|
|
402
|
+
border-color: $border-color,
|
|
403
|
+
hover-border-color: $hover-border-color,
|
|
404
|
+
focus-border-color: $focus-border-color,
|
|
405
|
+
focus-visible-border-color: $focus-visible-border-color,
|
|
406
|
+
active-border-color: $active-border-color,
|
|
407
|
+
shadow-color: $shadow-color,
|
|
408
|
+
resting-shadow: $resting-shadow,
|
|
409
|
+
hover-shadow: $hover-shadow,
|
|
410
|
+
focus-shadow: $focus-shadow,
|
|
411
|
+
active-shadow: $active-shadow,
|
|
412
|
+
disabled-background: $disabled-background,
|
|
413
|
+
disabled-foreground: $disabled-foreground,
|
|
414
|
+
disabled-icon-color: $disabled-icon-color,
|
|
415
|
+
disabled-border-color: $disabled-border-color,
|
|
416
|
+
size: $size,
|
|
417
|
+
)
|
|
418
|
+
);
|
|
419
|
+
}
|
|
@@ -120,44 +120,130 @@
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
$theme: digest-schema($button-group-schema);
|
|
123
|
-
$meta: map.get($theme, '_meta');
|
|
124
123
|
|
|
125
124
|
$border: rem(1px) solid map.get($theme, 'item-selected-border-color');
|
|
126
125
|
|
|
126
|
+
//background colors
|
|
127
|
+
@if not($item-hover-background) and $item-background {
|
|
128
|
+
$item-hover-background: hsl(from var(--item-background) h s calc(l * 0.9));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@if not($item-selected-background) and $item-background {
|
|
132
|
+
$item-selected-background: hsl(from var(--item-background) h s calc(l * 0.7));
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@if not($item-selected-hover-background) and $item-selected-background {
|
|
136
|
+
$item-selected-hover-background: hsl(from var(--item-selected-background) h s calc(l * 1.1));
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
@if not($item-selected-focus-background) and $item-selected-background {
|
|
140
|
+
$item-selected-focus-background: var(--item-selected-background);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@if not($item-selected-focus-hover-background) and $item-selected-hover-background {
|
|
144
|
+
$item-selected-focus-hover-background: var(--item-selected-hover-background);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@if not($item-focused-background) and $item-background {
|
|
148
|
+
$item-focused-background: var(--item-hover-background);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
@if not($item-focused-hover-background) and $item-hover-background {
|
|
152
|
+
$item-focused-hover-background: hsl(from var(--item-focused-background) h s calc(l * 0.9));
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
@if not($disabled-background-color) and $item-background {
|
|
156
|
+
$disabled-background-color: var(--item-background);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
@if not($disabled-selected-background) and $item-selected-background {
|
|
160
|
+
$disabled-selected-background: rgba(gray, 0.3);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
//border colors
|
|
164
|
+
@if not($item-border-color) and $item-background {
|
|
165
|
+
$item-border-color: hsl(from var(--item-background) h s calc(l * 0.8));
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@if not($item-hover-border-color) and $item-border-color {
|
|
169
|
+
$item-hover-border-color: var(--item-border-color);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
@if not($item-focused-border-color) and $item-border-color {
|
|
173
|
+
$item-focused-border-color: var(--item-border-color);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
@if not($item-selected-border-color) and $item-border-color {
|
|
177
|
+
$item-selected-border-color: var(--item-border-color);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
@if not($item-selected-hover-border-color) and $item-border-color {
|
|
181
|
+
$item-selected-hover-border-color: var(--item-border-color);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
@if not($item-disabled-border) and $item-border-color {
|
|
185
|
+
$item-disabled-border: var(--item-border-color);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
@if not($disabled-selected-border-color) and $item-border-color {
|
|
189
|
+
$disabled-selected-border-color: var(--item-border-color);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
//text and icon colors
|
|
127
193
|
@if not($item-text-color) and $item-background {
|
|
128
|
-
|
|
129
|
-
$item-text-color: text-contrast($item-background);
|
|
130
|
-
}
|
|
194
|
+
$item-text-color: adaptive-contrast(var(--item-background));
|
|
131
195
|
}
|
|
132
196
|
|
|
133
|
-
@if not($item-
|
|
134
|
-
|
|
135
|
-
$item-hover-text-color: text-contrast($item-hover-background);
|
|
136
|
-
}
|
|
197
|
+
@if not($item-icon-color) and $item-text-color {
|
|
198
|
+
$item-icon-color: var(--item-text-color);
|
|
137
199
|
}
|
|
138
200
|
|
|
139
|
-
@if not($item-
|
|
140
|
-
|
|
141
|
-
$item-selected-background: text-contrast($item-background);
|
|
142
|
-
}
|
|
201
|
+
@if not($item-hover-text-color) and $item-hover-background {
|
|
202
|
+
$item-hover-text-color: adaptive-contrast(var(--item-hover-background));
|
|
143
203
|
}
|
|
144
204
|
|
|
145
|
-
@if not($
|
|
146
|
-
|
|
147
|
-
$idle-shadow-color: $selected-shadow-color;
|
|
148
|
-
}
|
|
205
|
+
@if not($item-hover-icon-color) and $item-hover-text-color {
|
|
206
|
+
$item-hover-icon-color: var(--item-hover-text-color);
|
|
149
207
|
}
|
|
150
208
|
|
|
151
|
-
@if not($
|
|
152
|
-
|
|
153
|
-
$selected-shadow-color: $idle-shadow-color;
|
|
154
|
-
}
|
|
209
|
+
@if not($item-focused-text-color) and $item-focused-background {
|
|
210
|
+
$item-focused-text-color: adaptive-contrast(var(--item-focused-background));
|
|
155
211
|
}
|
|
156
212
|
|
|
157
213
|
@if not($item-selected-text-color) and $item-selected-background {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
214
|
+
$item-selected-text-color: adaptive-contrast(var(--item-selected-background));
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
@if not($item-selected-icon-color) and $item-selected-text-color {
|
|
218
|
+
$item-selected-icon-color: var(--item-selected-text-color);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
@if not($item-selected-hover-text-color) and $item-selected-hover-background {
|
|
222
|
+
$item-selected-hover-text-color: adaptive-contrast(var(--item-selected-hover-background));
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
@if not($item-selected-hover-icon-color) and $item-selected-hover-text-color {
|
|
226
|
+
$item-selected-hover-icon-color: var(--item-selected-hover-text-color);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
@if not($disabled-text-color) and $disabled-background-color {
|
|
230
|
+
$disabled-text-color: hsla(from adaptive-contrast(var(--disabled-background-color)) h s l / 0.4);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
@if not($disabled-selected-text-color) and $disabled-text-color {
|
|
234
|
+
$disabled-selected-text-color: var(--disabled-text-color);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
@if not($idle-shadow-color) and $item-background {
|
|
238
|
+
$idle-shadow-color: hsla(from var(--item-background) h s l / .5);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
@if not($idle-shadow-color) and $selected-shadow-color {
|
|
242
|
+
$idle-shadow-color: var(--selected-shadow-color);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
@if not($selected-shadow-color) and $idle-shadow-color {
|
|
246
|
+
$selected-shadow-color: var(--idle-shadow-color);
|
|
161
247
|
}
|
|
162
248
|
|
|
163
249
|
@if map.get($button-group-schema, 'elevation') > 0 {
|
|
@@ -205,11 +291,7 @@
|
|
|
205
291
|
border: $border,
|
|
206
292
|
shadow: $shadow,
|
|
207
293
|
idle-shadow-color: $idle-shadow-color,
|
|
208
|
-
selected-shadow-color: $selected-shadow-color
|
|
209
|
-
theme: map.get($schema, '_meta', 'theme'),
|
|
210
|
-
_meta: map.merge(if($meta, $meta, ()), (
|
|
211
|
-
variant: map.get($schema, '_meta', 'theme')
|
|
212
|
-
)),
|
|
294
|
+
selected-shadow-color: $selected-shadow-color
|
|
213
295
|
));
|
|
214
296
|
}
|
|
215
297
|
|
|
@@ -223,7 +305,7 @@
|
|
|
223
305
|
$group-items-margin: rem(10px, 16px);
|
|
224
306
|
$outline-btn-indent: rem(2px);
|
|
225
307
|
|
|
226
|
-
$variant: map.get($theme, '_meta', '
|
|
308
|
+
$variant: map.get($theme, '_meta', 'theme');
|
|
227
309
|
$bootstrap-theme: $variant == 'bootstrap';
|
|
228
310
|
$indigo-theme: $variant == 'indigo';
|
|
229
311
|
$group-item-min-width: map.get((
|
|
@@ -445,6 +527,7 @@
|
|
|
445
527
|
@if $variant == 'bootstrap' {
|
|
446
528
|
background: var-get($theme, 'item-background');
|
|
447
529
|
z-index: 1;
|
|
530
|
+
box-shadow: 0 0 0 rem(4px) var-get($theme, 'idle-shadow-color');
|
|
448
531
|
|
|
449
532
|
&:active {
|
|
450
533
|
background: var-get($theme, 'item-hover-background');
|
|
@@ -691,6 +774,7 @@
|
|
|
691
774
|
color: var-get($theme, 'item-selected-text-color');
|
|
692
775
|
border-color: var-get($theme, 'item-selected-border-color');
|
|
693
776
|
background: var-get($theme, 'item-selected-background');
|
|
777
|
+
box-shadow: 0 0 0 rem(4px) var-get($theme, 'selected-shadow-color');
|
|
694
778
|
|
|
695
779
|
igx-icon {
|
|
696
780
|
color: var-get($theme, 'item-selected-icon-color');
|