@@ -9,29 +9,62 @@ export type InteractiveThemeRole = keyof {
9
9
export interface NewTheme {
10
10
l1 : Role ; // page background, things which sit at the "root level"
11
11
l2 : InteractiveRole ; // sidebars, table headers, navigation
12
- l3 : InteractiveRole ; // buttons, inputs
13
12
14
13
roles : {
15
- danger : InteractiveRole ; // delete, immutable parameters, stuff that sucks to fix
16
- error : Role ; // something went wrong
17
- warning : Role ; // something is amiss
18
- notice : Role ; // like info, but actionable. "this is fine, but you may want to..."
19
- info : Role ; // just sharing :)
20
- success : InteractiveRole ; // yay!! it's working!!
21
- active : InteractiveRole ; // selected items, focused inputs, in progress
22
- preview : Role ; // experiments, alpha/beta features
14
+ /** Something is wrong; either unexpectedly, or in a meaningful way. */
15
+ error : Role ;
16
+
17
+ /** Something isn't quite right, but without serious consequence. */
18
+ warning : Role ;
19
+
20
+ /** A prompt for action, to correct or look into something. */
21
+ notice : Role ;
22
+
23
+ /** Notable information; just so you know! */
24
+ info : Role ;
25
+
26
+ /** Confirmation, or affirming that things are as desired. */
27
+ success : InteractiveRole ;
28
+
29
+ /** Selected, in progress, of particular relevance right now. */
30
+ active : InteractiveRole ;
31
+
32
+ /** Actions that have long lasting or irreversible effects.
33
+ * Deletion, immutable parameters, etc.
34
+ */
35
+ danger : InteractiveRole ;
36
+
37
+ /** This isn't quite ready for prime-time, but you're welcome to look around!
38
+ * Preview features, experiments, unstable etc.
39
+ */
40
+ preview : Role ;
23
41
} ;
24
42
}
25
43
44
+ /** A set of colors which work together to fill a desirable "communication role"
45
+ * ie. I wish to communicate an error, I wish to communicate that this is dangerous, etc.
46
+ */
26
47
export interface Role {
48
+ /** A background color that works best with the corresponding `outline` and `text` colors */
27
49
background : string ;
50
+
51
+ /** A border, or a color for an outlined icon */
28
52
outline : string ;
53
+
54
+ /** A good color for icons, text on a neutral background, the background of a button which should stand out */
29
55
fill : string ;
30
- // contrastOutline?: string;
56
+
57
+ /** A color great for text on the corresponding `background` */
31
58
text : string ;
59
+
60
+ // contrastOutline?: string;
32
61
}
33
62
63
+ /** Provides additional colors which can indicate different states for interactive elements */
34
64
export interface InteractiveRole extends Role {
65
+ /** A set of colors which can indicate a disabled state */
35
66
disabled : Role ;
67
+
68
+ /** A set of colors which can indicate mouse hover (or keyboard focus) */
36
69
hover : Role ;
37
70
}
0 commit comments