mirror of
https://github.com/material-components/material-web.git
synced 2024-10-26 21:56:56 +03:00
b986b1eb7c
Why? To help clarify that this isn't intended to be a public API, and to better organize future internal-only token files. PiperOrigin-RevId: 599203361
108 lines
3.1 KiB
SCSS
108 lines
3.1 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 './internal/values';
|
|
@use './md-sys-color';
|
|
@use './md-sys-elevation';
|
|
@use './md-sys-shape';
|
|
@use './md-sys-state';
|
|
@use './md-sys-typescale';
|
|
@use './v0_192/md-comp-slider';
|
|
// go/keep-sorted end
|
|
|
|
$supported-tokens: (
|
|
// go/keep-sorted start
|
|
'active-track-color',
|
|
'active-track-height',
|
|
'active-track-shape',
|
|
'disabled-active-track-color',
|
|
'disabled-active-track-opacity',
|
|
'disabled-handle-color',
|
|
'disabled-handle-elevation',
|
|
'disabled-inactive-track-color',
|
|
'disabled-inactive-track-opacity',
|
|
'focus-handle-color',
|
|
'handle-color',
|
|
'handle-elevation',
|
|
'handle-height',
|
|
'handle-shadow-color',
|
|
'handle-shape',
|
|
'handle-width',
|
|
'hover-handle-color',
|
|
'hover-state-layer-color',
|
|
'hover-state-layer-opacity',
|
|
'inactive-track-color',
|
|
'inactive-track-height',
|
|
'inactive-track-shape',
|
|
'label-container-color',
|
|
'label-container-height',
|
|
'label-text-color',
|
|
'label-text-font',
|
|
'label-text-line-height',
|
|
'label-text-size',
|
|
'label-text-weight',
|
|
'pressed-handle-color',
|
|
'pressed-state-layer-color',
|
|
'pressed-state-layer-opacity',
|
|
'state-layer-size',
|
|
'with-overlap-handle-outline-color',
|
|
'with-overlap-handle-outline-width',
|
|
'with-tick-marks-active-container-color',
|
|
'with-tick-marks-container-size',
|
|
'with-tick-marks-disabled-container-color',
|
|
'with-tick-marks-inactive-container-color',
|
|
// go/keep-sorted end
|
|
);
|
|
|
|
$unsupported-tokens: (
|
|
'disabled-handle-opacity',
|
|
'label-container-elevation',
|
|
'label-text-type',
|
|
'label-text-tracking',
|
|
'track-elevation',
|
|
// for efficiency, tick marks are rendered as radial-gradients and
|
|
// have more limited customization
|
|
'with-tick-marks-container-shape',
|
|
// Due to how opacity is multiplied together in the browser, using
|
|
// these tokens results in low contrast tick marks.
|
|
'with-tick-marks-active-container-opacity',
|
|
'with-tick-marks-disabled-container-opacity',
|
|
'with-tick-marks-inactive-container-opacity',
|
|
// focus tokens no longer used.
|
|
'focus-state-layer-color',
|
|
'focus-state-layer-opacity'
|
|
);
|
|
|
|
$_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-slider.values($deps, $exclude-hardcoded-values),
|
|
$supported-tokens: $supported-tokens,
|
|
$unsupported-tokens: $unsupported-tokens,
|
|
$renamed-tokens: (
|
|
'label-label-text-color': 'label-text-color',
|
|
'label-label-text-type': 'label-text-type',
|
|
'label-label-text-font': 'label-text-font',
|
|
'label-label-text-line-height': 'label-text-line-height',
|
|
'label-label-text-size': 'label-text-size',
|
|
'label-label-text-tracking': 'label-text-tracking',
|
|
'label-label-text-weight': 'label-text-weight',
|
|
)
|
|
);
|
|
|
|
@return $tokens;
|
|
}
|