@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
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
@use 'sass:list';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use '../theming/theming';
|
|
4
|
+
|
|
5
|
+
/// Maps namespaced tokens to per-density-scale values.
|
|
6
|
+
/// This is used as a temporary solution for density, since Material Design currently does not have
|
|
7
|
+
/// systemized density.
|
|
8
|
+
/// Format:
|
|
9
|
+
/// (
|
|
10
|
+
/// (mdc, comp): (
|
|
11
|
+
/// token: (<scale 0 value>, <scale -1 value>, <scale -2 value>, ...),
|
|
12
|
+
/// ...
|
|
13
|
+
/// ),
|
|
14
|
+
/// ...
|
|
15
|
+
/// )
|
|
16
|
+
// TODO(mmalerba): Add density tokens for remaining components.
|
|
17
|
+
$_density-tokens: (
|
|
18
|
+
// MDC tokens
|
|
19
|
+
(mdc, checkbox): (
|
|
20
|
+
state-layer-size: (40px, 36px, 32px, 28px),
|
|
21
|
+
),
|
|
22
|
+
(mdc, chip): (
|
|
23
|
+
container-height: (32px, 28px, 24px),
|
|
24
|
+
),
|
|
25
|
+
(mdc, circular-progress): (),
|
|
26
|
+
(mdc, dialog): (),
|
|
27
|
+
(mdc, elevated-card): (),
|
|
28
|
+
(mdc, extended-fab): (),
|
|
29
|
+
(mdc, fab): (),
|
|
30
|
+
(mdc, fab-small): (),
|
|
31
|
+
(mdc, filled-text-field): (),
|
|
32
|
+
(mdc, text-button): (
|
|
33
|
+
container-height: (40px, 36px, 32px, 28px),
|
|
34
|
+
),
|
|
35
|
+
(mdc, protected-button): (
|
|
36
|
+
container-height: (40px, 36px, 32px, 28px),
|
|
37
|
+
),
|
|
38
|
+
(mdc, filled-button): (
|
|
39
|
+
container-height: (40px, 36px, 32px, 28px),
|
|
40
|
+
),
|
|
41
|
+
(mdc, outlined-button): (
|
|
42
|
+
container-height: (40px, 36px, 32px, 28px),
|
|
43
|
+
),
|
|
44
|
+
(mdc, icon-button): (
|
|
45
|
+
// The size caps out at 24px, because anything lower will be smaller than the icon.
|
|
46
|
+
state-layer-size: (40px, 36px, 32px, 28px, 24px, 24px),
|
|
47
|
+
),
|
|
48
|
+
(mdc, linear-progress): (),
|
|
49
|
+
(mdc, list): (
|
|
50
|
+
list-item-one-line-container-height: (48px, 44px, 40px, 36px, 32px, 24px),
|
|
51
|
+
list-item-two-line-container-height: (64px, 60px, 56px, 52px, 48px, 48px),
|
|
52
|
+
list-item-three-line-container-height: (88px, 84px, 80px, 76px, 72px, 56px),
|
|
53
|
+
),
|
|
54
|
+
(mdc, outlined-card): (),
|
|
55
|
+
(mdc, outlined-text-field): (),
|
|
56
|
+
(mdc, plain-tooltip): (),
|
|
57
|
+
(mdc, radio): (
|
|
58
|
+
state-layer-size: (40px, 36px, 32px, 28px),
|
|
59
|
+
),
|
|
60
|
+
(mdc, slider): (),
|
|
61
|
+
(mdc, snackbar): (),
|
|
62
|
+
(mdc, switch): (),
|
|
63
|
+
(mdc, tab): (
|
|
64
|
+
container-height: (48px, 44px, 40px, 36px, 32px)
|
|
65
|
+
),
|
|
66
|
+
(mdc, tab-indicator): (),
|
|
67
|
+
|
|
68
|
+
// Custom Angular Material tokens
|
|
69
|
+
(mat, autocomplete): (),
|
|
70
|
+
(mat, badge): (),
|
|
71
|
+
(mat, bottom-sheet): (),
|
|
72
|
+
(mat, card): (),
|
|
73
|
+
(mat, checkbox): (
|
|
74
|
+
touch-target-display: (block, block, none, none),
|
|
75
|
+
),
|
|
76
|
+
(mat, dialog): (),
|
|
77
|
+
(mat, datepicker): (),
|
|
78
|
+
(mat, divider): (),
|
|
79
|
+
(mat, expansion): (
|
|
80
|
+
header-collapsed-state-height: (48px, 44px, 40px, 36px),
|
|
81
|
+
header-expanded-state-height: (64px, 60px, 56px, 48px),
|
|
82
|
+
),
|
|
83
|
+
(mat, fab): (
|
|
84
|
+
touch-target-display: (block, block, none, none),
|
|
85
|
+
),
|
|
86
|
+
(mat, form-field): (
|
|
87
|
+
container-height: (56px, 52px, 48px, 44px, 40px, 36px),
|
|
88
|
+
filled-label-display: (block, block, none, none, none, none),
|
|
89
|
+
container-vertical-padding: (16px, 14px, 12px, 10px, 8px, 6px),
|
|
90
|
+
filled-with-label-container-padding-top: (24px, 22px, 12px, 10px, 8px, 6px),
|
|
91
|
+
filled-with-label-container-padding-bottom: (8px, 6px, 12px, 10px, 8px, 6px),
|
|
92
|
+
),
|
|
93
|
+
(mat, grid-list): (),
|
|
94
|
+
(mat, icon): (),
|
|
95
|
+
(mat, icon-button): (
|
|
96
|
+
touch-target-display: (block, block, none, none),
|
|
97
|
+
),
|
|
98
|
+
(mat, list): (
|
|
99
|
+
list-item-leading-icon-start-space: (16px, 12px, 8px, 4px),
|
|
100
|
+
list-item-leading-icon-end-space: (16px, 12px, 8px, 4px),
|
|
101
|
+
),
|
|
102
|
+
(mat, text-button): (
|
|
103
|
+
touch-target-display: (block, block, none, none),
|
|
104
|
+
),
|
|
105
|
+
(mat, protected-button): (
|
|
106
|
+
touch-target-display: (block, block, none, none),
|
|
107
|
+
),
|
|
108
|
+
(mat, filled-button): (
|
|
109
|
+
touch-target-display: (block, block, none, none),
|
|
110
|
+
),
|
|
111
|
+
(mat, outlined-button): (
|
|
112
|
+
touch-target-display: (block, block, none, none),
|
|
113
|
+
),
|
|
114
|
+
(mat, menu): (),
|
|
115
|
+
(mat, optgroup): (),
|
|
116
|
+
(mat, option): (),
|
|
117
|
+
(mat, full-pseudo-checkbox): (),
|
|
118
|
+
(mat, minimal-pseudo-checkbox): (),
|
|
119
|
+
(mat, paginator): (
|
|
120
|
+
container-size: (56px, 52px, 48px, 40px),
|
|
121
|
+
form-field-container-height: (40px, 40px, 40px, 40px, 40px, 36px),
|
|
122
|
+
form-field-container-vertical-padding: (8px, 8px, 8px, 8px, 8px, 6px),
|
|
123
|
+
),
|
|
124
|
+
(mat, radio): (
|
|
125
|
+
touch-target-display: (block, block, none, none),
|
|
126
|
+
),
|
|
127
|
+
(mat, ripple): (),
|
|
128
|
+
(mat, select): (
|
|
129
|
+
arrow-transform: (
|
|
130
|
+
translateY(-8px),
|
|
131
|
+
translateY(-8px),
|
|
132
|
+
none,
|
|
133
|
+
),
|
|
134
|
+
),
|
|
135
|
+
(mat, sidenav): (),
|
|
136
|
+
(mat, slide-toggle): (),
|
|
137
|
+
(mat, slider): (),
|
|
138
|
+
(mat, snack-bar): (),
|
|
139
|
+
(mat, sort): (),
|
|
140
|
+
(mat, standard-button-toggle): (
|
|
141
|
+
height: (40px, 40px, 40px, 36px, 24px),
|
|
142
|
+
),
|
|
143
|
+
(mat, stepper): (
|
|
144
|
+
header-height: (72px, 68px, 64px, 60px, 42px),
|
|
145
|
+
),
|
|
146
|
+
(mat, tab-header): (),
|
|
147
|
+
(mat, table): (
|
|
148
|
+
header-container-height: (56px, 52px, 48px, 44px, 40px),
|
|
149
|
+
footer-container-height: (52px, 48px, 44px, 40px, 36px),
|
|
150
|
+
row-item-container-height: (52px, 48px, 44px, 40px, 36px),
|
|
151
|
+
),
|
|
152
|
+
(mat, toolbar): (
|
|
153
|
+
standard-height: (64px, 60px, 56px, 52px),
|
|
154
|
+
mobile-height: (56px, 52px, 48px, 44px),
|
|
155
|
+
),
|
|
156
|
+
(mat, tree): (
|
|
157
|
+
node-min-height: (48px, 44px, 40px, 36px, 28px),
|
|
158
|
+
),
|
|
159
|
+
);
|
|
160
|
+
|
|
161
|
+
/// Gets the value for the given density scale from the given set of density values.
|
|
162
|
+
/// @param {List} $density-values The list of values for each density scale.
|
|
163
|
+
/// @param {Number} $scale The density scale to get the value for.
|
|
164
|
+
/// @return {*} The value for the given scale.
|
|
165
|
+
@function _get-value-for-scale($density-values, $scale) {
|
|
166
|
+
$scale: theming.clamp-density($scale, -1 * list.length($density-values) + 1);
|
|
167
|
+
$index: -$scale + 1;
|
|
168
|
+
@return list.nth($density-values, $index);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/// Gets a map of all density tokens for the given scale
|
|
172
|
+
/// @param {Number} $scale The density scale
|
|
173
|
+
/// @return {Map} Map of all fully qualified density tokens for the given scale.
|
|
174
|
+
@function get-tokens-for-scale($scale) {
|
|
175
|
+
$result: ();
|
|
176
|
+
@each $namespace, $tokens in $_density-tokens {
|
|
177
|
+
@each $token, $density-values in $tokens {
|
|
178
|
+
$tokens: map.set($tokens, $token, _get-value-for-scale($density-values, $scale));
|
|
179
|
+
}
|
|
180
|
+
$result: map.set($result, $namespace, $tokens);
|
|
181
|
+
}
|
|
182
|
+
@return $result;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/// Checks whether the given token is systemized by Angular Material's made up density system.
|
|
186
|
+
/// @param {List} $namespace The namespace of the token
|
|
187
|
+
/// @param {String} $token The name of the token
|
|
188
|
+
/// @return {Boolean} Whether the token is systemized by the density system
|
|
189
|
+
@function is-systemized($namespace, $token) {
|
|
190
|
+
@return map.get($_density-tokens, $namespace, $token) != null;
|
|
191
|
+
}
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '@material/tokens/v0_161' as mdc-tokens;
|
|
3
|
+
@use '../style/sass-utils';
|
|
4
|
+
@use '../m2' as m2-theming;
|
|
5
|
+
@use './m3';
|
|
6
|
+
@use '../tokens/m2' as m2-tokens;
|
|
7
|
+
@use './density';
|
|
8
|
+
@use './format-tokens';
|
|
9
|
+
|
|
10
|
+
/// Generates tokens for the given palette with the given prefix.
|
|
11
|
+
/// @param {Map} $palette The palette to generate tokens for
|
|
12
|
+
/// @param {String} $prefix The key prefix used to name the tokens
|
|
13
|
+
/// @return {Map} A set of tokens for the given palette
|
|
14
|
+
@function _generate-palette-tokens($palette, $prefix) {
|
|
15
|
+
$palette: map.remove($palette, neutral, neutral-variant);
|
|
16
|
+
$result: ();
|
|
17
|
+
@each $hue, $value in $palette {
|
|
18
|
+
$result: map.set($result, '#{$prefix}#{$hue}', $value);
|
|
19
|
+
}
|
|
20
|
+
@return $result;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/// Creates a set of `md-ref-palette` tokens from the given palettes. (See
|
|
24
|
+
/// https://github.com/material-components/material-components-web/blob/master/packages/mdc-tokens/v0_161/_md-ref-palette.scss)
|
|
25
|
+
/// @param {Map} $primary The primary palette
|
|
26
|
+
/// @param {Map} $secondary The secondary palette
|
|
27
|
+
/// @param {Map} $tertiary The tertiary palette
|
|
28
|
+
/// @param {Map} $error The error palette
|
|
29
|
+
/// @return {Map} A set of `md-ref-palette` tokens
|
|
30
|
+
@function _generate-ref-palette-tokens($primary, $tertiary, $error) {
|
|
31
|
+
@return sass-utils.merge-all(
|
|
32
|
+
(black: #000, white: #fff),
|
|
33
|
+
_generate-palette-tokens($primary, primary),
|
|
34
|
+
_generate-palette-tokens(map.get($primary, secondary), secondary),
|
|
35
|
+
_generate-palette-tokens($tertiary, tertiary),
|
|
36
|
+
_generate-palette-tokens(map.get($primary, neutral), neutral),
|
|
37
|
+
_generate-palette-tokens(map.get($primary, neutral-variant), neutral-variant),
|
|
38
|
+
_generate-palette-tokens($error, error),
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/// Creates a set of `md-ref-typeface` tokens from the given palettes. (See
|
|
43
|
+
/// https://github.com/material-components/material-components-web/blob/master/packages/mdc-tokens/v0_161/_md-ref-typeface.scss)
|
|
44
|
+
/// @param {List|String} $brand The font-family to use for brand text
|
|
45
|
+
/// @param {List|String} $plain The font-family to use for plain text
|
|
46
|
+
/// @param {String} $bold The font-weight to use for bold text
|
|
47
|
+
/// @param {String} $medium The font-weight to use for medium text
|
|
48
|
+
/// @param {String} $regular The font-weight to use for regular text
|
|
49
|
+
/// @return {Map} A set of `md-ref-typeface` tokens
|
|
50
|
+
@function _generate-ref-typeface-tokens($brand, $plain, $bold, $medium, $regular) {
|
|
51
|
+
@return (
|
|
52
|
+
brand: $brand,
|
|
53
|
+
plain: $plain,
|
|
54
|
+
weight-bold: $bold,
|
|
55
|
+
weight-medium: $medium,
|
|
56
|
+
weight-regular: $regular,
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/// Generates a set of namespaced tokens for all components.
|
|
61
|
+
/// @param {Map} $systems The MDC system tokens
|
|
62
|
+
/// @param {Boolean} $include-non-systemized Whether to include non-systemized tokens
|
|
63
|
+
/// @return {Map} A map of namespaced tokens
|
|
64
|
+
@function _generate-tokens($systems, $include-non-systemized: false) {
|
|
65
|
+
$systems: map.merge((
|
|
66
|
+
md-sys-color: (),
|
|
67
|
+
md-sys-elevation: (),
|
|
68
|
+
md-sys-motion: (),
|
|
69
|
+
md-sys-shape: (),
|
|
70
|
+
md-sys-state: (),
|
|
71
|
+
md-sys-typescale: ()
|
|
72
|
+
), $systems);
|
|
73
|
+
$exclude-hardcoded: not $include-non-systemized;
|
|
74
|
+
|
|
75
|
+
// DO NOT REMOVE
|
|
76
|
+
// This function is used internally.
|
|
77
|
+
$systems: format-tokens.private-format-tokens($systems);
|
|
78
|
+
|
|
79
|
+
// TODO(mmalerba): Refactor this to not depend on the legacy theme when moving out of
|
|
80
|
+
// material-experimental. This is a hack for now because there is no good way to get the token
|
|
81
|
+
// slots in material-experimental without exposing them all from material.
|
|
82
|
+
$fake-theme: m2-theming.define-light-theme((
|
|
83
|
+
color: (
|
|
84
|
+
primary: m2-theming.define-palette(m2-theming.$red-palette),
|
|
85
|
+
accent: m2-theming.define-palette(m2-theming.$red-palette),
|
|
86
|
+
warn: m2-theming.define-palette(m2-theming.$red-palette),
|
|
87
|
+
),
|
|
88
|
+
typography: m2-theming.define-typography-config(),
|
|
89
|
+
density: 0
|
|
90
|
+
));
|
|
91
|
+
$token-slots: m2-tokens.m2-tokens-from-theme($fake-theme);
|
|
92
|
+
|
|
93
|
+
// TODO(mmalerba): Fill in remaining tokens.
|
|
94
|
+
$result: sass-utils.deep-merge-all(
|
|
95
|
+
// Add the system color & typography tokens (so we can give users access via an API).
|
|
96
|
+
(
|
|
97
|
+
(mdc, theme): map.get($systems, md-sys-color),
|
|
98
|
+
(mdc, typography): map.get($systems, md-sys-typescale),
|
|
99
|
+
),
|
|
100
|
+
m3.get-m3-tokens($systems, $exclude-hardcoded, $token-slots),
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
// Strip out tokens that are systemized by our made up density system.
|
|
104
|
+
@each $namespace, $tokens in $result {
|
|
105
|
+
@each $token, $value in $tokens {
|
|
106
|
+
@if density.is-systemized($namespace, $token) {
|
|
107
|
+
$tokens: map.remove($tokens, $token);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
$result: map.set($result, $namespace, $tokens);
|
|
111
|
+
}
|
|
112
|
+
@return $result;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@mixin system-level-colors($theme, $overrides: ()) {
|
|
116
|
+
$palettes: map.get($theme, _mat-theming-internals-do-not-access, palettes);
|
|
117
|
+
$base-palettes: (
|
|
118
|
+
neutral: map.get($palettes, neutral),
|
|
119
|
+
neutral-variant: map.get($palettes, neutral-variant),
|
|
120
|
+
secondary: map.get($palettes, secondary),
|
|
121
|
+
error: map.get($palettes, error),
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
$type: map.get($theme, _mat-theming-internals-do-not-access, theme-type);
|
|
125
|
+
$primary: map.merge(map.get($palettes, primary), $base-palettes);
|
|
126
|
+
$tertiary: map.merge(map.get($palettes, tertiary), $base-palettes);
|
|
127
|
+
$error: map.get($palettes, error);
|
|
128
|
+
|
|
129
|
+
$ref: (
|
|
130
|
+
md-ref-palette: _generate-ref-palette-tokens($primary, $tertiary, $error)
|
|
131
|
+
);
|
|
132
|
+
|
|
133
|
+
$sys-colors: if($type == dark,
|
|
134
|
+
mdc-tokens.md-sys-color-values-dark($ref),
|
|
135
|
+
mdc-tokens.md-sys-color-values-light($ref));
|
|
136
|
+
|
|
137
|
+
@each $name, $value in $sys-colors {
|
|
138
|
+
--sys-#{$name}: #{map.get($overrides, $name) or $value};
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@mixin system-level-typography($theme, $overrides: ()) {
|
|
143
|
+
$font-definition: map.get($theme, _mat-theming-internals-do-not-access, font-definition);
|
|
144
|
+
$brand: map.get($font-definition, brand);
|
|
145
|
+
$plain: map.get($font-definition, plain);
|
|
146
|
+
$bold: map.get($font-definition, bold);
|
|
147
|
+
$medium: map.get($font-definition, medium);
|
|
148
|
+
$regular: map.get($font-definition, regular);
|
|
149
|
+
|
|
150
|
+
$ref: (
|
|
151
|
+
md-ref-typeface: _generate-ref-typeface-tokens($brand, $plain, $bold, $medium, $regular)
|
|
152
|
+
);
|
|
153
|
+
|
|
154
|
+
$sys-typescale: mdc-tokens.md-sys-typescale-values($ref);
|
|
155
|
+
|
|
156
|
+
@each $name, $value in $sys-typescale {
|
|
157
|
+
--sys-#{$name}: #{map.get($overrides, $name) or $value};
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
@function _get-sys-color($type, $ref) {
|
|
162
|
+
$mdc-sys-color: if($type == dark,
|
|
163
|
+
mdc-tokens.md-sys-color-values-dark($ref),
|
|
164
|
+
mdc-tokens.md-sys-color-values-light($ref));
|
|
165
|
+
|
|
166
|
+
@if (sass-utils.$use-system-color-variables) {
|
|
167
|
+
@return (
|
|
168
|
+
'background': var(--sys-background),
|
|
169
|
+
'error': var(--sys-error),
|
|
170
|
+
'error-container': var(--sys-error-container),
|
|
171
|
+
'inverse-on-surface': var(--sys-inverse-on-surface),
|
|
172
|
+
'inverse-primary': var(--sys-inverse-primary),
|
|
173
|
+
'inverse-surface': var(--sys-inverse-surface),
|
|
174
|
+
'on-background': var(--sys-on-background),
|
|
175
|
+
'on-error': var(--sys-on-error),
|
|
176
|
+
'on-error-container': var(--sys-on-error-container),
|
|
177
|
+
'on-primary': var(--sys-on-primary),
|
|
178
|
+
'on-primary-container': var(--sys-on-primary-container),
|
|
179
|
+
'on-primary-fixed': var(--sys-on-primary-fixed),
|
|
180
|
+
'on-primary-fixed-variant': var(--sys-on-primary-fixed-variant),
|
|
181
|
+
'on-secondary': var(--sys-on-secondary),
|
|
182
|
+
'on-secondary-container': var(--sys-on-secondary-container),
|
|
183
|
+
'on-secondary-fixed': var(--sys-on-secondary-fixed),
|
|
184
|
+
'on-secondary-fixed-variant': var(--sys-on-secondary-fixed-variant),
|
|
185
|
+
'on-surface': var(--sys-on-surface),
|
|
186
|
+
'on-surface-variant': var(--sys-on-surface-variant),
|
|
187
|
+
'on-tertiary': var(--sys-on-tertiary),
|
|
188
|
+
'on-tertiary-container': var(--sys-on-tertiary-container),
|
|
189
|
+
'on-tertiary-fixed': var(--sys-on-tertiary-fixed),
|
|
190
|
+
'on-tertiary-fixed-variant': var(--sys-on-tertiary-fixed-variant),
|
|
191
|
+
'outline': var(--sys-outline),
|
|
192
|
+
'outline-variant': var(--sys-outline-variant),
|
|
193
|
+
'primary': var(--sys-primary),
|
|
194
|
+
'primary-container': var(--sys-primary-container),
|
|
195
|
+
'primary-fixed': var(--sys-primary-fixed),
|
|
196
|
+
'primary-fixed-dim': var(--sys-primary-fixed-dim),
|
|
197
|
+
'scrim': var(--sys-scrim),
|
|
198
|
+
'secondary': var(--sys-secondary),
|
|
199
|
+
'secondary-container': var(--sys-secondary-container),
|
|
200
|
+
'secondary-fixed': var(--sys-secondary-fixed),
|
|
201
|
+
'secondary-fixed-dim': var(--sys-secondary-fixed-dim),
|
|
202
|
+
'shadow': map.get($mdc-sys-color, shadow),
|
|
203
|
+
'surface': var(--sys-surface),
|
|
204
|
+
'surface-bright': var(--sys-surface-bright),
|
|
205
|
+
'surface-container': var(--sys-surface-container),
|
|
206
|
+
'surface-container-high': var(--sys-surface-container-high),
|
|
207
|
+
'surface-container-highest': var(--sys-surface-container-highest),
|
|
208
|
+
'surface-container-low': var(--sys-surface-container-low),
|
|
209
|
+
'surface-container-lowest': var(--sys-surface-container-lowest),
|
|
210
|
+
'surface-dim': var(--sys-surface-dim),
|
|
211
|
+
'surface-tint': var(--sys-surface-tint),
|
|
212
|
+
'surface-variant': var(--sys-surface-variant),
|
|
213
|
+
'tertiary': var(--sys-tertiary),
|
|
214
|
+
'tertiary-container': var(--sys-tertiary-container),
|
|
215
|
+
'tertiary-fixed': var(--sys-tertiary-fixed),
|
|
216
|
+
'tertiary-fixed-dim': var(--sys-tertiary-fixed-dim),
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
@return $mdc-sys-color;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
@function _get-sys-typeface($ref) {
|
|
224
|
+
@if (sass-utils.$use-system-typography-variables) {
|
|
225
|
+
@return (
|
|
226
|
+
'body-large': var(--sys-body-large),
|
|
227
|
+
'body-large-font': var(--sys-body-large-font),
|
|
228
|
+
'body-large-line-height': var(--sys-body-large-line-height),
|
|
229
|
+
'body-large-size': var(--sys-body-large-size),
|
|
230
|
+
'body-large-tracking': var(--sys-body-large-tracking),
|
|
231
|
+
'body-large-weight': var(--sys-body-large-weight),
|
|
232
|
+
'body-medium': var(--sys-body-medium),
|
|
233
|
+
'body-medium-font': var(--sys-body-medium-font),
|
|
234
|
+
'body-medium-line-height': var(--sys-body-medium-line-height),
|
|
235
|
+
'body-medium-size': var(--sys-body-medium-size),
|
|
236
|
+
'body-medium-tracking': var(--sys-body-medium-tracking),
|
|
237
|
+
'body-medium-weight': var(--sys-body-medium-weight),
|
|
238
|
+
'body-small': var(--sys-body-small),
|
|
239
|
+
'body-small-font': var(--sys-body-small-font),
|
|
240
|
+
'body-small-line-height': var(--sys-body-small-line-height),
|
|
241
|
+
'body-small-size': var(--sys-body-small-size),
|
|
242
|
+
'body-small-tracking': var(--sys-body-small-tracking),
|
|
243
|
+
'body-small-weight': var(--sys-body-small-weight),
|
|
244
|
+
'display-large': var(--sys-display-large),
|
|
245
|
+
'display-large-font': var(--sys-display-large-font),
|
|
246
|
+
'display-large-line-height': var(--sys-display-large-line-height),
|
|
247
|
+
'display-large-size': var(--sys-display-large-size),
|
|
248
|
+
'display-large-tracking': var(--sys-display-large-tracking),
|
|
249
|
+
'display-large-weight': var(--sys-display-large-weight),
|
|
250
|
+
'display-medium': var(--sys-display-medium),
|
|
251
|
+
'display-medium-font': var(--sys-display-medium-font),
|
|
252
|
+
'display-medium-line-height': var(--sys-display-medium-line-height),
|
|
253
|
+
'display-medium-size': var(--sys-display-medium-size),
|
|
254
|
+
'display-medium-tracking': var(--sys-display-medium-tracking),
|
|
255
|
+
'display-medium-weight': var(--sys-display-medium-weight),
|
|
256
|
+
'display-small': var(--sys-display-small),
|
|
257
|
+
'display-small-font': var(--sys-display-small-font),
|
|
258
|
+
'display-small-line-height': var(--sys-display-small-line-height),
|
|
259
|
+
'display-small-size': var(--sys-display-small-size),
|
|
260
|
+
'display-small-tracking': var(--sys-display-small-tracking),
|
|
261
|
+
'display-small-weight': var(--sys-display-small-weight),
|
|
262
|
+
'headline-large': var(--sys-headline-large),
|
|
263
|
+
'headline-large-font': var(--sys-headline-large-font),
|
|
264
|
+
'headline-large-line-height': var(--sys-headline-large-line-height),
|
|
265
|
+
'headline-large-size': var(--sys-headline-large-size),
|
|
266
|
+
'headline-large-tracking': var(--sys-headline-large-tracking),
|
|
267
|
+
'headline-large-weight': var(--sys-headline-large-weight),
|
|
268
|
+
'headline-medium': var(--sys-headline-medium),
|
|
269
|
+
'headline-medium-font': var(--sys-headline-medium-font),
|
|
270
|
+
'headline-medium-line-height': var(--sys-headline-medium-line-height),
|
|
271
|
+
'headline-medium-size': var(--sys-headline-medium-size),
|
|
272
|
+
'headline-medium-tracking': var(--sys-headline-medium-tracking),
|
|
273
|
+
'headline-medium-weight': var(--sys-headline-medium-weight),
|
|
274
|
+
'headline-small': var(--sys-headline-small),
|
|
275
|
+
'headline-small-font': var(--sys-headline-small-font),
|
|
276
|
+
'headline-small-line-height': var(--sys-headline-small-line-height),
|
|
277
|
+
'headline-small-size': var(--sys-headline-small-size),
|
|
278
|
+
'headline-small-tracking': var(--sys-headline-small-tracking),
|
|
279
|
+
'headline-small-weight': var(--sys-headline-small-weight),
|
|
280
|
+
'label-large': var(--sys-label-large),
|
|
281
|
+
'label-large-font': var(--sys-label-large-font),
|
|
282
|
+
'label-large-line-height': var(--sys-label-large-line-height),
|
|
283
|
+
'label-large-size': var(--sys-label-large-size),
|
|
284
|
+
'label-large-tracking': var(--sys-label-large-tracking),
|
|
285
|
+
'label-large-weight': var(--sys-label-large-weight),
|
|
286
|
+
'label-large-weight-prominent': var(--sys-label-large-weight-prominent),
|
|
287
|
+
'label-medium': var(--sys-label-medium),
|
|
288
|
+
'label-medium-font': var(--sys-label-medium-font),
|
|
289
|
+
'label-medium-line-height': var(--sys-label-medium-line-height),
|
|
290
|
+
'label-medium-size': var(--sys-label-medium-size),
|
|
291
|
+
'label-medium-tracking': var(--sys-label-medium-tracking),
|
|
292
|
+
'label-medium-weight': var(--sys-label-medium-weight),
|
|
293
|
+
'label-medium-weight-prominent': var(--sys-label-medium-weight-prominent),
|
|
294
|
+
'label-small': var(--sys-label-small),
|
|
295
|
+
'label-small-font': var(--sys-label-small-font),
|
|
296
|
+
'label-small-line-height': var(--sys-label-small-line-height),
|
|
297
|
+
'label-small-size': var(--sys-label-small-size),
|
|
298
|
+
'label-small-tracking': var(--sys-label-small-tracking),
|
|
299
|
+
'label-small-weight': var(--sys-label-small-weight),
|
|
300
|
+
'title-large': var(--sys-title-large),
|
|
301
|
+
'title-large-font': var(--sys-title-large-font),
|
|
302
|
+
'title-large-line-height': var(--sys-title-large-line-height),
|
|
303
|
+
'title-large-size': var(--sys-title-large-size),
|
|
304
|
+
'title-large-tracking': var(--sys-title-large-tracking),
|
|
305
|
+
'title-large-weight': var(--sys-title-large-weight),
|
|
306
|
+
'title-medium': var(--sys-title-medium),
|
|
307
|
+
'title-medium-font': var(--sys-title-medium-font),
|
|
308
|
+
'title-medium-line-height': var(--sys-title-medium-line-height),
|
|
309
|
+
'title-medium-size': var(--sys-title-medium-size),
|
|
310
|
+
'title-medium-tracking': var(--sys-title-medium-tracking),
|
|
311
|
+
'title-medium-weight': var(--sys-title-medium-weight),
|
|
312
|
+
'title-small': var(--sys-title-small),
|
|
313
|
+
'title-small-font': var(--sys-title-small-font),
|
|
314
|
+
'title-small-line-height': var(--sys-title-small-line-height),
|
|
315
|
+
'title-small-size': var(--sys-title-small-size),
|
|
316
|
+
'title-small-tracking': var(--sys-title-small-tracking),
|
|
317
|
+
'title-small-weight': var(--sys-title-small-weight),
|
|
318
|
+
);
|
|
319
|
+
}
|
|
320
|
+
@return mdc-tokens.md-sys-typescale-values($ref);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/// Generates a set of namespaced color tokens for all components.
|
|
324
|
+
/// @param {String} $type The type of theme system (light or dark)
|
|
325
|
+
/// @param {Map} $primary The primary palette
|
|
326
|
+
/// @param {Map} $tertiary The tertiary palette
|
|
327
|
+
/// @param {Map} $error The error palette
|
|
328
|
+
/// @return {Map} A map of namespaced color tokens
|
|
329
|
+
@function generate-color-tokens($type, $primary, $tertiary, $error) {
|
|
330
|
+
$ref: (
|
|
331
|
+
md-ref-palette: _generate-ref-palette-tokens($primary, $tertiary, $error)
|
|
332
|
+
);
|
|
333
|
+
|
|
334
|
+
$sys-color: _get-sys-color($type, $ref);
|
|
335
|
+
|
|
336
|
+
@return _generate-tokens(map.merge($ref, (
|
|
337
|
+
md-sys-color: $sys-color,
|
|
338
|
+
// Because the elevation values are always combined with color values to create the box shadow,
|
|
339
|
+
// elevation needs to be part of the color dimension.
|
|
340
|
+
md-sys-elevation: mdc-tokens.md-sys-elevation-values(),
|
|
341
|
+
// Because the state values are sometimes combined with color values to create rgba colors,
|
|
342
|
+
// state needs to be part of color dimension.
|
|
343
|
+
// TODO(mmalerba): If at some point we remove the need for these combined values, we can move
|
|
344
|
+
// state to the base dimension.
|
|
345
|
+
md-sys-state: mdc-tokens.md-sys-state-values(),
|
|
346
|
+
)));
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/// Generates a set of namespaced color tokens for all components.
|
|
350
|
+
/// @param {String|List} $brand The brand font-family
|
|
351
|
+
/// @param {String|List} $plain The plain fort-family
|
|
352
|
+
/// @param {String|Number} $bold The bold font-weight
|
|
353
|
+
/// @param {String|Number} $medium The medium font-weight
|
|
354
|
+
/// @param {String|Number} $regular The regular font-weight
|
|
355
|
+
/// @return {Map} A map of namespaced typography tokens
|
|
356
|
+
@function generate-typography-tokens($brand, $plain, $bold, $medium, $regular) {
|
|
357
|
+
$ref: (
|
|
358
|
+
md-ref-typeface: _generate-ref-typeface-tokens($brand, $plain, $bold, $medium, $regular)
|
|
359
|
+
);
|
|
360
|
+
$sys-typeface: _get-sys-typeface($ref);
|
|
361
|
+
@return _generate-tokens((
|
|
362
|
+
md-sys-typescale: $sys-typeface
|
|
363
|
+
));
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/// Generates a set of namespaced density tokens for all components.
|
|
367
|
+
/// @param {String|Number} $scale The regular font-weight
|
|
368
|
+
/// @return {Map} A map of namespaced density tokens
|
|
369
|
+
@function generate-density-tokens($scale) {
|
|
370
|
+
@return density.get-tokens-for-scale($scale);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/// Generates a set of namespaced tokens not related to color, typography, or density for all
|
|
374
|
+
/// components.
|
|
375
|
+
/// @return {Map} A map of namespaced tokens not related to color, typography, or density
|
|
376
|
+
@function generate-base-tokens() {
|
|
377
|
+
// TODO(mmalerba): Exclude density tokens once implemented.
|
|
378
|
+
@return _generate-tokens((
|
|
379
|
+
md-sys-motion: mdc-tokens.md-sys-motion-values(),
|
|
380
|
+
md-sys-shape: mdc-tokens.md-sys-shape-values(),
|
|
381
|
+
), $include-non-systemized: true);
|
|
382
|
+
}
|