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
@@ -91,7 +91,116 @@
91
91
  }
92
92
 
93
93
  $theme: digest-schema($switch-schema);
94
- $meta: map.get($theme, '_meta');
94
+ $variant: map.get($theme, '_meta', 'theme');
95
+
96
+ @if $variant == 'material' {
97
+ @if not($track-off-color) and $thumb-off-color {
98
+ $track-off-color: hsl(from var(--thumb-off-color) h s calc(l * 0.5));
99
+ }
100
+
101
+ @if not($thumb-off-color) and $track-off-color {
102
+ $thumb-off-color: hsl(from var(--track-off-color) h s calc(l * 1.3));
103
+ }
104
+
105
+ @if not($thumb-disabled-color) and $thumb-off-color {
106
+ $thumb-disabled-color: hsl(from var(--thumb-off-color) h s calc(l + 20));
107
+ }
108
+
109
+ @if not($track-on-color) and $thumb-on-color {
110
+ $track-on-color: hsl(from var(--thumb-on-color) h s calc(l * 1.3));
111
+ }
112
+
113
+ @if not($track-on-hover-color) and $track-on-color {
114
+ $track-on-hover-color: var(--track-on-color);
115
+ }
116
+
117
+ @if not($thumb-on-color) and $track-on-color {
118
+ $thumb-on-color: hsl(from var(--track-on-color) h s calc(l * 0.6));
119
+ }
120
+
121
+ @if not($thumb-on-disabled-color) and $thumb-on-color {
122
+ $thumb-on-disabled-color: hsl(from var(--thumb-on-color) h s calc(l + 20));
123
+ }
124
+ } @else {
125
+ @if not($thumb-off-color) and $track-off-color {
126
+ $thumb-off-color: hsla(from adaptive-contrast(var(--track-off-color)) h s l / 0.8);
127
+ }
128
+ @if not($border-color) and $thumb-off-color {
129
+ $border-color: var(--thumb-off-color);
130
+ }
131
+
132
+ @if not($thumb-off-color) and $border-color {
133
+ $thumb-off-color: var(--border-color);
134
+ }
135
+
136
+ @if not($border-hover-color) and $track-off-color {
137
+ $border-hover-color: hsla(from var(--thumb-off-color) h s l / 0.9);
138
+ }
139
+
140
+ @if not($border-hover-color) and $border-color {
141
+ $border-hover-color: hsl(from var(--border-color) h s calc(l * 0.8));
142
+ }
143
+
144
+ @if not($thumb-on-color) and $track-on-color {
145
+ $thumb-on-color: adaptive-contrast(var(--track-on-color));
146
+ }
147
+
148
+ @if not($track-on-hover-color) and $track-on-color {
149
+ $track-on-hover-color: hsl(from var(--track-on-color) h s calc(l * 0.9));
150
+ }
151
+
152
+ @if not($border-on-color) and $track-on-color {
153
+ $border-on-color: var(--track-on-color);
154
+ }
155
+
156
+ @if not($border-on-hover-color) and $border-on-color {
157
+ $border-on-hover-color: hsl(from var(--border-on-color) h s calc(l * 0.9));
158
+ }
159
+
160
+ @if not($thumb-disabled-color) and $thumb-off-color {
161
+ $thumb-disabled-color: hsla(from var(--thumb-off-color) h s l / 0.3);
162
+ }
163
+
164
+ @if not($border-disabled-color) and $border-color {
165
+ $border-disabled-color: hsla(from var(--border-color) h s l / 0.3);
166
+ }
167
+
168
+ @if not($thumb-on-disabled-color) and $thumb-on-color {
169
+ $thumb-on-disabled-color: hsla(from var(--thumb-on-color) h s l / 0.3);
170
+ }
171
+
172
+ @if $variant == 'bootstrap' {
173
+ @if not($focus-fill-color) and $track-on-color {
174
+ $focus-fill-color: hsl(from var(--track-on-color) h s calc(l * 1.2));
175
+ }
176
+
177
+ @if not($focus-outline-color) and $focus-fill-color {
178
+ $focus-outline-color: hsla(from var(--focus-fill-color) h s l / 0.5);
179
+ }
180
+
181
+ @if not($focus-fill-hover-color) and $focus-fill-color {
182
+ $focus-fill-hover-color: hsl(from var(--focus-fill-color) h s calc(l * 0.9));
183
+ }
184
+ }
185
+
186
+ @if $variant == 'indigo' {
187
+ @if not($focus-outline-color) and $border-color {
188
+ $focus-outline-color: hsla(from var(--border-color) h s l / 0.5);
189
+ }
190
+
191
+ @if not($focus-outline-color-focused) and $border-on-color {
192
+ $focus-outline-color-focused: hsla(from var(--border-on-color) h s l / 0.5);
193
+ }
194
+ }
195
+ }
196
+
197
+ @if not($track-disabled-color) and $track-off-color {
198
+ $track-disabled-color: hsla(from var(--track-off-color) h s l / 0.5);
199
+ }
200
+
201
+ @if not($track-on-disabled-color) and $track-on-color {
202
+ $track-on-disabled-color: hsla(from var(--track-on-color) h s l / 0.5);
203
+ }
95
204
 
