12 changed files with 1253 additions and 176 deletions
@ -0,0 +1,43 @@
@@ -0,0 +1,43 @@
|
||||
/** |
||||
* This script turns output from the figma plugin "style to JSON" into a usuable theme. |
||||
* It expects a format of "themes/{NAME}/anythinghere" |
||||
*/ |
||||
|
||||
import fs from "fs"; |
||||
|
||||
const fileLocation = "./figmaTokens.json"; |
||||
const theme = "blue"; |
||||
|
||||
const fileContents = fs.readFileSync(fileLocation, { |
||||
encoding: "utf-8" |
||||
}); |
||||
const tokens = JSON.parse(fileContents); |
||||
|
||||
const themeTokens = tokens.themes[theme]; |
||||
const output = {}; |
||||
|
||||
function setKey(obj, key, defaultVal) { |
||||
const realKey = key.match(/^\d+$/g) ? "c" + key : key; |
||||
if (obj[key]) return obj[key]; |
||||
obj[realKey] = defaultVal; |
||||
return obj[realKey]; |
||||
} |
||||
|
||||
function handleToken(token, path) { |
||||
if (typeof token.name === "string" && typeof token.description === "string") { |
||||
let ref = output; |
||||
const lastKey = path.pop(); |
||||
path.forEach((v) => { |
||||
ref = setKey(ref, v, {}); |
||||
}); |
||||
setKey(ref, lastKey, token.hex); |
||||
return; |
||||
} |
||||
|
||||
for (let key in token) { |
||||
handleToken(token[key], [...path, key]); |
||||
} |
||||
} |
||||
|
||||
handleToken(themeTokens, []); |
||||
console.log(JSON.stringify(output, null, 2)); |
@ -1,24 +0,0 @@
@@ -1,24 +0,0 @@
|
||||
import { create } from "zustand"; |
||||
import { persist } from "zustand/middleware"; |
||||
import { immer } from "zustand/middleware/immer"; |
||||
|
||||
export interface ThemeStore { |
||||
theme: string | null; |
||||
setTheme(v: string | null): void; |
||||
} |
||||
|
||||
export const useThemeStore = create( |
||||
persist( |
||||
immer<ThemeStore>((set) => ({ |
||||
theme: null, |
||||
setTheme(v) { |
||||
set((s) => { |
||||
s.theme = v; |
||||
}); |
||||
}, |
||||
})), |
||||
{ |
||||
name: "__MW::theme", |
||||
} |
||||
) |
||||
); |
@ -0,0 +1,45 @@
@@ -0,0 +1,45 @@
|
||||
import { ReactNode } from "react"; |
||||
import { Helmet } from "react-helmet-async"; |
||||
import { create } from "zustand"; |
||||
import { persist } from "zustand/middleware"; |
||||
import { immer } from "zustand/middleware/immer"; |
||||
|
||||
export interface ThemeStore { |
||||
theme: string | null; |
||||
setTheme(v: string | null): void; |
||||
} |
||||
|
||||
export const useThemeStore = create( |
||||
persist( |
||||
immer<ThemeStore>((set) => ({ |
||||
theme: null, |
||||
setTheme(v) { |
||||
set((s) => { |
||||
s.theme = v; |
||||
}); |
||||
}, |
||||
})), |
||||
{ |
||||
name: "__MW::theme", |
||||
} |
||||
) |
||||
); |
||||
|
||||
export function ThemeProvider(props: { |
||||
children?: ReactNode; |
||||
applyGlobal?: boolean; |
||||
}) { |
||||
const theme = useThemeStore((s) => s.theme); |
||||
const themeSelector = theme ? `theme-${theme}` : undefined; |
||||
|
||||
return ( |
||||
<div className={themeSelector}> |
||||
{props.applyGlobal ? ( |
||||
<Helmet> |
||||
<body className={themeSelector} /> |
||||
</Helmet> |
||||
) : null} |
||||
{props.children} |
||||
</div> |
||||
); |
||||
} |
@ -1,19 +1,252 @@
@@ -1,19 +1,252 @@
|
||||
import { createTheme } from "../types"; |
||||
|
||||
const tokens = { |
||||
purple: { |
||||
c50: "#aac5ff", |
||||
c100: "#82a9ff", |
||||
c200: "#5988ec", |
||||
c300: "#4472d6", |
||||
c400: "#315ebf", |
||||
c500: "#284687", |
||||
c600: "#1f3564", |
||||
c700: "#18284a", |
||||
c800: "#111c34", |
||||
c900: "#0b1322" |
||||
}, |
||||
shade: { |
||||
c50: "#756790", |
||||
c100: "#60527a", |
||||
c200: "#4a3f60", |
||||
c300: "#3c324f", |
||||
c400: "#302741", |
||||
c500: "#251e32", |
||||
c600: "#1d1728", |
||||
c700: "#181322", |
||||
c800: "#130f1b", |
||||
c900: "#0d0a12" |
||||
}, |
||||
ash: { |
||||
c50: "#7f859b", |
||||
c100: "#5b627b", |
||||
c200: "#444b64", |
||||
c300: "#2b344e", |
||||
c400: "#202842", |
||||
c500: "#1c243c", |
||||
c600: "#171d32", |
||||
c700: "#131829", |
||||
c800: "#101420", |
||||
c900: "#0c0f16" |
||||
}, |
||||
blue: { |
||||
c50: "#adb4f5", |
||||
c100: "#7981cc", |
||||
c200: "#5d65ae", |
||||
c300: "#3b438c", |
||||
c400: "#2a3171", |
||||
c500: "#1f2450", |
||||
c600: "#1b1f41", |
||||
c700: "#171b36", |
||||
c800: "#101120", |
||||
c900: "#0b0c13" |
||||
} |
||||
}; |
||||
|
||||
export default createTheme({ |
||||
name: "blue", |
||||
extend: { |
||||
colors: { |
||||
themePreview: { |
||||
primary: "#3A4FAA", |
||||
secondary: "#303487", |
||||
ghost: "white", |
||||
primary: tokens.blue.c200, |
||||
secondary: tokens.shade.c50 |
||||
}, |
||||
|
||||
pill: { |
||||
background: tokens.shade.c300, |
||||
backgroundHover: tokens.shade.c200, |
||||
highlight: tokens.blue.c200 |
||||
}, |
||||
|
||||
global: { |
||||
accentA: tokens.blue.c200, |
||||
accentB: tokens.blue.c300 |
||||
}, |
||||
|
||||
// light bar
|
||||
lightBar: { |
||||
light: "#3A4FAA", |
||||
light: tokens.blue.c400 |
||||
}, |
||||
|
||||
buttons: { |
||||
toggle: tokens.purple.c300, |
||||
toggleDisabled: tokens.ash.c500, |
||||
|
||||
secondary: tokens.ash.c700, |
||||
secondaryHover: tokens.ash.c700, |
||||
purple: tokens.purple.c500, |
||||
purpleHover: tokens.purple.c400, |
||||
cancel: tokens.ash.c500, |
||||
cancelHover: tokens.ash.c300 |
||||
}, |
||||
|
||||
background: { |
||||
main: tokens.shade.c900, |
||||
secondary: tokens.shade.c600, |
||||
secondaryHover: tokens.shade.c400, |
||||
accentA: tokens.purple.c500, |
||||
accentB: tokens.blue.c500 |
||||
}, |
||||
|
||||
type: { |
||||
logo: tokens.purple.c100, |
||||
text: tokens.shade.c50, |
||||
dimmed: tokens.shade.c50, |
||||
divider: tokens.ash.c500, |
||||
secondary: tokens.ash.c100, |
||||
link: tokens.purple.c100, |
||||
linkHover: tokens.purple.c50 |
||||
}, |
||||
|
||||
search: { |
||||
background: tokens.shade.c500, |
||||
focused: tokens.shade.c400, |
||||
placeholder: tokens.shade.c100, |
||||
icon: tokens.shade.c100 |
||||
}, |
||||
|
||||
mediaCard: { |
||||
hoverBackground: tokens.shade.c600, |
||||
hoverAccent: tokens.shade.c50, |
||||
hoverShadow: tokens.shade.c900, |
||||
shadow: tokens.shade.c700, |
||||
barColor: tokens.ash.c200, |
||||
barFillColor: tokens.purple.c100, |
||||
badge: tokens.shade.c700, |
||||
badgeText: tokens.ash.c100 |
||||
}, |
||||
|
||||
largeCard: { |
||||
background: tokens.shade.c600, |
||||
icon: tokens.purple.c400 |
||||
}, |
||||
|
||||
dropdown: { |
||||
background: tokens.shade.c600, |
||||
altBackground: tokens.shade.c700, |
||||
hoverBackground: tokens.shade.c500, |
||||
text: tokens.shade.c50, |
||||
secondary: tokens.shade.c100, |
||||
border: tokens.shade.c400, |
||||
contentBackground: tokens.shade.c500 |
||||
}, |
||||
|
||||
authentication: { |
||||
border: tokens.shade.c300, |
||||
inputBg: tokens.shade.c600, |
||||
inputBgHover: tokens.shade.c500, |
||||
wordBackground: tokens.shade.c500, |
||||
copyText: tokens.shade.c100, |
||||
copyTextHover: tokens.ash.c50 |
||||
}, |
||||
|
||||
settings: { |
||||
sidebar: { |
||||
activeLink: tokens.shade.c600, |
||||
badge: tokens.shade.c900, |
||||
|
||||
type: { |
||||
secondary: tokens.shade.c200, |
||||
inactive: tokens.shade.c50, |
||||
icon: tokens.shade.c50, |
||||
iconActivated: tokens.purple.c200, |
||||
activated: tokens.purple.c50 |
||||
} |
||||
}, |
||||
|
||||
card: { |
||||
border: tokens.shade.c400, |
||||
background: tokens.shade.c400, |
||||
altBackground: tokens.shade.c400 |
||||
}, |
||||
|
||||
saveBar: { |
||||
background: tokens.shade.c800 |
||||
} |
||||
}, |
||||
|
||||
utils: { |
||||
divider: tokens.ash.c300 |
||||
}, |
||||
|
||||
errors: { |
||||
card: tokens.shade.c800, |
||||
border: tokens.ash.c500, |
||||
|
||||
type: { |
||||
secondary: tokens.ash.c100 |
||||
} |
||||
}, |
||||
|
||||
about: { |
||||
circle: tokens.ash.c500, |
||||
circleText: tokens.ash.c50 |
||||
}, |
||||
|
||||
editBadge: { |
||||
bg: tokens.ash.c500, |
||||
bgHover: tokens.ash.c400, |
||||
text: tokens.ash.c50 |
||||
}, |
||||
|
||||
progress: { |
||||
background: tokens.ash.c50, |
||||
preloaded: tokens.ash.c50, |
||||
filled: tokens.purple.c200 |
||||
}, |
||||
|
||||
video: { |
||||
buttonBackground: tokens.ash.c200, |
||||
|
||||
autoPlay: { |
||||
background: tokens.ash.c700, |
||||
hover: tokens.ash.c500 |
||||
}, |
||||
|
||||
scraping: { |
||||
card: tokens.shade.c700, |
||||
loading: tokens.purple.c200, |
||||
noresult: tokens.ash.c100 |
||||
}, |
||||
|
||||
audio: { |
||||
set: tokens.purple.c200 |
||||
}, |
||||
|
||||
context: { |
||||
background: tokens.ash.c900, |
||||
light: tokens.shade.c50, |
||||
border: tokens.ash.c600, |
||||
hoverColor: tokens.ash.c600, |
||||
buttonFocus: tokens.ash.c500, |
||||
flagBg: tokens.ash.c500, |
||||
inputBg: tokens.ash.c600, |
||||
buttonOverInputHover: tokens.ash.c500, |
||||
inputPlaceholder: tokens.ash.c200, |
||||
cardBorder: tokens.ash.c700, |
||||
slider: tokens.ash.c50, |
||||
sliderFilled: tokens.purple.c200, |
||||
|
||||
buttons: { |
||||
list: tokens.ash.c700, |
||||
active: tokens.ash.c900 |
||||
}, |
||||
|
||||
closeHover: tokens.ash.c800, |
||||
|
||||
type: { |
||||
secondary: tokens.ash.c200, |
||||
accent: tokens.purple.c200 |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
}) |
||||
}); |
||||
|
@ -1,19 +1,252 @@
@@ -1,19 +1,252 @@
|
||||
import { createTheme } from "../types"; |
||||
|
||||
const tokens = { |
||||
purple: { |
||||
c50: "#d5b8f1", |
||||
c100: "#c096ea", |
||||
c200: "#a378cd", |
||||
c300: "#8d69b0", |
||||
c400: "#785998", |
||||
c500: "#57456a", |
||||
c600: "#41344e", |
||||
c700: "#31283a", |
||||
c800: "#221c29", |
||||
c900: "#16121b" |
||||
}, |
||||
shade: { |
||||
c50: "#7c7c7c", |
||||
c100: "#666666", |
||||
c200: "#4f4f4f", |
||||
c300: "#404040", |
||||
c400: "#343434", |
||||
c500: "#282828", |
||||
c600: "#202020", |
||||
c700: "#1a1a1a", |
||||
c800: "#151515", |
||||
c900: "#0e0e0e" |
||||
}, |
||||
ash: { |
||||
c50: "#8d8d8d", |
||||
c100: "#6b6b6b", |
||||
c200: "#545454", |
||||
c300: "#3c3c3c", |
||||
c400: "#313131", |
||||
c500: "#2c2c2c", |
||||
c600: "#252525", |
||||
c700: "#1e1e1e", |
||||
c800: "#181818", |
||||
c900: "#111111" |
||||
}, |
||||
blue: { |
||||
c50: "#bfbfe4", |
||||
c100: "#9d9da8", |
||||
c200: "#868686", |
||||
c300: "#626265", |
||||
c400: "#484853", |
||||
c500: "#35353a", |
||||
c600: "#2d2d2f", |
||||
c700: "#272727", |
||||
c800: "#181818", |
||||
c900: "#0f0f0f" |
||||
} |
||||
}; |
||||
|
||||
export default createTheme({ |
||||
name: "gray", |
||||
extend: { |
||||
colors: { |
||||
themePreview: { |
||||
primary: "#343441", |
||||
secondary: "#0C0C16", |
||||
ghost: "white", |
||||
primary: tokens.blue.c200, |
||||
secondary: tokens.shade.c50 |
||||
}, |
||||
|
||||
pill: { |
||||
background: tokens.shade.c300, |
||||
backgroundHover: tokens.shade.c200, |
||||
highlight: tokens.blue.c200 |
||||
}, |
||||
|
||||
global: { |
||||
accentA: tokens.blue.c200, |
||||
accentB: tokens.blue.c300 |
||||
}, |
||||
|
||||
// light bar
|
||||
lightBar: { |
||||
light: "#343441" |
||||
light: tokens.blue.c400 |
||||
}, |
||||
|
||||
buttons: { |
||||
toggle: tokens.purple.c300, |
||||
toggleDisabled: tokens.ash.c500, |
||||
|
||||
secondary: tokens.ash.c700, |
||||
secondaryHover: tokens.ash.c700, |
||||
purple: tokens.purple.c500, |
||||
purpleHover: tokens.purple.c400, |
||||
cancel: tokens.ash.c500, |
||||
cancelHover: tokens.ash.c300 |
||||
}, |
||||
|
||||
background: { |
||||
main: tokens.shade.c900, |
||||
secondary: tokens.shade.c600, |
||||
secondaryHover: tokens.shade.c400, |
||||
accentA: tokens.purple.c500, |
||||
accentB: tokens.blue.c500 |
||||
}, |
||||
|
||||
type: { |
||||
logo: tokens.purple.c100, |
||||
text: tokens.shade.c50, |
||||
dimmed: tokens.shade.c50, |
||||
divider: tokens.ash.c500, |
||||
secondary: tokens.ash.c100, |
||||
link: tokens.purple.c100, |
||||
linkHover: tokens.purple.c50 |
||||
}, |
||||
|
||||
search: { |
||||
background: tokens.shade.c500, |
||||
focused: tokens.shade.c400, |
||||
placeholder: tokens.shade.c100, |
||||
icon: tokens.shade.c100 |
||||
}, |
||||
|
||||
mediaCard: { |
||||
hoverBackground: tokens.shade.c600, |
||||
hoverAccent: tokens.shade.c50, |
||||
hoverShadow: tokens.shade.c900, |
||||
shadow: tokens.shade.c700, |
||||
barColor: tokens.ash.c200, |
||||
barFillColor: tokens.purple.c100, |
||||
badge: tokens.shade.c700, |
||||
badgeText: tokens.ash.c100 |
||||
}, |
||||
|
||||
largeCard: { |
||||
background: tokens.shade.c600, |
||||
icon: tokens.purple.c400 |
||||
}, |
||||
|
||||
dropdown: { |
||||
background: tokens.shade.c600, |
||||
altBackground: tokens.shade.c700, |
||||
hoverBackground: tokens.shade.c500, |
||||
text: tokens.shade.c50, |
||||
secondary: tokens.shade.c100, |
||||
border: tokens.shade.c400, |
||||
contentBackground: tokens.shade.c500 |
||||
}, |
||||
|
||||
authentication: { |
||||
border: tokens.shade.c300, |
||||
inputBg: tokens.shade.c600, |
||||
inputBgHover: tokens.shade.c500, |
||||
wordBackground: tokens.shade.c500, |
||||
copyText: tokens.shade.c100, |
||||
copyTextHover: tokens.ash.c50 |
||||
}, |
||||
|
||||
settings: { |
||||
sidebar: { |
||||
activeLink: tokens.shade.c600, |
||||
badge: tokens.shade.c900, |
||||
|
||||
type: { |
||||
secondary: tokens.shade.c200, |
||||
inactive: tokens.shade.c50, |
||||
icon: tokens.shade.c50, |
||||
iconActivated: tokens.purple.c200, |
||||
activated: tokens.purple.c50 |
||||
} |
||||
}, |
||||
|
||||
card: { |
||||
border: tokens.shade.c400, |
||||
background: tokens.shade.c400, |
||||
altBackground: tokens.shade.c400 |
||||
}, |
||||
|
||||
saveBar: { |
||||
background: tokens.shade.c800 |
||||
} |
||||
}, |
||||
|
||||
utils: { |
||||
divider: tokens.ash.c300 |
||||
}, |
||||
|
||||
errors: { |
||||
card: tokens.shade.c800, |
||||
border: tokens.ash.c500, |
||||
|
||||
type: { |
||||
secondary: tokens.ash.c100 |
||||
} |
||||
}, |
||||
|
||||
about: { |
||||
circle: tokens.ash.c500, |
||||
circleText: tokens.ash.c50 |
||||
}, |
||||
|
||||
editBadge: { |
||||
bg: tokens.ash.c500, |
||||
bgHover: tokens.ash.c400, |
||||
text: tokens.ash.c50 |
||||
}, |
||||
|
||||
progress: { |
||||
background: tokens.ash.c50, |
||||
preloaded: tokens.ash.c50, |
||||
filled: tokens.purple.c200 |
||||
}, |
||||
|
||||
video: { |
||||
buttonBackground: tokens.ash.c200, |
||||
|
||||
autoPlay: { |
||||
background: tokens.ash.c700, |
||||
hover: tokens.ash.c500 |
||||
}, |
||||
|
||||
scraping: { |
||||
card: tokens.shade.c700, |
||||
loading: tokens.purple.c200, |
||||
noresult: tokens.ash.c100 |
||||
}, |
||||
|
||||
audio: { |
||||
set: tokens.purple.c200 |
||||
}, |
||||
|
||||
context: { |
||||
background: tokens.ash.c900, |
||||
light: tokens.shade.c50, |
||||
border: tokens.ash.c600, |
||||
hoverColor: tokens.ash.c600, |
||||
buttonFocus: tokens.ash.c500, |
||||
flagBg: tokens.ash.c500, |
||||
inputBg: tokens.ash.c600, |
||||
buttonOverInputHover: tokens.ash.c500, |
||||
inputPlaceholder: tokens.ash.c200, |
||||
cardBorder: tokens.ash.c700, |
||||
slider: tokens.ash.c50, |
||||
sliderFilled: tokens.purple.c200, |
||||
|
||||
buttons: { |
||||
list: tokens.ash.c700, |
||||
active: tokens.ash.c900 |
||||
}, |
||||
|
||||
closeHover: tokens.ash.c800, |
||||
|
||||
type: { |
||||
secondary: tokens.ash.c200, |
||||
accent: tokens.purple.c200 |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
}) |
||||
}); |
||||
|
@ -1,19 +1,252 @@
@@ -1,19 +1,252 @@
|
||||
import { createTheme } from "../types"; |
||||
|
||||
const tokens = { |
||||
purple: { |
||||
c50: "#aaffd5", |
||||
c100: "#82ffc0", |
||||
c200: "#59eca3", |
||||
c300: "#44d68d", |
||||
c400: "#31bf78", |
||||
c500: "#288757", |
||||
c600: "#1f6441", |
||||
c700: "#184a31", |
||||
c800: "#113422", |
||||
c900: "#0b2216" |
||||
}, |
||||
shade: { |
||||
c50: "#906771", |
||||
c100: "#7a525c", |
||||
c200: "#603f47", |
||||
c300: "#4f3239", |
||||
c400: "#41272d", |
||||
c500: "#321e23", |
||||
c600: "#28171b", |
||||
c700: "#221317", |
||||
c800: "#1b0f12", |
||||
c900: "#120a0c" |
||||
}, |
||||
ash: { |
||||
c50: "#9b7f94", |
||||
c100: "#7b5b73", |
||||
c200: "#64445c", |
||||
c300: "#4e2b46", |
||||
c400: "#42203a", |
||||
c500: "#3c1c34", |
||||
c600: "#32172b", |
||||
c700: "#291324", |
||||
c800: "#20101c", |
||||
c900: "#160c15" |
||||
}, |
||||
blue: { |
||||
c50: "#f5adb4", |
||||
c100: "#cc7981", |
||||
c200: "#ae5d65", |
||||
c300: "#8c3b43", |
||||
c400: "#712a31", |
||||
c500: "#501f24", |
||||
c600: "#411b1f", |
||||
c700: "#36171b", |
||||
c800: "#201011", |
||||
c900: "#130b0c" |
||||
} |
||||
}; |
||||
|
||||
export default createTheme({ |
||||
name: "red", |
||||
extend: { |
||||
colors: { |
||||
themePreview: { |
||||
primary: "#A8335E", |
||||
secondary: "#6A2441", |
||||
ghost: "white", |
||||
primary: tokens.blue.c200, |
||||
secondary: tokens.shade.c50 |
||||
}, |
||||
|
||||
pill: { |
||||
background: tokens.shade.c300, |
||||
backgroundHover: tokens.shade.c200, |
||||
highlight: tokens.blue.c200 |
||||
}, |
||||
|
||||
global: { |
||||
accentA: tokens.blue.c200, |
||||
accentB: tokens.blue.c300 |
||||
}, |
||||
|
||||
// light bar
|
||||
lightBar: { |
||||
light: "#A8335E" |
||||
light: tokens.blue.c400 |
||||
}, |
||||
|
||||
buttons: { |
||||
toggle: tokens.purple.c300, |
||||
toggleDisabled: tokens.ash.c500, |
||||
|
||||
secondary: tokens.ash.c700, |
||||
secondaryHover: tokens.ash.c700, |
||||
purple: tokens.purple.c500, |
||||
purpleHover: tokens.purple.c400, |
||||
cancel: tokens.ash.c500, |
||||
cancelHover: tokens.ash.c300 |
||||
}, |
||||
|
||||
background: { |
||||
main: tokens.shade.c900, |
||||
secondary: tokens.shade.c600, |
||||
secondaryHover: tokens.shade.c400, |
||||
accentA: tokens.purple.c500, |
||||
accentB: tokens.blue.c500 |
||||
}, |
||||
|
||||
type: { |
||||
logo: tokens.purple.c100, |
||||
text: tokens.shade.c50, |
||||
dimmed: tokens.shade.c50, |
||||
divider: tokens.ash.c500, |
||||
secondary: tokens.ash.c100, |
||||
link: tokens.purple.c100, |
||||
linkHover: tokens.purple.c50 |
||||
}, |
||||
|
||||
search: { |
||||
background: tokens.shade.c500, |
||||
focused: tokens.shade.c400, |
||||
placeholder: tokens.shade.c100, |
||||
icon: tokens.shade.c100 |
||||
}, |
||||
|
||||
mediaCard: { |
||||
hoverBackground: tokens.shade.c600, |
||||
hoverAccent: tokens.shade.c50, |
||||
hoverShadow: tokens.shade.c900, |
||||
shadow: tokens.shade.c700, |
||||
barColor: tokens.ash.c200, |
||||
barFillColor: tokens.purple.c100, |
||||
badge: tokens.shade.c700, |
||||
badgeText: tokens.ash.c100 |
||||
}, |
||||
|
||||
largeCard: { |
||||
background: tokens.shade.c600, |
||||
icon: tokens.purple.c400 |
||||
}, |
||||
|
||||
dropdown: { |
||||
background: tokens.shade.c600, |
||||
altBackground: tokens.shade.c700, |
||||
hoverBackground: tokens.shade.c500, |
||||
text: tokens.shade.c50, |
||||
secondary: tokens.shade.c100, |
||||
border: tokens.shade.c400, |
||||
contentBackground: tokens.shade.c500 |
||||
}, |
||||
|
||||
authentication: { |
||||
border: tokens.shade.c300, |
||||
inputBg: tokens.shade.c600, |
||||
inputBgHover: tokens.shade.c500, |
||||
wordBackground: tokens.shade.c500, |
||||
copyText: tokens.shade.c100, |
||||
copyTextHover: tokens.ash.c50 |
||||
}, |
||||
|
||||
settings: { |
||||
sidebar: { |
||||
activeLink: tokens.shade.c600, |
||||
badge: tokens.shade.c900, |
||||
|
||||
type: { |
||||
secondary: tokens.shade.c200, |
||||
inactive: tokens.shade.c50, |
||||
icon: tokens.shade.c50, |
||||
iconActivated: tokens.purple.c200, |
||||
activated: tokens.purple.c50 |
||||
} |
||||
}, |
||||
|
||||
card: { |
||||
border: tokens.shade.c400, |
||||
background: tokens.shade.c400, |
||||
altBackground: tokens.shade.c400 |
||||
}, |
||||
|
||||
saveBar: { |
||||
background: tokens.shade.c800 |
||||
} |
||||
}, |
||||
|
||||
utils: { |
||||
divider: tokens.ash.c300 |
||||
}, |
||||
|
||||
errors: { |
||||
card: tokens.shade.c800, |
||||
border: tokens.ash.c500, |
||||
|
||||
type: { |
||||
secondary: tokens.ash.c100 |
||||
} |
||||
}, |
||||
|
||||
about: { |
||||
circle: tokens.ash.c500, |
||||
circleText: tokens.ash.c50 |
||||
}, |
||||
|
||||
editBadge: { |
||||
bg: tokens.ash.c500, |
||||
bgHover: tokens.ash.c400, |
||||
text: tokens.ash.c50 |
||||
}, |
||||
|
||||
progress: { |
||||
background: tokens.ash.c50, |
||||
preloaded: tokens.ash.c50, |
||||
filled: tokens.purple.c200 |
||||
}, |
||||
|
||||
video: { |
||||
buttonBackground: tokens.ash.c200, |
||||
|
||||
autoPlay: { |
||||
background: tokens.ash.c700, |
||||
hover: tokens.ash.c500 |
||||
}, |
||||
|
||||
scraping: { |
||||
card: tokens.shade.c700, |
||||
loading: tokens.purple.c200, |
||||
noresult: tokens.ash.c100 |
||||
}, |
||||
|
||||
audio: { |
||||
set: tokens.purple.c200 |
||||
}, |
||||
|
||||
context: { |
||||
background: tokens.ash.c900, |
||||
light: tokens.shade.c50, |
||||
border: tokens.ash.c600, |
||||
hoverColor: tokens.ash.c600, |
||||
buttonFocus: tokens.ash.c500, |
||||
flagBg: tokens.ash.c500, |
||||
inputBg: tokens.ash.c600, |
||||
buttonOverInputHover: tokens.ash.c500, |
||||
inputPlaceholder: tokens.ash.c200, |
||||
cardBorder: tokens.ash.c700, |
||||
slider: tokens.ash.c50, |
||||
sliderFilled: tokens.purple.c200, |
||||
|
||||
buttons: { |
||||
list: tokens.ash.c700, |
||||
active: tokens.ash.c900 |
||||
}, |
||||
|
||||
closeHover: tokens.ash.c800, |
||||
|
||||
type: { |
||||
secondary: tokens.ash.c200, |
||||
accent: tokens.purple.c200 |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
}) |
||||
}); |
||||
|
@ -1,19 +1,252 @@
@@ -1,19 +1,252 @@
|
||||
import { createTheme } from "../types"; |
||||
|
||||
const tokens = { |
||||
purple: { |
||||
c50: "#aad7ff", |
||||
c100: "#82c4ff", |
||||
c200: "#59a8ec", |
||||
c300: "#4491d6", |
||||
c400: "#317dbf", |
||||
c500: "#285b87", |
||||
c600: "#1f4464", |
||||
c700: "#18334a", |
||||
c800: "#112434", |
||||
c900: "#0b1822" |
||||
}, |
||||
shade: { |
||||
c50: "#677c90", |
||||
c100: "#52667a", |
||||
c200: "#3f4f60", |
||||
c300: "#32404f", |
||||
c400: "#273441", |
||||
c500: "#1e2832", |
||||
c600: "#172028", |
||||
c700: "#131a22", |
||||
c800: "#0f151b", |
||||
c900: "#0a0e12" |
||||
}, |
||||
ash: { |
||||
c50: "#7f9b9b", |
||||
c100: "#5b7b7b", |
||||
c200: "#446463", |
||||
c300: "#2b4e4d", |
||||
c400: "#204241", |
||||
c500: "#1c3c3b", |
||||
c600: "#173232", |
||||
c700: "#132929", |
||||
c800: "#102020", |
||||
c900: "#0c1615" |
||||
}, |
||||
blue: { |
||||
c50: "#adf5d6", |
||||
c100: "#79cca8", |
||||
c200: "#5dae8b", |
||||
c300: "#3b8c69", |
||||
c400: "#2a7152", |
||||
c500: "#1f503b", |
||||
c600: "#1b4130", |
||||
c700: "#173629", |
||||
c800: "#102019", |
||||
c900: "#0b1310" |
||||
} |
||||
}; |
||||
|
||||
export default createTheme({ |
||||
name: "teal", |
||||
extend: { |
||||
colors: { |
||||
themePreview: { |
||||
primary: "#469c51", |
||||
secondary: "#1a3d2b", |
||||
ghost: "white", |
||||
primary: tokens.blue.c200, |
||||
secondary: tokens.shade.c50 |
||||
}, |
||||
|
||||
pill: { |
||||
background: tokens.shade.c300, |
||||
backgroundHover: tokens.shade.c200, |
||||
highlight: tokens.blue.c200 |
||||
}, |
||||
|
||||
global: { |
||||
accentA: tokens.blue.c200, |
||||
accentB: tokens.blue.c300 |
||||
}, |
||||
|
||||
// light bar
|
||||
lightBar: { |
||||
light: "#469c51", |
||||
light: tokens.blue.c400 |
||||
}, |
||||
|
||||
buttons: { |
||||
toggle: tokens.purple.c300, |
||||
toggleDisabled: tokens.ash.c500, |
||||
|
||||
secondary: tokens.ash.c700, |
||||
secondaryHover: tokens.ash.c700, |
||||
purple: tokens.purple.c500, |
||||
purpleHover: tokens.purple.c400, |
||||
cancel: tokens.ash.c500, |
||||
cancelHover: tokens.ash.c300 |
||||
}, |
||||
|
||||
background: { |
||||
main: tokens.shade.c900, |
||||
secondary: tokens.shade.c600, |
||||
secondaryHover: tokens.shade.c400, |
||||
accentA: tokens.purple.c500, |
||||
accentB: tokens.blue.c500 |
||||
}, |
||||
|
||||
type: { |
||||
logo: tokens.purple.c100, |
||||
text: tokens.shade.c50, |
||||
dimmed: tokens.shade.c50, |
||||
divider: tokens.ash.c500, |
||||
secondary: tokens.ash.c100, |
||||
link: tokens.purple.c100, |
||||
linkHover: tokens.purple.c50 |
||||
}, |
||||
|
||||
search: { |
||||
background: tokens.shade.c500, |
||||
focused: tokens.shade.c400, |
||||
placeholder: tokens.shade.c100, |
||||
icon: tokens.shade.c100 |
||||
}, |
||||
|
||||
mediaCard: { |
||||
hoverBackground: tokens.shade.c600, |
||||
hoverAccent: tokens.shade.c50, |
||||
hoverShadow: tokens.shade.c900, |
||||
shadow: tokens.shade.c700, |
||||
barColor: tokens.ash.c200, |
||||
barFillColor: tokens.purple.c100, |
||||
badge: tokens.shade.c700, |
||||
badgeText: tokens.ash.c100 |
||||
}, |
||||
|
||||
largeCard: { |
||||
background: tokens.shade.c600, |
||||
icon: tokens.purple.c400 |
||||
}, |
||||
|
||||
dropdown: { |
||||
background: tokens.shade.c600, |
||||
altBackground: tokens.shade.c700, |
||||
hoverBackground: tokens.shade.c500, |
||||
text: tokens.shade.c50, |
||||
secondary: tokens.shade.c100, |
||||
border: tokens.shade.c400, |
||||
contentBackground: tokens.shade.c500 |
||||
}, |
||||
|
||||
authentication: { |
||||
border: tokens.shade.c300, |
||||
inputBg: tokens.shade.c600, |
||||
inputBgHover: tokens.shade.c500, |
||||
wordBackground: tokens.shade.c500, |
||||
copyText: tokens.shade.c100, |
||||
copyTextHover: tokens.ash.c50 |
||||
}, |
||||
|
||||
settings: { |
||||
sidebar: { |
||||
activeLink: tokens.shade.c600, |
||||
badge: tokens.shade.c900, |
||||
|
||||
type: { |
||||
secondary: tokens.shade.c200, |
||||
inactive: tokens.shade.c50, |
||||
icon: tokens.shade.c50, |
||||
iconActivated: tokens.purple.c200, |
||||
activated: tokens.purple.c50 |
||||
} |
||||
}, |
||||
|
||||
card: { |
||||
border: tokens.shade.c400, |
||||
background: tokens.shade.c400, |
||||
altBackground: tokens.shade.c400 |
||||
}, |
||||
|
||||
saveBar: { |
||||
background: tokens.shade.c800 |
||||
} |
||||
}, |
||||
|
||||
utils: { |
||||
divider: tokens.ash.c300 |
||||
}, |
||||
|
||||
errors: { |
||||
card: tokens.shade.c800, |
||||
border: tokens.ash.c500, |
||||
|
||||
type: { |
||||
secondary: tokens.ash.c100 |
||||
} |
||||
}, |
||||
|
||||
about: { |
||||
circle: tokens.ash.c500, |
||||
circleText: tokens.ash.c50 |
||||
}, |
||||
|
||||
editBadge: { |
||||
bg: tokens.ash.c500, |
||||
bgHover: tokens.ash.c400, |
||||
text: tokens.ash.c50 |
||||
}, |
||||
|
||||
progress: { |
||||
background: tokens.ash.c50, |
||||
preloaded: tokens.ash.c50, |
||||
filled: tokens.purple.c200 |
||||
}, |
||||
|
||||
video: { |
||||
buttonBackground: tokens.ash.c200, |
||||
|
||||
autoPlay: { |
||||
background: tokens.ash.c700, |
||||
hover: tokens.ash.c500 |
||||
}, |
||||
|
||||
scraping: { |
||||
card: tokens.shade.c700, |
||||
loading: tokens.purple.c200, |
||||
noresult: tokens.ash.c100 |
||||
}, |
||||
|
||||
audio: { |
||||
set: tokens.purple.c200 |
||||
}, |
||||
|
||||
context: { |
||||
background: tokens.ash.c900, |
||||
light: tokens.shade.c50, |
||||
border: tokens.ash.c600, |
||||
hoverColor: tokens.ash.c600, |
||||
buttonFocus: tokens.ash.c500, |
||||
flagBg: tokens.ash.c500, |
||||
inputBg: tokens.ash.c600, |
||||
buttonOverInputHover: tokens.ash.c500, |
||||
inputPlaceholder: tokens.ash.c200, |
||||
cardBorder: tokens.ash.c700, |
||||
slider: tokens.ash.c50, |
||||
sliderFilled: tokens.purple.c200, |
||||
|
||||
buttons: { |
||||
list: tokens.ash.c700, |
||||
active: tokens.ash.c900 |
||||
}, |
||||
|
||||
closeHover: tokens.ash.c800, |
||||
|
||||
type: { |
||||
secondary: tokens.ash.c200, |
||||
accent: tokens.purple.c200 |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
}) |
||||
}); |
||||
|
Loading…
Reference in new issue