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
@@ -52,28 +52,21 @@
52
52
  }
53
53
 
54
54
  $theme: digest-schema($card-schema);
55
- $meta: map.get($theme, '_meta');
56
55
 
57
56
  @if not($header-text-color) and $background {
58
- $header-text-color: text-contrast($background);
57
+ $header-text-color: adaptive-contrast(var(--background));
59
58
  }
60
59
 
61
60
  @if not($actions-text-color) and $background {
62
- @if meta.type-of($background) == 'color' {
63
- $actions-text-color: rgba(text-contrast($background), .5);
64
- }
61
+ $actions-text-color: adaptive-contrast(var(--background));
65
62
  }
66
63
 
67
64
  @if not($content-text-color) and $background {
68
- @if meta.type-of($background) == 'color' {
69
- $content-text-color: rgba(text-contrast($background), .7);
70
- }
65
+ $content-text-color: hsl(from adaptive-contrast(var(--background)) h s calc(l * 0.85));
71
66
  }
72
67
 
73
68
  @if not($subtitle-text-color) and $background {
74
- @if meta.type-of($background) == 'color' {
75
- $subtitle-text-color: rgba(text-contrast($background), .7);
76
- }
69
+ $subtitle-text-color: hsl(from adaptive-contrast(var(--background)) h s calc(l * 0.85));
77
70
  }
78
71
 
79
72
  @if not($resting-shadow) {
@@ -97,10 +90,6 @@
97
90
  actions-text-color: $actions-text-color,
98
91
  resting-shadow: $resting-shadow,
99
92
  hover-shadow: $hover-shadow,
100
- theme: map.get($schema, '_meta', 'theme'),
101
- _meta: map.merge(if($meta, $meta, ()), (
102
- variant: map.get($schema, '_meta', 'theme')
103
- )),
104
93
  ));
105
94
  }
106
95
 
@@ -110,7 +99,7 @@
110
99
  /// @param {Map} $theme - The theme used to style the component.
111
100
  @mixin card($theme) {
112
101
  @include css-vars($theme);
113
- $variant: map.get($theme, '_meta', 'variant');
102
+ $variant: map.get($theme, '_meta', 'theme');
114
103
  $not-material-theme: $variant != 'material';
115
104
 
116
105
  $card-heading-padding: rem(16px, 16px);
@@ -21,9 +21,13 @@
21
21
  /// @param {Color} $button-disabled-arrow-color [null] - The previous/next buttons disabled arrow color.
22
22
  /// @param {Color} $button-border-color [null] - The previous/next buttons idle border color.
23
23
  /// @param {Color} $button-hover-border-color [null] - The previous/next buttons hover border color.
24
+ /// @param {Color} $button-focus-border-color [null] - The navigation buttons border color on focus.
24
25
  /// @param {Color} $button-disabled-border-color [null] - The previous/next buttons disabled border color.
26
+ /// @param {Color} $indicator-background [null] - The indicators container background color.
27
+ /// @param {Color} $label-indicator-background [null] - The label indicator container background color.
25
28
  /// @param {Color} $indicator-dot-color [null] - The idle indicator dot color.
26
29
  /// @param {Color} $indicator-hover-dot-color [null] - The hover indicator dot color.
30
+ /// @param {Color} $indicator-focus-color [null] - The indicators border and dot color on focus.
27
31
  /// @param {Color} $indicator-border-color [null] - The idle indicator border color.
28
32
  /// @param {Color} $indicator-active-dot-color [null] - The active indicator dot color.
29
33
  /// @param {Color} $indicator-active-border-color [null] - The active indicator border color.
@@ -54,13 +58,18 @@
54
58
  $button-disabled-background: null,
55
59
  $button-arrow-color: null,
56
60
  $button-hover-arrow-color: null,
61
+ $button-focus-arrow-color: null,
57
62
  $button-disabled-arrow-color: null,
58
63
  $button-border-color: null,
59
64
  $button-hover-border-color: null,
65
+ $button-focus-border-color: null,
60
66
  $button-disabled-border-color: null,
61
67
 
68
+ $indicator-background: null,
69
+ $label-indicator-background: null,
62
70
  $indicator-dot-color: null,
63
71
  $indicator-hover-dot-color: null,
72
+ $indicator-focus-color: null,
64
73
  $indicator-border-color: null,
65
74
  $indicator-active-dot-color: null,
66
75
  $indicator-active-border-color: null,
@@ -76,7 +85,25 @@
76
85
  }
