Skip to content

Commit

Permalink
chore: mark the Material theme as deprecated (#7111)
Browse files Browse the repository at this point in the history
* chore: mark the Material theme as deprecated

* chore: deprecate Material values in enum theme variants

---------

Co-authored-by: web-padawan <[email protected]>
Co-authored-by: Sascha Ißbrücker <[email protected]>
  • Loading branch information
3 people authored Feb 11, 2025
1 parent b2bee76 commit a8d4389
Show file tree
Hide file tree
Showing 22 changed files with 146 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,17 @@ public enum ButtonVariant implements ThemeVariant {
LUMO_ERROR("error"),
LUMO_CONTRAST("contrast"),
LUMO_ICON("icon"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_CONTAINED("contained"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_OUTLINED("outlined");

private final String variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,17 @@
public enum CardVariant implements ThemeVariant {
LUMO_ELEVATED("elevated"),
LUMO_OUTLINED("outlined"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_ELEVATED("elevated"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_OUTLINED("outlined");

private final String variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,23 @@ public enum ChartVariant {
LUMO_GRADIENT("gradient"),
LUMO_MONOTONE("monotone"),
LUMO_CLASSIC("classic"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_GRADIENT("gradient"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_MONOTONE("monotone"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_CLASSIC("classic");

private final String variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
public enum CheckboxGroupVariant implements ThemeVariant {
LUMO_VERTICAL("vertical"),
LUMO_HELPER_ABOVE_FIELD("helper-above-field"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_VERTICAL("vertical");

private final String variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ public enum ComboBoxVariant implements ThemeVariant {
LUMO_ALIGN_CENTER("align-center"),
LUMO_ALIGN_RIGHT("align-right"),
LUMO_HELPER_ABOVE_FIELD("helper-above-field"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_ALWAYS_FLOAT_LABEL("always-float-label");

private final String variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ public enum MultiSelectComboBoxVariant implements ThemeVariant {
LUMO_ALIGN_CENTER("align-center"),
LUMO_ALIGN_RIGHT("align-right"),
LUMO_HELPER_ABOVE_FIELD("helper-above-field"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_ALWAYS_FLOAT_LABEL("always-float-label");

private final String variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ public enum DatePickerVariant implements ThemeVariant {
LUMO_ALIGN_CENTER("align-center"),
LUMO_ALIGN_RIGHT("align-right"),
LUMO_HELPER_ABOVE_FIELD("helper-above-field"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_ALWAYS_FLOAT_LABEL("always-float-label");

private final String variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ public enum DateTimePickerVariant implements ThemeVariant {
LUMO_ALIGN_CENTER("align-center"),
LUMO_ALIGN_RIGHT("align-right"),
LUMO_HELPER_ABOVE_FIELD("helper-above-field"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_ALWAYS_FLOAT_LABEL("always-float-label");

private final String variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@
* Set of theme variants applicable for {@code vaadin-dialog} component.
*/
public enum DialogVariant implements ThemeVariant {
LUMO_NO_PADDING("no-padding"), MATERIAL_NO_PADDING("no-padding");
LUMO_NO_PADDING("no-padding"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_NO_PADDING("no-padding");

private final String variant;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ public enum GridVariant {
LUMO_ROW_STRIPES("row-stripes"),
LUMO_COMPACT("compact"),
LUMO_WRAP_CELL_CONTENT("wrap-cell-content"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_COLUMN_DIVIDERS("column-dividers");

private final String variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ public enum GridProVariant {
LUMO_ROW_STRIPES("row-stripes"),
LUMO_COMPACT("compact"),
LUMO_WRAP_CELL_CONTENT("wrap-cell-content"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_COLUMN_DIVIDERS("column-dividers"),
LUMO_HIGHLIGHT_EDITABLE_CELLS("highlight-editable-cells"),
LUMO_HIGHLIGHT_READ_ONLY_CELLS("highlight-read-only-cells");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,17 @@

/**
* Material component theme class implementation.
*
* @deprecated Since 24.7, the Material theme is deprecated and will be removed
* in Vaadin 25.
*/
@NpmPackage(value = "@vaadin/vaadin-themable-mixin", version = "24.7.0-alpha8")
@NpmPackage(value = "@vaadin/polymer-legacy-adapter", version = "24.7.0-alpha8")
@NpmPackage(value = "@vaadin/vaadin-material-styles", version = "24.7.0-alpha8")
@JsModule("@vaadin/polymer-legacy-adapter/style-modules.js")
@JsModule("@vaadin/vaadin-material-styles/color-global.js")
@JsModule("@vaadin/vaadin-material-styles/typography-global.js")
@Deprecated
public class Material implements AbstractTheme {
public static final String LIGHT = "light";
public static final String DARK = "dark";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,23 @@ public enum MenuBarVariant implements ThemeVariant {
LUMO_ICON("icon"),
LUMO_END_ALIGNED("end-aligned"),
LUMO_DROPDOWN_INDICATORS("dropdown-indicators"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_CONTAINED("contained"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_OUTLINED("outlined"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_END_ALIGNED("end-aligned");

private final String variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
public enum PopoverVariant implements ThemeVariant {
ARROW("arrow"),
LUMO_NO_PADDING("no-padding"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_NO_PADDING("no-padding");

private final String variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
public enum RadioGroupVariant implements ThemeVariant {
LUMO_VERTICAL("vertical"),
LUMO_HELPER_ABOVE_FIELD("helper-above-field"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_VERTICAL("vertical");

private final String variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
public enum RichTextEditorVariant implements ThemeVariant {
LUMO_NO_BORDER("no-border"),
LUMO_COMPACT("compact"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_NO_BORDER("no-border");

private final String variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ public enum SelectVariant implements ThemeVariant {
LUMO_ALIGN_CENTER("align-center"),
LUMO_ALIGN_RIGHT("align-right"),
LUMO_HELPER_ABOVE_FIELD("helper-above-field"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_ALWAYS_FLOAT_LABEL("always-float-label");

private final String variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,17 @@ public enum TabSheetVariant implements ThemeVariant {
LUMO_TABS_EQUAL_WIDTH_TABS("equal-width-tabs"),
LUMO_BORDERED("bordered"),
LUMO_NO_PADDING("no-padding"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_TABS_FIXED("fixed"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_BORDERED("bordered");

private final String variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ public enum TabsVariant implements ThemeVariant {
LUMO_MINIMAL("minimal"),
LUMO_HIDE_SCROLL_BUTTONS("hide-scroll-buttons"),
LUMO_EQUAL_WIDTH_TABS("equal-width-tabs"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_FIXED("fixed");

private final String variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ public enum TextAreaVariant implements ThemeVariant {
LUMO_ALIGN_CENTER("align-center"),
LUMO_ALIGN_RIGHT("align-right"),
LUMO_HELPER_ABOVE_FIELD("helper-above-field"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_ALWAYS_FLOAT_LABEL("always-float-label");

private final String variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ public enum TextFieldVariant implements ThemeVariant {
LUMO_ALIGN_CENTER("align-center"),
LUMO_ALIGN_RIGHT("align-right"),
LUMO_HELPER_ABOVE_FIELD("helper-above-field"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_ALWAYS_FLOAT_LABEL("always-float-label");

private final String variant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ public enum TimePickerVariant implements ThemeVariant {
LUMO_ALIGN_CENTER("align-center"),
LUMO_ALIGN_RIGHT("align-right"),
LUMO_HELPER_ABOVE_FIELD("helper-above-field"),
/**
* @deprecated Since 24.7, the Material theme is deprecated and will be
* removed in Vaadin 25.
*/
@Deprecated
MATERIAL_ALWAYS_FLOAT_LABEL("always-float-label");

private final String variant;
Expand Down

0 comments on commit a8d4389

Please sign in to comment.