@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,79 @@
|
|
|
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, stepper);
|
|
7
|
+
|
|
8
|
+
/// Generates custom tokens for the mat-stepper.
|
|
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-stepper
|
|
13
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
14
|
+
$tokens: (
|
|
15
|
+
(
|
|
16
|
+
container-color: map.get($systems, md-sys-color, surface),
|
|
17
|
+
line-color: map.get($systems, md-sys-color, outline-variant),
|
|
18
|
+
header-hover-state-layer-color: sass-utils.safe-color-change(
|
|
19
|
+
map.get($systems, md-sys-color, inverse-surface),
|
|
20
|
+
$alpha: map.get($systems, md-sys-state, hover-state-layer-opacity)
|
|
21
|
+
),
|
|
22
|
+
header-focus-state-layer-color: sass-utils.safe-color-change(
|
|
23
|
+
map.get($systems, md-sys-color, inverse-surface),
|
|
24
|
+
$alpha: map.get($systems, md-sys-state, focus-state-layer-opacity)
|
|
25
|
+
),
|
|
26
|
+
header-label-text-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
27
|
+
header-optional-label-text-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
28
|
+
header-selected-state-label-text-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
29
|
+
header-icon-background-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
30
|
+
header-icon-foreground-color: map.get($systems, md-sys-color, surface),
|
|
31
|
+
header-edit-state-icon-background-color: map.get($systems, md-sys-color, primary),
|
|
32
|
+
header-edit-state-icon-foreground-color: map.get($systems, md-sys-color, on-primary),
|
|
33
|
+
header-error-state-label-text-color: map.get($systems, md-sys-color, error),
|
|
34
|
+
header-error-state-icon-foreground-color: map.get($systems, md-sys-color, error),
|
|
35
|
+
header-error-state-icon-background-color:
|
|
36
|
+
token-utils.hardcode(transparent, $exclude-hardcoded),
|
|
37
|
+
container-text-font: map.get($systems, md-sys-typescale, body-medium-font),
|
|
38
|
+
header-label-text-font: map.get($systems, md-sys-typescale, title-small-font),
|
|
39
|
+
header-label-text-size: map.get($systems, md-sys-typescale, title-small-size),
|
|
40
|
+
header-label-text-weight: map.get($systems, md-sys-typescale, title-small-weight),
|
|
41
|
+
header-error-state-label-text-size: map.get($systems, md-sys-typescale, title-small-size),
|
|
42
|
+
header-focus-state-layer-shape: map.get($systems, md-sys-shape, corner-medium),
|
|
43
|
+
header-hover-state-layer-shape: map.get($systems, md-sys-shape, corner-medium),
|
|
44
|
+
header-selected-state-label-text-size: map.get($systems, md-sys-typescale, title-small-size),
|
|
45
|
+
header-selected-state-label-text-weight: map.get(
|
|
46
|
+
$systems, md-sys-typescale, title-small-weight),
|
|
47
|
+
header-selected-state-icon-background-color: map.get($systems, md-sys-color, primary),
|
|
48
|
+
header-selected-state-icon-foreground-color: map.get($systems, md-sys-color, on-primary),
|
|
49
|
+
), (
|
|
50
|
+
// Color variants
|
|
51
|
+
primary: (
|
|
52
|
+
header-edit-state-icon-background-color: map.get($systems, md-sys-color, primary),
|
|
53
|
+
header-edit-state-icon-foreground-color: map.get($systems, md-sys-color, on-primary),
|
|
54
|
+
header-selected-state-icon-background-color: map.get($systems, md-sys-color, primary),
|
|
55
|
+
header-selected-state-icon-foreground-color: map.get($systems, md-sys-color, on-primary),
|
|
56
|
+
),
|
|
57
|
+
secondary: (
|
|
58
|
+
header-edit-state-icon-background-color: map.get($systems, md-sys-color, secondary),
|
|
59
|
+
header-edit-state-icon-foreground-color: map.get($systems, md-sys-color, on-secondary),
|
|
60
|
+
header-selected-state-icon-background-color: map.get($systems, md-sys-color, secondary),
|
|
61
|
+
header-selected-state-icon-foreground-color: map.get($systems, md-sys-color, on-secondary),
|
|
62
|
+
),
|
|
63
|
+
tertiary: (
|
|
64
|
+
header-edit-state-icon-background-color: map.get($systems, md-sys-color, tertiary),
|
|
65
|
+
header-edit-state-icon-foreground-color: map.get($systems, md-sys-color, on-tertiary),
|
|
66
|
+
header-selected-state-icon-background-color: map.get($systems, md-sys-color, tertiary),
|
|
67
|
+
header-selected-state-icon-foreground-color: map.get($systems, md-sys-color, on-tertiary),
|
|
68
|
+
),
|
|
69
|
+
error: (
|
|
70
|
+
header-edit-state-icon-background-color: map.get($systems, md-sys-color, error),
|
|
71
|
+
header-edit-state-icon-foreground-color: map.get($systems, md-sys-color, on-error),
|
|
72
|
+
header-selected-state-icon-background-color: map.get($systems, md-sys-color, error),
|
|
73
|
+
header-selected-state-icon-foreground-color: map.get($systems, md-sys-color, on-error),
|
|
74
|
+
)
|
|
75
|
+
)
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
79
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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, switch);
|
|
6
|
+
|
|
7
|
+
/// Generates custom tokens for the mat-slide-toggle.
|
|
8
|
+
/// @param {Map} $systems The MDC system tokens
|
|
9
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
10
|
+
/// @param {Map} $token-slots Possible token slots
|
|
11
|
+
/// @return {Map} A set of custom tokens for the mat-slide-toggle
|
|
12
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
13
|
+
$tokens: (
|
|
14
|
+
disabled-selected-handle-opacity: token-utils.hardcode(1, $exclude-hardcoded),
|
|
15
|
+
disabled-unselected-handle-opacity: token-utils.hardcode(0.38, $exclude-hardcoded),
|
|
16
|
+
unselected-handle-size: token-utils.hardcode(16px, $exclude-hardcoded),
|
|
17
|
+
selected-handle-size: token-utils.hardcode(24px, $exclude-hardcoded),
|
|
18
|
+
with-icon-handle-size: token-utils.hardcode(24px, $exclude-hardcoded),
|
|
19
|
+
pressed-handle-size: token-utils.hardcode(28px, $exclude-hardcoded),
|
|
20
|
+
selected-handle-horizontal-margin: token-utils.hardcode(0 24px, $exclude-hardcoded),
|
|
21
|
+
selected-with-icon-handle-horizontal-margin: token-utils.hardcode(0 24px, $exclude-hardcoded),
|
|
22
|
+
selected-pressed-handle-horizontal-margin: token-utils.hardcode(0 22px, $exclude-hardcoded),
|
|
23
|
+
unselected-handle-horizontal-margin: token-utils.hardcode(0 8px, $exclude-hardcoded),
|
|
24
|
+
unselected-with-icon-handle-horizontal-margin: token-utils.hardcode(0 4px, $exclude-hardcoded),
|
|
25
|
+
unselected-pressed-handle-horizontal-margin: token-utils.hardcode(0 2px, $exclude-hardcoded),
|
|
26
|
+
// The hidden and visible track represent whichever track is visible or
|
|
27
|
+
// hidden in the ui. This could be the .mdc-switch__track :before or
|
|
28
|
+
// :after depending on whether the switch is selected or unselected.
|
|
29
|
+
//
|
|
30
|
+
// The m2 slide-toggle uses transforms to hide & show the tracks while
|
|
31
|
+
// the m3 slide-toggle uses opacity.
|
|
32
|
+
visible-track-opacity: token-utils.hardcode(1, $exclude-hardcoded),
|
|
33
|
+
hidden-track-opacity: token-utils.hardcode(0, $exclude-hardcoded),
|
|
34
|
+
visible-track-transition: token-utils.hardcode(opacity 75ms, $exclude-hardcoded),
|
|
35
|
+
hidden-track-transition: token-utils.hardcode(opacity 75ms, $exclude-hardcoded),
|
|
36
|
+
track-outline-width: token-utils.hardcode(2px, $exclude-hardcoded),
|
|
37
|
+
track-outline-color: map.get($systems, md-sys-color, outline),
|
|
38
|
+
selected-track-outline-width: token-utils.hardcode(2px, $exclude-hardcoded),
|
|
39
|
+
selected-track-outline-color: token-utils.hardcode(transparent, $exclude-hardcoded),
|
|
40
|
+
disabled-unselected-track-outline-width: token-utils.hardcode(2px, $exclude-hardcoded),
|
|
41
|
+
disabled-unselected-track-outline-color: map.get($systems, md-sys-color, on-surface),
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
45
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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, tab-header);
|
|
7
|
+
|
|
8
|
+
/// Generates custom tokens for the mat-tab-header.
|
|
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-tab-header
|
|
13
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
14
|
+
$tokens: sass-utils.merge-all(
|
|
15
|
+
token-utils.generate-typography-tokens($systems, label-text, title-small),
|
|
16
|
+
(
|
|
17
|
+
divider-color: map.get($systems, md-sys-color, surface-variant),
|
|
18
|
+
divider-height: token-utils.hardcode(1px, $exclude-hardcoded),
|
|
19
|
+
disabled-ripple-color: null, // TODO(mmalerba): Figure out correct value.
|
|
20
|
+
pagination-icon-color: map.get($systems, md-sys-color, on-surface),
|
|
21
|
+
inactive-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
22
|
+
active-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
23
|
+
active-ripple-color: map.get($systems, md-sys-color, on-surface),
|
|
24
|
+
inactive-ripple-color: map.get($systems, md-sys-color, on-surface),
|
|
25
|
+
inactive-focus-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
26
|
+
inactive-hover-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
27
|
+
active-focus-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
28
|
+
active-hover-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
29
|
+
active-focus-indicator-color: map.get($systems, md-sys-color, primary),
|
|
30
|
+
active-hover-indicator-color: map.get($systems, md-sys-color, primary),
|
|
31
|
+
),
|
|
32
|
+
), (
|
|
33
|
+
// Color variants
|
|
34
|
+
primary: (), // Default, no overrides needed
|
|
35
|
+
secondary: (
|
|
36
|
+
active-focus-indicator-color: map.get($systems, md-sys-color, secondary),
|
|
37
|
+
active-hover-indicator-color: map.get($systems, md-sys-color, secondary),
|
|
38
|
+
),
|
|
39
|
+
tertiary: (
|
|
40
|
+
active-focus-indicator-color: map.get($systems, md-sys-color, tertiary),
|
|
41
|
+
active-hover-indicator-color: map.get($systems, md-sys-color, tertiary),
|
|
42
|
+
),
|
|
43
|
+
error: (
|
|
44
|
+
active-focus-indicator-color: map.get($systems, md-sys-color, error),
|
|
45
|
+
active-hover-indicator-color: map.get($systems, md-sys-color, error),
|
|
46
|
+
)
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
50
|
+
}
|
|
51
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
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, table);
|
|
7
|
+
|
|
8
|
+
/// Generates custom tokens for the mat-table.
|
|
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-table
|
|
13
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
14
|
+
$tokens: sass-utils.merge-all(
|
|
15
|
+
token-utils.generate-typography-tokens($systems, header-headline, title-small),
|
|
16
|
+
token-utils.generate-typography-tokens($systems, row-item-label-text, body-medium),
|
|
17
|
+
token-utils.generate-typography-tokens($systems, footer-supporting-text, body-medium),
|
|
18
|
+
(
|
|
19
|
+
row-item-outline-width: token-utils.hardcode(1px, $exclude-hardcoded),
|
|
20
|
+
background-color: map.get($systems, md-sys-color, surface),
|
|
21
|
+
header-headline-color: map.get($systems, md-sys-color, on-surface),
|
|
22
|
+
row-item-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
23
|
+
row-item-outline-color: map.get($systems, md-sys-color, outline-variant),
|
|
24
|
+
),
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
28
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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, text-button);
|
|
7
|
+
|
|
8
|
+
/// Generates custom tokens for the mat-button.
|
|
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-button
|
|
13
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
14
|
+
$tokens: ((
|
|
15
|
+
horizontal-padding: token-utils.hardcode(12px, $exclude-hardcoded),
|
|
16
|
+
with-icon-horizontal-padding: token-utils.hardcode(16px, $exclude-hardcoded),
|
|
17
|
+
icon-spacing: token-utils.hardcode(8px, $exclude-hardcoded),
|
|
18
|
+
icon-offset: token-utils.hardcode(-4px, $exclude-hardcoded),
|
|
19
|
+
state-layer-color: map.get($systems, md-sys-color, primary),
|
|
20
|
+
disabled-state-layer-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
21
|
+
ripple-color: sass-utils.safe-color-change(
|
|
22
|
+
map.get($systems, md-sys-color, primary),
|
|
23
|
+
$alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
|
|
24
|
+
),
|
|
25
|
+
hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
|
|
26
|
+
focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
|
|
27
|
+
pressed-state-layer-opacity: map.get($systems, md-sys-state, pressed-state-layer-opacity),
|
|
28
|
+
), (
|
|
29
|
+
// Color variants:
|
|
30
|
+
primary: (), // Default, no overrides needed.
|
|
31
|
+
secondary: (
|
|
32
|
+
state-layer-color: map.get($systems, md-sys-color, secondary),
|
|
33
|
+
ripple-color: sass-utils.safe-color-change(
|
|
34
|
+
map.get($systems, md-sys-color, secondary),
|
|
35
|
+
$alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
|
|
36
|
+
)
|
|
37
|
+
),
|
|
38
|
+
tertiary: (
|
|
39
|
+
state-layer-color: map.get($systems, md-sys-color, tertiary),
|
|
40
|
+
ripple-color: sass-utils.safe-color-change(
|
|
41
|
+
map.get($systems, md-sys-color, tertiary),
|
|
42
|
+
$alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
|
|
43
|
+
)
|
|
44
|
+
),
|
|
45
|
+
error: (
|
|
46
|
+
state-layer-color: map.get($systems, md-sys-color, error),
|
|
47
|
+
ripple-color: sass-utils.safe-color-change(
|
|
48
|
+
map.get($systems, md-sys-color, error),
|
|
49
|
+
$alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
|
|
50
|
+
)
|
|
51
|
+
)
|
|
52
|
+
));
|
|
53
|
+
|
|
54
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
55
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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, toolbar);
|
|
7
|
+
|
|
8
|
+
/// Generates custom tokens for the mat-toolbar.
|
|
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-toolbar
|
|
13
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
14
|
+
$tokens: sass-utils.merge-all(
|
|
15
|
+
token-utils.generate-typography-tokens($systems, title-text, title-large),
|
|
16
|
+
(
|
|
17
|
+
container-background-color: map.get($systems, md-sys-color, surface),
|
|
18
|
+
container-text-color: map.get($systems, md-sys-color, on-surface),
|
|
19
|
+
)
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
23
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
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, tree);
|
|
6
|
+
|
|
7
|
+
/// Generates custom tokens for the mat-tree.
|
|
8
|
+
/// @param {Map} $systems The MDC system tokens
|
|
9
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
10
|
+
/// @param {Map} $token-slots Possible token slots
|
|
11
|
+
/// @return {Map} A set of custom tokens for the mat-tree
|
|
12
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
13
|
+
$tokens: (
|
|
14
|
+
container-background-color: map.get($systems, md-sys-color, surface),
|
|
15
|
+
node-text-color: map.get($systems, md-sys-color, on-surface),
|
|
16
|
+
node-text-font: map.get($systems, md-sys-typescale, body-large-font),
|
|
17
|
+
node-text-size: map.get($systems, md-sys-typescale, body-large-size),
|
|
18
|
+
node-text-weight: map.get($systems, md-sys-typescale, body-large-weight),
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
22
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use 'sass:meta';
|
|
3
|
+
@use '../../token-utils';
|
|
4
|
+
|
|
5
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
+
$prefix: (mdc, checkbox);
|
|
7
|
+
|
|
8
|
+
/// Generates the tokens for MDC checkbox
|
|
9
|
+
/// @param {Map} $systems The MDC system tokens
|
|
10
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
11
|
+
/// @param {Map} $token-slots Possible token slots
|
|
12
|
+
/// @return {Map} A set of tokens for the MDC checkbox
|
|
13
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
14
|
+
$mdc-tokens: token-utils.get-mdc-tokens('checkbox', $systems, $exclude-hardcoded);
|
|
15
|
+
$variant-tokens: (
|
|
16
|
+
primary: (), // Default, no overrides needed
|
|
17
|
+
secondary: (
|
|
18
|
+
selected-container-color: map.get($systems, md-sys-color, secondary),
|
|
19
|
+
selected-focus-container-color: map.get($systems, md-sys-color, secondary),
|
|
20
|
+
selected-focus-icon-color: map.get($systems, md-sys-color, on-secondary),
|
|
21
|
+
selected-focus-state-layer-color: map.get($systems, md-sys-color, secondary),
|
|
22
|
+
selected-hover-container-color: map.get($systems, md-sys-color, secondary),
|
|
23
|
+
selected-hover-icon-color: map.get($systems, md-sys-color, on-secondary),
|
|
24
|
+
selected-hover-state-layer-color: map.get($systems, md-sys-color, secondary),
|
|
25
|
+
selected-icon-color: map.get($systems, md-sys-color, on-secondary),
|
|
26
|
+
selected-pressed-container-color: map.get($systems, md-sys-color, secondary),
|
|
27
|
+
selected-pressed-icon-color: map.get($systems, md-sys-color, on-secondary),
|
|
28
|
+
unselected-pressed-state-layer-color: map.get($systems, md-sys-color, secondary),
|
|
29
|
+
),
|
|
30
|
+
tertiary: (
|
|
31
|
+
selected-container-color: map.get($systems, md-sys-color, tertiary),
|
|
32
|
+
selected-focus-container-color: map.get($systems, md-sys-color, tertiary),
|
|
33
|
+
selected-focus-icon-color: map.get($systems, md-sys-color, on-tertiary),
|
|
34
|
+
selected-focus-state-layer-color: map.get($systems, md-sys-color, tertiary),
|
|
35
|
+
selected-hover-container-color: map.get($systems, md-sys-color, tertiary),
|
|
36
|
+
selected-hover-icon-color: map.get($systems, md-sys-color, on-tertiary),
|
|
37
|
+
selected-hover-state-layer-color: map.get($systems, md-sys-color, tertiary),
|
|
38
|
+
selected-icon-color: map.get($systems, md-sys-color, on-tertiary),
|
|
39
|
+
selected-pressed-container-color: map.get($systems, md-sys-color, tertiary),
|
|
40
|
+
selected-pressed-icon-color: map.get($systems, md-sys-color, on-tertiary),
|
|
41
|
+
unselected-pressed-state-layer-color: map.get($systems, md-sys-color, tertiary),
|
|
42
|
+
),
|
|
43
|
+
error: (
|
|
44
|
+
selected-container-color: map.get($systems, md-sys-color, error),
|
|
45
|
+
selected-focus-container-color: map.get($systems, md-sys-color, error),
|
|
46
|
+
selected-focus-icon-color: map.get($systems, md-sys-color, on-error),
|
|
47
|
+
selected-focus-state-layer-color: map.get($systems, md-sys-color, error),
|
|
48
|
+
selected-hover-container-color: map.get($systems, md-sys-color, error),
|
|
49
|
+
selected-hover-icon-color: map.get($systems, md-sys-color, on-error),
|
|
50
|
+
selected-hover-state-layer-color: map.get($systems, md-sys-color, error),
|
|
51
|
+
selected-icon-color: map.get($systems, md-sys-color, on-error),
|
|
52
|
+
selected-pressed-container-color: map.get($systems, md-sys-color, error),
|
|
53
|
+
selected-pressed-icon-color: map.get($systems, md-sys-color, on-error),
|
|
54
|
+
unselected-pressed-state-layer-color: map.get($systems, md-sys-color, error),
|
|
55
|
+
)
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
@return token-utils.namespace-tokens(
|
|
59
|
+
$prefix,
|
|
60
|
+
(
|
|
61
|
+
_fix-tokens($mdc-tokens),
|
|
62
|
+
token-utils.map-values($variant-tokens, meta.get-function(_fix-tokens))
|
|
63
|
+
),
|
|
64
|
+
$token-slots
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/// Renames the official checkbox tokens to match the names actually used in MDC's code (which are
|
|
69
|
+
/// different). This is a temporary workaround until MDC updates to use the correct names for the
|
|
70
|
+
/// tokens.
|
|
71
|
+
/// @param {Map} $tokens The map of checkbox tokens with the official tokens names
|
|
72
|
+
/// @param {Map} $all-tokens Map of all checkbox tokens, including hardcoded values.
|
|
73
|
+
/// This is necessary in order to do opacity lookups.
|
|
74
|
+
/// @return {Map} The given tokens, renamed to be compatible with MDC's token implementation.
|
|
75
|
+
@function _fix-tokens($tokens) {
|
|
76
|
+
// Need to get the hardcoded values, because they include opacities that are used for the disabled
|
|
77
|
+
// state.
|
|
78
|
+
$hardcoded-tokens: token-utils.get-mdc-tokens('checkbox', (), false);
|
|
79
|
+
|
|
80
|
+
$rename-keys: (
|
|
81
|
+
selected-icon-color: selected-checkmark-color,
|
|
82
|
+
selected-disabled-icon-color: disabled-selected-checkmark-color,
|
|
83
|
+
selected-container-color: selected-icon-color,
|
|
84
|
+
selected-hover-container-color: selected-hover-icon-color,
|
|
85
|
+
selected-disabled-container-color: disabled-selected-icon-color,
|
|
86
|
+
selected-disabled-container-opacity: disabled-selected-icon-opacity,
|
|
87
|
+
selected-focus-container-color: selected-focus-icon-color,
|
|
88
|
+
selected-pressed-container-color: selected-pressed-icon-color,
|
|
89
|
+
unselected-disabled-outline-color: disabled-unselected-icon-color,
|
|
90
|
+
unselected-disabled-container-opacity: disabled-unselected-icon-opacity,
|
|
91
|
+
unselected-focus-outline-color: unselected-focus-icon-color,
|
|
92
|
+
unselected-hover-outline-color: unselected-hover-icon-color,
|
|
93
|
+
unselected-outline-color: unselected-icon-color,
|
|
94
|
+
unselected-pressed-outline-color: unselected-pressed-icon-color
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
$remapped-tokens: token-utils.rename-map-keys($tokens, $rename-keys);
|
|
98
|
+
$remapped-hardcoded-tokens: token-utils.rename-map-keys($hardcoded-tokens, $rename-keys);
|
|
99
|
+
|
|
100
|
+
@return token-utils.combine-color-tokens($remapped-tokens, $remapped-hardcoded-tokens, (
|
|
101
|
+
(
|
|
102
|
+
color: disabled-selected-icon-color,
|
|
103
|
+
opacity: disabled-selected-icon-opacity,
|
|
104
|
+
),
|
|
105
|
+
(
|
|
106
|
+
color: disabled-unselected-icon-color,
|
|
107
|
+
opacity: disabled-unselected-icon-opacity,
|
|
108
|
+
),
|
|
109
|
+
));
|
|
110
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
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: (mdc, chip);
|
|
7
|
+
|
|
8
|
+
/// Generates the tokens for MDC chip
|
|
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 tokens for the MDC chip
|
|
13
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
14
|
+
// MDC has a chip component, but they seem to have made up the tokens rather than using ones
|
|
15
|
+
// generated from the token database, therefore we need a custom token function for it.
|
|
16
|
+
$tokens: sass-utils.merge-all(
|
|
17
|
+
token-utils.generate-typography-tokens($systems, label-text, label-large),
|
|
18
|
+
(
|
|
19
|
+
container-shape: token-utils.hardcode((
|
|
20
|
+
family: rounded,
|
|
21
|
+
radius: 8px,
|
|
22
|
+
), $exclude-hardcoded),
|
|
23
|
+
with-avatar-avatar-size: token-utils.hardcode(24px, $exclude-hardcoded),
|
|
24
|
+
label-text-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
25
|
+
disabled-label-text-color: sass-utils.safe-color-change(
|
|
26
|
+
map.get($systems, md-sys-color, on-surface),
|
|
27
|
+
$alpha: 0.38,
|
|
28
|
+
),
|
|
29
|
+
with-icon-icon-size: token-utils.hardcode(18px, $exclude-hardcoded),
|
|
30
|
+
with-icon-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
31
|
+
with-icon-disabled-icon-color: map.get($systems, md-sys-color, on-surface),
|
|
32
|
+
with-icon-selected-icon-color: map.get($systems, md-sys-color, on-secondary-container),
|
|
33
|
+
with-trailing-icon-trailing-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
34
|
+
with-trailing-icon-disabled-trailing-icon-color: map.get($systems, md-sys-color, on-surface),
|
|
35
|
+
focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
|
|
36
|
+
focus-state-layer-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
37
|
+
outline-width: token-utils.hardcode(1px, $exclude-hardcoded),
|
|
38
|
+
outline-color: map.get($systems, md-sys-color, outline),
|
|
39
|
+
disabled-outline-color: sass-utils.safe-color-change(
|
|
40
|
+
map.get($systems, md-sys-color, on-surface),
|
|
41
|
+
$alpha: 0.12,
|
|
42
|
+
),
|
|
43
|
+
focus-outline-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
44
|
+
hover-state-layer-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
45
|
+
hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
|
|
46
|
+
with-avatar-disabled-avatar-opacity: token-utils.hardcode(0.38, $exclude-hardcoded),
|
|
47
|
+
elevated-selected-container-color: map.get($systems, md-sys-color, secondary-container),
|
|
48
|
+
flat-selected-outline-width: token-utils.hardcode(0, $exclude-hardcoded),
|
|
49
|
+
selected-label-text-color: map.get($systems, md-sys-color, on-secondary-container),
|
|
50
|
+
flat-disabled-selected-container-color: sass-utils.safe-color-change(
|
|
51
|
+
map.get($systems, md-sys-color, on-surface),
|
|
52
|
+
$alpha: 0.12,
|
|
53
|
+
),
|
|
54
|
+
selected-hover-state-layer-color: map.get($systems, md-sys-color, on-secondary-container),
|
|
55
|
+
selected-hover-state-layer-opacity:
|
|
56
|
+
map.get($systems, md-sys-state, hover-state-layer-opacity),
|
|
57
|
+
selected-focus-state-layer-color: map.get($systems, md-sys-color, on-secondary-container),
|
|
58
|
+
selected-focus-state-layer-opacity:
|
|
59
|
+
map.get($systems, md-sys-state, focus-state-layer-opacity),
|
|
60
|
+
with-icon-disabled-icon-opacity: token-utils.hardcode(0.38, $exclude-hardcoded),
|
|
61
|
+
with-trailing-icon-disabled-trailing-icon-opacity:
|
|
62
|
+
token-utils.hardcode(0.38, $exclude-hardcoded),
|
|
63
|
+
),
|
|
64
|
+
), (
|
|
65
|
+
// Color variants:
|
|
66
|
+
primary: (
|
|
67
|
+
with-icon-selected-icon-color: map.get($systems, md-sys-color, on-primary-container),
|
|
68
|
+
elevated-selected-container-color: map.get($systems, md-sys-color, primary-container),
|
|
69
|
+
selected-label-text-color: map.get($systems, md-sys-color, on-primary-container),
|
|
70
|
+
selected-hover-state-layer-color: map.get($systems, md-sys-color, on-primary-container),
|
|
71
|
+
selected-focus-state-layer-color: map.get($systems, md-sys-color, on-primary-container),
|
|
72
|
+
),
|
|
73
|
+
secondary: (), // Default, no overrides needed.
|
|
74
|
+
tertiary: (
|
|
75
|
+
with-icon-selected-icon-color: map.get($systems, md-sys-color, on-tertiary-container),
|
|
76
|
+
elevated-selected-container-color: map.get($systems, md-sys-color, tertiary-container),
|
|
77
|
+
selected-label-text-color: map.get($systems, md-sys-color, on-tertiary-container),
|
|
78
|
+
selected-hover-state-layer-color: map.get($systems, md-sys-color, on-tertiary-container),
|
|
79
|
+
selected-focus-state-layer-color: map.get($systems, md-sys-color, on-tertiary-container),
|
|
80
|
+
),
|
|
81
|
+
error: (
|
|
82
|
+
with-icon-selected-icon-color: map.get($systems, md-sys-color, on-error-container),
|
|
83
|
+
elevated-selected-container-color: map.get($systems, md-sys-color, error-container),
|
|
84
|
+
selected-label-text-color: map.get($systems, md-sys-color, on-error-container),
|
|
85
|
+
selected-hover-state-layer-color: map.get($systems, md-sys-color, on-error-container),
|
|
86
|
+
selected-focus-state-layer-color: map.get($systems, md-sys-color, on-error-container),
|
|
87
|
+
)
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
91
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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: (mdc, circular-progress);
|
|
6
|
+
|
|
7
|
+
/// Generates the tokens for MDC circular-progress
|
|
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 tokens for the MDC circular-progress
|
|
12
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
13
|
+
$mdc-tokens:
|
|
14
|
+
token-utils.get-mdc-tokens('circular-progress-indicator', $systems, $exclude-hardcoded);
|
|
15
|
+
$variant-tokens: (
|
|
16
|
+
primary: (), // Default, no overrides needed
|
|
17
|
+
secondary: (
|
|
18
|
+
active-indicator-color: map.get($systems, md-sys-color, secondary),
|
|
19
|
+
),
|
|
20
|
+
tertiary: (
|
|
21
|
+
active-indicator-color: map.get($systems, md-sys-color, tertiary),
|
|
22
|
+
),
|
|
23
|
+
error: (
|
|
24
|
+
active-indicator-color: map.get($systems, md-sys-color, error),
|
|
25
|
+
)
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
@return token-utils.namespace-tokens($prefix, ($mdc-tokens, $variant-tokens), $token-slots);
|
|
29
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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: (mdc, dialog);
|
|
6
|
+
|
|
7
|
+
/// Generates the tokens for MDC dialog
|
|
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 tokens for the MDC dialog
|
|
12
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
13
|
+
$tokens: token-utils.get-mdc-tokens('dialog', $systems, $exclude-hardcoded);
|
|
14
|
+
$tokens: token-utils.rename-map-keys($tokens, (
|
|
15
|
+
headline-color: subhead-color,
|
|
16
|
+
headline-font: subhead-font,
|
|
17
|
+
headline-line-height: subhead-line-height,
|
|
18
|
+
headline-size: subhead-size,
|
|
19
|
+
headline-tracking: subhead-tracking,
|
|
20
|
+
headline-weight: subhead-weight,
|
|
21
|
+
));
|
|
22
|
+
|
|
23
|
+
@if map.get($tokens, container-elevation) != null {
|
|
24
|
+
$tokens: map.merge($tokens, (
|
|
25
|
+
// The spec has the dialog at an elevation of 3 which is consistent with the current
|
|
26
|
+
// version of the tokens (0_161), however both the designs and MDC's implementation
|
|
27
|
+
// have the elevation set to 0. Set it manually to 0 here since the value in the
|
|
28
|
+
// exported tokens is likely outdated.
|
|
29
|
+
container-elevation: 0,
|
|
30
|
+
|
|
31
|
+
// This color needs to be supplied for MDC to produce the shadow. Technically we don't
|
|
32
|
+
// have to provide it since the elevation is set to 0 above, but we do it in case
|
|
33
|
+
// the value changes in the future.
|
|
34
|
+
container-shadow-color: #000,
|
|
35
|
+
));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
39
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@use '../../token-utils';
|
|
2
|
+
|
|
3
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
4
|
+
$prefix: (mdc, elevated-card);
|
|
5
|
+
|
|
6
|
+
/// Generates the tokens for MDC elevated-card
|
|
7
|
+
/// @param {Map} $systems The MDC system tokens
|
|
8
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
9
|
+
/// @param {Map} $token-slots Possible token slots
|
|
10
|
+
/// @return {Map} A set of tokens for the MDC elevated-card
|
|
11
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
12
|
+
$mdc-tokens: token-utils.get-mdc-tokens('elevated-card', $systems, $exclude-hardcoded);
|
|
13
|
+
|
|
14
|
+
@return token-utils.namespace-tokens($prefix, $mdc-tokens, $token-slots);
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@use '../../token-utils';
|
|
2
|
+
|
|
3
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
4
|
+
$prefix: (mdc, extended-fab);
|
|
5
|
+
|
|
6
|
+
/// Generates the tokens for MDC extended-fab
|
|
7
|
+
/// @param {Map} $systems The MDC system tokens
|
|
8
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
9
|
+
/// @param {Map} $token-slots Possible token slots
|
|
10
|
+
/// @return {Map} A set of tokens for the MDC extended-fab
|
|
11
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
12
|
+
$mdc-tokens: token-utils.get-mdc-tokens('extended-fab-primary', $systems, $exclude-hardcoded);
|
|
13
|
+
$variant-tokens: (
|
|
14
|
+
// Color variants
|
|
15
|
+
primary: (), // Default, no overrides needed.
|
|
16
|
+
secondary: token-utils.get-mdc-tokens('extended-fab-secondary', $systems, $exclude-hardcoded),
|
|
17
|
+
tertiary: token-utils.get-mdc-tokens('extended-fab-tertiary', $systems, $exclude-hardcoded)
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
@return token-utils.namespace-tokens($prefix, ($mdc-tokens, $variant-tokens), $token-slots);
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@use '../../token-utils';
|
|
2
|
+
|
|
3
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
4
|
+
$prefix: (mdc, fab-small);
|
|
5
|
+
|
|
6
|
+
/// Generates the tokens for MDC fab-small
|
|
7
|
+
/// @param {Map} $systems The MDC system tokens
|
|
8
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
9
|
+
/// @param {Map} $token-slots Possible token slots
|
|
10
|
+
/// @return {Map} A set of tokens for the MDC fab-small
|
|
11
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
12
|
+
$mdc-tokens: token-utils.get-mdc-tokens('fab-primary-small', $systems, $exclude-hardcoded);
|
|
13
|
+
$variant-tokens: (
|
|
14
|
+
// Color variants
|
|
15
|
+
primary: (), // Default, no overrides needed.
|
|
16
|
+
secondary: token-utils.get-mdc-tokens('fab-secondary-small', $systems, $exclude-hardcoded),
|
|
17
|
+
tertiary: token-utils.get-mdc-tokens('fab-tertiary-small', $systems, $exclude-hardcoded)
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
@return token-utils.namespace-tokens($prefix, ($mdc-tokens, $variant-tokens), $token-slots);
|
|
21
|
+
}
|