77
86
 
78
87
  $theme: digest-schema($carousel-schema);
79
- $meta: map.get($theme, '_meta');
88
+ $variant: map.get($theme, '_meta', 'theme');
89
+
90
+ @if $variant == 'indigo' {
91
+ @if not($button-hover-background) and $button-background {
92
+ $button-hover-background: hsl(from var(--button-background) h s calc(l * 0.9));
93
+ }
94
+
95
+ @if not($button-border-color) and $button-background {
96
+ $button-border-color: hsl(from var(--button-background) h s calc(l * 0.9));
97
+ }
98
+
99
+ @if not($button-hover-border-color) and $button-border-color {
100
+ $button-hover-border-color: hsl(from var(--button-border-color) h s calc(l * 0.9));
101
+ }
102
+
103
+ @if not($indicator-active-dot-color) and not($indicator-background) and $button-background {
104
+ $indicator-active-dot-color: var(--button-background);
105
+ }
106
+ }
80
107
 
81
108
  @if not($button-shadow) {
82
109
  $button-elevation: map.get($carousel-schema, 'button-elevation');
@@ -84,16 +111,80 @@
84
111
  }
85
112
 
86
113
  @if not($button-arrow-color) and $button-background {
87
- $button-arrow-color: text-contrast($button-background);
114
+ $button-arrow-color: hsla(from (adaptive-contrast(var(--button-background)) h s l / 0.85));
115
+ }
116
+
117
+ @if not($button-hover-background) and $button-background {
118
+ $button-hover-background: var(--button-background);
88
119
  }
89
120
 
90
121
  @if not($button-hover-arrow-color) and $button-hover-background {
91
- $button-hover-arrow-color: text-contrast($button-hover-background);
122
+ $button-hover-arrow-color: adaptive-contrast(var(--button-hover-background));
123
+ }
124
+
125
+ @if not($button-focus-arrow-color) and $button-hover-arrow-color {
126
+ $button-focus-arrow-color: var(--button-hover-arrow-color);
127
+ }
128
+
129
+ @if not($button-disabled-background) and $button-background {
130
+ $button-disabled-background: var(--button-background);
92
131
  }
93
132
 
