mirror of
https://github.com/material-components/material-web.git
synced 2024-09-11 13:46:10 +03:00
fix(all): remove focus state layer tokens
BREAKING CHANGE: Remove any *-focus-state-layer-* custom properties (they don't do anything) PiperOrigin-RevId: 535302944
This commit is contained in:
parent
b69e24241e
commit
933fc2e013
@ -29,10 +29,8 @@
|
||||
@include ripple.theme(
|
||||
(
|
||||
hover-color: var(--_hover-state-layer-color),
|
||||
focus-color: var(--_focus-state-layer-color),
|
||||
pressed-color: var(--_pressed-state-layer-color),
|
||||
hover-opacity: var(--_hover-state-layer-opacity),
|
||||
focus-opacity: var(--_focus-state-layer-opacity),
|
||||
pressed-opacity: var(--_pressed-state-layer-opacity),
|
||||
)
|
||||
);
|
||||
|
@ -175,8 +175,6 @@ $_checkmark-bottom-left: 7px, -14px;
|
||||
|
||||
@include ripple.theme(
|
||||
(
|
||||
focus-color: var(--_unselected-focus-state-layer-color),
|
||||
focus-opacity: var(--_unselected-focus-state-layer-opacity),
|
||||
hover-color: var(--_unselected-hover-state-layer-color),
|
||||
hover-opacity: var(--_unselected-hover-state-layer-opacity),
|
||||
pressed-color: var(--_unselected-pressed-state-layer-color),
|
||||
@ -188,8 +186,6 @@ $_checkmark-bottom-left: 7px, -14px;
|
||||
.selected md-ripple {
|
||||
@include ripple.theme(
|
||||
(
|
||||
focus-color: var(--_selected-focus-state-layer-color),
|
||||
focus-opacity: var(--_selected-focus-state-layer-opacity),
|
||||
hover-color: var(--_selected-hover-state-layer-color),
|
||||
hover-opacity: var(--_selected-hover-state-layer-opacity),
|
||||
pressed-color: var(--_selected-pressed-state-layer-color),
|
||||
@ -201,8 +197,6 @@ $_checkmark-bottom-left: 7px, -14px;
|
||||
.error md-ripple {
|
||||
@include ripple.theme(
|
||||
(
|
||||
focus-color: var(--_error-focus-state-layer-color),
|
||||
focus-opacity: var(--_error-focus-state-layer-opacity),
|
||||
hover-color: var(--_error-hover-state-layer-color),
|
||||
hover-opacity: var(--_error-hover-state-layer-opacity),
|
||||
pressed-color: var(--_error-pressed-state-layer-color),
|
||||
|
@ -11,8 +11,6 @@
|
||||
.selected {
|
||||
@include ripple.theme(
|
||||
(
|
||||
focus-color: var(--_selected-focus-state-layer-color),
|
||||
focus-opacity: var(--_selected-focus-state-layer-opacity),
|
||||
hover-color: var(--_selected-hover-state-layer-color),
|
||||
hover-opacity: var(--_selected-hover-state-layer-opacity),
|
||||
pressed-color: var(--_selected-pressed-state-layer-color),
|
||||
|
@ -23,8 +23,6 @@
|
||||
|
||||
@include ripple.theme(
|
||||
(
|
||||
'focus-color': var(--_focus-state-layer-color),
|
||||
'focus-opacity': var(--_focus-state-layer-opacity),
|
||||
'hover-color': var(--_hover-state-layer-color),
|
||||
'hover-opacity': var(--_hover-state-layer-opacity),
|
||||
'pressed-color': var(--_pressed-state-layer-color),
|
||||
|
@ -117,7 +117,6 @@
|
||||
(
|
||||
'container-color': var(--_primary-container-color),
|
||||
'focus-icon-color': var(--_primary-focus-icon-color),
|
||||
'focus-state-layer-color': var(--_primary-focus-state-layer-color),
|
||||
'hover-icon-color': var(--_primary-hover-icon-color),
|
||||
'hover-state-layer-color': var(--_primary-hover-state-layer-color),
|
||||
'icon-color': var(--_primary-icon-color),
|
||||
@ -136,7 +135,6 @@
|
||||
(
|
||||
'container-color': var(--_secondary-container-color),
|
||||
'focus-icon-color': var(--_secondary-focus-icon-color),
|
||||
'focus-state-layer-color': var(--_secondary-focus-state-layer-color),
|
||||
'hover-icon-color': var(--_secondary-hover-icon-color),
|
||||
'hover-state-layer-color': var(--_secondary-hover-state-layer-color),
|
||||
'icon-color': var(--_secondary-icon-color),
|
||||
@ -156,7 +154,6 @@
|
||||
(
|
||||
'container-color': var(--_tertiary-container-color),
|
||||
'focus-icon-color': var(--_tertiary-focus-icon-color),
|
||||
'focus-state-layer-color': var(--_tertiary-focus-state-layer-color),
|
||||
'hover-icon-color': var(--_tertiary-hover-icon-color),
|
||||
'hover-state-layer-color': var(--_tertiary-hover-state-layer-color),
|
||||
'icon-color': var(--_tertiary-icon-color),
|
||||
@ -206,7 +203,6 @@
|
||||
@include ripple.theme(
|
||||
(
|
||||
hover-color: map.get($colors, hover-state-layer-color),
|
||||
focus-color: map.get($colors, focus-state-layer-color),
|
||||
pressed-color: map.get($colors, pressed-state-layer-color),
|
||||
)
|
||||
);
|
||||
|
@ -21,7 +21,6 @@ $_md-sys-motion: tokens.md-sys-motion-values();
|
||||
@include ripple.theme(
|
||||
(
|
||||
hover-opacity: var(--_hover-state-layer-opacity),
|
||||
focus-opacity: var(--_focus-state-layer-opacity),
|
||||
pressed-opacity: var(--_pressed-state-layer-opacity),
|
||||
)
|
||||
);
|
||||
@ -113,7 +112,6 @@ $_md-sys-motion: tokens.md-sys-motion-values();
|
||||
@include fab.color(
|
||||
(
|
||||
'container-color': var(--_container-color),
|
||||
'focus-state-layer-color': var(--_focus-state-layer-color),
|
||||
'hover-state-layer-color': var(--_hover-state-layer-color),
|
||||
'pressed-state-layer-color': var(--_pressed-state-layer-color),
|
||||
'label-text-color': var(--_label-text-color),
|
||||
|
@ -82,8 +82,6 @@
|
||||
|
||||
@include ripple.theme(
|
||||
(
|
||||
focus-color: var(--_focus-state-layer-color),
|
||||
focus-opacity: var(--_focus-state-layer-opacity),
|
||||
hover-color: var(--_hover-state-layer-color),
|
||||
hover-opacity: var(--_hover-state-layer-opacity),
|
||||
pressed-color: var(--_pressed-state-layer-color),
|
||||
@ -130,7 +128,6 @@
|
||||
|
||||
@include ripple.theme(
|
||||
(
|
||||
focus-color: var(--_toggle-unselected-focus-state-layer-color),
|
||||
hover-color: var(--_toggle-unselected-hover-state-layer-color),
|
||||
pressed-color: var(--_toggle-unselected-pressed-state-layer-color),
|
||||
)
|
||||
@ -160,7 +157,6 @@
|
||||
|
||||
@include ripple.theme(
|
||||
(
|
||||
focus-color: var(--_toggle-selected-focus-state-layer-color),
|
||||
hover-color: var(--_toggle-selected-hover-state-layer-color),
|
||||
pressed-color: var(--_toggle-selected-pressed-state-layer-color),
|
||||
)
|
||||
|
@ -84,8 +84,6 @@ $_custom-property-prefix: 'filled-tonal-icon-button';
|
||||
|
||||
@include ripple.theme(
|
||||
(
|
||||
focus-color: var(--_focus-state-layer-color),
|
||||
focus-opacity: var(--_focus-state-layer-opacity),
|
||||
hover-color: var(--_hover-state-layer-color),
|
||||
hover-opacity: var(--_hover-state-layer-opacity),
|
||||
pressed-color: var(--_pressed-state-layer-color),
|
||||
@ -132,7 +130,6 @@ $_custom-property-prefix: 'filled-tonal-icon-button';
|
||||
|
||||
@include ripple.theme(
|
||||
(
|
||||
focus-color: var(--_toggle-unselected-focus-state-layer-color),
|
||||
hover-color: var(--_toggle-unselected-hover-state-layer-color),
|
||||
pressed-color: var(--_toggle-unselected-pressed-state-layer-color),
|
||||
)
|
||||
@ -162,7 +159,6 @@ $_custom-property-prefix: 'filled-tonal-icon-button';
|
||||
|
||||
@include ripple.theme(
|
||||
(
|
||||
focus-color: var(--_toggle-selected-focus-state-layer-color),
|
||||
hover-color: var(--_toggle-selected-hover-state-layer-color),
|
||||
pressed-color: var(--_toggle-selected-pressed-state-layer-color),
|
||||
)
|
||||
|
@ -68,8 +68,6 @@
|
||||
|
||||
@include ripple.theme(
|
||||
(
|
||||
focus-color: var(--_unselected-focus-state-layer-color),
|
||||
focus-opacity: var(--_focus-state-layer-opacity),
|
||||
hover-color: var(--_unselected-hover-state-layer-color),
|
||||
hover-opacity: var(--_hover-state-layer-opacity),
|
||||
pressed-color: var(--_unselected-pressed-state-layer-color),
|
||||
@ -146,8 +144,6 @@
|
||||
|
||||
@include ripple.theme(
|
||||
(
|
||||
focus-color: var(--_selected-focus-state-layer-color),
|
||||
focus-opacity: var(--_focus-state-layer-opacity),
|
||||
hover-color: var(--_selected-hover-state-layer-color),
|
||||
hover-opacity: var(--_hover-state-layer-opacity),
|
||||
pressed-color: var(--_selected-pressed-state-layer-color),
|
||||
|
@ -51,8 +51,6 @@
|
||||
|
||||
@include ripple.theme(
|
||||
(
|
||||
focus-color: var(--_unselected-focus-state-layer-color),
|
||||
focus-opacity: var(--_unselected-focus-state-layer-opacity),
|
||||
hover-color: var(--_unselected-hover-state-layer-color),
|
||||
hover-opacity: var(--_unselected-hover-state-layer-opacity),
|
||||
pressed-color: var(--_unselected-pressed-state-layer-color),
|
||||
@ -104,8 +102,6 @@
|
||||
|
||||
@include ripple.theme(
|
||||
(
|
||||
focus-color: var(--_selected-focus-state-layer-color),
|
||||
focus-opacity: var(--_selected-focus-state-layer-opacity),
|
||||
hover-color: var(--_selected-hover-state-layer-color),
|
||||
hover-opacity: var(--_selected-hover-state-layer-opacity),
|
||||
pressed-color: var(--_selected-pressed-state-layer-color),
|
||||
|
@ -56,8 +56,6 @@
|
||||
hover-opacity: var(--_list-item-hover-state-layer-opacity),
|
||||
pressed-color: var(--_list-item-pressed-state-layer-color),
|
||||
pressed-opacity: var(--_list-item-pressed-state-layer-opacity),
|
||||
focus-color: var(--_list-item-focus-state-layer-color),
|
||||
focus-opacity: var(--_list-item-focus-state-layer-opacity),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -199,10 +199,8 @@ $_custom-property-prefix: 'navigation-bar';
|
||||
@include ripple.theme(
|
||||
(
|
||||
hover-color: var(--_active-hover-state-layer-color),
|
||||
focus-color: var(--_active-focus-state-layer-color),
|
||||
pressed-color: var(--_active-pressed-state-layer-color),
|
||||
hover-opacity: var(--_hover-state-layer-opacity),
|
||||
focus-opacity: var(--_focus-state-layer-opacity),
|
||||
pressed-opacity: var(--_pressed-state-layer-opacity),
|
||||
)
|
||||
);
|
||||
@ -250,10 +248,8 @@ $_custom-property-prefix: 'navigation-bar';
|
||||
@include ripple.theme(
|
||||
(
|
||||
hover-color: var(--_inactive-hover-state-layer-color),
|
||||
focus-color: var(--_inactive-focus-state-layer-color),
|
||||
pressed-color: var(--_inactive-pressed-state-layer-color),
|
||||
hover-opacity: var(--_hover-state-layer-opacity),
|
||||
focus-opacity: var(--_focus-state-layer-opacity),
|
||||
pressed-opacity: var(--_pressed-state-layer-opacity),
|
||||
)
|
||||
);
|
||||
|
@ -4,38 +4,42 @@
|
||||
//
|
||||
|
||||
// go/keep-sorted start
|
||||
@use 'sass:list';
|
||||
@use 'sass:map';
|
||||
// go/keep-sorted end
|
||||
// go/keep-sorted start
|
||||
@use '../../focus/focus-ring';
|
||||
@use '../../motion/animation';
|
||||
@use '../../ripple/ripple';
|
||||
@use '../../sass/theme';
|
||||
@use '../../tokens';
|
||||
// go/keep-sorted end
|
||||
|
||||
$_md-sys-motion: tokens.md-sys-motion-values();
|
||||
|
||||
@mixin theme($tokens) {
|
||||
$tokens: theme.validate-theme(tokens.md-comp-radio-button-values(), $tokens);
|
||||
$tokens: theme.create-theme-vars($tokens, 'radio');
|
||||
$supported-tokens: tokens.$md-comp-radio-button-supported-tokens;
|
||||
|
||||
@include theme.emit-theme-vars($tokens);
|
||||
@each $token, $value in $tokens {
|
||||
@if list.index($supported-tokens, $token) == null {
|
||||
@error 'Token `#{$token}` is not a supported token.';
|
||||
}
|
||||
|
||||
@if $value {
|
||||
--md-radio-#{$token}: #{$value};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin styles() {
|
||||
$tokens: tokens.md-comp-radio-button-values();
|
||||
$tokens: theme.create-theme-vars($tokens, 'radio');
|
||||
|
||||
:host {
|
||||
@each $token, $value in $tokens {
|
||||
--_#{$token}: #{$value};
|
||||
--_#{$token}: var(--md-radio-#{$token}, #{$value});
|
||||
}
|
||||
|
||||
@include ripple.theme(
|
||||
(
|
||||
focus-color: var(--_unselected-focus-state-layer-color),
|
||||
focus-opacity: var(--_unselected-focus-state-layer-opacity),
|
||||
hover-color: var(--_unselected-hover-state-layer-color),
|
||||
hover-opacity: var(--_unselected-hover-state-layer-opacity),
|
||||
pressed-color: var(--_unselected-pressed-state-layer-color),
|
||||
@ -61,8 +65,6 @@ $_md-sys-motion: tokens.md-sys-motion-values();
|
||||
:host([checked]) {
|
||||
@include ripple.theme(
|
||||
(
|
||||
focus-color: var(--_selected-focus-state-layer-color),
|
||||
focus-opacity: var(--_selected-focus-state-layer-opacity),
|
||||
hover-color: var(--_selected-hover-state-layer-color),
|
||||
hover-opacity: var(--_selected-hover-state-layer-opacity),
|
||||
pressed-color: var(--_selected-pressed-state-layer-color),
|
||||
|
@ -88,12 +88,6 @@
|
||||
opacity: var(--_hover-opacity);
|
||||
}
|
||||
|
||||
.focused::before {
|
||||
background-color: var(--_focus-color);
|
||||
opacity: var(--_focus-opacity);
|
||||
transition-duration: 75ms;
|
||||
}
|
||||
|
||||
.pressed::after {
|
||||
// press ripple fade-in
|
||||
opacity: var(--_pressed-opacity);
|
||||
|
@ -80,7 +80,6 @@ export class Ripple extends LitElement {
|
||||
@property({type: Boolean, reflect: true}) disabled = false;
|
||||
|
||||
@state() private hovered = false;
|
||||
@state() private focused = false;
|
||||
@state() private pressed = false;
|
||||
|
||||
@query('.surface') private readonly mdRoot!: HTMLElement|null;
|
||||
@ -113,14 +112,6 @@ export class Ripple extends LitElement {
|
||||
}
|
||||
}
|
||||
|
||||
handleFocusin() {
|
||||
this.focused = true;
|
||||
}
|
||||
|
||||
handleFocusout() {
|
||||
this.focused = false;
|
||||
}
|
||||
|
||||
handlePointerup(event: PointerEvent) {
|
||||
if (!this.shouldReactToEvent(event)) {
|
||||
return;
|
||||
@ -212,7 +203,6 @@ export class Ripple extends LitElement {
|
||||
protected override render() {
|
||||
const classes = {
|
||||
'hovered': this.hovered,
|
||||
'focused': this.focused,
|
||||
'pressed': this.pressed,
|
||||
};
|
||||
|
||||
@ -222,7 +212,6 @@ export class Ripple extends LitElement {
|
||||
protected override update(changedProps: PropertyValues<this>) {
|
||||
if (changedProps.has('disabled') && this.disabled) {
|
||||
this.hovered = false;
|
||||
this.focused = false;
|
||||
this.pressed = false;
|
||||
}
|
||||
super.update(changedProps);
|
||||
|
@ -16,7 +16,6 @@ import {Ripple} from './ripple.js';
|
||||
|
||||
enum RippleStateClasses {
|
||||
HOVERED = 'hovered',
|
||||
FOCUSED = 'focused',
|
||||
PRESSED = 'pressed',
|
||||
}
|
||||
|
||||
@ -40,9 +39,7 @@ describe('Ripple', () => {
|
||||
async function setupTest() {
|
||||
const rippleRef = createRef<TestRipple>();
|
||||
const root = env.render(html`
|
||||
<div ${ripple(() => rippleRef.value || null)}
|
||||
@focusin=${() => rippleRef.value?.handleFocusin()}
|
||||
@focusout=${() => rippleRef.value?.handleFocusout()}>
|
||||
<div ${ripple(() => rippleRef.value || null)}>
|
||||
<test-ripple ${ref(rippleRef)}></test-ripple>
|
||||
</div>
|
||||
`);
|
||||
@ -98,23 +95,6 @@ describe('Ripple', () => {
|
||||
expect(surface).not.toHaveClass(RippleStateClasses.PRESSED);
|
||||
});
|
||||
|
||||
it('sets focused class on focus', async () => {
|
||||
const {harness, surface} = await setupTest();
|
||||
await harness.focusWithKeyboard();
|
||||
await env.waitForStability();
|
||||
|
||||
expect(surface).toHaveClass(RippleStateClasses.FOCUSED);
|
||||
});
|
||||
|
||||
it('removes focused class on blur', async () => {
|
||||
const {harness, surface} = await setupTest();
|
||||
await harness.focusWithKeyboard();
|
||||
await harness.blur();
|
||||
await env.waitForStability();
|
||||
|
||||
expect(surface).not.toHaveClass(RippleStateClasses.FOCUSED);
|
||||
});
|
||||
|
||||
it('sets hover class on pointer enter', async () => {
|
||||
const {harness, surface} = await setupTest();
|
||||
await harness.startHover();
|
||||
@ -142,6 +122,7 @@ describe('Ripple', () => {
|
||||
|
||||
expect(surface).not.toHaveClass(RippleStateClasses.HOVERED);
|
||||
});
|
||||
|
||||
it('responds to keyboard click after mouse click', async () => {
|
||||
const {instance, harness} = await setupTest();
|
||||
const STATE_INACTIVE = 0;
|
||||
|
@ -194,8 +194,6 @@
|
||||
(
|
||||
hover-color: var(--_unselected-hover-state-layer-color),
|
||||
hover-opacity: var(--_hover-state-layer-opacity),
|
||||
focus-color: var(--_unselected-focus-state-layer-color),
|
||||
focus-opacity: var(--_focus-state-layer-opacity),
|
||||
pressed-color: var(--_unselected-pressed-state-layer-color),
|
||||
pressed-opacity: var(--_pressed-state-layer-opacity),
|
||||
)
|
||||
@ -241,8 +239,6 @@
|
||||
(
|
||||
hover-color: var(--_selected-hover-state-layer-color),
|
||||
hover-opacity: var(--_hover-state-layer-opacity),
|
||||
focus-color: var(--_selected-focus-state-layer-color),
|
||||
focus-opacity: var(--_focus-state-layer-opacity),
|
||||
pressed-color: var(--_selected-pressed-state-layer-color),
|
||||
pressed-opacity: var(--_pressed-state-layer-opacity),
|
||||
)
|
||||
|
@ -139,10 +139,8 @@ $_easing-standard: map.get($_md-sys-motion, 'easing-standard');
|
||||
@include ripple.theme(
|
||||
(
|
||||
'hover-color': var(--_selected-hover-state-layer-color),
|
||||
'focus-color': var(--_selected-focus-state-layer-color),
|
||||
'pressed-color': var(--_selected-pressed-state-layer-color),
|
||||
'hover-opacity': var(--_selected-hover-state-layer-opacity),
|
||||
'focus-opacity': var(--_selected-focus-state-layer-opacity),
|
||||
'pressed-opacity': var(--_selected-pressed-state-layer-opacity),
|
||||
)
|
||||
);
|
||||
@ -152,10 +150,8 @@ $_easing-standard: map.get($_md-sys-motion, 'easing-standard');
|
||||
@include ripple.theme(
|
||||
(
|
||||
'hover-color': var(--_unselected-hover-state-layer-color),
|
||||
'focus-color': var(--_unselected-focus-state-layer-color),
|
||||
'pressed-color': var(--_unselected-pressed-state-layer-color),
|
||||
'hover-opacity': var(--_unselected-hover-state-layer-opacity),
|
||||
'focus-opacity': var(--_unselected-focus-state-layer-opacity),
|
||||
'pressed-opacity': var(--_unselected-pressed-state-layer-opacity),
|
||||
)
|
||||
);
|
||||
|
@ -43,8 +43,6 @@
|
||||
|
||||
@include ripple.theme(
|
||||
(
|
||||
focus-color: var(--_focus-state-layer-color),
|
||||
focus-opacity: var(--_focus-state-layer-opacity),
|
||||
hover-color: var(--_hover-state-layer-color),
|
||||
hover-opacity: var(--_hover-state-layer-opacity),
|
||||
pressed-color: var(--_pressed-state-layer-color),
|
||||
@ -191,8 +189,6 @@
|
||||
|
||||
@include ripple.theme(
|
||||
(
|
||||
focus-color: var(--_active-focus-state-layer-color),
|
||||
focus-opacity: var(--_active-focus-state-layer-opacity),
|
||||
hover-color: var(--_active-hover-state-layer-color),
|
||||
hover-opacity: var(--_active-hover-state-layer-opacity),
|
||||
pressed-color: var(--_active-pressed-state-layer-color),
|
||||
|
@ -38,8 +38,6 @@ $supported-tokens: (
|
||||
'focus-label-text-color',
|
||||
'focus-leading-icon-color',
|
||||
'focus-outline-color',
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
'hover-label-text-color',
|
||||
'hover-leading-icon-color',
|
||||
'hover-state-layer-color',
|
||||
@ -65,6 +63,8 @@ $unsupported-tokens: (
|
||||
'dragged-leading-icon-color',
|
||||
'dragged-state-layer-color',
|
||||
'dragged-state-layer-opacity',
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
'label-text-font',
|
||||
'label-text-line-height',
|
||||
'label-text-size',
|
||||
|
@ -15,8 +15,6 @@ $supported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'container-shape',
|
||||
'container-size',
|
||||
'error-focus-state-layer-color',
|
||||
'error-focus-state-layer-opacity',
|
||||
'error-hover-state-layer-color',
|
||||
'error-hover-state-layer-opacity',
|
||||
'error-pressed-state-layer-color',
|
||||
@ -36,8 +34,6 @@ $supported-tokens: (
|
||||
'selected-error-pressed-icon-color',
|
||||
'selected-focus-container-color',
|
||||
'selected-focus-icon-color',
|
||||
'selected-focus-state-layer-color',
|
||||
'selected-focus-state-layer-opacity',
|
||||
'selected-hover-container-color',
|
||||
'selected-hover-icon-color',
|
||||
'selected-hover-state-layer-color',
|
||||
@ -58,8 +54,6 @@ $supported-tokens: (
|
||||
'unselected-error-pressed-outline-color',
|
||||
'unselected-focus-outline-color',
|
||||
'unselected-focus-outline-width',
|
||||
'unselected-focus-state-layer-color',
|
||||
'unselected-focus-state-layer-opacity',
|
||||
'unselected-hover-outline-color',
|
||||
'unselected-hover-outline-width',
|
||||
'unselected-hover-state-layer-color',
|
||||
@ -75,11 +69,18 @@ $supported-tokens: (
|
||||
|
||||
$unsupported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'error-focus-state-layer-color',
|
||||
'error-focus-state-layer-opacity',
|
||||
'selected-disabled-container-outline-width',
|
||||
'selected-focus-outline-width',
|
||||
'selected-focus-state-layer-color',
|
||||
'selected-focus-state-layer-opacity',
|
||||
'selected-hover-outline-width',
|
||||
'selected-outline-width',
|
||||
'selected-pressed-outline-width' // go/keep-sorted end
|
||||
'selected-pressed-outline-width',
|
||||
'unselected-focus-state-layer-color',
|
||||
'unselected-focus-state-layer-opacity',
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
$_default: (
|
||||
|
@ -30,8 +30,6 @@ $supported-tokens: (
|
||||
'disabled-label-text-opacity',
|
||||
'focus-container-elevation',
|
||||
'focus-label-text-color',
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
'hover-container-elevation',
|
||||
'hover-label-text-color',
|
||||
'hover-state-layer-color',
|
||||
@ -60,6 +58,8 @@ $supported-tokens: (
|
||||
|
||||
$unsupported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
'label-text-font',
|
||||
'label-text-line-height',
|
||||
'label-text-size',
|
||||
|
@ -28,8 +28,6 @@ $supported-tokens: (
|
||||
'container-width',
|
||||
'focus-container-elevation',
|
||||
'focus-label-text-color',
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
'hover-container-elevation',
|
||||
'hover-label-text-color',
|
||||
'hover-state-layer-color',
|
||||
@ -53,6 +51,13 @@ $supported-tokens: (
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
$unsupported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
@function _get-new-tokens($deps, $exclude-hardcoded-values) {
|
||||
$large-tokens: md-comp-fab-branded-large.values(
|
||||
$deps,
|
||||
@ -91,6 +96,7 @@ $_default: (
|
||||
$tokens: values.validate(
|
||||
md-comp-fab-branded.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
$unsupported-tokens: $unsupported-tokens,
|
||||
$new-tokens: _get-new-tokens($deps, $exclude-hardcoded-values)
|
||||
);
|
||||
|
||||
|
@ -36,8 +36,6 @@ $supported-tokens: (
|
||||
'focus-container-elevation',
|
||||
'focus-icon-color',
|
||||
'focus-label-text-color',
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
'hover-container-elevation',
|
||||
'hover-icon-color',
|
||||
'hover-label-text-color',
|
||||
@ -64,7 +62,6 @@ $supported-tokens: (
|
||||
'primary-container-color',
|
||||
'primary-focus-icon-color',
|
||||
'primary-focus-label-text-color',
|
||||
'primary-focus-state-layer-color',
|
||||
'primary-hover-icon-color',
|
||||
'primary-hover-label-text-color',
|
||||
'primary-hover-state-layer-color',
|
||||
@ -76,7 +73,6 @@ $supported-tokens: (
|
||||
'secondary-container-color',
|
||||
'secondary-focus-icon-color',
|
||||
'secondary-focus-label-text-color',
|
||||
'secondary-focus-state-layer-color',
|
||||
'secondary-hover-icon-color',
|
||||
'secondary-hover-label-text-color',
|
||||
'secondary-hover-state-layer-color',
|
||||
@ -92,7 +88,6 @@ $supported-tokens: (
|
||||
'tertiary-container-color',
|
||||
'tertiary-focus-icon-color',
|
||||
'tertiary-focus-label-text-color',
|
||||
'tertiary-focus-state-layer-color',
|
||||
'tertiary-hover-icon-color',
|
||||
'tertiary-hover-label-text-color',
|
||||
'tertiary-hover-state-layer-color',
|
||||
@ -104,6 +99,13 @@ $supported-tokens: (
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
$unsupported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
@function _get-new-tokens($deps, $exclude-hardcoded-values) {
|
||||
$large-tokens: md-comp-fab-surface-large.values(
|
||||
$deps,
|
||||
@ -157,8 +159,6 @@ $supported-tokens: (
|
||||
'primary-focus-icon-color': map.get($primary-tokens, 'focus-icon-color'),
|
||||
'primary-focus-label-text-color':
|
||||
map.get($extended-primary-tokens, 'focus-label-text-color'),
|
||||
'primary-focus-state-layer-color':
|
||||
map.get($primary-tokens, 'focus-state-layer-color'),
|
||||
'primary-hover-icon-color': map.get($primary-tokens, 'hover-icon-color'),
|
||||
'primary-hover-label-text-color':
|
||||
map.get($extended-primary-tokens, 'hover-label-text-color'),
|
||||
@ -176,8 +176,6 @@ $supported-tokens: (
|
||||
'secondary-focus-icon-color': map.get($secondary-tokens, 'focus-icon-color'),
|
||||
'secondary-focus-label-text-color':
|
||||
map.get($extended-secondary-tokens, 'focus-label-text-color'),
|
||||
'secondary-focus-state-layer-color':
|
||||
map.get($secondary-tokens, 'focus-state-layer-color'),
|
||||
'secondary-hover-icon-color': map.get($secondary-tokens, 'hover-icon-color'),
|
||||
'secondary-hover-label-text-color':
|
||||
map.get($extended-secondary-tokens, 'hover-label-text-color'),
|
||||
@ -200,8 +198,6 @@ $supported-tokens: (
|
||||
'tertiary-focus-icon-color': map.get($tertiary-tokens, 'focus-icon-color'),
|
||||
'tertiary-focus-label-text-color':
|
||||
map.get($extended-tertiary-tokens, 'focus-label-text-color'),
|
||||
'tertiary-focus-state-layer-color':
|
||||
map.get($tertiary-tokens, 'focus-state-layer-color'),
|
||||
'tertiary-hover-icon-color': map.get($tertiary-tokens, 'hover-icon-color'),
|
||||
'tertiary-hover-label-text-color':
|
||||
map.get($extended-tertiary-tokens, 'hover-label-text-color'),
|
||||
@ -234,6 +230,7 @@ $_default: (
|
||||
$tokens: values.validate(
|
||||
$tokens,
|
||||
$supported-tokens: $supported-tokens,
|
||||
$unsupported-tokens: $unsupported-tokens,
|
||||
$new-tokens: _get-new-tokens($deps, $exclude-hardcoded-values)
|
||||
);
|
||||
|
||||
|
@ -30,8 +30,6 @@ $supported-tokens: (
|
||||
'disabled-label-text-opacity',
|
||||
'focus-container-elevation',
|
||||
'focus-label-text-color',
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
'hover-container-elevation',
|
||||
'hover-label-text-color',
|
||||
'hover-state-layer-color',
|
||||
@ -60,6 +58,8 @@ $supported-tokens: (
|
||||
|
||||
$unsupported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
'label-text-font',
|
||||
'label-text-line-height',
|
||||
'label-text-size',
|
||||
|
@ -21,8 +21,6 @@ $supported-tokens: (
|
||||
'disabled-icon-color',
|
||||
'disabled-icon-opacity',
|
||||
'focus-icon-color',
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
'hover-icon-color',
|
||||
'hover-state-layer-color',
|
||||
'hover-state-layer-opacity',
|
||||
@ -33,14 +31,12 @@ $supported-tokens: (
|
||||
'pressed-state-layer-opacity',
|
||||
'selected-container-color',
|
||||
'toggle-selected-focus-icon-color',
|
||||
'toggle-selected-focus-state-layer-color',
|
||||
'toggle-selected-hover-icon-color',
|
||||
'toggle-selected-hover-state-layer-color',
|
||||
'toggle-selected-icon-color',
|
||||
'toggle-selected-pressed-icon-color',
|
||||
'toggle-selected-pressed-state-layer-color',
|
||||
'toggle-unselected-focus-icon-color',
|
||||
'toggle-unselected-focus-state-layer-color',
|
||||
'toggle-unselected-hover-icon-color',
|
||||
'toggle-unselected-hover-state-layer-color',
|
||||
'toggle-unselected-icon-color',
|
||||
@ -50,6 +46,15 @@ $supported-tokens: (
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
$unsupported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
'toggle-selected-focus-state-layer-color',
|
||||
'toggle-unselected-focus-state-layer-color',
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
$_default: (
|
||||
'md-sys-color': md-sys-color.values-light(),
|
||||
'md-sys-shape': md-sys-shape.values(),
|
||||
@ -59,7 +64,8 @@ $_default: (
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
$tokens: values.validate(
|
||||
md-comp-filled-icon-button.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens
|
||||
$supported-tokens: $supported-tokens,
|
||||
$unsupported-tokens: $unsupported-tokens
|
||||
);
|
||||
|
||||
@return $tokens;
|
||||
|
@ -30,8 +30,6 @@ $supported-tokens: (
|
||||
'disabled-label-text-opacity',
|
||||
'focus-container-elevation',
|
||||
'focus-label-text-color',
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
'hover-container-elevation',
|
||||
'hover-label-text-color',
|
||||
'hover-state-layer-color',
|
||||
@ -60,6 +58,8 @@ $supported-tokens: (
|
||||
|
||||
$unsupported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
'label-text-font',
|
||||
'label-text-line-height',
|
||||
'label-text-size',
|
||||
|
@ -21,8 +21,6 @@ $supported-tokens: (
|
||||
'disabled-icon-color',
|
||||
'disabled-icon-opacity',
|
||||
'focus-icon-color',
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
'hover-icon-color',
|
||||
'hover-state-layer-color',
|
||||
'hover-state-layer-opacity',
|
||||
@ -33,14 +31,12 @@ $supported-tokens: (
|
||||
'pressed-state-layer-opacity',
|
||||
'selected-container-color',
|
||||
'toggle-selected-focus-icon-color',
|
||||
'toggle-selected-focus-state-layer-color',
|
||||
'toggle-selected-hover-icon-color',
|
||||
'toggle-selected-hover-state-layer-color',
|
||||
'toggle-selected-icon-color',
|
||||
'toggle-selected-pressed-icon-color',
|
||||
'toggle-selected-pressed-state-layer-color',
|
||||
'toggle-unselected-focus-icon-color',
|
||||
'toggle-unselected-focus-state-layer-color',
|
||||
'toggle-unselected-hover-icon-color',
|
||||
'toggle-unselected-hover-state-layer-color',
|
||||
'toggle-unselected-icon-color',
|
||||
@ -50,6 +46,15 @@ $supported-tokens: (
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
$unsupported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
'toggle-selected-focus-state-layer-color',
|
||||
'toggle-unselected-focus-state-layer-color',
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
$_default: (
|
||||
'md-sys-color': md-sys-color.values-light(),
|
||||
'md-sys-shape': md-sys-shape.values(),
|
||||
@ -59,7 +64,8 @@ $_default: (
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
$tokens: values.validate(
|
||||
md-comp-filled-tonal-icon-button.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens
|
||||
$supported-tokens: $supported-tokens,
|
||||
$unsupported-tokens: $unsupported-tokens
|
||||
);
|
||||
|
||||
@return $tokens;
|
||||
|
@ -43,8 +43,6 @@ $supported-tokens: (
|
||||
'focus-label-text-color',
|
||||
'focus-leading-icon-color',
|
||||
'focus-outline-color',
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
'focus-trailing-icon-color',
|
||||
'hover-label-text-color',
|
||||
'hover-leading-icon-color',
|
||||
@ -65,8 +63,6 @@ $supported-tokens: (
|
||||
'selected-container-color',
|
||||
'selected-focus-label-text-color',
|
||||
'selected-focus-leading-icon-color',
|
||||
'selected-focus-state-layer-color',
|
||||
'selected-focus-state-layer-opacity',
|
||||
'selected-focus-trailing-icon-color',
|
||||
'selected-hover-label-text-color',
|
||||
'selected-hover-leading-icon-color',
|
||||
@ -96,6 +92,8 @@ $unsupported-tokens: (
|
||||
'dragged-state-layer-opacity',
|
||||
'dragged-trailing-icon-color',
|
||||
'focus-container-elevation',
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
'hover-container-elevation',
|
||||
'label-text-font',
|
||||
'label-text-line-height',
|
||||
@ -109,6 +107,8 @@ $unsupported-tokens: (
|
||||
'selected-dragged-state-layer-opacity',
|
||||
'selected-dragged-trailing-icon-color',
|
||||
'selected-focus-container-elevation',
|
||||
'selected-focus-state-layer-color',
|
||||
'selected-focus-state-layer-opacity',
|
||||
'selected-hover-container-elevation',
|
||||
'selected-pressed-container-elevation',
|
||||
// go/keep-sorted end
|
||||
|
@ -17,8 +17,6 @@ $supported-tokens: (
|
||||
'disabled-icon-opacity',
|
||||
'icon-size',
|
||||
'selected-focus-icon-color',
|
||||
'selected-focus-state-layer-color',
|
||||
'selected-focus-state-layer-opacity',
|
||||
'selected-hover-icon-color',
|
||||
'selected-hover-state-layer-color',
|
||||
'selected-hover-state-layer-opacity',
|
||||
@ -29,8 +27,6 @@ $supported-tokens: (
|
||||
'state-layer-shape',
|
||||
'state-layer-size',
|
||||
'unselected-focus-icon-color',
|
||||
'unselected-focus-state-layer-color',
|
||||
'unselected-focus-state-layer-opacity',
|
||||
'unselected-hover-icon-color',
|
||||
'unselected-hover-state-layer-color',
|
||||
'unselected-hover-state-layer-opacity',
|
||||
@ -41,6 +37,15 @@ $supported-tokens: (
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
$unsupported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'selected-focus-state-layer-color',
|
||||
'selected-focus-state-layer-opacity',
|
||||
'unselected-focus-state-layer-color',
|
||||
'unselected-focus-state-layer-opacity',
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
$_default: (
|
||||
'md-sys-color': md-sys-color.values-light(),
|
||||
'md-sys-shape': md-sys-shape.values(),
|
||||
@ -50,7 +55,8 @@ $_default: (
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
$tokens: values.validate(
|
||||
md-comp-icon-button.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens
|
||||
$supported-tokens: $supported-tokens,
|
||||
$unsupported-tokens: $unsupported-tokens
|
||||
);
|
||||
|
||||
@return $tokens;
|
||||
|
@ -36,8 +36,6 @@ $supported-tokens: (
|
||||
'focus-label-text-color',
|
||||
'focus-leading-icon-color',
|
||||
'focus-outline-color',
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
'focus-trailing-icon-color',
|
||||
'hover-label-text-color',
|
||||
'hover-leading-icon-color',
|
||||
@ -58,8 +56,6 @@ $supported-tokens: (
|
||||
'selected-container-color',
|
||||
'selected-focus-label-text-color',
|
||||
'selected-focus-leading-icon-color',
|
||||
'selected-focus-state-layer-color',
|
||||
'selected-focus-state-layer-opacity',
|
||||
'selected-focus-trailing-icon-color',
|
||||
'selected-hover-label-text-color',
|
||||
'selected-hover-leading-icon-color',
|
||||
@ -88,6 +84,8 @@ $unsupported-tokens: (
|
||||
'dragged-state-layer-color',
|
||||
'dragged-state-layer-opacity',
|
||||
'dragged-trailing-icon-color',
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
'label-text-font',
|
||||
'label-text-line-height',
|
||||
'label-text-size',
|
||||
@ -98,6 +96,8 @@ $unsupported-tokens: (
|
||||
'selected-dragged-state-layer-color',
|
||||
'selected-dragged-state-layer-opacity',
|
||||
'selected-dragged-trailing-icon-color',
|
||||
'selected-focus-state-layer-color',
|
||||
'selected-focus-state-layer-opacity',
|
||||
'trailing-icon-size',
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
@ -16,55 +16,6 @@
|
||||
@use './values';
|
||||
// go/keep-sorted end
|
||||
|
||||
$_default: (
|
||||
'md-sys-color': md-sys-color.values-light(),
|
||||
'md-sys-elevation': md-sys-elevation.values(),
|
||||
'md-sys-shape': md-sys-shape.values(),
|
||||
'md-sys-state': md-sys-state.values(),
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
$unsupported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'list-item-container-elevation',
|
||||
'list-item-disabled-state-layer-color',
|
||||
'list-item-disabled-state-layer-opacity',
|
||||
'list-item-dragged-container-elevation',
|
||||
'list-item-dragged-label-text-color',
|
||||
'list-item-dragged-leading-icon-icon-color',
|
||||
'list-item-dragged-state-layer-color',
|
||||
'list-item-dragged-state-layer-opacity',
|
||||
'list-item-dragged-trailing-icon-icon-color',
|
||||
'list-item-label-text-font',
|
||||
'list-item-label-text-size',
|
||||
'list-item-label-text-tracking',
|
||||
'list-item-label-text-weight',
|
||||
'list-item-leading-avatar-label-font',
|
||||
'list-item-leading-avatar-label-line-height',
|
||||
'list-item-leading-avatar-label-size',
|
||||
'list-item-leading-avatar-label-tracking',
|
||||
'list-item-leading-avatar-label-weight',
|
||||
'list-item-overline-color',
|
||||
'list-item-overline-font',
|
||||
'list-item-overline-line-height',
|
||||
'list-item-overline-size',
|
||||
'list-item-overline-tracking',
|
||||
'list-item-overline-type',
|
||||
'list-item-overline-weight',
|
||||
'list-item-selected-trailing-icon-color',
|
||||
'list-item-supporting-text-font',
|
||||
'list-item-supporting-text-line-height',
|
||||
'list-item-supporting-text-size',
|
||||
'list-item-supporting-text-tracking',
|
||||
'list-item-supporting-text-weight',
|
||||
'list-item-trailing-supporting-text-font',
|
||||
'list-item-trailing-supporting-text-size',
|
||||
'list-item-trailing-supporting-text-tracking',
|
||||
'list-item-trailing-supporting-text-weight',
|
||||
'list-item-unselected-trailing-icon-color',
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
$supported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'list-item-container-color',
|
||||
@ -77,8 +28,6 @@ $supported-tokens: (
|
||||
'list-item-disabled-trailing-icon-opacity',
|
||||
'list-item-focus-label-text-color',
|
||||
'list-item-focus-leading-icon-icon-color',
|
||||
'list-item-focus-state-layer-color',
|
||||
'list-item-focus-state-layer-opacity',
|
||||
'list-item-focus-trailing-icon-icon-color',
|
||||
'list-item-hover-label-text-color',
|
||||
'list-item-hover-leading-icon-icon-color',
|
||||
@ -120,7 +69,72 @@ $supported-tokens: (
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
@function get-new-tokens($deps, $exclude-hardcoded-values) {
|
||||
$unsupported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'list-item-container-elevation',
|
||||
'list-item-disabled-state-layer-color',
|
||||
'list-item-disabled-state-layer-opacity',
|
||||
'list-item-dragged-container-elevation',
|
||||
'list-item-dragged-label-text-color',
|
||||
'list-item-dragged-leading-icon-icon-color',
|
||||
'list-item-dragged-state-layer-color',
|
||||
'list-item-dragged-state-layer-opacity',
|
||||
'list-item-dragged-trailing-icon-icon-color',
|
||||
'list-item-focus-state-layer-color',
|
||||
'list-item-focus-state-layer-opacity',
|
||||
'list-item-label-text-font',
|
||||
'list-item-label-text-size',
|
||||
'list-item-label-text-tracking',
|
||||
'list-item-label-text-weight',
|
||||
'list-item-leading-avatar-label-font',
|
||||
'list-item-leading-avatar-label-line-height',
|
||||
'list-item-leading-avatar-label-size',
|
||||
'list-item-leading-avatar-label-tracking',
|
||||
'list-item-leading-avatar-label-weight',
|
||||
'list-item-overline-color',
|
||||
'list-item-overline-font',
|
||||
'list-item-overline-line-height',
|
||||
'list-item-overline-size',
|
||||
'list-item-overline-tracking',
|
||||
'list-item-overline-type',
|
||||
'list-item-overline-weight',
|
||||
'list-item-selected-trailing-icon-color',
|
||||
'list-item-supporting-text-font',
|
||||
'list-item-supporting-text-line-height',
|
||||
'list-item-supporting-text-size',
|
||||
'list-item-supporting-text-tracking',
|
||||
'list-item-supporting-text-weight',
|
||||
'list-item-trailing-supporting-text-font',
|
||||
'list-item-trailing-supporting-text-size',
|
||||
'list-item-trailing-supporting-text-tracking',
|
||||
'list-item-trailing-supporting-text-weight',
|
||||
'list-item-unselected-trailing-icon-color',
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
$_default: (
|
||||
'md-sys-color': md-sys-color.values-light(),
|
||||
'md-sys-elevation': md-sys-elevation.values(),
|
||||
'md-sys-shape': md-sys-shape.values(),
|
||||
'md-sys-state': md-sys-state.values(),
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
$original-tokens: md-comp-list.values($deps, $exclude-hardcoded-values);
|
||||
$original-tokens: map.merge($original-tokens, _get-override-tokens($deps));
|
||||
|
||||
$tokens: values.validate(
|
||||
$original-tokens,
|
||||
$supported-tokens: $supported-tokens,
|
||||
$unsupported-tokens: $unsupported-tokens,
|
||||
$new-tokens: _get-new-tokens($deps, $exclude-hardcoded-values)
|
||||
);
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
||||
@function _get-new-tokens($deps, $exclude-hardcoded-values) {
|
||||
// Values pulled from b/198759625 spreadsheet
|
||||
@return (
|
||||
// go/keep-sorted start
|
||||
@ -141,7 +155,7 @@ $supported-tokens: (
|
||||
);
|
||||
}
|
||||
|
||||
@function get-override-tokens($deps) {
|
||||
@function _get-override-tokens($deps) {
|
||||
// TODO(b/271876162): remove when tokens compiler emits typescale tokens
|
||||
@return (
|
||||
// go/keep-sorted start
|
||||
@ -158,17 +172,3 @@ $supported-tokens: (
|
||||
// go/keep-sorted end
|
||||
);
|
||||
}
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
$original-tokens: md-comp-list.values($deps, $exclude-hardcoded-values);
|
||||
$original-tokens: map.merge($original-tokens, get-override-tokens($deps));
|
||||
|
||||
$tokens: values.validate(
|
||||
$original-tokens,
|
||||
$supported-tokens: $supported-tokens,
|
||||
$unsupported-tokens: $unsupported-tokens,
|
||||
$new-tokens: get-new-tokens($deps, $exclude-hardcoded-values)
|
||||
);
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -16,16 +16,12 @@
|
||||
@use './values';
|
||||
// go/keep-sorted end
|
||||
|
||||
$_default: (
|
||||
'md-sys-color': md-sys-color.values-light(),
|
||||
'md-sys-elevation': md-sys-elevation.values(),
|
||||
'md-sys-shape': md-sys-shape.values(),
|
||||
'md-sys-state': md-sys-state.values(),
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
$supported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'container-color',
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
$supported-tokens: ();
|
||||
|
||||
$unsupported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'list-item-container-elevation',
|
||||
@ -116,6 +112,14 @@ $unsupported-tokens: (
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
$_default: (
|
||||
'md-sys-color': md-sys-color.values-light(),
|
||||
'md-sys-elevation': md-sys-elevation.values(),
|
||||
'md-sys-shape': md-sys-shape.values(),
|
||||
'md-sys-state': md-sys-state.values(),
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
$tokens: values.validate(
|
||||
md-comp-list.values($deps, $exclude-hardcoded-values),
|
||||
|
@ -16,10 +16,10 @@
|
||||
@use './values';
|
||||
// go/keep-sorted end
|
||||
|
||||
$_default: (
|
||||
'md-sys-color': md-sys-color.values-light(),
|
||||
'md-sys-elevation': md-sys-elevation.values(),
|
||||
'md-sys-shape': md-sys-shape.values(),
|
||||
$supported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'list-item-selected-container-color',
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
$unsupported-tokens: (
|
||||
@ -30,10 +30,10 @@ $unsupported-tokens: (
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
$supported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'list-item-selected-container-color',
|
||||
// go/keep-sorted end
|
||||
$_default: (
|
||||
'md-sys-color': md-sys-color.values-light(),
|
||||
'md-sys-elevation': md-sys-elevation.values(),
|
||||
'md-sys-shape': md-sys-shape.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
|
@ -16,10 +16,13 @@
|
||||
@use './values';
|
||||
// go/keep-sorted end
|
||||
|
||||
$_default: (
|
||||
'md-sys-color': md-sys-color.values-light(),
|
||||
'md-sys-elevation': md-sys-elevation.values(),
|
||||
'md-sys-shape': md-sys-shape.values(),
|
||||
$supported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'container-color',
|
||||
'container-elevation',
|
||||
'container-shadow-color',
|
||||
'container-shape',
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
$unsupported-tokens: (
|
||||
@ -28,13 +31,10 @@ $unsupported-tokens: (
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
$supported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'container-color',
|
||||
'container-elevation',
|
||||
'container-shadow-color',
|
||||
'container-shape',
|
||||
// go/keep-sorted end
|
||||
$_default: (
|
||||
'md-sys-color': md-sys-color.values-light(),
|
||||
'md-sys-elevation': md-sys-elevation.values(),
|
||||
'md-sys-shape': md-sys-shape.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
|
@ -25,8 +25,6 @@ $supported-tokens: (
|
||||
'disabled-outline-opacity',
|
||||
'focus-label-text-color',
|
||||
'focus-outline-color',
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
'hover-label-text-color',
|
||||
'hover-outline-color',
|
||||
'hover-state-layer-color',
|
||||
@ -57,6 +55,8 @@ $supported-tokens: (
|
||||
|
||||
$unsupported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
'label-text-font',
|
||||
'label-text-line-height',
|
||||
'label-text-size',
|
||||
|
@ -21,20 +21,17 @@ $supported-tokens: (
|
||||
'disabled-selected-container-opacity',
|
||||
'disabled-unselected-outline-color',
|
||||
'disabled-unselected-outline-opacity',
|
||||
'focus-state-layer-opacity',
|
||||
'hover-state-layer-opacity',
|
||||
'icon-size',
|
||||
'pressed-state-layer-opacity',
|
||||
'selected-container-color',
|
||||
'selected-focus-icon-color',
|
||||
'selected-focus-state-layer-color',
|
||||
'selected-hover-icon-color',
|
||||
'selected-hover-state-layer-color',
|
||||
'selected-icon-color',
|
||||
'selected-pressed-icon-color',
|
||||
'selected-pressed-state-layer-color',
|
||||
'unselected-focus-icon-color',
|
||||
'unselected-focus-state-layer-color',
|
||||
'unselected-hover-icon-color',
|
||||
'unselected-hover-state-layer-color',
|
||||
'unselected-icon-color',
|
||||
@ -45,6 +42,14 @@ $supported-tokens: (
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
$unsupported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'focus-state-layer-opacity',
|
||||
'selected-focus-state-layer-color',
|
||||
'unselected-focus-state-layer-color',
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
$_default: (
|
||||
'md-sys-color': md-sys-color.values-light(),
|
||||
'md-sys-shape': md-sys-shape.values(),
|
||||
@ -54,7 +59,8 @@ $_default: (
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
$tokens: values.validate(
|
||||
md-comp-outlined-icon-button.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens
|
||||
$supported-tokens: $supported-tokens,
|
||||
$unsupported-tokens: $unsupported-tokens
|
||||
);
|
||||
|
||||
@return $tokens;
|
||||
|
@ -7,13 +7,56 @@
|
||||
@use './md-sys-color';
|
||||
@use './md-sys-state';
|
||||
@use './v0_172/md-comp-radio-button';
|
||||
@use './values';
|
||||
// go/keep-sorted end
|
||||
|
||||
$supported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'disabled-selected-icon-color',
|
||||
'disabled-selected-icon-opacity',
|
||||
'disabled-unselected-icon-color',
|
||||
'disabled-unselected-icon-opacity',
|
||||
'icon-size',
|
||||
'selected-focus-icon-color',
|
||||
'selected-hover-icon-color',
|
||||
'selected-hover-state-layer-color',
|
||||
'selected-hover-state-layer-opacity',
|
||||
'selected-icon-color',
|
||||
'selected-pressed-icon-color',
|
||||
'selected-pressed-state-layer-color',
|
||||
'selected-pressed-state-layer-opacity',
|
||||
'state-layer-size',
|
||||
'unselected-focus-icon-color',
|
||||
'unselected-hover-icon-color',
|
||||
'unselected-hover-state-layer-color',
|
||||
'unselected-hover-state-layer-opacity',
|
||||
'unselected-icon-color',
|
||||
'unselected-pressed-icon-color',
|
||||
'unselected-pressed-state-layer-color',
|
||||
'unselected-pressed-state-layer-opacity',
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
$unsupported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'selected-focus-state-layer-color',
|
||||
'selected-focus-state-layer-opacity',
|
||||
'unselected-focus-state-layer-color',
|
||||
'unselected-focus-state-layer-opacity',
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
$_default: (
|
||||
'md-sys-color': md-sys-color.values-light(),
|
||||
'md-sys-state': md-sys-state.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@return md-comp-radio-button.values($deps, $exclude-hardcoded-values);
|
||||
$tokens: values.validate(
|
||||
md-comp-radio-button.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
$unsupported-tokens: $unsupported-tokens
|
||||
);
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -15,8 +15,6 @@
|
||||
|
||||
$supported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'focus-color',
|
||||
'focus-opacity',
|
||||
'hover-color',
|
||||
'hover-opacity',
|
||||
'pressed-color',
|
||||
@ -31,8 +29,6 @@ $_default: (
|
||||
|
||||
@function values($deps: $_default) {
|
||||
$tokens: (
|
||||
'focus-color': map.get($deps, 'md-sys-color', 'on-surface'),
|
||||
'focus-opacity': map.get($deps, 'md-sys-state', 'focus-state-layer-opacity'),
|
||||
'hover-color': map.get($deps, 'md-sys-color', 'on-surface'),
|
||||
'hover-opacity': map.get($deps, 'md-sys-state', 'hover-state-layer-opacity'),
|
||||
'pressed-color': map.get($deps, 'md-sys-color', 'on-surface'),
|
||||
|
@ -37,8 +37,6 @@ $supported-tokens: (
|
||||
'focus-label-text-color',
|
||||
'focus-leading-icon-color',
|
||||
'focus-outline-color',
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
'hover-label-text-color',
|
||||
'hover-leading-icon-color',
|
||||
'hover-state-layer-color',
|
||||
@ -64,6 +62,8 @@ $unsupported-tokens: (
|
||||
'dragged-leading-icon-color',
|
||||
'dragged-state-layer-color',
|
||||
'dragged-state-layer-opacity',
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
'label-text-font',
|
||||
'label-text-line-height',
|
||||
'label-text-size',
|
||||
|
@ -30,8 +30,6 @@ $supported-tokens: (
|
||||
'pressed-handle-width',
|
||||
'selected-focus-handle-color',
|
||||
'selected-focus-icon-color',
|
||||
'selected-focus-state-layer-color',
|
||||
'selected-focus-state-layer-opacity',
|
||||
'selected-focus-track-color',
|
||||
'selected-handle-color',
|
||||
'selected-handle-height',
|
||||
@ -57,8 +55,6 @@ $supported-tokens: (
|
||||
'track-width',
|
||||
'unselected-focus-handle-color',
|
||||
'unselected-focus-icon-color',
|
||||
'unselected-focus-state-layer-color',
|
||||
'unselected-focus-state-layer-opacity',
|
||||
'unselected-focus-track-color',
|
||||
'unselected-focus-track-outline-color',
|
||||
'unselected-handle-color',
|
||||
@ -85,6 +81,15 @@ $supported-tokens: (
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
$unsupported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'selected-focus-state-layer-color',
|
||||
'selected-focus-state-layer-opacity',
|
||||
'unselected-focus-state-layer-color',
|
||||
'unselected-focus-state-layer-opacity',
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
$_default: (
|
||||
'md-sys-color': md-sys-color.values-light(),
|
||||
'md-sys-shape': md-sys-shape.values(),
|
||||
@ -94,7 +99,8 @@ $_default: (
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
$tokens: values.validate(
|
||||
md-comp-switch.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens
|
||||
$supported-tokens: $supported-tokens,
|
||||
$unsupported-tokens: $unsupported-tokens
|
||||
);
|
||||
|
||||
@return $tokens;
|
||||
|
@ -30,8 +30,6 @@ $supported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'primary-tab-active-focus-icon-color',
|
||||
'primary-tab-active-focus-label-text-color',
|
||||
'primary-tab-active-focus-state-layer-color',
|
||||
'primary-tab-active-focus-state-layer-opacity',
|
||||
'primary-tab-active-hover-icon-color',
|
||||
'primary-tab-active-hover-label-text-color',
|
||||
'primary-tab-active-hover-state-layer-color',
|
||||
@ -53,8 +51,6 @@ $supported-tokens: (
|
||||
'primary-tab-divider-thickness',
|
||||
'primary-tab-focus-icon-color',
|
||||
'primary-tab-focus-label-text-color',
|
||||
'primary-tab-focus-state-layer-color',
|
||||
'primary-tab-focus-state-layer-opacity',
|
||||
'primary-tab-hover-icon-color',
|
||||
'primary-tab-hover-label-text-color',
|
||||
'primary-tab-hover-state-layer-color',
|
||||
@ -69,8 +65,6 @@ $supported-tokens: (
|
||||
'primary-tab-pressed-state-layer-opacity',
|
||||
'secondary-tab-active-focus-icon-color',
|
||||
'secondary-tab-active-focus-label-text-color',
|
||||
'secondary-tab-active-focus-state-layer-color',
|
||||
'secondary-tab-active-focus-state-layer-opacity',
|
||||
'secondary-tab-active-hover-icon-color',
|
||||
'secondary-tab-active-hover-label-text-color',
|
||||
'secondary-tab-active-hover-state-layer-color',
|
||||
@ -92,8 +86,6 @@ $supported-tokens: (
|
||||
'secondary-tab-divider-thickness',
|
||||
'secondary-tab-focus-icon-color',
|
||||
'secondary-tab-focus-label-text-color',
|
||||
'secondary-tab-focus-state-layer-color',
|
||||
'secondary-tab-focus-state-layer-opacity',
|
||||
'secondary-tab-hover-icon-color',
|
||||
'secondary-tab-hover-label-text-color',
|
||||
'secondary-tab-hover-state-layer-color',
|
||||
@ -123,7 +115,13 @@ $unsupported-tokens: (
|
||||
'secondary-tab-label-text-line-height',
|
||||
'secondary-tab-label-text-size',
|
||||
'secondary-tab-label-text-tracking',
|
||||
'secondary-tab-label-text-weight'
|
||||
'secondary-tab-label-text-weight',
|
||||
'primary-tab-active-focus-state-layer-color',
|
||||
'primary-tab-active-focus-state-layer-opacity',
|
||||
'primary-tab-focus-state-layer-color',
|
||||
'primary-tab-focus-state-layer-opacity',
|
||||
'secondary-tab-focus-state-layer-color',
|
||||
'secondary-tab-focus-state-layer-opacity'
|
||||
);
|
||||
|
||||
// Note, this combines the raw primary and secondary tab variant tokens
|
||||
@ -265,10 +263,6 @@ $unsupported-tokens: (
|
||||
'active-focus-icon-color': map.get($tokens, 'icon-color'),
|
||||
'active-focus-label-text-color':
|
||||
map.get($tokens, 'active-label-text-color'),
|
||||
'active-focus-state-layer-color':
|
||||
map.get($tokens, 'focus-state-layer-color'),
|
||||
'active-focus-state-layer-opacity':
|
||||
map.get($tokens, 'focus-state-layer-opacity'),
|
||||
'active-hover-icon-color': map.get($tokens, 'icon-color'),
|
||||
'active-hover-label-text-color':
|
||||
map.get($tokens, 'active-label-text-color'),
|
||||
|
@ -22,8 +22,6 @@ $supported-tokens: (
|
||||
'disabled-label-text-color',
|
||||
'disabled-label-text-opacity',
|
||||
'focus-label-text-color',
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
'hover-label-text-color',
|
||||
'hover-state-layer-color',
|
||||
'hover-state-layer-opacity',
|
||||
@ -50,6 +48,8 @@ $supported-tokens: (
|
||||
|
||||
$unsupported-tokens: (
|
||||
// go/keep-sorted start
|
||||
'focus-state-layer-color',
|
||||
'focus-state-layer-opacity',
|
||||
'label-text-font',
|
||||
'label-text-line-height',
|
||||
'label-text-size',
|
||||
|
Loading…
Reference in New Issue
Block a user