Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/material_ui/tool/gen_defaults/data/app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Version: 38.0.15
// Version: 38.0.58

import 'color_role.dart';
import 'shape_struct.dart';
Expand Down
12 changes: 3 additions & 9 deletions packages/material_ui/tool/gen_defaults/data/app_bar_large.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Version: 38.0.15
// Version: 38.0.58

import 'typescale_struct.dart';
import 'typescale.dart';

class TokenAppBarLarge {
/// md.comp.app-bar.large.container.height
static const double containerHeight = 152.00;

/// md.comp.app-bar.large.title.font
static const TypescaleStruct titleFont = TypescaleStruct(
fontFamily: 'Roboto',
fontSize: 28.00,
fontWeight: 400,
lineHeight: 36.00,
letterSpacing: 0.00,
);
static const TypescaleStruct titleFont = TokenTypescale.headlineMedium;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Version: 38.0.15
// Version: 38.0.58

import 'typescale_struct.dart';
import 'typescale.dart';

class TokenAppBarLargeFlexible {
/// md.comp.app-bar.large-flexible.container.height
static const double containerHeight = 120.00;

/// md.comp.app-bar.large-flexible.subtitle.font
static const TypescaleStruct subtitleFont = TypescaleStruct(
fontFamily: 'Roboto',
fontSize: 16.00,
fontWeight: 500,
lineHeight: 24.00,
letterSpacing: 0.15,
);
static const TypescaleStruct subtitleFont = TokenTypescale.titleMedium;

/// md.comp.app-bar.large-flexible.title.font
static const TypescaleStruct titleFont = TypescaleStruct(
fontFamily: 'Roboto',
fontSize: 36.00,
fontWeight: 400,
lineHeight: 44.00,
letterSpacing: 0.00,
);
static const TypescaleStruct titleFont = TokenTypescale.displaySmall;

/// md.comp.app-bar.large-flexible.with-subtitle.container.height
static const double withSubtitleContainerHeight = 152.00;
Expand Down
12 changes: 3 additions & 9 deletions packages/material_ui/tool/gen_defaults/data/app_bar_medium.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Version: 38.0.15
// Version: 38.0.58

import 'typescale_struct.dart';
import 'typescale.dart';

class TokenAppBarMedium {
/// md.comp.app-bar.medium.container.height
static const double containerHeight = 112.00;

/// md.comp.app-bar.medium.title.font
static const TypescaleStruct titleFont = TypescaleStruct(
fontFamily: 'Roboto',
fontSize: 24.00,
fontWeight: 400,
lineHeight: 32.00,
letterSpacing: 0.00,
);
static const TypescaleStruct titleFont = TokenTypescale.headlineSmall;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Version: 38.0.15
// Version: 38.0.58

import 'typescale_struct.dart';
import 'typescale.dart';

class TokenAppBarMediumFlexible {
/// md.comp.app-bar.medium-flexible.container.height
static const double containerHeight = 112.00;

/// md.comp.app-bar.medium-flexible.subtitle.font
static const TypescaleStruct subtitleFont = TypescaleStruct(
fontFamily: 'Roboto',
fontSize: 14.00,
fontWeight: 500,
lineHeight: 20.00,
letterSpacing: 0.10,
);
static const TypescaleStruct subtitleFont = TokenTypescale.labelLarge;

/// md.comp.app-bar.medium-flexible.title.font
static const TypescaleStruct titleFont = TypescaleStruct(
fontFamily: 'Roboto',
fontSize: 28.00,
fontWeight: 400,
lineHeight: 36.00,
letterSpacing: 0.00,
);
static const TypescaleStruct titleFont = TokenTypescale.headlineMedium;

/// md.comp.app-bar.medium-flexible.with-subtitle.container.height
static const double withSubtitleContainerHeight = 136.00;
Expand Down
28 changes: 5 additions & 23 deletions packages/material_ui/tool/gen_defaults/data/app_bar_small.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Version: 38.0.15
// Version: 38.0.58

import 'shape_struct.dart';
import 'typescale_struct.dart';
import 'typescale.dart';

class TokenAppBarSmall {
/// md.comp.app-bar.small.container.height
Expand All @@ -24,29 +24,11 @@ class TokenAppBarSmall {
);

/// md.comp.app-bar.small.search.label-text.font
static const TypescaleStruct searchLabelTextFont = TypescaleStruct(
fontFamily: 'Roboto',
fontSize: 16.00,
fontWeight: 400,
lineHeight: 24.00,
letterSpacing: 0.50,
);
static const TypescaleStruct searchLabelTextFont = TokenTypescale.bodyLarge;

/// md.comp.app-bar.small.subtitle.font
static const TypescaleStruct subtitleFont = TypescaleStruct(
fontFamily: 'Roboto',
fontSize: 12.00,
fontWeight: 500,
lineHeight: 16.00,
letterSpacing: 0.50,
);
static const TypescaleStruct subtitleFont = TokenTypescale.labelMedium;

/// md.comp.app-bar.small.title.font
static const TypescaleStruct titleFont = TypescaleStruct(
fontFamily: 'Roboto',
fontSize: 22.00,
fontWeight: 400,
lineHeight: 28.00,
letterSpacing: 0.00,
);
static const TypescaleStruct titleFont = TokenTypescale.titleLarge;
}
12 changes: 3 additions & 9 deletions packages/material_ui/tool/gen_defaults/data/assist_chip.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Version: 38.0.15
// Version: 38.0.58

import 'color_role.dart';
import 'shape_struct.dart';
import 'typescale_struct.dart';
import 'typescale.dart';

class TokenAssistChip {
/// md.comp.assist-chip.container.height
Expand Down Expand Up @@ -119,13 +119,7 @@ class TokenAssistChip {
static const TokenColorRole labelTextColor = TokenColorRole.onSurface;

/// md.comp.assist-chip.label-text.type
static const TypescaleStruct labelTextType = TypescaleStruct(
fontFamily: 'Roboto',
fontSize: 14.00,
fontWeight: 500,
lineHeight: 20.00,
letterSpacing: 0.10,
);
static const TypescaleStruct labelTextType = TokenTypescale.labelLarge;

/// md.comp.assist-chip.pressed.label-text.color
static const TokenColorRole pressedLabelTextColor = TokenColorRole.onSurface;
Expand Down
12 changes: 3 additions & 9 deletions packages/material_ui/tool/gen_defaults/data/badge.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Version: 38.0.15
// Version: 38.0.58

import 'color_role.dart';
import 'shape_struct.dart';
import 'typescale_struct.dart';
import 'typescale.dart';

class TokenBadge {
/// md.comp.badge.color
Expand All @@ -19,13 +19,7 @@ class TokenBadge {
static const TokenColorRole largeLabelTextColor = TokenColorRole.onError;

/// md.comp.badge.large.label-text.type
static const TypescaleStruct largeLabelTextType = TypescaleStruct(
fontFamily: 'Roboto',
fontSize: 11.00,
fontWeight: 500,
lineHeight: 16.00,
letterSpacing: 0.50,
);
static const TypescaleStruct largeLabelTextType = TokenTypescale.labelSmall;

/// md.comp.badge.large.shape
static const ShapeStruct largeShape = ShapeStruct(
Expand Down
12 changes: 3 additions & 9 deletions packages/material_ui/tool/gen_defaults/data/banner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Version: 38.0.15
// Version: 38.0.58

import 'color_role.dart';
import 'shape_struct.dart';
import 'typescale_struct.dart';
import 'typescale.dart';

class TokenBanner {
/// md.comp.banner.container.color
Expand Down Expand Up @@ -48,13 +48,7 @@ class TokenBanner {
TokenColorRole.onSurfaceVariant;

/// md.comp.banner.supporting-text.type
static const TypescaleStruct supportingTextType = TypescaleStruct(
fontFamily: 'Roboto',
fontSize: 14.00,
fontWeight: 400,
lineHeight: 20.00,
letterSpacing: 0.25,
);
static const TypescaleStruct supportingTextType = TokenTypescale.bodyMedium;

/// md.comp.banner.with-image.image.shape
static const ShapeStruct withImageImageShape = ShapeStruct(
Expand Down
2 changes: 1 addition & 1 deletion packages/material_ui/tool/gen_defaults/data/banners.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Version: 38.0.15
// Version: 38.0.58

import 'color_role.dart';

Expand Down
12 changes: 3 additions & 9 deletions packages/material_ui/tool/gen_defaults/data/banners_basic.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Version: 38.0.15
// Version: 38.0.58

import 'shape_struct.dart';
import 'typescale_struct.dart';
import 'typescale.dart';

class TokenBannersBasic {
/// md.comp.banners.basic.actions.between-space
Expand Down Expand Up @@ -39,13 +39,7 @@ class TokenBannersBasic {
static const double bodyTextTrailingSpace = 48.00;

/// md.comp.banners.basic.body-text.type
static const TypescaleStruct bodyTextType = TypescaleStruct(
fontFamily: 'Roboto',
fontSize: 14.00,
fontWeight: 400,
lineHeight: 20.00,
letterSpacing: 0.25,
);
static const TypescaleStruct bodyTextType = TokenTypescale.bodyMedium;

/// md.comp.banners.basic.bottom-space
static const double bottomSpace = 4.00;
Expand Down
21 changes: 5 additions & 16 deletions packages/material_ui/tool/gen_defaults/data/banners_rich.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Version: 38.0.15
// Version: 38.0.58

import 'shape_struct.dart';
import 'typescale_struct.dart';
import 'typescale.dart';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Import typescale_emphasized.dart to resolve the reference to TokenTypescaleEmphasized used for titleTextType.

Suggested change
import 'typescale.dart';
import 'typescale.dart';
import 'typescale_emphasized.dart';


class TokenBannersRich {
/// md.comp.banners.rich.actions.between-space
Expand Down Expand Up @@ -39,13 +39,7 @@ class TokenBannersRich {
static const double bodyTextTrailingSpace = 48.00;

/// md.comp.banners.rich.body-text.type
static const TypescaleStruct bodyTextType = TypescaleStruct(
fontFamily: 'Roboto',
fontSize: 14.00,
fontWeight: 400,
lineHeight: 20.00,
letterSpacing: 0.25,
);
static const TypescaleStruct bodyTextType = TokenTypescale.bodyMedium;

/// md.comp.banners.rich.bottom-space
static const double bottomSpace = 12.00;
Expand Down Expand Up @@ -111,13 +105,8 @@ class TokenBannersRich {
static const double titleTextTrailingSpace = 0.00;

/// md.comp.banners.rich.title-text.type
static const TypescaleStruct titleTextType = TypescaleStruct(
fontFamily: 'Roboto',
fontSize: 14.00,
fontWeight: 500,
lineHeight: 20.00,
letterSpacing: 0.25,
);
static const TypescaleStruct titleTextType =
TokenTypescale.emphasizedBodyMedium;
Comment on lines +108 to +109

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

emphasizedBodyMedium is defined in TokenTypescaleEmphasized (from typescale_emphasized.dart), not TokenTypescale. Referencing it on TokenTypescale will cause a compilation error.

Suggested change
static const TypescaleStruct titleTextType =
TokenTypescale.emphasizedBodyMedium;
static const TypescaleStruct titleTextType =
TokenTypescaleEmphasized.emphasizedBodyMedium;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm good catch... 3P MD website doesn't have banner. In Carbon, rich Banner text style for 3p doesn't have values.

Screenshot 2026-07-17 at 12 54 32 PM


/// md.comp.banners.rich.top-space
static const double topSpace = 12.00;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Version: 38.0.15
// Version: 38.0.58

import 'color_role.dart';
import 'shape_struct.dart';
Expand Down
12 changes: 3 additions & 9 deletions packages/material_ui/tool/gen_defaults/data/button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Version: 38.0.15
// Version: 38.0.58

import 'color_role.dart';
import 'shape_struct.dart';
import 'typescale_struct.dart';
import 'typescale.dart';

class TokenButton {
/// md.comp.button.container.color
Expand Down Expand Up @@ -106,13 +106,7 @@ class TokenButton {
static const double iconSize = 20.00;

/// md.comp.button.label-text
static const TypescaleStruct labelText = TypescaleStruct(
fontFamily: 'Roboto',
fontSize: 14.00,
fontWeight: 500,
lineHeight: 20.00,
letterSpacing: 0.10,
);
static const TypescaleStruct labelText = TokenTypescale.labelLarge;

/// md.comp.button.label-text.color
static const TokenColorRole labelTextColor = TokenColorRole.onPrimary;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Version: 38.0.15
// Version: 38.0.58

import 'color_role.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Version: 38.0.15
// Version: 38.0.58

import 'color_role.dart';

Expand Down
Loading