Grabbed dndbeyond's source code
``` ~/go/bin/sourcemapper -output ddb -jsurl https://media.dndbeyond.com/character-app/static/js/main.90aa78c5.js ```
This commit is contained in:
+77
@@ -0,0 +1,77 @@
|
||||
import { ThemeOptions } from "@mui/material";
|
||||
|
||||
export const components: ThemeOptions["components"] = {
|
||||
MuiButtonBase: {
|
||||
defaultProps: {
|
||||
disableRipple: true,
|
||||
},
|
||||
},
|
||||
MuiDialog: {
|
||||
styleOverrides: {
|
||||
paper: ({ theme }) => ({
|
||||
minWidth: 320,
|
||||
"&.MuiPaper-rounded": {
|
||||
borderRadius: "8px",
|
||||
},
|
||||
"&.MuiPaper-outlined": {
|
||||
borderColor: theme.palette.primary.main,
|
||||
},
|
||||
}),
|
||||
},
|
||||
},
|
||||
MuiGrid: {
|
||||
styleOverrides: {
|
||||
root: {
|
||||
/**
|
||||
* n.b. this is a workaround for bad types on the DialogTitle component,
|
||||
* what I really want there is a Grid, but I don't want to enforce these
|
||||
* styles on any other Grid components that might be passed in, so I add
|
||||
* the className "DdbDialogTitle-root" to target this specific component
|
||||
*/
|
||||
"&.DdbDialogTitle-root": {
|
||||
padding: "16px 20px 8px",
|
||||
"& .MuiIconButton-root": {
|
||||
padding: "4px",
|
||||
marginRight: "-8px",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
MuiIconButton: {
|
||||
styleOverrides: {
|
||||
root: {
|
||||
transition: "none",
|
||||
"&:hover": {
|
||||
transition: "none",
|
||||
borderRadius: "3px",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
MuiDialogContent: {
|
||||
styleOverrides: {
|
||||
root: {
|
||||
padding: "16px 20px 0",
|
||||
},
|
||||
},
|
||||
},
|
||||
MuiDialogContentText: {
|
||||
styleOverrides: {
|
||||
root: ({ theme }) => ({
|
||||
color: theme.palette.text.primary,
|
||||
letterSpacing: "0.15px",
|
||||
marginBottom: "12px",
|
||||
}),
|
||||
},
|
||||
},
|
||||
MuiButton: {
|
||||
styleOverrides: {
|
||||
root: {
|
||||
fontSize: "15px",
|
||||
lineHeight: 26 / 15,
|
||||
letterSpacing: "0.45px",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
import { ThemeOptions } from "@mui/material";
|
||||
|
||||
export const palette: ThemeOptions["palette"] = {
|
||||
mode: "dark",
|
||||
text: {
|
||||
primary: "#ecedeeff",
|
||||
secondary: "#ecedeea3",
|
||||
disabled: "#ecedee5c",
|
||||
},
|
||||
primary: {
|
||||
main: "#dcdfe1ff",
|
||||
dark: "#75838bff",
|
||||
light: "#f9fafaff",
|
||||
contrastText: "#000000ff",
|
||||
},
|
||||
secondary: {
|
||||
main: "#00daa6ff",
|
||||
dark: "#00b674ff",
|
||||
light: "#b3efd9ff",
|
||||
contrastText: "#000000ff",
|
||||
},
|
||||
action: {
|
||||
active: "#dcdfe1a3",
|
||||
hover: "#dcdfe11f",
|
||||
selected: "#dcdfe12e",
|
||||
disabled: "#dcdfe166",
|
||||
disabledBackground: "#dcdfe133",
|
||||
focus: "#dcdfe133",
|
||||
},
|
||||
error: {
|
||||
main: "#ed6c02ff",
|
||||
dark: "#c77700ff",
|
||||
light: "#ffb547ff",
|
||||
contrastText: "#ffffffff",
|
||||
},
|
||||
warning: {
|
||||
main: "#ed6c02ff",
|
||||
dark: "#c77700ff",
|
||||
light: "#ffb547ff",
|
||||
contrastText: "#ffffffff",
|
||||
},
|
||||
info: {
|
||||
main: "#2196f3ff",
|
||||
dark: "#0b79d0ff",
|
||||
light: "#64b6f7ff",
|
||||
contrastText: "#ffffffff",
|
||||
},
|
||||
success: {
|
||||
main: "#4caf50ff",
|
||||
dark: "#3b873eff",
|
||||
light: "#7bc67eff",
|
||||
contrastText: "#ffffffff",
|
||||
},
|
||||
background: {
|
||||
paper: "#12181cff",
|
||||
default: "#232b2fff",
|
||||
pane: "#12181cdb",
|
||||
},
|
||||
common: { white: "#ffffffff", black: "#000000ff" },
|
||||
grey: {
|
||||
"50": "#f4f5f5ff",
|
||||
"100": "#ecedeeff",
|
||||
"200": "#dcdfe1ff",
|
||||
"300": "#c4cbceff",
|
||||
"400": "#a2acb2ff",
|
||||
"500": "#75838bff",
|
||||
"600": "#525c63ff",
|
||||
"700": "#374045ff",
|
||||
"800": "#232b2fff",
|
||||
"900": "#12181cff",
|
||||
},
|
||||
rarity: {
|
||||
uncommon: "#7ebe15ff",
|
||||
rare: "#41a9f2ff",
|
||||
veryRare: "#c364e7ff",
|
||||
legendary: "#ffb62aff",
|
||||
artifact: "#f77558ff",
|
||||
contrastText: "#000000ff",
|
||||
},
|
||||
reference: {
|
||||
magicItem: "#41a9f2ff",
|
||||
monster: "#f77558ff",
|
||||
skill: "#7ebe15ff",
|
||||
spell: "#c364e7ff",
|
||||
contrastText: "#000000ff",
|
||||
},
|
||||
message: {
|
||||
check: "#c364e7ff",
|
||||
custom: "#ecedeea3",
|
||||
damage: "#f77558ff",
|
||||
healSave: "#7ebe15ff",
|
||||
initiative: "#ffb62aff",
|
||||
toHit: "#41a9f2ff",
|
||||
},
|
||||
};
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
import { ThemeOptions } from "@mui/material";
|
||||
|
||||
export const palette: ThemeOptions["palette"] = {
|
||||
mode: "light",
|
||||
text: {
|
||||
primary: "#12181cff",
|
||||
secondary: "#12181ca3",
|
||||
disabled: "#12181c5c",
|
||||
},
|
||||
primary: {
|
||||
main: "#374045ff",
|
||||
dark: "#12181cff",
|
||||
light: "#75838bff",
|
||||
contrastText: "#ffffffff",
|
||||
},
|
||||
secondary: {
|
||||
main: "#e40712ff",
|
||||
dark: "#9f271dff",
|
||||
light: "#f77558ff",
|
||||
contrastText: "#ffffffff",
|
||||
},
|
||||
action: {
|
||||
active: "#12181ca3",
|
||||
hover: "#12181c14",
|
||||
selected: "#12181c1f",
|
||||
disabled: "#12181c5c",
|
||||
disabledBackground: "#12181c29",
|
||||
focus: "#12181c29",
|
||||
},
|
||||
error: {
|
||||
main: "#ed6c02ff",
|
||||
dark: "#c77700ff",
|
||||
light: "#ffb547ff",
|
||||
contrastText: "#ffffffff",
|
||||
},
|
||||
warning: {
|
||||
main: "#ed6c02ff",
|
||||
dark: "#c77700ff",
|
||||
light: "#ffb547ff",
|
||||
contrastText: "#ffffffff",
|
||||
},
|
||||
info: {
|
||||
main: "#2196f3ff",
|
||||
dark: "#0b79d0ff",
|
||||
light: "#64b6f7ff",
|
||||
contrastText: "#ffffffff",
|
||||
},
|
||||
success: {
|
||||
main: "#4caf50ff",
|
||||
dark: "#3b873eff",
|
||||
light: "#7bc67eff",
|
||||
contrastText: "#ffffffff",
|
||||
},
|
||||
background: {
|
||||
paper: "#ffffffff",
|
||||
default: "#f4f5f5ff",
|
||||
parchment: "#f9f6efff",
|
||||
scroll: "#eee8dbff",
|
||||
},
|
||||
common: { white: "#ffffffff", black: "#000000ff" },
|
||||
grey: {
|
||||
"50": "#f4f5f5ff",
|
||||
"100": "#ecedeeff",
|
||||
"200": "#dcdfe1ff",
|
||||
"300": "#c4cbceff",
|
||||
"400": "#a2acb2ff",
|
||||
"500": "#75838bff",
|
||||
"600": "#525c63ff",
|
||||
"700": "#374045ff",
|
||||
"800": "#232b2fff",
|
||||
"900": "#12181cff",
|
||||
},
|
||||
rarity: {
|
||||
uncommon: "#009158ff",
|
||||
rare: "#077bd0ff",
|
||||
veryRare: "#9605d4ff",
|
||||
legendary: "#ae5e21ff",
|
||||
artifact: "#c81e18ff",
|
||||
contrastText: "#ffffffff",
|
||||
},
|
||||
reference: {
|
||||
character: "#ee8600ff",
|
||||
magicItem: "#077bd0ff",
|
||||
monster: "#c60000ff",
|
||||
skill: "#009158ff",
|
||||
spell: "#9605d4ff",
|
||||
contrastText: "#ffffffff",
|
||||
},
|
||||
};
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
import { ThemeOptions } from "@mui/material";
|
||||
|
||||
export const typography: ThemeOptions["typography"] = {
|
||||
h1: {
|
||||
fontSize: "64px",
|
||||
fontFamily: "Tiamat Condensed SC",
|
||||
fontWeight: 400,
|
||||
fontStyle: "normal",
|
||||
fontStretch: "normal",
|
||||
letterSpacing: 1,
|
||||
lineHeight: "64px",
|
||||
},
|
||||
h2: {
|
||||
fontSize: "48px",
|
||||
fontFamily: "Roboto",
|
||||
fontWeight: 400,
|
||||
fontStyle: "normal",
|
||||
fontStretch: "normal",
|
||||
letterSpacing: "normal",
|
||||
lineHeight: "52.8px",
|
||||
},
|
||||
h3: {
|
||||
fontSize: "36px",
|
||||
fontFamily: "Roboto",
|
||||
fontWeight: 400,
|
||||
fontStyle: "normal",
|
||||
fontStretch: "normal",
|
||||
letterSpacing: "normal",
|
||||
lineHeight: "43.2px",
|
||||
},
|
||||
h4: {
|
||||
fontSize: "26px",
|
||||
fontFamily: "Roboto",
|
||||
fontWeight: 400,
|
||||
fontStyle: "normal",
|
||||
fontStretch: "normal",
|
||||
letterSpacing: "normal",
|
||||
lineHeight: "32.5px",
|
||||
},
|
||||
h5: {
|
||||
fontSize: "20px",
|
||||
fontFamily: "Roboto",
|
||||
fontWeight: 500,
|
||||
fontStyle: "normal",
|
||||
fontStretch: "normal",
|
||||
letterSpacing: "normal",
|
||||
lineHeight: "25px",
|
||||
},
|
||||
h6: {
|
||||
fontSize: "16px",
|
||||
fontFamily: "Roboto",
|
||||
fontWeight: 500,
|
||||
fontStyle: "normal",
|
||||
fontStretch: "normal",
|
||||
letterSpacing: "normal",
|
||||
lineHeight: "22.4px",
|
||||
},
|
||||
body1: {
|
||||
fontSize: "16px",
|
||||
fontFamily: "Roboto",
|
||||
fontWeight: 400,
|
||||
fontStyle: "normal",
|
||||
fontStretch: "normal",
|
||||
letterSpacing: 0.15,
|
||||
lineHeight: "24px",
|
||||
},
|
||||
body2: {
|
||||
fontSize: "14px",
|
||||
fontFamily: "Roboto",
|
||||
fontWeight: 400,
|
||||
fontStyle: "normal",
|
||||
fontStretch: "normal",
|
||||
letterSpacing: 0.15,
|
||||
lineHeight: "20.02px",
|
||||
},
|
||||
subtitle1: {
|
||||
fontSize: "16px",
|
||||
fontFamily: "Roboto",
|
||||
fontWeight: 400,
|
||||
fontStyle: "normal",
|
||||
fontStretch: "normal",
|
||||
letterSpacing: 0.15,
|
||||
lineHeight: "28px",
|
||||
},
|
||||
subtitle2: {
|
||||
fontSize: "14px",
|
||||
fontFamily: "Roboto",
|
||||
fontWeight: 500,
|
||||
fontStyle: "normal",
|
||||
fontStretch: "normal",
|
||||
letterSpacing: 0.1,
|
||||
lineHeight: "21.98px",
|
||||
},
|
||||
overline: {
|
||||
fontSize: "12px",
|
||||
fontFamily: "Roboto",
|
||||
fontWeight: 400,
|
||||
fontStyle: "normal",
|
||||
fontStretch: "normal",
|
||||
letterSpacing: 1,
|
||||
lineHeight: "31.92px",
|
||||
textTransform: "uppercase",
|
||||
},
|
||||
caption: {
|
||||
fontSize: "12px",
|
||||
fontFamily: "Roboto",
|
||||
fontWeight: 400,
|
||||
fontStyle: "normal",
|
||||
fontStretch: "normal",
|
||||
letterSpacing: 0.4,
|
||||
lineHeight: "19.92px",
|
||||
},
|
||||
};
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
import { createTheme, ThemeOptions } from "@mui/material";
|
||||
import { deepmerge } from "@mui/utils";
|
||||
import { components } from "./config/components";
|
||||
import { palette as darkThemePalette } from "./config/palette-dark";
|
||||
import { palette as lightThemePalette } from "./config/palette-light";
|
||||
import { typography } from "./config/typography";
|
||||
|
||||
export const createLightTheme = (options: ThemeOptions = {}) =>
|
||||
createTheme(
|
||||
deepmerge(
|
||||
{
|
||||
components,
|
||||
palette: lightThemePalette,
|
||||
typography,
|
||||
},
|
||||
options,
|
||||
),
|
||||
);
|
||||
|
||||
export const createDarkTheme = (options: ThemeOptions = {}) =>
|
||||
createTheme(
|
||||
deepmerge(
|
||||
{
|
||||
components,
|
||||
palette: darkThemePalette,
|
||||
typography,
|
||||
},
|
||||
options,
|
||||
),
|
||||
);
|
||||
Reference in New Issue
Block a user