94
133
  @if not($button-disabled-arrow-color) and $button-disabled-background {
95
- @if meta.type-of($button-disabled-background) == 'color' {
96
- $button-disabled-arrow-color: rgba(text-contrast($button-disabled-background), .3);
134
+ $button-disabled-arrow-color: hsla(from adaptive-contrast(var(--button-disabled-background)) h s l / .4);
135
+ }
136
+
137
+ @if not($indicator-dot-color) and $indicator-background {
138
+ $indicator-dot-color: hsla(from adaptive-contrast(var(--indicator-background)) h s l / .8);
139
+ }
140
+
141
+ @if not($indicator-hover-dot-color) and $indicator-dot-color {
142
+ $indicator-hover-dot-color: hsla(from var(--indicator-dot-color) h s l / 1);
143
+ }
144
+
145
+ @if not($indicator-border-color) and $indicator-dot-color {
146
+ $indicator-border-color: var(--indicator-dot-color);
147
+ }
148
+
149
+ @if not($indicator-active-dot-color) and $indicator-background {
150
+ $indicator-active-dot-color: hsl(from adaptive-contrast(var(--indicator-background)) h s calc(l * 0.9));
151
+ }
152
+
153
+ @if not($indicator-active-hover-dot-color) and $indicator-active-dot-color {
154
+ $indicator-active-hover-dot-color: hsl(from var(--indicator-active-dot-color) h s calc(l * 1.1));
155
+ }
156
+
157
+ @if not($indicator-active-border-color) and $indicator-active-dot-color {
158
+ $indicator-active-border-color: var(--indicator-active-dot-color);
159
+ }
160
+
161
+ @if $variant == 'material' {
162
+ @if not($button-focus-border-color) and $button-focus-arrow-color {
163
+ $button-focus-border-color: var(--button-focus-arrow-color);
164
+ }
165
+ }
166
+
167
+ @if $variant == 'fluent' or $variant == 'bootstrap' {
168
+ @if not($button-focus-border-color) and $button-background {
169
+ $button-focus-border-color: hsla(from adaptive-contrast(var(--button-background)) h s l / 0.5);
170
+ }
171
+ }
172
+
173
+ @if $variant == 'indigo' {
174
+ @if not($button-focus-border-color) and $indicator-active-dot-color {
175
+ $button-focus-border-color: var(--indicator-active-dot-color);
176
+ }
177
+
178
+ @if not($indicator-focus-color) and $indicator-active-hover-dot-color {
179
+ $indicator-focus-color: hsla(from var(--indicator-active-hover-dot-color) h s l / .5);
180
+ }
181
+ } @else {
182
+ @if not($indicator-focus-color) and not($indicator-background) and $button-background {
183
+ $indicator-focus-color: var(--button-background);
184
+ }
185
+
186
+ @if not($indicator-focus-color) and $indicator-background {
187
+ $indicator-focus-color: adaptive-contrast(var(--indicator-background));
97
188
  }
98
189
  }
99
190
 
@@ -110,21 +201,22 @@
110
201
  button-hover-background: $button-hover-background,
111
202
  button-arrow-color: $button-arrow-color,
112
203
  button-hover-arrow-color: $button-hover-arrow-color,
204
+ button-focus-arrow-color: $button-focus-arrow-color,
113
205
  button-disabled-arrow-color: $button-disabled-arrow-color,
114
206
  button-border-color: $button-border-color,
115
207
  button-hover-border-color: $button-hover-border-color,
208
+ button-focus-border-color: $button-focus-border-color,
116
209
  button-disabled-border-color: $button-disabled-border-color,
117
210
 
211
+ indicator-background: $indicator-background,
212
+ label-indicator-background: $label-indicator-background,
118
213
  indicator-dot-color: $indicator-dot-color,
119
214
  indicator-hover-dot-color: $indicator-hover-dot-color,
215
+ indicator-focus-color: $indicator-focus-color,
120
216
  indicator-border-color: $indicator-border-color,
121
217
  indicator-active-dot-color: $indicator-active-dot-color,
122
218
  indicator-active-border-color: $indicator-active-border-color,
123
219
  indicator-active-hover-dot-color: $indicator-active-hover-dot-color,
124
- theme: map.get($schema, '_meta', 'theme'),
125
- _meta: map.merge(if($meta, $meta, ()), (
126
- variant: map.get($schema, '_meta', 'theme')
127
- )),
128
220
  ));
129
221
  }
130
222
 
@@ -139,7 +231,7 @@
139
231
  $indicator-border-style: rem(2px) solid;
140
232
  $btn-indent: rem(3px);
141
233
 
142
- $variant: map.get($theme, '_meta', 'variant');
234
+ $variant: map.get($theme, '_meta', 'theme');
143
235
  $not-bootstrap-theme: $variant != 'bootstrap';
144
236
 
