@angular/material 18.0.0-next.6 → 18.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_index.scss +1 -1
- package/button/index.d.ts +1 -1
- package/core/tokens/_m3-tokens.scss +28 -885
- package/core/tokens/_token-utils.scss +151 -0
- package/core/tokens/m2/mat/_switch.scss +1 -0
- package/core/tokens/m3/_index.scss +161 -0
- package/core/tokens/m3/mat/_app.scss +19 -0
- package/core/tokens/m3/mat/_autocomplete.scss +22 -0
- package/core/tokens/m3/mat/_badge.scss +77 -0
- package/core/tokens/m3/mat/_bottom-sheet.scss +24 -0
- package/core/tokens/m3/mat/_card.scss +24 -0
- package/core/tokens/m3/mat/_checkbox.scss +21 -0
- package/core/tokens/m3/mat/_chip.scss +46 -0
- package/core/tokens/m3/mat/_datepicker.scss +123 -0
- package/core/tokens/m3/mat/_dialog.scss +30 -0
- package/core/tokens/m3/mat/_divider.scss +19 -0
- package/core/tokens/m3/mat/_expansion.scss +41 -0
- package/core/tokens/m3/mat/_fab-small.scss +50 -0
- package/core/tokens/m3/mat/_fab.scss +50 -0
- package/core/tokens/m3/mat/_filled-button.scss +54 -0
- package/core/tokens/m3/mat/_form-field.scss +59 -0
- package/core/tokens/m3/mat/_full-pseudo-checkbox.scss +42 -0
- package/core/tokens/m3/mat/_grid-list.scss +21 -0
- package/core/tokens/m3/mat/_icon-button.scss +27 -0
- package/core/tokens/m3/mat/_icon.scss +33 -0
- package/core/tokens/m3/mat/_list.scss +19 -0
- package/core/tokens/m3/mat/_menu.scss +42 -0
- package/core/tokens/m3/mat/_minimal-pseudo-checkbox.scss +33 -0
- package/core/tokens/m3/mat/_optgroup.scss +22 -0
- package/core/tokens/m3/mat/_option.scss +55 -0
- package/core/tokens/m3/mat/_outlined-button.scss +54 -0
- package/core/tokens/m3/mat/_paginator.scss +27 -0
- package/core/tokens/m3/mat/_protected-button.scss +55 -0
- package/core/tokens/m3/mat/_radio.scss +34 -0
- package/core/tokens/m3/mat/_ripple.scss +19 -0
- package/core/tokens/m3/mat/_select.scss +46 -0
- package/core/tokens/m3/mat/_sidenav.scss +28 -0
- package/core/tokens/m3/mat/_slider.scss +56 -0
- package/core/tokens/m3/mat/_snack-bar.scss +18 -0
- package/core/tokens/m3/mat/_sort.scss +18 -0
- package/core/tokens/m3/mat/_standard-button-toggle.scss +57 -0
- package/core/tokens/m3/mat/_stepper.scss +79 -0
- package/core/tokens/m3/mat/_switch.scss +45 -0
- package/core/tokens/m3/mat/_tab-header.scss +51 -0
- package/core/tokens/m3/mat/_table.scss +28 -0
- package/core/tokens/m3/mat/_text-button.scss +55 -0
- package/core/tokens/m3/mat/_toolbar.scss +23 -0
- package/core/tokens/m3/mat/_tree.scss +22 -0
- package/core/tokens/m3/mdc/_checkbox.scss +110 -0
- package/core/tokens/m3/mdc/_chip.scss +91 -0
- package/core/tokens/m3/mdc/_circular-progress.scss +29 -0
- package/core/tokens/m3/mdc/_dialog.scss +39 -0
- package/core/tokens/m3/mdc/_elevated-card.scss +15 -0
- package/core/tokens/m3/mdc/_extended-fab.scss +21 -0
- package/core/tokens/m3/mdc/_fab-small.scss +21 -0
- package/core/tokens/m3/mdc/_fab.scss +21 -0
- package/core/tokens/m3/mdc/_filled-button.scss +86 -0
- package/core/tokens/m3/mdc/_filled-text-field.scss +92 -0
- package/core/tokens/m3/mdc/_form-field.scss +25 -0
- package/core/tokens/m3/mdc/_icon-button.scss +39 -0
- package/core/tokens/m3/mdc/_linear-progress.scss +32 -0
- package/core/tokens/m3/mdc/_list.scss +37 -0
- package/core/tokens/m3/mdc/_outlined-button.scss +83 -0
- package/core/tokens/m3/mdc/_outlined-card.scss +15 -0
- package/core/tokens/m3/mdc/_outlined-text-field.scss +85 -0
- package/core/tokens/m3/mdc/_plain-tooltip.scss +15 -0
- package/core/tokens/m3/mdc/_protected-button.scss +84 -0
- package/core/tokens/m3/mdc/_radio.scss +46 -0
- package/core/tokens/m3/mdc/_slider.scss +61 -0
- package/core/tokens/m3/mdc/_snack-bar.scss +15 -0
- package/core/tokens/m3/mdc/_switch.scss +70 -0
- package/core/tokens/m3/mdc/_tab-indicator.scss +33 -0
- package/core/tokens/m3/mdc/_tab.scss +15 -0
- package/core/tokens/m3/mdc/_text-button.scss +79 -0
- package/dialog/index.d.ts +4 -3
- package/esm2022/autocomplete/autocomplete-origin.mjs +4 -4
- package/esm2022/autocomplete/autocomplete-trigger.mjs +4 -4
- package/esm2022/autocomplete/autocomplete.mjs +4 -4
- package/esm2022/autocomplete/module.mjs +5 -5
- package/esm2022/badge/badge-module.mjs +5 -5
- package/esm2022/badge/badge.mjs +7 -7
- package/esm2022/bottom-sheet/bottom-sheet-container.mjs +4 -4
- package/esm2022/bottom-sheet/bottom-sheet-module.mjs +5 -5
- package/esm2022/bottom-sheet/bottom-sheet.mjs +4 -4
- package/esm2022/button/button-base.mjs +7 -7
- package/esm2022/button/button.mjs +7 -7
- package/esm2022/button/fab.mjs +13 -13
- package/esm2022/button/icon-button.mjs +8 -8
- package/esm2022/button/module.mjs +5 -5
- package/esm2022/button-toggle/button-toggle-module.mjs +5 -5
- package/esm2022/button-toggle/button-toggle.mjs +7 -7
- package/esm2022/card/card.mjs +43 -43
- package/esm2022/card/module.mjs +5 -5
- package/esm2022/checkbox/checkbox-required-validator.mjs +4 -4
- package/esm2022/checkbox/checkbox.mjs +4 -4
- package/esm2022/checkbox/module.mjs +9 -9
- package/esm2022/chips/chip-action.mjs +4 -4
- package/esm2022/chips/chip-edit-input.mjs +4 -4
- package/esm2022/chips/chip-grid.mjs +4 -4
- package/esm2022/chips/chip-icons.mjs +10 -10
- package/esm2022/chips/chip-input.mjs +4 -4
- package/esm2022/chips/chip-listbox.mjs +4 -4
- package/esm2022/chips/chip-option.mjs +6 -6
- package/esm2022/chips/chip-row.mjs +6 -6
- package/esm2022/chips/chip-set.mjs +4 -4
- package/esm2022/chips/chip.mjs +5 -5
- package/esm2022/chips/module.mjs +5 -5
- package/esm2022/core/common-behaviors/common-module.mjs +5 -5
- package/esm2022/core/datetime/index.mjs +9 -9
- package/esm2022/core/datetime/native-date-adapter.mjs +4 -4
- package/esm2022/core/error/error-options.mjs +7 -7
- package/esm2022/core/internal-form-field/internal-form-field.mjs +4 -4
- package/esm2022/core/line/line.mjs +8 -8
- package/esm2022/core/option/index.mjs +5 -5
- package/esm2022/core/option/optgroup.mjs +4 -4
- package/esm2022/core/option/option.mjs +4 -4
- package/esm2022/core/private/ripple-loader.mjs +4 -4
- package/esm2022/core/ripple/index.mjs +5 -5
- package/esm2022/core/ripple/ripple.mjs +4 -4
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +5 -5
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +4 -4
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/datepicker/calendar-body.mjs +4 -4
- package/esm2022/datepicker/calendar.mjs +7 -7
- package/esm2022/datepicker/date-range-input-parts.mjs +10 -10
- package/esm2022/datepicker/date-range-input.mjs +4 -4
- package/esm2022/datepicker/date-range-picker.mjs +4 -4
- package/esm2022/datepicker/date-range-selection-strategy.mjs +4 -4
- package/esm2022/datepicker/date-selection-model.mjs +10 -10
- package/esm2022/datepicker/datepicker-actions.mjs +10 -10
- package/esm2022/datepicker/datepicker-base.mjs +7 -7
- package/esm2022/datepicker/datepicker-input-base.mjs +4 -4
- package/esm2022/datepicker/datepicker-input.mjs +4 -4
- package/esm2022/datepicker/datepicker-intl.mjs +4 -4
- package/esm2022/datepicker/datepicker-module.mjs +5 -5
- package/esm2022/datepicker/datepicker-toggle.mjs +7 -7
- package/esm2022/datepicker/datepicker.mjs +4 -4
- package/esm2022/datepicker/month-view.mjs +4 -4
- package/esm2022/datepicker/multi-year-view.mjs +4 -4
- package/esm2022/datepicker/year-view.mjs +4 -4
- package/esm2022/dialog/dialog-container.mjs +4 -4
- package/esm2022/dialog/dialog-content-directives.mjs +19 -16
- package/esm2022/dialog/dialog.mjs +4 -4
- package/esm2022/dialog/module.mjs +5 -5
- package/esm2022/divider/divider-module.mjs +5 -5
- package/esm2022/divider/divider.mjs +4 -4
- package/esm2022/expansion/accordion.mjs +4 -4
- package/esm2022/expansion/expansion-module.mjs +5 -5
- package/esm2022/expansion/expansion-panel-content.mjs +4 -4
- package/esm2022/expansion/expansion-panel-header.mjs +10 -10
- package/esm2022/expansion/expansion-panel.mjs +7 -7
- package/esm2022/form-field/directives/error.mjs +4 -4
- package/esm2022/form-field/directives/floating-label.mjs +4 -4
- package/esm2022/form-field/directives/hint.mjs +4 -4
- package/esm2022/form-field/directives/label.mjs +4 -4
- package/esm2022/form-field/directives/line-ripple.mjs +4 -4
- package/esm2022/form-field/directives/notched-outline.mjs +4 -4
- package/esm2022/form-field/directives/prefix.mjs +4 -4
- package/esm2022/form-field/directives/suffix.mjs +4 -4
- package/esm2022/form-field/form-field-control.mjs +4 -4
- package/esm2022/form-field/form-field.mjs +4 -4
- package/esm2022/form-field/module.mjs +5 -5
- package/esm2022/grid-list/grid-list-module.mjs +5 -5
- package/esm2022/grid-list/grid-list.mjs +4 -4
- package/esm2022/grid-list/grid-tile.mjs +16 -16
- package/esm2022/icon/icon-module.mjs +5 -5
- package/esm2022/icon/icon-registry.mjs +4 -4
- package/esm2022/icon/icon.mjs +4 -4
- package/esm2022/icon/testing/fake-icon-registry.mjs +8 -8
- package/esm2022/input/input.mjs +4 -4
- package/esm2022/input/module.mjs +5 -5
- package/esm2022/list/action-list.mjs +4 -4
- package/esm2022/list/list-base.mjs +7 -7
- package/esm2022/list/list-item-sections.mjs +19 -19
- package/esm2022/list/list-module.mjs +5 -5
- package/esm2022/list/list-option.mjs +4 -4
- package/esm2022/list/list.mjs +7 -7
- package/esm2022/list/nav-list.mjs +4 -4
- package/esm2022/list/selection-list.mjs +4 -4
- package/esm2022/list/subheader.mjs +4 -4
- package/esm2022/menu/menu-content.mjs +4 -4
- package/esm2022/menu/menu-item.mjs +4 -4
- package/esm2022/menu/menu-trigger.mjs +4 -4
- package/esm2022/menu/menu.mjs +4 -4
- package/esm2022/menu/module.mjs +5 -5
- package/esm2022/paginator/module.mjs +5 -5
- package/esm2022/paginator/paginator-intl.mjs +4 -4
- package/esm2022/paginator/paginator.mjs +4 -4
- package/esm2022/progress-bar/module.mjs +5 -5
- package/esm2022/progress-bar/progress-bar.mjs +4 -4
- package/esm2022/progress-spinner/module.mjs +5 -5
- package/esm2022/progress-spinner/progress-spinner.mjs +4 -4
- package/esm2022/radio/module.mjs +5 -5
- package/esm2022/radio/radio.mjs +7 -7
- package/esm2022/select/module.mjs +5 -5
- package/esm2022/select/select.mjs +7 -7
- package/esm2022/sidenav/drawer.mjs +10 -10
- package/esm2022/sidenav/sidenav-module.mjs +5 -5
- package/esm2022/sidenav/sidenav.mjs +10 -10
- package/esm2022/slide-toggle/module.mjs +9 -9
- package/esm2022/slide-toggle/slide-toggle-required-validator.mjs +4 -4
- package/esm2022/slide-toggle/slide-toggle.mjs +6 -6
- package/esm2022/slider/module.mjs +5 -5
- package/esm2022/slider/slider-input.mjs +7 -7
- package/esm2022/slider/slider-thumb.mjs +4 -4
- package/esm2022/slider/slider.mjs +4 -4
- package/esm2022/snack-bar/module.mjs +5 -5
- package/esm2022/snack-bar/simple-snack-bar.mjs +4 -4
- package/esm2022/snack-bar/snack-bar-container.mjs +4 -4
- package/esm2022/snack-bar/snack-bar-content.mjs +10 -10
- package/esm2022/snack-bar/snack-bar.mjs +4 -4
- package/esm2022/sort/sort-header-intl.mjs +4 -4
- package/esm2022/sort/sort-header.mjs +4 -4
- package/esm2022/sort/sort-module.mjs +5 -5
- package/esm2022/sort/sort.mjs +4 -4
- package/esm2022/stepper/step-content.mjs +4 -4
- package/esm2022/stepper/step-header.mjs +4 -4
- package/esm2022/stepper/step-label.mjs +4 -4
- package/esm2022/stepper/stepper-button.mjs +7 -7
- package/esm2022/stepper/stepper-icon.mjs +4 -4
- package/esm2022/stepper/stepper-intl.mjs +4 -4
- package/esm2022/stepper/stepper-module.mjs +5 -5
- package/esm2022/stepper/stepper.mjs +7 -7
- package/esm2022/table/cell.mjs +22 -22
- package/esm2022/table/module.mjs +5 -5
- package/esm2022/table/row.mjs +22 -22
- package/esm2022/table/table.mjs +7 -7
- package/esm2022/table/text-column.mjs +4 -4
- package/esm2022/tabs/ink-bar.mjs +4 -4
- package/esm2022/tabs/module.mjs +5 -5
- package/esm2022/tabs/paginated-tab-header.mjs +4 -4
- package/esm2022/tabs/tab-body.mjs +7 -7
- package/esm2022/tabs/tab-content.mjs +4 -4
- package/esm2022/tabs/tab-group.mjs +4 -4
- package/esm2022/tabs/tab-header.mjs +4 -4
- package/esm2022/tabs/tab-label-wrapper.mjs +4 -4
- package/esm2022/tabs/tab-label.mjs +4 -4
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +10 -10
- package/esm2022/tabs/tab.mjs +4 -4
- package/esm2022/toolbar/toolbar-module.mjs +5 -5
- package/esm2022/toolbar/toolbar.mjs +7 -7
- package/esm2022/tooltip/module.mjs +5 -5
- package/esm2022/tooltip/tooltip.mjs +11 -8
- package/esm2022/tree/node.mjs +10 -10
- package/esm2022/tree/outlet.mjs +4 -4
- package/esm2022/tree/padding.mjs +4 -4
- package/esm2022/tree/toggle.mjs +4 -4
- package/esm2022/tree/tree-module.mjs +5 -5
- package/esm2022/tree/tree.mjs +4 -4
- package/fesm2022/autocomplete.mjs +13 -13
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge.mjs +10 -10
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +10 -10
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +10 -10
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +35 -35
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card.mjs +46 -46
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +14 -14
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips.mjs +45 -45
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +59 -59
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +82 -82
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog.mjs +28 -25
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider.mjs +7 -7
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/expansion.mjs +25 -25
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field.mjs +34 -34
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +22 -22
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs +7 -7
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/icon.mjs +10 -10
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input.mjs +7 -7
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/list.mjs +49 -49
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/menu.mjs +16 -16
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator.mjs +10 -10
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +7 -7
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +7 -7
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/radio.mjs +10 -10
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/select.mjs +10 -10
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +22 -22
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +16 -16
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider.mjs +16 -16
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +22 -22
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort.mjs +13 -13
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper.mjs +31 -31
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table.mjs +55 -55
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs.mjs +43 -43
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +10 -10
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +14 -11
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree.mjs +25 -25
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +2 -2
- package/prebuilt-themes/azure-blue.css +1 -1
- package/prebuilt-themes/cyan-orange.css +1 -1
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/magenta-violet.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/prebuilt-themes/rose-red.css +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-generate/m3-theme/index_bundled.js +4 -3
- package/schematics/ng-generate/m3-theme/index_bundled.js.map +2 -2
- package/schematics/ng-generate/m3-theme/schema.json +3 -20
- package/core/tokens/_custom-tokens.scss +0 -1918
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
@use 'sass:list';
|
|
2
2
|
@use 'sass:map';
|
|
3
|
+
@use 'sass:meta';
|
|
3
4
|
@use '@material/elevation/elevation-theme' as mdc-elevation-theme;
|
|
4
5
|
@use '@material/theme/custom-properties' as mdc-custom-properties;
|
|
5
6
|
@use '@material/theme/theme' as mdc-theme;
|
|
6
7
|
@use '@material/theme/keys' as mdc-keys;
|
|
8
|
+
@use '@material/tokens/v0_161' as mdc-tokens;
|
|
7
9
|
@use '../style/sass-utils';
|
|
8
10
|
@use '../m2/palette' as m2-palette;
|
|
9
11
|
@use '../m2/theming' as m2-theming;
|
|
@@ -141,6 +143,17 @@ $_component-prefix: null;
|
|
|
141
143
|
}
|
|
142
144
|
}
|
|
143
145
|
|
|
146
|
+
/// Gets all the MDC token values for a specific component. This function serves as single
|
|
147
|
+
/// point at which we directly reference a specific version of the MDC tokens.
|
|
148
|
+
/// @param {String} $component Name of the component for which to get the tokens
|
|
149
|
+
/// @param {Map} $systems The MDC system tokens
|
|
150
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
151
|
+
/// @return {List} Map of token names to values
|
|
152
|
+
@function get-mdc-tokens($component, $systems, $exclude-hardcoded) {
|
|
153
|
+
$fn: meta.get-function($name: 'md-comp-' + $component + '-values', $module: 'mdc-tokens');
|
|
154
|
+
@return meta.call($fn, $systems, $exclude-hardcoded);
|
|
155
|
+
}
|
|
156
|
+
|
|
144
157
|
// MDC doesn't currently handle elevation tokens properly. As a temporary workaround we can combine
|
|
145
158
|
// the elevation and shadow-color tokens into a full box-shadow and use it as the value for the
|
|
146
159
|
// elevation token.
|
|
@@ -234,6 +247,116 @@ $_component-prefix: null;
|
|
|
234
247
|
}
|
|
235
248
|
}
|
|
236
249
|
|
|
250
|
+
/// Gets the MDC tokens for the given prefix, M3 token values, and supported token slots.
|
|
251
|
+
/// @param {List} $prefix The token prefix for the given tokens.
|
|
252
|
+
/// @param {Map|(Map, Map)} $values A map of M3 token values for the given prefix.
|
|
253
|
+
/// This param may also be a tuple of maps, the first one representing the default M3 token values,
|
|
254
|
+
// and the second containing overrides for different color variants.
|
|
255
|
+
// Single map example:
|
|
256
|
+
// (token1: green, token2: 2px)
|
|
257
|
+
// Tuple example:
|
|
258
|
+
// (
|
|
259
|
+
// (token1: green, token2: 2px),
|
|
260
|
+
// (
|
|
261
|
+
// secondary: (token1: blue),
|
|
262
|
+
// error: (token1: red),
|
|
263
|
+
// )
|
|
264
|
+
// )
|
|
265
|
+
/// @param {Map} $slots A map of token slots, with null value indicating the token is not supported.
|
|
266
|
+
/// @param {String|null} $variant The name of the variant the token values are for.
|
|
267
|
+
/// @return {Map} A map of fully qualified token names to values, for only the supported tokens.
|
|
268
|
+
@function namespace-tokens($prefix, $values, $slots, $variant: null) {
|
|
269
|
+
$result: ();
|
|
270
|
+
@if $variant == null and meta.type-of($values) == 'list' and list.length($values == 2) {
|
|
271
|
+
$variants: list.nth($values, 2);
|
|
272
|
+
$values: list.nth($values, 1);
|
|
273
|
+
@each $variant, $overrides in $variants {
|
|
274
|
+
$result: map.merge($result, namespace-tokens($prefix, $overrides, $slots, $variant));
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
$used-token-names: map.keys(_filter-nulls(map.get($slots, $prefix)));
|
|
278
|
+
$used-m3-tokens: _pick(_filter-nulls($values), $used-token-names);
|
|
279
|
+
$prefix: if($variant == null, $prefix, list.append($prefix, $variant));
|
|
280
|
+
@return map.merge($result, ($prefix: $used-m3-tokens));
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/// Hardcode the given value, or null if hardcoded values are excluded.
|
|
284
|
+
@function hardcode($value, $exclude-hardcoded) {
|
|
285
|
+
@return if($exclude-hardcoded, null, $value);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/// Sets all of the standard typography tokens for the given token base name to the given typography
|
|
289
|
+
/// level.
|
|
290
|
+
/// @param {Map} $systems The MDC system tokens
|
|
291
|
+
/// @param {String} $base-name The token base name to get the typography tokens for
|
|
292
|
+
/// @param {String} $typography-level The typography level to base the token values on
|
|
293
|
+
/// @return {Map} A map containing the typography tokens for the given base token name
|
|
294
|
+
@function generate-typography-tokens($systems, $base-name, $typography-level) {
|
|
295
|
+
$result: ();
|
|
296
|
+
@each $prop in (font, line-height, size, tracking, weight) {
|
|
297
|
+
$result: map.set($result, #{$base-name}-#{$prop},
|
|
298
|
+
map.get($systems, md-sys-typescale, #{$typography-level}-#{$prop}));
|
|
299
|
+
}
|
|
300
|
+
@return $result;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/// Maps the values in a map to new values using the given mapping function
|
|
304
|
+
/// @param {Map} $map The maps whose values will be mapped to new values.
|
|
305
|
+
/// @param {Function} $fn The value mapping function.
|
|
306
|
+
/// @param {Map} A new map with its values updated using the mapping function.
|
|
307
|
+
@function map-values($map, $fn) {
|
|
308
|
+
$result: ();
|
|
309
|
+
@each $key, $value in $map {
|
|
310
|
+
$result: map.set($result, $key, meta.call($fn, $value));
|
|
311
|
+
}
|
|
312
|
+
@return $result;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/// Renames the keys in a map
|
|
316
|
+
/// @param {Map} $map The map whose keys should be renamed
|
|
317
|
+
/// @param {Map} $rename-keys A map of original key to renamed key to apply to $map
|
|
318
|
+
/// @return {Map} The result of applying the given key renames to the given map.
|
|
319
|
+
@function rename-map-keys($map, $rename-keys) {
|
|
320
|
+
$result: $map;
|
|
321
|
+
@each $old-key-name, $new-key-name in $rename-keys {
|
|
322
|
+
@if map.has-key($map, $old-key-name) {
|
|
323
|
+
$result: map.set($result, $new-key-name, map.get($map, $old-key-name));
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
@return $result;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/// At the time of writing, some color tokens (e.g. disabled state) are defined as a solid color
|
|
330
|
+
/// token and a separate opacity token. This function applies the opacity to the color and drops the
|
|
331
|
+
/// opacity key from the map. Can be removed once b/213331407 is resolved.
|
|
332
|
+
/// @param {Map} $tokens The map of tokens currently being generated
|
|
333
|
+
/// @param {Map} $all-tokens A map of all tokens, including hardcoded values
|
|
334
|
+
/// @param {List} $pairs Pairs of color token names and their opacities. Should be in the shape of
|
|
335
|
+
/// `((color: 'color-key', opacity: 'opacity-key'))`.
|
|
336
|
+
/// @return {Map} The initial tokens with the combined color values.
|
|
337
|
+
@function combine-color-tokens($tokens, $opacity-lookup, $pairs) {
|
|
338
|
+
$result: $tokens;
|
|
339
|
+
|
|
340
|
+
@each $pair in $pairs {
|
|
341
|
+
$color-key: map.get($pair, color);
|
|
342
|
+
$opacity-key: map.get($pair, opacity);
|
|
343
|
+
$color: map.get($tokens, $color-key);
|
|
344
|
+
$opacity: map.get($opacity-lookup, $opacity-key);
|
|
345
|
+
|
|
346
|
+
@if(meta.type-of($color) == 'color') {
|
|
347
|
+
$result: map.remove($result, $opacity-key);
|
|
348
|
+
$result: map.set($result, $color-key, rgba($color, $opacity));
|
|
349
|
+
}
|
|
350
|
+
@else if($color != null) {
|
|
351
|
+
$result: map.remove($result, $opacity-key);
|
|
352
|
+
$combined-color: #{color-mix(in srgb, #{$color} #{($opacity * 100) + '%'}, transparent)};
|
|
353
|
+
$result: map.set($result, $color-key, $combined-color);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
@return $result;
|
|
358
|
+
}
|
|
359
|
+
|
|
237
360
|
/// Verifies that the token overrides exist and are used in one of the given token maps.
|
|
238
361
|
@mixin _validate-token-overrides($overrides: (), $token-maps) {
|
|
239
362
|
$valid-token-names: ();
|
|
@@ -255,3 +378,31 @@ $_component-prefix: null;
|
|
|
255
378
|
}
|
|
256
379
|
}
|
|
257
380
|
}
|
|
381
|
+
|
|
382
|
+
/// Picks a submap containing only the given keys out the given map.
|
|
383
|
+
/// @param {Map} $map The map to pick from.
|
|
384
|
+
/// @param {List} $keys The map keys to pick.
|
|
385
|
+
/// @return {Map} A submap containing only the given keys.
|
|
386
|
+
@function _pick($map, $keys) {
|
|
387
|
+
$result: ();
|
|
388
|
+
@each $key in $keys {
|
|
389
|
+
@if map.has-key($map, $key) {
|
|
390
|
+
$result: map.set($result, $key, map.get($map, $key));
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
@return $result;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
/// Filters keys with a null value out of the map.
|
|
398
|
+
/// @param {Map} $map The map to filter.
|
|
399
|
+
/// @return {Map} The given map with all of the null keys filtered out.
|
|
400
|
+
@function _filter-nulls($map) {
|
|
401
|
+
$result: ();
|
|
402
|
+
@each $key, $val in $map {
|
|
403
|
+
@if $val != null {
|
|
404
|
+
$result: map.set($result, $key, $val);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
@return $result;
|
|
408
|
+
}
|
|
@@ -38,6 +38,7 @@ $prefix: (mat, switch);
|
|
|
38
38
|
track-outline-width: 1px,
|
|
39
39
|
track-outline-color: transparent,
|
|
40
40
|
selected-track-outline-width: 1px,
|
|
41
|
+
selected-track-outline-color: transparent,
|
|
41
42
|
disabled-unselected-track-outline-width: 1px,
|
|
42
43
|
disabled-unselected-track-outline-color: transparent,
|
|
43
44
|
);
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
@use 'sass:meta';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use './mat/app' as tokens-mat-app;
|
|
4
|
+
@use './mat/autocomplete' as tokens-mat-autocomplete;
|
|
5
|
+
@use './mat/badge' as tokens-mat-badge;
|
|
6
|
+
@use './mat/text-button' as tokens-mat-text-button;
|
|
7
|
+
@use './mat/protected-button' as tokens-mat-protected-button;
|
|
8
|
+
@use './mat/filled-button' as tokens-mat-filled-button;
|
|
9
|
+
@use './mat/outlined-button' as tokens-mat-outlined-button;
|
|
10
|
+
@use './mat/dialog' as tokens-mat-dialog;
|
|
11
|
+
@use './mat/bottom-sheet' as tokens-mat-bottom-sheet;
|
|
12
|
+
@use './mat/card' as tokens-mat-card;
|
|
13
|
+
@use './mat/chip' as tokens-mat-chip;
|
|
14
|
+
@use './mat/datepicker' as tokens-mat-datepicker;
|
|
15
|
+
@use './mat/divider' as tokens-mat-divider;
|
|
16
|
+
@use './mat/expansion' as tokens-mat-expansion;
|
|
17
|
+
@use './mat/fab' as tokens-mat-fab;
|
|
18
|
+
@use './mat/fab-small' as tokens-mat-fab-small;
|
|
19
|
+
@use './mat/form-field' as tokens-mat-form-field;
|
|
20
|
+
@use './mat/grid-list' as tokens-mat-grid-list;
|
|
21
|
+
@use './mat/icon' as tokens-mat-icon;
|
|
22
|
+
@use './mat/icon-button' as tokens-mat-icon-button;
|
|
23
|
+
@use './mat/list' as tokens-mat-list;
|
|
24
|
+
@use './mat/menu' as tokens-mat-menu;
|
|
25
|
+
@use './mat/option' as tokens-mat-option;
|
|
26
|
+
@use './mat/optgroup' as tokens-mat-optgroup;
|
|
27
|
+
@use './mat/paginator' as tokens-mat-paginator;
|
|
28
|
+
@use './mat/checkbox' as tokens-mat-checkbox;
|
|
29
|
+
@use './mat/full-pseudo-checkbox' as tokens-mat-full-pseudo-checkbox;
|
|
30
|
+
@use './mat/minimal-pseudo-checkbox' as tokens-mat-minimal-pseudo-checkbox;
|
|
31
|
+
@use './mat/radio' as tokens-mat-radio;
|
|
32
|
+
@use './mat/ripple' as tokens-mat-ripple;
|
|
33
|
+
@use './mat/select' as tokens-mat-select;
|
|
34
|
+
@use './mat/sidenav' as tokens-mat-sidenav;
|
|
35
|
+
@use './mat/slider' as tokens-mat-slider;
|
|
36
|
+
@use './mat/switch' as tokens-mat-switch;
|
|
37
|
+
@use './mat/snack-bar' as tokens-mat-snack-bar;
|
|
38
|
+
@use './mat/sort' as tokens-mat-sort;
|
|
39
|
+
@use './mat/standard-button-toggle' as tokens-mat-button-toggle;
|
|
40
|
+
@use './mat/stepper' as tokens-mat-stepper;
|
|
41
|
+
@use './mat/tab-header' as tokens-mat-tab-header;
|
|
42
|
+
@use './mat/table' as tokens-mat-table;
|
|
43
|
+
@use './mat/toolbar' as tokens-mat-toolbar;
|
|
44
|
+
@use './mat/tree' as tokens-mat-tree;
|
|
45
|
+
@use './mdc/checkbox' as tokens-mdc-checkbox;
|
|
46
|
+
@use './mdc/text-button' as tokens-mdc-text-button;
|
|
47
|
+
@use './mdc/protected-button' as tokens-mdc-protected-button;
|
|
48
|
+
@use './mdc/filled-button' as tokens-mdc-filled-button;
|
|
49
|
+
@use './mdc/outlined-button' as tokens-mdc-outlined-button;
|
|
50
|
+
@use './mdc/chip' as tokens-mdc-chip;
|
|
51
|
+
@use './mdc/circular-progress' as tokens-mdc-circular-progress;
|
|
52
|
+
@use './mdc/dialog' as tokens-mdc-dialog;
|
|
53
|
+
@use './mdc/elevated-card' as tokens-mdc-elevated-card;
|
|
54
|
+
@use './mdc/extended-fab' as tokens-mdc-extended-fab;
|
|
55
|
+
@use './mdc/fab' as tokens-mdc-fab;
|
|
56
|
+
@use './mdc/fab-small' as tokens-mdc-fab-small;
|
|
57
|
+
@use './mdc/form-field' as tokens-mdc-form-field;
|
|
58
|
+
@use './mdc/filled-text-field' as tokens-mdc-filled-text-field;
|
|
59
|
+
@use './mdc/icon-button' as tokens-mdc-icon-button;
|
|
60
|
+
@use './mdc/linear-progress' as tokens-mdc-linear-progress;
|
|
61
|
+
@use './mdc/list' as tokens-mdc-list;
|
|
62
|
+
@use './mdc/outlined-card' as tokens-mdc-outlined-card;
|
|
63
|
+
@use './mdc/outlined-text-field' as tokens-mdc-outlined-text-field;
|
|
64
|
+
@use './mdc/plain-tooltip' as tokens-mdc-plain-tooltip;
|
|
65
|
+
@use './mdc/radio' as tokens-mdc-radio;
|
|
66
|
+
@use './mdc/slider' as tokens-mdc-slider;
|
|
67
|
+
@use './mdc/snack-bar' as tokens-mdc-snack-bar;
|
|
68
|
+
@use './mdc/switch' as tokens-mdc-switch;
|
|
69
|
+
@use './mdc/tab' as tokens-mdc-tab;
|
|
70
|
+
@use './mdc/tab-indicator' as tokens-mdc-tab-indicator;
|
|
71
|
+
|
|
72
|
+
$_module-names: (
|
|
73
|
+
// Custom tokens
|
|
74
|
+
tokens-mat-app,
|
|
75
|
+
tokens-mat-autocomplete,
|
|
76
|
+
tokens-mat-badge,
|
|
77
|
+
tokens-mat-bottom-sheet,
|
|
78
|
+
tokens-mat-button-toggle,
|
|
79
|
+
tokens-mat-card,
|
|
80
|
+
tokens-mat-chip,
|
|
81
|
+
tokens-mat-datepicker,
|
|
82
|
+
tokens-mat-dialog,
|
|
83
|
+
tokens-mat-divider,
|
|
84
|
+
tokens-mat-expansion,
|
|
85
|
+
tokens-mat-fab,
|
|
86
|
+
tokens-mat-fab-small,
|
|
87
|
+
tokens-mat-filled-button,
|
|
88
|
+
tokens-mat-form-field,
|
|
89
|
+
tokens-mat-grid-list,
|
|
90
|
+
tokens-mat-icon-button,
|
|
91
|
+
tokens-mat-icon,
|
|
92
|
+
tokens-mat-menu,
|
|
93
|
+
tokens-mat-optgroup,
|
|
94
|
+
tokens-mat-option,
|
|
95
|
+
tokens-mat-outlined-button,
|
|
96
|
+
tokens-mat-paginator,
|
|
97
|
+
tokens-mat-checkbox,
|
|
98
|
+
tokens-mat-full-pseudo-checkbox,
|
|
99
|
+
tokens-mat-list,
|
|
100
|
+
tokens-mat-minimal-pseudo-checkbox,
|
|
101
|
+
tokens-mat-protected-button,
|
|
102
|
+
tokens-mat-radio,
|
|
103
|
+
tokens-mat-ripple,
|
|
104
|
+
tokens-mat-select,
|
|
105
|
+
tokens-mat-sidenav,
|
|
106
|
+
tokens-mat-slider,
|
|
107
|
+
tokens-mat-switch,
|
|
108
|
+
tokens-mat-snack-bar,
|
|
109
|
+
tokens-mat-sort,
|
|
110
|
+
tokens-mat-stepper,
|
|
111
|
+
tokens-mat-tab-header,
|
|
112
|
+
tokens-mat-table,
|
|
113
|
+
tokens-mat-text-button,
|
|
114
|
+
tokens-mat-toolbar,
|
|
115
|
+
tokens-mat-tree,
|
|
116
|
+
|
|
117
|
+
// MDC tokens
|
|
118
|
+
tokens-mdc-checkbox,
|
|
119
|
+
tokens-mdc-chip,
|
|
120
|
+
tokens-mdc-text-button,
|
|
121
|
+
tokens-mdc-protected-button,
|
|
122
|
+
tokens-mdc-filled-button,
|
|
123
|
+
tokens-mdc-outlined-button,
|
|
124
|
+
tokens-mdc-chip,
|
|
125
|
+
tokens-mdc-circular-progress,
|
|
126
|
+
tokens-mdc-dialog,
|
|
127
|
+
tokens-mdc-elevated-card,
|
|
128
|
+
tokens-mdc-extended-fab,
|
|
129
|
+
tokens-mdc-fab,
|
|
130
|
+
tokens-mdc-fab-small,
|
|
131
|
+
tokens-mdc-form-field,
|
|
132
|
+
tokens-mdc-filled-text-field,
|
|
133
|
+
tokens-mdc-icon-button,
|
|
134
|
+
tokens-mdc-linear-progress,
|
|
135
|
+
tokens-mdc-list,
|
|
136
|
+
tokens-mdc-outlined-card,
|
|
137
|
+
tokens-mdc-outlined-text-field,
|
|
138
|
+
tokens-mdc-plain-tooltip,
|
|
139
|
+
tokens-mdc-radio,
|
|
140
|
+
tokens-mdc-slider,
|
|
141
|
+
tokens-mdc-snack-bar,
|
|
142
|
+
tokens-mdc-switch,
|
|
143
|
+
tokens-mdc-tab,
|
|
144
|
+
tokens-mdc-tab-indicator,
|
|
145
|
+
);
|
|
146
|
+
|
|
147
|
+
/// Gets the full set of M3 tokens for the given theme object.
|
|
148
|
+
/// @param {Map} $systems The MDC system tokens
|
|
149
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
150
|
+
/// @param {Map} $token-slots Possible token slots
|
|
151
|
+
/// @return {Map} Full set of M3 tokens
|
|
152
|
+
@function get-m3-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
153
|
+
$tokens: ();
|
|
154
|
+
|
|
155
|
+
@each $module-name in $_module-names {
|
|
156
|
+
$fn: meta.get-function($name: 'get-tokens', $module: $module-name);
|
|
157
|
+
$tokens: map.merge($tokens, meta.call($fn, $systems, $exclude-hardcoded, $token-slots));
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
@return $tokens;
|
|
161
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../token-utils';
|
|
3
|
+
|
|
4
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
5
|
+
$prefix: (mat, app);
|
|
6
|
+
|
|
7
|
+
/// Generates custom tokens for the app.
|
|
8
|
+
/// @param {Map} $systems The MDC system tokens
|
|
9
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
10
|
+
/// @param {Map} $token-slots Possible token slots
|
|
11
|
+
/// @return {Map} A set of custom tokens for the app
|
|
12
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
13
|
+
$tokens: (
|
|
14
|
+
background-color: map.get($systems, md-sys-color, background),
|
|
15
|
+
text-color: map.get($systems, md-sys-color, on-background),
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
19
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '@material/elevation/elevation-theme' as mdc-elevation;
|
|
3
|
+
@use '../../token-utils';
|
|
4
|
+
|
|
5
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
+
$prefix: (mat, autocomplete);
|
|
7
|
+
|
|
8
|
+
/// Generates custom tokens for the mat-autocomplete.
|
|
9
|
+
/// @param {Map} $systems The MDC system tokens
|
|
10
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
11
|
+
/// @param {Map} $token-slots Possible token slots
|
|
12
|
+
/// @return {Map} A set of custom tokens for the mat-autocomplete
|
|
13
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
14
|
+
$tokens: (
|
|
15
|
+
background-color: map.get($systems, md-sys-color, surface-container),
|
|
16
|
+
container-shape: map.get($systems, md-sys-shape, corner-extra-small),
|
|
17
|
+
container-elevation-shadow:
|
|
18
|
+
token-utils.hardcode(mdc-elevation.elevation-box-shadow(2), $exclude-hardcoded),
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
22
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../../style/sass-utils';
|
|
3
|
+
@use '../../token-utils';
|
|
4
|
+
|
|
5
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
+
$prefix: (mat, badge);
|
|
7
|
+
|
|
8
|
+
/// Generates custom tokens for the mat-badge.
|
|
9
|
+
/// @param {Map} $systems The MDC system tokens
|
|
10
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
11
|
+
/// @param {Map} $token-slots Possible token slots
|
|
12
|
+
/// @return {Map} A set of custom tokens for the mat-badge
|
|
13
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
14
|
+
$tokens: ((
|
|
15
|
+
background-color: map.get($systems, md-sys-color, error),
|
|
16
|
+
text-color: map.get($systems, md-sys-color, on-error),
|
|
17
|
+
disabled-state-background-color: sass-utils.safe-color-change(
|
|
18
|
+
map.get($systems, md-sys-color, error),
|
|
19
|
+
$alpha: 0.38,
|
|
20
|
+
),
|
|
21
|
+
disabled-state-text-color: map.get($systems, md-sys-color, on-error),
|
|
22
|
+
text-font: map.get($systems, md-sys-typescale, label-small-font),
|
|
23
|
+
text-size: map.get($systems, md-sys-typescale, label-small-size),
|
|
24
|
+
text-weight: map.get($systems, md-sys-typescale, label-small-weight),
|
|
25
|
+
small-size-text-size: token-utils.hardcode(0, $exclude-hardcoded),
|
|
26
|
+
container-shape: map.get($systems, md-sys-shape, corner-full),
|
|
27
|
+
container-size: token-utils.hardcode(16px, $exclude-hardcoded),
|
|
28
|
+
legacy-container-size: token-utils.hardcode(unset, $exclude-hardcoded),
|
|
29
|
+
legacy-small-size-container-size: token-utils.hardcode(unset, $exclude-hardcoded),
|
|
30
|
+
small-size-container-size: token-utils.hardcode(6px, $exclude-hardcoded),
|
|
31
|
+
container-padding: token-utils.hardcode(0 4px, $exclude-hardcoded),
|
|
32
|
+
small-size-container-padding: token-utils.hardcode(0, $exclude-hardcoded),
|
|
33
|
+
container-offset: token-utils.hardcode(-12px 0, $exclude-hardcoded),
|
|
34
|
+
small-size-container-offset: token-utils.hardcode(-6px 0, $exclude-hardcoded),
|
|
35
|
+
container-overlap-offset: token-utils.hardcode(-12px, $exclude-hardcoded),
|
|
36
|
+
small-size-container-overlap-offset: token-utils.hardcode(-6px, $exclude-hardcoded),
|
|
37
|
+
|
|
38
|
+
// This size isn't in the M3 spec so we emit the same values as for `medium`.
|
|
39
|
+
large-size-container-size: token-utils.hardcode(16px, $exclude-hardcoded),
|
|
40
|
+
large-size-container-offset: token-utils.hardcode(-12px 0, $exclude-hardcoded),
|
|
41
|
+
large-size-container-overlap-offset: token-utils.hardcode(-12px, $exclude-hardcoded),
|
|
42
|
+
large-size-text-size: map.get($systems, md-sys-typescale, label-small-size),
|
|
43
|
+
large-size-container-padding: token-utils.hardcode(0 4px, $exclude-hardcoded),
|
|
44
|
+
legacy-large-size-container-size: token-utils.hardcode(unset, $exclude-hardcoded),
|
|
45
|
+
), (
|
|
46
|
+
primary: (
|
|
47
|
+
background-color: map.get($systems, md-sys-color, primary),
|
|
48
|
+
text-color: map.get($systems, md-sys-color, on-primary),
|
|
49
|
+
disabled-state-background-color: sass-utils.safe-color-change(
|
|
50
|
+
map.get($systems, md-sys-color, primary),
|
|
51
|
+
$alpha: 0.38,
|
|
52
|
+
),
|
|
53
|
+
disabled-state-text-color: map.get($systems, md-sys-color, on-primary),
|
|
54
|
+
),
|
|
55
|
+
secondary: (
|
|
56
|
+
background-color: map.get($systems, md-sys-color, secondary),
|
|
57
|
+
text-color: map.get($systems, md-sys-color, on-secondary),
|
|
58
|
+
disabled-state-background-color: sass-utils.safe-color-change(
|
|
59
|
+
map.get($systems, md-sys-color, secondary),
|
|
60
|
+
$alpha: 0.38,
|
|
61
|
+
),
|
|
62
|
+
disabled-state-text-color: map.get($systems, md-sys-color, on-secondary),
|
|
63
|
+
),
|
|
64
|
+
tertiary: (
|
|
65
|
+
background-color: map.get($systems, md-sys-color, tertiary),
|
|
66
|
+
text-color: map.get($systems, md-sys-color, on-tertiary),
|
|
67
|
+
disabled-state-background-color: sass-utils.safe-color-change(
|
|
68
|
+
map.get($systems, md-sys-color, tertiary),
|
|
69
|
+
$alpha: 0.38,
|
|
70
|
+
),
|
|
71
|
+
disabled-state-text-color: map.get($systems, md-sys-color, on-tertiary),
|
|
72
|
+
),
|
|
73
|
+
error: () // Default, no overrides needed
|
|
74
|
+
));
|
|
75
|
+
|
|
76
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
77
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../../style/sass-utils';
|
|
3
|
+
@use '../../token-utils';
|
|
4
|
+
|
|
5
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
+
$prefix: (mat, bottom-sheet);
|
|
7
|
+
|
|
8
|
+
/// Generates custom tokens for the mat-bottom-sheet.
|
|
9
|
+
/// @param {Map} $systems The MDC system tokens
|
|
10
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
11
|
+
/// @param {Map} $token-slots Possible token slots
|
|
12
|
+
/// @return {Map} A set of custom tokens for the mat-bottom-sheet
|
|
13
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
14
|
+
$tokens: sass-utils.merge-all(
|
|
15
|
+
token-utils.generate-typography-tokens($systems, container-text, body-large),
|
|
16
|
+
(
|
|
17
|
+
container-shape: token-utils.hardcode(28px, $exclude-hardcoded),
|
|
18
|
+
container-text-color: map.get($systems, md-sys-color, on-surface),
|
|
19
|
+
container-background-color: map.get($systems, md-sys-color, surface-container-low),
|
|
20
|
+
),
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../../style/sass-utils';
|
|
3
|
+
@use '../../token-utils';
|
|
4
|
+
|
|
5
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
+
$prefix: (mat, card);
|
|
7
|
+
|
|
8
|
+
/// Generates custom tokens for the mat-card.
|
|
9
|
+
/// @param {Map} $systems The MDC system tokens
|
|
10
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
11
|
+
/// @param {Map} $token-slots Possible token slots
|
|
12
|
+
/// @return {Map} A set of custom tokens for the mat-card
|
|
13
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
14
|
+
$tokens: sass-utils.merge-all(
|
|
15
|
+
token-utils.generate-typography-tokens($systems, title-text, title-large),
|
|
16
|
+
token-utils.generate-typography-tokens($systems, subtitle-text, title-medium),
|
|
17
|
+
(
|
|
18
|
+
subtitle-text-color: map.get($systems, md-sys-color, on-surface)
|
|
19
|
+
)
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
23
|
+
}
|
|
24
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../../style/sass-utils';
|
|
3
|
+
@use '../../token-utils';
|
|
4
|
+
|
|
5
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
+
$prefix: (mat, checkbox);
|
|
7
|
+
|
|
8
|
+
/// Generates custom tokens for mat-checkbox.
|
|
9
|
+
/// @param {Map} $systems The MDC system tokens
|
|
10
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
11
|
+
/// @param {Map} $token-slots Possible token slots
|
|
12
|
+
/// @return {Map} A set of custom tokens for mat-checkbox
|
|
13
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
14
|
+
$tokens: (
|
|
15
|
+
disabled-label-color: sass-utils.safe-color-change(
|
|
16
|
+
map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
20
|
+
}
|
|
21
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../token-utils';
|
|
3
|
+
|
|
4
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
5
|
+
$prefix: (mat, chip);
|
|
6
|
+
|
|
7
|
+
/// Generates custom tokens for the mat-chip.
|
|
8
|
+
/// @param {Map} $systems The MDC system tokens
|
|
9
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
10
|
+
/// @param {Map} $token-slots Possible token slots
|
|
11
|
+
/// @return {Map} A set of custom tokens for the mat-chip
|
|
12
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
13
|
+
$tokens: ((
|
|
14
|
+
disabled-container-opacity: token-utils.hardcode(1, $exclude-hardcoded),
|
|
15
|
+
selected-trailing-icon-color: map.get($systems, md-sys-color, on-secondary-container),
|
|
16
|
+
selected-disabled-trailing-icon-color: map.get($systems, md-sys-color, on-surface),
|
|
17
|
+
trailing-action-state-layer-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
18
|
+
selected-trailing-action-state-layer-color:
|
|
19
|
+
map.get($systems, md-sys-color, on-secondary-container),
|
|
20
|
+
trailing-action-hover-state-layer-opacity:
|
|
21
|
+
map.get($systems, md-sys-state, hover-state-layer-opacity),
|
|
22
|
+
trailing-action-focus-state-layer-opacity:
|
|
23
|
+
map.get($systems, md-sys-state, focus-state-layer-opacity),
|
|
24
|
+
trailing-action-opacity: token-utils.hardcode(1, $exclude-hardcoded),
|
|
25
|
+
trailing-action-focus-opacity: token-utils.hardcode(1, $exclude-hardcoded),
|
|
26
|
+
), (
|
|
27
|
+
primary: (
|
|
28
|
+
selected-trailing-icon-color: map.get($systems, md-sys-color, on-primary-container),
|
|
29
|
+
selected-trailing-action-state-layer-color:
|
|
30
|
+
map.get($systems, md-sys-color, on-primary-container),
|
|
31
|
+
),
|
|
32
|
+
secondary: (), // Default, no overrides needed.
|
|
33
|
+
tertiary: (
|
|
34
|
+
selected-trailing-icon-color: map.get($systems, md-sys-color, on-tertiary-container),
|
|
35
|
+
selected-trailing-action-state-layer-color:
|
|
36
|
+
map.get($systems, md-sys-color, on-tertiary-container),
|
|
37
|
+
),
|
|
38
|
+
error: (
|
|
39
|
+
selected-trailing-icon-color: map.get($systems, md-sys-color, on-error-container),
|
|
40
|
+
selected-trailing-action-state-layer-color:
|
|
41
|
+
map.get($systems, md-sys-color, on-error-container),
|
|
42
|
+
),
|
|
43
|
+
));
|
|
44
|
+
|
|
45
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
46
|
+
}
|