mirror of
https://github.com/material-components/material-web.git
synced 2024-09-11 13:46:10 +03:00
BREAKING CHANGE: replace `label-text-type` tokens with `label-text-font`, `-size`, `-line-height`, and `-weight` PiperOrigin-RevId: 563161436
112 lines
3.4 KiB
SCSS
112 lines
3.4 KiB
SCSS
//
|
|
// Copyright 2023 Google LLC
|
|
// 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';
|
|
@use './md-sys-shape';
|
|
@use './md-sys-state';
|
|
@use './md-sys-typescale';
|
|
@use './v0_172/md-comp-assist-chip';
|
|
@use './values';
|
|
// go/keep-sorted end
|
|
|
|
$supported-tokens: (
|
|
// go/keep-sorted start
|
|
'container-height',
|
|
'container-shape',
|
|
'disabled-label-text-color',
|
|
'disabled-label-text-opacity',
|
|
'disabled-leading-icon-color',
|
|
'disabled-leading-icon-opacity',
|
|
'disabled-outline-color',
|
|
'disabled-outline-opacity',
|
|
'elevated-container-color',
|
|
'elevated-container-elevation',
|
|
'elevated-container-shadow-color',
|
|
'elevated-disabled-container-color',
|
|
'elevated-disabled-container-elevation',
|
|
'elevated-disabled-container-opacity',
|
|
'elevated-focus-container-elevation',
|
|
'elevated-hover-container-elevation',
|
|
'elevated-pressed-container-elevation',
|
|
'focus-label-text-color',
|
|
'focus-leading-icon-color',
|
|
'focus-outline-color',
|
|
'hover-label-text-color',
|
|
'hover-leading-icon-color',
|
|
'hover-state-layer-color',
|
|
'hover-state-layer-opacity',
|
|
'icon-size',
|
|
'label-text-color',
|
|
'label-text-font',
|
|
'label-text-line-height',
|
|
'label-text-size',
|
|
'label-text-weight',
|
|
'leading-icon-color',
|
|
'outline-color',
|
|
'outline-width',
|
|
'pressed-label-text-color',
|
|
'pressed-leading-icon-color',
|
|
'pressed-state-layer-color',
|
|
'pressed-state-layer-opacity',
|
|
// go/keep-sorted end
|
|
);
|
|
|
|
$unsupported-tokens: (
|
|
// go/keep-sorted start
|
|
'container-elevation',
|
|
'dragged-container-elevation',
|
|
'dragged-label-text-color',
|
|
'dragged-leading-icon-color',
|
|
'dragged-state-layer-color',
|
|
'dragged-state-layer-opacity',
|
|
'focus-state-layer-color',
|
|
'focus-state-layer-opacity',
|
|
'label-text-tracking',
|
|
'label-text-type',
|
|
// 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-assist-chip.values($deps, $exclude-hardcoded-values),
|
|
$supported-tokens: $supported-tokens,
|
|
$unsupported-tokens: $unsupported-tokens,
|
|
$renamed-tokens: (
|
|
// Remove "flat-*" prefix (b/275577569)
|
|
'flat-container-elevation': 'container-elevation',
|
|
'flat-disabled-outline-color': 'disabled-outline-color',
|
|
'flat-disabled-outline-opacity': 'disabled-outline-opacity',
|
|
'flat-focus-outline-color': 'focus-outline-color',
|
|
'flat-outline-color': 'outline-color',
|
|
'flat-outline-width': 'outline-width',
|
|
// Remove "with-*" prefixes (b/273534858)
|
|
// Rename "icon" to "leading-icon" (b/275577569)
|
|
'with-icon-disabled-icon-color': 'disabled-leading-icon-color',
|
|
'with-icon-disabled-icon-opacity': 'disabled-leading-icon-opacity',
|
|
'with-icon-dragged-icon-color': 'dragged-leading-icon-color',
|
|
'with-icon-focus-icon-color': 'focus-leading-icon-color',
|
|
'with-icon-hover-icon-color': 'hover-leading-icon-color',
|
|
'with-icon-icon-color': 'leading-icon-color',
|
|
'with-icon-icon-size': 'icon-size',
|
|
'with-icon-pressed-icon-color': 'pressed-leading-icon-color'
|
|
)
|
|
);
|
|
|
|
@return $tokens;
|
|
}
|