1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | @use 'sass:map';
|
28 | @use 'sass:math';
|
29 | @use 'sass:color';
|
30 | @use '@material/dom/dom';
|
31 | @use '@material/density/density';
|
32 | @use '@material/feature-targeting/feature-targeting';
|
33 | @use '@material/shape/shape';
|
34 | @use '@material/ripple/ripple-theme';
|
35 | @use '@material/rtl/rtl';
|
36 | @use '@material/theme/theme';
|
37 | @use '@material/theme/keys';
|
38 | @use '@material/elevation/elevation-theme';
|
39 | @use '@material/tokens/resolvers';
|
40 | @use '@material/theme/state';
|
41 | @use '@material/theme/theme-color';
|
42 | @use '@material/typography/typography';
|
43 |
|
44 | $height: 32px;
|
45 | $minimum-height: 24px;
|
46 | $maximum-height: $height;
|
47 | $density-scale: density.$default-scale;
|
48 | $density-config: (
|
49 | height: (
|
50 | default: $height,
|
51 | maximum: $maximum-height,
|
52 | minimum: $minimum-height,
|
53 | ),
|
54 | );
|
55 | $radius: math.div($height, 2);
|
56 | $type-scale: body2;
|
57 | $container-color: color.mix(
|
58 | theme-color.prop-value(on-surface),
|
59 | theme-color.prop-value(surface),
|
60 | 12%
|
61 | );
|
62 | $text-label-color: rgba(theme-color.prop-value(on-surface), 0.87);
|
63 | $icon-color: rgba(theme-color.prop-value(on-surface), 0.87);
|
64 | $checkmark-color: rgba(theme-color.prop-value(on-surface), 0.87);
|
65 | $trailing-action-color: rgba(theme-color.prop-value(on-surface), 0.87);
|
66 | $ripple-color: on-surface;
|
67 | $checkmark-size: 20px;
|
68 | $leading-icon-size: 20px;
|
69 | $trailing-action-size: 18px;
|
70 | $leading-padding: 12px;
|
71 | $trailing-padding: 12px;
|
72 | $avatar-size: 24px;
|
73 | $avatar-leading-padding: 4px;
|
74 | $avatar-trailing-padding: 8px;
|
75 | $graphic-leading-padding: 6px;
|
76 | $graphic-trailing-padding: 6px;
|
77 | $trailing-action-leading-padding: 8px;
|
78 | $trailing-action-trailing-padding: 8px;
|
79 | $ripple-target: '.mdc-evolution-chip__ripple';
|
80 | $ripple-target-primary: '.mdc-evolution-chip__ripple--primary';
|
81 | $ripple-target-trailing: '.mdc-evolution-chip__ripple--trailing';
|
82 |
|
83 |
|
84 | $filter-selected-container-color: color.mix(
|
85 | theme-color.prop-value(on-surface),
|
86 | $container-color,
|
87 | 8%
|
88 | );
|
89 |
|
90 | $_light-theme: (
|
91 | container-elevation: null,
|
92 | container-height: null,
|
93 | container-shadow-color: null,
|
94 | container-shape: null,
|
95 | disabled-label-text-color: null,
|
96 | disabled-label-text-opacity: null,
|
97 | disabled-outline-color: null,
|
98 | disabled-outline-opacity: null,
|
99 | elevated-container-color: null,
|
100 | elevated-container-elevation: null,
|
101 | elevated-container-shadow-color: null,
|
102 | container-surface-tint-layer-color: null,
|
103 | elevated-disabled-container-color: null,
|
104 | elevated-disabled-container-elevation: null,
|
105 | elevated-disabled-container-opacity: null,
|
106 | elevated-focus-container-elevation: null,
|
107 | elevated-hover-container-elevation: null,
|
108 | elevated-pressed-container-elevation: null,
|
109 | elevated-selected-container-color: null,
|
110 | elevated-selected-container-elevation: null,
|
111 | elevated-unselected-container-color: null,
|
112 | flat-container-elevation: null,
|
113 | flat-disabled-outline-color: null,
|
114 | flat-disabled-outline-opacity: null,
|
115 | flat-disabled-selected-outline-color: null,
|
116 | flat-disabled-selected-outline-opacity: null,
|
117 | flat-disabled-unselected-outline-color: null,
|
118 | flat-disabled-unselected-outline-opacity: null,
|
119 | flat-focus-outline-color: null,
|
120 | flat-outline-color: null,
|
121 | flat-outline-width: null,
|
122 | flat-selected-container-color: null,
|
123 | flat-selected-focus-container-elevation: null,
|
124 | flat-selected-hover-container-elevation: null,
|
125 | flat-selected-outline-color: null,
|
126 | flat-selected-outline-width: null,
|
127 | flat-selected-pressed-container-elevation: null,
|
128 | flat-unselected-focus-container-elevation: null,
|
129 | flat-unselected-focus-outline-color: null,
|
130 | flat-unselected-hover-container-elevation: null,
|
131 | flat-unselected-outline-color: null,
|
132 | flat-unselected-outline-width: null,
|
133 | flat-unselected-pressed-container-elevation: null,
|
134 | focus-label-text-color: null,
|
135 | focus-outline-color: null,
|
136 | focus-state-layer-color: null,
|
137 | focus-state-layer-opacity: null,
|
138 | hover-label-text-color: null,
|
139 | hover-state-layer-color: null,
|
140 | hover-state-layer-opacity: null,
|
141 | label-text-color: null,
|
142 | label-text-font: null,
|
143 | label-text-line-height: null,
|
144 | label-text-size: null,
|
145 | label-text-tracking: null,
|
146 | label-text-weight: null,
|
147 | outline-color: null,
|
148 | outline-width: null,
|
149 | pressed-label-text-color: null,
|
150 | pressed-state-layer-color: null,
|
151 | pressed-state-layer-opacity: null,
|
152 | selected-focus-label-text-color: null,
|
153 | selected-focus-state-layer-color: null,
|
154 | selected-focus-state-layer-opacity: null,
|
155 | selected-hover-label-text-color: null,
|
156 | selected-hover-state-layer-color: null,
|
157 | selected-hover-state-layer-opacity: null,
|
158 | selected-label-text-color: null,
|
159 | selected-pressed-label-text-color: null,
|
160 | selected-pressed-state-layer-color: null,
|
161 | selected-pressed-state-layer-opacity: null,
|
162 | unselected-focus-label-text-color: null,
|
163 | unselected-focus-state-layer-color: null,
|
164 | unselected-focus-state-layer-opacity: null,
|
165 | unselected-hover-label-text-color: null,
|
166 | unselected-hover-state-layer-color: null,
|
167 | unselected-hover-state-layer-opacity: null,
|
168 | unselected-label-text-color: null,
|
169 | unselected-pressed-label-text-color: null,
|
170 | unselected-pressed-state-layer-color: null,
|
171 | unselected-pressed-state-layer-opacity: null,
|
172 | with-avatar-avatar-shape: null,
|
173 | with-avatar-avatar-size: null,
|
174 | with-avatar-disabled-avatar-opacity: null,
|
175 | with-icon-disabled-icon-color: null,
|
176 | with-icon-disabled-icon-opacity: null,
|
177 | with-icon-focus-icon-color: null,
|
178 | with-icon-hover-icon-color: null,
|
179 | with-icon-icon-color: null,
|
180 | with-icon-icon-size: null,
|
181 | with-icon-pressed-icon-color: null,
|
182 | with-icon-selected-focus-icon-color: null,
|
183 | with-icon-selected-hover-icon-color: null,
|
184 | with-icon-selected-icon-color: null,
|
185 | with-icon-selected-pressed-icon-color: null,
|
186 | with-icon-unselected-focus-icon-color: null,
|
187 | with-icon-unselected-hover-icon-color: null,
|
188 | with-icon-unselected-icon-color: null,
|
189 | with-icon-unselected-pressed-icon-color: null,
|
190 | with-leading-icon-disabled-leading-icon-color: null,
|
191 | with-leading-icon-disabled-leading-icon-opacity: null,
|
192 | with-leading-icon-focus-leading-icon-color: null,
|
193 | with-leading-icon-hover-leading-icon-color: null,
|
194 | with-leading-icon-leading-icon-color: null,
|
195 | with-leading-icon-leading-icon-size: null,
|
196 | with-leading-icon-pressed-leading-icon-color: null,
|
197 | with-trailing-icon-disabled-trailing-icon-color: null,
|
198 | with-trailing-icon-disabled-trailing-icon-opacity: null,
|
199 | with-trailing-icon-focus-trailing-icon-color: null,
|
200 | with-trailing-icon-hover-trailing-icon-color: null,
|
201 | with-trailing-icon-pressed-trailing-icon-color: null,
|
202 | with-trailing-icon-trailing-icon-color: null,
|
203 | with-trailing-icon-trailing-icon-size: null,
|
204 | );
|
205 |
|
206 | @mixin theme-styles($theme, $resolvers: resolvers.$material) {
|
207 | @include theme.validate-theme-keys($_light-theme, $theme);
|
208 |
|
209 | @include _container-shape(map.get($theme, container-shape));
|
210 | @include _avatar-shape(map.get($theme, with-avatar-avatar-shape));
|
211 | @include graphic-size(map.get($theme, with-avatar-avatar-size));
|
212 | @include height(map.get($theme, container-height));
|
213 | @include elevation-theme.overlay-container-color(
|
214 | map.get($theme, container-surface-tint-layer-color)
|
215 | );
|
216 | @include _container-elevation(
|
217 | map.get($resolvers, elevation),
|
218 | $shadow-color: map.get($theme, container-shadow-color),
|
219 | $map: (default: map.get($theme, container-elevation))
|
220 | );
|
221 | @include _container-elevation(
|
222 | map.get($resolvers, elevation),
|
223 | $shadow-color: map.get($theme, flat-container-shadow-color),
|
224 | $map: (enabled: map.get($theme, flat-container-elevation))
|
225 | );
|
226 | @include _container-elevation(
|
227 | map.get($resolvers, elevation),
|
228 | $shadow-color: map.get($theme, elevated-container-shadow-color),
|
229 | $map: (
|
230 | enabled: map.get($theme, elevated-container-elevation),
|
231 | disabled: map.get($theme, elevated-disabled-container-elevation),
|
232 | hover: map.get($theme, elevated-hover-container-elevation),
|
233 | focus: map.get($theme, elevated-focus-container-elevation),
|
234 | pressed: map.get($theme, elevated-pressed-container-elevation)
|
235 | )
|
236 | );
|
237 | @include _selected-container-elevation(
|
238 | map.get($resolvers, elevation),
|
239 | $shadow-color: map.get($theme, elevated-container-shadow-color),
|
240 | $map: (
|
241 | enabled: map.get($theme, elevated-selected-container-elevation),
|
242 | disabled: map.get($theme, elevated-selected-disabled-container-elevation),
|
243 | hover: map.get($theme, elevated-selected-hover-container-elevation),
|
244 | focus: map.get($theme, elevated-selected-focus-container-elevation),
|
245 | pressed: map.get($theme, elevated-selected-pressed-container-elevation)
|
246 | )
|
247 | );
|
248 | @include _selected-container-elevation(
|
249 | map.get($resolvers, elevation),
|
250 | $shadow-color: map.get($theme, elevated-container-shadow-color),
|
251 | $map: (
|
252 | enabled: map.get($theme, flat-selected-container-elevation),
|
253 | disabled: map.get($theme, flat-selected-disabled-container-elevation),
|
254 | hover: map.get($theme, flat-selected-hover-container-elevation),
|
255 | focus: map.get($theme, flat-selected-focus-container-elevation),
|
256 | pressed: map.get($theme, flat-selected-pressed-container-elevation)
|
257 | )
|
258 | );
|
259 | @include _unselected-container-elevation(
|
260 | map.get($resolvers, elevation),
|
261 | $shadow-color: map.get($theme, elevated-container-shadow-color),
|
262 | $map: (
|
263 | enabled: map.get($theme, flat-unselected-container-elevation),
|
264 | disabled: map.get($theme, flat-unselected-disabled-container-elevation),
|
265 | hover: map.get($theme, flat-unselected-hover-container-elevation),
|
266 | focus: map.get($theme, flat-unselected-focus-container-elevation),
|
267 | pressed: map.get($theme, flat-unselected-pressed-container-elevation)
|
268 | )
|
269 | );
|
270 | @include outline-color(
|
271 | (
|
272 | enabled: map.get($theme, flat-outline-color),
|
273 | focus: map.get($theme, flat-focus-outline-color),
|
274 | disabled: map.get($theme, flat-disabled-outline-color),
|
275 | )
|
276 | );
|
277 | @include selected-outline-color(
|
278 | (
|
279 | enabled: map.get($theme, flat-selected-outline-color),
|
280 | disabled: map.get($theme, flat-disabled-selected-outline-color),
|
281 | )
|
282 | );
|
283 | @include _unselected-outline-color(
|
284 | (
|
285 | disabled: map.get($theme, flat-disabled-unselected-outline-color),
|
286 | focus: map.get($theme, flat-unselected-focus-outline-color),
|
287 | enabled: map.get($theme, flat-unselected-outline-color),
|
288 | )
|
289 | );
|
290 | @include outline-width(map.get($theme, outline-width));
|
291 | @include outline-width(map.get($theme, flat-outline-width));
|
292 | @include _selected-outline-width(
|
293 | map.get($theme, flat-selected-outline-width)
|
294 | );
|
295 | @include _unselected-outline-width(
|
296 | map.get($theme, flat-unselected-outline-width)
|
297 | );
|
298 | @include container-color(
|
299 | (
|
300 | enabled: map.get($theme, elevated-container-color),
|
301 | disabled: map.get($theme, elevated-disabled-container-color),
|
302 | )
|
303 | );
|
304 | @include selected-container-color(
|
305 | (
|
306 | enabled: map.get($theme, elevated-selected-container-color),
|
307 | )
|
308 | );
|
309 | @include selected-container-color(
|
310 | (
|
311 | enabled: map.get($theme, flat-selected-container-color),
|
312 | )
|
313 | );
|
314 | @include _unselected-container-color(
|
315 | (
|
316 | enabled: map.get($theme, elevated-unselected-container-color),
|
317 | )
|
318 | );
|
319 | @include _label-text-typography(
|
320 | (
|
321 | font: map.get($theme, label-text-font),
|
322 | line-height: map.get($theme, label-text-line-height),
|
323 | size: map.get($theme, label-text-size),
|
324 | weight: map.get($theme, label-text-weight),
|
325 | tracking: map.get($theme, label-text-tracking),
|
326 | )
|
327 | );
|
328 | @include text-label-color(
|
329 | (
|
330 | enabled: map.get($theme, label-text-color),
|
331 | hover: map.get($theme, hover-label-text-color),
|
332 | focus: map.get($theme, focus-label-text-color),
|
333 | pressed: map.get($theme, pressed-label-text-color),
|
334 | disabled: map.get($theme, disabled-label-text-color),
|
335 | )
|
336 | );
|
337 | @include selected-text-label-color(
|
338 | (
|
339 | enabled: map.get($theme, selected-label-text-color),
|
340 | hover: map.get($theme, selected-hover-label-text-color),
|
341 | focus: map.get($theme, selected-focus-label-text-color),
|
342 | pressed: map.get($theme, selected-pressed-label-text-color),
|
343 | disabled: map.get($theme, selected-disabled-label-text-color),
|
344 | )
|
345 | );
|
346 | @include _unselected-text-label-color(
|
347 | (
|
348 | enabled: map.get($theme, unselected-label-text-color),
|
349 | hover: map.get($theme, unselected-hover-label-text-color),
|
350 | focus: map.get($theme, unselected-focus-label-text-color),
|
351 | pressed: map.get($theme, unselected-pressed-label-text-color),
|
352 | disabled: map.get($theme, unselected-disabled-label-text-color),
|
353 | )
|
354 | );
|
355 |
|
356 | @include icon-size(map.get($theme, with-icon-icon-size));
|
357 | @include icon-color(
|
358 | (
|
359 | enabled: map.get($theme, with-icon-icon-color),
|
360 | disabled: map.get($theme, with-icon-disabled-icon-color),
|
361 | hover: map.get($theme, with-icon-hover-icon-color),
|
362 | focus: map.get($theme, with-icon-focus-icon-color),
|
363 | pressed: map.get($theme, with-icon-pressed-icon-color),
|
364 | )
|
365 | );
|
366 | @include _selected-icon-color(
|
367 | (
|
368 | enabled: map.get($theme, with-icon-selected-icon-color),
|
369 | disabled: map.get($theme, with-icon-selected-disabled-icon-color),
|
370 | hover: map.get($theme, with-icon-selected-hover-icon-color),
|
371 | focus: map.get($theme, with-icon-selected-focus-icon-color),
|
372 | pressed: map.get($theme, with-icon-selected-pressed-icon-color),
|
373 | )
|
374 | );
|
375 | @include _unselected-icon-color(
|
376 | (
|
377 | enabled: map.get($theme, with-icon-unselected-icon-color),
|
378 | disabled: map.get($theme, with-icon-unselected-disabled-icon-color),
|
379 | hover: map.get($theme, with-icon-unselected-hover-icon-color),
|
380 | focus: map.get($theme, with-icon-unselected-focus-icon-color),
|
381 | pressed: map.get($theme, with-icon-unselected-pressed-icon-color),
|
382 | )
|
383 | );
|
384 | @include icon-color(
|
385 | (
|
386 | disabled: map.get($theme, with-leading-icon-disabled-leading-icon-color),
|
387 | focus: map.get($theme, with-leading-icon-focus-leading-icon-color),
|
388 | hover: map.get($theme, with-leading-icon-hover-leading-icon-color),
|
389 | enabled: map.get($theme, with-leading-icon-leading-icon-color),
|
390 | pressed: map.get($theme, with-leading-icon-pressed-leading-icon-color),
|
391 | )
|
392 | );
|
393 | @include trailing-action-color(
|
394 | (
|
395 | disabled: map.get($theme, with-trailing-icon-disabled-trailing-icon-color),
|
396 | focus: map.get($theme, with-trailing-icon-focus-trailing-icon-color),
|
397 | hover: map.get($theme, with-trailing-icon-hover-trailing-icon-color),
|
398 | enabled: map.get($theme, with-trailing-icon-trailing-icon-color),
|
399 | pressed: map.get($theme, with-trailing-icon-pressed-trailing-icon-color),
|
400 | )
|
401 | );
|
402 | @include _ripple-theme(
|
403 | (
|
404 | focus-state-layer-color: map.get($theme, focus-state-layer-color),
|
405 | focus-state-layer-opacity: map.get($theme, focus-state-layer-opacity),
|
406 | hover-state-layer-color: map.get($theme, hover-state-layer-color),
|
407 | hover-state-layer-opacity: map.get($theme, hover-state-layer-opacity),
|
408 | pressed-state-layer-color: map.get($theme, pressed-state-layer-color),
|
409 | pressed-state-layer-opacity: map.get($theme, pressed-state-layer-opacity),
|
410 | )
|
411 | );
|
412 | @include _selected-ripple-theme(
|
413 | (
|
414 | focus-state-layer-color: map.get($theme, selected-focus-state-layer-color),
|
415 | focus-state-layer-opacity:
|
416 | map.get($theme, selected-focus-state-layer-opacity),
|
417 | hover-state-layer-color: map.get($theme, selected-hover-state-layer-color),
|
418 | hover-state-layer-opacity:
|
419 | map.get($theme, selected-hover-state-layer-opacity),
|
420 | pressed-state-layer-color:
|
421 | map.get($theme, selected-pressed-state-layer-color),
|
422 | pressed-state-layer-opacity:
|
423 | map.get($theme, selected-pressed-state-layer-opacity),
|
424 | )
|
425 | );
|
426 | @include _unselected-ripple-theme(
|
427 | (
|
428 | focus-state-layer-color:
|
429 | map.get($theme, unselected-focus-state-layer-color),
|
430 | focus-state-layer-opacity:
|
431 | map.get($theme, unselected-focus-state-layer-opacity),
|
432 | hover-state-layer-color:
|
433 | map.get($theme, unselected-hover-state-layer-color),
|
434 | hover-state-layer-opacity:
|
435 | map.get($theme, unselected-hover-state-layer-opacity),
|
436 | pressed-state-layer-color:
|
437 | map.get($theme, unselected-pressed-state-layer-color),
|
438 | pressed-state-layer-opacity:
|
439 | map.get($theme, unselected-pressed-state-layer-opacity),
|
440 | )
|
441 | );
|
442 | }
|
443 |
|
444 | @mixin _ripple-theme($ripple-theme) {
|
445 | .mdc-evolution-chip__action--primary {
|
446 | @include ripple-theme.internal-theme-styles(
|
447 | (
|
448 | focus-state-layer-color: map.get($ripple-theme, focus-state-layer-color),
|
449 | focus-state-layer-opacity:
|
450 | map.get($ripple-theme, focus-state-layer-opacity),
|
451 | hover-state-layer-color: map.get($ripple-theme, hover-state-layer-color),
|
452 | hover-state-layer-opacity:
|
453 | map.get($ripple-theme, hover-state-layer-opacity),
|
454 | pressed-state-layer-color:
|
455 | map.get($ripple-theme, pressed-state-layer-color),
|
456 | pressed-state-layer-opacity:
|
457 | map.get($ripple-theme, pressed-state-layer-opacity),
|
458 | ),
|
459 | $ripple-target: $ripple-target
|
460 | );
|
461 | }
|
462 | }
|
463 |
|
464 | @mixin _selected-ripple-theme($ripple-theme) {
|
465 | @include _is-selected() {
|
466 | @include _ripple-theme($ripple-theme);
|
467 | }
|
468 | }
|
469 |
|
470 | @mixin _unselected-ripple-theme($ripple-theme) {
|
471 | @include _is-unselected() {
|
472 | @include _ripple-theme($ripple-theme);
|
473 | }
|
474 | }
|
475 |
|
476 |
|
477 |
|
478 |
|
479 |
|
480 |
|
481 | @mixin ripple-color(
|
482 | $color,
|
483 | $opacity-map: null,
|
484 | $query: feature-targeting.all()
|
485 | ) {
|
486 | @include _ripple-color($color, $opacity-map, $query);
|
487 | }
|
488 |
|
489 |
|
490 |
|
491 |
|
492 |
|
493 |
|
494 | @mixin selected-ripple-color(
|
495 | $color,
|
496 | $opacity-map: null,
|
497 | $query: feature-targeting.all()
|
498 | ) {
|
499 | &.mdc-evolution-chip--selected {
|
500 | @include ripple-color($color, $opacity-map, $query: $query);
|
501 | }
|
502 | }
|
503 |
|
504 | @mixin _ripple-color($color, $opacity-map, $query) {
|
505 | .mdc-evolution-chip__action--primary {
|
506 | @include ripple-theme.states(
|
507 | $color: $color,
|
508 | $opacity-map: $opacity-map,
|
509 | $query: $query,
|
510 | $ripple-target: $ripple-target
|
511 | );
|
512 | }
|
513 | }
|
514 |
|
515 |
|
516 |
|
517 |
|
518 |
|
519 |
|
520 | @mixin trailing-action-ripple-color(
|
521 | $color,
|
522 | $opacity-map: null,
|
523 | $query: feature-targeting.all()
|
524 | ) {
|
525 | .mdc-evolution-chip__action--trailing {
|
526 | @include ripple-theme.states(
|
527 | $color: $color,
|
528 | $opacity-map: $opacity-map,
|
529 | $query: $query,
|
530 | $ripple-target: $ripple-target
|
531 | );
|
532 | }
|
533 | }
|
534 |
|
535 |
|
536 |
|
537 |
|
538 |
|
539 | @mixin trailing-action-ripple-size($size, $query: feature-targeting.all()) {
|
540 | $feat-structure: feature-targeting.create-target($query, structure);
|
541 | .mdc-evolution-chip__ripple--trailing {
|
542 | @include feature-targeting.targets($feat-structure) {
|
543 | @include theme.property(height, $size);
|
544 | @include theme.property(width, $size);
|
545 | }
|
546 | }
|
547 | }
|
548 |
|
549 |
|
550 |
|
551 |
|
552 |
|
553 |
|
554 | @mixin density($density-scale, $query: feature-targeting.all()) {
|
555 | $height: density.prop-value(
|
556 | $density-config: $density-config,
|
557 | $density-scale: $density-scale,
|
558 | $property-name: height,
|
559 | );
|
560 |
|
561 | @include height($height, $query: $query);
|
562 |
|
563 | @if $density-scale != 0 {
|
564 | @include _reset-touch-target($query: $query);
|
565 | }
|
566 | }
|
567 |
|
568 |
|
569 |
|
570 |
|
571 |
|
572 |
|
573 |
|
574 | @mixin _reset-touch-target($query: feature-targeting.all()) {
|
575 | $feat-structure: feature-targeting.create-target($query, structure);
|
576 |
|
577 | .mdc-evolution-chip__action-touch {
|
578 | @include feature-targeting.targets($feat-structure) {
|
579 | display: none;
|
580 | }
|
581 | }
|
582 | }
|
583 |
|
584 |
|
585 |
|
586 |
|
587 |
|
588 | @mixin height($height, $query: feature-targeting.all()) {
|
589 | $feat-structure: feature-targeting.create-target($query, structure);
|
590 |
|
591 | @include feature-targeting.targets($feat-structure) {
|
592 | @include theme.property(height, $height);
|
593 | }
|
594 | }
|
595 |
|
596 | @mixin _container-shape($radius) {
|
597 | @include shape.radius($radius);
|
598 |
|
599 | #{$ripple-target} {
|
600 | @include shape.radius($radius);
|
601 | }
|
602 |
|
603 | .mdc-evolution-chip__action--primary:before {
|
604 | @include shape.radius($radius);
|
605 | }
|
606 | }
|
607 |
|
608 | @mixin _avatar-shape($radius) {
|
609 | .mdc-evolution-chip__icon--primary {
|
610 | @include shape.radius($radius);
|
611 | }
|
612 | }
|
613 |
|
614 |
|
615 |
|
616 |
|
617 |
|
618 |
|
619 | @mixin shape-radius(
|
620 | $radius,
|
621 | $rtl-reflexive: false,
|
622 | $density-scale: $density-scale,
|
623 | $query: feature-targeting.all()
|
624 | ) {
|
625 | $height: density.prop-value(
|
626 | $density-config: $density-config,
|
627 | $density-scale: $density-scale,
|
628 | $property-name: height,
|
629 | );
|
630 |
|
631 | @include shape.radius(
|
632 | $radius,
|
633 | $rtl-reflexive,
|
634 | $component-height: $height,
|
635 | $query: $query
|
636 | );
|
637 |
|
638 | #{$ripple-target} {
|
639 | @include shape.radius(
|
640 | $radius,
|
641 | $rtl-reflexive,
|
642 | $component-height: $height,
|
643 | $query: $query
|
644 | );
|
645 | }
|
646 |
|
647 | .mdc-evolution-chip__action--primary:before {
|
648 | @include shape.radius(
|
649 | $radius,
|
650 | $rtl-reflexive,
|
651 | $component-height: $height,
|
652 | $query: $query
|
653 | );
|
654 | }
|
655 |
|
656 | .mdc-evolution-chip__icon--primary {
|
657 | @include shape.radius(
|
658 | $radius,
|
659 | $rtl-reflexive,
|
660 | $component-height: $height,
|
661 | $query: $query
|
662 | );
|
663 | }
|
664 | }
|
665 |
|
666 |
|
667 |
|
668 |
|
669 |
|
670 | @mixin outline-width($width, $query: feature-targeting.all()) {
|
671 | $feat-structure: feature-targeting.create-target($query, structure);
|
672 |
|
673 | .mdc-evolution-chip__action--primary:before {
|
674 | @include feature-targeting.targets($feat-structure) {
|
675 | @include theme.property(border-width, $width);
|
676 | }
|
677 | }
|
678 | }
|
679 |
|
680 | @mixin _selected-outline-width($width) {
|
681 | @include _is-selected() {
|
682 | @include outline-width($width);
|
683 | }
|
684 | }
|
685 |
|
686 | @mixin _unselected-outline-width($width) {
|
687 | @include _is-unselected() {
|
688 | @include outline-width($width);
|
689 | }
|
690 | }
|
691 |
|
692 |
|
693 |
|
694 |
|
695 |
|
696 |
|
697 |
|
698 |
|
699 |
|
700 |
|
701 |
|
702 |
|
703 |
|
704 | @mixin outline-color($color-or-map, $query: feature-targeting.all()) {
|
705 | @include _outline-color(state.get-default-state($color-or-map), $query);
|
706 | @include _is-enabled() {
|
707 | @include _outline-color(state.get-enabled-state($color-or-map), $query);
|
708 | }
|
709 | @include _focus-outline-color(state.get-focus-state($color-or-map), $query);
|
710 | @include _is-disabled() {
|
711 | @include _outline-color(state.get-disabled-state($color-or-map), $query);
|
712 | }
|
713 | }
|
714 |
|
715 | @mixin _selected-outline-color($color-or-map) {
|
716 | @include _is-selected() {
|
717 | @include _outline-color($color-or-map);
|
718 | }
|
719 | }
|
720 |
|
721 |
|
722 |
|
723 |
|
724 |
|
725 |
|
726 |
|
727 |
|
728 |
|
729 |
|
730 |
|
731 |
|
732 |
|
733 | @mixin selected-outline-color($color-or-map, $query: feature-targeting.all()) {
|
734 | @include _is-selected() {
|
735 | @include outline-color($color-or-map, $query: $query);
|
736 | }
|
737 | }
|
738 |
|
739 | @mixin _unselected-outline-color($color-or-map) {
|
740 | @include _is-unselected() {
|
741 | @include outline-color($color-or-map);
|
742 | }
|
743 | }
|
744 |
|
745 | @mixin _outline-color($color, $query: feature-targeting.all()) {
|
746 | $feat-color: feature-targeting.create-target($query, color);
|
747 |
|
748 | .mdc-evolution-chip__action--primary:before {
|
749 | @include feature-targeting.targets($feat-color) {
|
750 | @if $color {
|
751 | @include theme.property(border-color, $color);
|
752 | }
|
753 |
|
754 |
|
755 | @if $color == transparent {
|
756 | @include dom.forced-colors-mode($exclude-ie11: true) {
|
757 | @include theme.property(border-color, CanvasText);
|
758 | }
|
759 | }
|
760 | }
|
761 | }
|
762 | }
|
763 |
|
764 | @mixin _focus-outline-color($color, $query: feature-targeting.all()) {
|
765 | $feat-color: feature-targeting.create-target($query, color);
|
766 |
|
767 | .mdc-evolution-chip__action--primary:not(.mdc-evolution-chip__action--presentational) {
|
768 | @include ripple-theme.focus() {
|
769 | &:before {
|
770 | @include feature-targeting.targets($feat-color) {
|
771 | @if $color {
|
772 | @include theme.property(border-color, $color);
|
773 | }
|
774 | }
|
775 | }
|
776 | }
|
777 | }
|
778 | }
|
779 |
|
780 |
|
781 |
|
782 |
|
783 |
|
784 | @mixin outline-style($style, $query: feature-targeting.all()) {
|
785 | $feat-structure: feature-targeting.create-target($query, structure);
|
786 |
|
787 | .mdc-evolution-chip__action--primary:before {
|
788 | @include feature-targeting.targets($feat-structure) {
|
789 | @include theme.property(border-style, $style);
|
790 | }
|
791 | }
|
792 | }
|
793 |
|
794 |
|
795 |
|
796 |
|
797 |
|
798 |
|
799 |
|
800 |
|
801 |
|
802 |
|
803 |
|
804 |
|
805 |
|
806 | @mixin container-color($color-or-map, $query: feature-targeting.all()) {
|
807 | @include _container-color(state.get-default-state($color-or-map), $query);
|
808 | @include _is-enabled() {
|
809 | @include _container-color(state.get-enabled-state($color-or-map), $query);
|
810 | }
|
811 | @include _is-disabled() {
|
812 | @include _container-color(state.get-disabled-state($color-or-map), $query);
|
813 | }
|
814 | }
|
815 |
|
816 |
|
817 |
|
818 |
|
819 |
|
820 |
|
821 |
|
822 |
|
823 |
|
824 |
|
825 |
|
826 |
|
827 |
|
828 | @mixin selected-container-color(
|
829 | $color-or-map,
|
830 | $query: feature-targeting.all()
|
831 | ) {
|
832 | @include _is-selected() {
|
833 | @include container-color($color-or-map, $query: $query);
|
834 | }
|
835 | }
|
836 |
|
837 | @mixin _unselected-container-color($color-or-map) {
|
838 | @include _is-unselected() {
|
839 | @include container-color($color-or-map);
|
840 | }
|
841 | }
|
842 |
|
843 | @mixin _container-color($color, $query: feature-targeting.all()) {
|
844 | $feat-color: feature-targeting.create-target($query, color);
|
845 |
|
846 | @include feature-targeting.targets($feat-color) {
|
847 | @if $color {
|
848 | @include theme.property(background-color, $color);
|
849 | }
|
850 | }
|
851 | }
|
852 |
|
853 |
|
854 |
|
855 |
|
856 |
|
857 |
|
858 |
|
859 |
|
860 |
|
861 |
|
862 |
|
863 |
|
864 |
|
865 | @mixin text-label-color($color-or-map, $query: feature-targeting.all()) {
|
866 | @include _text-label-color(state.get-default-state($color-or-map), $query);
|
867 | @include _is-enabled() {
|
868 | @include _text-label-color(state.get-enabled-state($color-or-map), $query);
|
869 | }
|
870 | .mdc-evolution-chip__action--primary:not(.mdc-evolution-chip__action--presentational):hover {
|
871 | @include _text-label-color(state.get-hover-state($color-or-map), $query);
|
872 | }
|
873 |
|
874 | .mdc-evolution-chip__action--primary:not(.mdc-evolution-chip__action--presentational) {
|
875 | @include ripple-theme.focus() {
|
876 | @include _text-label-color(state.get-focus-state($color-or-map), $query);
|
877 | }
|
878 | }
|
879 |
|
880 | @include _is-disabled() {
|
881 | @include _text-label-color(state.get-disabled-state($color-or-map), $query);
|
882 | }
|
883 | }
|
884 |
|
885 | @mixin _label-text-typography($typography-theme) {
|
886 | .mdc-evolution-chip__text-label {
|
887 | @include typography.theme-styles($typography-theme);
|
888 | }
|
889 | }
|
890 |
|
891 |
|
892 |
|
893 |
|
894 |
|
895 |
|
896 |
|
897 |
|
898 |
|
899 |
|
900 |
|
901 |
|
902 |
|
903 | @mixin selected-text-label-color(
|
904 | $color-or-map,
|
905 | $query: feature-targeting.all()
|
906 | ) {
|
907 | @include _is-selected() {
|
908 | @include text-label-color($color-or-map, $query: $query);
|
909 | }
|
910 | }
|
911 |
|
912 | @mixin _unselected-text-label-color($color-or-map) {
|
913 | @include _is-unselected() {
|
914 | @include text-label-color($color-or-map);
|
915 | }
|
916 | }
|
917 |
|
918 | @mixin _text-label-color($color, $query: feature-targeting.all()) {
|
919 | $feat-color: feature-targeting.create-target($query, color);
|
920 |
|
921 | .mdc-evolution-chip__text-label {
|
922 | @include feature-targeting.targets($feat-color) {
|
923 | @if $color {
|
924 | @include theme.property(color, $color);
|
925 | }
|
926 | }
|
927 | }
|
928 | }
|
929 |
|
930 |
|
931 |
|
932 |
|
933 |
|
934 | @mixin text-label-type-scale($type-scale, $query: feature-targeting.all()) {
|
935 | .mdc-evolution-chip__text-label {
|
936 | @include typography.typography($type-scale, $query: $query);
|
937 | }
|
938 | }
|
939 |
|
940 |
|
941 |
|
942 |
|
943 |
|
944 | @mixin graphic-size($size, $query: feature-targeting.all()) {
|
945 | $feat-structure: feature-targeting.create-target($query, structure);
|
946 |
|
947 |
|
948 |
|
949 |
|
950 |
|
951 |
|
952 |
|
953 | &.mdc-evolution-chip--selectable:not(.mdc-evolution-chip--with-primary-icon) {
|
954 | @if $size {
|
955 | @include theme.property(--mdc-chip-graphic-selected-width, $size);
|
956 | }
|
957 | }
|
958 |
|
959 | .mdc-evolution-chip__graphic {
|
960 | @include feature-targeting.targets($feat-structure) {
|
961 | @include theme.property(height, $size);
|
962 | @include theme.property(width, $size);
|
963 | @include theme.property(font-size, $size);
|
964 | }
|
965 | }
|
966 | }
|
967 |
|
968 |
|
969 |
|
970 |
|
971 |
|
972 |
|
973 |
|
974 |
|
975 |
|
976 |
|
977 |
|
978 |
|
979 |
|
980 | @mixin icon-color($color-or-map, $query: feature-targeting.all()) {
|
981 | @include _icon-color(state.get-default-state($color-or-map), $query);
|
982 |
|
983 | @include _is-enabled() {
|
984 | @include _icon-color(state.get-enabled-state($color-or-map), $query);
|
985 | }
|
986 |
|
987 | .mdc-evolution-chip__action--primary:not(.mdc-evolution-chip__action--presentational):hover {
|
988 | @include _icon-color(state.get-hover-state($color-or-map), $query);
|
989 | }
|
990 |
|
991 | .mdc-evolution-chip__action--primary:not(.mdc-evolution-chip__action--presentational) {
|
992 | @include ripple-theme.focus() {
|
993 | @include _icon-color(state.get-focus-state($color-or-map), $query);
|
994 | }
|
995 | }
|
996 |
|
997 | @include _is-disabled() {
|
998 | @include _icon-color(state.get-disabled-state($color-or-map), $query);
|
999 | }
|
1000 | }
|
1001 |
|
1002 | @mixin _selected-icon-color($color-or-map) {
|
1003 | @include checkmark-color($color-or-map);
|
1004 | }
|
1005 |
|
1006 | @mixin _unselected-icon-color($color-or-map) {
|
1007 | @include _is-unselected() {
|
1008 | @include icon-color($color-or-map);
|
1009 | }
|
1010 | }
|
1011 |
|
1012 | @mixin _icon-color($color, $query: feature-targeting.all()) {
|
1013 | $feat-color: feature-targeting.create-target($query, color);
|
1014 |
|
1015 | .mdc-evolution-chip__icon--primary {
|
1016 | @include feature-targeting.targets($feat-color) {
|
1017 | @if $color {
|
1018 | @include theme.property(color, $color);
|
1019 | }
|
1020 | }
|
1021 | }
|
1022 | }
|
1023 |
|
1024 |
|
1025 |
|
1026 |
|
1027 |
|
1028 |
|
1029 |
|
1030 |
|
1031 |
|
1032 |
|
1033 |
|
1034 |
|
1035 |
|
1036 | @mixin icon-container-color($color-or-map, $query: feature-targeting.all()) {
|
1037 | @include _icon-container-color(
|
1038 | state.get-default-state($color-or-map),
|
1039 | $query
|
1040 | );
|
1041 |
|
1042 | .mdc-evolution-chip__action--primary:not(.mdc-evolution-chip__action--presentational):hover {
|
1043 | @include _icon-container-color(
|
1044 | state.get-hover-state($color-or-map),
|
1045 | $query
|
1046 | );
|
1047 | }
|
1048 |
|
1049 | .mdc-evolution-chip__action--primary:not(.mdc-evolution-chip__action--presentational) {
|
1050 | @include ripple-theme.focus() {
|
1051 | @include _icon-container-color(
|
1052 | state.get-focus-state($color-or-map),
|
1053 | $query
|
1054 | );
|
1055 | }
|
1056 | }
|
1057 |
|
1058 | &.mdc-evolution-chip--disabled {
|
1059 | @include _icon-container-color(
|
1060 | state.get-disabled-state($color-or-map),
|
1061 | $query
|
1062 | );
|
1063 | }
|
1064 | }
|
1065 |
|
1066 | @mixin _icon-container-color($color, $query: feature-targeting.all()) {
|
1067 | $feat-color: feature-targeting.create-target($query, color);
|
1068 |
|
1069 | .mdc-evolution-chip__icon--primary {
|
1070 | @include feature-targeting.targets($feat-color) {
|
1071 | @if $color {
|
1072 | @include theme.property(background-color, $color);
|
1073 | }
|
1074 | }
|
1075 | }
|
1076 | }
|
1077 |
|
1078 |
|
1079 |
|
1080 |
|
1081 |
|
1082 | @mixin icon-size($size, $query: feature-targeting.all()) {
|
1083 | $feat-structure: feature-targeting.create-target($query, structure);
|
1084 |
|
1085 | .mdc-evolution-chip__icon--primary {
|
1086 | @include feature-targeting.targets($feat-structure) {
|
1087 | @include theme.property(height, $size);
|
1088 | @include theme.property(width, $size);
|
1089 | @include theme.property(font-size, $size);
|
1090 | }
|
1091 | }
|
1092 | }
|
1093 |
|
1094 |
|
1095 |
|
1096 |
|
1097 |
|
1098 | @mixin trailing-action-size($size, $query: feature-targeting.all()) {
|
1099 | $feat-structure: feature-targeting.create-target($query, structure);
|
1100 |
|
1101 | .mdc-evolution-chip__icon--trailing {
|
1102 | @include feature-targeting.targets($feat-structure) {
|
1103 | @include theme.property(height, $size);
|
1104 | @include theme.property(width, $size);
|
1105 | @include theme.property(font-size, $size);
|
1106 | }
|
1107 | }
|
1108 | }
|
1109 |
|
1110 |
|
1111 |
|
1112 |
|
1113 |
|
1114 |
|
1115 |
|
1116 |
|
1117 |
|
1118 |
|
1119 |
|
1120 |
|
1121 |
|
1122 | @mixin trailing-action-color($color-or-map, $query: feature-targeting.all()) {
|
1123 | @include _trailing-action-color(
|
1124 | state.get-default-state($color-or-map),
|
1125 | $query
|
1126 | );
|
1127 |
|
1128 | @include _is-enabled() {
|
1129 | @include _trailing-action-color(
|
1130 | state.get-enabled-state($color-or-map),
|
1131 | $query
|
1132 | );
|
1133 | }
|
1134 |
|
1135 | .mdc-evolution-chip__action--trailing:hover {
|
1136 | @include _trailing-action-color(
|
1137 | state.get-hover-state($color-or-map),
|
1138 | $query
|
1139 | );
|
1140 | }
|
1141 |
|
1142 | .mdc-evolution-chip__action--trailing {
|
1143 | @include ripple-theme.focus() {
|
1144 | @include _trailing-action-color(
|
1145 | state.get-focus-state($color-or-map),
|
1146 | $query
|
1147 | );
|
1148 | }
|
1149 | }
|
1150 |
|
1151 | @include _is-disabled() {
|
1152 | @include _trailing-action-color(
|
1153 | state.get-disabled-state($color-or-map),
|
1154 | $query
|
1155 | );
|
1156 | }
|
1157 | }
|
1158 |
|
1159 | @mixin _trailing-action-color($color, $query: feature-targeting.all()) {
|
1160 | $feat-color: feature-targeting.create-target($query, color);
|
1161 |
|
1162 | .mdc-evolution-chip__icon--trailing {
|
1163 | @include feature-targeting.targets($feat-color) {
|
1164 | @if $color {
|
1165 | @include theme.property(color, $color);
|
1166 | }
|
1167 | }
|
1168 | }
|
1169 | }
|
1170 |
|
1171 |
|
1172 |
|
1173 |
|
1174 |
|
1175 | @mixin checkmark-size($size, $query: feature-targeting.all()) {
|
1176 | $feat-structure: feature-targeting.create-target($query, structure);
|
1177 |
|
1178 | .mdc-evolution-chip__checkmark {
|
1179 | @include feature-targeting.targets($feat-structure) {
|
1180 | @include theme.property(height, $size);
|
1181 | @include theme.property(width, $size);
|
1182 | }
|
1183 | }
|
1184 | }
|
1185 |
|
1186 |
|
1187 |
|
1188 |
|
1189 |
|
1190 |
|
1191 |
|
1192 |
|
1193 |
|
1194 |
|
1195 |
|
1196 |
|
1197 |
|
1198 | @mixin checkmark-color($color-or-map, $query: feature-targeting.all()) {
|
1199 | @include _checkmark-color(state.get-default-state($color-or-map), $query);
|
1200 |
|
1201 | @include _is-enabled() {
|
1202 | @include _checkmark-color(state.get-enabled-state($color-or-map), $query);
|
1203 | }
|
1204 |
|
1205 | .mdc-evolution-chip__action--primary:not(.mdc-evolution-chip__action--presentational):hover {
|
1206 | @include _checkmark-color(state.get-hover-state($color-or-map), $query);
|
1207 | }
|
1208 |
|
1209 | .mdc-evolution-chip__action--primary {
|
1210 | @include ripple-theme.focus() {
|
1211 | @include _checkmark-color(state.get-focus-state($color-or-map), $query);
|
1212 | }
|
1213 | }
|
1214 |
|
1215 | @include _is-disabled() {
|
1216 | @include _checkmark-color(state.get-disabled-state($color-or-map), $query);
|
1217 | }
|
1218 | }
|
1219 |
|
1220 | @mixin _checkmark-color($color, $query: feature-targeting.all()) {
|
1221 | $feat-color: feature-targeting.create-target($query, color);
|
1222 |
|
1223 | .mdc-evolution-chip__checkmark {
|
1224 | @include feature-targeting.targets($feat-color) {
|
1225 | @if $color {
|
1226 | @include theme.property(color, $color);
|
1227 | }
|
1228 | }
|
1229 | }
|
1230 | }
|
1231 |
|
1232 |
|
1233 |
|
1234 |
|
1235 |
|
1236 |
|
1237 |
|
1238 |
|
1239 |
|
1240 |
|
1241 |
|
1242 |
|
1243 |
|
1244 | @mixin checkmark-container-color(
|
1245 | $color-or-map,
|
1246 | $query: feature-targeting.all()
|
1247 | ) {
|
1248 | @include _checkmark-container-color(
|
1249 | state.get-default-state($color-or-map),
|
1250 | $query
|
1251 | );
|
1252 |
|
1253 | &.mdc-evolution-chip--disabled {
|
1254 | @include _checkmark-container-color(
|
1255 | state.get-disabled-state($color-or-map),
|
1256 | $query
|
1257 | );
|
1258 | }
|
1259 | }
|
1260 |
|
1261 | @mixin _checkmark-container-color($color, $query: feature-targeting.all()) {
|
1262 | $feat-color: feature-targeting.create-target($query, color);
|
1263 |
|
1264 | .mdc-evolution-chip__checkmark-background {
|
1265 | @include feature-targeting.targets($feat-color) {
|
1266 | @if $color {
|
1267 | @include theme.property(background-color, $color);
|
1268 | }
|
1269 | }
|
1270 | }
|
1271 | }
|
1272 |
|
1273 |
|
1274 |
|
1275 |
|
1276 |
|
1277 |
|
1278 | @mixin horizontal-padding(
|
1279 | $leading,
|
1280 | $trailing: $leading,
|
1281 | $query: feature-targeting.all()
|
1282 | ) {
|
1283 | $feat-structure: feature-targeting.create-target($query, structure);
|
1284 |
|
1285 | .mdc-evolution-chip__action--primary {
|
1286 | @include feature-targeting.targets($feat-structure) {
|
1287 | @include rtl.reflexive-property(padding, $leading, $trailing);
|
1288 | }
|
1289 | }
|
1290 | }
|
1291 |
|
1292 |
|
1293 |
|
1294 |
|
1295 |
|
1296 |
|
1297 |
|
1298 | @mixin with-graphic-horizontal-padding(
|
1299 | $graphic-leading,
|
1300 | $graphic-trailing,
|
1301 | $primary-trailing,
|
1302 | $query: feature-targeting.all()
|
1303 | ) {
|
1304 | $feat-structure: feature-targeting.create-target($query, structure);
|
1305 |
|
1306 | &.mdc-evolution-chip--with-primary-graphic {
|
1307 | .mdc-evolution-chip__graphic {
|
1308 | @include feature-targeting.targets($feat-structure) {
|
1309 | @include rtl.reflexive-property(
|
1310 | padding,
|
1311 | $graphic-leading,
|
1312 | $graphic-trailing
|
1313 | );
|
1314 | }
|
1315 | }
|
1316 |
|
1317 | .mdc-evolution-chip__action--primary {
|
1318 | @include feature-targeting.targets($feat-structure) {
|
1319 | @include rtl.reflexive-property(padding, 0, $primary-trailing);
|
1320 | }
|
1321 | }
|
1322 | }
|
1323 | }
|
1324 |
|
1325 |
|
1326 |
|
1327 |
|
1328 |
|
1329 |
|
1330 |
|
1331 | @mixin with-trailing-action-horizontal-padding(
|
1332 | $primary-leading,
|
1333 | $trailing-action-leading,
|
1334 | $trailing-action-trailing,
|
1335 | $query: feature-targeting.all()
|
1336 | ) {
|
1337 | $feat-structure: feature-targeting.create-target($query, structure);
|
1338 |
|
1339 | &.mdc-evolution-chip--with-trailing-action {
|
1340 | .mdc-evolution-chip__action--trailing {
|
1341 | @include feature-targeting.targets($feat-structure) {
|
1342 | @include rtl.reflexive-property(
|
1343 | padding,
|
1344 | $trailing-action-leading,
|
1345 | $trailing-action-trailing
|
1346 | );
|
1347 | }
|
1348 | }
|
1349 |
|
1350 | #{$ripple-target-trailing} {
|
1351 | @include feature-targeting.targets($feat-structure) {
|
1352 | @include rtl.reflexive-position(left, $trailing-action-leading);
|
1353 | }
|
1354 | }
|
1355 |
|
1356 | .mdc-evolution-chip__action--primary {
|
1357 | @include feature-targeting.targets($feat-structure) {
|
1358 | @include rtl.reflexive-property(padding, $primary-leading, 0);
|
1359 | }
|
1360 | }
|
1361 | }
|
1362 | }
|
1363 |
|
1364 |
|
1365 |
|
1366 |
|
1367 |
|
1368 |
|
1369 |
|
1370 |
|
1371 | @mixin with-graphic-and-trailing-action-horizontal-padding(
|
1372 | $graphic-leading,
|
1373 | $graphic-trailing,
|
1374 | $trailing-action-leading,
|
1375 | $trailing-action-trailing,
|
1376 | $query: feature-targeting.all()
|
1377 | ) {
|
1378 | $feat-structure: feature-targeting.create-target($query, structure);
|
1379 | &.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action {
|
1380 | .mdc-evolution-chip__graphic {
|
1381 | @include feature-targeting.targets($feat-structure) {
|
1382 | @include rtl.reflexive-property(
|
1383 | padding,
|
1384 | $graphic-leading,
|
1385 | $graphic-trailing
|
1386 | );
|
1387 | }
|
1388 | }
|
1389 |
|
1390 | .mdc-evolution-chip__action--trailing {
|
1391 | @include feature-targeting.targets($feat-structure) {
|
1392 | @include rtl.reflexive-property(
|
1393 | padding,
|
1394 | $trailing-action-leading,
|
1395 | $trailing-action-trailing
|
1396 | );
|
1397 | }
|
1398 | }
|
1399 |
|
1400 | #{$ripple-target-trailing} {
|
1401 | @include feature-targeting.targets($feat-structure) {
|
1402 | @include rtl.reflexive-position(left, $trailing-action-leading);
|
1403 | }
|
1404 | }
|
1405 |
|
1406 | .mdc-evolution-chip__action--primary {
|
1407 | @include feature-targeting.targets($feat-structure) {
|
1408 | @include rtl.reflexive-property(padding, 0, 0);
|
1409 | }
|
1410 | }
|
1411 | }
|
1412 | }
|
1413 |
|
1414 | @mixin _container-elevation($resolver, $shadow-color, $map) {
|
1415 | @include _is-enabled() {
|
1416 | @if (state.get-enabled-state($map)) {
|
1417 | @include elevation-theme.with-resolver(
|
1418 | $resolver,
|
1419 | $elevation: state.get-enabled-state($map),
|
1420 | $shadow-color: $shadow-color
|
1421 | );
|
1422 | }
|
1423 | }
|
1424 |
|
1425 | @include ripple-theme.hover() {
|
1426 | @if state.get-hover-state($map) {
|
1427 | @include elevation-theme.with-resolver(
|
1428 | $resolver,
|
1429 | $elevation: state.get-hover-state($map),
|
1430 | $shadow-color: $shadow-color
|
1431 | );
|
1432 | }
|
1433 | }
|
1434 |
|
1435 | @include ripple-theme.focus() {
|
1436 | @if (state.get-focus-state($map)) {
|
1437 | @include elevation-theme.with-resolver(
|
1438 | $resolver,
|
1439 | $elevation: state.get-focus-state($map),
|
1440 | $shadow-color: $shadow-color
|
1441 | );
|
1442 | }
|
1443 | }
|
1444 |
|
1445 | @include ripple-theme.pressed() {
|
1446 | @if (state.get-pressed-state($map)) {
|
1447 | @include elevation-theme.with-resolver(
|
1448 | $resolver,
|
1449 | $elevation: state.get-pressed-state($map),
|
1450 | $shadow-color: $shadow-color
|
1451 | );
|
1452 | }
|
1453 | }
|
1454 |
|
1455 | @include _is-disabled() {
|
1456 | @if (state.get-disabled-state($map)) {
|
1457 | @include elevation-theme.with-resolver(
|
1458 | $resolver,
|
1459 | $elevation: state.get-disabled-state($map),
|
1460 | $shadow-color: $shadow-color
|
1461 | );
|
1462 | }
|
1463 | }
|
1464 | }
|
1465 |
|
1466 | @mixin _selected-container-elevation($resolver, $shadow-color, $map) {
|
1467 | @include _is-selected() {
|
1468 | @include _container-elevation($resolver, $shadow-color, $map);
|
1469 | }
|
1470 | }
|
1471 |
|
1472 | @mixin _unselected-container-elevation($resolver, $shadow-color, $map) {
|
1473 | @include _is-unselected() {
|
1474 | @include _container-elevation($resolver, $shadow-color, $map);
|
1475 | }
|
1476 | }
|
1477 |
|
1478 | @mixin _is-enabled() {
|
1479 | &:not(.mdc-evolution-chip--disabled) {
|
1480 | @content;
|
1481 | }
|
1482 | }
|
1483 |
|
1484 | @mixin _is-disabled() {
|
1485 | &.mdc-evolution-chip--disabled {
|
1486 | @content;
|
1487 | }
|
1488 | }
|
1489 |
|
1490 | @mixin _is-selected() {
|
1491 | &.mdc-evolution-chip--selected {
|
1492 | @content;
|
1493 | }
|
1494 | }
|
1495 |
|
1496 | @mixin _is-unselected() {
|
1497 | &:not(.mdc-evolution-chip--selected) {
|
1498 | @content;
|
1499 | }
|
1500 | }
|