145
237
  %igx-carousel-display {
@@ -206,25 +298,17 @@
206
298
  border: rem(2px) solid var-get($theme, 'button-focus-border-color');
207
299
 
208
300
  igx-icon {
209
- color: var-get($theme, 'button-focus-border-color');
301
+ color: var-get($theme, 'button-focus-arrow-color');
210
302
  }
211
303
 
212
304
  @if $variant == 'bootstrap' {
213
305
  box-shadow: 0 0 0 rem(4px) var-get($theme, 'button-focus-border-color');
214
306
  border-color: var-get($theme, 'button-border-color');
215
-
216
- igx-icon {
217
- color: var-get($theme, 'button-arrow-color');
218
- }
219
307
  }
220
308
 
221
309
  @if $variant == 'fluent' {
222
310
  border: none;
223
311
 
224
- igx-icon {
225
- color: var-get($theme, 'indicator-focus-color');
226
- }
227
-
228
312
  &::after {
229
313
  position: absolute;
230
314
  content: '';
@@ -239,10 +323,6 @@
239
323
 
240
324
  @if $variant == 'indigo' {
241
325
  box-shadow: 0 0 0 rem(3px) var-get($theme, 'indicator-focus-color');
242
-
243
- igx-icon {
244
- color: var-get($theme, 'button-arrow-color');
245
- }
246
326
  }
247
327
  }
248
328
 
@@ -163,7 +163,7 @@
163
163
  @extend %igx-checkbox--focused-bootstrap !optional;
164
164
 
165
165
  &:hover {
166
- @extend %igx-checkbox--focused-hovered !optional;
166
+ @extend %igx-checkbox--focused-hovered-bootstrap !optional;
167
167
  }
168
168
  }
169
169
 
@@ -29,8 +29,11 @@
29
29
  /// @param {List} $border-radius [null] - The border radius used for checkbox component.
30
30
  /// @param {List} $border-radius-ripple [null] - The border radius used for checkbox ripple.
31
31
  /// @param {Color} $focus-outline-color [null] - The focus outlined color.
32
+ /// @param {Color} $focus-outline-color-focused [null] - The focus outlined color for focused state.
33
+ /// @param {Color} $focus-border-color [null] - The focus border color.
32
34
  /// @param {Color} $error-color [null] - The border and fill colors in invalid state.
33
35
  /// @param {Color} $error-color-hover [null] - The border and fill colors in invalid state on hover.
36
+ /// @param {Color} $focus-outline-color-error [null] - The focus outline error color.
34
37
  /// Set to light when the surrounding area is dark.
35
38
  ///
36
39
  /// @requires $light-material-schema
@@ -58,8 +61,11 @@
58
61
  $disabled-color-label: null,
59
62
  $border-radius-ripple: null,
60
63
  $focus-outline-color: null,
64
+ $focus-outline-color-focused: null,
65
+ $focus-border-color: null,
61
66
  $error-color: null,
62
67
  $error-color-hover: null,
68
+ $focus-outline-color-error: null,
63
69
  ) {
64
70
  $name: 'igx-checkbox';
65
71
  $checkbox-schema: ();
@@ -71,7 +77,55 @@
71
77
  }
72
78
 
73
79
  $theme: digest-schema($checkbox-schema);
74
- $meta: map.get($theme, '_meta');
80
+ $variant: map.get($theme, '_meta', 'theme');
81
+
82
+ @if not($empty-color-hover) and $empty-color {
83
+ $empty-color-hover: hsl(from var(--empty-color) h s calc(l * 0.9));
84
+ }
85
+
86
+ @if not($fill-color-hover) and $fill-color {
87
+ $fill-color-hover: hsl(from var(--fill-color) h s calc(l * 0.9));
88
+ }
89
+
90
+ @if not($tick-color) and $fill-color {
91
+ $tick-color: adaptive-contrast(var(--fill-color));
92
+ }
93
+
94
+ @if not($label-color-hover) and $label-color {
95
+ $label-color-hover: hsl(from var(--label-color) h s calc(l * 0.9));
96
+ }
97
+
98
+ @if not($focus-border-color) and $fill-color {
99
+ $focus-border-color: var(--fill-color);
100
+ }
101
+
102
+ @if not($disabled-indeterminate-color) and $fill-color {
103
+ $disabled-indeterminate-color: hsla(from var(--fill-color) h s l / 0.5);
104
+ }
105
+
106
+ @if not($error-color-hover) and $error-color {
107
+ $error-color-hover: hsl(from var(--error-color) h s calc(l * 0.9));
108
+ }
109
+
110
+ @if not($focus-outline-color-error) and $error-color {
111
+ $focus-outline-color-error: hsla(from var(--error-color) h s l / .5);
112
+ }
113
+
114
+ @if $variant == 'bootstrap' {
115
+ @if not($focus-outline-color) and $fill-color {
116
+ $focus-outline-color: hsla(from var(--fill-color) h s l / .5);
117
+ }
118
+ }
119
+
120
+ @if $variant == 'indigo' {
121
+ @if not($focus-outline-color) and $empty-color {
122
+ $focus-outline-color: hsla(from var(--empty-color) h s l / .5);
123
+ }
124
+
125
+ @if not($focus-outline-color-focused) and $fill-color {
126
+ $focus-outline-color-focused: hsla(from var(--fill-color) h s l / .5);
127
+ }
128
+ }
75
129
 
