Skip to content

Commit 37bc5d6

Browse files
authored
[material_ui] Add Material tokens (version 38.2.50) (#12471)
Export the Material tokens to `material_ui`. This PR simply exports the existing tokens from g3 to Github. Work towards flutter/flutter#186906 ## Pre-Review Checklist **Test exemption:** All generated code. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
1 parent 1489576 commit 37bc5d6

163 files changed

Lines changed: 16876 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
// Copyright 2013 The Flutter Authors
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
// Version: 38.2.31
6+
7+
// dart format off
8+
import 'color_role.dart';
9+
import 'shape_struct.dart';
10+
11+
class TokenAppBar {
12+
/// md.comp.app-bar.avatar.size
13+
static const double avatarSize = 32.00;
14+
15+
/// md.comp.app-bar.container.color
16+
static const TokenColorRole containerColor = TokenColorRole.surface;
17+
18+
/// md.comp.app-bar.container.elevation
19+
static const double containerElevation = 0.00;
20+
21+
/// md.comp.app-bar.container.shape
22+
static const ShapeStruct containerShape = ShapeStruct(
23+
family: 'SHAPE_FAMILY_ROUNDED_CORNERS',
24+
topLeft: 0.00,
25+
topRight: 0.00,
26+
bottomLeft: 0.00,
27+
bottomRight: 0.00,
28+
);
29+
30+
/// md.comp.app-bar.icon-button-space
31+
static const double iconButtonSpace = 0.00;
32+
33+
/// md.comp.app-bar.icon.size
34+
static const double iconSize = 24.00;
35+
36+
/// md.comp.app-bar.leading-icon.color
37+
static const TokenColorRole leadingIconColor = TokenColorRole.onSurface;
38+
39+
/// md.comp.app-bar.leading-space
40+
static const double leadingSpace = 4.00;
41+
42+
/// md.comp.app-bar.on-scroll.container.color
43+
static const TokenColorRole onScrollContainerColor =
44+
TokenColorRole.surfaceContainer;
45+
46+
/// md.comp.app-bar.on-scroll.container.elevation
47+
static const double onScrollContainerElevation = 3.00;
48+
49+
/// md.comp.app-bar.search.container.color
50+
static const TokenColorRole searchContainerColor =
51+
TokenColorRole.surfaceContainer;
52+
53+
/// md.comp.app-bar.search.label.color
54+
static const TokenColorRole searchLabelColor =
55+
TokenColorRole.onSurfaceVariant;
56+
57+
/// md.comp.app-bar.search.leading-space
58+
static const double searchLeadingSpace = 8.00;
59+
60+
/// md.comp.app-bar.search.on-scroll.container.color
61+
static const TokenColorRole searchOnScrollContainerColor =
62+
TokenColorRole.surfaceContainerHighest;
63+
64+
/// md.comp.app-bar.search.trailing-space
65+
static const double searchTrailingSpace = 8.00;
66+
67+
/// md.comp.app-bar.subtitle.color
68+
static const TokenColorRole subtitleColor = TokenColorRole.onSurfaceVariant;
69+
70+
/// md.comp.app-bar.title.color
71+
static const TokenColorRole titleColor = TokenColorRole.onSurface;
72+
73+
/// md.comp.app-bar.trailing-icon.color
74+
static const TokenColorRole trailingIconColor =
75+
TokenColorRole.onSurfaceVariant;
76+
77+
/// md.comp.app-bar.trailing-space
78+
static const double trailingSpace = 4.00;
79+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2013 The Flutter Authors
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
// Version: 38.2.31
6+
7+
// dart format off
8+
import 'typescale.dart';
9+
import 'typescale_struct.dart';
10+
11+
class TokenAppBarLarge {
12+
/// md.comp.app-bar.large.container.height
13+
static const double containerHeight = 152.00;
14+
15+
/// md.comp.app-bar.large.title.font
16+
static const TypescaleStruct titleFont = TokenTypescale.headlineMedium;
17+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright 2013 The Flutter Authors
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
// Version: 38.2.31
6+
7+
// dart format off
8+
import 'typescale.dart';
9+
import 'typescale_struct.dart';
10+
11+
class TokenAppBarLargeFlexible {
12+
/// md.comp.app-bar.large-flexible.container.height
13+
static const double containerHeight = 120.00;
14+
15+
/// md.comp.app-bar.large-flexible.subtitle.font
16+
static const TypescaleStruct subtitleFont = TokenTypescale.titleMedium;
17+
18+
/// md.comp.app-bar.large-flexible.title.font
19+
static const TypescaleStruct titleFont = TokenTypescale.displaySmall;
20+
21+
/// md.comp.app-bar.large-flexible.with-subtitle.container.height
22+
static const double withSubtitleContainerHeight = 152.00;
23+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2013 The Flutter Authors
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
// Version: 38.2.31
6+
7+
// dart format off
8+
import 'typescale.dart';
9+
import 'typescale_struct.dart';
10+
11+
class TokenAppBarMedium {
12+
/// md.comp.app-bar.medium.container.height
13+
static const double containerHeight = 112.00;
14+
15+
/// md.comp.app-bar.medium.title.font
16+
static const TypescaleStruct titleFont = TokenTypescale.headlineSmall;
17+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright 2013 The Flutter Authors
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
// Version: 38.2.31
6+
7+
// dart format off
8+
import 'typescale.dart';
9+
import 'typescale_struct.dart';
10+
11+
class TokenAppBarMediumFlexible {
12+
/// md.comp.app-bar.medium-flexible.container.height
13+
static const double containerHeight = 112.00;
14+
15+
/// md.comp.app-bar.medium-flexible.subtitle.font
16+
static const TypescaleStruct subtitleFont = TokenTypescale.labelLarge;
17+
18+
/// md.comp.app-bar.medium-flexible.title.font
19+
static const TypescaleStruct titleFont = TokenTypescale.headlineMedium;
20+
21+
/// md.comp.app-bar.medium-flexible.with-subtitle.container.height
22+
static const double withSubtitleContainerHeight = 136.00;
23+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Copyright 2013 The Flutter Authors
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
// Version: 38.2.31
6+
7+
// dart format off
8+
import 'shape_struct.dart';
9+
import 'typescale.dart';
10+
import 'typescale_struct.dart';
11+
12+
class TokenAppBarSmall {
13+
/// md.comp.app-bar.small.container.height
14+
static const double containerHeight = 64.00;
15+
16+
/// md.comp.app-bar.small.search.container.height
17+
static const double searchContainerHeight = 56.00;
18+
19+
/// md.comp.app-bar.small.search.container.shape
20+
static const ShapeStruct searchContainerShape = ShapeStruct(
21+
family: 'SHAPE_FAMILY_CIRCULAR',
22+
topLeft: 0.00,
23+
topRight: 0.00,
24+
bottomLeft: 0.00,
25+
bottomRight: 0.00,
26+
);
27+
28+
/// md.comp.app-bar.small.search.label-text.font
29+
static const TypescaleStruct searchLabelTextFont = TokenTypescale.bodyLarge;
30+
31+
/// md.comp.app-bar.small.subtitle.font
32+
static const TypescaleStruct subtitleFont = TokenTypescale.labelMedium;
33+
34+
/// md.comp.app-bar.small.title.font
35+
static const TypescaleStruct titleFont = TokenTypescale.titleLarge;
36+
}
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
// Copyright 2013 The Flutter Authors
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
// Version: 38.2.31
6+
7+
// dart format off
8+
import 'color_role.dart';
9+
import 'shape_struct.dart';
10+
import 'typescale.dart';
11+
import 'typescale_struct.dart';
12+
13+
class TokenAssistChip {
14+
/// md.comp.assist-chip.container.height
15+
static const double containerHeight = 32.00;
16+
17+
/// md.comp.assist-chip.container.shape
18+
static const ShapeStruct containerShape = ShapeStruct(
19+
family: 'SHAPE_FAMILY_ROUNDED_CORNERS',
20+
topLeft: 8.00,
21+
topRight: 8.00,
22+
bottomLeft: 8.00,
23+
bottomRight: 8.00,
24+
);
25+
26+
/// md.comp.assist-chip.disabled.label-text.color
27+
static const TokenColorRole disabledLabelTextColor = TokenColorRole.onSurface;
28+
29+
/// md.comp.assist-chip.disabled.label-text.opacity
30+
static const double disabledLabelTextOpacity = 0.38;
31+
32+
/// md.comp.assist-chip.dragged.container.elevation
33+
static const double draggedContainerElevation = 8.00;
34+
35+
/// md.comp.assist-chip.dragged.label-text.color
36+
static const TokenColorRole draggedLabelTextColor = TokenColorRole.onSurface;
37+
38+
/// md.comp.assist-chip.dragged.state-layer.color
39+
static const TokenColorRole draggedStateLayerColor = TokenColorRole.onSurface;
40+
41+
/// md.comp.assist-chip.dragged.state-layer.opacity
42+
static const double draggedStateLayerOpacity = 0.16;
43+
44+
/// md.comp.assist-chip.elevated.container.color
45+
static const TokenColorRole elevatedContainerColor =
46+
TokenColorRole.surfaceContainerLow;
47+
48+
/// md.comp.assist-chip.elevated.container.elevation
49+
static const double elevatedContainerElevation = 1.00;
50+
51+
/// md.comp.assist-chip.elevated.container.shadow-color
52+
static const TokenColorRole elevatedContainerShadowColor =
53+
TokenColorRole.shadow;
54+
55+
/// md.comp.assist-chip.elevated.disabled.container.color
56+
static const TokenColorRole elevatedDisabledContainerColor =
57+
TokenColorRole.onSurface;
58+
59+
/// md.comp.assist-chip.elevated.disabled.container.elevation
60+
static const double elevatedDisabledContainerElevation = 0.00;
61+
62+
/// md.comp.assist-chip.elevated.disabled.container.opacity
63+
static const double elevatedDisabledContainerOpacity = 0.12;
64+
65+
/// md.comp.assist-chip.elevated.focus.container.elevation
66+
static const double elevatedFocusContainerElevation = 1.00;
67+
68+
/// md.comp.assist-chip.elevated.hover.container.elevation
69+
static const double elevatedHoverContainerElevation = 3.00;
70+
71+
/// md.comp.assist-chip.elevated.pressed.container.elevation
72+
static const double elevatedPressedContainerElevation = 1.00;
73+
74+
/// md.comp.assist-chip.flat.container.elevation
75+
static const double flatContainerElevation = 0.00;
76+
77+
/// md.comp.assist-chip.flat.disabled.outline.color
78+
static const TokenColorRole flatDisabledOutlineColor =
79+
TokenColorRole.onSurface;
80+
81+
/// md.comp.assist-chip.flat.disabled.outline.opacity
82+
static const double flatDisabledOutlineOpacity = 0.12;
83+
84+
/// md.comp.assist-chip.flat.focus.outline.color
85+
static const TokenColorRole flatFocusOutlineColor = TokenColorRole.onSurface;
86+
87+
/// md.comp.assist-chip.flat.outline.color
88+
static const TokenColorRole flatOutlineColor = TokenColorRole.outlineVariant;
89+
90+
/// md.comp.assist-chip.flat.outline.width
91+
static const double flatOutlineWidth = 1.00;
92+
93+
/// md.comp.assist-chip.focus.indicator.color
94+
static const TokenColorRole focusIndicatorColor = TokenColorRole.secondary;
95+
96+
/// md.comp.assist-chip.focus.indicator.outline.offset
97+
static const double focusIndicatorOutlineOffset = 2.00;
98+
99+
/// md.comp.assist-chip.focus.indicator.thickness
100+
static const double focusIndicatorThickness = 3.00;
101+
102+
/// md.comp.assist-chip.focus.label-text.color
103+
static const TokenColorRole focusLabelTextColor = TokenColorRole.onSurface;
104+
105+
/// md.comp.assist-chip.focus.state-layer.color
106+
static const TokenColorRole focusStateLayerColor = TokenColorRole.onSurface;
107+
108+
/// md.comp.assist-chip.focus.state-layer.opacity
109+
static const double focusStateLayerOpacity = 0.10;
110+
111+
/// md.comp.assist-chip.hover.label-text.color
112+
static const TokenColorRole hoverLabelTextColor = TokenColorRole.onSurface;
113+
114+
/// md.comp.assist-chip.hover.state-layer.color
115+
static const TokenColorRole hoverStateLayerColor = TokenColorRole.onSurface;
116+
117+
/// md.comp.assist-chip.hover.state-layer.opacity
118+
static const double hoverStateLayerOpacity = 0.08;
119+
120+
/// md.comp.assist-chip.label-text.color
121+
static const TokenColorRole labelTextColor = TokenColorRole.onSurface;
122+
123+
/// md.comp.assist-chip.label-text.type
124+
static const TypescaleStruct labelTextType = TokenTypescale.labelLarge;
125+
126+
/// md.comp.assist-chip.pressed.label-text.color
127+
static const TokenColorRole pressedLabelTextColor = TokenColorRole.onSurface;
128+
129+
/// md.comp.assist-chip.pressed.state-layer.color
130+
static const TokenColorRole pressedStateLayerColor = TokenColorRole.onSurface;
131+
132+
/// md.comp.assist-chip.pressed.state-layer.opacity
133+
static const double pressedStateLayerOpacity = 0.10;
134+
135+
/// md.comp.assist-chip.with-icon.disabled.icon.color
136+
static const TokenColorRole withIconDisabledIconColor =
137+
TokenColorRole.onSurface;
138+
139+
/// md.comp.assist-chip.with-icon.disabled.icon.opacity
140+
static const double withIconDisabledIconOpacity = 0.38;
141+
142+
/// md.comp.assist-chip.with-icon.dragged.icon.color
143+
static const TokenColorRole withIconDraggedIconColor = TokenColorRole.primary;
144+
145+
/// md.comp.assist-chip.with-icon.focus.icon.color
146+
static const TokenColorRole withIconFocusIconColor = TokenColorRole.primary;
147+
148+
/// md.comp.assist-chip.with-icon.hover.icon.color
149+
static const TokenColorRole withIconHoverIconColor = TokenColorRole.primary;
150+
151+
/// md.comp.assist-chip.with-icon.icon.color
152+
static const TokenColorRole withIconIconColor = TokenColorRole.primary;
153+
154+
/// md.comp.assist-chip.with-icon.icon.size
155+
static const double withIconIconSize = 18.00;
156+
157+
/// md.comp.assist-chip.with-icon.pressed.icon.color
158+
static const TokenColorRole withIconPressedIconColor = TokenColorRole.primary;
159+
}

0 commit comments

Comments
 (0)