igniteui-angular 20.0.7 → 20.0.9

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 (102) hide show
  1. package/fesm2022/igniteui-angular.mjs +143 -52
  2. package/fesm2022/igniteui-angular.mjs.map +1 -1
  3. package/index.d.ts +41 -5
  4. package/lib/core/styles/base/_index.scss +1 -0
  5. package/lib/core/styles/components/_index.scss +1 -0
  6. package/lib/core/styles/components/avatar/_avatar-theme.scss +0 -58
  7. package/lib/core/styles/components/badge/_badge-theme.scss +0 -72
  8. package/lib/core/styles/components/banner/_banner-theme.scss +0 -62
  9. package/lib/core/styles/components/bottom-nav/_bottom-nav-theme.scss +0 -100
  10. package/lib/core/styles/components/button/_button-theme.scss +0 -234
  11. package/lib/core/styles/components/button-group/_button-group-theme.scss +0 -293
  12. package/lib/core/styles/components/calendar/_calendar-theme.scss +0 -1075
  13. package/lib/core/styles/components/card/_card-theme.scss +0 -92
  14. package/lib/core/styles/components/carousel/_carousel-theme.scss +0 -218
  15. package/lib/core/styles/components/checkbox/_checkbox-theme.scss +0 -150
  16. package/lib/core/styles/components/chip/_chip-theme.scss +1 -265
  17. package/lib/core/styles/components/column-actions/_column-actions-theme.scss +0 -48
  18. package/lib/core/styles/components/combo/_combo-theme.scss +9 -125
  19. package/lib/core/styles/components/date-picker/_date-picker-theme.scss +4 -0
  20. package/lib/core/styles/components/date-range-picker/_date-range-picker-theme.scss +0 -30
  21. package/lib/core/styles/components/dialog/_dialog-theme.scss +0 -75
  22. package/lib/core/styles/components/divider/_divider-theme.scss +0 -39
  23. package/lib/core/styles/components/dock-manager/_dock-manager-theme.scss +0 -68
  24. package/lib/core/styles/components/drop-down/_drop-down-theme.scss +0 -211
  25. package/lib/core/styles/components/expansion-panel/_expansion-panel-theme.scss +0 -96
  26. package/lib/core/styles/components/grid/_excel-filtering-theme.scss +0 -1
  27. package/lib/core/styles/components/grid/_grid-theme.scss +44 -600
  28. package/lib/core/styles/components/grid-summary/_grid-summary-theme.scss +0 -84
  29. package/lib/core/styles/components/grid-toolbar/_grid-toolbar-theme.scss +0 -92
  30. package/lib/core/styles/components/highlight/highlight-theme.scss +0 -55
  31. package/lib/core/styles/components/icon/_icon-theme.scss +0 -43
  32. package/lib/core/styles/components/icon-button/_icon-button-theme.scss +0 -112
  33. package/lib/core/styles/components/input/_file-input-component.scss +72 -0
  34. package/lib/core/styles/components/input/_file-input-theme.scss +203 -0
  35. package/lib/core/styles/components/input/_input-group-component.scss +110 -126
  36. package/lib/core/styles/components/input/_input-group-theme.scss +409 -648
  37. package/lib/core/styles/components/label/_label-theme.scss +2 -35
  38. package/lib/core/styles/components/list/_list-theme.scss +0 -264
  39. package/lib/core/styles/components/navbar/_navbar-theme.scss +0 -89
  40. package/lib/core/styles/components/navdrawer/_navdrawer-theme.scss +0 -141
  41. package/lib/core/styles/components/overlay/_overlay-theme.scss +0 -38
  42. package/lib/core/styles/components/paginator/_paginator-theme.scss +0 -50
  43. package/lib/core/styles/components/progress/circular/_circular-theme.scss +0 -73
  44. package/lib/core/styles/components/progress/linear/_linear-theme.scss +0 -68
  45. package/lib/core/styles/components/query-builder/_query-builder-theme.scss +0 -101
  46. package/lib/core/styles/components/radio/_radio-theme.scss +0 -136
  47. package/lib/core/styles/components/rating/_rating-theme.scss +0 -43
  48. package/lib/core/styles/components/ripple/_ripple-theme.scss +0 -39
  49. package/lib/core/styles/components/scrollbar/scrollbar-theme.scss +0 -82
  50. package/lib/core/styles/components/select/_select-theme.scss +0 -93
  51. package/lib/core/styles/components/slider/_slider-theme.scss +0 -187
  52. package/lib/core/styles/components/snackbar/_snackbar-theme.scss +0 -64
  53. package/lib/core/styles/components/splitter/_splitter-theme.scss +0 -71
  54. package/lib/core/styles/components/stepper/_stepper-theme.scss +0 -492
  55. package/lib/core/styles/components/switch/_switch-theme.scss +0 -264
  56. package/lib/core/styles/components/tabs/_tabs-theme.scss +2 -261
  57. package/lib/core/styles/components/time-picker/_time-picker-theme.scss +0 -156
  58. package/lib/core/styles/components/toast/_toast-theme.scss +0 -69
  59. package/lib/core/styles/components/tooltip/_tooltip-theme.scss +0 -62
  60. package/lib/core/styles/components/tree/_tree-theme.scss +0 -128
  61. package/lib/core/styles/components/watermark/_watermark-theme.scss +0 -60
  62. package/lib/core/styles/themes/_core.scss +2 -0
  63. package/lib/core/styles/themes/_index.scss +1 -0
  64. package/lib/core/styles/themes/generators/_base.scss +11 -0
  65. package/lib/core/styles/typography/_bootstrap.scss +4 -0
  66. package/lib/core/styles/typography/_fluent.scss +5 -0
  67. package/lib/core/styles/typography/_indigo.scss +6 -0
  68. package/lib/core/styles/typography/_material.scss +2 -0
  69. package/package.json +2 -2
  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
  96. package/lib/core/styles/components/button/_contained-button-theme.scss +0 -302
  97. package/lib/core/styles/components/button/_fab-button-theme.scss +0 -296
  98. package/lib/core/styles/components/button/_flat-button-theme.scss +0 -356
  99. package/lib/core/styles/components/button/_outlined-button-theme.scss +0 -419
  100. package/lib/core/styles/components/icon-button/_contained-icon-button-theme.scss +0 -196
  101. package/lib/core/styles/components/icon-button/_flat-icon-button-theme.scss +0 -188
  102. package/lib/core/styles/components/icon-button/_outlined-icon-button-theme.scss +0 -232
