mirror of
https://github.com/material-components/material-web.git
synced 2024-09-11 13:46:10 +03:00
feat(tokens): add component custom properties to Sass values
These are excluded by default, but will be enabled by default in 2.0. Example: `tokens.md-comp-checkbox-values($exclude-custom-properties: false)` PiperOrigin-RevId: 601596085
This commit is contained in:
parent
c9e72ce194
commit
feff7214a7
@ -85,7 +85,11 @@ $_default: (
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-assist-chip.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
@ -118,5 +122,17 @@ $_default: (
|
||||
)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-assist-chip-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -21,8 +21,21 @@ $_default: (
|
||||
|
||||
$_unsupported-tokens: ('large-label-text-tracking', 'large-label-text-type');
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: md-comp-badge.values($deps, $exclude-hardcoded-values);
|
||||
$tokens: map.remove($tokens, $_unsupported-tokens...);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set($tokens, $token, var(--md-badge-#{$token}, #{$value}));
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -3,6 +3,9 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
// go/keep-sorted start
|
||||
@use 'sass:map';
|
||||
// go/keep-sorted end
|
||||
// go/keep-sorted start
|
||||
@use './internal/validate';
|
||||
@use './md-sys-color';
|
||||
@ -89,9 +92,15 @@ $_default: (
|
||||
'md-sys-state': md-sys-state.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: md-comp-checkbox.values($deps, $exclude-hardcoded-values);
|
||||
|
||||
$tokens: validate.values(
|
||||
md-comp-checkbox.values($deps, $exclude-hardcoded-values),
|
||||
$tokens,
|
||||
$supported-tokens: $supported-tokens,
|
||||
$unsupported-tokens: $unsupported-tokens,
|
||||
$renamed-tokens: (
|
||||
@ -120,5 +129,17 @@ $_default: (
|
||||
)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-checkbox-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -38,7 +38,11 @@ $_default: (
|
||||
'md-sys-shape': md-sys-shape.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-circular-progress-indicator.values(
|
||||
$deps,
|
||||
@ -61,5 +65,17 @@ $_default: (
|
||||
);
|
||||
}
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-circular-progress-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -72,7 +72,11 @@ $unsupported-tokens: (
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-dialog.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
@ -84,5 +88,13 @@ $unsupported-tokens: (
|
||||
)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set($tokens, $token, var(--md-dialog-#{$token}, #{$value}));
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -3,6 +3,9 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
// go/keep-sorted start
|
||||
@use 'sass:map';
|
||||
// go/keep-sorted end
|
||||
// go/keep-sorted start
|
||||
@use './internal/validate';
|
||||
@use './md-sys-color';
|
||||
@ -20,9 +23,23 @@ $_default: (
|
||||
'md-sys-color': md-sys-color.values-light(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@return validate.values(
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-divider.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set($tokens, $token, var(--md-divider-#{$token}, #{$value}));
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -76,7 +76,11 @@ $_default: (
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-elevated-button.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
@ -108,5 +112,17 @@ $_default: (
|
||||
)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-elevated-button-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -3,6 +3,9 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
// go/keep-sorted start
|
||||
@use 'sass:map';
|
||||
// go/keep-sorted end
|
||||
// go/keep-sorted start
|
||||
@use './internal/validate';
|
||||
@use './md-sys-color';
|
||||
@ -52,12 +55,28 @@ $_default: (
|
||||
'md-sys-state': md-sys-state.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-elevated-card.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
$unsupported-tokens: $unsupported-tokens
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-elevated-card-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -24,10 +24,27 @@ $_default: (
|
||||
'md-sys-elevation': md-sys-elevation.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: (
|
||||
'level': map.get($deps, 'md-sys-elevation', 'level0'),
|
||||
'shadow-color': map.get($deps, 'md-sys-color', 'shadow'),
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-elevation-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return validate.values($tokens, $supported-tokens: $supported-tokens);
|
||||
}
|
||||
|
@ -99,7 +99,11 @@ $_default: (
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-fab-branded.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
@ -107,5 +111,17 @@ $_default: (
|
||||
$new-tokens: _get-new-tokens($deps, $exclude-hardcoded-values)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-fab-branded-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -231,7 +231,11 @@ $_default: (
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: md-comp-fab-surface.values($deps, $exclude-hardcoded-values);
|
||||
|
||||
$tokens: validate.values(
|
||||
@ -241,5 +245,13 @@ $_default: (
|
||||
$new-tokens: _get-new-tokens($deps, $exclude-hardcoded-values)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set($tokens, $token, var(--md-fab-#{$token}, #{$value}));
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -76,7 +76,11 @@ $_default: (
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-filled-button.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
@ -108,5 +112,17 @@ $_default: (
|
||||
)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-filled-button-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -3,6 +3,9 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
// go/keep-sorted start
|
||||
@use 'sass:map';
|
||||
// go/keep-sorted end
|
||||
// go/keep-sorted start
|
||||
@use './internal/validate';
|
||||
@use './md-sys-color';
|
||||
@ -52,12 +55,28 @@ $_default: (
|
||||
'md-sys-state': md-sys-state.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-filled-card.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
$unsupported-tokens: $unsupported-tokens
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-filled-card-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -110,7 +110,11 @@ $_default: (
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$text-field: md-comp-filled-text-field.values(
|
||||
$deps,
|
||||
$exclude-hardcoded-values
|
||||
@ -249,5 +253,19 @@ $_default: (
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
@return validate.values($tokens, $supported-tokens: $supported-tokens);
|
||||
$tokens: validate.values($tokens, $supported-tokens: $supported-tokens);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-filled-field-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -3,6 +3,9 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
// go/keep-sorted start
|
||||
@use 'sass:map';
|
||||
// go/keep-sorted end
|
||||
// go/keep-sorted start
|
||||
@use './internal/validate';
|
||||
@use './md-sys-color';
|
||||
@ -64,7 +67,11 @@ $_default: (
|
||||
'md-sys-state': md-sys-state.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-filled-icon-button.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
@ -84,5 +91,17 @@ $_default: (
|
||||
)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-filled-icon-button-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -150,7 +150,11 @@ $_default: (
|
||||
);
|
||||
}
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$original-tokens: md-comp-filled-select.values(
|
||||
$deps,
|
||||
$exclude-hardcoded-values
|
||||
@ -165,5 +169,17 @@ $_default: (
|
||||
$unsupported-tokens: $unsupported-tokens
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-filled-select-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -128,7 +128,11 @@ $_default: (
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-filled-text-field.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
@ -157,5 +161,17 @@ $_default: (
|
||||
)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-filled-text-field-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -76,7 +76,11 @@ $_default: (
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-filled-tonal-button.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
@ -108,5 +112,17 @@ $_default: (
|
||||
)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-filled-tonal-button-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -3,6 +3,9 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
// go/keep-sorted start
|
||||
@use 'sass:map';
|
||||
// go/keep-sorted end
|
||||
// go/keep-sorted start
|
||||
@use './internal/validate';
|
||||
@use './md-sys-color';
|
||||
@ -64,7 +67,11 @@ $_default: (
|
||||
'md-sys-state': md-sys-state.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-filled-tonal-icon-button.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
@ -84,5 +91,17 @@ $_default: (
|
||||
)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-filled-tonal-icon-button-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -127,7 +127,11 @@ $_default: (
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-filter-chip.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
@ -230,5 +234,17 @@ $_default: (
|
||||
)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-filter-chip-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
// go/keep-sorted start
|
||||
@use 'sass:map';
|
||||
@use 'sass:string';
|
||||
// go/keep-sorted end
|
||||
// go/keep-sorted start
|
||||
@use './internal/validate';
|
||||
@ -32,7 +31,11 @@ $_default: (
|
||||
'md-sys-shape': md-sys-shape.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: (
|
||||
'active-width': if($exclude-hardcoded-values, null, 8px),
|
||||
'color': map.get($deps, 'md-sys-color', 'secondary'),
|
||||
@ -43,5 +46,19 @@ $_default: (
|
||||
'width': if($exclude-hardcoded-values, null, 3px),
|
||||
);
|
||||
|
||||
@return validate.values($tokens, $supported-tokens: $supported-tokens);
|
||||
$tokens: validate.values($tokens, $supported-tokens: $supported-tokens);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-focus-ring-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -3,6 +3,9 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
// go/keep-sorted start
|
||||
@use 'sass:map';
|
||||
// go/keep-sorted end
|
||||
// go/keep-sorted start
|
||||
@use './internal/validate';
|
||||
@use './md-sys-color';
|
||||
@ -53,7 +56,11 @@ $_default: (
|
||||
'md-sys-state': md-sys-state.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-icon-button.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
@ -73,5 +80,17 @@ $_default: (
|
||||
)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-icon-button-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -3,6 +3,9 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
// go/keep-sorted start
|
||||
@use 'sass:map';
|
||||
// go/keep-sorted end
|
||||
// go/keep-sorted start
|
||||
@use './internal/validate';
|
||||
// go/keep-sorted end
|
||||
@ -23,12 +26,23 @@ $supported-tokens: (
|
||||
);
|
||||
}
|
||||
|
||||
@function values($exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
(),
|
||||
$supported-tokens: $supported-tokens,
|
||||
$new-tokens: _get-new-tokens($exclude-hardcoded-values)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set($tokens, $token, var(--md-icon-#{$token}, #{$value}));
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -115,7 +115,11 @@ $_default: (
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-input-chip.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
@ -212,5 +216,17 @@ $_default: (
|
||||
map.get($deps, 'md-sys-color', 'primary')
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-input-chip-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -44,6 +44,7 @@ $_default: (
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
// Note: <md-item> does not provide `--md-item-*` custom properties.
|
||||
$list-tokens: md-comp-list.values($deps, $exclude-hardcoded-values);
|
||||
|
||||
$tokens: (
|
||||
|
@ -41,10 +41,28 @@ $unsupported-tokens: (
|
||||
|
||||
// TODO(b/275045611) may need to update based on resolution of design
|
||||
// for buffer and background animation.
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@return validate.values(
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-linear-progress-indicator.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
$unsupported-tokens: $unsupported-tokens
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-linear-progress-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -4,7 +4,6 @@
|
||||
//
|
||||
|
||||
// go/keep-sorted start
|
||||
@use 'sass:list';
|
||||
@use 'sass:map';
|
||||
@use 'sass:string';
|
||||
// go/keep-sorted end
|
||||
@ -125,7 +124,11 @@ $_default: (
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$original-tokens: md-comp-list.values($deps, $exclude-hardcoded-values);
|
||||
|
||||
$tokens: validate.values(
|
||||
@ -141,6 +144,18 @@ $_default: (
|
||||
$renamed-tokens: _get-renamed-tokens($original-tokens)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-list-item-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
||||
|
@ -22,11 +22,25 @@ $_default: (
|
||||
'md-sys-color': md-sys-color.values-light(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$list-tokens: md-comp-list.values($deps, $exclude-hardcoded-values);
|
||||
$tokens: (
|
||||
'container-color': map.get($list-tokens, 'list-item-container-color'),
|
||||
);
|
||||
|
||||
@return validate.values($tokens, $supported-tokens: $supported-tokens);
|
||||
$tokens: validate.values($tokens, $supported-tokens: $supported-tokens);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set($tokens, $token, var(--md-list-#{$token}, #{$value}));
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -4,7 +4,6 @@
|
||||
//
|
||||
|
||||
// go/keep-sorted start
|
||||
@use 'sass:list';
|
||||
@use 'sass:map';
|
||||
@use 'sass:string';
|
||||
// go/keep-sorted end
|
||||
@ -73,7 +72,11 @@ $_default: (
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: md-comp-menu.values($deps);
|
||||
|
||||
// Like list items, menu items use their parent menu for their container
|
||||
@ -90,6 +93,18 @@ $_default: (
|
||||
$renamed-tokens: _get-renamed-tokens($tokens)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-menu-item-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
||||
|
@ -4,9 +4,7 @@
|
||||
//
|
||||
|
||||
// go/keep-sorted start
|
||||
@use 'sass:list';
|
||||
@use 'sass:map';
|
||||
@use 'sass:string';
|
||||
// go/keep-sorted end
|
||||
// go/keep-sorted start
|
||||
@use './internal/validate';
|
||||
@ -40,12 +38,24 @@ $_default: (
|
||||
'md-sys-shape': md-sys-shape.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-menu.values($deps),
|
||||
$supported-tokens: $supported-tokens,
|
||||
$unsupported-tokens: $unsupported-tokens
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set($tokens, $token, var(--md-menu-#{$token}, #{$value}));
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -3,6 +3,9 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
// go/keep-sorted start
|
||||
@use 'sass:map';
|
||||
// go/keep-sorted end
|
||||
// go/keep-sorted start
|
||||
@use './md-sys-color';
|
||||
@use './md-sys-elevation';
|
||||
@ -20,6 +23,24 @@ $_default: (
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@return md-comp-navigation-bar.values($deps, $exclude-hardcoded-values);
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: md-comp-navigation-bar.values($deps, $exclude-hardcoded-values);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-navigation-bar-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -3,6 +3,9 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
// go/keep-sorted start
|
||||
@use 'sass:map';
|
||||
// go/keep-sorted end
|
||||
// go/keep-sorted start
|
||||
@use './md-sys-color';
|
||||
@use './md-sys-elevation';
|
||||
@ -20,6 +23,24 @@ $_default: (
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@return md-comp-navigation-drawer.values($deps, $exclude-hardcoded-values);
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: md-comp-navigation-drawer.values($deps, $exclude-hardcoded-values);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-navigation-drawer-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -72,7 +72,11 @@ $_default: (
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-outlined-button.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
@ -104,5 +108,17 @@ $_default: (
|
||||
)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-outlined-button-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -3,6 +3,9 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
// go/keep-sorted start
|
||||
@use 'sass:map';
|
||||
// go/keep-sorted end
|
||||
// go/keep-sorted start
|
||||
@use './internal/validate';
|
||||
@use './md-sys-color';
|
||||
@ -58,12 +61,28 @@ $_default: (
|
||||
'md-sys-state': md-sys-state.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-outlined-card.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
$unsupported-tokens: $unsupported-tokens
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-outlined-card-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -103,7 +103,11 @@ $_default: (
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$text-field: md-comp-outlined-text-field.values(
|
||||
$deps,
|
||||
$exclude-hardcoded-values
|
||||
@ -224,5 +228,19 @@ $_default: (
|
||||
// go/keep-sorted end
|
||||
);
|
||||
|
||||
@return validate.values($tokens, $supported-tokens: $supported-tokens);
|
||||
$tokens: validate.values($tokens, $supported-tokens: $supported-tokens);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-outlined-field-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -3,6 +3,9 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
// go/keep-sorted start
|
||||
@use 'sass:map';
|
||||
// go/keep-sorted end
|
||||
// go/keep-sorted start
|
||||
@use './internal/validate';
|
||||
@use './md-sys-color';
|
||||
@ -57,7 +60,11 @@ $_default: (
|
||||
'md-sys-state': md-sys-state.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-outlined-icon-button.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
@ -78,5 +85,17 @@ $_default: (
|
||||
)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-outlined-icon-button-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -74,7 +74,11 @@ $_default: (
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-outlined-segmented-button.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
@ -87,5 +91,17 @@ $_default: (
|
||||
)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-outlined-segmented-button-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
// go/keep-sorted start
|
||||
@use 'sass:map';
|
||||
@use 'sass:string';
|
||||
// go/keep-sorted end
|
||||
// go/keep-sorted start
|
||||
@use './internal/validate';
|
||||
@ -136,7 +135,11 @@ $_default: (
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-outlined-select.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
@ -151,5 +154,17 @@ $_default: (
|
||||
)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-outlined-select-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -117,7 +117,11 @@ $_default: (
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-outlined-text-field.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
@ -144,5 +148,17 @@ $_default: (
|
||||
)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-outlined-text-field-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -77,13 +77,17 @@ $_default: (
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: md-comp-primary-navigation-tab.values(
|
||||
$deps,
|
||||
$exclude-hardcoded-values: $exclude-hardcoded-values
|
||||
);
|
||||
|
||||
@return validate.values(
|
||||
$tokens: validate.values(
|
||||
$tokens,
|
||||
$supported-tokens: $supported-tokens,
|
||||
$unsupported-tokens: $unsupported-tokens,
|
||||
@ -128,4 +132,18 @@ $_default: (
|
||||
'with-label-text-label-text-type': 'label-text-type'
|
||||
)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-primary-tab-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -3,6 +3,9 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
// go/keep-sorted start
|
||||
@use 'sass:map';
|
||||
// go/keep-sorted end
|
||||
// go/keep-sorted start
|
||||
@use './internal/validate';
|
||||
@use './md-sys-color';
|
||||
@ -51,7 +54,11 @@ $_default: (
|
||||
'md-sys-state': md-sys-state.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-radio-button.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
@ -69,5 +76,13 @@ $_default: (
|
||||
)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set($tokens, $token, var(--md-radio-#{$token}, #{$value}));
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ $_default: (
|
||||
'md-sys-state': md-sys-state.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default) {
|
||||
@function values($deps: $_default, $exclude-custom-properties: true) {
|
||||
$tokens: (
|
||||
'hover-color': map.get($deps, 'md-sys-color', 'on-surface'),
|
||||
'hover-opacity': map.get($deps, 'md-sys-state', 'hover-state-layer-opacity'),
|
||||
@ -36,5 +36,15 @@ $_default: (
|
||||
map.get($deps, 'md-sys-state', 'pressed-state-layer-opacity'),
|
||||
);
|
||||
|
||||
@return validate.values($tokens, $supported-tokens: $supported-tokens);
|
||||
$tokens: validate.values($tokens, $supported-tokens: $supported-tokens);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set($tokens, $token, var(--md-ripple-#{$token}, #{$value}));
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -75,7 +75,11 @@ $_default: (
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: md-comp-secondary-navigation-tab.values(
|
||||
$deps,
|
||||
$exclude-hardcoded-values: $exclude-hardcoded-values
|
||||
@ -98,6 +102,18 @@ $_default: (
|
||||
)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-secondary-tab-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,11 @@ $_default: (
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-slider.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
@ -103,5 +107,13 @@ $_default: (
|
||||
)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set($tokens, $token, var(--md-slider-#{$token}, #{$value}));
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -85,7 +85,11 @@ $_default: (
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-suggestion-chip.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
@ -122,5 +126,17 @@ $_default: (
|
||||
)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-suggestion-chip-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -3,6 +3,9 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
// go/keep-sorted start
|
||||
@use 'sass:map';
|
||||
// go/keep-sorted end
|
||||
// go/keep-sorted start
|
||||
@use './internal/validate';
|
||||
@use './md-sys-color';
|
||||
@ -96,7 +99,11 @@ $_default: (
|
||||
'md-sys-state': md-sys-state.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-switch.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
@ -137,5 +144,13 @@ $_default: (
|
||||
)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set($tokens, $token, var(--md-switch-#{$token}, #{$value}));
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
@ -65,7 +65,11 @@ $_default: (
|
||||
'md-sys-typescale': md-sys-typescale.values(),
|
||||
);
|
||||
|
||||
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
||||
@function values(
|
||||
$deps: $_default,
|
||||
$exclude-hardcoded-values: false,
|
||||
$exclude-custom-properties: true
|
||||
) {
|
||||
$tokens: validate.values(
|
||||
md-comp-text-button.values($deps, $exclude-hardcoded-values),
|
||||
$supported-tokens: $supported-tokens,
|
||||
@ -97,5 +101,17 @@ $_default: (
|
||||
)
|
||||
);
|
||||
|
||||
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
||||
// See b/321816473.
|
||||
@if not $exclude-custom-properties {
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set(
|
||||
$tokens,
|
||||
$token,
|
||||
var(--md-text-button-#{$token}, #{$value})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@return $tokens;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user