theme: support ARGB values in background

This commit is contained in:
Abdullah Atta
2023-09-08 09:45:54 +05:00
parent 02d80ee4fa
commit d72c4057ff
2 changed files with 12 additions and 7 deletions

View File

@@ -186,8 +186,8 @@ export type Colors = {
*/
paragraph: string;
/**
* Only Hex RGB values are supported. No Alpha. (e.g. #f33ff3)
* @pattern ^#(?:[0-9a-fA-F]{3}){1,2}$
* Hex RGB & ARGB values both are supported. (e.g. #dbdbdb99)
* @pattern ^#(?:(?:[\da-fA-F]{3}){1,2}|(?:[\da-fA-F]{4}){1,2})$
*/
background: string;
/**
@@ -310,7 +310,12 @@ export const COLORS: readonly (keyof Colors)[] = [
"backdrop"
];
export const ALPHA_COLORS: readonly (keyof Colors)[] = ["hover", "backdrop"];
export const ALPHA_COLORS: readonly (keyof Colors)[] = [
"hover",
"backdrop",
"background",
"placeholder"
];
export const Variants: readonly (keyof Variants)[] = [
"primary",

View File

@@ -218,8 +218,8 @@
},
"background": {
"type": "string",
"description": "Only Hex RGB values are supported. No Alpha. (e.g. #f33ff3)",
"pattern": "^#(?:[0-9a-fA-F]{3}){1,2}$"
"description": "Hex RGB & ARGB values both are supported. (e.g. #dbdbdb99)",
"pattern": "^#(?:(?:[\\da-fA-F]{3}){1,2}|(?:[\\da-fA-F]{4}){1,2})$"
},
"border": {
"type": "string",
@@ -328,8 +328,8 @@
},
"background": {
"type": "string",
"description": "Only Hex RGB values are supported. No Alpha. (e.g. #f33ff3)",
"pattern": "^#(?:[0-9a-fA-F]{3}){1,2}$"
"description": "Hex RGB & ARGB values both are supported. (e.g. #dbdbdb99)",
"pattern": "^#(?:(?:[\\da-fA-F]{3}){1,2}|(?:[\\da-fA-F]{4}){1,2})$"
},
"border": {
"type": "string",