@@ -1,419 +0,0 @@
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
- }
@@ -1,196 +0,0 @@
1
- @use 'sass:map';
2
- @use '../../base' as *;
3
- @use '../../themes/schemas' as *;
4
-
5
- @function contained-icon-button-theme(
6
- $schema: $light-material-schema,
7
-
8
- $background: null,
9
- $foreground: null,
10
- $shadow-color: null,
11
-
12
- $hover-background: null,
13
- $hover-foreground: null,
14
-
15
- $focus-background: null,
16
- $focus-foreground: null,
17
-
18
- $focus-hover-background: null,
19
- $focus-hover-foreground: null,
20
-
21
- $active-background: null,
22
- $active-foreground: null,
23
-
24
- $border-radius: null,
25
- $border-color: null,
26
- $focus-border-color: null,
27
-
28
- $disabled-background: null,
29
- $disabled-foreground: null,
30
- $disabled-border-color: null,
31
-
32
- $size: null,
33
- ) {
34
- $name: 'igx-contained-icon-button';
35
- $icon-button-schema: ();
36
-
37
- @if map.has-key($schema, 'icon-button') {
38
- $icon-button-schema: map.get($schema, 'icon-button');
39
- @if map.has-key($icon-button-schema, 'contained') {
40
- $icon-button-schema: map.get($icon-button-schema, 'contained');
41
- } @else {
42
- $icon-button-schema: $schema;
43
- }
44
- }
45
-
46
- $theme: digest-schema($icon-button-schema);
47
- $variant: map.get($schema, '_meta', 'theme');
48
-
49
- @if not($hover-foreground) and $foreground {
50
- $hover-foreground: var(--foreground);
51
- }
52
-
53
- @if not($focus-foreground) and $foreground {
54
- $focus-foreground: var(--foreground);
55
- }
56
-
57
- @if not($focus-hover-foreground) and $foreground {
58
- $focus-hover-foreground: var(--foreground);
59
- }
60
-
61
- @if not($active-foreground) and $foreground {
62
- $active-foreground: var(--foreground);
63
- }
64
-
65
- @if $variant == 'indigo' {
66
- @if not($foreground) and $background {
67
- $foreground: hsla(from adaptive-contrast(var(--background)) h s l / 0.8);
68
- }
69
-
70
- @if not($hover-background) and $background {
71
- $hover-background: hsl(from var(--background) h s calc(l * 1.1));
72
- }
73
-
74
- @if not($focus-background) and $background {
75
- $focus-background: var(--background);
76
- }
77
-
78
- @if not($focus-foreground) and $foreground {
79
- $focus-foreground: var(--foreground);
80
- }
81
-
82
- @if not($focus-hover-background) and $focus-background {
83
- $focus-hover-background: hsl(from var(--focus-background) h s calc(l * 1.1));
84
- }
85
-
86
- @if not($active-background) and $background {
87
- $active-background: hsl(from var(--background) h s calc(l * 1.1));
88
- }
89
- } @else {
90
- @if not($foreground) and $background {
91
- $foreground: adaptive-contrast(var(--background));
92
- }
93
-
94
- @if not($hover-background) and $background {
95
- $hover-background: hsl(from var(--background) h s calc(l * 0.9));
96
- }
97
-
98
- @if not($focus-background) and $background {
99
- @if $variant == 'fluent' or $variant == 'bootstrap' {
100
- $focus-background: var(--background);
101
- } @else {
102
- $focus-background: hsl(from var(--background) h s calc(l * 0.8));
103
- }
104
- }
105
-
106
- @if not($focus-foreground) and $focus-background {
107
- $focus-foreground: adaptive-contrast(var(--focus-background));
108
- }
109
-
110
- @if not($focus-hover-background) and $focus-background {
111
- $focus-hover-background: hsl(from var(--focus-background) h s calc(l * 0.9));
112
- }
113
-
114
- @if not($active-background) and $background {
115
- $active-background: hsl(from var(--background) h s calc(l * 0.8));
116
- }
117
- }
118
-
119
- @if not($hover-foreground) and $hover-background {
120
- $hover-foreground: adaptive-contrast(var(--hover-background));
121
- }
122
-
123
- @if not($focus-hover-foreground) and $focus-hover-background {
124
- $focus-hover-foreground: adaptive-contrast(var(--focus-hover-background));
125
- }
126
-
127
- @if not($active-foreground) and $active-background {
128
- $active-foreground: adaptive-contrast(var(--active-background));
129
- }
130
-
131
- @if not($shadow-color) and $focus-background {
132
- $shadow-color: hsla(from var(--focus-background) h s l / 0.5);
133
- }
134
-
135
- @if $variant == 'fluent' {
136
- @if not($focus-border-color) and $foreground {
137
- $focus-border-color: var(--foreground);
138
- }
139
- } @else {
140
- @if not($focus-border-color) and $border-color {
141
- $focus-border-color: hsl(from var(--border-color) h s calc(l * 0.8));
142
- }
143
- }
144
-
145
- @if $variant == 'indigo' {
146
- @if not($disabled-background) and $background {
147
- $disabled-background: hsla(from var(--background) h s l / 0.4);
148
- }
149
-
150
- @if not($disabled-foreground) and $foreground {
151
- $disabled-foreground: hsla(from var(--foreground) h s l / 0.5);
152
- }
153
-
154
- @if not($focus-border-color) and $focus-background {
155
- $focus-border-color: hsla(from var(--focus-background) h s l / 0.3);
156
- }
157
- } @else if $variant == 'bootstrap' {
158
- @if not($disabled-background) and $background {
159
- $disabled-background: hsla(from var(--background) h s l / 0.2);
160
- }
161
-
162
- @if not($disabled-foreground) and $disabled-background {
163
- $disabled-foreground: hsla(from var(--disabled-background) h s l / 0.7);
164
- }
165
- }
166
-
167
- @return extend(
168
- $theme,
169
- (
170
- name: $name,
171
- background: $background,
172
- foreground: $foreground,
173
- shadow-color: $shadow-color,
174
-
175
- hover-background: $hover-background,
176
- hover-foreground: $hover-foreground,
177
-
178
- focus-background: $focus-background,
179
- focus-foreground: $focus-foreground,
180
-
181
- focus-hover-background: $focus-hover-background,
182
- focus-hover-foreground: $focus-hover-foreground,
183
-
184
- active-background: $active-background,
185
- active-foreground: $active-foreground,
186
-
187
- border-radius: $border-radius,
188
- border-color: $border-color,
189
- focus-border-color: $focus-border-color,
190
-
191
- disabled-background: $disabled-background,
192
- disabled-foreground: $disabled-foreground,
193
- disabled-border-color: $disabled-border-color,
194
- size: $size,
195
- ));
196
- }