mirror of
https://github.com/material-components/material-web.git
synced 2024-09-11 13:46:10 +03:00
BREAKING CHANGE: Remove "unselected" from `--md-*-icon-button-*` custom properties. PiperOrigin-RevId: 552836196
88 lines
2.6 KiB
SCSS
88 lines
2.6 KiB
SCSS
//
|
|
// Copyright 2023 Google LLC
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
// go/keep-sorted start
|
|
@use './md-sys-color';
|
|
@use './md-sys-shape';
|
|
@use './md-sys-state';
|
|
@use './v0_172/md-comp-filled-icon-button';
|
|
@use './values';
|
|
// go/keep-sorted end
|
|
|
|
$supported-tokens: (
|
|
// go/keep-sorted start
|
|
'container-color',
|
|
'container-shape',
|
|
'container-size',
|
|
'disabled-container-color',
|
|
'disabled-container-opacity',
|
|
'disabled-icon-color',
|
|
'disabled-icon-opacity',
|
|
'focus-icon-color',
|
|
'hover-icon-color',
|
|
'hover-state-layer-color',
|
|
'hover-state-layer-opacity',
|
|
'icon-color',
|
|
'icon-size',
|
|
'pressed-icon-color',
|
|
'pressed-state-layer-color',
|
|
'pressed-state-layer-opacity',
|
|
'selected-container-color',
|
|
'toggle-focus-icon-color',
|
|
'toggle-hover-icon-color',
|
|
'toggle-hover-state-layer-color',
|
|
'toggle-icon-color',
|
|
'toggle-pressed-icon-color',
|
|
'toggle-pressed-state-layer-color',
|
|
'toggle-selected-focus-icon-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',
|
|
// Note: filled icon buttons have three container colors,
|
|
// "container-color" for regular, then selected/unselected for toggle.
|
|
'unselected-container-color',
|
|
// go/keep-sorted end
|
|
);
|
|
|
|
$unsupported-tokens: (
|
|
// go/keep-sorted start
|
|
'focus-state-layer-color',
|
|
'focus-state-layer-opacity',
|
|
'toggle-focus-state-layer-color',
|
|
'toggle-selected-focus-state-layer-color',
|
|
// go/keep-sorted end
|
|
);
|
|
|
|
$_default: (
|
|
'md-sys-color': md-sys-color.values-light(),
|
|
'md-sys-shape': md-sys-shape.values(),
|
|
'md-sys-state': md-sys-state.values(),
|
|
);
|
|
|
|
@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,
|
|
$unsupported-tokens: $unsupported-tokens,
|
|
$renamed-tokens: (
|
|
// TODO(b/292244480): remove default unselected prefix
|
|
'toggle-unselected-focus-icon-color': 'toggle-focus-icon-color',
|
|
'toggle-unselected-hover-icon-color': 'toggle-hover-icon-color',
|
|
'toggle-unselected-hover-state-layer-color':
|
|
'toggle-hover-state-layer-color',
|
|
'toggle-unselected-icon-color': 'toggle-icon-color',
|
|
'toggle-unselected-pressed-icon-color': 'toggle-pressed-icon-color',
|
|
'toggle-unselected-pressed-state-layer-color':
|
|
'toggle-pressed-state-layer-color',
|
|
'toggle-unselected-focus-state-layer-color':
|
|
'toggle-focus-state-layer-color'
|
|
)
|
|
);
|
|
|
|
@return $tokens;
|
|
}
|