Unverified Commit 78f53bed authored by Darren Austin's avatar Darren Austin Committed by GitHub

Script to generate widget theme data defaults from the Material token database. (#95370)

parent a9c43bf7
......@@ -874,6 +874,7 @@ Future<void> _runFrameworkTests() async {
await _runFlutterTest(path.join(flutterRoot, 'dev', 'integration_tests', 'android_semantics_testing'), fatalWarnings: false);
await _runFlutterTest(path.join(flutterRoot, 'dev', 'manual_tests'));
await _runFlutterTest(path.join(flutterRoot, 'dev', 'tools', 'vitool'));
await _runFlutterTest(path.join(flutterRoot, 'dev', 'tools', 'gen_defaults'));
await _runFlutterTest(path.join(flutterRoot, 'dev', 'tools', 'gen_keycodes'));
await _runFlutterTest(path.join(flutterRoot, 'dev', 'benchmarks', 'test_apps', 'stocks'));
await _runFlutterTest(path.join(flutterRoot, 'packages', 'flutter_driver'), tests: <String>[path.join('test', 'src', 'real_tests')], options: soundNullSafetyOptions);
......
## Token Defaults Generator
Script that generates widget component theme data defaults
based on the Material Token database. These tokens were
extracted into a JSON file from an internal Google database.
## Usage
Run this program from the root of the git repository:
```
dart dev/tools/gen_defaults/bin/gen_defaults.dart
```
## Templates
There is a template file for every component that needs defaults from
the token database. These templates are implemented as subclasses of
`TokenTemplate`. This base class provides some utilities and a structure
for adding a new chunk of generated code to the bottom of a given file.
Templates need to override the `generate` method to provide the generated
code chunk as a string. The tokens are represented as a `Map<String, dynamic>`
that is loaded from `data/material-tokens.json`. Templates can look up
whatever properties are needed in this structure to provide the properties
needed for the component.
See `lib/fab_template.dart` for an example that generates defaults for the
Floating Action Button.
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Generate component theme data defaults based on the Material
// Design Token database. These tokens were extracted into a
// JSON file from the internal Google database.
//
// ## Usage
//
// Run this program from the root of the git repository.
//
// ```
// dart dev/tools/gen_defaults/bin/gen_defaults.dart
// ```
import 'dart:convert';
import 'dart:io';
import 'package:gen_defaults/fab_template.dart';
Future<void> main(List<String> args) async {
const String tokensDB = 'dev/tools/gen_defaults/data/material-tokens.json';
final Map<String, dynamic> tokens = jsonDecode(File(tokensDB).readAsStringSync()) as Map<String, dynamic>;
const String materialLib = 'packages/flutter/lib/src/material';
FABTemplate('$materialLib/floating_action_button.dart', tokens).updateFile();
}
{
"version": "v0.72",
"date": "2021-12-16 00:27:25.239571",
"md.sys.color.light.on-tertiary": "md.ref.palette.tertiary100",
"md.sys.color.light.on-secondary-container": "md.ref.palette.secondary10",
"md.sys.color.light.on-secondary": "md.ref.palette.secondary100",
"md.sys.color.light.on-surface-variant": "md.ref.palette.neutral-variant30",
"md.sys.color.light.on-tertiary-container": "md.ref.palette.tertiary10",
"md.sys.color.light.secondary": "md.ref.palette.secondary40",
"md.sys.color.light.inverse-on-surface": "md.ref.palette.neutral95",
"md.sys.color.light.inverse-surface": "md.ref.palette.neutral20",
"md.sys.color.light.outline": "md.ref.palette.neutral-variant50",
"md.sys.color.light.on-primary": "md.ref.palette.primary100",
"md.sys.color.light.primary-container": "md.ref.palette.primary90",
"md.sys.color.light.tertiary": "md.ref.palette.tertiary40",
"md.sys.color.light.on-error": "md.ref.palette.error100",
"md.sys.color.light.shadow": "md.ref.palette.neutral0",
"md.sys.color.light.error-container": "md.ref.palette.error90",
"md.sys.color.light.surface-variant": "md.ref.palette.neutral-variant90",
"md.sys.color.light.background": "md.ref.palette.neutral99",
"md.sys.color.light.surface": "md.ref.palette.neutral99",
"md.sys.color.light.on-background": "md.ref.palette.neutral10",
"md.sys.color.light.tertiary-container": "md.ref.palette.tertiary90",
"md.sys.color.light.inverse-primary": "md.ref.palette.primary80",
"md.sys.color.light.error": "md.ref.palette.error40",
"md.sys.color.light.on-error-container": "md.ref.palette.error10",
"md.sys.color.light.on-surface": "md.ref.palette.neutral10",
"md.sys.color.light.primary": "md.ref.palette.primary40",
"md.sys.color.light.secondary-container": "md.ref.palette.secondary90",
"md.sys.color.light.on-primary-container": "md.ref.palette.primary10",
"md.sys.color.dark.on-tertiary": "md.ref.palette.tertiary20",
"md.sys.color.dark.on-secondary-container": "md.ref.palette.secondary90",
"md.sys.color.dark.on-secondary": "md.ref.palette.secondary20",
"md.sys.color.dark.on-surface-variant": "md.ref.palette.neutral-variant80",
"md.sys.color.dark.on-tertiary-container": "md.ref.palette.tertiary90",
"md.sys.color.dark.secondary": "md.ref.palette.secondary80",
"md.sys.color.dark.inverse-on-surface": "md.ref.palette.neutral20",
"md.sys.color.dark.inverse-surface": "md.ref.palette.neutral90",
"md.sys.color.dark.outline": "md.ref.palette.neutral-variant60",
"md.sys.color.dark.on-primary": "md.ref.palette.primary20",
"md.sys.color.dark.primary-container": "md.ref.palette.primary30",
"md.sys.color.dark.tertiary": "md.ref.palette.tertiary80",
"md.sys.color.dark.on-error": "md.ref.palette.error20",
"md.sys.color.dark.shadow": "md.ref.palette.neutral0",
"md.sys.color.dark.error-container": "md.ref.palette.error30",
"md.sys.color.dark.surface-variant": "md.ref.palette.neutral-variant30",
"md.sys.color.dark.background": "md.ref.palette.neutral10",
"md.sys.color.dark.surface": "md.ref.palette.neutral10",
"md.sys.color.dark.on-background": "md.ref.palette.neutral90",
"md.sys.color.dark.tertiary-container": "md.ref.palette.tertiary30",
"md.sys.color.dark.inverse-primary": "md.ref.palette.primary40",
"md.sys.color.dark.error": "md.ref.palette.error80",
"md.sys.color.dark.on-error-container": "md.ref.palette.error80",
"md.sys.color.dark.on-surface": "md.ref.palette.neutral90",
"md.sys.color.dark.primary": "md.ref.palette.primary80",
"md.sys.color.dark.secondary-container": "md.ref.palette.secondary30",
"md.sys.color.dark.on-primary-container": "md.ref.palette.primary90",
"md.ref.palette.secondary40": "#FF625B71",
"md.ref.palette.grey40": "#FF5E5E5E",
"md.ref.palette.secondary95": "#FFF6EDFF",
"md.ref.palette.red80": "#FFF2B8B5",
"md.ref.palette.grey-variant0": "#FF000000",
"md.ref.palette.blue-variant10": "#FF001D35",
"md.ref.palette.blue-variant99": "#FFF7FCFF",
"md.ref.palette.blue80": "#FFA8C7FA",
"md.ref.palette.red99": "#FFFFFBF9",
"md.ref.palette.grey-variant10": "#FF191D1C",
"md.ref.palette.neutral50": "#FF787579",
"md.ref.palette.blue-variant70": "#FF5AB3F0",
"md.ref.palette.primary30": "#FF4F378B",
"md.ref.palette.grey-variant100": "#FFFFFFFF",
"md.ref.palette.yellow40": "#FF945700",
"md.ref.palette.tertiary60": "#FFB58392",
"md.ref.palette.secondary50": "#FF7A7289",
"md.ref.palette.green99": "#FFF2FFEE",
"md.ref.palette.blue-variant100": "#FFFFFFFF",
"md.ref.palette.yellow70": "#FFF09D00",
"md.ref.palette.neutral-variant90": "#FFE7E0EC",
"md.ref.palette.grey-variant99": "#FFFAFDFB",
"md.ref.palette.primary60": "#FF9A82DB",
"md.ref.palette.green10": "#FF072711",
"md.ref.palette.grey-variant95": "#FFEFF2EF",
"md.ref.palette.blue10": "#FF041E49",
"md.ref.palette.neutral-variant0": "#FF000000",
"md.ref.palette.grey10": "#FF1F1F1F",
"md.ref.palette.grey80": "#FFC7C7C7",
"md.ref.palette.neutral99": "#FFFFFBFE",
"md.ref.palette.green90": "#FFC4EED0",
"md.ref.palette.grey50": "#FF757575",
"md.ref.palette.neutral-variant99": "#FFFFFBFE",
"md.ref.palette.yellow20": "#FF562D00",
"md.ref.palette.error0": "#FF000000",
"md.ref.palette.yellow50": "#FFB26C00",
"md.ref.palette.red0": "#FF000000",
"md.ref.palette.red20": "#FF601410",
"md.ref.palette.red60": "#FFE46962",
"md.ref.palette.grey30": "#FF474747",
"md.ref.palette.primary99": "#FFFFFBFE",
"md.ref.palette.green70": "#FF37BE5F",
"md.ref.palette.yellow80": "#FFFFBB29",
"md.ref.palette.green50": "#FF198639",
"md.ref.palette.yellow90": "#FFFFDF99",
"md.ref.palette.tertiary100": "#FFFFFFFF",
"md.ref.palette.secondary30": "#FF4A4458",
"md.ref.palette.neutral95": "#FFF4EFF4",
"md.ref.palette.neutral-variant100": "#FFFFFFFF",
"md.ref.palette.tertiary95": "#FFFFECF1",
"md.ref.palette.red40": "#FFB3261E",
"md.ref.palette.blue-variant30": "#FF004A77",
"md.ref.palette.primary0": "#FF000000",
"md.ref.palette.blue-variant20": "#FF003355",
"md.ref.palette.error30": "#FF8C1D18",
"md.ref.palette.neutral0": "#FF000000",
"md.ref.palette.error10": "#FF410E0B",
"md.ref.palette.yellow99": "#FFFFFBF0",
"md.ref.palette.neutral-variant80": "#FFCAC4D0",
"md.ref.palette.secondary10": "#FF1D192B",
"md.ref.palette.neutral-variant40": "#FF605D66",
"md.ref.palette.primary100": "#FFFFFFFF",
"md.ref.palette.error80": "#FFF2B8B5",
"md.ref.palette.red30": "#FF8C1D18",
"md.ref.palette.black": "#FF000000",
"md.ref.palette.secondary80": "#FFCCC2DC",
"md.ref.palette.blue-variant0": "#FF000000",
"md.ref.palette.neutral80": "#FFC9C5CA",
"md.ref.palette.blue70": "#FF7CACF8",
"md.ref.palette.neutral-variant70": "#FFAEA9B4",
"md.ref.palette.neutral-variant50": "#FF79747E",
"md.ref.palette.tertiary40": "#FF7D5260",
"md.ref.palette.tertiary50": "#FF986977",
"md.ref.palette.primary40": "#FF6750A4",
"md.ref.palette.secondary20": "#FF332D41",
"md.ref.palette.blue40": "#FF0B57D0",
"md.ref.palette.neutral-variant60": "#FF938F99",
"md.ref.palette.tertiary30": "#FF633B48",
"md.ref.palette.grey20": "#FF303030",
"md.ref.palette.neutral10": "#FF1C1B1F",
"md.ref.palette.tertiary80": "#FFEFB8C8",
"md.ref.palette.red50": "#FFDC362E",
"md.ref.palette.secondary0": "#FF000000",
"md.ref.palette.secondary99": "#FFFFFBFE",
"md.ref.palette.neutral90": "#FFE6E1E5",
"md.ref.palette.tertiary70": "#FFD29DAC",
"md.ref.palette.primary80": "#FFD0BCFF",
"md.ref.palette.error95": "#FFFCEEEE",
"md.ref.palette.grey99": "#FFFDFCFB",
"md.ref.palette.primary90": "#FFEADDFF",
"md.ref.palette.yellow30": "#FF754200",
"md.ref.palette.green0": "#FF000000",
"md.ref.palette.blue50": "#FF1B6EF3",
"md.ref.palette.green40": "#FF146C2E",
"md.ref.palette.blue95": "#FFECF3FE",
"md.ref.palette.red10": "#FF410E0B",
"md.ref.palette.neutral-variant20": "#FF322F37",
"md.ref.palette.primary20": "#FF381E72",
"md.ref.palette.error50": "#FFDC362E",
"md.ref.palette.primary95": "#FFF6EDFF",
"md.ref.palette.green20": "#FF0A3818",
"md.ref.palette.blue-variant80": "#FF7FCFFF",
"md.ref.palette.primary70": "#FFB69DF8",
"md.ref.palette.tertiary20": "#FF492532",
"md.ref.palette.yellow60": "#FFD68400",
"md.ref.palette.green60": "#FF1EA446",
"md.ref.palette.neutral-variant10": "#FF1D1A22",
"md.ref.palette.tertiary99": "#FFFFFBFA",
"md.ref.palette.tertiary10": "#FF31111D",
"md.ref.palette.neutral70": "#FFAEAAAE",
"md.ref.palette.yellow0": "#FF000000",
"md.ref.palette.red95": "#FFFCEEEE",
"md.ref.palette.green30": "#FF0F5223",
"md.ref.palette.blue-variant60": "#FF3998D3",
"md.ref.palette.neutral40": "#FF605D62",
"md.ref.palette.grey70": "#FFABABAB",
"md.ref.palette.secondary100": "#FFFFFFFF",
"md.ref.palette.grey-variant30": "#FF444746",
"md.ref.palette.secondary60": "#FF958DA5",
"md.ref.palette.grey-variant90": "#FFE1E3E1",
"md.ref.palette.grey60": "#FF8F8F8F",
"md.ref.palette.blue-variant50": "#FF047DB7",
"md.ref.palette.yellow100": "#FFFFFFFF",
"md.ref.palette.grey95": "#FFF2F2F2",
"md.ref.palette.grey90": "#FFE3E3E3",
"md.ref.palette.error60": "#FFE46962",
"md.ref.palette.grey-variant50": "#FF747775",
"md.ref.palette.error99": "#FFFFFBF9",
"md.ref.palette.tertiary90": "#FFFFD8E4",
"md.ref.palette.yellow10": "#FF421F00",
"md.ref.palette.blue90": "#FFD3E3FD",
"md.ref.palette.error70": "#FFEC928E",
"md.ref.palette.neutral60": "#FF939094",
"md.ref.palette.error40": "#FFB3261E",
"md.ref.palette.blue0": "#FF000000",
"md.ref.palette.neutral-variant30": "#FF49454F",
"md.ref.palette.green95": "#FFE7F8ED",
"md.ref.palette.blue30": "#FF0842A0",
"md.ref.palette.secondary90": "#FFE8DEF8",
"md.ref.palette.neutral20": "#FF313033",
"md.ref.palette.blue-variant95": "#FFDFF3FF",
"md.ref.palette.red100": "#FFFFFFFF",
"md.ref.palette.blue99": "#FFFAFBFF",
"md.ref.palette.red70": "#FFEC928E",
"md.ref.palette.grey0": "#FF000000",
"md.ref.palette.neutral30": "#FF484649",
"md.ref.palette.blue-variant90": "#FFC2E7FF",
"md.ref.palette.grey-variant40": "#FF5C5F5E",
"md.ref.palette.white": "#FFFFFFFF",
"md.ref.palette.blue100": "#FFFFFFFF",
"md.ref.palette.neutral100": "#FFFFFFFF",
"md.ref.palette.grey-variant60": "#FF8E918F",
"md.ref.palette.yellow95": "#FFFFF0D1",
"md.ref.palette.blue20": "#FF062E6F",
"md.ref.palette.error20": "#FF601410",
"md.ref.palette.green80": "#FF6DD58C",
"md.ref.palette.grey100": "#FFFFFFFF",
"md.ref.palette.error90": "#FFF9DEDC",
"md.ref.palette.blue-variant40": "#FF00639B",
"md.ref.palette.blue60": "#FF4C8DF6",
"md.ref.palette.primary10": "#FF21005D",
"md.ref.palette.secondary70": "#FFB0A7C0",
"md.ref.palette.primary50": "#FF7F67BE",
"md.ref.palette.tertiary0": "#FF000000",
"md.ref.palette.error100": "#FFFFFFFF",
"md.ref.palette.grey-variant80": "#FFC4C7C5",
"md.ref.palette.red90": "#FFF9DEDC",
"md.ref.palette.grey-variant70": "#FFA9ACAA",
"md.ref.palette.green100": "#FFFFFFFF",
"md.ref.palette.neutral-variant95": "#FFF5EEFA",
"md.ref.palette.grey-variant20": "#FF2D312F",
"md.sys.elevation.surface-tint-color": "primary",
"md.sys.elevation.level5": {
"value": 12.0,
"units": "DIPS"
},
"md.sys.elevation.level4": {
"value": 8.0,
"units": "DIPS"
},
"md.sys.elevation.level3": {
"value": 6.0,
"units": "DIPS"
},
"md.sys.elevation.level2": {
"value": 3.0,
"units": "DIPS"
},
"md.sys.elevation.level1": {
"value": 1.0,
"units": "DIPS"
},
"md.sys.elevation.level0": {
"value": 0.0,
"units": "DIPS"
},
"md.sys.shape.corner.full": {
"family": "SHAPE_FAMILY_UNSPECIFIED",
"value": {
"value": 0.0,
"units": "UNIT_UNSPECIFIED"
}
},
"md.sys.shape.corner.extra-large.top": {
"family": "SHAPE_FAMILY_ROUNDED_CORNERS",
"value": {
"value": 0.0,
"units": "DIPS"
}
},
"md.sys.shape.corner.extra-large": {
"family": "SHAPE_FAMILY_ROUNDED_CORNERS",
"value": {
"value": 28.0,
"units": "DIPS"
}
},
"md.sys.shape.corner.large.top": {
"family": "SHAPE_FAMILY_ROUNDED_CORNERS",
"value": {
"value": 0.0,
"units": "DIPS"
}
},
"md.sys.shape.corner.large.end": {
"family": "SHAPE_FAMILY_ROUNDED_CORNERS",
"value": {
"value": 0.0,
"units": "DIPS"
}
},
"md.sys.shape.corner.large": {
"family": "SHAPE_FAMILY_ROUNDED_CORNERS",
"value": {
"value": 16.0,
"units": "DIPS"
}
},
"md.sys.shape.corner.medium": {
"family": "SHAPE_FAMILY_ROUNDED_CORNERS",
"value": {
"value": 12.0,
"units": "DIPS"
}
},
"md.sys.shape.corner.small": {
"family": "SHAPE_FAMILY_ROUNDED_CORNERS",
"value": {
"value": 8.0,
"units": "DIPS"
}
},
"md.sys.shape.corner.extra-small.top": {
"family": "SHAPE_FAMILY_ROUNDED_CORNERS",
"value": {
"value": 0.0,
"units": "DIPS"
}
},
"md.sys.shape.corner.extra-small": {
"family": "SHAPE_FAMILY_ROUNDED_CORNERS",
"value": {
"value": 4.0,
"units": "DIPS"
}
},
"md.sys.shape.corner.none": {
"family": "SHAPE_FAMILY_ROUNDED_CORNERS",
"value": {
"value": 0.0,
"units": "DIPS"
}
},
"md.sys.shape.small": {
"family": "SHAPE_FAMILY_ROUNDED_CORNERS",
"value": {
"value": 4.0,
"units": "DIPS"
}
},
"md.sys.shape.medium": {
"family": "SHAPE_FAMILY_ROUNDED_CORNERS",
"value": {
"value": 8.0,
"units": "DIPS"
}
},
"md.sys.shape.large": {
"family": "SHAPE_FAMILY_ROUNDED_CORNERS",
"value": {
"value": 8.0,
"units": "DIPS"
}
},
"md.sys.state.dragged.state-layer-opacity": 0.16,
"md.sys.state.pressed.state-layer-opacity": 0.12,
"md.sys.state.focus.state-layer-opacity": 0.12,
"md.sys.state.hover.state-layer-opacity": 0.08,
"md.sys.typescale.label-small": "labelSmall",
"md.sys.typescale.label-small.line-height": {
"value": 16.0,
"units": "POINTS"
},
"md.sys.typescale.label-small.tracking": {
"value": 0.1,
"units": "POINTS"
},
"md.sys.typescale.label-small.size": {
"value": 11.0,
"units": "POINTS"
},
"md.sys.typescale.label-small.weight": "weightMedium",
"md.sys.typescale.label-small.font": "plainMedium",
"md.sys.typescale.label-medium": "labelMedium",
"md.sys.typescale.label-medium.text-transform": "TEXT_TRANSFORM_UNSPECIFIED",
"md.sys.typescale.label-medium.line-height": {
"value": 16.0,
"units": "POINTS"
},
"md.sys.typescale.label-medium.tracking": {
"value": 0.1,
"units": "POINTS"
},
"md.sys.typescale.label-medium.size": {
"value": 12.0,
"units": "POINTS"
},
"md.sys.typescale.label-medium.weight": "weightMedium",
"md.sys.typescale.label-medium.font": "plainMedium",
"md.sys.typescale.label-large": "labelLarge",
"md.sys.typescale.label-large.line-height": {
"value": 20.0,
"units": "POINTS"
},
"md.sys.typescale.label-large.tracking": {
"value": 0.0,
"units": "POINTS"
},
"md.sys.typescale.label-large.size": {
"value": 14.0,
"units": "POINTS"
},
"md.sys.typescale.label-large.weight": "weightMedium",
"md.sys.typescale.label-large.font": "plainMedium",
"md.sys.typescale.body-small": "bodySmall",
"md.sys.typescale.body-small.line-height": {
"value": 16.0,
"units": "POINTS"
},
"md.sys.typescale.body-small.tracking": {
"value": 0.1,
"units": "POINTS"
},
"md.sys.typescale.body-small.size": {
"value": 12.0,
"units": "POINTS"
},
"md.sys.typescale.body-small.weight": "weightRegular",
"md.sys.typescale.body-small.font": "plainRegular",
"md.sys.typescale.body-medium": "bodyMedium",
"md.sys.typescale.body-medium.line-height": {
"value": 20.0,
"units": "POINTS"
},
"md.sys.typescale.body-medium.tracking": {
"value": 0.0,
"units": "POINTS"
},
"md.sys.typescale.body-medium.size": {
"value": 14.0,
"units": "POINTS"
},
"md.sys.typescale.body-medium.weight": "weightRegular",
"md.sys.typescale.body-medium.font": "plainRegular",
"md.sys.typescale.body-large": "bodyLarge",
"md.sys.typescale.body-large.line-height": {
"value": 24.0,
"units": "POINTS"
},
"md.sys.typescale.body-large.tracking": {
"value": 0.0,
"units": "POINTS"
},
"md.sys.typescale.body-large.size": {
"value": 16.0,
"units": "POINTS"
},
"md.sys.typescale.body-large.weight": "weightRegular",
"md.sys.typescale.body-large.font": "plainRegular",
"md.sys.typescale.title-small": "titleSmall",
"md.sys.typescale.title-small.line-height": {
"value": 20.0,
"units": "POINTS"
},
"md.sys.typescale.title-small.tracking": {
"value": 0.0,
"units": "POINTS"
},
"md.sys.typescale.title-small.size": {
"value": 14.0,
"units": "POINTS"
},
"md.sys.typescale.title-small.weight": "weightMedium",
"md.sys.typescale.title-small.font": "plainMedium",
"md.sys.typescale.title-medium": "titleMedium",
"md.sys.typescale.title-medium.line-height": {
"value": 24.0,
"units": "POINTS"
},
"md.sys.typescale.title-medium.tracking": {
"value": 0.0,
"units": "POINTS"
},
"md.sys.typescale.title-medium.size": {
"value": 16.0,
"units": "POINTS"
},
"md.sys.typescale.title-medium.weight": "weightMedium",
"md.sys.typescale.title-medium.font": "plainMedium",
"md.sys.typescale.title-large": "titleLarge",
"md.sys.typescale.title-large.line-height": {
"value": 28.0,
"units": "POINTS"
},
"md.sys.typescale.title-large.tracking": {
"value": 0.0,
"units": "POINTS"
},
"md.sys.typescale.title-large.size": {
"value": 22.0,
"units": "POINTS"
},
"md.sys.typescale.title-large.weight": "weightRegular",
"md.sys.typescale.title-large.font": "brandRegular",
"md.sys.typescale.headline-small": "headlineSmall",
"md.sys.typescale.headline-small.line-height": {
"value": 32.0,
"units": "POINTS"
},
"md.sys.typescale.headline-small.tracking": {
"value": 0.0,
"units": "POINTS"
},
"md.sys.typescale.headline-small.size": {
"value": 24.0,
"units": "POINTS"
},
"md.sys.typescale.headline-small.weight": "weightRegular",
"md.sys.typescale.headline-small.font": "brandRegular",
"md.sys.typescale.headline-medium": "headlineMedium",
"md.sys.typescale.headline-medium.line-height": {
"value": 36.0,
"units": "POINTS"
},
"md.sys.typescale.headline-medium.tracking": {
"value": 0.0,
"units": "POINTS"
},
"md.sys.typescale.headline-medium.size": {
"value": 28.0,
"units": "POINTS"
},
"md.sys.typescale.headline-medium.weight": "weightRegular",
"md.sys.typescale.headline-medium.font": "brandRegular",
"md.sys.typescale.headline-large": "headlineLarge",
"md.sys.typescale.headline-large.line-height": {
"value": 40.0,
"units": "POINTS"
},
"md.sys.typescale.headline-large.tracking": {
"value": 0.0,
"units": "POINTS"
},
"md.sys.typescale.headline-large.size": {
"value": 32.0,
"units": "POINTS"
},
"md.sys.typescale.headline-large.font": "brandRegular",
"md.sys.typescale.headline-large.weight": "weightRegular",
"md.sys.typescale.display-small": "displaySmall",
"md.sys.typescale.display-small.line-height": {
"value": 44.0,
"units": "POINTS"
},
"md.sys.typescale.display-small.tracking": {
"value": 0.0,
"units": "POINTS"
},
"md.sys.typescale.display-small.size": {
"value": 36.0,
"units": "POINTS"
},
"md.sys.typescale.display-small.weight": "weightRegular",
"md.sys.typescale.display-small.font": "brandRegular",
"md.sys.typescale.display-medium": "displayMedium",
"md.sys.typescale.display-medium.line-height": {
"value": 52.0,
"units": "POINTS"
},
"md.sys.typescale.display-medium.tracking": {
"value": 0.0,
"units": "POINTS"
},
"md.sys.typescale.display-medium.size": {
"value": 45.0,
"units": "POINTS"
},
"md.sys.typescale.display-medium.weight": "weightRegular",
"md.sys.typescale.display-medium.font": "brandRegular",
"md.sys.typescale.display-large": "displayLarge",
"md.sys.typescale.display-large.line-height": {
"value": 64.0,
"units": "POINTS"
},
"md.sys.typescale.display-large.tracking": {
"value": 0.0,
"units": "POINTS"
},
"md.sys.typescale.display-large.size": {
"value": 57.0,
"units": "POINTS"
},
"md.sys.typescale.display-large.weight": "weightRegular",
"md.sys.typescale.display-large.font": "brandRegular",
"md.sys.typescale.subtitle2": "subtitle2",
"md.sys.typescale.subtitle1": "subtitle1",
"md.sys.typescale.headline6": "headline6",
"md.sys.typescale.display1": "display1",
"md.sys.typescale.display1.tracking": {
"value": 0.0,
"units": "POINTS"
},
"md.sys.typescale.subtitle2.line-height": {
"value": 20.0,
"units": "POINTS"
},
"md.sys.typescale.subtitle2.tracking": {
"value": 0.0,
"units": "POINTS"
},
"md.sys.typescale.subtitle2.size": {
"value": 14.0,
"units": "POINTS"
},
"md.sys.typescale.subtitle1.line-height": {
"value": 24.0,
"units": "POINTS"
},
"md.sys.typescale.subtitle1.tracking": {
"value": 0.0,
"units": "POINTS"
},
"md.sys.typescale.subtitle1.size": {
"value": 16.0,
"units": "POINTS"
},
"md.sys.typescale.headline6.line-height": {
"value": 24.0,
"units": "POINTS"
},
"md.sys.typescale.headline6.tracking": {
"value": 0.0,
"units": "POINTS"
},
"md.sys.typescale.headline6.size": {
"value": 18.0,
"units": "POINTS"
},
"md.sys.typescale.display1.line-height": {
"value": 76.0,
"units": "POINTS"
},
"md.sys.typescale.display1.size": {
"value": 64.0,
"units": "POINTS"
},
"md.sys.typescale.subtitle2.weight": "weightMedium",
"md.sys.typescale.subtitle2.font": "plainMedium",
"md.sys.typescale.subtitle1.weight": "weightMedium",
"md.sys.typescale.subtitle1.font": "plainMedium",
"md.sys.typescale.headline6.weight": "weightRegular",
"md.sys.typescale.headline6.font": "brandRegular",
"md.sys.typescale.display1.weight": "weightRegular",
"md.sys.typescale.display1.font": "brandRegular",
"md.ref.typeface.brand-display-regular": "Roboto Regular",
"md.ref.typeface.weight-bold": 700.0,
"md.ref.typeface.weight-medium": 500.0,
"md.ref.typeface.weight-regular": 400.0,
"md.ref.typeface.plain-medium": "Roboto Medium",
"md.ref.typeface.plain-regular": "Roboto Regular",
"md.ref.typeface.brand-medium": "Roboto Medium",
"md.ref.typeface.brand-regular": "Roboto Regular",
"md.comp.fab.primary.container.shape": "md.sys.shape.corner.large",
"md.comp.fab.primary.pressed.icon.color": "onPrimaryContainer",
"md.comp.fab.primary.focus.icon.color": "onPrimaryContainer",
"md.comp.fab.primary.hover.icon.color": "onPrimaryContainer",
"md.comp.fab.primary.lowered.pressed.container.elevation": "md.sys.elevation.level1",
"md.comp.fab.primary.pressed.state-layer.opacity": "md.sys.state.pressed.state-layer-opacity",
"md.comp.fab.primary.pressed.state-layer.color": "onPrimaryContainer",
"md.comp.fab.primary.pressed.container.elevation": "md.sys.elevation.level3",
"md.comp.fab.primary.lowered.focus.container.elevation": "md.sys.elevation.level1",
"md.comp.fab.primary.focus.container.elevation": "md.sys.elevation.level3",
"md.comp.fab.primary.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
"md.comp.fab.primary.focus.state-layer.color": "onPrimaryContainer",
"md.comp.fab.primary.lowered.hover.container.elevation": "md.sys.elevation.level2",
"md.comp.fab.primary.hover.state-layer.opacity": "md.sys.state.hover.state-layer-opacity",
"md.comp.fab.primary.hover.state-layer.color": "onPrimaryContainer",
"md.comp.fab.primary.hover.container.elevation": "md.sys.elevation.level4",
"md.comp.fab.primary.icon.color": "onPrimaryContainer",
"md.comp.fab.primary.icon.size": {
"value": 24.0,
"units": "DIPS"
},
"md.comp.fab.primary.lowered.container.elevation": "md.sys.elevation.level1",
"md.comp.fab.primary.container.shadow-color": "shadow",
"md.comp.fab.primary.container.elevation": "md.sys.elevation.level3",
"md.comp.fab.primary.container.height": {
"value": 56.0,
"units": "DIPS"
},
"md.comp.fab.primary.container.width": {
"value": 56.0,
"units": "DIPS"
},
"md.comp.fab.primary.container.color": "primaryContainer",
"md.comp.fab.primary.large.container.shape": "md.sys.shape.corner.extra-large",
"md.comp.fab.primary.large.pressed.icon.color": "onPrimaryContainer",
"md.comp.fab.primary.large.focus.icon.color": "onPrimaryContainer",
"md.comp.fab.primary.large.hover.icon.color": "onPrimaryContainer",
"md.comp.fab.primary.large.lowered.pressed.container.elevation": "md.sys.elevation.level1",
"md.comp.fab.primary.large.pressed.state-layer.opacity": "md.sys.state.pressed.state-layer-opacity",
"md.comp.fab.primary.large.pressed.state-layer.color": "onPrimaryContainer",
"md.comp.fab.primary.large.pressed.container.elevation": "md.sys.elevation.level3",
"md.comp.fab.primary.large.lowered.focus.container.elevation": "md.sys.elevation.level1",
"md.comp.fab.primary.large.focus.container.elevation": "md.sys.elevation.level3",
"md.comp.fab.primary.large.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
"md.comp.fab.primary.large.focus.state-layer.color": "onPrimaryContainer",
"md.comp.fab.primary.large.lowered.hover.container.elevation": "md.sys.elevation.level2",
"md.comp.fab.primary.large.hover.state-layer.opacity": "md.sys.state.hover.state-layer-opacity",
"md.comp.fab.primary.large.hover.state-layer.color": "onPrimaryContainer",
"md.comp.fab.primary.large.hover.container.elevation": "md.sys.elevation.level4",
"md.comp.fab.primary.large.icon.color": "onPrimaryContainer",
"md.comp.fab.primary.large.icon.size": {
"value": 36.0,
"units": "DIPS"
},
"md.comp.fab.primary.large.lowered.container.elevation": "md.sys.elevation.level1",
"md.comp.fab.primary.large.container.shadow-color": "shadow",
"md.comp.fab.primary.large.container.elevation": "md.sys.elevation.level3",
"md.comp.fab.primary.large.container.height": {
"value": 96.0,
"units": "DIPS"
},
"md.comp.fab.primary.large.container.width": {
"value": 96.0,
"units": "DIPS"
},
"md.comp.fab.primary.large.container.color": "primaryContainer",
"md.comp.fab.primary.small.container.shape": "md.sys.shape.corner.medium",
"md.comp.fab.primary.small.pressed.icon.color": "onPrimaryContainer",
"md.comp.fab.primary.small.focus.icon.color": "onPrimaryContainer",
"md.comp.fab.primary.small.hover.icon.color": "onPrimaryContainer",
"md.comp.fab.primary.small.lowered.pressed.container.elevation": "md.sys.elevation.level1",
"md.comp.fab.primary.small.pressed.state-layer.opacity": "md.sys.state.pressed.state-layer-opacity",
"md.comp.fab.primary.small.pressed.state-layer.color": "onPrimaryContainer",
"md.comp.fab.primary.small.pressed.container.elevation": "md.sys.elevation.level3",
"md.comp.fab.primary.small.lowered.focus.container.elevation": "md.sys.elevation.level1",
"md.comp.fab.primary.small.focus.container.elevation": "md.sys.elevation.level3",
"md.comp.fab.primary.small.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
"md.comp.fab.primary.small.focus.state-layer.color": "onPrimaryContainer",
"md.comp.fab.primary.small.lowered.hover.container.elevation": "md.sys.elevation.level2",
"md.comp.fab.primary.small.hover.state-layer.opacity": "md.sys.state.hover.state-layer-opacity",
"md.comp.fab.primary.small.hover.state-layer.color": "onPrimaryContainer",
"md.comp.fab.primary.small.hover.container.elevation": "md.sys.elevation.level4",
"md.comp.fab.primary.small.icon.color": "onPrimaryContainer",
"md.comp.fab.primary.small.icon.size": {
"value": 24.0,
"units": "DIPS"
},
"md.comp.fab.primary.small.lowered.container.elevation": "md.sys.elevation.level1",
"md.comp.fab.primary.small.container.shadow-color": "shadow",
"md.comp.fab.primary.small.container.elevation": "md.sys.elevation.level3",
"md.comp.fab.primary.small.container.height": {
"value": 40.0,
"units": "DIPS"
},
"md.comp.fab.primary.small.container.width": {
"value": 40.0,
"units": "DIPS"
},
"md.comp.fab.primary.small.container.color": "primaryContainer",
"md.comp.extended-fab.primary.container.shape": "md.sys.shape.corner.large",
"md.comp.extended-fab.primary.pressed.label-text.color": "onPrimaryContainer",
"md.comp.extended-fab.primary.pressed.icon.color": "onPrimaryContainer",
"md.comp.extended-fab.primary.focus.label-text.color": "onPrimaryContainer",
"md.comp.extended-fab.primary.focus.icon.color": "onPrimaryContainer",
"md.comp.extended-fab.primary.hover.label-text.color": "onPrimaryContainer",
"md.comp.extended-fab.primary.hover.icon.color": "onPrimaryContainer",
"md.comp.extended-fab.primary.lowered.pressed.container.elevation": "md.sys.elevation.level1",
"md.comp.extended-fab.primary.pressed.state-layer.opacity": "md.sys.state.pressed.state-layer-opacity",
"md.comp.extended-fab.primary.pressed.state-layer.color": "onPrimaryContainer",
"md.comp.extended-fab.primary.pressed.container.elevation": "md.sys.elevation.level3",
"md.comp.extended-fab.primary.lowered.focus.container.elevation": "md.sys.elevation.level1",
"md.comp.extended-fab.primary.focus.container.elevation": "md.sys.elevation.level3",
"md.comp.extended-fab.primary.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
"md.comp.extended-fab.primary.focus.state-layer.color": "onPrimaryContainer",
"md.comp.extended-fab.primary.lowered.hover.container.elevation": "md.sys.elevation.level2",
"md.comp.extended-fab.primary.hover.state-layer.opacity": "md.sys.state.hover.state-layer-opacity",
"md.comp.extended-fab.primary.hover.state-layer.color": "onPrimaryContainer",
"md.comp.extended-fab.primary.hover.container.elevation": "md.sys.elevation.level4",
"md.comp.extended-fab.primary.label-text.color": "onPrimaryContainer",
"md.comp.extended-fab.primary.label-text.type": "labelText",
"md.comp.extended-fab.primary.label-text.tracking": "labelLarge",
"md.comp.extended-fab.primary.label-text.weight": "labelLarge",
"md.comp.extended-fab.primary.label-text.size": "labelLarge",
"md.comp.extended-fab.primary.label-text.line-height": "labelLarge",
"md.comp.extended-fab.primary.label-text.font": "labelLarge",
"md.comp.extended-fab.primary.icon.color": "onPrimaryContainer",
"md.comp.extended-fab.primary.icon.size": {
"value": 24.0,
"units": "DIPS"
},
"md.comp.extended-fab.primary.lowered.container.elevation": "md.sys.elevation.level1",
"md.comp.extended-fab.primary.container.shadow-color": "shadow",
"md.comp.extended-fab.primary.container.elevation": "md.sys.elevation.level3",
"md.comp.extended-fab.primary.container.height": {
"value": 56.0,
"units": "DIPS"
},
"md.comp.extended-fab.primary.container.color": "primaryContainer",
"md.comp.assist-chip.container.shape": "md.sys.shape.corner.small",
"md.comp.assist-chip.container.surface-tint-layer.color": "md.sys.elevation.surface-tint-color",
"md.comp.assist-chip.label-text.tracking": "labelLarge",
"md.comp.assist-chip.label-text.weight": "labelLarge",
"md.comp.assist-chip.label-text.size": "labelLarge",
"md.comp.assist-chip.label-text.line-height": "labelLarge",
"md.comp.assist-chip.label-text.font": "labelLarge",
"md.comp.assist-chip.with-icon.dragged.icon.color": "primary",
"md.comp.assist-chip.dragged.label-text.color": "onSurface",
"md.comp.assist-chip.dragged.state-layer.color": "onSurface",
"md.comp.assist-chip.with-icon.pressed.icon.color": "primary",
"md.comp.assist-chip.pressed.label-text.color": "onSurface",
"md.comp.assist-chip.pressed.state-layer.color": "onSurface",
"md.comp.assist-chip.with-icon.focus.icon.color": "primary",
"md.comp.assist-chip.flat.focus.outline.color": "onSurface",
"md.comp.assist-chip.focus.label-text.color": "onSurface",
"md.comp.assist-chip.focus.state-layer.color": "onSurface",
"md.comp.assist-chip.with-icon.hover.icon.color": "primary",
"md.comp.assist-chip.hover.label-text.color": "onSurface",
"md.comp.assist-chip.hover.state-layer.color": "onSurface",
"md.comp.assist-chip.dragged.state-layer.opacity": "md.sys.state.dragged.state-layer-opacity",
"md.comp.assist-chip.pressed.state-layer.opacity": "md.sys.state.pressed.state-layer-opacity",
"md.comp.assist-chip.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
"md.comp.assist-chip.hover.state-layer.opacity": "md.sys.state.hover.state-layer-opacity",
"md.comp.assist-chip.label-text.type": "labelText",
"md.comp.assist-chip.dragged.container.elevation": "md.sys.elevation.level4",
"md.comp.assist-chip.elevated.pressed.container.elevation": "md.sys.elevation.level1",
"md.comp.assist-chip.elevated.focus.container.elevation": "md.sys.elevation.level1",
"md.comp.assist-chip.elevated.hover.container.elevation": "md.sys.elevation.level2",
"md.comp.assist-chip.elevated.disabled.container.opacity": 0.12,
"md.comp.assist-chip.elevated.disabled.container.color": "onSurface",
"md.comp.assist-chip.elevated.disabled.container.elevation": "md.sys.elevation.level0",
"md.comp.assist-chip.with-icon.disabled.icon.opacity": 0.38,
"md.comp.assist-chip.with-icon.disabled.icon.color": "onSurface",
"md.comp.assist-chip.disabled.label-text.opacity": 0.38,
"md.comp.assist-chip.disabled.label-text.color": "onSurface",
"md.comp.assist-chip.flat.disabled.outline.opacity": 0.12,
"md.comp.assist-chip.flat.disabled.outline.color": "onSurface",
"md.comp.assist-chip.with-icon.icon.color": "primary",
"md.comp.assist-chip.with-icon.icon.size": {
"value": 18.0,
"units": "DIPS"
},
"md.comp.assist-chip.label-text.color": "onSurface",
"md.comp.assist-chip.elevated.container.shadow-color": "shadow",
"md.comp.assist-chip.elevated.container.color": "surface",
"md.comp.assist-chip.elevated.container.elevation": "md.sys.elevation.level1",
"md.comp.assist-chip.flat.outline.width": {
"value": 1.0,
"units": "DIPS"
},
"md.comp.assist-chip.flat.outline.color": "outline",
"md.comp.assist-chip.flat.container.elevation": "md.sys.elevation.level0",
"md.comp.assist-chip.container.height": {
"value": 32.0,
"units": "DIPS"
},
"md.comp.filter-chip.container.shape": "md.sys.shape.corner.small",
"md.comp.filter-chip.container.surface-tint-layer.color": "md.sys.elevation.surface-tint-color",
"md.comp.filter-chip.label-text.tracking": "labelLarge",
"md.comp.filter-chip.label-text.weight": "labelLarge",
"md.comp.filter-chip.label-text.size": "labelLarge",
"md.comp.filter-chip.label-text.line-height": "labelLarge",
"md.comp.filter-chip.label-text.font": "labelLarge",
"md.comp.filter-chip.with-icon.selected.dragged.icon.color": "onSecondaryContainer",
"md.comp.filter-chip.with-icon.unselected.dragged.icon.color": "onSurfaceVariant",
"md.comp.filter-chip.selected.dragged.label-text.color": "onSecondaryContainer",
"md.comp.filter-chip.selected.dragged.state-layer.color": "onSecondaryContainer",
"md.comp.filter-chip.unselected.dragged.label-text.color": "onSurfaceVariant",
"md.comp.filter-chip.unselected.dragged.state-layer.color": "onSurfaceVariant",
"md.comp.filter-chip.with-icon.selected.pressed.icon.color": "onSecondaryContainer",
"md.comp.filter-chip.with-icon.unselected.pressed.icon.color": "onSurfaceVariant",
"md.comp.filter-chip.selected.pressed.label-text.color": "onSecondaryContainer",
"md.comp.filter-chip.selected.pressed.state-layer.color": "onSurfaceVariant",
"md.comp.filter-chip.unselected.pressed.label-text.color": "onSurfaceVariant",
"md.comp.filter-chip.unselected.pressed.state-layer.color": "onSecondaryContainer",
"md.comp.filter-chip.with-icon.selected.focus.icon.color": "onSecondaryContainer",
"md.comp.filter-chip.with-icon.unselected.focus.icon.color": "onSurfaceVariant",
"md.comp.filter-chip.flat.unselected.focus.outline.color": "onSurfaceVariant",
"md.comp.filter-chip.selected.focus.label-text.color": "onSecondaryContainer",
"md.comp.filter-chip.selected.focus.state-layer.color": "onSecondaryContainer",
"md.comp.filter-chip.unselected.focus.label-text.color": "onSurfaceVariant",
"md.comp.filter-chip.unselected.focus.state-layer.color": "onSurfaceVariant",
"md.comp.filter-chip.with-icon.selected.hover.icon.color": "onSecondaryContainer",
"md.comp.filter-chip.with-icon.unselected.hover.icon.color": "onSurfaceVariant",
"md.comp.filter-chip.selected.hover.label-text.color": "onSecondaryContainer",
"md.comp.filter-chip.selected.hover.state-layer.color": "onSecondaryContainer",
"md.comp.filter-chip.unselected.hover.label-text.color": "onSurfaceVariant",
"md.comp.filter-chip.unselected.hover.state-layer.color": "onSurfaceVariant",
"md.comp.filter-chip.selected.dragged.state-layer.opacity": "md.sys.state.dragged.state-layer-opacity",
"md.comp.filter-chip.unselected.dragged.state-layer.opacity": "md.sys.state.dragged.state-layer-opacity",
"md.comp.filter-chip.selected.pressed.state-layer.opacity": "md.sys.state.pressed.state-layer-opacity",
"md.comp.filter-chip.unselected.pressed.state-layer.opacity": "md.sys.state.pressed.state-layer-opacity",
"md.comp.filter-chip.selected.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
"md.comp.filter-chip.unselected.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
"md.comp.filter-chip.selected.hover.state-layer.opacity": "md.sys.state.hover.state-layer-opacity",
"md.comp.filter-chip.unselected.hover.state-layer.opacity": "md.sys.state.hover.state-layer-opacity",
"md.comp.filter-chip.label-text.type": "labelText",
"md.comp.filter-chip.dragged.container.elevation": "md.sys.elevation.level4",
"md.comp.filter-chip.flat.unselected.pressed.container.elevation": "md.sys.elevation.level0",
"md.comp.filter-chip.flat.selected.pressed.container.elevation": "md.sys.elevation.level0",
"md.comp.filter-chip.elevated.pressed.container.elevation": "md.sys.elevation.level1",
"md.comp.filter-chip.flat.unselected.focus.container.elevation": "md.sys.elevation.level0",
"md.comp.filter-chip.flat.selected.focus.container.elevation": "md.sys.elevation.level0",
"md.comp.filter-chip.elevated.focus.container.elevation": "md.sys.elevation.level1",
"md.comp.filter-chip.flat.unselected.hover.container.elevation": "md.sys.elevation.level0",
"md.comp.filter-chip.flat.selected.hover.container.elevation": "md.sys.elevation.level1",
"md.comp.filter-chip.elevated.hover.container.elevation": "md.sys.elevation.level2",
"md.comp.filter-chip.elevated.disabled.container.opacity": 0.12,
"md.comp.filter-chip.elevated.disabled.container.color": "onSurface",
"md.comp.filter-chip.elevated.disabled.container.elevation": "md.sys.elevation.level0",
"md.comp.filter-chip.with-icon.disabled.icon.opacity": 0.38,
"md.comp.filter-chip.with-icon.disabled.icon.color": "onSurface",
"md.comp.filter-chip.flat.disabled.selected.container.opacity": 0.12,
"md.comp.filter-chip.flat.disabled.selected.container.color": "onSurface",
"md.comp.filter-chip.flat.disabled.unselected.outline.opacity": 0.12,
"md.comp.filter-chip.flat.disabled.unselected.outline.color": "onSurface",
"md.comp.filter-chip.disabled.label-text.opacity": 0.38,
"md.comp.filter-chip.disabled.label-text.color": "onSurface",
"md.comp.filter-chip.with-icon.selected.icon.color": "onSecondaryContainer",
"md.comp.filter-chip.with-icon.unselected.icon.color": "onSurfaceVariant",
"md.comp.filter-chip.with-icon.icon.size": {
"value": 18.0,
"units": "DIPS"
},
"md.comp.filter-chip.selected.label-text.color": "onSecondaryContainer",
"md.comp.filter-chip.unselected.label-text.color": "onSurfaceVariant",
"md.comp.filter-chip.elevated.selected.container.color": "secondaryContainer",
"md.comp.filter-chip.elevated.unselected.container.color": "surface",
"md.comp.filter-chip.elevated.container.elevation": "md.sys.elevation.level1",
"md.comp.filter-chip.flat.selected.outline.width": {
"value": 0.0,
"units": "DIPS"
},
"md.comp.filter-chip.flat.selected.container.color": "secondaryContainer",
"md.comp.filter-chip.flat.unselected.outline.width": {
"value": 1.0,
"units": "DIPS"
},
"md.comp.filter-chip.flat.unselected.outline.color": "outline",
"md.comp.filter-chip.flat.container.elevation": "md.sys.elevation.level0",
"md.comp.filter-chip.container.shadow-color": "shadow",
"md.comp.filter-chip.container.height": {
"value": 32.0,
"units": "DIPS"
},
"md.comp.input-chip.with-avatar.avatar.shape": "md.sys.shape.corner.full",
"md.comp.input-chip.container.shape": "md.sys.shape.corner.small",
"md.comp.input-chip.label-text.tracking": "labelLarge",
"md.comp.input-chip.label-text.weight": "labelLarge",
"md.comp.input-chip.label-text.size": "labelLarge",
"md.comp.input-chip.label-text.line-height": "labelLarge",
"md.comp.input-chip.label-text.font": "labelLarge",
"md.comp.input-chip.with-leading-icon.dragged.leading-icon.color": "onSurfaceVariant",
"md.comp.input-chip.with-trailing-icon.dragged.trailing-icon.color": "onSurfaceVariant",
"md.comp.input-chip.dragged.label-text.color": "onSurfaceVariant",
"md.comp.input-chip.dragged.state-layer.color": "onSurfaceVariant",
"md.comp.input-chip.with-leading-icon.pressed.leading-icon.color": "onSurfaceVariant",
"md.comp.input-chip.with-trailing-icon.pressed.trailing-icon.color": "onSurfaceVariant",
"md.comp.input-chip.pressed.label-text.color": "onSurfaceVariant",
"md.comp.input-chip.pressed.state-layer.color": "onSurfaceVariant",
"md.comp.input-chip.with-leading-icon.focus.leading-icon.color": "onSurfaceVariant",
"md.comp.input-chip.with-trailing-icon.focus.trailing-icon.color": "onSurfaceVariant",
"md.comp.input-chip.focus.outline.color": "onSurfaceVariant",
"md.comp.input-chip.focus.label-text.color": "onSurfaceVariant",
"md.comp.input-chip.focus.state-layer.color": "onSurfaceVariant",
"md.comp.input-chip.with-leading-icon.hover.leading-icon.color": "onSurfaceVariant",
"md.comp.input-chip.with-trailing-icon.hover.trailing-icon.color": "onSurfaceVariant",
"md.comp.input-chip.hover.label-text.color": "onSurfaceVariant",
"md.comp.input-chip.hover.state-layer.color": "onSurfaceVariant",
"md.comp.input-chip.dragged.state-layer.opacity": "md.sys.state.dragged.state-layer-opacity",
"md.comp.input-chip.pressed.state-layer.opacity": "md.sys.state.pressed.state-layer-opacity",
"md.comp.input-chip.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
"md.comp.input-chip.hover.state-layer.opacity": "md.sys.state.hover.state-layer-opacity",
"md.comp.input-chip.label-text.type": "labelText",
"md.comp.input-chip.with-trailing-icon.trailing-icon.color": "onSurfaceVariant",
"md.comp.input-chip.dragged.container.elevation": "md.sys.elevation.level4",
"md.comp.input-chip.with-avatar.disabled.avatar.opacity": 0.38,
"md.comp.input-chip.with-leading-icon.disabled.leading-icon.opacity": 0.38,
"md.comp.input-chip.with-leading-icon.disabled.leading-icon.color": "onSurface",
"md.comp.input-chip.with-trailing-icon.disabled.trailing-icon.opacity": 0.38,
"md.comp.input-chip.with-trailing-icon.disabled.trailing-icon.color": "onSurface",
"md.comp.input-chip.disabled.label-text.opacity": 0.38,
"md.comp.input-chip.disabled.label-text.color": "onSurface",
"md.comp.input-chip.disabled.outline.opacity": 0.12,
"md.comp.input-chip.disabled.outline.color": "onSurface",
"md.comp.input-chip.with-avatar.avatar.size": {
"value": 24.0,
"units": "DIPS"
},
"md.comp.input-chip.with-leading-icon.leading-icon.color": "onSurfaceVariant",
"md.comp.input-chip.with-leading-icon.leading-icon.size": {
"value": 18.0,
"units": "DIPS"
},
"md.comp.input-chip.with-trailing-icon.trailing-icon.size": {
"value": 18.0,
"units": "DIPS"
},
"md.comp.input-chip.label-text.color": "onSurfaceVariant",
"md.comp.input-chip.outline.width": {
"value": 1.0,
"units": "DIPS"
},
"md.comp.input-chip.outline.color": "outline",
"md.comp.input-chip.container.elevation": "md.sys.elevation.level0",
"md.comp.input-chip.container.height": {
"value": 32.0,
"units": "DIPS"
},
"md.comp.suggestion-chip.container.shape": "md.sys.shape.corner.small",
"md.comp.suggestion-chip.container.surface-tint-layer.color": "md.sys.elevation.surface-tint-color",
"md.comp.suggestion-chip.label-text.tracking": "labelLarge",
"md.comp.suggestion-chip.label-text.weight": "labelLarge",
"md.comp.suggestion-chip.label-text.size": "labelLarge",
"md.comp.suggestion-chip.label-text.line-height": "labelLarge",
"md.comp.suggestion-chip.label-text.font": "labelLarge",
"md.comp.suggestion-chip.dragged.label-text.color": "onSurfaceVariant",
"md.comp.suggestion-chip.dragged.state-layer.color": "onSurfaceVariant",
"md.comp.suggestion-chip.pressed.label-text.color": "onSurfaceVariant",
"md.comp.suggestion-chip.pressed.state-layer.color": "onSurfaceVariant",
"md.comp.suggestion-chip.flat.focus.outline.color": "onSurfaceVariant",
"md.comp.suggestion-chip.focus.label-text.color": "onSurfaceVariant",
"md.comp.suggestion-chip.focus.state-layer.color": "onSurfaceVariant",
"md.comp.suggestion-chip.hover.label-text.color": "onSurfaceVariant",
"md.comp.suggestion-chip.hover.state-layer.color": "onSurfaceVariant",
"md.comp.suggestion-chip.dragged.state-layer.opacity": "md.sys.state.dragged.state-layer-opacity",
"md.comp.suggestion-chip.pressed.state-layer.opacity": "md.sys.state.pressed.state-layer-opacity",
"md.comp.suggestion-chip.focus.state-layer.opacity": "md.sys.state.focus.state-layer-opacity",
"md.comp.suggestion-chip.hover.state-layer.opacity": "md.sys.state.hover.state-layer-opacity",
"md.comp.suggestion-chip.label-text.type": "labelText",
"md.comp.suggestion-chip.dragged.container.elevation": "md.sys.elevation.level4",
"md.comp.suggestion-chip.elevated.pressed.container.elevation": "md.sys.elevation.level1",
"md.comp.suggestion-chip.elevated.focus.container.elevation": "md.sys.elevation.level1",
"md.comp.suggestion-chip.elevated.hover.container.elevation": "md.sys.elevation.level2",
"md.comp.suggestion-chip.elevated.disabled.container.opacity": 0.12,
"md.comp.suggestion-chip.elevated.disabled.container.color": "onSurface",
"md.comp.suggestion-chip.elevated.disabled.container.elevation": "md.sys.elevation.level0",
"md.comp.suggestion-chip.disabled.label-text.opacity": 0.38,
"md.comp.suggestion-chip.disabled.label-text.color": "onSurface",
"md.comp.suggestion-chip.flat.disabled.outline.opacity": 0.12,
"md.comp.suggestion-chip.flat.disabled.outline.color": "onSurface",
"md.comp.suggestion-chip.label-text.color": "onSurfaceVariant",
"md.comp.suggestion-chip.elevated.container.shadow-color": "shadow",
"md.comp.suggestion-chip.elevated.container.color": "surface",
"md.comp.suggestion-chip.elevated.container.elevation": "md.sys.elevation.level1",
"md.comp.suggestion-chip.flat.outline.width": {
"value": 1.0,
"units": "DIPS"
},
"md.comp.suggestion-chip.flat.outline.color": "outline",
"md.comp.suggestion-chip.flat.container.elevation": "md.sys.elevation.level0",
"md.comp.suggestion-chip.container.height": {
"value": 32.0,
"units": "DIPS"
}
}
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'template.dart';
class FABTemplate extends TokenTemplate {
const FABTemplate(String fileName, Map<String, dynamic> tokens) : super(fileName, tokens);
@override
String generate() => '''
// Generated version ${tokens["version"]}, ${tokens["date"]}
class _M3Defaults extends FloatingActionButtonThemeData {
_M3Defaults(this.context, this.type, this.hasChild)
: _colors = Theme.of(context).colorScheme,
_textTheme = Theme.of(context).textTheme;
final BuildContext context;
final _FloatingActionButtonType type;
final bool hasChild;
final ColorScheme _colors;
final TextTheme _textTheme;
bool get _isExtended => type == _FloatingActionButtonType.extended;
@override Color? get foregroundColor => _colors.${color("md.comp.fab.primary.icon")};
@override Color? get backgroundColor => _colors.${color("md.comp.fab.primary.container")};
@override Color? get splashColor => _colors.${color("md.comp.fab.primary.pressed.state-layer")};
@override double get elevation => ${elevation("md.comp.fab.primary.container")};
@override Color? get focusColor => _colors.${color("md.comp.fab.primary.focus.state-layer")};
@override double get focusElevation => ${elevation("md.comp.fab.primary.focus.container")};
@override Color? get hoverColor => _colors.${color("md.comp.fab.primary.hover.state-layer")};
@override double get hoverElevation => ${elevation("md.comp.fab.primary.hover.container")};
@override double get highlightElevation => ${elevation("md.comp.fab.primary.pressed.container")};
@override
ShapeBorder? get shape {
switch (type) {
case _FloatingActionButtonType.regular:
return ${shape("md.comp.fab.primary.container.shape")};
case _FloatingActionButtonType.small:
return ${shape("md.comp.fab.primary.small.container.shape")};
case _FloatingActionButtonType.large:
return ${shape("md.comp.fab.primary.large.container.shape")};
case _FloatingActionButtonType.extended:
return ${shape("md.comp.extended-fab.primary.container.shape")};
}
}
@override bool? get enableFeedback => true;
@override
double? get iconSize {
switch (type) {
case _FloatingActionButtonType.regular: return ${value("md.comp.fab.primary.icon.size")};
case _FloatingActionButtonType.small: return ${value("md.comp.fab.primary.small.icon.size")};
case _FloatingActionButtonType.large: return ${value("md.comp.fab.primary.large.icon.size")};
case _FloatingActionButtonType.extended: return ${value("md.comp.extended-fab.primary.icon.size")};
}
}
@override
BoxConstraints? get sizeConstraints => const BoxConstraints.tightFor(
width: ${value("md.comp.fab.primary.container.width")},
height: ${value("md.comp.fab.primary.container.height")},
);
@override
BoxConstraints? get smallSizeConstraints => const BoxConstraints.tightFor(
width: ${value("md.comp.fab.primary.small.container.width")},
height: ${value("md.comp.fab.primary.small.container.height")},
);
@override
BoxConstraints? get largeSizeConstraints => const BoxConstraints.tightFor(
width: ${value("md.comp.fab.primary.large.container.width")},
height: ${value("md.comp.fab.primary.large.container.height")},
);
@override
BoxConstraints? get extendedSizeConstraints => const BoxConstraints.tightFor(
height: ${value("md.comp.extended-fab.primary.container.height")},
);
@override double? get extendedIconLabelSpacing => 8.0;
@override EdgeInsetsGeometry? get extendedPadding => EdgeInsetsDirectional.only(start: hasChild && _isExtended ? 16.0 : 20.0, end: 20.0);
@override TextStyle? get extendedTextStyle => _textTheme.${textStyle("md.comp.extended-fab.primary.label-text")};
}
''';
}
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:io';
abstract class TokenTemplate {
const TokenTemplate(this.fileName, this.tokens);
static const String beginGeneratedComment = '''
// BEGIN GENERATED TOKEN PROPERTIES
''';
static const String headerComment = '''
// Generated code to the end of this file. Do not edit by hand.
// These defaults are generated from the Material Design Token
// database by the script dev/tools/gen_defaults/bin/gen_defaults.dart.
''';
static const String endGeneratedComment = '''
// END GENERATED TOKEN PROPERTIES
''';
final String fileName;
final Map<String, dynamic> tokens;
/// Replace or append the contents of the file with the text from [generate].
///
/// If the file already contains generated block at the end, it will
/// be replaced by the [generate] output. Otherwise the content will
/// just be appended to the end of the file.
Future<void> updateFile() async {
String contents = File(fileName).readAsStringSync();
final int previousGeneratedIndex = contents.indexOf(beginGeneratedComment);
if (previousGeneratedIndex != -1) {
contents = contents.substring(0, previousGeneratedIndex);
}
final StringBuffer buffer = StringBuffer(contents);
buffer.write(beginGeneratedComment);
buffer.write(headerComment);
buffer.write(generate());
buffer.write(endGeneratedComment);
File(fileName).writeAsStringSync(buffer.toString());
}
/// Provide the generated content for the template.
///
/// This abstract method needs to be implemented by subclasses
/// to provide the content that [updateFile] will append to the
/// bottom of the file.
String generate();
String color(String tokenName) {
final String tokenColor = '$tokenName.color';
final String tokenOpacity = '$tokenName.opacity';
String value = '${tokens[tokenColor]!}';
if (tokens.containsKey(tokenOpacity)) {
final String opacity = tokens[tokens[tokenOpacity]!]!.toString();
value += '.withOpacity($opacity)';
}
return value;
}
String elevation(String tokenName) {
final String elevationName = '$tokenName.elevation';
final Map<String, dynamic> elevationValue = tokens[tokens[elevationName]!]! as Map<String, dynamic>;
return elevationValue['value']!.toString();
}
String shape(String tokenName) {
// TODO(darrenaustin): handle more than just rounded rectangle shapes
final String shapeToken = tokens[tokenName]! as String;
final Map<String, dynamic> shape = tokens[shapeToken]! as Map<String, dynamic>;
final Map<String, dynamic> shapeValue = shape['value']! as Map<String, dynamic>;
return 'const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(${shapeValue['value']!})))';
}
String value(String tokenName) {
final Map<String, dynamic> value = tokens[tokenName]! as Map<String, dynamic>;
return value['value'].toString();
}
String textStyle(String tokenName) {
final String fontName = '$tokenName.font';
return tokens[fontName]!.toString();
}
}
name: gen_defaults
description: A command line script to generate Material component defaults from the token database.
version: 1.0.0
environment:
sdk: ">=2.12.0-0 <3.0.0"
dependencies:
async: 2.8.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
charcode: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
collection: 1.15.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
http_parser: 4.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
source_span: 1.8.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
string_scanner: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
term_glyph: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
typed_data: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dev_dependencies:
path: 1.8.0
test: 1.19.5
_fe_analyzer_shared: 31.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
analyzer: 2.8.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
cli_util: 0.3.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
convert: 3.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
coverage: 1.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
crypto: 3.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
file: 6.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
frontend_server_client: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
glob: 2.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
http_multi_server: 3.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
io: 1.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
js: 0.6.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
logging: 1.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
matcher: 0.12.11 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
mime: 1.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
node_preamble: 2.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
package_config: 2.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
pool: 1.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
pub_semver: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
shelf: 1.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
shelf_packages_handler: 3.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
shelf_static: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
shelf_web_socket: 1.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
source_map_stack_trace: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
source_maps: 0.10.10 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
stack_trace: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
stream_channel: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
test_core: 0.4.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
vm_service: 7.5.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
watcher: 1.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
web_socket_channel: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
webkit_inspection_protocol: 1.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
yaml: 3.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
# PUBSPEC CHECKSUM: aa20
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:io';
import 'package:gen_defaults/template.dart';
import 'package:path/path.dart' as path;
import 'package:test/test.dart';
void main() {
test('Templates will append to the end of a file', () {
final Directory tempDir = Directory.systemTemp.createTempSync('gen_defaults');
try {
// Create a temporary file with some content.
final File tempFile = File(path.join(tempDir.path, 'test_template.txt'));
tempFile.createSync();
tempFile.writeAsStringSync('''
// This is a file with stuff in it.
// This part shouldn't be changed by
// the template.
''');
// Have a test template append new parameterized content to the end of
// the file.
final Map<String, dynamic> tokens = <String, dynamic>{'foo': 'Foobar', 'bar': 'Barfoo'};
TestTemplate(tempFile.path, tokens).updateFile();
expect(tempFile.readAsStringSync(), '''
// This is a file with stuff in it.
// This part shouldn't be changed by
// the template.
// BEGIN GENERATED TOKEN PROPERTIES
// Generated code to the end of this file. Do not edit by hand.
// These defaults are generated from the Material Design Token
// database by the script dev/tools/gen_defaults/bin/gen_defaults.dart.
static final String tokenFoo = 'Foobar';
static final String tokenBar = 'Barfoo';
// END GENERATED TOKEN PROPERTIES
''');
} finally {
tempDir.deleteSync(recursive: true);
}
});
test('Templates will update over previously generated code at the end of a file', () {
final Directory tempDir = Directory.systemTemp.createTempSync('gen_defaults');
try {
// Create a temporary file with some content.
final File tempFile = File(path.join(tempDir.path, 'test_template.txt'));
tempFile.createSync();
tempFile.writeAsStringSync('''
// This is a file with stuff in it.
// This part shouldn't be changed by
// the template.
// BEGIN GENERATED TOKEN PROPERTIES
// Generated code to the end of this file. Do not edit by hand.
// These defaults are generated from the Material Design Token
// database by the script dev/tools/gen_defaults/bin/gen_defaults.dart.
static final String tokenFoo = 'Foobar';
static final String tokenBar = 'Barfoo';
// END GENERATED TOKEN PROPERTIES
''');
// Have a test template append new parameterized content to the end of
// the file.
final Map<String, dynamic> tokens = <String, dynamic>{'foo': 'foo', 'bar': 'bar'};
TestTemplate(tempFile.path, tokens).updateFile();
expect(tempFile.readAsStringSync(), '''
// This is a file with stuff in it.
// This part shouldn't be changed by
// the template.
// BEGIN GENERATED TOKEN PROPERTIES
// Generated code to the end of this file. Do not edit by hand.
// These defaults are generated from the Material Design Token
// database by the script dev/tools/gen_defaults/bin/gen_defaults.dart.
static final String tokenFoo = 'foo';
static final String tokenBar = 'bar';
// END GENERATED TOKEN PROPERTIES
''');
} finally {
tempDir.deleteSync(recursive: true);
}
});
}
class TestTemplate extends TokenTemplate {
TestTemplate(String fileName, Map<String, dynamic> tokens) : super(fileName, tokens);
@override
String generate() => '''
static final String tokenFoo = '${tokens['foo']}';
static final String tokenBar = '${tokens['bar']}';
''';
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment