@ng-matero/extensions 18.4.1 → 19.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_index.scss +3 -1
- package/alert/_alert-theme.scss +19 -8
- package/alert/alert.d.ts +1 -2
- package/button/button-loading.d.ts +1 -2
- package/checkbox-group/checkbox-group.d.ts +12 -4
- package/colorpicker/_colorpicker-theme.scss +19 -8
- package/colorpicker/colorpicker-input.d.ts +1 -3
- package/colorpicker/colorpicker-toggle.d.ts +3 -3
- package/colorpicker/colorpicker.d.ts +4 -7
- package/column-resize/column-resize-directives/column-resize-flex.d.ts +2 -1
- package/column-resize/column-resize-directives/column-resize.d.ts +2 -1
- package/column-resize/column-resize-notifier.d.ts +0 -1
- package/column-resize/column-resize.d.ts +1 -1
- package/column-resize/event-dispatcher.d.ts +0 -9
- package/column-resize/overlay-handle.d.ts +1 -1
- package/column-resize/resizable.d.ts +1 -1
- package/column-resize/resize-strategy.d.ts +4 -4
- package/core/datetime/datetime-adapter.d.ts +1 -2
- package/core/datetime/native-datetime-adapter.d.ts +3 -3
- package/core/style/_button-common.scss +18 -0
- package/core/theming/_config-validation.scss +4 -4
- package/core/theming/_definition.scss +12 -2
- package/core/theming/prebuilt/azure-blue.scss +10 -22
- package/core/theming/prebuilt/cyan-orange.scss +10 -22
- package/core/theming/prebuilt/magenta-violet.scss +10 -22
- package/core/theming/prebuilt/rose-red.scss +10 -22
- package/core/tokens/_m3-system.scss +273 -0
- package/core/tokens/_m3-tokens.scss +8 -151
- package/core/tokens/_token-utils.scss +102 -43
- package/core/tokens/m2/_index.scss +2 -0
- package/core/tokens/m3/definitions/_index.scss +1 -0
- package/core/tokens/m3/definitions/_md-comp-plain-tooltip.scss +51 -0
- package/core/tokens/m3/index.scss +2 -0
- package/core/tokens/m3/mdc/_plain-tooltip.scss +15 -0
- package/core/tokens/m3/mtx/_alert.scss +14 -14
- package/core/tokens/m3/mtx/_colorpicker.scss +2 -2
- package/core/tokens/m3/mtx/_datetimepicker.scss +2 -2
- package/core/tokens/m3/mtx/_drawer.scss +2 -2
- package/core/tokens/m3/mtx/_grid.scss +2 -2
- package/core/tokens/m3/mtx/_loader.scss +2 -2
- package/core/tokens/m3/mtx/_popover.scss +2 -2
- package/core/tokens/m3/mtx/_progress.scss +2 -2
- package/core/tokens/m3/mtx/_select.scss +2 -2
- package/core/tokens/m3/mtx/_split.scss +2 -2
- package/datetimepicker/_datetimepicker-theme.scss +23 -10
- package/datetimepicker/calendar-body.d.ts +26 -4
- package/datetimepicker/calendar-body.scss +58 -9
- package/datetimepicker/calendar.d.ts +31 -31
- package/datetimepicker/clock.d.ts +11 -5
- package/datetimepicker/datetimepicker-actions.d.ts +9 -5
- package/datetimepicker/datetimepicker-content.scss +15 -0
- package/datetimepicker/datetimepicker-input.d.ts +4 -5
- package/datetimepicker/datetimepicker-module.d.ts +2 -2
- package/datetimepicker/datetimepicker-toggle.d.ts +4 -3
- package/datetimepicker/datetimepicker.d.ts +12 -8
- package/datetimepicker/month-view.d.ts +22 -7
- package/datetimepicker/multi-year-view.d.ts +20 -20
- package/datetimepicker/public-api.d.ts +2 -2
- package/datetimepicker/{time.d.ts → time-view.d.ts} +21 -9
- package/datetimepicker/{time.scss → time-view.scss} +1 -1
- package/datetimepicker/year-view.d.ts +21 -11
- package/dialog/dialog-container.d.ts +1 -2
- package/dialog/dialog.d.ts +0 -1
- package/drawer/_drawer-theme.scss +19 -8
- package/drawer/drawer-container.d.ts +2 -5
- package/drawer/drawer.d.ts +3 -5
- package/fesm2022/mtxAlert.mjs +15 -15
- package/fesm2022/mtxAlert.mjs.map +1 -1
- package/fesm2022/mtxButton.mjs +13 -14
- package/fesm2022/mtxButton.mjs.map +1 -1
- package/fesm2022/mtxCheckboxGroup.mjs +51 -31
- package/fesm2022/mtxCheckboxGroup.mjs.map +1 -1
- package/fesm2022/mtxColorpicker.mjs +91 -109
- package/fesm2022/mtxColorpicker.mjs.map +1 -1
- package/fesm2022/mtxColumnResize.mjs +79 -96
- package/fesm2022/mtxColumnResize.mjs.map +1 -1
- package/fesm2022/mtxCore.mjs +31 -36
- package/fesm2022/mtxCore.mjs.map +1 -1
- package/fesm2022/mtxDatetimepicker.mjs +1181 -1093
- package/fesm2022/mtxDatetimepicker.mjs.map +1 -1
- package/fesm2022/mtxDialog.mjs +30 -41
- package/fesm2022/mtxDialog.mjs.map +1 -1
- package/fesm2022/mtxDrawer.mjs +36 -52
- package/fesm2022/mtxDrawer.mjs.map +1 -1
- package/fesm2022/mtxGrid.mjs +168 -204
- package/fesm2022/mtxGrid.mjs.map +1 -1
- package/fesm2022/mtxLoader.mjs +12 -12
- package/fesm2022/mtxLoader.mjs.map +1 -1
- package/fesm2022/mtxPhotoviewer.mjs +11 -12
- package/fesm2022/mtxPhotoviewer.mjs.map +1 -1
- package/fesm2022/mtxPopover.mjs +106 -119
- package/fesm2022/mtxPopover.mjs.map +1 -1
- package/fesm2022/mtxProgress.mjs +8 -8
- package/fesm2022/mtxProgress.mjs.map +1 -1
- package/fesm2022/mtxSelect.mjs +157 -169
- package/fesm2022/mtxSelect.mjs.map +1 -1
- package/fesm2022/mtxSplit.mjs +39 -40
- package/fesm2022/mtxSplit.mjs.map +1 -1
- package/fesm2022/mtxTooltip.mjs +105 -91
- package/fesm2022/mtxTooltip.mjs.map +1 -1
- package/grid/_grid-theme.scss +23 -10
- package/grid/cell.d.ts +1 -4
- package/grid/column-resize/column-resize-directives/column-resize-flex.d.ts +0 -1
- package/grid/column-resize/column-resize-directives/column-resize.d.ts +0 -1
- package/grid/column-resize/overlay-handle.d.ts +1 -2
- package/grid/column-resize/resizable-directives/resizable.d.ts +2 -3
- package/grid/column-resize/resize-strategy.d.ts +2 -4
- package/grid/grid-pipes.d.ts +0 -2
- package/grid/grid.d.ts +5 -5
- package/grid/grid.scss +5 -6
- package/loader/_loader-theme.scss +19 -8
- package/loader/loader.d.ts +0 -2
- package/package.json +11 -47
- package/photoviewer/photoviewer.d.ts +1 -2
- package/popover/_popover-theme.scss +19 -8
- package/popover/popover-content.d.ts +1 -1
- package/popover/popover-target.d.ts +1 -2
- package/popover/popover-trigger.d.ts +5 -6
- package/popover/popover.d.ts +1 -2
- package/prebuilt-themes/azure-blue.css +1 -1
- package/prebuilt-themes/cyan-orange.css +1 -1
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/magenta-violet.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/prebuilt-themes/rose-red.css +1 -1
- package/progress/_progress-theme.scss +23 -10
- package/select/_select-theme.scss +23 -10
- package/select/option.d.ts +0 -1
- package/select/select-intl.d.ts +2 -4
- package/select/select.d.ts +8 -7
- package/select/select.scss +3 -3
- package/select/templates.d.ts +0 -12
- package/split/_split-theme.scss +19 -8
- package/split/split-pane.d.ts +3 -4
- package/split/split.d.ts +4 -4
- package/split/split.scss +1 -1
- package/tooltip/_tooltip-theme.scss +11 -4
- package/tooltip/tooltip.d.ts +17 -9
- package/tooltip/tooltip.scss +8 -3
- package/esm2022/alert/alert-module.mjs +0 -17
- package/esm2022/alert/alert.mjs +0 -46
- package/esm2022/alert/mtxAlert.mjs +0 -5
- package/esm2022/alert/public-api.mjs +0 -3
- package/esm2022/button/button-loading.mjs +0 -66
- package/esm2022/button/button-module.mjs +0 -19
- package/esm2022/button/mtxButton.mjs +0 -5
- package/esm2022/button/public-api.mjs +0 -3
- package/esm2022/checkbox-group/checkbox-group-module.mjs +0 -20
- package/esm2022/checkbox-group/checkbox-group.mjs +0 -222
- package/esm2022/checkbox-group/interfaces.mjs +0 -2
- package/esm2022/checkbox-group/mtxCheckboxGroup.mjs +0 -5
- package/esm2022/checkbox-group/public-api.mjs +0 -4
- package/esm2022/colorpicker/colorpicker-animations.mjs +0 -16
- package/esm2022/colorpicker/colorpicker-input.mjs +0 -228
- package/esm2022/colorpicker/colorpicker-module.mjs +0 -64
- package/esm2022/colorpicker/colorpicker-toggle.mjs +0 -102
- package/esm2022/colorpicker/colorpicker.mjs +0 -363
- package/esm2022/colorpicker/mtxColorpicker.mjs +0 -5
- package/esm2022/colorpicker/public-api.mjs +0 -6
- package/esm2022/column-resize/column-resize-directives/column-resize-flex.mjs +0 -40
- package/esm2022/column-resize/column-resize-directives/column-resize.mjs +0 -40
- package/esm2022/column-resize/column-resize-directives/constants.mjs +0 -21
- package/esm2022/column-resize/column-resize-module.mjs +0 -28
- package/esm2022/column-resize/column-resize-notifier.mjs +0 -52
- package/esm2022/column-resize/column-resize.mjs +0 -82
- package/esm2022/column-resize/column-size-store.mjs +0 -20
- package/esm2022/column-resize/event-dispatcher.mjs +0 -70
- package/esm2022/column-resize/mtxColumnResize.mjs +0 -5
- package/esm2022/column-resize/overlay-handle.mjs +0 -146
- package/esm2022/column-resize/polyfill.mjs +0 -19
- package/esm2022/column-resize/public-api.mjs +0 -13
- package/esm2022/column-resize/resizable.mjs +0 -199
- package/esm2022/column-resize/resize-ref.mjs +0 -17
- package/esm2022/column-resize/resize-strategy.mjs +0 -238
- package/esm2022/column-resize/selectors.mjs +0 -13
- package/esm2022/core/datetime/datetime-adapter.mjs +0 -132
- package/esm2022/core/datetime/datetime-formats.mjs +0 -3
- package/esm2022/core/datetime/datetime.module.mjs +0 -38
- package/esm2022/core/datetime/index.mjs +0 -6
- package/esm2022/core/datetime/native-datetime-adapter.mjs +0 -138
- package/esm2022/core/datetime/native-datetime-formats.mjs +0 -20
- package/esm2022/core/mtxCore.mjs +0 -5
- package/esm2022/core/pipes/index.mjs +0 -4
- package/esm2022/core/pipes/is-template-ref.pipe.mjs +0 -14
- package/esm2022/core/pipes/pipes.module.mjs +0 -18
- package/esm2022/core/pipes/to-observable.pipe.mjs +0 -15
- package/esm2022/core/public-api.mjs +0 -3
- package/esm2022/datetimepicker/calendar-body.mjs +0 -77
- package/esm2022/datetimepicker/calendar.mjs +0 -661
- package/esm2022/datetimepicker/clock.mjs +0 -362
- package/esm2022/datetimepicker/datetimepicker-actions.mjs +0 -88
- package/esm2022/datetimepicker/datetimepicker-animations.mjs +0 -44
- package/esm2022/datetimepicker/datetimepicker-errors.mjs +0 -8
- package/esm2022/datetimepicker/datetimepicker-filtertype.mjs +0 -7
- package/esm2022/datetimepicker/datetimepicker-input.mjs +0 -349
- package/esm2022/datetimepicker/datetimepicker-intl.mjs +0 -63
- package/esm2022/datetimepicker/datetimepicker-module.mjs +0 -116
- package/esm2022/datetimepicker/datetimepicker-toggle.mjs +0 -105
- package/esm2022/datetimepicker/datetimepicker-types.mjs +0 -2
- package/esm2022/datetimepicker/datetimepicker.mjs +0 -580
- package/esm2022/datetimepicker/month-view.mjs +0 -148
- package/esm2022/datetimepicker/mtxDatetimepicker.mjs +0 -5
- package/esm2022/datetimepicker/multi-year-view.mjs +0 -215
- package/esm2022/datetimepicker/public-api.mjs +0 -17
- package/esm2022/datetimepicker/time.mjs +0 -470
- package/esm2022/datetimepicker/year-view.mjs +0 -139
- package/esm2022/dialog/dialog-config.mjs +0 -2
- package/esm2022/dialog/dialog-container.mjs +0 -43
- package/esm2022/dialog/dialog-module.mjs +0 -40
- package/esm2022/dialog/dialog.mjs +0 -75
- package/esm2022/dialog/mtxDialog.mjs +0 -5
- package/esm2022/dialog/public-api.mjs +0 -5
- package/esm2022/drawer/drawer-animations.mjs +0 -18
- package/esm2022/drawer/drawer-config.mjs +0 -35
- package/esm2022/drawer/drawer-container.mjs +0 -88
- package/esm2022/drawer/drawer-module.mjs +0 -21
- package/esm2022/drawer/drawer-ref.mjs +0 -99
- package/esm2022/drawer/drawer.mjs +0 -144
- package/esm2022/drawer/mtxDrawer.mjs +0 -5
- package/esm2022/drawer/public-api.mjs +0 -7
- package/esm2022/grid/cell.mjs +0 -132
- package/esm2022/grid/column-menu.mjs +0 -133
- package/esm2022/grid/column-resize/column-resize-directives/column-resize-flex.mjs +0 -38
- package/esm2022/grid/column-resize/column-resize-directives/column-resize.mjs +0 -38
- package/esm2022/grid/column-resize/column-resize-directives/common.mjs +0 -27
- package/esm2022/grid/column-resize/column-resize-module.mjs +0 -42
- package/esm2022/grid/column-resize/index.mjs +0 -8
- package/esm2022/grid/column-resize/overlay-handle.mjs +0 -66
- package/esm2022/grid/column-resize/resizable-directives/common.mjs +0 -29
- package/esm2022/grid/column-resize/resizable-directives/resizable.mjs +0 -64
- package/esm2022/grid/column-resize/resize-strategy.mjs +0 -47
- package/esm2022/grid/expansion-toggle.mjs +0 -65
- package/esm2022/grid/grid-module.mjs +0 -151
- package/esm2022/grid/grid-pipes.mjs +0 -129
- package/esm2022/grid/grid-utils.mjs +0 -56
- package/esm2022/grid/grid.mjs +0 -644
- package/esm2022/grid/interfaces.mjs +0 -2
- package/esm2022/grid/mtxGrid.mjs +0 -5
- package/esm2022/grid/public-api.mjs +0 -18
- package/esm2022/grid/selectable-cell.mjs +0 -53
- package/esm2022/loader/loader-module.mjs +0 -19
- package/esm2022/loader/loader.mjs +0 -57
- package/esm2022/loader/mtxLoader.mjs +0 -5
- package/esm2022/loader/public-api.mjs +0 -3
- package/esm2022/ng-matero-extensions.mjs +0 -5
- package/esm2022/photoviewer/mtxPhotoviewer.mjs +0 -5
- package/esm2022/photoviewer/photoviewer-module.mjs +0 -16
- package/esm2022/photoviewer/photoviewer.mjs +0 -64
- package/esm2022/photoviewer/public-api.mjs +0 -3
- package/esm2022/popover/mtxPopover.mjs +0 -5
- package/esm2022/popover/popover-animations.mjs +0 -25
- package/esm2022/popover/popover-content.mjs +0 -91
- package/esm2022/popover/popover-errors.mjs +0 -27
- package/esm2022/popover/popover-interfaces.mjs +0 -2
- package/esm2022/popover/popover-module.mjs +0 -39
- package/esm2022/popover/popover-target.mjs +0 -18
- package/esm2022/popover/popover-trigger.mjs +0 -480
- package/esm2022/popover/popover-types.mjs +0 -2
- package/esm2022/popover/popover.mjs +0 -325
- package/esm2022/popover/public-api.mjs +0 -9
- package/esm2022/progress/mtxProgress.mjs +0 -5
- package/esm2022/progress/progress-module.mjs +0 -17
- package/esm2022/progress/progress.mjs +0 -43
- package/esm2022/progress/public-api.mjs +0 -3
- package/esm2022/public-api.mjs +0 -5
- package/esm2022/select/mtxSelect.mjs +0 -5
- package/esm2022/select/option.mjs +0 -52
- package/esm2022/select/public-api.mjs +0 -6
- package/esm2022/select/select-intl.mjs +0 -32
- package/esm2022/select/select-module.mjs +0 -89
- package/esm2022/select/select.mjs +0 -611
- package/esm2022/select/templates.mjs +0 -135
- package/esm2022/split/interfaces.mjs +0 -2
- package/esm2022/split/mtxSplit.mjs +0 -5
- package/esm2022/split/public-api.mjs +0 -6
- package/esm2022/split/split-module.mjs +0 -18
- package/esm2022/split/split-pane.mjs +0 -161
- package/esm2022/split/split.mjs +0 -634
- package/esm2022/split/utils.mjs +0 -219
- package/esm2022/tooltip/mtxTooltip.mjs +0 -5
- package/esm2022/tooltip/public-api.mjs +0 -4
- package/esm2022/tooltip/tooltip-animations.mjs +0 -17
- package/esm2022/tooltip/tooltip-module.mjs +0 -41
- package/esm2022/tooltip/tooltip.mjs +0 -915
|
@@ -1,26 +1,14 @@
|
|
|
1
1
|
@use '@angular/material' as mat;
|
|
2
|
-
@use '
|
|
3
|
-
@use '../color-api-backwards-compatibility';
|
|
4
|
-
@use '../all-theme';
|
|
5
|
-
|
|
6
|
-
$config: (
|
|
7
|
-
color: (
|
|
8
|
-
theme-type: light,
|
|
9
|
-
primary: mat.$rose-palette,
|
|
10
|
-
tertiary: mat.$red-palette,
|
|
11
|
-
),
|
|
12
|
-
density: (
|
|
13
|
-
scale: 0,
|
|
14
|
-
)
|
|
15
|
-
);
|
|
16
|
-
|
|
17
|
-
$theme: mat.private-deep-merge-all(
|
|
18
|
-
mat.define-theme($config),
|
|
19
|
-
mtx.define-theme($config),
|
|
20
|
-
);
|
|
2
|
+
@use '../../../core/tokens/m3-system';
|
|
21
3
|
|
|
22
4
|
html {
|
|
23
|
-
@include
|
|
5
|
+
@include m3-system.theme((
|
|
6
|
+
color: (
|
|
7
|
+
theme-type: light,
|
|
8
|
+
primary: mat.$rose-palette,
|
|
9
|
+
tertiary: mat.$red-palette,
|
|
10
|
+
),
|
|
11
|
+
typography: Roboto,
|
|
12
|
+
density: 0,
|
|
13
|
+
));
|
|
24
14
|
}
|
|
25
|
-
|
|
26
|
-
@include color-api-backwards-compatibility.color-variants-backwards-compatibility($theme);
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use 'sass:meta';
|
|
3
|
+
@use 'sass:list';
|
|
4
|
+
@use '@angular/material' as mat;
|
|
5
|
+
@use '../style/elevation';
|
|
6
|
+
@use '../theming/config-validation';
|
|
7
|
+
@use '../theming/definition';
|
|
8
|
+
@use './m3/definitions';
|
|
9
|
+
@use './m3-tokens';
|
|
10
|
+
|
|
11
|
+
/// Emits necessary CSS variables for Material's system level values for the values defined in the
|
|
12
|
+
/// config map. The config map can have values color, typography, and/or density.
|
|
13
|
+
///
|
|
14
|
+
/// If the config map's color value is an Angular Material color palette, it will be used as the
|
|
15
|
+
/// primary and tertiary colors with a `color-scheme` theme type. Otherwise if the color value is a
|
|
16
|
+
/// map, it must have a `primary` value containing an Angular Material color palette, and
|
|
17
|
+
/// optionally a different `tertiary` palette (defaults to primary palette) and `theme-type` that
|
|
18
|
+
/// is either `light`, `dark`, or 'color-scheme` (defaults to `color-scheme`). Color variable
|
|
19
|
+
/// definitions will not be emitted if there are no color values in the config.
|
|
20
|
+
///
|
|
21
|
+
/// If the config map's typography value is a font family string, it will be used as the
|
|
22
|
+
/// plain and brand font family with default bold, medium, and regular weights of 700, 500, and 400,
|
|
23
|
+
/// respectfully. Otherwise if the typography value is a map, it must have a `plain-family` font
|
|
24
|
+
/// family value, and optionally a different `brand-family` font family (defaults to the plain
|
|
25
|
+
/// value) and weights for `bold-weight` (default: 700), `bold-weight` (default: 500), and
|
|
26
|
+
/// `bold-weight` (default: 400). Typography variable definitions will not be emitted if there are
|
|
27
|
+
/// no typography values in the config.
|
|
28
|
+
///
|
|
29
|
+
/// If the config map's density value is a number, it will be used as the density scale. Otherwise
|
|
30
|
+
/// if the density value is a map, it must have a `scale` value. Density variable definitions will
|
|
31
|
+
/// not be emitted if there are no density values in the config.
|
|
32
|
+
///
|
|
33
|
+
/// The application variables emitted use the namespace prefix "--mat-sys".
|
|
34
|
+
/// e.g. --mat-sys-surface: #E5E5E5
|
|
35
|
+
///
|
|
36
|
+
/// @param {Map} $config The color configuration with optional keys color, typography, or density.
|
|
37
|
+
@mixin theme($config, $overrides: ()) {
|
|
38
|
+
$color: map.get($config, color);
|
|
39
|
+
$color-config: null;
|
|
40
|
+
@if ($color) {
|
|
41
|
+
// validate-palette returns null if it is a valid M3 palette
|
|
42
|
+
$is-palette: config-validation.validate-palette($color) == null;
|
|
43
|
+
|
|
44
|
+
// Default to "color-scheme" theme type if the config's color does not provide one.
|
|
45
|
+
@if (not $is-palette and not map.has-key($color, theme-type)) {
|
|
46
|
+
$color: map.set($color, theme-type, color-scheme);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
$color-config: if($is-palette,
|
|
50
|
+
definition.define-colors((primary: $color, theme-type: color-scheme)),
|
|
51
|
+
definition.define-colors($color));
|
|
52
|
+
@include system-level-colors($color-config, $overrides, definition.$system-fallback-prefix);
|
|
53
|
+
@include system-level-elevation($color-config, $overrides, definition.$system-fallback-prefix);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
$typography: map.get($config, typography);
|
|
57
|
+
$typography-config: null;
|
|
58
|
+
@if ($typography) {
|
|
59
|
+
$typography-config: if(meta.type-of($typography) == 'map',
|
|
60
|
+
definition.define-typography($typography),
|
|
61
|
+
definition.define-typography((plain-family: $typography)));
|
|
62
|
+
@include system-level-typography(
|
|
63
|
+
$typography-config, $overrides, definition.$system-fallback-prefix);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
$density: map.get($config, density);
|
|
67
|
+
$density-config: null;
|
|
68
|
+
@if ($density) {
|
|
69
|
+
$density-config: if(meta.type-of($density) == 'map',
|
|
70
|
+
definition.define-density($density),
|
|
71
|
+
definition.define-density((scale: $density)));
|
|
72
|
+
$scale: map.get($density-config, _mat-theming-internals-do-not-access, density-scale);
|
|
73
|
+
@if ($scale != 0) {
|
|
74
|
+
$all-tokens: m3-tokens.generate-density-tokens($scale);
|
|
75
|
+
@each $component-tokens in $all-tokens {
|
|
76
|
+
$namespace: list.nth($component-tokens, 1);
|
|
77
|
+
@each $tokens in list.nth($component-tokens, 2) {
|
|
78
|
+
--#{list.nth($namespace, 1)}-#{list.nth($namespace, 2)}-#{
|
|
79
|
+
list.nth($tokens, 1)}: #{list.nth($tokens, 2)};
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@include system-level-shape($overrides: $overrides, $prefix: definition.$system-fallback-prefix);
|
|
86
|
+
@include system-level-state($overrides: $overrides, $prefix: definition.$system-fallback-prefix);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/// Emits the system-level CSS variables for each of the provided override values. E.g. to
|
|
90
|
+
/// change the primary color to red, use `mat.theme-overrides((primary: red));`
|
|
91
|
+
@mixin theme-overrides($overrides, $prefix: definition.$system-fallback-prefix) {
|
|
92
|
+
$sys-names: map-merge-all(
|
|
93
|
+
definitions.md-sys-color-values-light(),
|
|
94
|
+
definitions.md-sys-typescale-values(),
|
|
95
|
+
definitions.md-sys-elevation-values(),
|
|
96
|
+
definitions.md-sys-shape-values(),
|
|
97
|
+
definitions.md-sys-state-values());
|
|
98
|
+
|
|
99
|
+
& {
|
|
100
|
+
@each $name, $value in $overrides {
|
|
101
|
+
@if (map.has-key($sys-names, $name)) {
|
|
102
|
+
--#{$prefix}-#{$name}: #{map.get($overrides, $name)};
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@mixin system-level-colors($theme, $overrides: (), $prefix: null) {
|
|
109
|
+
$palettes: map.get($theme, _mat-theming-internals-do-not-access, palettes);
|
|
110
|
+
$base-palettes: (
|
|
111
|
+
neutral: map.get($palettes, neutral),
|
|
112
|
+
neutral-variant: map.get($palettes, neutral-variant),
|
|
113
|
+
secondary: map.get($palettes, secondary),
|
|
114
|
+
error: map.get($palettes, error),
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
$type: map.get($theme, _mat-theming-internals-do-not-access, theme-type);
|
|
118
|
+
$primary: map.merge(map.get($palettes, primary), $base-palettes);
|
|
119
|
+
$tertiary: map.merge(map.get($palettes, tertiary), $base-palettes);
|
|
120
|
+
$error: map.get($palettes, error);
|
|
121
|
+
|
|
122
|
+
@if (not $prefix) {
|
|
123
|
+
$prefix: map.get($theme, _mat-theming-internals-do-not-access,
|
|
124
|
+
color-system-variables-prefix) or definition.$system-level-prefix;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
$ref: (
|
|
128
|
+
md-ref-palette: m3-tokens.generate-ref-palette-tokens($primary, $tertiary, $error)
|
|
129
|
+
);
|
|
130
|
+
|
|
131
|
+
$sys-colors: _generate-sys-colors($ref, $type);
|
|
132
|
+
|
|
133
|
+
// Manually insert a subset of palette values that are used directly by components
|
|
134
|
+
// instead of system variables.
|
|
135
|
+
$sys-colors: map.set($sys-colors,
|
|
136
|
+
'neutral-variant20', map.get($ref, md-ref-palette, neutral-variant20));
|
|
137
|
+
$sys-colors: map.set($sys-colors,
|
|
138
|
+
'neutral10', map.get($ref, md-ref-palette, neutral10));
|
|
139
|
+
|
|
140
|
+
& {
|
|
141
|
+
@each $name, $value in $sys-colors {
|
|
142
|
+
--#{$prefix}-#{$name}: #{map.get($overrides, $name) or $value};
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@function _generate-sys-colors($ref, $type) {
|
|
148
|
+
$light-sys-colors: definitions.md-sys-color-values-light($ref);
|
|
149
|
+
@if ($type == light) {
|
|
150
|
+
@return $light-sys-colors;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
$dark-sys-colors: definitions.md-sys-color-values-dark($ref);
|
|
154
|
+
@if ($type == dark) {
|
|
155
|
+
@return $dark-sys-colors;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
@if ($type == color-scheme) {
|
|
159
|
+
$light-dark-sys-colors: ();
|
|
160
|
+
@each $name, $light-value in $light-sys-colors {
|
|
161
|
+
$dark-value: map.get($dark-sys-colors, $name);
|
|
162
|
+
$light-dark-sys-colors:
|
|
163
|
+
map.set($light-dark-sys-colors, $name, light-dark($light-value, $dark-value));
|
|
164
|
+
}
|
|
165
|
+
@return $light-dark-sys-colors;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@error 'Unknown theme-type provided: #{$type}';
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
@mixin system-level-typography($theme, $overrides: (), $prefix: null) {
|
|
172
|
+
$font-definition: map.get($theme, _mat-theming-internals-do-not-access, font-definition);
|
|
173
|
+
$brand: map.get($font-definition, brand);
|
|
174
|
+
$plain: map.get($font-definition, plain);
|
|
175
|
+
$bold: map.get($font-definition, bold);
|
|
176
|
+
$medium: map.get($font-definition, medium);
|
|
177
|
+
$regular: map.get($font-definition, regular);
|
|
178
|
+
$ref: (md-ref-typeface:
|
|
179
|
+
m3-tokens.generate-ref-typeface-tokens($brand, $plain, $bold, $medium, $regular)
|
|
180
|
+
);
|
|
181
|
+
|
|
182
|
+
@if (not $prefix) {
|
|
183
|
+
$prefix: map.get($theme, _mat-theming-internals-do-not-access,
|
|
184
|
+
typography-system-variables-prefix) or definition.$system-level-prefix;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
& {
|
|
188
|
+
@each $name, $value in definitions.md-sys-typescale-values($ref) {
|
|
189
|
+
--#{$prefix}-#{$name}: #{map.get($overrides, $name) or $value};
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
@mixin system-level-elevation($theme, $overrides: (), $prefix: definition.$system-level-prefix) {
|
|
195
|
+
$shadow-color: map.get(
|
|
196
|
+
$theme, _mat-theming-internals-do-not-access, color-tokens, (mdc, theme), shadow);
|
|
197
|
+
|
|
198
|
+
@each $name, $value in definitions.md-sys-elevation-values() {
|
|
199
|
+
$level: map.get($overrides, $name) or $value;
|
|
200
|
+
$value: elevation.get-box-shadow($level, $shadow-color);
|
|
201
|
+
|
|
202
|
+
& {
|
|
203
|
+
--#{$prefix}-#{$name}: #{$value};
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
@mixin system-level-shape($theme: (), $overrides: (), $prefix: definition.$system-level-prefix) {
|
|
209
|
+
& {
|
|
210
|
+
@each $name, $value in definitions.md-sys-shape-values() {
|
|
211
|
+
--#{$prefix}-#{$name}: #{map.get($overrides, $name) or $value};
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
@mixin system-level-state($theme: (), $overrides: (), $prefix: definition.$system-level-prefix) {
|
|
217
|
+
& {
|
|
218
|
+
@each $name, $value in definitions.md-sys-state-values() {
|
|
219
|
+
--#{$prefix}-#{$name}: #{map.get($overrides, $name) or $value};
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// Return a new map where the values are the same as the provided map's
|
|
225
|
+
// keys, prefixed with "--mat-sys-". For example:
|
|
226
|
+
// (key1: '', key2: '') --> (key1: --mat-sys-key1, key2: --mat-sys-key2)
|
|
227
|
+
@function _create-system-app-vars-map($map) {
|
|
228
|
+
$new-map: ();
|
|
229
|
+
@each $key, $value in $map {
|
|
230
|
+
$new-map: map.set($new-map, $key, --#{definition.$system-fallback-prefix}-#{$key});
|
|
231
|
+
}
|
|
232
|
+
@return $new-map;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// Create a components tokens map where values are based on
|
|
236
|
+
// system fallback variables referencing Material's system keys.
|
|
237
|
+
// Includes density token fallbacks where density is 0.
|
|
238
|
+
@function create-system-fallbacks() {
|
|
239
|
+
$app-vars: (
|
|
240
|
+
'md-sys-color':
|
|
241
|
+
_create-system-app-vars-map(definitions.md-sys-color-values-light()),
|
|
242
|
+
'md-sys-typescale':
|
|
243
|
+
_create-system-app-vars-map(definitions.md-sys-typescale-values()),
|
|
244
|
+
'md-sys-elevation':
|
|
245
|
+
_create-system-app-vars-map(definitions.md-sys-elevation-values()),
|
|
246
|
+
'md-sys-state':
|
|
247
|
+
_create-system-app-vars-map(definitions.md-sys-state-values()),
|
|
248
|
+
'md-sys-shape':
|
|
249
|
+
_create-system-app-vars-map(definitions.md-sys-shape-values()),
|
|
250
|
+
// Add a subset of palette-specific colors used by components instead of system values
|
|
251
|
+
'md-ref-palette':
|
|
252
|
+
_create-system-app-vars-map(
|
|
253
|
+
(
|
|
254
|
+
neutral10: '', // Form field native select option text color
|
|
255
|
+
neutral-variant20: '', // Sidenav scrim (container background shadow when opened),
|
|
256
|
+
)
|
|
257
|
+
),
|
|
258
|
+
);
|
|
259
|
+
|
|
260
|
+
@return mat.private-deep-merge-all(
|
|
261
|
+
m3-tokens.generate-tokens($app-vars, true, true),
|
|
262
|
+
m3-tokens.generate-density-tokens(0)
|
|
263
|
+
);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/// Creates a single merged map from the provided variable-length map arguments
|
|
267
|
+
@function map-merge-all($maps...) {
|
|
268
|
+
$result: ();
|
|
269
|
+
@each $map in $maps {
|
|
270
|
+
$result: map.merge($result, $map);
|
|
271
|
+
}
|
|
272
|
+
@return $result;
|
|
273
|
+
}
|
|
@@ -3,17 +3,9 @@
|
|
|
3
3
|
@use './m3';
|
|
4
4
|
@use './m3/definitions' as m3-token-definitions;
|
|
5
5
|
@use '../tokens/m2' as m2-tokens;
|
|
6
|
-
@use '../style/elevation';
|
|
7
6
|
@use './density';
|
|
8
7
|
@use './format-tokens';
|
|
9
8
|
|
|
10
|
-
// Default system level prefix to use when directly calling the `system-level-*` mixins
|
|
11
|
-
$_system-level-prefix: sys;
|
|
12
|
-
|
|
13
|
-
// Prefix used for component token fallback variables, e.g.
|
|
14
|
-
// `color: var(--mdc-text-button-label-text-color, var(--mat-app-primary));`
|
|
15
|
-
$_system-fallback-prefix: mat-app;
|
|
16
|
-
|
|
17
9
|
/// Generates tokens for the given palette with the given prefix.
|
|
18
10
|
/// @param {Map} $palette The palette to generate tokens for
|
|
19
11
|
/// @param {String} $prefix The key prefix used to name the tokens
|
|
@@ -34,7 +26,7 @@ $_system-fallback-prefix: mat-app;
|
|
|
34
26
|
/// @param {Map} $tertiary The tertiary palette
|
|
35
27
|
/// @param {Map} $error The error palette
|
|
36
28
|
/// @return {Map} A set of `md-ref-palette` tokens
|
|
37
|
-
@function
|
|
29
|
+
@function generate-ref-palette-tokens($primary, $tertiary, $error) {
|
|
38
30
|
@return mat.private-merge-all(
|
|
39
31
|
(black: #000, white: #fff),
|
|
40
32
|
_generate-palette-tokens($primary, primary),
|
|
@@ -54,7 +46,7 @@ $_system-fallback-prefix: mat-app;
|
|
|
54
46
|
/// @param {String} $medium The font-weight to use for medium text
|
|
55
47
|
/// @param {String} $regular The font-weight to use for regular text
|
|
56
48
|
/// @return {Map} A set of `md-ref-typeface` tokens
|
|
57
|
-
@function
|
|
49
|
+
@function generate-ref-typeface-tokens($brand, $plain, $bold, $medium, $regular) {
|
|
58
50
|
@return (
|
|
59
51
|
brand: $brand,
|
|
60
52
|
plain: $plain,
|
|
@@ -95,7 +87,7 @@ $_cached-token-slots: null;
|
|
|
95
87
|
/// @param {Boolean} $include-non-systemized Whether to include non-systemized tokens
|
|
96
88
|
/// @param {Boolean} $include-density Whether to include density tokens
|
|
97
89
|
/// @return {Map} A map of namespaced tokens
|
|
98
|
-
@function
|
|
90
|
+
@function generate-tokens($systems, $include-non-systemized: false, $include-density: false) {
|
|
99
91
|
$systems: map.merge((
|
|
100
92
|
md-sys-color: (),
|
|
101
93
|
md-sys-elevation: (),
|
|
@@ -134,105 +126,6 @@ $_cached-token-slots: null;
|
|
|
134
126
|
@return $result;
|
|
135
127
|
}
|
|
136
128
|
|
|
137
|
-
// Return a new map where the values are the same as the provided map's
|
|
138
|
-
// keys, prefixed with "--mat-app-". For example:
|
|
139
|
-
// (key1: '', key2: '') --> (key1: --mat-app-key1, key2: --mat-app-key2)
|
|
140
|
-
@function _create-system-app-vars-map($map) {
|
|
141
|
-
$new-map: ();
|
|
142
|
-
@each $key, $value in $map {
|
|
143
|
-
$new-map: map.set($new-map, $key, --#{$_system-fallback-prefix}-#{$key});
|
|
144
|
-
}
|
|
145
|
-
@return $new-map;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// Create a components tokens map where values are based on
|
|
149
|
-
// system fallback variables referencing Material's system keys.
|
|
150
|
-
// Includes density token fallbacks where density is 0.
|
|
151
|
-
@function create-system-fallbacks() {
|
|
152
|
-
$app-vars: (
|
|
153
|
-
'md-sys-color':
|
|
154
|
-
_create-system-app-vars-map(m3-token-definitions.md-sys-color-values-light()),
|
|
155
|
-
'md-sys-typescale':
|
|
156
|
-
_create-system-app-vars-map(m3-token-definitions.md-sys-typescale-values()),
|
|
157
|
-
'md-sys-elevation':
|
|
158
|
-
_create-system-app-vars-map(m3-token-definitions.md-sys-elevation-values()),
|
|
159
|
-
'md-sys-state':
|
|
160
|
-
_create-system-app-vars-map(m3-token-definitions.md-sys-state-values()),
|
|
161
|
-
'md-sys-shape':
|
|
162
|
-
_create-system-app-vars-map(m3-token-definitions.md-sys-shape-values()),
|
|
163
|
-
);
|
|
164
|
-
|
|
165
|
-
@return mat.private-deep-merge-all(
|
|
166
|
-
_generate-tokens($app-vars, true, true),
|
|
167
|
-
generate-density-tokens(0)
|
|
168
|
-
);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
// Emits CSS variables for Material's system level values. Uses the
|
|
172
|
-
// namespace prefix in $_system-fallback-prefix.
|
|
173
|
-
// e.g. --mat-app-surface: #E5E5E5
|
|
174
|
-
@mixin theme($theme, $overrides: ()) {
|
|
175
|
-
@include system-level-colors($theme, $overrides, $_system-fallback-prefix);
|
|
176
|
-
@include system-level-typography($theme, $overrides, $_system-fallback-prefix);
|
|
177
|
-
@include system-level-elevation($theme, $overrides, $_system-fallback-prefix);
|
|
178
|
-
@include system-level-shape($theme, $overrides, $_system-fallback-prefix);
|
|
179
|
-
@include system-level-motion($theme, $overrides, $_system-fallback-prefix);
|
|
180
|
-
@include system-level-state($theme, $overrides, $_system-fallback-prefix);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
@mixin system-level-colors($theme, $overrides: (), $prefix: null) {
|
|
184
|
-
$palettes: map.get($theme, _mat-theming-internals-do-not-access, palettes);
|
|
185
|
-
$base-palettes: (
|
|
186
|
-
neutral: map.get($palettes, neutral),
|
|
187
|
-
neutral-variant: map.get($palettes, neutral-variant),
|
|
188
|
-
secondary: map.get($palettes, secondary),
|
|
189
|
-
error: map.get($palettes, error),
|
|
190
|
-
);
|
|
191
|
-
|
|
192
|
-
$type: map.get($theme, _mat-theming-internals-do-not-access, theme-type);
|
|
193
|
-
$primary: map.merge(map.get($palettes, primary), $base-palettes);
|
|
194
|
-
$tertiary: map.merge(map.get($palettes, tertiary), $base-palettes);
|
|
195
|
-
$error: map.get($palettes, error);
|
|
196
|
-
|
|
197
|
-
@if (not $prefix) {
|
|
198
|
-
$prefix: map.get($theme, _mat-theming-internals-do-not-access,
|
|
199
|
-
color-system-variables-prefix) or $_system-level-prefix;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
$ref: (
|
|
203
|
-
md-ref-palette: _generate-ref-palette-tokens($primary, $tertiary, $error)
|
|
204
|
-
);
|
|
205
|
-
|
|
206
|
-
$sys-colors: if($type == dark,
|
|
207
|
-
m3-token-definitions.md-sys-color-values-dark($ref),
|
|
208
|
-
m3-token-definitions.md-sys-color-values-light($ref));
|
|
209
|
-
|
|
210
|
-
@each $name, $value in $sys-colors {
|
|
211
|
-
--#{$prefix}-#{$name}: #{map.get($overrides, $name) or $value};
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
@mixin system-level-typography($theme, $overrides: (), $prefix: null) {
|
|
216
|
-
$font-definition: map.get($theme, _mat-theming-internals-do-not-access, font-definition);
|
|
217
|
-
$brand: map.get($font-definition, brand);
|
|
218
|
-
$plain: map.get($font-definition, plain);
|
|
219
|
-
$bold: map.get($font-definition, bold);
|
|
220
|
-
$medium: map.get($font-definition, medium);
|
|
221
|
-
$regular: map.get($font-definition, regular);
|
|
222
|
-
$ref: (
|
|
223
|
-
md-ref-typeface: _generate-ref-typeface-tokens($brand, $plain, $bold, $medium, $regular)
|
|
224
|
-
);
|
|
225
|
-
|
|
226
|
-
@if (not $prefix) {
|
|
227
|
-
$prefix: map.get($theme, _mat-theming-internals-do-not-access,
|
|
228
|
-
typography-system-variables-prefix) or $_system-level-prefix;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
@each $name, $value in m3-token-definitions.md-sys-typescale-values($ref) {
|
|
232
|
-
--#{$prefix}-#{$name}: #{map.get($overrides, $name) or $value};
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
129
|
@function create-map($keys, $prefix) {
|
|
237
130
|
$result: ();
|
|
238
131
|
@each $key in $keys {
|
|
@@ -241,42 +134,6 @@ $_cached-token-slots: null;
|
|
|
241
134
|
@return $result;
|
|
242
135
|
}
|
|
243
136
|
|
|
244
|
-
@mixin system-level-elevation($theme, $overrides: (), $prefix: $_system-level-prefix) {
|
|
245
|
-
$shadow-color: map.get(
|
|
246
|
-
$theme, _mat-theming-internals-do-not-access, color-tokens, (mdc, theme), shadow);
|
|
247
|
-
|
|
248
|
-
@for $level from 0 through 24 {
|
|
249
|
-
$value: elevation.get-box-shadow($level, $shadow-color);
|
|
250
|
-
|
|
251
|
-
--#{$prefix}-elevation-shadow-level-#{$level}: #{$value};
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
@each $name, $value in m3-token-definitions.md-sys-elevation-values() {
|
|
255
|
-
$level: map.get($overrides, $name) or $value;
|
|
256
|
-
$value: elevation.get-box-shadow($level, $shadow-color);
|
|
257
|
-
|
|
258
|
-
--#{$prefix}-#{$name}: #{$value};
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
@mixin system-level-shape($theme, $overrides: (), $prefix: $_system-level-prefix) {
|
|
263
|
-
@each $name, $value in m3-token-definitions.md-sys-shape-values() {
|
|
264
|
-
--#{$prefix}-#{$name}: #{map.get($overrides, $name) or $value};
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
@mixin system-level-state($theme, $overrides: (), $prefix: $_system-level-prefix) {
|
|
269
|
-
@each $name, $value in m3-token-definitions.md-sys-state-values() {
|
|
270
|
-
--#{$prefix}-#{$name}: #{map.get($overrides, $name) or $value};
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
@mixin system-level-motion($theme, $overrides: (), $prefix: $_system-level-prefix) {
|
|
275
|
-
@each $name, $value in m3-token-definitions.md-sys-motion-values() {
|
|
276
|
-
--#{$prefix}-#{$name}: #{map.get($overrides, $name) or $value};
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
|
|
280
137
|
@function _get-sys-color($type, $ref, $prefix) {
|
|
281
138
|
$mdc-sys-color: if($type == dark,
|
|
282
139
|
m3-token-definitions.md-sys-color-values-dark($ref),
|
|
@@ -452,12 +309,12 @@ $_cached-token-slots: null;
|
|
|
452
309
|
/// @return {Map} A map of namespaced color tokens
|
|
453
310
|
@function generate-color-tokens($type, $primary, $tertiary, $error, $system-variables-prefix) {
|
|
454
311
|
$ref: (
|
|
455
|
-
md-ref-palette:
|
|
312
|
+
md-ref-palette: generate-ref-palette-tokens($primary, $tertiary, $error)
|
|
456
313
|
);
|
|
457
314
|
|
|
458
315
|
$sys-color: _get-sys-color($type, $ref, $system-variables-prefix);
|
|
459
316
|
|
|
460
|
-
@return
|
|
317
|
+
@return generate-tokens(map.merge($ref, (
|
|
461
318
|
// Used to get the theme type
|
|
462
319
|
md-sys-type: $type,
|
|
463
320
|
|
|
@@ -484,10 +341,10 @@ $_cached-token-slots: null;
|
|
|
484
341
|
@function generate-typography-tokens($brand, $plain, $bold, $medium, $regular,
|
|
485
342
|
$system-variables-prefix) {
|
|
486
343
|
$ref: (
|
|
487
|
-
md-ref-typeface:
|
|
344
|
+
md-ref-typeface: generate-ref-typeface-tokens($brand, $plain, $bold, $medium, $regular)
|
|
488
345
|
);
|
|
489
346
|
$sys-typeface: _get-sys-typeface($ref, $system-variables-prefix);
|
|
490
|
-
@return
|
|
347
|
+
@return generate-tokens((
|
|
491
348
|
md-sys-typescale: $sys-typeface
|
|
492
349
|
));
|
|
493
350
|
}
|
|
@@ -504,7 +361,7 @@ $system-variables-prefix) {
|
|
|
504
361
|
/// @return {Map} A map of namespaced tokens not related to color, typography, or density
|
|
505
362
|
@function generate-base-tokens() {
|
|
506
363
|
// TODO(mmalerba): Exclude density tokens once implemented.
|
|
507
|
-
@return
|
|
364
|
+
@return generate-tokens((
|
|
508
365
|
md-sys-motion: m3-token-definitions.md-sys-motion-values(),
|
|
509
366
|
md-sys-shape: m3-token-definitions.md-sys-shape-values(),
|
|
510
367
|
), $include-non-systemized: true);
|