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.
Files changed (95) hide show
  1. package/fesm2022/igniteui-angular.mjs +9 -11
  2. package/fesm2022/igniteui-angular.mjs.map +1 -1
  3. package/index.d.ts +2 -2
  4. package/lib/core/styles/components/_common/_igx-vhelper.scss +1 -0
  5. package/lib/core/styles/components/action-strip/_action-strip-theme.scss +2 -7
  6. package/lib/core/styles/components/avatar/_avatar-theme.scss +7 -8
  7. package/lib/core/styles/components/badge/_badge-theme.scss +3 -8
  8. package/lib/core/styles/components/banner/_banner-theme.scss +6 -7
  9. package/lib/core/styles/components/bottom-nav/_bottom-nav-theme.scss +17 -28
  10. package/lib/core/styles/components/button/_button-theme.scss +219 -158
  11. package/lib/core/styles/components/button/_contained-button-theme.scss +302 -0
  12. package/lib/core/styles/components/button/_fab-button-theme.scss +296 -0
  13. package/lib/core/styles/components/button/_flat-button-theme.scss +356 -0
  14. package/lib/core/styles/components/button/_outlined-button-theme.scss +419 -0
  15. package/lib/core/styles/components/button-group/_button-group-theme.scss +113 -29
  16. package/lib/core/styles/components/calendar/_calendar-theme.scss +502 -112
  17. package/lib/core/styles/components/card/_card-theme.scss +5 -16
  18. package/lib/core/styles/components/carousel/_carousel-theme.scss +103 -23
  19. package/lib/core/styles/components/checkbox/_checkbox-component.scss +1 -1
  20. package/lib/core/styles/components/checkbox/_checkbox-theme.scss +63 -11
  21. package/lib/core/styles/components/chip/_chip-theme.scss +64 -47
  22. package/lib/core/styles/components/column-actions/_column-actions-theme.scss +2 -7
  23. package/lib/core/styles/components/combo/_combo-theme.scss +54 -12
  24. package/lib/core/styles/components/dialog/_dialog-theme.scss +9 -12
  25. package/lib/core/styles/components/divider/_divider-theme.scss +1 -6
  26. package/lib/core/styles/components/drop-down/_drop-down-theme.scss +52 -32
  27. package/lib/core/styles/components/expansion-panel/_expansion-panel-theme.scss +18 -13
  28. package/lib/core/styles/components/grid/_grid-theme.scss +115 -94
  29. package/lib/core/styles/components/grid/_pivot-data-selector-theme.scss +1 -6
  30. package/lib/core/styles/components/grid-summary/_grid-summary-theme.scss +12 -13
  31. package/lib/core/styles/components/grid-toolbar/_grid-toolbar-theme.scss +7 -12
  32. package/lib/core/styles/components/highlight/highlight-theme.scss +2 -3
  33. package/lib/core/styles/components/icon/_icon-theme.scss +0 -1
  34. package/lib/core/styles/components/icon-button/_contained-icon-button-theme.scss +196 -0
  35. package/lib/core/styles/components/icon-button/_flat-icon-button-theme.scss +188 -0
  36. package/lib/core/styles/components/icon-button/_icon-button-theme.scss +45 -32
  37. package/lib/core/styles/components/icon-button/_outlined-icon-button-theme.scss +232 -0
  38. package/lib/core/styles/components/input/_input-group-theme.scss +272 -21
  39. package/lib/core/styles/components/label/_label-theme.scss +2 -4
  40. package/lib/core/styles/components/list/_list-theme.scss +42 -66
  41. package/lib/core/styles/components/navbar/_navbar-theme.scss +25 -15
  42. package/lib/core/styles/components/navdrawer/_navdrawer-theme.scss +24 -22
  43. package/lib/core/styles/components/overlay/_overlay-theme.scss +0 -1
  44. package/lib/core/styles/components/paginator/_paginator-theme.scss +2 -7
  45. package/lib/core/styles/components/progress/circular/_circular-theme.scss +3 -8
  46. package/lib/core/styles/components/progress/linear/_linear-theme.scss +1 -6
  47. package/lib/core/styles/components/query-builder/_query-builder-theme.scss +28 -11
  48. package/lib/core/styles/components/radio/_radio-theme.scss +54 -10
  49. package/lib/core/styles/components/ripple/_ripple-theme.scss +0 -1
  50. package/lib/core/styles/components/scrollbar/scrollbar-theme.scss +0 -1
  51. package/lib/core/styles/components/select/_select-theme.scss +35 -7
  52. package/lib/core/styles/components/slider/_slider-theme.scss +92 -7
  53. package/lib/core/styles/components/snackbar/_snackbar-theme.scss +3 -8
  54. package/lib/core/styles/components/splitter/_splitter-theme.scss +15 -8
  55. package/lib/core/styles/components/stepper/_stepper-theme.scss +190 -22
  56. package/lib/core/styles/components/switch/_switch-theme.scss +112 -8
  57. package/lib/core/styles/components/tabs/_tabs-theme.scss +124 -56
  58. package/lib/core/styles/components/time-picker/_time-picker-theme.scss +35 -18
  59. package/lib/core/styles/components/toast/_toast-theme.scss +9 -10
  60. package/lib/core/styles/components/tooltip/_tooltip-theme.scss +2 -7
  61. package/lib/core/styles/components/tree/_tree-theme.scss +33 -10
  62. package/lib/core/styles/components/watermark/_watermark-theme.scss +0 -1
  63. package/lib/core/styles/themes/_core.scss +6 -0
  64. package/lib/core/styles/themes/generators/_base.scss +146 -58
  65. package/migrations/migration-collection.json +5 -0
  66. package/migrations/update-20_0_2/changes/theme-changes.json +11 -0
  67. package/migrations/update-20_0_2/index.d.ts +3 -0
  68. package/migrations/update-20_0_2/index.js +18 -0
  69. package/package.json +1 -1
  70. package/styles/igniteui-angular-dark.css +1 -1
  71. package/styles/igniteui-angular.css +1 -1
  72. package/styles/igniteui-bootstrap-dark.css +1 -1
  73. package/styles/igniteui-bootstrap-light.css +1 -1
  74. package/styles/igniteui-dark-green.css +1 -1
  75. package/styles/igniteui-fluent-dark-excel.css +1 -1
  76. package/styles/igniteui-fluent-dark-word.css +1 -1
  77. package/styles/igniteui-fluent-dark.css +1 -1
  78. package/styles/igniteui-fluent-light-excel.css +1 -1
  79. package/styles/igniteui-fluent-light-word.css +1 -1
  80. package/styles/igniteui-fluent-light.css +1 -1
  81. package/styles/igniteui-indigo-dark.css +1 -1
  82. package/styles/igniteui-indigo-light.css +1 -1
  83. package/styles/maps/igniteui-angular-dark.css.map +1 -1
  84. package/styles/maps/igniteui-angular.css.map +1 -1
  85. package/styles/maps/igniteui-bootstrap-dark.css.map +1 -1
  86. package/styles/maps/igniteui-bootstrap-light.css.map +1 -1
  87. package/styles/maps/igniteui-dark-green.css.map +1 -1
  88. package/styles/maps/igniteui-fluent-dark-excel.css.map +1 -1
  89. package/styles/maps/igniteui-fluent-dark-word.css.map +1 -1
  90. package/styles/maps/igniteui-fluent-dark.css.map +1 -1
  91. package/styles/maps/igniteui-fluent-light-excel.css.map +1 -1
  92. package/styles/maps/igniteui-fluent-light-word.css.map +1 -1
  93. package/styles/maps/igniteui-fluent-light.css.map +1 -1
  94. package/styles/maps/igniteui-indigo-dark.css.map +1 -1
  95. package/styles/maps/igniteui-indigo-light.css.map +1 -1