76
130
  @return extend($theme, (
77
131
  name: $name,
@@ -91,13 +145,11 @@
91
145
  border-radius: $border-radius,
92
146
  border-radius-ripple: $border-radius-ripple,
93
147
  focus-outline-color: $focus-outline-color,
148
+ focus-outline-color-focused: $focus-outline-color-focused,
149
+ focus-border-color: $focus-border-color,
94
150
  error-color: $error-color,
95
151
  error-color-hover: $error-color-hover,
96
- theme: map.get($schema, '_meta', 'theme'),
97
- _meta: map.merge(if($meta, $meta, ()), (
98
- variant: map.get($schema, '_meta', 'theme'),
99
- theme-variant: map.get($schema, '_meta', 'variant')
100
- )),
152
+ focus-outline-color-error: $focus-outline-color-error
101
153
  ));
102
154
  }
103
155
 
@@ -106,8 +158,8 @@
106
158
  /// @param {Map} $theme - The theme used to style the component.
107
159
  @mixin checkbox($theme) {
108
160
  @include css-vars($theme);
109
- $theme-variant: map.get($theme, '_meta', 'theme-variant');
110
- $variant: map.get($theme, '_meta', 'variant');
161
+ $theme-variant: map.get($theme, '_meta', 'variant');
162
+ $variant: map.get($theme, '_meta', 'theme');
111
163
  $material-theme: $variant == 'material';
112
164
  $bootstrap-theme: $variant == 'bootstrap';
113
165
 
@@ -591,14 +643,14 @@
591
643
  %igx-checkbox--focused-bootstrap {
592
644
  %cbx-composite {
593
645
  border-radius: var-get($theme, 'border-radius');
594
- border-color: color($color: 'primary', $variant: 200);
646
+ border-color: var-get($theme, 'focus-border-color');
595
647
  box-shadow: 0 0 0 rem(4px) var-get($theme, 'focus-outline-color');
596
648
  }
597
649
  }
598
650
 
599
- %igx-checkbox--focused-hovered {
651
+ %igx-checkbox--focused-hovered-bootstrap {
600
652
  %cbx-composite {
601
- border-color: color($color: 'primary', $variant: 300);
653
+ border-color: hsl(from var-get($theme, 'focus-border-color') h calc(s * 1.12) calc(l * 0.82));
602
654
  }
603
655
  }
604
656
 
@@ -106,94 +106,116 @@
106
106
  }
107
107
 
108
108
  $theme: digest-schema($chip-schema);
109
- $meta: map.get($theme, '_meta');
109
+ $variant: map.get($theme, '_meta', 'theme');
110
110
 
111
111
  @if not($text-color) and $background {
112
- $text-color: text-contrast($background);
112
+ $text-color: adaptive-contrast(var(--background));
113
113
  }
114
114
 
115
- @if not($hover-background) and $background {
116
- $luminance: luminance($background);
115
+ @if not($border-color) and $background {
116
+ $border-color: var(--background);
117
+ }
117
118
 
118
- @if meta.type-of($luminance) == 'color' and $luminance + .05 < .5 {
119
- $hover-background: color.scale($background, $lightness: 14%);
120
- } @else {
121
- $hover-background: color.scale($background, $lightness: -4%);
122
- }
119
+ @if not($hover-background) and $background {
120
+ $hover-background: hsl(from var(--background) h s calc(l * 0.9));
123
121
  }
124
122
 
125
123
  @if not($hover-text-color) and $hover-background {
126
- $hover-text-color: text-contrast(to-opaque($hover-background));
124
+ $hover-text-color: adaptive-contrast(var(--hover-background));
127
125
  }
128
126
 
129
127
  @if not($focus-background) and $background {
130
- $luminance: luminance($background);
128
+ $focus-background: hsl(from var(--background) h s calc(l * 0.8));
129
+ }
131
130
 
132
- @if meta.type-of($luminance) == 'color' and $luminance + .05 < .5 {
133
- $focus-background: color.scale($background, $lightness: 22%);
134
- } @else {
135
- $focus-background: color.scale($background, $lightness: -8%);
131
+ @if $variant == 'fluent' {
132
+ @if not($focus-background) and $selected-background {
133
+ $focus-background: var(--selected-background);
136
134
  }
137
135
  }
138
136
 
139
137
  @if not($focus-text-color) and $focus-background {
140
- $focus-text-color: text-contrast(to-opaque($focus-background));
138
+ $focus-text-color: adaptive-contrast(var(--focus-background));
141
139
  }
142
140
 
143
- @if not($selected-background) and $background {
144
- $luminance: luminance($background);
145
-
146
- @if meta.type-of($luminance) == 'color' and $luminance + .05 < .5 {
147
- $selected-background: color.scale($background, $lightness: 22%);
148
- } @else {
149
- $selected-background: color.scale($background, $lightness: -8%);
141
+ @if $variant != 'indigo' and $variant != 'fluent' {
142
+ @if not($selected-background) and $background {
143
+ $selected-background: var(--background);
144
+ }
145
+ } @else {
146
+ @if not($selected-background) and $background {
147
+ $selected-background: hsl(from var(--background) h s calc(l * 1.1));
150
148
  }
151
149
  }
152
150
 
153
151
  @if not($selected-text-color) and $selected-background {
154
- $selected-text-color: text-contrast(to-opaque($selected-background));
152
+ $selected-text-color: adaptive-contrast(var(--selected-background));
155
153
  }
156
154
 
157
- @if not($hover-selected-background) and $hover-background {
158
- $hover-selected-background: $hover-background;
155
+ @if not($hover-selected-background) and $selected-background {
156
+ $hover-selected-background: hsl(from var(--selected-background) h s calc(l * 0.9));
159
157
  }
160
158
 
161
159
  @if not($hover-selected-text-color) and $hover-selected-background {
162
- $hover-selected-text-color: text-contrast(to-opaque($hover-selected-background));
160
+ $hover-selected-text-color: adaptive-contrast(var(--hover-selected-background));
163
161
  }
164
162
 
165
- @if not($focus-selected-background) and $selected-background {
166
- $luminance: luminance($selected-background);
167
-
168
- @if meta.type-of($luminance) == 'color' and $luminance + .05 < .5 {
169
- $focus-selected-background: color.scale($background, $lightness: 32%);
170
- } @else {
171
- $focus-selected-background: color.scale($background, $lightness: -16%);
163
+ @if $variant != 'indigo' {
164
+ @if not($focus-selected-background) and $selected-background {
165
+ $focus-selected-background: hsl(from var(--selected-background) h s calc(l * 0.8));
166
+ }
167
+ } @else {
168
+ @if not($focus-selected-background) and $selected-background {
169
+ $focus-selected-background: var(--selected-background);
172
170
  }
173
171
  }
174
172
 
175
173
  @if not($focus-selected-text-color) and $focus-selected-background {
176
- $focus-selected-text-color: text-contrast(to-opaque($focus-selected-background));
174
+ $focus-selected-text-color: adaptive-contrast(var(--focus-selected-background));
177
175
  }
178
176
 
179
177
  @if not($hover-border-color) and $border-color {
180
- $hover-border-color: $border-color;
178
+ $hover-border-color: var(--border-color);
181
179
  }
182
180
 
183
181
  @if not($focus-border-color) and $border-color {
184
- $focus-border-color: $border-color;
182
+ $focus-border-color: var(--border-color);
185
183
  }
186
184
 
187
185
  @if not($selected-border-color) and $border-color {
188
- $selected-border-color: $border-color;
186
+ $selected-border-color: var(--border-color);
189
187
  }
190
188
 
191
189
  @if not($hover-selected-border-color) and $border-color {
192
- $hover-selected-border-color: $border-color;
190
+ $hover-selected-border-color: var(--border-color);
193
191
  }
194
192
 
195
193
  @if not($focus-selected-border-color) and $border-color {
196
- $focus-selected-border-color: $border-color;
194
+ $focus-selected-border-color: var(--border-color);
195
+ }
196
+
197
+ @if $variant == 'indigo' {
198
+ @if not($selected-border-color) and $selected-background {
199
+ $selected-border-color: var(--selected-background);
200
+ }
201
+
202
+ @if not($hover-selected-border-color) and $hover-selected-background {
203
+ $hover-selected-border-color: var(--hover-selected-background);
204
+ }
205
+
206
+ @if not($focus-selected-border-color) and $focus-selected-background {
207
+ $focus-selected-border-color: var(--focus-selected-background);
208
+ }
209
+ }
210
+
211
+ @if $variant == 'bootstrap' or $variant == 'indigo' {
212
+ @if not($focus-outline-color) and $focus-background {
213
+ $focus-outline-color: hsla(from var(--focus-background) h s l / 0.4);
214
+ }
215
+
216
+ @if not($focus-selected-outline-color) and $focus-selected-background {
217
+ $focus-selected-outline-color: hsla(from var(--focus-selected-background) h s l / 0.4);
218
+ }
197
219
  }
198
220
 
199
221
  @if not($ghost-shadow) {
@@ -240,11 +262,6 @@
240
262
  remove-icon-color-focus: $remove-icon-color-focus,
241
263
  focus-selected-outline-color: $focus-selected-outline-color,
242
264
  focus-outline-color: $focus-outline-color,
243
- theme: map.get($schema, '_meta', 'theme'),
244
- _meta: map.merge(if($meta, $meta, ()), (
245
- variant: map.get($schema, '_meta', 'theme'),
246
- theme-variant: map.get($schema, '_meta', 'variant')
247
- )),
248
265
  size: $size,
249
266
  ));
250
267
  }
@@ -256,8 +273,8 @@
256
273
  @include css-vars($theme);
257
274
  $chip-max-width: 32ch;
258
275
 
259
- $variant: map.get($theme, '_meta', 'variant');
260
- $theme-variant: map.get($theme, '_meta', 'theme-variant');
276
+ $variant: map.get($theme, '_meta', 'theme');
277
+ $theme-variant: map.get($theme, '_meta', 'variant');
261
278
 
262
279
  $chip-padding: (
263
280
  comfortable: rem(if($variant != 'indigo', 12px, 7px)),
@@ -37,20 +37,15 @@
37
37
  }
38
38
 
39
39
  $theme: digest-schema($column-actions-schema);
40
- $meta: map.get($theme, '_meta');
41
40
 
42
41
  @if not($title-color) and $background-color {
43
- $title-color: text-contrast($background-color);
42
+ $title-color: adaptive-contrast(var(--background-color));
44
43
  }
45
44
 
46
45
  @return extend($theme, (
47
46
  name: $name,
48
47
  title-color: $title-color,
49
48
  background-color: $background-color,
50
- theme: map.get($schema, '_meta', 'theme'),
51
- _meta: map.merge(if($meta, $meta, ()), (
52
- variant: map.get($schema, '_meta', 'theme'),
53
- )),
54
49
  ));
55
50
  }
56
51
 
@@ -59,7 +54,7 @@
59
54
  /// @param {Map} $theme - The theme used to style the component.
60
55
  @mixin column-actions($theme) {
61
56
  @include css-vars($theme);
62
- $variant: map.get($theme, '_meta', 'variant');
57
+ $variant: map.get($theme, '_meta', 'theme');
63
58
 
64
59
  %column-actions-display {
65
60
  display: flex;