@angular/material 18.0.0-next.5 → 18.0.0-rc.0
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 +67 -60
- package/autocomplete/_autocomplete-theme.scss +7 -0
- package/badge/_badge-theme.scss +9 -0
- package/bottom-sheet/_bottom-sheet-theme.scss +7 -0
- package/button/_button-theme.scss +25 -0
- package/button/_fab-theme.scss +13 -0
- package/button/_icon-button-theme.scss +8 -0
- package/button-toggle/_button-toggle-theme.scss +12 -0
- package/card/_card-theme.scss +9 -0
- package/checkbox/_checkbox-theme.scss +2 -4
- package/chips/_chips-theme.scss +10 -0
- package/core/_core-theme.scss +17 -0
- package/core/m2/_index.scss +52 -0
- package/core/m2/_theming.scss +295 -0
- package/core/{typography/_property-getters.scss → m2/_typography-utils.scss} +14 -0
- package/core/{typography/_definition.scss → m2/_typography.scss} +1 -1
- package/core/option/_optgroup-theme.scss +7 -0
- package/core/option/_option-theme.scss +9 -0
- package/core/ripple/_ripple-theme.scss +7 -0
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +13 -0
- package/core/style/_sass-utils.scss +14 -1
- package/core/theming/_color-api-backwards-compatibility.scss +128 -0
- package/core/theming/_config-validation.scss +173 -0
- package/core/theming/_definition.scss +113 -0
- package/core/theming/_m2-inspection.scss +23 -22
- package/core/theming/_palettes.scss +947 -0
- package/core/theming/_theming-deprecated.scss +9 -9
- package/core/theming/_theming.scss +73 -339
- package/core/tokens/_density.scss +191 -0
- package/core/tokens/_format-tokens.scss +5 -0
- package/core/tokens/_m3-tokens.scss +382 -0
- package/core/tokens/_token-utils.scss +179 -42
- package/core/tokens/m2/mat/_chip.scss +3 -3
- package/core/tokens/m2/mat/_form-field.scss +3 -3
- package/core/tokens/m2/mat/_switch.scss +1 -0
- package/core/tokens/m2/mdc/_checkbox.scss +3 -2
- package/core/tokens/m2/mdc/_chip.scss +3 -3
- package/core/tokens/m2/mdc/_radio.scss +3 -2
- 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/core/typography/_all-typography.scss +3 -2
- package/core/typography/_typography-utils.scss +0 -26
- package/core/typography/_typography.scss +0 -2
- package/core/typography/_versioning.scss +3 -3
- package/datepicker/_datepicker-theme.scss +9 -0
- package/datepicker/index.d.ts +5 -0
- package/dialog/_dialog-theme.scss +8 -0
- package/dialog/index.d.ts +4 -3
- package/divider/_divider-theme.scss +7 -0
- package/esm2022/autocomplete/autocomplete-origin.mjs +3 -3
- package/esm2022/autocomplete/autocomplete-trigger.mjs +3 -3
- package/esm2022/autocomplete/autocomplete.mjs +3 -3
- package/esm2022/autocomplete/module.mjs +4 -4
- package/esm2022/badge/badge-module.mjs +4 -4
- package/esm2022/badge/badge.mjs +6 -6
- package/esm2022/bottom-sheet/bottom-sheet-container.mjs +3 -3
- package/esm2022/bottom-sheet/bottom-sheet-module.mjs +4 -4
- package/esm2022/bottom-sheet/bottom-sheet.mjs +3 -3
- package/esm2022/button/button-base.mjs +6 -6
- package/esm2022/button/button.mjs +6 -6
- package/esm2022/button/fab.mjs +12 -12
- package/esm2022/button/icon-button.mjs +6 -6
- package/esm2022/button/module.mjs +4 -4
- package/esm2022/button-toggle/button-toggle-module.mjs +4 -4
- package/esm2022/button-toggle/button-toggle.mjs +6 -6
- package/esm2022/card/card.mjs +42 -42
- package/esm2022/card/module.mjs +4 -4
- package/esm2022/checkbox/checkbox-required-validator.mjs +3 -3
- package/esm2022/checkbox/checkbox.mjs +3 -3
- package/esm2022/checkbox/module.mjs +8 -8
- package/esm2022/chips/chip-action.mjs +3 -3
- package/esm2022/chips/chip-edit-input.mjs +3 -3
- package/esm2022/chips/chip-grid.mjs +3 -3
- package/esm2022/chips/chip-icons.mjs +9 -9
- package/esm2022/chips/chip-input.mjs +3 -3
- package/esm2022/chips/chip-listbox.mjs +3 -3
- package/esm2022/chips/chip-option.mjs +3 -3
- package/esm2022/chips/chip-row.mjs +3 -3
- package/esm2022/chips/chip-set.mjs +3 -3
- package/esm2022/chips/chip.mjs +3 -3
- package/esm2022/chips/module.mjs +4 -4
- package/esm2022/core/common-behaviors/common-module.mjs +4 -4
- package/esm2022/core/datetime/index.mjs +8 -8
- package/esm2022/core/datetime/native-date-adapter.mjs +3 -3
- package/esm2022/core/error/error-options.mjs +6 -6
- package/esm2022/core/internal-form-field/internal-form-field.mjs +3 -3
- package/esm2022/core/line/line.mjs +7 -7
- package/esm2022/core/option/index.mjs +4 -4
- package/esm2022/core/option/optgroup.mjs +3 -3
- package/esm2022/core/option/option.mjs +3 -3
- package/esm2022/core/private/ripple-loader.mjs +3 -3
- package/esm2022/core/ripple/index.mjs +4 -4
- package/esm2022/core/ripple/ripple.mjs +3 -3
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +4 -4
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +3 -3
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/datepicker/calendar-body.mjs +3 -3
- package/esm2022/datepicker/calendar.mjs +6 -6
- package/esm2022/datepicker/date-range-input-parts.mjs +9 -9
- package/esm2022/datepicker/date-range-input.mjs +9 -4
- package/esm2022/datepicker/date-range-picker.mjs +3 -3
- package/esm2022/datepicker/date-range-selection-strategy.mjs +3 -3
- package/esm2022/datepicker/date-selection-model.mjs +9 -9
- package/esm2022/datepicker/datepicker-actions.mjs +9 -9
- package/esm2022/datepicker/datepicker-base.mjs +6 -6
- package/esm2022/datepicker/datepicker-input-base.mjs +3 -3
- package/esm2022/datepicker/datepicker-input.mjs +3 -3
- package/esm2022/datepicker/datepicker-intl.mjs +3 -3
- package/esm2022/datepicker/datepicker-module.mjs +4 -4
- package/esm2022/datepicker/datepicker-toggle.mjs +6 -6
- package/esm2022/datepicker/datepicker.mjs +3 -3
- package/esm2022/datepicker/month-view.mjs +3 -3
- package/esm2022/datepicker/multi-year-view.mjs +3 -3
- package/esm2022/datepicker/year-view.mjs +3 -3
- package/esm2022/dialog/dialog-container.mjs +3 -3
- package/esm2022/dialog/dialog-content-directives.mjs +19 -16
- package/esm2022/dialog/dialog.mjs +3 -3
- package/esm2022/dialog/module.mjs +4 -4
- package/esm2022/divider/divider-module.mjs +4 -4
- package/esm2022/divider/divider.mjs +3 -3
- package/esm2022/expansion/accordion.mjs +3 -3
- package/esm2022/expansion/expansion-module.mjs +4 -4
- package/esm2022/expansion/expansion-panel-content.mjs +3 -3
- package/esm2022/expansion/expansion-panel-header.mjs +9 -9
- package/esm2022/expansion/expansion-panel.mjs +6 -6
- package/esm2022/form-field/directives/error.mjs +3 -3
- package/esm2022/form-field/directives/floating-label.mjs +3 -3
- package/esm2022/form-field/directives/hint.mjs +3 -3
- package/esm2022/form-field/directives/label.mjs +3 -3
- package/esm2022/form-field/directives/line-ripple.mjs +3 -3
- package/esm2022/form-field/directives/notched-outline.mjs +3 -3
- package/esm2022/form-field/directives/prefix.mjs +3 -3
- package/esm2022/form-field/directives/suffix.mjs +3 -3
- package/esm2022/form-field/form-field-control.mjs +4 -4
- package/esm2022/form-field/form-field.mjs +6 -6
- package/esm2022/form-field/module.mjs +4 -4
- package/esm2022/grid-list/grid-list-module.mjs +4 -4
- package/esm2022/grid-list/grid-list.mjs +3 -3
- package/esm2022/grid-list/grid-tile.mjs +15 -15
- package/esm2022/icon/icon-module.mjs +4 -4
- package/esm2022/icon/icon-registry.mjs +3 -3
- package/esm2022/icon/icon.mjs +3 -3
- package/esm2022/icon/testing/fake-icon-registry.mjs +7 -7
- package/esm2022/input/input.mjs +3 -3
- package/esm2022/input/module.mjs +4 -4
- package/esm2022/list/action-list.mjs +3 -3
- package/esm2022/list/list-base.mjs +6 -6
- package/esm2022/list/list-item-sections.mjs +18 -18
- package/esm2022/list/list-module.mjs +4 -4
- package/esm2022/list/list-option.mjs +3 -3
- package/esm2022/list/list.mjs +6 -6
- package/esm2022/list/nav-list.mjs +3 -3
- package/esm2022/list/selection-list.mjs +3 -3
- package/esm2022/list/subheader.mjs +3 -3
- package/esm2022/menu/menu-content.mjs +3 -3
- package/esm2022/menu/menu-item.mjs +3 -3
- package/esm2022/menu/menu-trigger.mjs +3 -3
- package/esm2022/menu/menu.mjs +3 -3
- package/esm2022/menu/module.mjs +4 -4
- package/esm2022/paginator/module.mjs +4 -4
- package/esm2022/paginator/paginator-intl.mjs +3 -3
- package/esm2022/paginator/paginator.mjs +3 -3
- package/esm2022/progress-bar/module.mjs +4 -4
- package/esm2022/progress-bar/progress-bar.mjs +5 -5
- package/esm2022/progress-spinner/module.mjs +4 -4
- package/esm2022/progress-spinner/progress-spinner.mjs +3 -3
- package/esm2022/radio/module.mjs +4 -4
- package/esm2022/radio/radio.mjs +6 -6
- package/esm2022/select/module.mjs +4 -4
- package/esm2022/select/select.mjs +12 -7
- package/esm2022/sidenav/drawer.mjs +9 -9
- package/esm2022/sidenav/sidenav-module.mjs +4 -4
- package/esm2022/sidenav/sidenav.mjs +9 -9
- package/esm2022/slide-toggle/module.mjs +8 -8
- package/esm2022/slide-toggle/slide-toggle-required-validator.mjs +3 -3
- package/esm2022/slide-toggle/slide-toggle.mjs +6 -6
- package/esm2022/slider/module.mjs +4 -4
- package/esm2022/slider/slider-input.mjs +6 -6
- package/esm2022/slider/slider-thumb.mjs +3 -3
- package/esm2022/slider/slider.mjs +3 -3
- package/esm2022/snack-bar/module.mjs +4 -4
- package/esm2022/snack-bar/simple-snack-bar.mjs +3 -3
- package/esm2022/snack-bar/snack-bar-container.mjs +3 -3
- package/esm2022/snack-bar/snack-bar-content.mjs +9 -9
- package/esm2022/snack-bar/snack-bar.mjs +3 -3
- package/esm2022/sort/sort-header-intl.mjs +3 -3
- package/esm2022/sort/sort-header.mjs +3 -3
- package/esm2022/sort/sort-module.mjs +4 -4
- package/esm2022/sort/sort.mjs +3 -3
- package/esm2022/stepper/step-content.mjs +3 -3
- package/esm2022/stepper/step-header.mjs +3 -3
- package/esm2022/stepper/step-label.mjs +3 -3
- package/esm2022/stepper/stepper-button.mjs +6 -6
- package/esm2022/stepper/stepper-icon.mjs +3 -3
- package/esm2022/stepper/stepper-intl.mjs +3 -3
- package/esm2022/stepper/stepper-module.mjs +4 -4
- package/esm2022/stepper/stepper.mjs +6 -6
- package/esm2022/table/cell.mjs +21 -21
- package/esm2022/table/module.mjs +4 -4
- package/esm2022/table/row.mjs +21 -21
- package/esm2022/table/table.mjs +6 -6
- package/esm2022/table/text-column.mjs +3 -3
- package/esm2022/tabs/ink-bar.mjs +3 -3
- package/esm2022/tabs/module.mjs +4 -4
- package/esm2022/tabs/paginated-tab-header.mjs +3 -3
- package/esm2022/tabs/tab-body.mjs +6 -6
- package/esm2022/tabs/tab-content.mjs +3 -3
- package/esm2022/tabs/tab-group.mjs +3 -3
- package/esm2022/tabs/tab-header.mjs +3 -3
- package/esm2022/tabs/tab-label-wrapper.mjs +3 -3
- package/esm2022/tabs/tab-label.mjs +3 -3
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +9 -9
- package/esm2022/tabs/tab.mjs +3 -3
- package/esm2022/toolbar/toolbar-module.mjs +4 -4
- package/esm2022/toolbar/toolbar.mjs +6 -6
- package/esm2022/tooltip/module.mjs +4 -4
- package/esm2022/tooltip/tooltip.mjs +6 -6
- package/esm2022/tree/node.mjs +9 -9
- package/esm2022/tree/outlet.mjs +3 -3
- package/esm2022/tree/padding.mjs +3 -3
- package/esm2022/tree/toggle.mjs +3 -3
- package/esm2022/tree/tree-module.mjs +4 -4
- package/esm2022/tree/tree.mjs +3 -3
- package/expansion/_expansion-theme.scss +7 -0
- package/fesm2022/autocomplete.mjs +13 -13
- package/fesm2022/badge.mjs +10 -10
- package/fesm2022/bottom-sheet.mjs +10 -10
- package/fesm2022/button-toggle.mjs +10 -10
- package/fesm2022/button.mjs +34 -34
- package/fesm2022/card.mjs +46 -46
- package/fesm2022/checkbox.mjs +14 -14
- package/fesm2022/chips.mjs +40 -40
- package/fesm2022/core.mjs +59 -59
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +87 -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/expansion.mjs +25 -25
- package/fesm2022/form-field.mjs +36 -36
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +22 -22
- package/fesm2022/icon/testing.mjs +7 -7
- package/fesm2022/icon.mjs +10 -10
- package/fesm2022/input.mjs +7 -7
- package/fesm2022/list.mjs +49 -49
- package/fesm2022/menu.mjs +16 -16
- package/fesm2022/paginator.mjs +10 -10
- package/fesm2022/progress-bar.mjs +8 -8
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +7 -7
- package/fesm2022/radio.mjs +10 -10
- package/fesm2022/select.mjs +15 -10
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +22 -22
- package/fesm2022/slide-toggle.mjs +16 -16
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider.mjs +16 -16
- package/fesm2022/snack-bar.mjs +22 -22
- package/fesm2022/sort.mjs +13 -13
- package/fesm2022/stepper.mjs +31 -31
- package/fesm2022/table.mjs +55 -55
- package/fesm2022/tabs.mjs +43 -43
- package/fesm2022/toolbar.mjs +10 -10
- package/fesm2022/tooltip.mjs +10 -10
- package/fesm2022/tree.mjs +25 -25
- package/form-field/_form-field-theme.scss +15 -0
- package/form-field/index.d.ts +6 -0
- package/grid-list/_grid-list-theme.scss +7 -0
- package/icon/_icon-theme.scss +9 -0
- package/input/_input-theme.scss +8 -0
- package/list/_list-theme.scss +8 -0
- package/menu/_menu-theme.scss +7 -0
- package/package.json +3 -2
- package/paginator/_paginator-theme.scss +7 -0
- 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/progress-bar/_progress-bar-theme.scss +11 -0
- package/progress-spinner/_progress-spinner-theme.scss +11 -0
- package/radio/_radio-theme.scss +10 -0
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-add/theming/create-custom-theme.js +5 -6
- package/schematics/ng-add/theming/create-custom-theme.mjs +5 -6
- package/schematics/ng-generate/m3-theme/index_bundled.js +4 -4
- package/schematics/ng-generate/m3-theme/index_bundled.js.map +1 -1
- package/schematics/ng-update/index_bundled.js +240 -26
- package/schematics/ng-update/index_bundled.js.map +4 -4
- package/select/_select-theme.scss +9 -0
- package/select/index.d.ts +5 -0
- package/sidenav/_sidenav-theme.scss +7 -0
- package/slide-toggle/_slide-toggle-theme.scss +11 -0
- package/slider/_slider-theme.scss +10 -0
- package/snack-bar/_snack-bar-theme.scss +10 -0
- package/sort/_sort-theme.scss +7 -0
- package/stepper/_stepper-theme.scss +9 -0
- package/table/_table-theme.scss +7 -0
- package/tabs/_tabs-theme.scss +20 -0
- package/toolbar/_toolbar-theme.scss +9 -0
- package/tooltip/_tooltip-theme.scss +8 -0
- package/tree/_tree-theme.scss +7 -0
- /package/core/{theming → m2}/_palette.scss +0 -0
|
@@ -1,18 +1,20 @@
|
|
|
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
|
-
@use '../
|
|
9
|
-
@use '../
|
|
10
|
-
@use '../
|
|
10
|
+
@use '../m2/palette' as m2-palette;
|
|
11
|
+
@use '../m2/theming' as m2-theming;
|
|
12
|
+
@use '../m2/typography' as m2-typography;
|
|
11
13
|
|
|
12
14
|
// Indicates whether we're building internally. Used for backwards compatibility.
|
|
13
15
|
$private-is-internal-build: false;
|
|
14
16
|
|
|
15
|
-
$_placeholder-color-palette: theming.define-palette(palette.$red-palette);
|
|
17
|
+
$_placeholder-color-palette: m2-theming.define-palette(m2-palette.$red-palette);
|
|
16
18
|
|
|
17
19
|
// Placeholder color config that can be passed to token getter functions when generating token
|
|
18
20
|
// slots.
|
|
@@ -21,11 +23,11 @@ $placeholder-color-config: (
|
|
|
21
23
|
accent: $_placeholder-color-palette,
|
|
22
24
|
warn: $_placeholder-color-palette,
|
|
23
25
|
is-dark: false,
|
|
24
|
-
foreground: palette.$light-theme-foreground-palette,
|
|
25
|
-
background: palette.$light-theme-background-palette,
|
|
26
|
+
foreground: m2-palette.$light-theme-foreground-palette,
|
|
27
|
+
background: m2-palette.$light-theme-background-palette,
|
|
26
28
|
);
|
|
27
29
|
|
|
28
|
-
$_placeholder-typography-level-config: typography.typography-config-level-from-mdc(body1);
|
|
30
|
+
$_placeholder-typography-level-config: m2-typography.typography-config-level-from-mdc(body1);
|
|
29
31
|
|
|
30
32
|
// Placeholder typography config that can be passed to token getter functions when generating token
|
|
31
33
|
// slots.
|
|
@@ -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.
|
|
@@ -214,35 +227,149 @@ $_component-prefix: null;
|
|
|
214
227
|
@return if($emit-overrides-only, $overrides, map.merge($values, $overrides));
|
|
215
228
|
}
|
|
216
229
|
|
|
217
|
-
/// Emits new token values for the given
|
|
218
|
-
/// Verifies that the
|
|
230
|
+
/// Emits new token values for the given token overrides.
|
|
231
|
+
/// Verifies that the overrides passed in are valid tokens.
|
|
219
232
|
/// New token values are emitted under the current selector or root.
|
|
220
|
-
@mixin batch-create-token-values(
|
|
221
|
-
$
|
|
222
|
-
|
|
223
|
-
$
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
233
|
+
@mixin batch-create-token-values($overrides: (), $token-maps...) {
|
|
234
|
+
@include _validate-token-overrides($overrides, $token-maps);
|
|
235
|
+
|
|
236
|
+
@each $token-map in $token-maps {
|
|
237
|
+
$prefix: map.get($token-map, prefix);
|
|
238
|
+
$tokens: map.get($token-map, tokens);
|
|
239
|
+
|
|
240
|
+
@each $name, $value in $tokens {
|
|
241
|
+
$tokens: map.set($tokens, $name, map.get($overrides, $name));
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
@include sass-utils.current-selector-or-root() {
|
|
245
|
+
@include create-token-values($prefix, $tokens);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
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));
|
|
240
324
|
}
|
|
325
|
+
}
|
|
326
|
+
@return $result;
|
|
327
|
+
}
|
|
241
328
|
|
|
242
|
-
|
|
243
|
-
|
|
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);
|
|
244
354
|
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
@return $result;
|
|
358
|
+
}
|
|
245
359
|
|
|
360
|
+
/// Verifies that the token overrides exist and are used in one of the given token maps.
|
|
361
|
+
@mixin _validate-token-overrides($overrides: (), $token-maps) {
|
|
362
|
+
$valid-token-names: ();
|
|
363
|
+
|
|
364
|
+
@each $token-map in $token-maps {
|
|
365
|
+
@each $name, $value in map.get($token-map, tokens) {
|
|
366
|
+
@if ($value != null and list.index($valid-token-names, $name) == null) {
|
|
367
|
+
$valid-token-names: list.append($valid-token-names, $name);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
@each $name in map.keys($overrides) {
|
|
246
373
|
@if (list.index($valid-token-names, $name) == null) {
|
|
247
374
|
@error (
|
|
248
375
|
'Invalid token: "' + $name + '"'
|
|
@@ -250,22 +377,32 @@ $_component-prefix: null;
|
|
|
250
377
|
);
|
|
251
378
|
}
|
|
252
379
|
}
|
|
380
|
+
}
|
|
253
381
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
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
|
+
}
|
|
257
392
|
}
|
|
393
|
+
@return $result;
|
|
258
394
|
}
|
|
259
395
|
|
|
260
|
-
/// Returns the union of token names whose values are not null.
|
|
261
|
-
@function _get-valid-token-names($mat-tokens, $mdc-tokens) {
|
|
262
|
-
$mat-and-mdc-tokens: map.merge($mat-tokens, $mdc-tokens);
|
|
263
396
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
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);
|
|
267
405
|
}
|
|
268
406
|
}
|
|
269
|
-
|
|
270
|
-
@return map.keys($mat-and-mdc-tokens);
|
|
407
|
+
@return $result;
|
|
271
408
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
@use '../../token-utils';
|
|
3
3
|
@use '../../../theming/inspection';
|
|
4
4
|
@use '../../../style/sass-utils';
|
|
5
|
-
@use '../../../
|
|
5
|
+
@use '../../../m2/palette' as m2-palette;
|
|
6
6
|
|
|
7
7
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
8
8
|
$prefix: (mat, chip);
|
|
@@ -26,8 +26,8 @@ $prefix: (mat, chip);
|
|
|
26
26
|
$foreground: null;
|
|
27
27
|
@if $palette-name == null {
|
|
28
28
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
29
|
-
$grey-50: map.get(palette.$grey-palette, 50);
|
|
30
|
-
$grey-900: map.get(palette.$grey-palette, 900);
|
|
29
|
+
$grey-50: map.get(m2-palette.$grey-palette, 50);
|
|
30
|
+
$grey-900: map.get(m2-palette.$grey-palette, 900);
|
|
31
31
|
$foreground: if($is-dark, $grey-50, $grey-900);
|
|
32
32
|
}
|
|
33
33
|
@else {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
@use '../../../style/sass-utils';
|
|
7
7
|
@use '../../../theming/theming';
|
|
8
8
|
@use '../../../theming/inspection';
|
|
9
|
-
@use '../../../
|
|
9
|
+
@use '../../../m2/palette' as m2-palette;
|
|
10
10
|
|
|
11
11
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
12
12
|
$prefix: (mat, form-field);
|
|
@@ -34,10 +34,10 @@ $prefix: (mat, form-field);
|
|
|
34
34
|
// always on a white background inside the dropdown, causing them to blend in.
|
|
35
35
|
// Since we can't change background of the dropdown, we need to explicitly
|
|
36
36
|
// reset the color of the options to something dark.
|
|
37
|
-
select-option-text-color: if($is-dark, palette.$dark-primary-text, inherit),
|
|
37
|
+
select-option-text-color: if($is-dark, m2-palette.$dark-primary-text, inherit),
|
|
38
38
|
// Note the spelling of the `GrayText` here which is a system color. See:
|
|
39
39
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/system-color
|
|
40
|
-
select-disabled-option-text-color: if($is-dark, palette.$dark-disabled-text, GrayText),
|
|
40
|
+
select-disabled-option-text-color: if($is-dark, m2-palette.$dark-disabled-text, GrayText),
|
|
41
41
|
|
|
42
42
|
// These tokens are necessary for M3. MDC has them built in already, but:
|
|
43
43
|
// 1. They are too specific, breaking a lot of internal clients.
|
|
@@ -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
|
);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@use '../../../
|
|
2
|
+
@use '../../../m2/palette' as m2-palette;
|
|
3
|
+
@use '../../../m2/theming' as m2-theming;
|
|
3
4
|
@use '../../../theming/theming';
|
|
4
5
|
@use '../../../theming/inspection';
|
|
5
6
|
@use '../../../style/sass-utils';
|
|
@@ -51,7 +52,7 @@ $prefix: (mdc, checkbox);
|
|
|
51
52
|
$border-color: sass-utils.safe-color-change(
|
|
52
53
|
inspection.get-theme-color($theme, foreground, base), $alpha: 0.54);
|
|
53
54
|
$active-border-color:
|
|
54
|
-
theming.get-color-from-palette(palette.$gray-palette, if($is-dark, 200, 900));
|
|
55
|
+
m2-theming.get-color-from-palette(m2-palette.$gray-palette, if($is-dark, 200, 900));
|
|
55
56
|
$selected-checkmark-color: null;
|
|
56
57
|
|
|
57
58
|
// Ideally we would derive all values directly from the theme, but it causes a lot of regressions
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
@use '../../../style/sass-utils';
|
|
6
6
|
@use '../../../theming/theming';
|
|
7
7
|
@use '../../../theming/inspection';
|
|
8
|
-
@use '../../../
|
|
8
|
+
@use '../../../m2/palette' as m2-palette;
|
|
9
9
|
|
|
10
10
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
11
11
|
$prefix: (mdc, chip);
|
|
@@ -224,8 +224,8 @@ $prefix: (mdc, chip);
|
|
|
224
224
|
|
|
225
225
|
@if $palette-name == null {
|
|
226
226
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
227
|
-
$grey-50: map.get(palette.$grey-palette, 50);
|
|
228
|
-
$grey-900: map.get(palette.$grey-palette, 900);
|
|
227
|
+
$grey-50: map.get(m2-palette.$grey-palette, 50);
|
|
228
|
+
$grey-900: map.get(m2-palette.$grey-palette, 900);
|
|
229
229
|
$foreground: if($is-dark, $grey-50, $grey-900);
|
|
230
230
|
|
|
231
231
|
$surface: inspection.get-theme-color($theme, background, card);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@use '../../../
|
|
2
|
+
@use '../../../m2/palette' as m2-palette;
|
|
3
|
+
@use '../../../m2/theming' as m2-theming;
|
|
3
4
|
@use '../../../theming/theming';
|
|
4
5
|
@use '../../../theming/inspection';
|
|
5
6
|
@use '../../../style/sass-utils';
|
|
@@ -45,7 +46,7 @@ $prefix: (mdc, radio);
|
|
|
45
46
|
@function get-color-tokens($theme, $palette-name: accent) {
|
|
46
47
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
47
48
|
$palette-color: inspection.get-theme-color($theme, $palette-name, default);
|
|
48
|
-
$icon-color: theming.get-color-from-palette(palette.$gray-palette, if($is-dark, 200, 900));
|
|
49
|
+
$icon-color: m2-theming.get-color-from-palette(m2-palette.$gray-palette, if($is-dark, 200, 900));
|
|
49
50
|
|
|
50
51
|
@return (
|
|
51
52
|
disabled-selected-icon-color: inspection.get-theme-color($theme, foreground, icon, 1),
|
|
@@ -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
|
+
}
|