Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove "Material" Prefix from TextBox Styles #1495

Merged
merged 3 commits into from
Oct 30, 2024
Merged
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
21 changes: 21 additions & 0 deletions doc/material-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,27 @@ uid: Uno.Themes.Material.Migration

The Uno Material v5 packages introduce a new dependency on the [Uno Themes](https://www.nuget.org/packages/Uno.Themes.WinUI) package. Uno Themes is the base library for all design system implementations going forward. As a result, the following changes have been made:

### Upgrading to Uno Themes V-Next

We have standardized the naming of styles and resource keys. This change aims to simplify resource key usage and align the naming convention across Uno Themes.

#### Changes to Resource Keys

| Old Resource Key | New Resource Key |
| ---- | ---- |
| MaterialTextBoxClearGlyphWidth | TextBoxClearGlyphWidth |
| MaterialTextBoxClearGlyphHeight | TextBoxClearGlyphHeight |
| MaterialFilledTextBoxCornerRadius | FilledTextBoxCornerRadius |
| MaterialFilledTextBoxPadding | FilledTextBoxPadding |
| MaterialFilledTextBoxMinHeight | FilledTextBoxMinHeight |
| MaterialFilledTextBoxBorderHeightFocused | FilledTextBoxBorderHeightFocused |
| MaterialOutlinedTextBoxBorderThickness | OutlinedTextBoxBorderThickness |
| MaterialOutlinedTextBoxCornerRadius | OutlinedTextBoxCornerRadius |
| MaterialOutlinedTextBoxPadding | OutlinedTextBoxPadding |
| MaterialOutlinedTextBoxMinHeight | OutlinedTextBoxMinHeight |
| MaterialOutlinedTextBoxBorderThicknessFocused | OutlinedTextBoxBorderThicknessFocused |
| MaterialOutlinedTextBoxBorderThicknessPointerOver | OutlinedTextBoxBorderThicknessPointerOver |

### Upgrading to Uno Themes 5.1

#### TextBox `PlaceholderText` and `Header`
Expand Down
144 changes: 72 additions & 72 deletions doc/styles/TextBox.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,75 +15,75 @@ IsDefaultStyle\*: Styles in this column will be set as the default implicit styl

## Lightweight Styling

| Key | Type | Value |
| --------------------------------------------------- | ----------------- | ----------------------------- |
| `TextBoxDeleteButtonForeground` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `TextBoxDeleteButtonForegroundPointerOver` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `TextBoxDeleteButtonForegroundPressed` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `TextBoxDeleteButtonForegroundDisabled` | `SolidColorBrush` | `OnSurfaceLowBrush` |
| `TextBoxLeadingIconForeground` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `TextBoxLeadingIconForegroundDisabled` | `SolidColorBrush` | `OnSurfaceLowBrush` |
| `FilledTextBoxBackground` | `SolidColorBrush` | `SurfaceVariantBrush` |
| `FilledTextBoxBackgroundPointerOver` | `SolidColorBrush` | `OnSurfaceVariantHoverBrush` |
| `FilledTextBoxBackgroundFocused` | `SolidColorBrush` | `SurfaceVariantBrush` |
| `FilledTextBoxBackgroundDisabled` | `SolidColorBrush` | `OnSurfaceDisabledBrush` |
| `FilledTextBoxBorderBrush` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `FilledTextBoxBorderBrushPointerOver` | `SolidColorBrush` | `OnSurfaceBrush` |
| `FilledTextBoxBorderBrushFocused` | `SolidColorBrush` | `PrimaryBrush` |
| `FilledTextBoxBorderBrushDisabled` | `SolidColorBrush` | `OnSurfaceDisabledBrush` |
| `FilledTextBoxDeleteButtonForeground` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `FilledTextBoxDeleteButtonForegroundPointerOver` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `FilledTextBoxDeleteButtonForegroundFocused` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `FilledTextBoxDeleteButtonForegroundDisabled` | `SolidColorBrush` | `OnSurfaceLowBrush` |
| `FilledTextBoxForeground` | `SolidColorBrush` | `OnSurfaceBrush` |
| `FilledTextBoxForegroundPointerOver` | `SolidColorBrush` | `OnSurfaceBrush` |
| `FilledTextBoxForegroundFocused` | `SolidColorBrush` | `OnSurfaceBrush` |
| `FilledTextBoxForegroundDisabled` | `SolidColorBrush` | `OnSurfaceBrush` |
| `FilledTextBoxForegroundOpacityDisabled` | `Double` | `LowOpacity` |
| `FilledTextBoxPlaceholderForeground` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `FilledTextBoxPlaceholderForegroundPointerOver` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `FilledTextBoxPlaceholderForegroundFocused` | `SolidColorBrush` | `OnSurfaceBrush` |
| `FilledTextBoxPlaceholderForegroundDisabled` | `SolidColorBrush` | `OnSurfaceLowBrush` |
| `FilledTextBoxHeaderForeground` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `FilledTextBoxHeaderForegroundPointerOver` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `FilledTextBoxHeaderForegroundFocused` | `SolidColorBrush` | `PrimaryBrush` |
| `FilledTextBoxHeaderForegroundDisabled` | `SolidColorBrush` | `OnSurfaceLowBrush` |
| `OutlinedTextBoxBorderBrush` | `SolidColorBrush` | `OutlineBrush` |
| `OutlinedTextBoxBorderBrushPointerOver` | `SolidColorBrush` | `OnSurfaceBrush` |
| `OutlinedTextBoxBorderBrushFocused` | `SolidColorBrush` | `PrimaryBrush` |
| `OutlinedTextBoxBorderBrushDisabled` | `SolidColorBrush` | `OnSurfaceDisabledBrush` |
| `OutlinedTextBoxForeground` | `SolidColorBrush` | `OnSurfaceBrush` |
| `OutlinedTextBoxForegroundPointerOver` | `SolidColorBrush` | `OnSurfaceBrush` |
| `OutlinedTextBoxForegroundFocused` | `SolidColorBrush` | `OnSurfaceBrush` |
| `OutlinedTextBoxForegroundDisabled` | `SolidColorBrush` | `OnSurfaceBrush` |
| `OutlinedTextBoxForegroundOpacityDisabled` | `Double` | `LowOpacity` |
| `OutlinedTextBoxPlaceholderForeground` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `OutlinedTextBoxPlaceholderForegroundPointerOver` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `OutlinedTextBoxPlaceholderForegroundFocused` | `SolidColorBrush` | `OnSurfaceBrush` |
| `OutlinedTextBoxPlaceholderForegroundDisabled` | `SolidColorBrush` | `OnSurfaceLowBrush` |
| `OutlinedTextBoxHeaderForeground` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `OutlinedTextBoxHeaderForegroundPointerOver` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `OutlinedTextBoxHeaderForegroundFocused` | `SolidColorBrush` | `PrimaryBrush` |
| `OutlinedTextBoxHeaderForegroundDisabled` | `SolidColorBrush` | `OnSurfaceLowBrush` |
| `OutlinedTextBoxFontFamily` | `FontFamily` | `MaterialMediumFontFamily` |
| `OutlinedTextBoxFontWeight` | `String` | `BodyLargeFontWeight` |
| `OutlinedTextBoxFontSize` | `Double` | `BodyLargeFontSize` |
| `OutlinedTextBoxCharacterSpacing` | `Int32` | `BodyLargeCharacterSpacing` |
| `FilledTextBoxFontFamily` | `FontFamily` | `MaterialMediumFontFamily` |
| `FilledTextBoxFontWeight` | `String` | `BodyLargeFontWeight` |
| `FilledTextBoxFontSize` | `Double` | `BodyLargeFontSize` |
| `FilledTextBoxCharacterSpacing` | `Int32` | `BodyLargeCharacterSpacing` |
| `FilledTextBoxBorderThicknessNormal` | `Double` | `TextBoxOutlinedStrokeHeight` |
| `FilledTextBoxBorderThicknessFocused` | `Double` | `TextBoxFocusStrokeWidth` |
| `MaterialTextBoxClearGlyphWidth` | `Double` | 20 |
| `MaterialTextBoxClearGlyphHeight` | `Double` | 20 |
| `MaterialFilledTextBoxCornerRadius` | `CornerRadius` | 4,4,0,0 |
| `MaterialFilledTextBoxPadding` | `Thickness` | 16,7 |
| `MaterialFilledTextBoxMinHeight` | `Double` | 58 |
| `MaterialFilledTextBoxBorderHeightFocused` | `Double` | 2 |
| `MaterialOutlinedTextBoxBorderThickness` | `Double` | 1 |
| `MaterialOutlinedTextBoxCornerRadius` | `CornerRadius` | 4 |
| `MaterialOutlinedTextBoxPadding` | `Thickness` | 8 |
| `MaterialOutlinedTextBoxMinHeight` | `Double` | 56 |
| `MaterialOutlinedTextBoxBorderThicknessFocused` | `Double` | 2 |
| `MaterialOutlinedTextBoxBorderThicknessPointerOver` | `Double` | 2 |
| Key | Type | Value |
| ------------------------------------------------- | ----------------- | ----------------------------- |
| `TextBoxDeleteButtonForeground` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `TextBoxDeleteButtonForegroundPointerOver` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `TextBoxDeleteButtonForegroundPressed` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `TextBoxDeleteButtonForegroundDisabled` | `SolidColorBrush` | `OnSurfaceLowBrush` |
| `TextBoxLeadingIconForeground` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `TextBoxLeadingIconForegroundDisabled` | `SolidColorBrush` | `OnSurfaceLowBrush` |
| `FilledTextBoxBackground` | `SolidColorBrush` | `SurfaceVariantBrush` |
| `FilledTextBoxBackgroundPointerOver` | `SolidColorBrush` | `OnSurfaceVariantHoverBrush` |
| `FilledTextBoxBackgroundFocused` | `SolidColorBrush` | `SurfaceVariantBrush` |
| `FilledTextBoxBackgroundDisabled` | `SolidColorBrush` | `OnSurfaceDisabledBrush` |
| `FilledTextBoxBorderBrush` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `FilledTextBoxBorderBrushPointerOver` | `SolidColorBrush` | `OnSurfaceBrush` |
| `FilledTextBoxBorderBrushFocused` | `SolidColorBrush` | `PrimaryBrush` |
| `FilledTextBoxBorderBrushDisabled` | `SolidColorBrush` | `OnSurfaceDisabledBrush` |
| `FilledTextBoxDeleteButtonForeground` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `FilledTextBoxDeleteButtonForegroundPointerOver` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `FilledTextBoxDeleteButtonForegroundFocused` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `FilledTextBoxDeleteButtonForegroundDisabled` | `SolidColorBrush` | `OnSurfaceLowBrush` |
| `FilledTextBoxForeground` | `SolidColorBrush` | `OnSurfaceBrush` |
| `FilledTextBoxForegroundPointerOver` | `SolidColorBrush` | `OnSurfaceBrush` |
| `FilledTextBoxForegroundFocused` | `SolidColorBrush` | `OnSurfaceBrush` |
| `FilledTextBoxForegroundDisabled` | `SolidColorBrush` | `OnSurfaceBrush` |
| `FilledTextBoxForegroundOpacityDisabled` | `Double` | `LowOpacity` |
| `FilledTextBoxPlaceholderForeground` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `FilledTextBoxPlaceholderForegroundPointerOver` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `FilledTextBoxPlaceholderForegroundFocused` | `SolidColorBrush` | `OnSurfaceBrush` |
| `FilledTextBoxPlaceholderForegroundDisabled` | `SolidColorBrush` | `OnSurfaceLowBrush` |
| `FilledTextBoxHeaderForeground` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `FilledTextBoxHeaderForegroundPointerOver` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `FilledTextBoxHeaderForegroundFocused` | `SolidColorBrush` | `PrimaryBrush` |
| `FilledTextBoxHeaderForegroundDisabled` | `SolidColorBrush` | `OnSurfaceLowBrush` |
| `OutlinedTextBoxBorderBrush` | `SolidColorBrush` | `OutlineBrush` |
| `OutlinedTextBoxBorderBrushPointerOver` | `SolidColorBrush` | `OnSurfaceBrush` |
| `OutlinedTextBoxBorderBrushFocused` | `SolidColorBrush` | `PrimaryBrush` |
| `OutlinedTextBoxBorderBrushDisabled` | `SolidColorBrush` | `OnSurfaceDisabledBrush` |
| `OutlinedTextBoxForeground` | `SolidColorBrush` | `OnSurfaceBrush` |
| `OutlinedTextBoxForegroundPointerOver` | `SolidColorBrush` | `OnSurfaceBrush` |
| `OutlinedTextBoxForegroundFocused` | `SolidColorBrush` | `OnSurfaceBrush` |
| `OutlinedTextBoxForegroundDisabled` | `SolidColorBrush` | `OnSurfaceBrush` |
| `OutlinedTextBoxForegroundOpacityDisabled` | `Double` | `LowOpacity` |
| `OutlinedTextBoxPlaceholderForeground` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `OutlinedTextBoxPlaceholderForegroundPointerOver` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `OutlinedTextBoxPlaceholderForegroundFocused` | `SolidColorBrush` | `OnSurfaceBrush` |
| `OutlinedTextBoxPlaceholderForegroundDisabled` | `SolidColorBrush` | `OnSurfaceLowBrush` |
| `OutlinedTextBoxHeaderForeground` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `OutlinedTextBoxHeaderForegroundPointerOver` | `SolidColorBrush` | `OnSurfaceVariantBrush` |
| `OutlinedTextBoxHeaderForegroundFocused` | `SolidColorBrush` | `PrimaryBrush` |
| `OutlinedTextBoxHeaderForegroundDisabled` | `SolidColorBrush` | `OnSurfaceLowBrush` |
| `OutlinedTextBoxFontFamily` | `FontFamily` | `MaterialMediumFontFamily` |
| `OutlinedTextBoxFontWeight` | `String` | `BodyLargeFontWeight` |
| `OutlinedTextBoxFontSize` | `Double` | `BodyLargeFontSize` |
| `OutlinedTextBoxCharacterSpacing` | `Int32` | `BodyLargeCharacterSpacing` |
| `FilledTextBoxFontFamily` | `FontFamily` | `MaterialMediumFontFamily` |
| `FilledTextBoxFontWeight` | `String` | `BodyLargeFontWeight` |
| `FilledTextBoxFontSize` | `Double` | `BodyLargeFontSize` |
| `FilledTextBoxCharacterSpacing` | `Int32` | `BodyLargeCharacterSpacing` |
| `FilledTextBoxBorderThicknessNormal` | `Double` | `TextBoxOutlinedStrokeHeight` |
| `FilledTextBoxBorderThicknessFocused` | `Double` | `TextBoxFocusStrokeWidth` |
| `TextBoxClearGlyphWidth` | `Double` | 20 |
| `TextBoxClearGlyphHeight` | `Double` | 20 |
| `FilledTextBoxCornerRadius` | `CornerRadius` | 4,4,0,0 |
| `FilledTextBoxPadding` | `Thickness` | 16,7 |
| `FilledTextBoxMinHeight` | `Double` | 58 |
| `FilledTextBoxBorderHeightFocused` | `Double` | 2 |
| `OutlinedTextBoxBorderThickness` | `Double` | 1 |
| `OutlinedTextBoxCornerRadius` | `CornerRadius` | 4 |
| `OutlinedTextBoxPadding` | `Thickness` | 8 |
| `OutlinedTextBoxMinHeight` | `Double` | 56 |
| `OutlinedTextBoxBorderThicknessFocused` | `Double` | 2 |
| `OutlinedTextBoxBorderThicknessPointerOver` | `Double` | 2 |
Kunal22shah marked this conversation as resolved.
Show resolved Hide resolved
Loading
Loading