96
205
  @if not($resting-shadow) {
97
206
  $resting-elevation: map.get($switch-schema, 'resting-elevation');
@@ -155,11 +264,6 @@
155
264
  focus-outline-color-focused: $focus-outline-color-focused,
156
265
  focus-fill-color: $focus-fill-color,
157
266
  focus-fill-hover-color: $focus-fill-hover-color,
158
- theme: map.get($schema, '_meta', 'theme'),
159
- _meta: map.merge(if($meta, $meta, ()), (
160
- variant: map.get($schema, '_meta', 'theme'),
161
- theme-variant: map.get($schema, '_meta', 'variant')
162
- )),
163
267
  ));
164
268
  }
165
269
 
@@ -170,8 +274,8 @@
170
274
  @include css-vars($theme);
171
275
  @include scale-in-out($start-scale: .9);
172
276
 
173
- $variant: map.get($theme, '_meta', 'variant');
174
- $theme-variant: map.get($theme, '_meta', 'theme-variant');
277
+ $variant: map.get($theme, '_meta', 'theme');
278
+ $theme-variant: map.get($theme, '_meta', 'variant');
175
279
 
176
280
  $switch-width: map.get((
177
281
  'material': 36px,
@@ -78,82 +78,155 @@
78
78
  }
79
79
 
80
80
  $theme: digest-schema($tabs-schema);
81
- $meta: map.get($theme, '_meta');
81
+ $variant: map.get($theme, '_meta', 'theme');
82
82
 
83
- @if not($item-text-color) and $item-background {
84
- @if meta.type-of($item-background) == 'color' {
85
- $item-text-color: rgba(text-contrast($item-background), .54);
86
- }
83
+ @if not($item-active-background) and $item-background {
84
+ $item-active-background: hsl(from var(--item-background) h s calc(l * 0.9));
87
85
  }
88
86
 
89
- @if not($item-hover-color) and $item-background {
90
- $item-hover-color: text-contrast($item-background);
91
- }
87
+ @if not($item-background) {
88
+ @if not($item-text-color) and $item-icon-color {
89
+ $item-text-color: var(--item-icon-color);
90
+ }
91
+
92
+ @if not($item-icon-color) and $item-text-color {
93
+ $item-icon-color: var(--item-text-color);
94
+ }
95
+ } @else {
96
+ @if not($item-text-color) and $item-background {
97
+ $item-text-color: hsla(from adaptive-contrast(var(--item-background)) h s l / 0.8);
98
+ }
92
99
 
93
- @if not($item-hover-color) and $item-hover-background {
94
- $item-hover-color: text-contrast($item-hover-background);
100
+ @if not($item-icon-color) and $item-background {
101
+ $item-icon-color: hsla(from adaptive-contrast(var(--item-background) h s l / 0.8));
102
+ }
95
103
  }
96
104
 
97
- @if not($item-active-icon-color) and $item-active-background {
98
- $item-active-icon-color: text-contrast($item-active-background);
105
+ @if not($item-active-background) {
106
+ @if $variant != 'bootstrap' {
107
+ @if not($item-active-icon-color) and $item-icon-color {
108
+ $item-active-icon-color: var(--item-icon-color);
109
+ }
110
+
111
+ @if not($item-active-color) and $item-text-color {
112
+ $item-active-color: var(--item-text-color);
113
+ }
114
+ }
115
+ } @else {
116
+ @if not($item-active-icon-color) and $item-active-color {
117
+ $item-active-icon-color: var(--item-active-color);
118
+ }
119
+
120
+ @if not($item-active-color) and $item-active-icon-color {
121
+ $item-active-color: var(--item-active-icon-color);
122
+ }
123
+
124
+ @if not($item-active-icon-color) and $item-active-background {
125
+ $item-active-icon-color: adaptive-contrast(var(--item-active-background));
126
+ }
127
+
128
+ @if not($item-active-color) and $item-active-background {
129
+ $item-active-color: adaptive-contrast(var(--item-active-background));
130
+ }
99
131
  }
100
132
 
101
- @if not($item-active-icon-color) and $item-background {
102
- $item-active-icon-color: text-contrast($item-background);
133
+ @if not($item-hover-background) {
134
+ @if not($item-hover-color) and $item-text-color {
135
+ $item-hover-color: hsla(from var(--item-text-color) h s l / 1);
136
+ }
137
+
138
+ @if not($item-hover-icon-color) and $item-icon-color {
139
+ $item-hover-icon-color: hsla(from var(--item-icon-color) h s l / 1);
140
+ }
141
+ } @else {
142
+ @if not($item-hover-color) {
143
+ $item-hover-color: adaptive-contrast(var(--item-hover-background));
144
+ }
145
+
146
+ @if not($item-hover-icon-color) {
147
+ $item-hover-icon-color: adaptive-contrast(var(--item-hover-background));
148
+ }
103
149
  }
104
150
 
105
- @if not($indicator-color) and $item-background {
106
- $indicator-color: text-contrast($item-background);
151
+ @if not($item-hover-background) and $item-background {
152
+ $item-hover-background: hsl(from var(--item-background) h s calc(l * 0.9));
107
153
  }
108
154
 
109
- @if not($item-active-color) and $item-active-icon-color {
110
- $item-active-color: $item-active-icon-color;
155
+ @if $variant == 'bootstrap' {
156
+ @if not($border-color) and $item-background {
157
+ $border-color: hsla(from adaptive-contrast(var(--item-background)) h s l / 0.5);
158
+ }
159
+
160
+ @if not($border-color--hover) and $border-color {
161
+ $border-color--hover: var(--border-color);
162
+ }
163
+ } @else {
164
+ @if not($item-background) {
165
+ @if not($indicator-color) and $item-text-color {
166
+ $indicator-color: var(--item-text-color);
167
+ }
168
+
169
+ @if not($indicator-color) and $item-icon-color {
170
+ $indicator-color: var(--item-icon-color);
171
+ }
172
+ } @else {
173
+ @if not($indicator-color) and $item-active-color {
174
+ $indicator-color: var(--item-active-color);
175
+ }
176
+
177
+ @if not($indicator-color) {
178
+ $indicator-color: adaptive-contrast(var(--item-background));
179
+ }
180
+ }
111
181
  }
112
182
 
113
183
  // Button
114
- @if not($button-color) and $item-background {
115
- $button-color: text-contrast($item-background);
116
- }
184
+ @if $item-background {
185
+ @if not($button-background) and $item-background {
186
+ $button-background: var(--item-background);
187
+ }
117
188
 
118
- @if not($button-color) and $button-background {
119
- $button-color: text-contrast($button-background);
120
- }
189
+ @if not($button-hover-background) and $item-background {
190
+ $button-hover-background: hsl(from var(--item-background) h s calc(l * 0.9));
191
+ }
192
+ } @else if not($button-background) {
193
+ @if $variant != 'material' {
194
+ @if not($button-color) and $item-text-color {
195
+ $button-color: var(--item-text-color);
196
+ }
197
+
198
+ @if not($button-hover-color) and $button-color {
199
+ $button-hover-color: hsl(from var(--button-color) h s calc(l * 0.9));
200
+ }
121
201
 
122
- @if not($button-color) and $item-background {
123
- $button-background: transparent;
202
+ @if not($button-disabled-color) and $button-color {
203
+ $button-disabled-color: hsla(from var(--button-color) h s l / 0.5);
204
+ }
205
+ }
124
206
  }
125
207
 
126
- @if not($button-hover-color) and $button-hover-background {
127
- $button-hover-color: text-contrast($button-hover-background);
208
+ @if $button-background {
209
+ @if not($button-hover-background) and $button-background {
210
+ $button-hover-background: hsl(from var(--button-background) h s calc(l * 0.9));
211
+ }
128
212
  }
129
213
 
130
- @if not($button-hover-background) and $item-background {
131
- $button-hover-color: text-contrast($item-background);
214
+ @if not($button-color) and $button-background {
215
+ $button-color: adaptive-contrast(var(--button-background));
132
216
  }
133
217
 
134
- @if not($button-background) and $item-background {
135
- @if meta.type-of($item-background) == 'color' and lightness($item-background) > 50 {
136
- $button-background: transparent;
137
- } @else {
138
- $button-background: rgba(255, 255, 255 , .1);
139
- }
218
+ @if not($button-hover-color) and $button-hover-background {
219
+ $button-hover-color: adaptive-contrast(var(--button-hover-background));
140
220
  }
141
221
 
142
- @if not($button-hover-background) and $item-background {
143
- @if meta.type-of($item-background) == 'color' and lightness($item-background) > 50 {
144
- $button-hover-background: rgba(0, 0, 0, .05);
145
- } @else {
146
- $button-hover-background: rgba(255, 255, 255 , .14);
147
- }
222
+ @if not($button-ripple-color) and $button-color {
223
+ $button-ripple-color: var(--button-color);
148
224
  }
149
225
 
150
- @if not($button-ripple-color) and $button-background {
151
- @if meta.type-of($item-background) == 'color' and lightness($item-background) > 50 {
152
- $button-ripple-color: rgba(0, 0, 0, .4);
153
- } @else {
154
- $button-ripple-color: rgba(255, 255, 255, .4);
155
- }
226
+ @if not($button-disabled-color) and $button-color {
227
+ $button-disabled-color: hsla(from var(--button-color) h s l / 0.4);
156
228
  }
229
+
157
230
  // Button end
158
231
 
159
232
  @if not($tab-ripple-color) and $item-active-background {
@@ -186,13 +259,8 @@
186
259
  tab-ripple-color: $tab-ripple-color,
187
260
  button-ripple-color: $button-ripple-color,
188
261
  border-color: $border-color,
189
- border-radius: $border-radius,
190
262
  border-color--hover: $border-color--hover,
191
- theme: map.get($schema, '_meta', 'theme'),
192
- _meta: map.merge(if($meta, $meta, ()), (
193
- variant: map.get($schema, '_meta', 'theme'),
194
- theme-variant: map.get($schema, '_meta', 'variant')
195
- )),
263
+ border-radius: $border-radius,
196
264
  ));
197
265
  }
198
266
 
@@ -204,11 +272,11 @@
204
272
  @mixin tabs($theme) {
205
273
  @include css-vars($theme);
206
274
 
207
- $variant: map.get($theme, '_meta', 'variant');
275
+ $variant: map.get($theme, '_meta', 'theme');
208
276
  $not-bootstrap-theme: $variant != 'bootstrap';
209
277
  $bootstrap-theme: $variant == 'bootstrap';
210
278
  $indigo-theme: $variant == 'indigo';
211
- $theme-variant: map.get($theme, '_meta', 'theme-variant');
279
+ $theme-variant: map.get($theme, '_meta', 'variant');
212
280
 
213
281
  $item-min-width: rem(90px);
214
282
  $item-max-width: rem(360px);
@@ -71,36 +71,57 @@
71
71
  }
72
72
 
73
73
  $theme: digest-schema($time-picker-schema);
74
- $meta: map.get($theme, '_meta');
75
74
 
76
75
  @if not($text-color) and $background-color {
77
- $text-color: text-contrast($background-color);
76
+ $text-color: hsla(from adaptive-contrast(var(--background-color)) h s l / 0.7);
77
+ }
78
+
79
+ @if not($hover-text-color) and $text-color {
80
+ $hover-text-color: hsla(from var(--text-color) h s l / 1);
81
+ }
82
+
83
+ @if not($header-background) and $selected-text-color {
84
+ $header-background: var(--selected-text-color);
85
+ }
86
+
87
+ @if not($header-background) and $background-color {
88
+ $header-background: var(--background-color);
78
89
  }
79
90
 
80
91
  @if not($header-hour-text-color) and $header-background {
81
- $header-hour-text-color: text-contrast($header-background);
92
+ $header-hour-text-color: adaptive-contrast(var(--header-background));
82
93
  }
83
94
 
84
95
  @if not($selected-text-color) and $active-item-background {
85
- $selected-text-color: text-contrast($active-item-background);
96
+ $selected-text-color: var(--active-item-background);
97
+ }
98
+
99
+ @if not($active-item-background) and $selected-text-color {
100
+ $active-item-background: var(--selected-text-color);
86
101
  }
87
102
 
88
103
  @if not($active-item-background) and $background-color {
89
- @if meta.type-of($background-color) == 'color' {
90
- $active-item-background: rgba(text-contrast($background-color), .12);
91
- }
104
+ $active-item-background: hsla(from adaptive-contrast(var(--background-color)) h s l / .5);
105
+ }
106
+
107
+ @if not($active-item-foreground) and $active-item-background {
108
+ $active-item-foreground: adaptive-contrast(var(--active-item-background));
109
+ }
110
+
111
+ @if not($selected-text-color) and $background-color {
112
+ $selected-text-color: adaptive-contrast(var(--background-color));
92
113
  }
93
114
 
94
115
  @if not($disabled-text-color) and $disabled-item-background {
95
- @if meta.type-of($disabled-item-background) == 'color' {
96
- $disabled-text-color: rgba(text-contrast($disabled-item-background), .6);
97
- }
116
+ $disabled-text-color: hsla(from adaptive-contrast(var(--disabled-item-background)) h s l / .6);
117
+ }
118
+
119
+ @if not($border-color) and $background-color {
120
+ $border-color: hsla(from adaptive-contrast(var(--background-color)) h s l / .6);
98
121
  }
99
122
 
100
123
  @if not($divider-color) and $border-color {
101
- @if meta.type-of($border-color) == 'color' {
102
- $divider-color: $border-color;
103
- }
124
+ $divider-color: var(--border-color);
104
125
  }
105
126
 
106
127
  @if not($modal-shadow) {
@@ -133,10 +154,6 @@
133
154
  divider-color: $divider-color,
134
155
  time-item-size: $time-item-size,
135
156
  active-item-border-radius: $active-item-border-radius,
136
- theme: map.get($schema, '_meta', 'theme'),
137
- _meta: map.merge(if($meta, $meta, ()), (
138
- variant: map.get($schema, '_meta', 'theme')
139
- )),
140
157
  ));
141
158
  }
142
159
 
@@ -146,7 +163,7 @@
146
163
  @mixin time-picker($theme) {
147
164
  @include css-vars($theme);
148
165
 
149
- $variant: map.get($theme, '_meta', 'variant');
166
+ $variant: map.get($theme, '_meta', 'theme');
150
167
  $not-bootstrap-theme: $variant != 'bootstrap';
151
168
 
152
169
  $picker-buttons-padding: map.get((
@@ -46,17 +46,20 @@
46
46
  }
47
47
 
48
48
  $theme: digest-schema($toast-schema);
49
- $meta: map.get($theme, '_meta');
49
+
50
+ @if not($text-color) and $background {
51
+ $text-color: adaptive-contrast(var(--background));
52
+ }
53
+
54
+ @if not($border-color) and $text-color {
55
+ $border-color: hsla(from var(--text-color) h s l / 0.3);
56
+ }
50
57
 
51
58
  @if not($shadow) {
52
59
  $elevation: map.get($toast-schema, 'elevation');
53
60
  $shadow: elevation($elevation);
54
61
  }
55
62
 
56
- @if not($text-color) and $background {
57
- $text-color: text-contrast($background);
58
- }
59
-
60
63
  @return extend($theme, (
61
64
  name: $name,
62
65
  background: $background,
@@ -64,10 +67,6 @@
64
67
  text-color: $text-color,
65
68
  border-color: $border-color,
66
69
  shadow: $shadow,
67
- theme: map.get($schema, '_meta', 'theme'),
68
- _meta: map.merge(if($meta, $meta, ()), (
69
- variant: map.get($schema, '_meta', 'theme')
70
- )),
71
70
  ));
72
71
  }
73
72
 
@@ -77,8 +76,8 @@
77
76
  /// @param {Map} $theme - The theme used to style the component.
78
77
  @mixin toast($theme) {
79
78
  @include css-vars($theme);
80
- $variant: map.get($theme, '_meta', 'variant');
81
79
 
80
+ $variant: map.get($theme, '_meta', 'theme');
82
81
  $width: rem(52px);
83
82
  $margin: rem(42px) auto;
84
83
 
@@ -43,7 +43,6 @@
43
43
  }
44
44
 
45
45
  $theme: digest-schema($tooltip-schema);
46
- $meta: map.get($theme, '_meta');
47
46
 
48
47
  @if not($shadow) {
49
48
  $elevation: map.get($tooltip-schema, 'elevation');
@@ -51,7 +50,7 @@
51
50
  }
52
51
 
53
52
  @if not($text-color) and $background {
54
- $text-color: text-contrast($background);
53
+ $text-color: adaptive-contrast($background);
55
54
  }
56
55
 
57
56
  @return extend($theme, (
@@ -61,10 +60,6 @@
61
60
  text-color: $text-color,
62
61
  border-radius: $border-radius,
63
62
  shadow: $shadow,
64
- theme: map.get($schema, '_meta', 'theme'),
65
- _meta: map.merge(if($meta, $meta, ()), (
66
- variant: map.get($schema, '_meta', 'theme')
67
- )),
68
63
  ));
69
64
  }
70
65
 
@@ -73,7 +68,7 @@
73
68
  /// @param {Map} $theme - The theme used to style the component.
74
69
  @mixin tooltip($theme) {
75
70
  @include css-vars($theme);
76
- $variant: map.get($theme, '_meta', 'variant');
71
+ $variant: map.get($theme, '_meta', 'theme');
77
72
 
78
73
  %tooltip-display {
79
74
  display: inline-flex;
@@ -62,22 +62,49 @@
62
62
  }
63
63
 
64
64
  $theme: digest-schema($tree-schema);
65
- $meta: map.get($theme, '_meta');
66
65
 
67
66
  @if not($foreground) and $background {
68
- $foreground: text-contrast($background);
67
+ $foreground: adaptive-contrast(var(--background));
68
+ }
69
+
70
+ @if not($background-selected) and $background {
71
+ $background-selected: hsl(from var(--background) h s calc(l * 0.9));
72
+ }
73
+
74
+ @if not($hover-color) and $background {
75
+ $hover-color: hsla(from adaptive-contrast(var(--background)) h s l / 0.1);
76
+ }
77
+
78
+ @if not($hover-selected-color) and $background-selected {
79
+ $hover-selected-color: hsl(from var(--background-selected) h s calc(l * 0.9));
69
80
  }
70
81
 
71
82
  @if not($foreground-selected) and $background-selected {
72
- $foreground-selected: text-contrast($background-selected);
83
+ $foreground-selected: adaptive-contrast(var(--background-selected));
84
+ }
85
+
86
+ @if not($background-active) and $background {
87
+ $background-active: hsl(from var(--background) h s calc(l * 0.9));
73
88
  }
74
89
 
75
90
  @if not($foreground-active) and $background-active {
76
- $foreground-active: text-contrast($background-active);
91
+ $foreground-active: adaptive-contrast(var(--background-active));
92
+ }
93
+
94
+ @if not($background-active-selected) and $background-active {
95
+ $background-active-selected: hsl(from var(--background-active) h s calc(l * 0.9));
77
96
  }
78
97
 
79
98
  @if not($foreground-active-selected) and $background-active-selected {
80
- $foreground-active-selected: text-contrast($background-active-selected);
99
+ $foreground-active-selected: adaptive-contrast(var(--background-active-selected));
100
+ }
101
+
102
+ @if not($background-disabled) and $background {
103
+ $background-disabled: color-mix(in hsl, var(--background), transparent 50%);
104
+ }
105
+
106
+ @if not($foreground-disabled) and $background-disabled {
107
+ $foreground-disabled: adaptive-contrast(var(--background-disabled));
81
108
  }
82
109
 
83
110
  @return extend($theme, (
@@ -98,10 +125,6 @@
98
125
  border-color: $border-color,
99
126
  hover-color: $hover-color,
100
127
  hover-selected-color: $hover-selected-color,
101
- theme: map.get($schema, '_meta', 'theme'),
102
- _meta: map.merge(if($meta, $meta, ()), (
103
- variant: map.get($schema, '_meta', 'theme')
104
- )),
105
128
  size: $size,
106
129
  ));
107
130
  }
@@ -112,7 +135,7 @@
112
135
  @mixin tree($theme) {
113
136
  @include css-vars($theme);
114
137
 
115
- $variant: map.get($theme, '_meta', 'variant');
138
+ $variant: map.get($theme, '_meta', 'theme');
116
139
  $indigo-theme: $variant == 'indigo';
117
140
 
118
141
  $node-indent-default: (
@@ -58,7 +58,6 @@
58
58
  color: $color,
59
59
  border-color: $border-color,
60
60
  border-radius: $border-radius,
61
- theme: map.get($schema, '_meta', 'theme'),
62
61
  ));
63
62
  }
64
63
 
@@ -124,6 +124,12 @@
124
124
  inherits: true;
125
125
  }
126
126
 
127
+ @property --vhelper-scollbar-size {
128
+ syntax: '<length>';
129
+ initial-value: 16px;
130
+ inherits: true;
131
+ }
132
+
127
133
  // Component styles
128
134
  @include ripple.component();
129
135
  @include action-strip.component();