@@ -0,0 +1,302 @@
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 background and text colors in contained buttons
53
+ /// $my-button-theme: contained-button-theme(
54
+ /// $foreground: white,
55
+ /// $background: black
56
+ /// );
57
+ /// // Pass the theme to the css-vars() mixin
58
+ /// @include css-vars($my-button-theme);
59
+ @function contained-button-theme(
60
+ $schema: $light-material-schema,
61
+
62
+ $background: null,
63
+ $foreground: null,
64
+
65
+ $hover-background: null,
66
+ $hover-foreground: null,
67
+
68
+ $icon-color: $foreground,
69
+ $icon-color-hover: $hover-foreground,
70
+
71
+ $focus-background: null,
72
+ $focus-foreground: null,
73
+
74
+ $focus-hover-background: null,
75
+ $focus-hover-foreground: null,
76
+
77
+ $focus-visible-background: null,
78
+ $focus-visible-foreground: null,
79
+
80
+ $active-background: null,
81
+ $active-foreground: null,
82
+
83
+ $border-radius: null,
84
+ $border-color: null,
85
+ $hover-border-color: null,
86
+ $focus-border-color: null,
87
+ $focus-visible-border-color: null,
88
+ $active-border-color: null,
89
+
90
+ $shadow-color: null,
91
+
92
+ $resting-shadow: null,
93
+ $hover-shadow: null,
94
+ $focus-shadow: null,
95
+ $active-shadow: null,
96
+
97
+ $disabled-background: null,
98
+ $disabled-foreground: null,
99
+ $disabled-icon-color: $disabled-foreground,
100
+ $disabled-border-color: null,
101
+ $size: null
102
+ ) {
103
+ $name: 'igx-contained-button';
104
+ $button-schema: ();
105
+
106
+ @if map.has-key($schema, 'button') {
107
+ $button-schema: map.get($schema, 'button');
108
+ @if map.has-key($button-schema, 'contained') {
109
+ $button-schema: map.get($button-schema, 'contained');
110
+ } @else {
111
+ $button-schema: $schema;
112
+ }
113
+ }
114
+
115
+ $theme: digest-schema($button-schema);
116
+ $variant: map.get($schema, '_meta', 'theme');
117
+
118
+ @if not($hover-foreground) and $foreground {
119
+ $hover-foreground: var(--foreground);
120
+ }
121
+
122
+ @if not($focus-foreground) and $foreground {
123
+ $focus-foreground: var(--foreground);
124
+ }
125
+
126
+ @if not($focus-hover-foreground) and $foreground {
127
+ $focus-hover-foreground: var(--foreground);
128
+ }
129
+
130
+ @if not($focus-visible-foreground) and $foreground {
131
+ $focus-visible-foreground: var(--foreground);
132
+ }
133
+
134
+ @if not($active-foreground) and $foreground {
135
+ $active-foreground: var(--foreground);
136
+ }
137
+
138
+ @if not($icon-color-hover) and $icon-color {
139
+ $icon-color-hover: var(--icon-color);
140
+ }
141
+
142
+ @if not($foreground) and $background {
143
+ $foreground: adaptive-contrast(var(--background));
144
+ }
145
+
146
+ @if not($icon-color) and $background {
147
+ $icon-color: adaptive-contrast(var(--background));
148
+ }
149
+
150
+ @if $variant == 'indigo' {
151
+ @if not($hover-background) and $background {
152
+ $hover-background: hsl(from var(--background) h s calc(l * 1.08));
153
+ }
154
+ } @else {
155
+ @if not($hover-background) and $background {
156
+ $hover-background: hsl(from var(--background) h s calc(l * 1.05));
157
+ }
158
+ }
159
+
160
+ @if $variant == 'indigo' {
161
+ @if not($focus-background) and $background {
162
+ $focus-background: var(--background);
163
+ }
164
+ } @else {
165
+ @if not($focus-background) and $background {
166
+ $focus-background: hsl(from var(--background) h s calc(l * 1.1));
167
+ }
168
+ }
169
+
170
+ @if not($hover-foreground) and $hover-background {
171
+ $hover-foreground: adaptive-contrast(var(--hover-background));
172
+ }
173
+
174
+ @if not($icon-color-hover) and $hover-background {
175
+ $icon-color-hover: adaptive-contrast(var(--hover-background));
176
+ }
177
+
178
+ @if not($focus-foreground) and $focus-background {
179
+ $focus-foreground: adaptive-contrast(var(--focus-background));
180
+ }
181
+
182
+ @if not($focus-hover-background) and $hover-background {
183
+ $focus-hover-background: var(--hover-background);
184
+ }
185
+
186
+ @if not($focus-hover-foreground) and $focus-hover-background {
187
+ $focus-hover-foreground: adaptive-contrast(var(--focus-hover-background));
188
+ }
189
+
190
+ @if not($focus-visible-background) and $focus-background {
191
+ $focus-visible-background: var(--focus-background);
192
+ }
193
+
194
+ @if not($focus-visible-foreground) and $focus-visible-background {
195
+ $focus-visible-foreground: adaptive-contrast(var(--focus-visible-background));
196
+ }
197
+
198
+ @if $variant == 'fluent' {
199
+ @if not($focus-visible-border-color) and $focus-visible-foreground {
200
+ $focus-visible-border-color: var(--focus-visible-foreground);
201
+ }
202
+ }
203
+
204
+ @if $variant == 'fluent' or $variant == 'bootstrap' {
205
+ @if not($active-background) and $background {
206
+ $active-background: hsl(from var(--background) h s calc(l * 0.9));
207
+ }
208
+ } @else if $variant == 'material' {
209
+ @if not($active-background) and $focus-background {
210
+ $active-background: var(--focus-background);
211
+ }
212
+ } @else {
213
+ @if not($active-background) and $hover-background {
214
+ $active-background: var(--hover-background);
215
+ }
216
+ }
217
+
218
+ @if not($active-foreground) and $active-background {
219
+ $active-foreground: adaptive-contrast(var(--active-background));
220
+ }
221
+
222
+ @if $variant == 'bootstrap' or $variant == 'indigo' {
223
+ @if not($shadow-color) and $focus-visible-background {
224
+ $shadow-color: hsla(
225
+ from var(--focus-visible-background) h s l / 0.5
226
+ );
227
+ }
228
+
229
+ @if not($disabled-background) and $background {
230
+ $disabled-background: hsla(from var(--background) h s l / 0.5);
231
+ }
232
+
233
+ @if not($disabled-icon-color) and $disabled-foreground {
234
+ $disabled-icon-color: var(--disabled-foreground);
235
+ }
236
+
237
+ @if not($disabled-foreground) and $disabled-background {
238
+ $disabled-foreground: hsla(from adaptive-contrast(var(--disabled-background)) h s l / 0.5);
239
+ }
240
+
241
+ @if not($disabled-icon-color) and $disabled-background {
242
+ $disabled-icon-color: hsla(from adaptive-contrast(var(--disabled-background)) h s l / 0.5);
243
+ }
244
+ }
245
+
246
+ @if not($resting-shadow) {
247
+ $resting-elevation: map.get($button-schema, 'resting-elevation');
248
+ $resting-shadow: elevation($resting-elevation);
249
+ }
250
+
251
+ @if not($hover-shadow) {
252
+ $hover-elevation: map.get($button-schema, 'hover-elevation');
253
+ $hover-shadow: elevation($hover-elevation);
254
+ }
255
+
256
+ @if not($focus-shadow) {
257
+ $focus-elevation: map.get($button-schema, 'focus-elevation');
258
+ $focus-shadow: elevation($focus-elevation);
259
+ }
260
+
261
+ @if not($active-shadow) {
262
+ $active-elevation: map.get($button-schema, 'active-elevation');
263
+ $active-shadow: elevation($active-elevation);
264
+ }
265
+
266
+ @return extend(
267
+ $theme,
268
+ (
269
+ name: $name,
270
+ background: $background,
271
+ foreground: $foreground,
272
+ icon-color: $icon-color,
273
+ icon-color-hover: $icon-color-hover,
274
+ hover-background: $hover-background,
275
+ hover-foreground: $hover-foreground,
276
+ focus-background: $focus-background,
277
+ focus-foreground: $focus-foreground,
278
+ focus-hover-background: $focus-hover-background,
279
+ focus-hover-foreground: $focus-hover-foreground,
280
+ focus-visible-background: $focus-visible-background,
281
+ focus-visible-foreground: $focus-visible-foreground,
282
+ active-background: $active-background,
283
+ active-foreground: $active-foreground,
284
+ border-radius: $border-radius,
285
+ border-color: $border-color,
286
+ hover-border-color: $hover-border-color,
287
+ focus-border-color: $focus-border-color,
288
+ focus-visible-border-color: $focus-visible-border-color,
289
+ active-border-color: $active-border-color,
290
+ shadow-color: $shadow-color,
291
+ resting-shadow: $resting-shadow,
292
+ hover-shadow: $hover-shadow,
293
+ focus-shadow: $focus-shadow,
294
+ active-shadow: $active-shadow,
295
+ disabled-background: $disabled-background,
296
+ disabled-foreground: $disabled-foreground,
297
+ disabled-icon-color: $disabled-icon-color,
298
+ disabled-border-color: $disabled-border-color,
299
+ size: $size,
300
+ )
301
+ );
302
+ }
@@ -0,0 +1,296 @@
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 background and text colors in fab buttons
53
+ /// $my-button-theme: fab-button-theme(
54
+ /// $foreground: white,
55
+ /// $background: black
56
+ /// );
57
+ /// // Pass the theme to the css-vars() mixin
58
+ /// @include css-vars($my-button-theme);
59
+ @function fab-button-theme(
60
+ $schema: $light-material-schema,
61
+
62
+ $background: null,
63
+ $foreground: null,
64
+
65
+ $hover-background: null,
66
+ $hover-foreground: null,
67
+
68
+ $icon-color: $foreground,
69
+ $icon-color-hover: $hover-foreground,
70
+
71
+ $focus-background: null,
72
+ $focus-foreground: null,
73
+
74
+ $focus-hover-background: null,
75
+ $focus-hover-foreground: null,
76
+
77
+ $focus-visible-background: null,
78
+ $focus-visible-foreground: null,
79
+
80
+ $active-background: null,
81
+ $active-foreground: null,
82
+
83
+ $border-radius: null,
84
+ $border-color: null,
85
+ $hover-border-color: null,
86
+ $focus-border-color: null,
87
+ $focus-visible-border-color: null,
88
+ $active-border-color: null,
89
+
90
+ $shadow-color: null,
91
+
92
+ $resting-shadow: null,
93
+ $hover-shadow: null,
94
+ $focus-shadow: null,
95
+ $active-shadow: null,
96
+
97
+ $disabled-background: null,
98
+ $disabled-foreground: null,
99
+ $disabled-icon-color: $disabled-foreground,
100
+ $disabled-border-color: null,
101
+ $size: null
102
+ ) {
103
+ $name: 'igx-fab-button';
104
+ $button-schema: ();
105
+
106
+ @if map.has-key($schema, 'button') {
107
+ $button-schema: map.get($schema, 'button');
108
+ @if map.has-key($button-schema, 'fab') {
109
+ $button-schema: map.get($button-schema, 'fab');
110
+ } @else {
111
+ $button-schema: $schema;
112
+ }
113
+ }
114
+
115
+ $theme: digest-schema($button-schema);
116
+ $variant: map.get($schema, '_meta', 'theme');
117
+
118
+ @if not($foreground) and $background {
119
+ $foreground: adaptive-contrast(var(--background));
120
+ }
121
+
122
+ @if not($icon-color) and $background {
123
+ $icon-color: adaptive-contrast(var(--background));
124
+ }
125
+
126
+ @if $variant == 'indigo' {
127
+ @if not($hover-background) and $background {
128
+ $hover-background: hsl(from var(--background) h s calc(l * 1.08));
129
+ }
130
+ } @else {
131
+ @if not($hover-background) and $background {
132
+ $hover-background: hsl(from var(--background) h s calc(l * 1.05));
133
+ }
134
+ }
135
+
136
+ @if $variant == 'indigo' {
137
+ @if not($focus-background) and $background {
138
+ $focus-background: var(--background);
139
+ }
140
+ } @else {
141
+ @if not($focus-background) and $background {
142
+ $focus-background: hsl(from var(--background) h s calc(l * 1.1));
143
+ }
144
+ }
145
+
146
+ @if not($hover-foreground) and $hover-background {
147
+ $hover-foreground: if(
148
+ $foreground,
149
+ var(--foreground),
150
+ adaptive-contrast(var(--hover-background))
151
+ );
152
+ }
153
+
154
+ @if not($icon-color-hover) and $hover-background {
155
+ $icon-color-hover: if(
156
+ $icon-color,
157
+ var(--icon-color),
158
+ adaptive-contrast(var(--hover-background))
159
+ );
160
+ }
161
+
162
+ @if not($focus-foreground) and $focus-background {
163
+ $focus-foreground: if(
164
+ $foreground,
165
+ var(--foreground),
166
+ adaptive-contrast(var(--focus-background))
167
+ );
168
+ }
169
+
170
+ @if not($focus-hover-background) and $hover-background {
171
+ $focus-hover-background: var(--hover-background);
172
+ }
173
+
174
+ @if not($focus-hover-foreground) and $focus-hover-background {
175
+ $focus-hover-foreground: if(
176
+ $foreground,
177
+ var(--foreground),
178
+ adaptive-contrast(var(--focus-hover-background))
179
+ );
180
+ }
181
+
182
+ @if not($focus-visible-background) and $focus-background {
183
+ $focus-visible-background: var(--focus-background);
184
+ }
185
+
186
+ @if not($focus-visible-foreground) and $focus-visible-background {
187
+ $focus-visible-foreground: adaptive-contrast(
188
+ var(--focus-visible-background)
189
+ );
190
+ }
191
+
192
+ @if $variant == 'fluent' {
193
+ @if not($focus-visible-border-color) and $focus-visible-foreground {
194
+ $focus-visible-border-color: var(--focus-visible-foreground);
195
+ }
196
+ }
197
+
198
+ @if $variant == 'fluent' or $variant == 'bootstrap' {
199
+ @if not($active-background) and $background {
200
+ $active-background: hsl(from var(--background) h s calc(l * 0.9));
201
+ }
202
+ } @else if $variant == 'material' {
203
+ @if not($active-background) and $focus-background {
204
+ $active-background: var(--focus-background);
205
+ }
206
+ } @else {
207
+ @if not($active-background) and $hover-background {
208
+ $active-background: var(--hover-background);
209
+ }
210
+ }
211
+
212
+ @if not($active-foreground) and $active-background {
213
+ $active-foreground: adaptive-contrast(var(--active-background));
214
+ }
215
+
216
+ @if $variant == 'bootstrap' or $variant == 'indigo' {
217
+ @if not($shadow-color) and $focus-visible-background {
218
+ $shadow-color: hsla(
219
+ from var(--focus-visible-background) h s l / 0.5
220
+ );
221
+ }
222
+
223
+ @if not($disabled-background) and $background {
224
+ $disabled-background: hsla(from var(--background) h s l / 0.5);
225
+ }
226
+
227
+ @if not($disabled-icon-color) and $disabled-foreground {
228
+ $disabled-icon-color: var(--disabled-foreground);
229
+ }
230
+
231
+ @if not($disabled-foreground) and $disabled-background {
232
+ $disabled-foreground: hsla(from adaptive-contrast(var(--disabled-background)) h s l / 0.5);
233
+ }
234
+
235
+ @if not($disabled-icon-color) and $disabled-background {
236
+ $disabled-icon-color: hsla(from adaptive-contrast(var(--disabled-background)) h s l / 0.5);
237
+ }
238
+ }
239
+
240
+ @if not($resting-shadow) {
241
+ $resting-elevation: map.get($button-schema, 'resting-elevation');
242
+ $resting-shadow: elevation($resting-elevation);
243
+ }
244
+
245
+ @if not($hover-shadow) {
246
+ $hover-elevation: map.get($button-schema, 'hover-elevation');
247
+ $hover-shadow: elevation($hover-elevation);
248
+ }
249
+
250
+ @if not($focus-shadow) {
251
+ $focus-elevation: map.get($button-schema, 'focus-elevation');
252
+ $focus-shadow: elevation($focus-elevation);
253
+ }
254
+
255
+ @if not($active-shadow) {
256
+ $active-elevation: map.get($button-schema, 'active-elevation');
257
+ $active-shadow: elevation($active-elevation);
258
+ }
259
+
260
+ @return extend(
261
+ $theme,
262
+ (
263
+ name: $name,
264
+ background: $background,
265
+ foreground: $foreground,
266
+ icon-color: $icon-color,
267
+ icon-color-hover: $icon-color-hover,
268
+ hover-background: $hover-background,
269
+ hover-foreground: $hover-foreground,
270
+ focus-background: $focus-background,
271
+ focus-foreground: $focus-foreground,
272
+ focus-hover-background: $focus-hover-background,
273
+ focus-hover-foreground: $focus-hover-foreground,
274
+ focus-visible-background: $focus-visible-background,
275
+ focus-visible-foreground: $focus-visible-foreground,
276
+ active-background: $active-background,
277
+ active-foreground: $active-foreground,
278
+ border-radius: $border-radius,
279
+ border-color: $border-color,
280
+ hover-border-color: $hover-border-color,
281
+ focus-border-color: $focus-border-color,
282
+ focus-visible-border-color: $focus-visible-border-color,
283
+ active-border-color: $active-border-color,
284
+ shadow-color: $shadow-color,
285
+ resting-shadow: $resting-shadow,
286
+ hover-shadow: $hover-shadow,
287
+ focus-shadow: $focus-shadow,
288
+ active-shadow: $active-shadow,
289
+ disabled-background: $disabled-background,
290
+ disabled-foreground: $disabled-foreground,
291
+ disabled-icon-color: $disabled-icon-color,
292
+ disabled-border-color: $disabled-border-color,
293
+ size: $size,
294
+ )
295
+ );
296
+ }