|
| 1 | +import colors from "./tailwind"; |
| 2 | + |
| 3 | +export interface NewTheme { |
| 4 | + l1: Role; // page background, things which sit at the "root level" |
| 5 | + l2: InteractiveRole; // sidebars, table headers, navigation |
| 6 | + l3: InteractiveRole; // buttons, inputs |
| 7 | + modal: Role; // modals/popovers/dropdowns |
| 8 | + |
| 9 | + roles: { |
| 10 | + danger: InteractiveRole; // delete, immutable parameters, stuff that sucks to fix |
| 11 | + error: Role; // something went wrong |
| 12 | + warning: Role; // something is amiss |
| 13 | + notice: Role; // like info, but actionable. "this is fine, but you may want to..." |
| 14 | + info: Role; // just sharing :) |
| 15 | + success: InteractiveRole; // yay!! it's working!! |
| 16 | + active: Role; // selected items, focused inputs, in progress |
| 17 | + }; |
| 18 | +} |
| 19 | + |
| 20 | +export interface Role { |
| 21 | + background: string; |
| 22 | + outline: string; |
| 23 | + fill: string; |
| 24 | + // contrastOutline?: string; |
| 25 | + text: string; |
| 26 | +} |
| 27 | + |
| 28 | +export interface InteractiveRole extends Role { |
| 29 | + disabled: Role; |
| 30 | + hover: Role; |
| 31 | +} |
| 32 | + |
| 33 | +export const dark: NewTheme = { |
| 34 | + l1: { |
| 35 | + background: colors.gray[950], |
| 36 | + outline: colors.gray[700], |
| 37 | + fill: "#f00", |
| 38 | + text: colors.white, |
| 39 | + }, |
| 40 | + |
| 41 | + l2: { |
| 42 | + background: colors.gray[900], |
| 43 | + outline: colors.gray[700], |
| 44 | + fill: "#f00", |
| 45 | + text: colors.white, |
| 46 | + disabled: { |
| 47 | + background: "#f00", |
| 48 | + outline: "#f00", |
| 49 | + fill: "#f00", |
| 50 | + text: colors.gray[200], |
| 51 | + }, |
| 52 | + hover: { |
| 53 | + background: "#f00", |
| 54 | + outline: "#f00", |
| 55 | + fill: "#f00", |
| 56 | + text: colors.white, |
| 57 | + }, |
| 58 | + }, |
| 59 | + |
| 60 | + l3: { |
| 61 | + background: colors.gray[800], |
| 62 | + outline: colors.gray[700], |
| 63 | + fill: "#f00", |
| 64 | + text: colors.white, |
| 65 | + disabled: { |
| 66 | + background: "#f00", |
| 67 | + outline: "#f00", |
| 68 | + fill: "#f00", |
| 69 | + text: colors.gray[200], |
| 70 | + }, |
| 71 | + hover: { |
| 72 | + background: "#f00", |
| 73 | + outline: "#f00", |
| 74 | + fill: "#f00", |
| 75 | + text: colors.white, |
| 76 | + }, |
| 77 | + }, |
| 78 | + |
| 79 | + modal: { |
| 80 | + background: "#f00", |
| 81 | + outline: "#f00", |
| 82 | + fill: "#f00", |
| 83 | + text: colors.white, |
| 84 | + }, |
| 85 | + |
| 86 | + roles: { |
| 87 | + danger: { |
| 88 | + background: colors.orange[950], |
| 89 | + outline: colors.orange[500], |
| 90 | + fill: colors.orange[600], |
| 91 | + text: colors.orange[50], |
| 92 | + disabled: { |
| 93 | + background: colors.orange[950], |
| 94 | + outline: colors.orange[600], |
| 95 | + fill: colors.orange[800], |
| 96 | + text: colors.orange[200], |
| 97 | + }, |
| 98 | + hover: { |
| 99 | + background: colors.orange[900], |
| 100 | + outline: colors.orange[500], |
| 101 | + fill: colors.orange[500], |
| 102 | + text: colors.orange[50], |
| 103 | + }, |
| 104 | + }, |
| 105 | + error: { |
| 106 | + background: colors.red[950], |
| 107 | + outline: colors.red[500], |
| 108 | + fill: colors.red[600], |
| 109 | + text: colors.red[50], |
| 110 | + }, |
| 111 | + warning: { |
| 112 | + background: colors.amber[950], |
| 113 | + outline: colors.amber[300], |
| 114 | + fill: "#f00", |
| 115 | + text: colors.amber[50], |
| 116 | + }, |
| 117 | + notice: { |
| 118 | + background: colors.yellow[950], |
| 119 | + outline: colors.yellow[200], |
| 120 | + fill: "#f00", |
| 121 | + text: colors.yellow[50], |
| 122 | + }, |
| 123 | + info: { |
| 124 | + background: colors.blue[950], |
| 125 | + outline: colors.blue[400], |
| 126 | + fill: "#f00", |
| 127 | + text: colors.blue[50], |
| 128 | + }, |
| 129 | + success: { |
| 130 | + background: colors.green[950], |
| 131 | + outline: colors.green[500], |
| 132 | + fill: colors.green[600], |
| 133 | + text: colors.green[50], |
| 134 | + disabled: { |
| 135 | + background: colors.green[950], |
| 136 | + outline: colors.green[600], |
| 137 | + fill: colors.green[800], |
| 138 | + text: colors.green[200], |
| 139 | + }, |
| 140 | + hover: { |
| 141 | + background: colors.green[900], |
| 142 | + outline: colors.green[500], |
| 143 | + fill: colors.green[500], |
| 144 | + text: colors.green[50], |
| 145 | + }, |
| 146 | + }, |
| 147 | + active: { |
| 148 | + background: colors.sky[950], |
| 149 | + outline: colors.sky[500], |
| 150 | + fill: "#f00", |
| 151 | + text: colors.sky[50], |
| 152 | + }, |
| 153 | + }, |
| 154 | +}; |
0 commit comments