diff --git a/doc/material-migration.md b/doc/material-migration.md index 30f4a7586..020a65f29 100644 --- a/doc/material-migration.md +++ b/doc/material-migration.md @@ -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` diff --git a/doc/styles/TextBox.md b/doc/styles/TextBox.md index 5379ad4f1..b0daf6a92 100644 --- a/doc/styles/TextBox.md +++ b/doc/styles/TextBox.md @@ -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 | diff --git a/src/library/Uno.Material/Styles/Controls/v2/TextBox.xaml b/src/library/Uno.Material/Styles/Controls/v2/TextBox.xaml index 2fc993bee..4bade437a 100644 --- a/src/library/Uno.Material/Styles/Controls/v2/TextBox.xaml +++ b/src/library/Uno.Material/Styles/Controls/v2/TextBox.xaml @@ -109,25 +109,25 @@ - 20 - 20 + 20 + 20 - 4,4,0,0 - 16,7 - 16,8 - 58 - 2 + 4,4,0,0 + 16,7 + 16,8 + 58 + 2 - 1 - 4 - 8 - 56 - 2 - 2 + 1 + 4 + 8 + 56 + 2 + 2 @@ -217,25 +217,25 @@ - 20 - 20 + 20 + 20 - 4,4,0,0 - 16,7 - 16,8 - 58 - 2 + 4,4,0,0 + 16,7 + 16,8 + 58 + 2 - 1 - 4 - 8 - 56 - 2 - 2 + 1 + 4 + 8 + 56 + 2 + 2 @@ -270,7 +270,7 @@ NoHeaderAndNoPlaceholderValue="1" /> - M14.9482 6.46442L13.534 5.05021L9.99849 8.58574L6.46296 5.05021L5.04874 6.46442L8.58428 9.99995L5.04874 13.5355L6.46296 14.9497L9.99849 11.4142L13.534 14.9497L14.9482 13.5355L11.4127 9.99995L14.9482 6.46442ZM17.0696 2.92889C13.1663 -0.974342 6.83065 -0.974342 2.92742 2.92889C-0.975807 6.83212 -0.975807 13.1678 2.92742 17.071C6.83065 20.9743 13.1663 20.9743 17.0696 17.071C20.9728 13.1678 20.9728 6.83212 17.0696 2.92889ZM4.34164 15.6568C1.22329 12.5385 1.22329 7.46144 4.34164 4.3431C7.45998 1.22476 12.537 1.22476 15.6553 4.3431C18.7737 7.46144 18.7737 12.5385 15.6553 15.6568C12.537 18.7752 7.45998 18.7752 4.34164 15.6568Z + M14.9482 6.46442L13.534 5.05021L9.99849 8.58574L6.46296 5.05021L5.04874 6.46442L8.58428 9.99995L5.04874 13.5355L6.46296 14.9497L9.99849 11.4142L13.534 14.9497L14.9482 13.5355L11.4127 9.99995L14.9482 6.46442ZM17.0696 2.92889C13.1663 -0.974342 6.83065 -0.974342 2.92742 2.92889C-0.975807 6.83212 -0.975807 13.1678 2.92742 17.071C6.83065 20.9743 13.1663 20.9743 17.0696 17.071C20.9728 13.1678 20.9728 6.83212 17.0696 2.92889ZM4.34164 15.6568C1.22329 12.5385 1.22329 7.46144 4.34164 4.3431C7.45998 1.22476 12.537 1.22476 15.6553 4.3431C18.7737 7.46144 18.7737 12.5385 15.6553 15.6568C12.537 18.7752 7.45998 18.7752 4.34164 15.6568Z