Comparing version 0.0.13 to 0.0.14
@@ -215,3 +215,3 @@ export declare class Theme { | ||
*/ | ||
static readonly alert = "alert"; | ||
static readonly warning = "warning"; | ||
/** | ||
@@ -222,3 +222,3 @@ * Read more at @link https://github.com/ncpa0/ADWaveCSS/blob/master/docs/components/message.md#ClassNames | ||
static className(params: { | ||
type?: "success" | "alert" | "error"; | ||
type?: "success" | "warning" | "error"; | ||
}): string; | ||
@@ -421,2 +421,72 @@ } | ||
} | ||
export declare class Alert { | ||
static readonly alert = "alert"; | ||
static readonly info = "info"; | ||
static readonly success = "success"; | ||
static readonly warning = "warning"; | ||
static readonly error = "error"; | ||
static className(params: { | ||
type?: "info" | "success" | "warning" | "error"; | ||
}): string; | ||
} | ||
/** | ||
* All CSS variables with colors provided by the Adwave theme. | ||
*/ | ||
export declare enum Colors { | ||
Bg = "--clr-bg-1", | ||
Bg2 = "--clr-bg-2", | ||
Bg3 = "--clr-bg-3", | ||
Bg4 = "--clr-bg-4", | ||
Bg5 = "--clr-bg-5", | ||
Fg = "--clr-fg", | ||
Text = "--clr-text", | ||
Text2 = "--clr-text-secondary", | ||
InfoText = "--clr-info-text", | ||
InfoFg = "--clr-info-fg", | ||
InfoBg = "--clr-info-bg", | ||
SuccessText = "--clr-success-text", | ||
SuccessFg = "--clr-success-fg", | ||
SuccessBg = "--clr-success-bg", | ||
WarningText = "--clr-warning-text", | ||
WarningFg = "--clr-warning-fg", | ||
WarningBg = "--clr-warning-bg", | ||
ErrorText = "--clr-error-text", | ||
ErrorFg = "--clr-error-fg", | ||
ErrorBg = "--clr-error-bg", | ||
Dimmed = "--clr-dimmed", | ||
Btn = "--clr-btn", | ||
BtnToggled = "--clr-btn-toggled", | ||
BtnHover = "--clr-btn-hover", | ||
BtnPressed = "--clr-btn-pressed", | ||
BtnAdaptive = "--clr-btn-adaptive", | ||
BtnAdaptiveToggled = "--clr-btn-adaptive-toggled", | ||
BtnAdaptiveHover = "--clr-btn-adaptive-hover", | ||
BtnAdaptivePressed = "--clr-btn-adaptive-pressed", | ||
Focus = "--clr-focus", | ||
Border = "--clr-border", | ||
PrimaryText = "--clr-primary-text", | ||
Primary0 = "--clr-primary-000", | ||
Primary1 = "--clr-primary-100", | ||
Primary2 = "--clr-primary-200", | ||
Primary3 = "--clr-primary-300", | ||
Primary4 = "--clr-primary-400", | ||
Primary5 = "--clr-primary-500", | ||
Primary6 = "--clr-primary-600", | ||
Primary7 = "--clr-primary-700", | ||
Primary8 = "--clr-primary-800", | ||
Primary9 = "--clr-primary-900", | ||
DangerText = "--clr-danger-text", | ||
Danger0 = "--clr-danger-000", | ||
Danger1 = "--clr-danger-100", | ||
Danger2 = "--clr-danger-200", | ||
Danger3 = "--clr-danger-300", | ||
Danger4 = "--clr-danger-400", | ||
Danger5 = "--clr-danger-500", | ||
Danger6 = "--clr-danger-600", | ||
Danger7 = "--clr-danger-700", | ||
Danger8 = "--clr-danger-800", | ||
Danger9 = "--clr-danger-900", | ||
ListItem = "--clr-list-elem", | ||
ListItemHover = "--clr-list-elem-hover" | ||
} | ||
declare const _default: { | ||
@@ -441,3 +511,5 @@ readonly Box: typeof Box; | ||
readonly Typography: typeof Typography; | ||
readonly Alert: typeof Alert; | ||
readonly Colors: typeof Colors; | ||
}; | ||
export default _default; |
@@ -298,3 +298,3 @@ export class Theme { | ||
*/ | ||
static alert = "alert"; | ||
static warning = "warning"; | ||
/** | ||
@@ -311,4 +311,4 @@ * Read more at @link https://github.com/ncpa0/ADWaveCSS/blob/master/docs/components/message.md#ClassNames | ||
break; | ||
case "alert": | ||
className += ` ${Message.alert}`; | ||
case "warning": | ||
className += ` ${Message.warning}`; | ||
break; | ||
@@ -592,2 +592,83 @@ case "error": | ||
} | ||
export class Alert { | ||
static alert = "alert"; | ||
static info = "info"; | ||
static success = "success"; | ||
static warning = "warning"; | ||
static error = "error"; | ||
static className(params) { | ||
switch (params.type) { | ||
case "info": | ||
return `${Alert.alert} ${Alert.info}`; | ||
case "success": | ||
return `${Alert.alert} ${Alert.success}`; | ||
case "warning": | ||
return `${Alert.alert} ${Alert.warning}`; | ||
case "error": | ||
return `${Alert.alert} ${Alert.error}`; | ||
} | ||
return Alert.alert; | ||
} | ||
} | ||
/** | ||
* All CSS variables with colors provided by the Adwave theme. | ||
*/ | ||
export var Colors; | ||
(function (Colors) { | ||
Colors["Bg"] = "--clr-bg-1"; | ||
Colors["Bg2"] = "--clr-bg-2"; | ||
Colors["Bg3"] = "--clr-bg-3"; | ||
Colors["Bg4"] = "--clr-bg-4"; | ||
Colors["Bg5"] = "--clr-bg-5"; | ||
Colors["Fg"] = "--clr-fg"; | ||
Colors["Text"] = "--clr-text"; | ||
Colors["Text2"] = "--clr-text-secondary"; | ||
Colors["InfoText"] = "--clr-info-text"; | ||
Colors["InfoFg"] = "--clr-info-fg"; | ||
Colors["InfoBg"] = "--clr-info-bg"; | ||
Colors["SuccessText"] = "--clr-success-text"; | ||
Colors["SuccessFg"] = "--clr-success-fg"; | ||
Colors["SuccessBg"] = "--clr-success-bg"; | ||
Colors["WarningText"] = "--clr-warning-text"; | ||
Colors["WarningFg"] = "--clr-warning-fg"; | ||
Colors["WarningBg"] = "--clr-warning-bg"; | ||
Colors["ErrorText"] = "--clr-error-text"; | ||
Colors["ErrorFg"] = "--clr-error-fg"; | ||
Colors["ErrorBg"] = "--clr-error-bg"; | ||
Colors["Dimmed"] = "--clr-dimmed"; | ||
Colors["Btn"] = "--clr-btn"; | ||
Colors["BtnToggled"] = "--clr-btn-toggled"; | ||
Colors["BtnHover"] = "--clr-btn-hover"; | ||
Colors["BtnPressed"] = "--clr-btn-pressed"; | ||
Colors["BtnAdaptive"] = "--clr-btn-adaptive"; | ||
Colors["BtnAdaptiveToggled"] = "--clr-btn-adaptive-toggled"; | ||
Colors["BtnAdaptiveHover"] = "--clr-btn-adaptive-hover"; | ||
Colors["BtnAdaptivePressed"] = "--clr-btn-adaptive-pressed"; | ||
Colors["Focus"] = "--clr-focus"; | ||
Colors["Border"] = "--clr-border"; | ||
Colors["PrimaryText"] = "--clr-primary-text"; | ||
Colors["Primary0"] = "--clr-primary-000"; | ||
Colors["Primary1"] = "--clr-primary-100"; | ||
Colors["Primary2"] = "--clr-primary-200"; | ||
Colors["Primary3"] = "--clr-primary-300"; | ||
Colors["Primary4"] = "--clr-primary-400"; | ||
Colors["Primary5"] = "--clr-primary-500"; | ||
Colors["Primary6"] = "--clr-primary-600"; | ||
Colors["Primary7"] = "--clr-primary-700"; | ||
Colors["Primary8"] = "--clr-primary-800"; | ||
Colors["Primary9"] = "--clr-primary-900"; | ||
Colors["DangerText"] = "--clr-danger-text"; | ||
Colors["Danger0"] = "--clr-danger-000"; | ||
Colors["Danger1"] = "--clr-danger-100"; | ||
Colors["Danger2"] = "--clr-danger-200"; | ||
Colors["Danger3"] = "--clr-danger-300"; | ||
Colors["Danger4"] = "--clr-danger-400"; | ||
Colors["Danger5"] = "--clr-danger-500"; | ||
Colors["Danger6"] = "--clr-danger-600"; | ||
Colors["Danger7"] = "--clr-danger-700"; | ||
Colors["Danger8"] = "--clr-danger-800"; | ||
Colors["Danger9"] = "--clr-danger-900"; | ||
Colors["ListItem"] = "--clr-list-elem"; | ||
Colors["ListItemHover"] = "--clr-list-elem-hover"; | ||
})(Colors || (Colors = {})); | ||
Object.freeze(Box); | ||
@@ -611,2 +692,4 @@ Object.freeze(Button); | ||
Object.freeze(Typography); | ||
Object.freeze(Alert); | ||
Object.freeze(Colors); | ||
export default { | ||
@@ -631,2 +714,4 @@ Box, | ||
Typography, | ||
Alert, | ||
Colors, | ||
}; |
{ | ||
"name": "adwavecss", | ||
"displayName": "ADWave CSS", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"description": "Adwaita/GTK inspired CSS for the web.", | ||
"files": [ | ||
"dist/index.js", | ||
"dist/index.d.ts", | ||
"dist/styles.css", | ||
"package.json", | ||
"README.md", | ||
"LICENSE" | ||
], | ||
"keywords": [ | ||
@@ -32,2 +40,3 @@ "css", | ||
}, | ||
"./styles": "./dist/styles.css", | ||
"./dist/styles.css": "./dist/styles.css" | ||
@@ -34,0 +43,0 @@ }, |
Sorry, the diff of this file is not supported yet
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
0
72737
6
1328