@deephaven/components 0.55.1-beta.6 → 0.55.1-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/BaseStyleSheet.css +56 -9
- package/css/BaseStyleSheet.css.map +1 -1
- package/dist/Button.d.ts.map +1 -1
- package/dist/Button.js +26 -2
- package/dist/Button.js.map +1 -1
- package/dist/ComboBox.css +20 -0
- package/dist/ComboBox.css.map +1 -1
- package/dist/ComboBox.d.ts.map +1 -1
- package/dist/ComboBox.js +2 -4
- package/dist/ComboBox.js.map +1 -1
- package/dist/CustomTimeSelect.css +15 -2
- package/dist/CustomTimeSelect.css.map +1 -1
- package/dist/CustomTimeSelect.d.ts.map +1 -1
- package/dist/CustomTimeSelect.js +2 -5
- package/dist/CustomTimeSelect.js.map +1 -1
- package/dist/LoadingSpinner.css +2 -8
- package/dist/LoadingSpinner.css.map +1 -1
- package/dist/SearchInput.css +10 -4
- package/dist/SearchInput.css.map +1 -1
- package/dist/theme/ThemeModel.d.ts +12 -6
- package/dist/theme/ThemeModel.d.ts.map +1 -1
- package/dist/theme/ThemeModel.js +18 -3
- package/dist/theme/ThemeModel.js.map +1 -1
- package/dist/theme/ThemeProvider.d.ts +1 -0
- package/dist/theme/ThemeProvider.d.ts.map +1 -1
- package/dist/theme/ThemeProvider.js +6 -1
- package/dist/theme/ThemeProvider.js.map +1 -1
- package/dist/theme/ThemeUtils.d.ts +37 -5
- package/dist/theme/ThemeUtils.d.ts.map +1 -1
- package/dist/theme/ThemeUtils.js +80 -15
- package/dist/theme/ThemeUtils.js.map +1 -1
- package/dist/theme/theme-dark/theme-dark-components.css +1 -1
- package/dist/theme/theme-dark/theme-dark-components.css.map +1 -1
- package/dist/theme/theme-dark/theme-dark-palette.css +1 -1
- package/dist/theme/theme-dark/theme-dark-palette.css.map +1 -1
- package/dist/theme/theme-dark/theme-dark-semantic-chart.css +1 -1
- package/dist/theme/theme-dark/theme-dark-semantic-chart.css.map +1 -1
- package/dist/theme/theme-dark/theme-dark-semantic.css +1 -1
- package/dist/theme/theme-dark/theme-dark-semantic.css.map +1 -1
- package/dist/theme/theme-light/theme-light-palette.css +1 -1
- package/dist/theme/theme-light/theme-light-palette.css.map +1 -1
- package/dist/theme/theme-spectrum/theme-spectrum-alias.module.css +1 -1
- package/dist/theme/theme-spectrum/theme-spectrum-alias.module.css.map +1 -1
- package/dist/theme/theme-svg.css +1 -0
- package/dist/theme/theme-svg.css.map +1 -0
- package/package.json +7 -7
- package/scss/BaseStyleSheet.scss +96 -16
- package/scss/util.scss +27 -0
package/dist/theme/ThemeModel.js
CHANGED
|
@@ -3,10 +3,25 @@ export var DEFAULT_LIGHT_THEME_KEY = 'default-light';
|
|
|
3
3
|
|
|
4
4
|
// Css properties that are used in preload data with default values.
|
|
5
5
|
export var DEFAULT_PRELOAD_DATA_VARIABLES = {
|
|
6
|
-
'--dh-color-
|
|
7
|
-
// dark theme --dh-color-blue-
|
|
8
|
-
'--dh-color-
|
|
6
|
+
'--dh-color-loading-spinner-primary': '#3b6bda',
|
|
7
|
+
// dark theme --dh-color-blue-600
|
|
8
|
+
'--dh-color-loading-spinner-secondary': '#f0f0ee80',
|
|
9
|
+
// dark theme --dh-color-gray-800 + 50% opacity
|
|
10
|
+
'--dh-color-background': '#1a171a',
|
|
11
|
+
// dark theme --dh-color-gray-50
|
|
12
|
+
'--dh-color-foreground': '#f0f0ee' // dark theme --dh-color-gray-800
|
|
9
13
|
};
|
|
10
14
|
|
|
15
|
+
/**
|
|
16
|
+
* Some inline SVGs require manually updating their fill color via
|
|
17
|
+
* `updateSVGFillColors`. This object maps these variables to their respective
|
|
18
|
+
* fill color variables.
|
|
19
|
+
*/
|
|
20
|
+
export var SVG_ICON_MANUAL_COLOR_MAP = {
|
|
21
|
+
'--dh-svg-icon-select-indicator': '--dh-color-selector-fg',
|
|
22
|
+
'--dh-svg-icon-select-indicator-hover': '--dh-color-selector-hover-fg',
|
|
23
|
+
'--dh-svg-icon-select-indicator-disabled': '--dh-color-selector-disabled-fg',
|
|
24
|
+
'--dh-svg-icon-error': '--dh-color-form-control-error'
|
|
25
|
+
};
|
|
11
26
|
export var THEME_CACHE_LOCAL_STORAGE_KEY = 'deephaven.themeCache';
|
|
12
27
|
//# sourceMappingURL=ThemeModel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeModel.js","names":["DEFAULT_DARK_THEME_KEY","DEFAULT_LIGHT_THEME_KEY","DEFAULT_PRELOAD_DATA_VARIABLES","THEME_CACHE_LOCAL_STORAGE_KEY"],"sources":["../../src/theme/ThemeModel.ts"],"sourcesContent":["export type BaseThemeType = 'dark' | 'light';\nexport type BaseThemeKey = `default-${BaseThemeType}`;\nexport type
|
|
1
|
+
{"version":3,"file":"ThemeModel.js","names":["DEFAULT_DARK_THEME_KEY","DEFAULT_LIGHT_THEME_KEY","DEFAULT_PRELOAD_DATA_VARIABLES","SVG_ICON_MANUAL_COLOR_MAP","THEME_CACHE_LOCAL_STORAGE_KEY"],"sources":["../../src/theme/ThemeModel.ts"],"sourcesContent":["export type BaseThemeType = 'dark' | 'light';\nexport type BaseThemeKey = `default-${BaseThemeType}`;\nexport type CssVariableStyleContent = `:root{${string}`;\nexport type ThemeCssVariableName = `--dh-${string}`;\n\nexport type ThemePreloadColorVariable =\n | '--dh-color-loading-spinner-primary'\n | '--dh-color-loading-spinner-secondary'\n | '--dh-color-background'\n | '--dh-color-foreground';\n\nexport type ThemeIconsRequiringManualColorChanges =\n | '--dh-svg-icon-select-indicator'\n | '--dh-svg-icon-select-indicator-hover'\n | '--dh-svg-icon-select-indicator-disabled'\n | '--dh-svg-icon-error';\n\nexport const DEFAULT_DARK_THEME_KEY = 'default-dark' satisfies BaseThemeKey;\nexport const DEFAULT_LIGHT_THEME_KEY = 'default-light' satisfies BaseThemeKey;\n\n// Css properties that are used in preload data with default values.\nexport const DEFAULT_PRELOAD_DATA_VARIABLES: Record<\n ThemePreloadColorVariable,\n string\n> = {\n '--dh-color-loading-spinner-primary': '#3b6bda', // dark theme --dh-color-blue-600\n '--dh-color-loading-spinner-secondary': '#f0f0ee80', // dark theme --dh-color-gray-800 + 50% opacity\n '--dh-color-background': '#1a171a', // dark theme --dh-color-gray-50\n '--dh-color-foreground': '#f0f0ee', // dark theme --dh-color-gray-800\n};\n\n/**\n * Some inline SVGs require manually updating their fill color via\n * `updateSVGFillColors`. This object maps these variables to their respective\n * fill color variables.\n */\nexport const SVG_ICON_MANUAL_COLOR_MAP: Record<\n ThemeIconsRequiringManualColorChanges,\n string\n> = {\n '--dh-svg-icon-select-indicator': '--dh-color-selector-fg',\n '--dh-svg-icon-select-indicator-hover': '--dh-color-selector-hover-fg',\n '--dh-svg-icon-select-indicator-disabled': '--dh-color-selector-disabled-fg',\n '--dh-svg-icon-error': '--dh-color-form-control-error',\n};\n\nexport const THEME_CACHE_LOCAL_STORAGE_KEY = 'deephaven.themeCache';\n\nexport interface ThemePreloadData {\n themeKey: string;\n preloadStyleContent?: CssVariableStyleContent;\n}\n\nexport interface ThemeData {\n baseThemeKey?: BaseThemeKey;\n themeKey: string;\n name: string;\n styleContent: string;\n}\n\nexport interface ThemeRegistrationData {\n base: ThemeData[];\n custom: ThemeData[];\n}\n"],"mappings":"AAiBA,OAAO,IAAMA,sBAAsB,GAAG,cAAqC;AAC3E,OAAO,IAAMC,uBAAuB,GAAG,eAAsC;;AAE7E;AACA,OAAO,IAAMC,8BAGZ,GAAG;EACF,oCAAoC,EAAE,SAAS;EAAE;EACjD,sCAAsC,EAAE,WAAW;EAAE;EACrD,uBAAuB,EAAE,SAAS;EAAE;EACpC,uBAAuB,EAAE,SAAS,CAAE;AACtC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,yBAGZ,GAAG;EACF,gCAAgC,EAAE,wBAAwB;EAC1D,sCAAsC,EAAE,8BAA8B;EACtE,yCAAyC,EAAE,iCAAiC;EAC5E,qBAAqB,EAAE;AACzB,CAAC;AAED,OAAO,IAAMC,6BAA6B,GAAG,sBAAsB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAgC,MAAM,OAAO,CAAC;AAE/E,OAAO,EAA0B,SAAS,EAAE,MAAM,cAAc,CAAC;AAUjE,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;IACjC,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACjD;AAID,eAAO,MAAM,YAAY,mDAAgD,CAAC;AAE1E,MAAM,WAAW,kBAAkB;IAMjC,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,QAAQ,GACT,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAgC,MAAM,OAAO,CAAC;AAE/E,OAAO,EAA0B,SAAS,EAAE,MAAM,cAAc,CAAC;AAUjE,OAAO,kBAAkB,CAAC;AAE1B,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;IACjC,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACjD;AAID,eAAO,MAAM,YAAY,mDAAgD,CAAC;AAE1E,MAAM,WAAW,kBAAkB;IAMjC,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,QAAQ,GACT,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAsElC;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { createContext, useEffect, useMemo, useState } from 'react';
|
|
2
2
|
import Log from '@deephaven/log';
|
|
3
3
|
import { DEFAULT_DARK_THEME_KEY } from "./ThemeModel.js";
|
|
4
|
-
import { calculatePreloadStyleContent, getActiveThemes, getDefaultBaseThemes, getThemePreloadData, setThemePreloadData } from "./ThemeUtils.js";
|
|
4
|
+
import { calculatePreloadStyleContent, getActiveThemes, getDefaultBaseThemes, getThemePreloadData, setThemePreloadData, overrideSVGFillColors } from "./ThemeUtils.js";
|
|
5
5
|
import { SpectrumThemeProvider } from "./SpectrumThemeProvider.js";
|
|
6
|
+
import "./theme-svg.css";
|
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
8
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
8
9
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -29,6 +30,10 @@ export function ThemeProvider(_ref) {
|
|
|
29
30
|
if (activeThemes == null || themes == null) {
|
|
30
31
|
return;
|
|
31
32
|
}
|
|
33
|
+
|
|
34
|
+
// Override fill color for certain inline SVGs (the originals are provided
|
|
35
|
+
// by theme-svg.scss)
|
|
36
|
+
overrideSVGFillColors();
|
|
32
37
|
var preloadStyleContent = calculatePreloadStyleContent();
|
|
33
38
|
log.debug2('updateThemePreloadData:', {
|
|
34
39
|
active: activeThemes.map(theme => theme.themeKey),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.js","names":["createContext","useEffect","useMemo","useState","Log","DEFAULT_DARK_THEME_KEY","calculatePreloadStyleContent","getActiveThemes","getDefaultBaseThemes","getThemePreloadData","setThemePreloadData","SpectrumThemeProvider","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","log","module","ThemeContext","ThemeProvider","_ref","themes","children","baseThemes","selectedThemeKey","setSelectedThemeKey","_getThemePreloadData$","_getThemePreloadData","themeKey","activeThemes","base","custom","updateThemePreloadData","preloadStyleContent","debug2","active","map","theme","all","value","Provider","styleContent"],"sources":["../../src/theme/ThemeProvider.tsx"],"sourcesContent":["import { createContext, ReactNode, useEffect, useMemo, useState } from 'react';\nimport Log from '@deephaven/log';\nimport { DEFAULT_DARK_THEME_KEY, ThemeData } from './ThemeModel';\nimport {\n calculatePreloadStyleContent,\n getActiveThemes,\n getDefaultBaseThemes,\n getThemePreloadData,\n setThemePreloadData,\n} from './ThemeUtils';\nimport { SpectrumThemeProvider } from './SpectrumThemeProvider';\n\nexport interface ThemeContextValue {\n activeThemes: ThemeData[] | null;\n selectedThemeKey: string;\n setSelectedThemeKey: (themeKey: string) => void;\n}\n\nconst log = Log.module('ThemeProvider');\n\nexport const ThemeContext = createContext<ThemeContextValue | null>(null);\n\nexport interface ThemeProviderProps {\n /*\n * Additional themes to load in addition to the base themes. If no additional\n * themes are to be loaded, this must be set to an empty array in order to\n * tell the provider to activate the base themes.\n */\n themes: ThemeData[] | null;\n children: ReactNode;\n}\n\nexport function ThemeProvider({\n themes,\n children,\n}: ThemeProviderProps): JSX.Element {\n const baseThemes = useMemo(() => getDefaultBaseThemes(), []);\n\n const [selectedThemeKey, setSelectedThemeKey] = useState<string>(\n () => getThemePreloadData()?.themeKey ?? DEFAULT_DARK_THEME_KEY\n );\n\n // Calculate active themes once a non-null themes array is provided.\n const activeThemes = useMemo(\n () =>\n themes == null\n ? null\n : getActiveThemes(selectedThemeKey, {\n base: baseThemes,\n custom: themes ?? [],\n }),\n [baseThemes, selectedThemeKey, themes]\n );\n\n useEffect(\n function updateThemePreloadData() {\n // Don't update preload data until themes have been loaded and activated\n if (activeThemes == null || themes == null) {\n return;\n }\n\n const preloadStyleContent = calculatePreloadStyleContent();\n\n log.debug2('updateThemePreloadData:', {\n active: activeThemes.map(theme => theme.themeKey),\n all: themes.map(theme => theme.themeKey),\n preloadStyleContent,\n selectedThemeKey,\n });\n\n setThemePreloadData({\n themeKey: selectedThemeKey,\n preloadStyleContent,\n });\n },\n [activeThemes, selectedThemeKey, themes]\n );\n\n const value = useMemo(\n () => ({\n activeThemes,\n selectedThemeKey,\n setSelectedThemeKey,\n }),\n [activeThemes, selectedThemeKey]\n );\n\n return (\n <ThemeContext.Provider value={value}>\n {activeThemes == null ? null : (\n <>\n {activeThemes.map(theme => (\n <style data-theme-key={theme.themeKey} key={theme.themeKey}>\n {theme.styleContent}\n </style>\n ))}\n </>\n )}\n <SpectrumThemeProvider>{children}</SpectrumThemeProvider>\n </ThemeContext.Provider>\n );\n}\n\nexport default ThemeProvider;\n"],"mappings":"AAAA,SAASA,aAAa,EAAaC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC9E,OAAOC,GAAG,MAAM,gBAAgB;AAAC,SACxBC,sBAAsB;AAAA,SAE7BC,4BAA4B,EAC5BC,eAAe,EACfC,oBAAoB,EACpBC,mBAAmB,EACnBC,mBAAmB;AAAA,
|
|
1
|
+
{"version":3,"file":"ThemeProvider.js","names":["createContext","useEffect","useMemo","useState","Log","DEFAULT_DARK_THEME_KEY","calculatePreloadStyleContent","getActiveThemes","getDefaultBaseThemes","getThemePreloadData","setThemePreloadData","overrideSVGFillColors","SpectrumThemeProvider","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","log","module","ThemeContext","ThemeProvider","_ref","themes","children","baseThemes","selectedThemeKey","setSelectedThemeKey","_getThemePreloadData$","_getThemePreloadData","themeKey","activeThemes","base","custom","updateThemePreloadData","preloadStyleContent","debug2","active","map","theme","all","value","Provider","styleContent"],"sources":["../../src/theme/ThemeProvider.tsx"],"sourcesContent":["import { createContext, ReactNode, useEffect, useMemo, useState } from 'react';\nimport Log from '@deephaven/log';\nimport { DEFAULT_DARK_THEME_KEY, ThemeData } from './ThemeModel';\nimport {\n calculatePreloadStyleContent,\n getActiveThemes,\n getDefaultBaseThemes,\n getThemePreloadData,\n setThemePreloadData,\n overrideSVGFillColors,\n} from './ThemeUtils';\nimport { SpectrumThemeProvider } from './SpectrumThemeProvider';\nimport './theme-svg.scss';\n\nexport interface ThemeContextValue {\n activeThemes: ThemeData[] | null;\n selectedThemeKey: string;\n setSelectedThemeKey: (themeKey: string) => void;\n}\n\nconst log = Log.module('ThemeProvider');\n\nexport const ThemeContext = createContext<ThemeContextValue | null>(null);\n\nexport interface ThemeProviderProps {\n /*\n * Additional themes to load in addition to the base themes. If no additional\n * themes are to be loaded, this must be set to an empty array in order to\n * tell the provider to activate the base themes.\n */\n themes: ThemeData[] | null;\n children: ReactNode;\n}\n\nexport function ThemeProvider({\n themes,\n children,\n}: ThemeProviderProps): JSX.Element {\n const baseThemes = useMemo(() => getDefaultBaseThemes(), []);\n\n const [selectedThemeKey, setSelectedThemeKey] = useState<string>(\n () => getThemePreloadData()?.themeKey ?? DEFAULT_DARK_THEME_KEY\n );\n\n // Calculate active themes once a non-null themes array is provided.\n const activeThemes = useMemo(\n () =>\n themes == null\n ? null\n : getActiveThemes(selectedThemeKey, {\n base: baseThemes,\n custom: themes ?? [],\n }),\n [baseThemes, selectedThemeKey, themes]\n );\n\n useEffect(\n function updateThemePreloadData() {\n // Don't update preload data until themes have been loaded and activated\n if (activeThemes == null || themes == null) {\n return;\n }\n\n // Override fill color for certain inline SVGs (the originals are provided\n // by theme-svg.scss)\n overrideSVGFillColors();\n\n const preloadStyleContent = calculatePreloadStyleContent();\n\n log.debug2('updateThemePreloadData:', {\n active: activeThemes.map(theme => theme.themeKey),\n all: themes.map(theme => theme.themeKey),\n preloadStyleContent,\n selectedThemeKey,\n });\n\n setThemePreloadData({\n themeKey: selectedThemeKey,\n preloadStyleContent,\n });\n },\n [activeThemes, selectedThemeKey, themes]\n );\n\n const value = useMemo(\n () => ({\n activeThemes,\n selectedThemeKey,\n setSelectedThemeKey,\n }),\n [activeThemes, selectedThemeKey]\n );\n\n return (\n <ThemeContext.Provider value={value}>\n {activeThemes == null ? null : (\n <>\n {activeThemes.map(theme => (\n <style data-theme-key={theme.themeKey} key={theme.themeKey}>\n {theme.styleContent}\n </style>\n ))}\n </>\n )}\n <SpectrumThemeProvider>{children}</SpectrumThemeProvider>\n </ThemeContext.Provider>\n );\n}\n\nexport default ThemeProvider;\n"],"mappings":"AAAA,SAASA,aAAa,EAAaC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC9E,OAAOC,GAAG,MAAM,gBAAgB;AAAC,SACxBC,sBAAsB;AAAA,SAE7BC,4BAA4B,EAC5BC,eAAe,EACfC,oBAAoB,EACpBC,mBAAmB,EACnBC,mBAAmB,EACnBC,qBAAqB;AAAA,SAEdC,qBAAqB;AAAA;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAS9B,IAAMC,GAAG,GAAGf,GAAG,CAACgB,MAAM,CAAC,eAAe,CAAC;AAEvC,OAAO,IAAMC,YAAY,gBAAGrB,aAAa,CAA2B,IAAI,CAAC;AAYzE,OAAO,SAASsB,aAAaA,CAAAC,IAAA,EAGO;EAAA,IAHN;IAC5BC,MAAM;IACNC;EACkB,CAAC,GAAAF,IAAA;EACnB,IAAMG,UAAU,GAAGxB,OAAO,CAAC,MAAMM,oBAAoB,CAAC,CAAC,EAAE,EAAE,CAAC;EAE5D,IAAM,CAACmB,gBAAgB,EAAEC,mBAAmB,CAAC,GAAGzB,QAAQ,CACtD;IAAA,IAAA0B,qBAAA,EAAAC,oBAAA;IAAA,QAAAD,qBAAA,IAAAC,oBAAA,GAAMrB,mBAAmB,CAAC,CAAC,cAAAqB,oBAAA,uBAArBA,oBAAA,CAAuBC,QAAQ,cAAAF,qBAAA,cAAAA,qBAAA,GAAIxB,sBAAsB;EAAA,CACjE,CAAC;;EAED;EACA,IAAM2B,YAAY,GAAG9B,OAAO,CAC1B,MACEsB,MAAM,IAAI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AAAN,QAAA,EACnCe,KAAK,CAACI;MAAY,GADuBJ,KAAK,CAACT,QAE3C,CACR;IAAC,CACF,CACH,eACDjB,IAAA,CAACF,qBAAqB;MAAAa,QAAA,EAAEA;IAAQ,CAAwB,CAAC;EAAA,CACpC,CAAC;AAE5B;AAEA,eAAeH,aAAa"}
|
|
@@ -1,15 +1,24 @@
|
|
|
1
|
-
import { ThemeData, ThemePreloadData,
|
|
1
|
+
import { ThemeData, ThemePreloadData, CssVariableStyleContent, ThemeRegistrationData, ThemeCssVariableName } from './ThemeModel';
|
|
2
2
|
export declare const CSS_VAR_EXPRESSION_PREFIX = "var(--";
|
|
3
3
|
export declare const TMP_CSS_PROP_PREFIX = "dh-tmp";
|
|
4
4
|
export declare const NON_WHITESPACE_REGEX: RegExp;
|
|
5
5
|
export declare const WHITESPACE_REGEX: RegExp;
|
|
6
6
|
export type VarExpressionResolver = (varExpression: string) => string;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* Resolves the current values of CSS variables we want to preload. Preloading
|
|
9
|
+
* happens before themes are fully loaded so that we can style things like the
|
|
10
|
+
* loading spinner and background color which are shown to the user early on in
|
|
11
|
+
* the app lifecycle.
|
|
11
12
|
*/
|
|
12
|
-
export declare function calculatePreloadStyleContent():
|
|
13
|
+
export declare function calculatePreloadStyleContent(): CssVariableStyleContent;
|
|
14
|
+
/**
|
|
15
|
+
* Create a resolver function for calculating the value of a css variable based
|
|
16
|
+
* on a given element's computed style. If the variable resolves to '', we check
|
|
17
|
+
* DEFAULT_PRELOAD_DATA_VARIABLES for a default value, and if one does not exist,
|
|
18
|
+
* return ''.
|
|
19
|
+
* @param el Element to resolve css variables against
|
|
20
|
+
*/
|
|
21
|
+
export declare function createCssVariableResolver(el: Element): (varName: ThemeCssVariableName) => string;
|
|
13
22
|
/**
|
|
14
23
|
* Extracts all css variable expressions from the given record and returns
|
|
15
24
|
* a set of unique expressions.
|
|
@@ -57,6 +66,13 @@ export declare function getThemePreloadData(): ThemePreloadData | null;
|
|
|
57
66
|
* @returns An array of [start, end] index pairs for each expression
|
|
58
67
|
*/
|
|
59
68
|
export declare function getExpressionRanges(value: string): [number, number][];
|
|
69
|
+
/**
|
|
70
|
+
* Replace the `fill='...'` attribute in the given SVG content with the given
|
|
71
|
+
* color string.
|
|
72
|
+
* @param svgContent Inline SVG content to replace the fill color in
|
|
73
|
+
* @param fillColor The color to replace the fill color with
|
|
74
|
+
*/
|
|
75
|
+
export declare function replaceSVGFillColor(svgContent: string, fillColor: string): string;
|
|
60
76
|
/**
|
|
61
77
|
* Make a copy of the given object replacing any css variable expressions
|
|
62
78
|
* contained in its prop values with values resolved from the given HTML element.
|
|
@@ -99,4 +115,20 @@ export declare function getThemeKey(pluginName: string, themeName: string): stri
|
|
|
99
115
|
* Preload minimal theme variables from the cache.
|
|
100
116
|
*/
|
|
101
117
|
export declare function preloadTheme(): void;
|
|
118
|
+
/**
|
|
119
|
+
* Inline SVGs cannot depend on dynamic CSS variables, so we have to statically
|
|
120
|
+
* update them if we want to change their color.
|
|
121
|
+
*
|
|
122
|
+
* This function:
|
|
123
|
+
* 1. Clears any previous overrides
|
|
124
|
+
* 2. Resolves CSS variables containing inline SVG urls
|
|
125
|
+
* 3. Resolves mapped color variables and replaces the `fill='...'` attribute with the result
|
|
126
|
+
* 4. Sets the original CSS variable to the new replaced value
|
|
127
|
+
*
|
|
128
|
+
* Note that it is preferable to use inline SVGs as background-mask values and
|
|
129
|
+
* just change the background color instead of relying on this util, but this
|
|
130
|
+
* is not always possible. e.g. <select> elements don't support pseudo elements,
|
|
131
|
+
* so there's not a good way to set icons via masks.
|
|
132
|
+
*/
|
|
133
|
+
export declare function overrideSVGFillColors(): void;
|
|
102
134
|
//# sourceMappingURL=ThemeUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeUtils.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeUtils.ts"],"names":[],"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,mBAAmB,CACjC,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GAChB,MAAM,CAKR;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC1E,MAAM,EAAE,CAAC,EACT,aAAa,GAAE,WAA2B,GACzC,CAAC,CA2CH;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,qBAAqB,EAC/B,KAAK,EAAE,MAAM,GACZ,MAAM,CAyBR;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,gBAAgB,GAAG,IAAI,CAKvE;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEzE;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,IAAI,CAUnC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAkB5C"}
|
package/dist/theme/ThemeUtils.js
CHANGED
|
@@ -14,29 +14,51 @@ import { assertNotNull, ColorUtils } from '@deephaven/utils';
|
|
|
14
14
|
// },
|
|
15
15
|
import { themeDark } from "./theme-dark/index.js";
|
|
16
16
|
import { themeLight } from "./theme-light/index.js";
|
|
17
|
-
import { DEFAULT_DARK_THEME_KEY, DEFAULT_LIGHT_THEME_KEY, DEFAULT_PRELOAD_DATA_VARIABLES, THEME_CACHE_LOCAL_STORAGE_KEY } from "./ThemeModel.js";
|
|
17
|
+
import { DEFAULT_DARK_THEME_KEY, DEFAULT_LIGHT_THEME_KEY, DEFAULT_PRELOAD_DATA_VARIABLES, THEME_CACHE_LOCAL_STORAGE_KEY, SVG_ICON_MANUAL_COLOR_MAP } from "./ThemeModel.js";
|
|
18
18
|
var log = Log.module('ThemeUtils');
|
|
19
19
|
export var CSS_VAR_EXPRESSION_PREFIX = 'var(--';
|
|
20
20
|
export var TMP_CSS_PROP_PREFIX = 'dh-tmp';
|
|
21
21
|
export var NON_WHITESPACE_REGEX = /\S/;
|
|
22
22
|
export var WHITESPACE_REGEX = /\s/;
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
24
|
+
* Resolves the current values of CSS variables we want to preload. Preloading
|
|
25
|
+
* happens before themes are fully loaded so that we can style things like the
|
|
26
|
+
* loading spinner and background color which are shown to the user early on in
|
|
27
|
+
* the app lifecycle.
|
|
27
28
|
*/
|
|
28
29
|
export function calculatePreloadStyleContent() {
|
|
29
|
-
var
|
|
30
|
+
var resolveVar = createCssVariableResolver(document.body);
|
|
30
31
|
|
|
31
32
|
// Calculate the current preload variables. If the variable is not set, use
|
|
32
33
|
// the default value.
|
|
33
|
-
var pairs = Object.
|
|
34
|
-
var [key, defaultValue] = _ref;
|
|
35
|
-
return "".concat(key, ":").concat(bodyStyle.getPropertyValue(key) || defaultValue);
|
|
36
|
-
});
|
|
34
|
+
var pairs = Object.keys(DEFAULT_PRELOAD_DATA_VARIABLES).map(key => "".concat(key, ":").concat(resolveVar(key)));
|
|
37
35
|
return ":root{".concat(pairs.join(';'), "}");
|
|
38
36
|
}
|
|
39
37
|
|
|
38
|
+
/**
|
|
39
|
+
* Create a resolver function for calculating the value of a css variable based
|
|
40
|
+
* on a given element's computed style. If the variable resolves to '', we check
|
|
41
|
+
* DEFAULT_PRELOAD_DATA_VARIABLES for a default value, and if one does not exist,
|
|
42
|
+
* return ''.
|
|
43
|
+
* @param el Element to resolve css variables against
|
|
44
|
+
*/
|
|
45
|
+
export function createCssVariableResolver(el) {
|
|
46
|
+
var computedStyle = getComputedStyle(el);
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Resolve the given css variable name to a value. If the variable is not set,
|
|
50
|
+
* return the default preload value or '' if one does not exist.
|
|
51
|
+
*/
|
|
52
|
+
return function cssVariableResolver(varName) {
|
|
53
|
+
var _DEFAULT_PRELOAD_DATA;
|
|
54
|
+
var value = computedStyle.getPropertyValue(varName);
|
|
55
|
+
if (value !== '') {
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
return (_DEFAULT_PRELOAD_DATA = DEFAULT_PRELOAD_DATA_VARIABLES[varName]) !== null && _DEFAULT_PRELOAD_DATA !== void 0 ? _DEFAULT_PRELOAD_DATA : '';
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
40
62
|
/**
|
|
41
63
|
* Extracts all css variable expressions from the given record and returns
|
|
42
64
|
* a set of unique expressions.
|
|
@@ -45,8 +67,8 @@ export function calculatePreloadStyleContent() {
|
|
|
45
67
|
export function extractDistinctCssVariableExpressions(record) {
|
|
46
68
|
var set = new Set();
|
|
47
69
|
Object.values(record).forEach(value => {
|
|
48
|
-
getExpressionRanges(value).forEach(
|
|
49
|
-
var [start, end] =
|
|
70
|
+
getExpressionRanges(value).forEach(_ref => {
|
|
71
|
+
var [start, end] = _ref;
|
|
50
72
|
var expression = value.substring(start, end + 1);
|
|
51
73
|
if (expression.includes(CSS_VAR_EXPRESSION_PREFIX)) {
|
|
52
74
|
set.add(expression);
|
|
@@ -155,6 +177,16 @@ export function getExpressionRanges(value) {
|
|
|
155
177
|
return ranges;
|
|
156
178
|
}
|
|
157
179
|
|
|
180
|
+
/**
|
|
181
|
+
* Replace the `fill='...'` attribute in the given SVG content with the given
|
|
182
|
+
* color string.
|
|
183
|
+
* @param svgContent Inline SVG content to replace the fill color in
|
|
184
|
+
* @param fillColor The color to replace the fill color with
|
|
185
|
+
*/
|
|
186
|
+
export function replaceSVGFillColor(svgContent, fillColor) {
|
|
187
|
+
return svgContent.replace(/fill='.*?'/, "fill='".concat(encodeURIComponent(fillColor), "'"));
|
|
188
|
+
}
|
|
189
|
+
|
|
158
190
|
/**
|
|
159
191
|
* Make a copy of the given object replacing any css variable expressions
|
|
160
192
|
* contained in its prop values with values resolved from the given HTML element.
|
|
@@ -196,8 +228,8 @@ export function resolveCssVariablesInRecord(record) {
|
|
|
196
228
|
};
|
|
197
229
|
|
|
198
230
|
// Resolve the temporary css variables
|
|
199
|
-
Object.entries(record).forEach(
|
|
200
|
-
var [key, value] =
|
|
231
|
+
Object.entries(record).forEach(_ref2 => {
|
|
232
|
+
var [key, value] = _ref2;
|
|
201
233
|
result[key] = resolveCssVariablesInString(resolver, value);
|
|
202
234
|
});
|
|
203
235
|
|
|
@@ -217,8 +249,8 @@ export function resolveCssVariablesInRecord(record) {
|
|
|
217
249
|
export function resolveCssVariablesInString(resolver, value) {
|
|
218
250
|
var result = [];
|
|
219
251
|
var i = 0;
|
|
220
|
-
getExpressionRanges(value).forEach(
|
|
221
|
-
var [start, end] =
|
|
252
|
+
getExpressionRanges(value).forEach(_ref3 => {
|
|
253
|
+
var [start, end] = _ref3;
|
|
222
254
|
if (i < start) {
|
|
223
255
|
result.push(value.substring(i, start));
|
|
224
256
|
i += start - i;
|
|
@@ -261,4 +293,37 @@ export function preloadTheme() {
|
|
|
261
293
|
style.innerHTML = preloadStyleContent;
|
|
262
294
|
document.head.appendChild(style);
|
|
263
295
|
}
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Inline SVGs cannot depend on dynamic CSS variables, so we have to statically
|
|
299
|
+
* update them if we want to change their color.
|
|
300
|
+
*
|
|
301
|
+
* This function:
|
|
302
|
+
* 1. Clears any previous overrides
|
|
303
|
+
* 2. Resolves CSS variables containing inline SVG urls
|
|
304
|
+
* 3. Resolves mapped color variables and replaces the `fill='...'` attribute with the result
|
|
305
|
+
* 4. Sets the original CSS variable to the new replaced value
|
|
306
|
+
*
|
|
307
|
+
* Note that it is preferable to use inline SVGs as background-mask values and
|
|
308
|
+
* just change the background color instead of relying on this util, but this
|
|
309
|
+
* is not always possible. e.g. <select> elements don't support pseudo elements,
|
|
310
|
+
* so there's not a good way to set icons via masks.
|
|
311
|
+
*/
|
|
312
|
+
export function overrideSVGFillColors() {
|
|
313
|
+
var resolveVar = createCssVariableResolver(document.body);
|
|
314
|
+
Object.entries(SVG_ICON_MANUAL_COLOR_MAP).forEach(_ref4 => {
|
|
315
|
+
var [key, value] = _ref4;
|
|
316
|
+
// Clear any previous override so that our variables get resolved against the
|
|
317
|
+
// actual svg content provided by the active themes and not from a previous
|
|
318
|
+
// override
|
|
319
|
+
document.body.style.removeProperty(key);
|
|
320
|
+
var svgContent = resolveVar(key);
|
|
321
|
+
var fillColor = resolveVar(value);
|
|
322
|
+
var newSVGContent = replaceSVGFillColor(svgContent, fillColor);
|
|
323
|
+
|
|
324
|
+
// This will take precedence over any values for the variable provided by
|
|
325
|
+
// the active themes
|
|
326
|
+
document.body.style.setProperty(key, newSVGContent);
|
|
327
|
+
});
|
|
328
|
+
}
|
|
264
329
|
//# sourceMappingURL=ThemeUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeUtils.js","names":["Log","assertNotNull","ColorUtils","themeDark","themeLight","DEFAULT_DARK_THEME_KEY","DEFAULT_LIGHT_THEME_KEY","DEFAULT_PRELOAD_DATA_VARIABLES","THEME_CACHE_LOCAL_STORAGE_KEY","log","module","CSS_VAR_EXPRESSION_PREFIX","TMP_CSS_PROP_PREFIX","NON_WHITESPACE_REGEX","WHITESPACE_REGEX","calculatePreloadStyleContent","bodyStyle","getComputedStyle","document","body","pairs","Object","entries","map","_ref","key","defaultValue","concat","getPropertyValue","join","extractDistinctCssVariableExpressions","record","set","Set","values","forEach","value","getExpressionRanges","_ref2","start","end","expression","substring","includes","add","getActiveThemes","themeKey","themeRegistration","_custom$baseThemeKey","custom","find","theme","baseThemeKey","base","error","debug","getDefaultBaseThemes","name","styleContent","getThemePreloadData","data","localStorage","getItem","JSON","parse","_unused","_NON_WHITESPACE_REGEX","_NON_WHITESPACE_REGEX2","ranges","exec","index","parenLevel","i","length","test","push","resolveCssVariablesInRecord","targetElement","arguments","undefined","perfStart","performance","now","tmpPropEl","createElement","appendChild","varExpressions","varExpression","tmpPropKey","style","setProperty","result","computedStyle","window","resolver","indexOf","resolved","normalizeCssColor","_ref3","resolveCssVariablesInString","remove","_ref4","setThemePreloadData","preloadData","setItem","stringify","getThemeKey","pluginName","themeName","preloadTheme","_getThemePreloadData$","_getThemePreloadData","preloadStyleContent","innerHTML","head"],"sources":["../../src/theme/ThemeUtils.ts"],"sourcesContent":["import Log from '@deephaven/log';\nimport { assertNotNull, ColorUtils } from '@deephaven/utils';\n// Note that ?inline imports are natively supported by Vite, but consumers of\n// @deephaven/components using Webpack will need to add a rule to their module\n// config.\n// e.g.\n// module: {\n// rules: [\n// {\n// resourceQuery: /inline/,\n// type: 'asset/source',\n// },\n// ],\n// },\nimport { themeDark } from './theme-dark';\nimport { themeLight } from './theme-light';\nimport {\n DEFAULT_DARK_THEME_KEY,\n DEFAULT_LIGHT_THEME_KEY,\n DEFAULT_PRELOAD_DATA_VARIABLES,\n ThemeData,\n ThemePreloadData,\n ThemePreloadStyleContent,\n ThemeRegistrationData,\n THEME_CACHE_LOCAL_STORAGE_KEY,\n} from './ThemeModel';\n\nconst log = Log.module('ThemeUtils');\n\nexport const CSS_VAR_EXPRESSION_PREFIX = 'var(--';\nexport const TMP_CSS_PROP_PREFIX = 'dh-tmp';\nexport const NON_WHITESPACE_REGEX = /\\S/;\nexport const WHITESPACE_REGEX = /\\s/;\n\nexport type VarExpressionResolver = (varExpression: string) => string;\n\n/**\n * Creates a string containing preload style content for the current theme.\n * This resolves the current values of a few CSS variables that can be used\n * to style the page before the theme is loaded on next page load.\n */\nexport function calculatePreloadStyleContent(): ThemePreloadStyleContent {\n const bodyStyle = getComputedStyle(document.body);\n\n // Calculate the current preload variables. If the variable is not set, use\n // the default value.\n const pairs = Object.entries(DEFAULT_PRELOAD_DATA_VARIABLES).map(\n ([key, defaultValue]) =>\n `${key}:${bodyStyle.getPropertyValue(key) || defaultValue}`\n );\n\n return `:root{${pairs.join(';')}}`;\n}\n\n/**\n * Extracts all css variable expressions from the given record and returns\n * a set of unique expressions.\n * @param record The record to extract css variable expressions from\n */\nexport function extractDistinctCssVariableExpressions(\n record: Record<string, string>\n): Set<string> {\n const set = new Set<string>();\n\n Object.values(record).forEach(value => {\n getExpressionRanges(value).forEach(([start, end]) => {\n const expression = value.substring(start, end + 1);\n\n if (expression.includes(CSS_VAR_EXPRESSION_PREFIX)) {\n set.add(expression);\n }\n });\n });\n\n return set;\n}\n\n/**\n * Returns an array of the active themes. The first item will always be one\n * of the base themes. Optionally, the second item will be a custom theme.\n */\nexport function getActiveThemes(\n themeKey: string,\n themeRegistration: ThemeRegistrationData\n): [ThemeData] | [ThemeData, ThemeData] {\n const custom = themeRegistration.custom.find(\n theme => theme.themeKey === themeKey\n );\n\n const baseThemeKey = custom?.baseThemeKey ?? themeKey;\n\n let base = themeRegistration.base.find(\n theme => theme.themeKey === baseThemeKey\n );\n\n if (base == null) {\n log.error(\n `No registered base theme found for theme key: '${baseThemeKey}'`,\n 'Registered:',\n themeRegistration.base.map(theme => theme.themeKey),\n themeRegistration.custom.map(theme => theme.themeKey)\n );\n base = themeRegistration.base.find(\n theme => theme.themeKey === DEFAULT_DARK_THEME_KEY\n );\n\n assertNotNull(\n base,\n `Default base theme '${DEFAULT_DARK_THEME_KEY}' is not registered`\n );\n }\n\n log.debug('Applied themes:', base.themeKey, custom?.themeKey);\n\n return custom == null ? [base] : [base, custom];\n}\n\n/**\n * Get default base theme data.\n */\nexport function getDefaultBaseThemes(): ThemeData[] {\n return [\n {\n name: 'Default Dark',\n themeKey: DEFAULT_DARK_THEME_KEY,\n styleContent: themeDark,\n },\n {\n name: 'Default Light',\n themeKey: DEFAULT_LIGHT_THEME_KEY,\n styleContent: themeLight,\n },\n ];\n}\n\n/**\n * Get the preload data from local storage or null if it does not exist or is\n * invalid\n */\nexport function getThemePreloadData(): ThemePreloadData | null {\n const data = localStorage.getItem(THEME_CACHE_LOCAL_STORAGE_KEY);\n\n try {\n return data == null ? null : JSON.parse(data);\n } catch {\n // ignore\n }\n\n return null;\n}\n\n/**\n * Identifies start and end indices of any top-level expressions in the given\n * string.\n *\n * e.g.\n * getExpressionRanges('var(--aaa-aa) #fff var(--bbb-bb)')\n * yields:\n * [\n * [0, 12], // 'var(--aaa-aa)'\n * [14, 17] // '#fff'\n * [19, 31], // 'var(--bbb-bb)'\n * ]\n *\n * In cases where there are nested expressions, only the indices of the outermost\n * expression will be included.\n *\n * e.g.\n * getExpressionRanges('var(--ccc-cc, var(--aaa-aa, green)) var(--bbb-bb)')\n * yields:\n * [\n * [0, 34], // 'var(--ccc-cc, var(--aaa-aa, green))'\n * [36, 48], // 'var(--bbb-bb)'\n * ]\n * @param value The string to search for expressions\n * @returns An array of [start, end] index pairs for each expression\n */\nexport function getExpressionRanges(value: string): [number, number][] {\n const ranges: [number, number][] = [];\n\n let start = NON_WHITESPACE_REGEX.exec(value)?.index ?? 0;\n let parenLevel = 0;\n\n for (let i = 0; i < value.length; i += 1) {\n if (value[i] === '(') {\n parenLevel += 1;\n } else if (value[i] === ')') {\n parenLevel -= 1;\n }\n\n if (\n i === value.length - 1 ||\n (WHITESPACE_REGEX.test(value[i + 1]) && parenLevel === 0)\n ) {\n ranges.push([start, i]);\n\n while (i < value.length - 1 && WHITESPACE_REGEX.test(value[i + 1])) {\n i += 1;\n }\n\n start = i + 1;\n }\n }\n\n if (parenLevel !== 0) {\n log.error('Unbalanced parentheses in css var expression', value);\n return [];\n }\n\n return ranges;\n}\n\n/**\n * Make a copy of the given object replacing any css variable expressions\n * contained in its prop values with values resolved from the given HTML element.\n * Variables that resolve to color strings will also be normalized to rgb or\n * rgba color strings.\n *\n * Note that the browser will force a reflow when calling `getComputedStyle` if\n * css properties have changed. In order to avoid a reflow for every property\n * check we use distinct setup, resolve / normalize, and cleanup passes:\n * 1. Setup - Create a tmp element and set all css props we want to evaluate\n * 2. Resolve / Normalize - Evaluate all css props via `getPropertyValue` calls\n * and replace the original expressions with resolved values. Also normalize\n * css colors to rgb/a.\n * 3. Cleanup - Remove the tmp element\n * @param record An object whose values may contain css var expressions\n * @param targetElement The element to resolve css variables against. Defaults\n * to document.body\n */\nexport function resolveCssVariablesInRecord<T extends Record<string, string>>(\n record: T,\n targetElement: HTMLElement = document.body\n): T {\n const perfStart = performance.now();\n\n // Add a temporary div to attach temp css variables to\n const tmpPropEl = document.createElement('div');\n targetElement.appendChild(tmpPropEl);\n\n const varExpressions = [...extractDistinctCssVariableExpressions(record)];\n\n // Set temporary css variables for resolving var expressions\n varExpressions.forEach((varExpression, i) => {\n const tmpPropKey = `--${TMP_CSS_PROP_PREFIX}-${i}`;\n tmpPropEl.style.setProperty(tmpPropKey, varExpression);\n });\n\n const result = {} as T;\n\n const computedStyle = window.getComputedStyle(tmpPropEl);\n\n const resolver = (varExpression: string): string => {\n const tmpPropKey = `--${TMP_CSS_PROP_PREFIX}-${varExpressions.indexOf(\n varExpression\n )}`;\n\n const resolved = computedStyle.getPropertyValue(tmpPropKey);\n\n return ColorUtils.normalizeCssColor(resolved);\n };\n\n // Resolve the temporary css variables\n Object.entries(record).forEach(([key, value]) => {\n result[key as keyof T] = resolveCssVariablesInString(\n resolver,\n value\n ) as T[keyof T];\n });\n\n // Remove the temporary css variables\n tmpPropEl.remove();\n\n log.debug('Resolved css variables', performance.now() - perfStart, 'ms');\n\n return result;\n}\n\n/**\n * Resolve css variable expressions in the given string using the\n * given resolver and replace the original expressions with the resolved values.\n *\n * @param resolver Function that can resolve a css variable expression\n * @param value Value that may contain css variable expressions\n */\nexport function resolveCssVariablesInString(\n resolver: VarExpressionResolver,\n value: string\n): string {\n const result: string[] = [];\n let i = 0;\n getExpressionRanges(value).forEach(([start, end]) => {\n if (i < start) {\n result.push(value.substring(i, start));\n i += start - i;\n }\n\n const expression = value.substring(start, end + 1);\n\n result.push(\n expression.includes(CSS_VAR_EXPRESSION_PREFIX)\n ? resolver(expression)\n : expression\n );\n\n i += end - start + 1;\n });\n\n if (result.length === 0) {\n return value;\n }\n\n return result.join('');\n}\n\n/**\n * Store theme preload data in local storage.\n * @param preloadData The preload data to set\n */\nexport function setThemePreloadData(preloadData: ThemePreloadData): void {\n localStorage.setItem(\n THEME_CACHE_LOCAL_STORAGE_KEY,\n JSON.stringify(preloadData)\n );\n}\n\n/**\n * Derive unique theme key from plugin root path and theme name.\n * @param pluginName The root path of the plugin\n * @param themeName The name of the theme\n */\nexport function getThemeKey(pluginName: string, themeName: string): string {\n return `${pluginName}_${themeName}`;\n}\n\n/**\n * Preload minimal theme variables from the cache.\n */\nexport function preloadTheme(): void {\n const preloadStyleContent =\n getThemePreloadData()?.preloadStyleContent ??\n calculatePreloadStyleContent();\n\n log.debug('Preloading theme content:', `'${preloadStyleContent}'`);\n\n const style = document.createElement('style');\n style.innerHTML = preloadStyleContent;\n document.head.appendChild(style);\n}\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,gBAAgB;AAChC,SAASC,aAAa,EAAEC,UAAU,QAAQ,kBAAkB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA,SACSC,SAAS;AAAA,SACTC,UAAU;AAAA,SAEjBC,sBAAsB,EACtBC,uBAAuB,EACvBC,8BAA8B,EAK9BC,6BAA6B;AAG/B,IAAMC,GAAG,GAAGT,GAAG,CAACU,MAAM,CAAC,YAAY,CAAC;AAEpC,OAAO,IAAMC,yBAAyB,GAAG,QAAQ;AACjD,OAAO,IAAMC,mBAAmB,GAAG,QAAQ;AAC3C,OAAO,IAAMC,oBAAoB,GAAG,IAAI;AACxC,OAAO,IAAMC,gBAAgB,GAAG,IAAI;AAIpC;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,4BAA4BA,CAAA,EAA6B;EACvE,IAAMC,SAAS,GAAGC,gBAAgB,CAACC,QAAQ,CAACC,IAAI,CAAC;;EAEjD;EACA;EACA,IAAMC,KAAK,GAAGC,MAAM,CAACC,OAAO,CAACf,8BAA8B,CAAC,CAACgB,GAAG,CAC9DC,IAAA;IAAA,IAAC,CAACC,GAAG,EAAEC,YAAY,CAAC,GAAAF,IAAA;IAAA,UAA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C;IAED+B,CAAC,IAAIhC,GAAG,GAAGD,KAAK,GAAG,CAAC;EACtB,CAAC,CAAC;EAEF,IAAIoD,MAAM,CAAClB,MAAM,KAAK,CAAC,EAAE;IACvB,OAAOrC,KAAK;EACd;EAEA,OAAOuD,MAAM,CAAC9D,IAAI,CAAC,EAAE,CAAC;AACxB;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASyE,mBAAmBA,CAACC,WAA6B,EAAQ;EACvE1C,YAAY,CAAC2C,OAAO,CAClBhG,6BAA6B,EAC7BuD,IAAI,CAAC0C,SAAS,CAACF,WAAW,CAC5B,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,WAAWA,CAACC,UAAkB,EAAEC,SAAiB,EAAU;EACzE,UAAAjF,MAAA,CAAUgF,UAAU,OAAAhF,MAAA,CAAIiF,SAAS;AACnC;;AAEA;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAAA,EAAS;EAAA,IAAAC,qBAAA,EAAAC,oBAAA;EACnC,IAAMC,mBAAmB,IAAAF,qBAAA,IAAAC,oBAAA,GACvBpD,mBAAmB,CAAC,CAAC,cAAAoD,oBAAA,uBAArBA,oBAAA,CAAuBC,mBAAmB,cAAAF,qBAAA,cAAAA,qBAAA,GAC1C/F,4BAA4B,CAAC,CAAC;EAEhCN,GAAG,CAAC8C,KAAK,CAAC,2BAA2B,MAAA5B,MAAA,CAAMqF,mBAAmB,MAAG,CAAC;EAElE,IAAMvB,KAAK,GAAGvE,QAAQ,CAACkE,aAAa,CAAC,OAAO,CAAC;EAC7CK,KAAK,CAACwB,SAAS,GAAGD,mBAAmB;EACrC9F,QAAQ,CAACgG,IAAI,CAAC7B,WAAW,CAACI,KAAK,CAAC;AAClC"}
|
|
1
|
+
{"version":3,"file":"ThemeUtils.js","names":["Log","assertNotNull","ColorUtils","themeDark","themeLight","DEFAULT_DARK_THEME_KEY","DEFAULT_LIGHT_THEME_KEY","DEFAULT_PRELOAD_DATA_VARIABLES","THEME_CACHE_LOCAL_STORAGE_KEY","SVG_ICON_MANUAL_COLOR_MAP","log","module","CSS_VAR_EXPRESSION_PREFIX","TMP_CSS_PROP_PREFIX","NON_WHITESPACE_REGEX","WHITESPACE_REGEX","calculatePreloadStyleContent","resolveVar","createCssVariableResolver","document","body","pairs","Object","keys","map","key","concat","join","el","computedStyle","getComputedStyle","cssVariableResolver","varName","_DEFAULT_PRELOAD_DATA","value","getPropertyValue","extractDistinctCssVariableExpressions","record","set","Set","values","forEach","getExpressionRanges","_ref","start","end","expression","substring","includes","add","getActiveThemes","themeKey","themeRegistration","_custom$baseThemeKey","custom","find","theme","baseThemeKey","base","error","debug","getDefaultBaseThemes","name","styleContent","getThemePreloadData","data","localStorage","getItem","JSON","parse","_unused","_NON_WHITESPACE_REGEX","_NON_WHITESPACE_REGEX2","ranges","exec","index","parenLevel","i","length","test","push","replaceSVGFillColor","svgContent","fillColor","replace","encodeURIComponent","resolveCssVariablesInRecord","targetElement","arguments","undefined","perfStart","performance","now","tmpPropEl","createElement","appendChild","varExpressions","varExpression","tmpPropKey","style","setProperty","result","window","resolver","indexOf","resolved","normalizeCssColor","entries","_ref2","resolveCssVariablesInString","remove","_ref3","setThemePreloadData","preloadData","setItem","stringify","getThemeKey","pluginName","themeName","preloadTheme","_getThemePreloadData$","_getThemePreloadData","preloadStyleContent","innerHTML","head","overrideSVGFillColors","_ref4","removeProperty","newSVGContent"],"sources":["../../src/theme/ThemeUtils.ts"],"sourcesContent":["import Log from '@deephaven/log';\nimport { assertNotNull, ColorUtils } from '@deephaven/utils';\n// Note that ?inline imports are natively supported by Vite, but consumers of\n// @deephaven/components using Webpack will need to add a rule to their module\n// config.\n// e.g.\n// module: {\n// rules: [\n// {\n// resourceQuery: /inline/,\n// type: 'asset/source',\n// },\n// ],\n// },\nimport { themeDark } from './theme-dark';\nimport { themeLight } from './theme-light';\nimport {\n DEFAULT_DARK_THEME_KEY,\n DEFAULT_LIGHT_THEME_KEY,\n DEFAULT_PRELOAD_DATA_VARIABLES,\n ThemeData,\n ThemePreloadData,\n CssVariableStyleContent,\n ThemePreloadColorVariable,\n ThemeRegistrationData,\n THEME_CACHE_LOCAL_STORAGE_KEY,\n SVG_ICON_MANUAL_COLOR_MAP,\n ThemeCssVariableName,\n ThemeIconsRequiringManualColorChanges,\n} from './ThemeModel';\n\nconst log = Log.module('ThemeUtils');\n\nexport const CSS_VAR_EXPRESSION_PREFIX = 'var(--';\nexport const TMP_CSS_PROP_PREFIX = 'dh-tmp';\nexport const NON_WHITESPACE_REGEX = /\\S/;\nexport const WHITESPACE_REGEX = /\\s/;\n\nexport type VarExpressionResolver = (varExpression: string) => string;\n\n/**\n * Resolves the current values of CSS variables we want to preload. Preloading\n * happens before themes are fully loaded so that we can style things like the\n * loading spinner and background color which are shown to the user early on in\n * the app lifecycle.\n */\nexport function calculatePreloadStyleContent(): CssVariableStyleContent {\n const resolveVar = createCssVariableResolver(document.body);\n\n // Calculate the current preload variables. If the variable is not set, use\n // the default value.\n const pairs = Object.keys(DEFAULT_PRELOAD_DATA_VARIABLES).map(\n key => `${key}:${resolveVar(key as ThemePreloadColorVariable)}`\n );\n\n return `:root{${pairs.join(';')}}`;\n}\n\n/**\n * Create a resolver function for calculating the value of a css variable based\n * on a given element's computed style. If the variable resolves to '', we check\n * DEFAULT_PRELOAD_DATA_VARIABLES for a default value, and if one does not exist,\n * return ''.\n * @param el Element to resolve css variables against\n */\nexport function createCssVariableResolver(\n el: Element\n): (varName: ThemeCssVariableName) => string {\n const computedStyle = getComputedStyle(el);\n\n /**\n * Resolve the given css variable name to a value. If the variable is not set,\n * return the default preload value or '' if one does not exist.\n */\n return function cssVariableResolver(varName: ThemeCssVariableName): string {\n const value = computedStyle.getPropertyValue(varName);\n\n if (value !== '') {\n return value;\n }\n\n return (\n DEFAULT_PRELOAD_DATA_VARIABLES[varName as ThemePreloadColorVariable] ?? ''\n );\n };\n}\n\n/**\n * Extracts all css variable expressions from the given record and returns\n * a set of unique expressions.\n * @param record The record to extract css variable expressions from\n */\nexport function extractDistinctCssVariableExpressions(\n record: Record<string, string>\n): Set<string> {\n const set = new Set<string>();\n\n Object.values(record).forEach(value => {\n getExpressionRanges(value).forEach(([start, end]) => {\n const expression = value.substring(start, end + 1);\n\n if (expression.includes(CSS_VAR_EXPRESSION_PREFIX)) {\n set.add(expression);\n }\n });\n });\n\n return set;\n}\n\n/**\n * Returns an array of the active themes. The first item will always be one\n * of the base themes. Optionally, the second item will be a custom theme.\n */\nexport function getActiveThemes(\n themeKey: string,\n themeRegistration: ThemeRegistrationData\n): [ThemeData] | [ThemeData, ThemeData] {\n const custom = themeRegistration.custom.find(\n theme => theme.themeKey === themeKey\n );\n\n const baseThemeKey = custom?.baseThemeKey ?? themeKey;\n\n let base = themeRegistration.base.find(\n theme => theme.themeKey === baseThemeKey\n );\n\n if (base == null) {\n log.error(\n `No registered base theme found for theme key: '${baseThemeKey}'`,\n 'Registered:',\n themeRegistration.base.map(theme => theme.themeKey),\n themeRegistration.custom.map(theme => theme.themeKey)\n );\n base = themeRegistration.base.find(\n theme => theme.themeKey === DEFAULT_DARK_THEME_KEY\n );\n\n assertNotNull(\n base,\n `Default base theme '${DEFAULT_DARK_THEME_KEY}' is not registered`\n );\n }\n\n log.debug('Applied themes:', base.themeKey, custom?.themeKey);\n\n return custom == null ? [base] : [base, custom];\n}\n\n/**\n * Get default base theme data.\n */\nexport function getDefaultBaseThemes(): ThemeData[] {\n return [\n {\n name: 'Default Dark',\n themeKey: DEFAULT_DARK_THEME_KEY,\n styleContent: themeDark,\n },\n {\n name: 'Default Light',\n themeKey: DEFAULT_LIGHT_THEME_KEY,\n styleContent: themeLight,\n },\n ];\n}\n\n/**\n * Get the preload data from local storage or null if it does not exist or is\n * invalid\n */\nexport function getThemePreloadData(): ThemePreloadData | null {\n const data = localStorage.getItem(THEME_CACHE_LOCAL_STORAGE_KEY);\n\n try {\n return data == null ? null : JSON.parse(data);\n } catch {\n // ignore\n }\n\n return null;\n}\n\n/**\n * Identifies start and end indices of any top-level expressions in the given\n * string.\n *\n * e.g.\n * getExpressionRanges('var(--aaa-aa) #fff var(--bbb-bb)')\n * yields:\n * [\n * [0, 12], // 'var(--aaa-aa)'\n * [14, 17] // '#fff'\n * [19, 31], // 'var(--bbb-bb)'\n * ]\n *\n * In cases where there are nested expressions, only the indices of the outermost\n * expression will be included.\n *\n * e.g.\n * getExpressionRanges('var(--ccc-cc, var(--aaa-aa, green)) var(--bbb-bb)')\n * yields:\n * [\n * [0, 34], // 'var(--ccc-cc, var(--aaa-aa, green))'\n * [36, 48], // 'var(--bbb-bb)'\n * ]\n * @param value The string to search for expressions\n * @returns An array of [start, end] index pairs for each expression\n */\nexport function getExpressionRanges(value: string): [number, number][] {\n const ranges: [number, number][] = [];\n\n let start = NON_WHITESPACE_REGEX.exec(value)?.index ?? 0;\n let parenLevel = 0;\n\n for (let i = 0; i < value.length; i += 1) {\n if (value[i] === '(') {\n parenLevel += 1;\n } else if (value[i] === ')') {\n parenLevel -= 1;\n }\n\n if (\n i === value.length - 1 ||\n (WHITESPACE_REGEX.test(value[i + 1]) && parenLevel === 0)\n ) {\n ranges.push([start, i]);\n\n while (i < value.length - 1 && WHITESPACE_REGEX.test(value[i + 1])) {\n i += 1;\n }\n\n start = i + 1;\n }\n }\n\n if (parenLevel !== 0) {\n log.error('Unbalanced parentheses in css var expression', value);\n return [];\n }\n\n return ranges;\n}\n\n/**\n * Replace the `fill='...'` attribute in the given SVG content with the given\n * color string.\n * @param svgContent Inline SVG content to replace the fill color in\n * @param fillColor The color to replace the fill color with\n */\nexport function replaceSVGFillColor(\n svgContent: string,\n fillColor: string\n): string {\n return svgContent.replace(\n /fill='.*?'/,\n `fill='${encodeURIComponent(fillColor)}'`\n );\n}\n\n/**\n * Make a copy of the given object replacing any css variable expressions\n * contained in its prop values with values resolved from the given HTML element.\n * Variables that resolve to color strings will also be normalized to rgb or\n * rgba color strings.\n *\n * Note that the browser will force a reflow when calling `getComputedStyle` if\n * css properties have changed. In order to avoid a reflow for every property\n * check we use distinct setup, resolve / normalize, and cleanup passes:\n * 1. Setup - Create a tmp element and set all css props we want to evaluate\n * 2. Resolve / Normalize - Evaluate all css props via `getPropertyValue` calls\n * and replace the original expressions with resolved values. Also normalize\n * css colors to rgb/a.\n * 3. Cleanup - Remove the tmp element\n * @param record An object whose values may contain css var expressions\n * @param targetElement The element to resolve css variables against. Defaults\n * to document.body\n */\nexport function resolveCssVariablesInRecord<T extends Record<string, string>>(\n record: T,\n targetElement: HTMLElement = document.body\n): T {\n const perfStart = performance.now();\n\n // Add a temporary div to attach temp css variables to\n const tmpPropEl = document.createElement('div');\n targetElement.appendChild(tmpPropEl);\n\n const varExpressions = [...extractDistinctCssVariableExpressions(record)];\n\n // Set temporary css variables for resolving var expressions\n varExpressions.forEach((varExpression, i) => {\n const tmpPropKey = `--${TMP_CSS_PROP_PREFIX}-${i}`;\n tmpPropEl.style.setProperty(tmpPropKey, varExpression);\n });\n\n const result = {} as T;\n\n const computedStyle = window.getComputedStyle(tmpPropEl);\n\n const resolver = (varExpression: string): string => {\n const tmpPropKey = `--${TMP_CSS_PROP_PREFIX}-${varExpressions.indexOf(\n varExpression\n )}`;\n\n const resolved = computedStyle.getPropertyValue(tmpPropKey);\n\n return ColorUtils.normalizeCssColor(resolved);\n };\n\n // Resolve the temporary css variables\n Object.entries(record).forEach(([key, value]) => {\n result[key as keyof T] = resolveCssVariablesInString(\n resolver,\n value\n ) as T[keyof T];\n });\n\n // Remove the temporary css variables\n tmpPropEl.remove();\n\n log.debug('Resolved css variables', performance.now() - perfStart, 'ms');\n\n return result;\n}\n\n/**\n * Resolve css variable expressions in the given string using the\n * given resolver and replace the original expressions with the resolved values.\n *\n * @param resolver Function that can resolve a css variable expression\n * @param value Value that may contain css variable expressions\n */\nexport function resolveCssVariablesInString(\n resolver: VarExpressionResolver,\n value: string\n): string {\n const result: string[] = [];\n let i = 0;\n getExpressionRanges(value).forEach(([start, end]) => {\n if (i < start) {\n result.push(value.substring(i, start));\n i += start - i;\n }\n\n const expression = value.substring(start, end + 1);\n\n result.push(\n expression.includes(CSS_VAR_EXPRESSION_PREFIX)\n ? resolver(expression)\n : expression\n );\n\n i += end - start + 1;\n });\n\n if (result.length === 0) {\n return value;\n }\n\n return result.join('');\n}\n\n/**\n * Store theme preload data in local storage.\n * @param preloadData The preload data to set\n */\nexport function setThemePreloadData(preloadData: ThemePreloadData): void {\n localStorage.setItem(\n THEME_CACHE_LOCAL_STORAGE_KEY,\n JSON.stringify(preloadData)\n );\n}\n\n/**\n * Derive unique theme key from plugin root path and theme name.\n * @param pluginName The root path of the plugin\n * @param themeName The name of the theme\n */\nexport function getThemeKey(pluginName: string, themeName: string): string {\n return `${pluginName}_${themeName}`;\n}\n\n/**\n * Preload minimal theme variables from the cache.\n */\nexport function preloadTheme(): void {\n const preloadStyleContent =\n getThemePreloadData()?.preloadStyleContent ??\n calculatePreloadStyleContent();\n\n log.debug('Preloading theme content:', `'${preloadStyleContent}'`);\n\n const style = document.createElement('style');\n style.innerHTML = preloadStyleContent;\n document.head.appendChild(style);\n}\n\n/**\n * Inline SVGs cannot depend on dynamic CSS variables, so we have to statically\n * update them if we want to change their color.\n *\n * This function:\n * 1. Clears any previous overrides\n * 2. Resolves CSS variables containing inline SVG urls\n * 3. Resolves mapped color variables and replaces the `fill='...'` attribute with the result\n * 4. Sets the original CSS variable to the new replaced value\n *\n * Note that it is preferable to use inline SVGs as background-mask values and\n * just change the background color instead of relying on this util, but this\n * is not always possible. e.g. <select> elements don't support pseudo elements,\n * so there's not a good way to set icons via masks.\n */\nexport function overrideSVGFillColors(): void {\n const resolveVar = createCssVariableResolver(document.body);\n\n Object.entries(SVG_ICON_MANUAL_COLOR_MAP).forEach(([key, value]) => {\n // Clear any previous override so that our variables get resolved against the\n // actual svg content provided by the active themes and not from a previous\n // override\n document.body.style.removeProperty(key);\n\n const svgContent = resolveVar(key as ThemeIconsRequiringManualColorChanges);\n const fillColor = resolveVar(value as ThemePreloadColorVariable);\n\n const newSVGContent = replaceSVGFillColor(svgContent, fillColor);\n\n // This will take precedence over any values for the variable provided by\n // the active themes\n document.body.style.setProperty(key, newSVGContent);\n });\n}\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,gBAAgB;AAChC,SAASC,aAAa,EAAEC,UAAU,QAAQ,kBAAkB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA,SACSC,SAAS;AAAA,SACTC,UAAU;AAAA,SAEjBC,sBAAsB,EACtBC,uBAAuB,EACvBC,8BAA8B,EAM9BC,6BAA6B,EAC7BC,yBAAyB;AAK3B,IAAMC,GAAG,GAAGV,GAAG,CAACW,MAAM,CAAC,YAAY,CAAC;AAEpC,OAAO,IAAMC,yBAAyB,GAAG,QAAQ;AACjD,OAAO,IAAMC,mBAAmB,GAAG,QAAQ;AAC3C,OAAO,IAAMC,oBAAoB,GAAG,IAAI;AACxC,OAAO,IAAMC,gBAAgB,GAAG,IAAI;AAIpC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,4BAA4BA,CAAA,EAA4B;EACtE,IAAMC,UAAU,GAAGC,yBAAyB,CAACC,QAAQ,CAACC,IAAI,CAAC;;EAE3D;EACA;EACA,IAAMC,KAAK,GAAGC,MAAM,CAACC,IAAI,CAAChB,8BAA8B,CAAC,CAACiB,GAAG,CAC3DC,GAAG,OAAAC,MAAA,CAAOD,GAAG,OAAAC,MAAA,CAAIT,UAAU,CAACQ,GAAgC,CAAC,CAC/D,CAAC;EAED,gBAAAC,MAAA,CAAgBL,KAAK,CAACM,IAAI,CAAC,GAAG,CAAC;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAST,yBAAyBA,CACvCU,EAAW,EACgC;EAC3C,IAAMC,aAAa,GAAGC,gBAAgB,CAACF,EAAE,CAAC;;EAE1C;AACF;AACA;AACA;EACE,OAAO,SAASG,mBAAmBA,CAACC,OAA6B,EAAU;IAAA,IAAAC,qBAA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AC,OAAO,CAAC;EAC7CK,KAAK,CAACwB,SAAS,GAAGD,mBAAmB;EACrCvG,QAAQ,CAACyG,IAAI,CAAC7B,WAAW,CAACI,KAAK,CAAC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS0B,qBAAqBA,CAAA,EAAS;EAC5C,IAAM5G,UAAU,GAAGC,yBAAyB,CAACC,QAAQ,CAACC,IAAI,CAAC;EAE3DE,MAAM,CAACqF,OAAO,CAAClG,yBAAyB,CAAC,CAACgC,OAAO,CAACqF,KAAA,IAAkB;IAAA,IAAjB,CAACrG,GAAG,EAAES,KAAK,CAAC,GAAA4F,KAAA;IAC7D;IACA;IACA;IACA3G,QAAQ,CAACC,IAAI,CAAC+E,KAAK,CAAC4B,cAAc,CAACtG,GAAG,CAAC;IAEvC,IAAMyD,UAAU,GAAGjE,UAAU,CAACQ,GAA4C,CAAC;IAC3E,IAAM0D,SAAS,GAAGlE,UAAU,CAACiB,KAAkC,CAAC;IAEhE,IAAM8F,aAAa,GAAG/C,mBAAmB,CAACC,UAAU,EAAEC,SAAS,CAAC;;IAEhE;IACA;IACAhE,QAAQ,CAACC,IAAI,CAAC+E,KAAK,CAACC,WAAW,CAAC3E,GAAG,EAAEuG,aAAa,CAAC;EACrD,CAAC,CAAC;AACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--dh-color-
|
|
1
|
+
:root{--dh-color-loading-spinner-primary: var(--dh-color-accent-default-bg);--dh-color-loading-spinner-secondary: hsla(var(--dh-color-gray-800-hsl), 0.5);--dh-color-quickactions-bg: hsla(var(--dh-color-visual-gray-hsl), 0.9);--dh-color-radial-reaction: hsla(var(--dh-color-visual-gray-hsl), 0.6);--dh-color-colorpicker-border: hsla(var(--dh-color-visual-gray-hsl), 0.1);--dh-color-search-icon: var(--dh-color-foreground);--dh-color-form-control-error: hsl(var(--dh-color-visual-negative-hsl));--dh-color-form-control-error-shadow: hsla( var(--dh-color-visual-negative-hsl), 0.25 );--dh-color-selector-fg: hsla(var(--dh-color-gray-800-hsl), 0.4);--dh-color-selector-hover-fg: hsl(var(--dh-color-gray-800-hsl));--dh-color-selector-disabled-fg: hsla( var(--dh-color-gray-800-hsl), /* * Other dropdowns have opacity .4 when not hovered and then an additional * .65 opacity applied to disabled, hence .4 * .65 == .26 */ 0.26 )}/*# sourceMappingURL=theme-dark-components.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../../src/theme/theme-dark/theme-dark-components.css"],"names":[],"mappings":"AACA,MACE,
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../../src/theme/theme-dark/theme-dark-components.css"],"names":[],"mappings":"AACA,MACE,sEACA,8EACA,uEACA,uEACA,0EAGA,mDACA,wEACA,wFAMA,gEACA,gEACA","file":"theme-dark-components.css","sourcesContent":["/* stylelint-disable alpha-value-notation */\n:root {\n --dh-color-loading-spinner-primary: var(--dh-color-accent-default-bg);\n --dh-color-loading-spinner-secondary: hsla(var(--dh-color-gray-800-hsl), 0.5);\n --dh-color-quickactions-bg: hsla(var(--dh-color-visual-gray-hsl), 0.9);\n --dh-color-radial-reaction: hsla(var(--dh-color-visual-gray-hsl), 0.6);\n --dh-color-colorpicker-border: hsla(var(--dh-color-visual-gray-hsl), 0.1);\n\n /* Form Controls */\n --dh-color-search-icon: var(--dh-color-foreground);\n --dh-color-form-control-error: hsl(var(--dh-color-visual-negative-hsl));\n --dh-color-form-control-error-shadow: hsla(\n var(--dh-color-visual-negative-hsl),\n 0.25\n );\n\n /* Selectors (pickers, dropdowns, select, etc.) */\n --dh-color-selector-fg: hsla(var(--dh-color-gray-800-hsl), 0.4);\n --dh-color-selector-hover-fg: hsl(var(--dh-color-gray-800-hsl));\n --dh-color-selector-disabled-fg: hsla(\n var(--dh-color-gray-800-hsl),\n /* \n * Other dropdowns have opacity .4 when not hovered and then an additional \n * .65 opacity applied to disabled, hence .4 * .65 == .26\n */\n 0.26\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--dh-color-gray-hue: 219deg;--dh-color-gray-50: hsl(calc(var(--dh-color-gray-hue) + 81deg), 6%, 10%);--dh-color-gray-75: hsl(calc(var(--dh-color-gray-hue) + 61deg), 5%, 13%);--dh-color-gray-100: hsl(calc(var(--dh-color-gray-hue) + 66deg), 5%, 17%);--dh-color-gray-200: hsl(calc(var(--dh-color-gray-hue) + 66deg), 4%, 19%);--dh-color-gray-300: hsl(calc(var(--dh-color-gray-hue) + 66deg), 4%, 21%);--dh-color-gray-400: hsl(calc(var(--dh-color-gray-hue) + 61deg), 2%, 25%);--dh-color-gray-500: hsl(calc(var(--dh-color-gray-hue) + 51deg), 1%, 36%);--dh-color-gray-600: hsl(calc(var(--dh-color-gray-hue) + 81deg), 0%, 57%);--dh-color-gray-700: hsl(calc(var(--dh-color-gray-hue) - 219deg), 1%, 75%);--dh-color-gray-800: hsl(calc(var(--dh-color-gray-hue) - 159deg), 6%, 94%);--dh-color-gray-900: hsl(calc(var(--dh-color-gray-hue) - 159deg), 25%, 98%);--dh-color-black: var(--dh-color-gray-50);--dh-color-white: var(--dh-color-gray-800);--dh-color-blue-hue: 222deg;--dh-color-blue-100: hsl(var(--dh-color-blue-hue) 65% 19%);--dh-color-blue-200: hsl(var(--dh-color-blue-hue) 66% 25%);--dh-color-blue-300: hsl(var(--dh-color-blue-hue) 65% 32%);--dh-color-blue-400: hsl(var(--dh-color-blue-hue) 63% 39%);--dh-color-blue-500: hsl(var(--dh-color-blue-hue) 61% 47%);--dh-color-blue-600: hsl(var(--dh-color-blue-hue) 68% 54%);--dh-color-blue-700: hsl(var(--dh-color-blue-hue) 83% 62%);--dh-color-blue-800: hsl(var(--dh-color-blue-hue) 94% 68%);--dh-color-blue-900: hsl(var(--dh-color-blue-hue) 100% 74%);--dh-color-blue-1000: hsl(var(--dh-color-blue-hue) 100% 80%);--dh-color-blue-1100: hsl(calc(var(--dh-color-blue-hue) - 1deg) 100% 84%);--dh-color-blue-1200: hsl(calc(var(--dh-color-blue-hue) - 1deg) 100% 89%);--dh-color-blue-1300: hsl(var(--dh-color-blue-hue) 100% 93%);--dh-color-blue-1400: hsl(calc(var(--dh-color-blue-hue) + 2deg) 100% 96%);--dh-color-red-hue: 345deg;--dh-color-red-100: hsl(calc(var(--dh-color-red-hue) + 1deg) 54% 18%);--dh-color-red-200: hsl(var(--dh-color-red-hue) 55% 24%);--dh-color-red-300: hsl(calc(var(--dh-color-red-hue) + 1deg) 54% 30%);--dh-color-red-400: hsl(var(--dh-color-red-hue) 54% 37%);--dh-color-red-500: hsl(var(--dh-color-red-hue) 53% 44%);--dh-color-red-600: hsl(var(--dh-color-red-hue) 55% 51%);--dh-color-red-700: hsl(var(--dh-color-red-hue) 71% 59%);--dh-color-red-800: hsl(var(--dh-color-red-hue) 92% 67%);--dh-color-red-900: hsl(calc(var(--dh-color-red-hue) - 1deg) 100% 74%);--dh-color-red-1000: hsl(calc(var(--dh-color-red-hue) - 2deg) 100% 80%);--dh-color-red-1100: hsl(calc(var(--dh-color-red-hue) - 2deg) 100% 85%);--dh-color-red-1200: hsl(calc(var(--dh-color-red-hue) - 1deg) 100% 90%);--dh-color-red-1300: hsl(calc(var(--dh-color-red-hue) - 1deg) 100% 94%);--dh-color-red-1400: hsl(calc(var(--dh-color-red-hue) - 1deg) 100% 96%);--dh-color-orange-hue: 22deg;--dh-color-orange-100: hsl(calc(var(--dh-color-orange-hue) - 2deg) 100% 14%);--dh-color-orange-200: hsl(var(--dh-color-orange-hue) 96% 18%);--dh-color-orange-300: hsl(calc(var(--dh-color-orange-hue) + 1deg) 90% 23%);--dh-color-orange-400: hsl(var(--dh-color-orange-hue) 84% 29%);--dh-color-orange-500: hsl(var(--dh-color-orange-hue) 80% 35%);--dh-color-orange-600: hsl(var(--dh-color-orange-hue) 74% 41%);--dh-color-orange-700: hsl(var(--dh-color-orange-hue) 70% 48%);--dh-color-orange-800: hsl(var(--dh-color-orange-hue) 78% 55%);--dh-color-orange-900: hsl(calc(var(--dh-color-orange-hue) - 1deg) 95% 63%);--dh-color-orange-1000: hsl(var(--dh-color-orange-hue) 100% 71%);--dh-color-orange-1100: hsl(calc(var(--dh-color-orange-hue) + 1deg) 100% 78%);--dh-color-orange-1200: hsl(calc(var(--dh-color-orange-hue) + 2deg) 100% 84%);--dh-color-orange-1300: hsl(calc(var(--dh-color-orange-hue) + 2deg) 100% 90%);--dh-color-orange-1400: hsl(calc(var(--dh-color-orange-hue) + 3deg) 100% 94%);--dh-color-yellow-hue: 49deg;--dh-color-yellow-100: hsl(calc(var(--dh-color-yellow-hue) + 2deg) 100% 9%);--dh-color-yellow-200: hsl(calc(var(--dh-color-yellow-hue) + 1deg) 100% 12%);--dh-color-yellow-300: hsl(calc(var(--dh-color-yellow-hue) + 2deg) 100% 15%);--dh-color-yellow-400: hsl(calc(var(--dh-color-yellow-hue) + 1deg) 90% 20%);--dh-color-yellow-500: hsl(var(--dh-color-yellow-hue) 82% 25%);--dh-color-yellow-600: hsl(calc(var(--dh-color-yellow-hue) - 1deg) 75% 30%);--dh-color-yellow-700: hsl(calc(var(--dh-color-yellow-hue) - 1deg) 70% 35%);--dh-color-yellow-800: hsl(calc(var(--dh-color-yellow-hue) - 2deg) 66% 41%);--dh-color-yellow-900: hsl(calc(var(--dh-color-yellow-hue) - 2deg) 61% 47%);--dh-color-yellow-1000: hsl(calc(var(--dh-color-yellow-hue) - 2deg) 66% 54%);--dh-color-yellow-1100: hsl(calc(var(--dh-color-yellow-hue) - 3deg) 79% 60%);--dh-color-yellow-1200: hsl(calc(var(--dh-color-yellow-hue) - 3deg) 94% 66%);--dh-color-yellow-1300: hsl(var(--dh-color-yellow-hue) 100% 74%);--dh-color-yellow-1400: hsl(calc(var(--dh-color-yellow-hue) + 2deg) 100% 84%);--dh-color-chartreuse-hue: 70deg;--dh-color-chartreuse-100: hsl( calc(var(--dh-color-chartreuse-hue) + 7deg) 100% 8% );--dh-color-chartreuse-200: hsl( calc(var(--dh-color-chartreuse-hue) + 5deg) 84% 12% );--dh-color-chartreuse-300: hsl( calc(var(--dh-color-chartreuse-hue) + 4deg) 73% 16% );--dh-color-chartreuse-400: hsl( calc(var(--dh-color-chartreuse-hue) + 1deg) 67% 20% );--dh-color-chartreuse-500: hsl( calc(var(--dh-color-chartreuse-hue) + 1deg) 62% 25% );--dh-color-chartreuse-600: hsl(var(--dh-color-chartreuse-hue) 59% 30%);--dh-color-chartreuse-700: hsl( calc(var(--dh-color-chartreuse-hue) - 1deg) 56% 35% );--dh-color-chartreuse-800: hsl( calc(var(--dh-color-chartreuse-hue) - 2deg) 53% 40% );--dh-color-chartreuse-900: hsl( calc(var(--dh-color-chartreuse-hue) - 3deg) 50% 45% );--dh-color-chartreuse-1000: hsl( calc(var(--dh-color-chartreuse-hue) - 3deg) 49% 51% );--dh-color-chartreuse-1100: hsl( calc(var(--dh-color-chartreuse-hue) - 3deg) 58% 57% );--dh-color-chartreuse-1200: hsl( calc(var(--dh-color-chartreuse-hue) - 4deg) 67% 64% );--dh-color-chartreuse-1300: hsl( calc(var(--dh-color-chartreuse-hue) - 4deg) 76% 73% );--dh-color-chartreuse-1400: hsl( calc(var(--dh-color-chartreuse-hue) - 4deg) 82% 83% );--dh-color-celery-hue: 126deg;--dh-color-celery-100: hsl(calc(var(--dh-color-celery-hue) + 1deg) 43% 12%);--dh-color-celery-200: hsl(calc(var(--dh-color-celery-hue) - 1deg) 43% 16%);--dh-color-celery-300: hsl(calc(var(--dh-color-celery-hue) - 1deg) 43% 21%);--dh-color-celery-400: hsl(calc(var(--dh-color-celery-hue) - 1deg) 43% 25%);--dh-color-celery-500: hsl(calc(var(--dh-color-celery-hue) - 1deg) 42% 30%);--dh-color-celery-600: hsl(var(--dh-color-celery-hue) 41% 36%);--dh-color-celery-700: hsl(calc(var(--dh-color-celery-hue) - 1deg) 39% 41%);--dh-color-celery-800: hsl(calc(var(--dh-color-celery-hue) - 1deg) 37% 48%);--dh-color-celery-900: hsl(calc(var(--dh-color-celery-hue) - 1deg) 39% 55%);--dh-color-celery-1000: hsl(calc(var(--dh-color-celery-hue) - 1deg) 44% 63%);--dh-color-celery-1100: hsl(calc(var(--dh-color-celery-hue) - 1deg) 48% 71%);--dh-color-celery-1200: hsl(var(--dh-color-celery-hue) 50% 80%);--dh-color-celery-1300: hsl(var(--dh-color-celery-hue) 48% 87%);--dh-color-celery-1400: hsl(calc(var(--dh-color-celery-hue) + 1deg) 50% 93%);--dh-color-green-hue: 94deg;--dh-color-green-100: hsl(calc(var(--dh-color-green-hue) + 1deg) 17% 14%);--dh-color-green-200: hsl(calc(var(--dh-color-green-hue) - 2deg) 19% 18%);--dh-color-green-300: hsl(var(--dh-color-green-hue) 22% 23%);--dh-color-green-400: hsl(var(--dh-color-green-hue) 23% 27%);--dh-color-green-500: hsl(calc(var(--dh-color-green-hue) - 1deg) 26% 32%);--dh-color-green-600: hsl(calc(var(--dh-color-green-hue) + 1deg) 28% 37%);--dh-color-green-700: hsl(calc(var(--dh-color-green-hue) + 1deg) 30% 42%);--dh-color-green-800: hsl(var(--dh-color-green-hue) 32% 48%);--dh-color-green-900: hsl(var(--dh-color-green-hue) 38% 53%);--dh-color-green-1000: hsl(var(--dh-color-green-hue) 47% 58%);--dh-color-green-1100: hsl(var(--dh-color-green-hue) 59% 64%);--dh-color-green-1200: hsl(var(--dh-color-green-hue) 71% 70%);--dh-color-green-1300: hsl(var(--dh-color-green-hue) 81% 79%);--dh-color-green-1400: hsl(calc(var(--dh-color-green-hue) - 1deg) 88% 87%);--dh-color-seafoam-hue: 159deg;--dh-color-seafoam-100: hsl(calc(var(--dh-color-seafoam-hue) - 3deg) 14% 14%);--dh-color-seafoam-200: hsl(calc(var(--dh-color-seafoam-hue) - 1deg) 17% 18%);--dh-color-seafoam-300: hsl(var(--dh-color-seafoam-hue) 20% 23%);--dh-color-seafoam-400: hsl(calc(var(--dh-color-seafoam-hue) - 1deg) 23% 28%);--dh-color-seafoam-500: hsl(calc(var(--dh-color-seafoam-hue) - 1deg) 26% 33%);--dh-color-seafoam-600: hsl(var(--dh-color-seafoam-hue) 29% 37%);--dh-color-seafoam-700: hsl(calc(var(--dh-color-seafoam-hue) + 2deg) 33% 42%);--dh-color-seafoam-800: hsl(calc(var(--dh-color-seafoam-hue) + 2deg) 36% 47%);--dh-color-seafoam-900: hsl(calc(var(--dh-color-seafoam-hue) + 3deg) 42% 51%);--dh-color-seafoam-1000: hsl( calc(var(--dh-color-seafoam-hue) + 2deg) 53% 56% );--dh-color-seafoam-1100: hsl( calc(var(--dh-color-seafoam-hue) + 3deg) 66% 62% );--dh-color-seafoam-1200: hsl( calc(var(--dh-color-seafoam-hue) + 2deg) 76% 70% );--dh-color-seafoam-1300: hsl( calc(var(--dh-color-seafoam-hue) - 1deg) 87% 80% );--dh-color-seafoam-1400: hsl( calc(var(--dh-color-seafoam-hue) - 3deg) 89% 89% );--dh-color-cyan-hue: 186deg;--dh-color-cyan-100: hsl(calc(var(--dh-color-cyan-hue) - 1deg) 38% 13%);--dh-color-cyan-200: hsl(var(--dh-color-cyan-hue) 38% 16%);--dh-color-cyan-300: hsl(var(--dh-color-cyan-hue) 39% 21%);--dh-color-cyan-400: hsl(calc(var(--dh-color-cyan-hue) - 1deg) 38% 26%);--dh-color-cyan-500: hsl(calc(var(--dh-color-cyan-hue) - 1deg) 38% 31%);--dh-color-cyan-600: hsl(var(--dh-color-cyan-hue) 38% 37%);--dh-color-cyan-700: hsl(calc(var(--dh-color-cyan-hue) - 1deg) 38% 42%);--dh-color-cyan-800: hsl(calc(var(--dh-color-cyan-hue) - 1deg) 37% 48%);--dh-color-cyan-900: hsl(calc(var(--dh-color-cyan-hue) - 1deg) 42% 54%);--dh-color-cyan-1000: hsl(calc(var(--dh-color-cyan-hue) - 1deg) 52% 60%);--dh-color-cyan-1100: hsl(var(--dh-color-cyan-hue) 64% 67%);--dh-color-cyan-1200: hsl(var(--dh-color-cyan-hue) 79% 74%);--dh-color-cyan-1300: hsl(var(--dh-color-cyan-hue) 92% 81%);--dh-color-cyan-1400: hsl(var(--dh-color-cyan-hue) 100% 90%);--dh-color-indigo-hue: 235deg;--dh-color-indigo-100: hsl(calc(var(--dh-color-indigo-hue) + 2deg) 58% 24%);--dh-color-indigo-200: hsl(calc(var(--dh-color-indigo-hue) + 1deg) 52% 30%);--dh-color-indigo-300: hsl(calc(var(--dh-color-indigo-hue) + 1deg) 47% 37%);--dh-color-indigo-400: hsl(var(--dh-color-indigo-hue) 43% 44%);--dh-color-indigo-500: hsl(var(--dh-color-indigo-hue) 40% 51%);--dh-color-indigo-600: hsl(var(--dh-color-indigo-hue) 49% 58%);--dh-color-indigo-700: hsl(calc(var(--dh-color-indigo-hue) - 1deg) 60% 65%);--dh-color-indigo-800: hsl(calc(var(--dh-color-indigo-hue) - 1deg) 75% 72%);--dh-color-indigo-900: hsl(calc(var(--dh-color-indigo-hue) - 1deg) 91% 78%);--dh-color-indigo-1000: hsl(calc(var(--dh-color-indigo-hue) - 1deg) 100% 83%);--dh-color-indigo-1100: hsl(calc(var(--dh-color-indigo-hue) - 1deg) 100% 87%);--dh-color-indigo-1200: hsl(var(--dh-color-indigo-hue) 100% 91%);--dh-color-indigo-1300: hsl(calc(var(--dh-color-indigo-hue) - 3deg) 100% 94%);--dh-color-indigo-1400: hsl(calc(var(--dh-color-indigo-hue) + 1deg) 100% 97%);--dh-color-purple-hue: 254deg;--dh-color-purple-100: hsl(calc(var(--dh-color-purple-hue) + 9deg) 73% 23%);--dh-color-purple-200: hsl(calc(var(--dh-color-purple-hue) + 6deg) 59% 30%);--dh-color-purple-300: hsl(calc(var(--dh-color-purple-hue) + 4deg) 50% 37%);--dh-color-purple-400: hsl(calc(var(--dh-color-purple-hue) + 3deg) 43% 44%);--dh-color-purple-500: hsl(calc(var(--dh-color-purple-hue) + 1deg) 38% 50%);--dh-color-purple-600: hsl(var(--dh-color-purple-hue) 45% 57%);--dh-color-purple-700: hsl(calc(var(--dh-color-purple-hue) - 1deg) 54% 64%);--dh-color-purple-800: hsl(calc(var(--dh-color-purple-hue) - 3deg) 64% 71%);--dh-color-purple-900: hsl(calc(var(--dh-color-purple-hue) - 4deg) 79% 78%);--dh-color-purple-1000: hsl(calc(var(--dh-color-purple-hue) - 5deg) 91% 83%);--dh-color-purple-1100: hsl(calc(var(--dh-color-purple-hue) - 5deg) 97% 88%);--dh-color-purple-1200: hsl(calc(var(--dh-color-purple-hue) - 4deg) 100% 91%);--dh-color-purple-1300: hsl(calc(var(--dh-color-purple-hue) - 3deg) 100% 95%);--dh-color-purple-1400: hsl(calc(var(--dh-color-purple-hue) + 6deg) 88% 97%);--dh-color-fuchsia-hue: 286deg;--dh-color-fuchsia-100: hsl( calc(var(--dh-color-fuchsia-hue) + 15deg) 64% 16% );--dh-color-fuchsia-200: hsl( calc(var(--dh-color-fuchsia-hue) + 14deg) 53% 22% );--dh-color-fuchsia-300: hsl( calc(var(--dh-color-fuchsia-hue) + 11deg) 44% 29% );--dh-color-fuchsia-400: hsl(calc(var(--dh-color-fuchsia-hue) + 8deg) 39% 35%);--dh-color-fuchsia-500: hsl(calc(var(--dh-color-fuchsia-hue) + 5deg) 35% 43%);--dh-color-fuchsia-600: hsl(calc(var(--dh-color-fuchsia-hue) + 1deg) 33% 51%);--dh-color-fuchsia-700: hsl(calc(var(--dh-color-fuchsia-hue) - 3deg) 40% 58%);--dh-color-fuchsia-800: hsl(calc(var(--dh-color-fuchsia-hue) - 7deg) 50% 66%);--dh-color-fuchsia-900: hsl(calc(var(--dh-color-fuchsia-hue) - 9deg) 61% 74%);--dh-color-fuchsia-1000: hsl( calc(var(--dh-color-fuchsia-hue) - 11deg) 71% 80% );--dh-color-fuchsia-1100: hsl( calc(var(--dh-color-fuchsia-hue) - 11deg) 76% 85% );--dh-color-fuchsia-1200: hsl( calc(var(--dh-color-fuchsia-hue) - 9deg) 78% 89% );--dh-color-fuchsia-1300: hsl( calc(var(--dh-color-fuchsia-hue) - 6deg) 77% 93% );--dh-color-fuchsia-1400: hsl( calc(var(--dh-color-fuchsia-hue) + 2deg) 71% 96% );--dh-color-magenta-hue: 330deg;--dh-color-magenta-100: hsl(calc(var(--dh-color-magenta-hue) + 3deg) 91% 17%);--dh-color-magenta-200: hsl(calc(var(--dh-color-magenta-hue) + 4deg) 72% 23%);--dh-color-magenta-300: hsl(calc(var(--dh-color-magenta-hue) + 4deg) 60% 30%);--dh-color-magenta-400: hsl(calc(var(--dh-color-magenta-hue) + 4deg) 52% 36%);--dh-color-magenta-500: hsl(calc(var(--dh-color-magenta-hue) + 3deg) 46% 43%);--dh-color-magenta-600: hsl(calc(var(--dh-color-magenta-hue) + 2deg) 42% 50%);--dh-color-magenta-700: hsl(var(--dh-color-magenta-hue) 51% 58%);--dh-color-magenta-800: hsl(calc(var(--dh-color-magenta-hue) - 1deg) 61% 65%);--dh-color-magenta-900: hsl(calc(var(--dh-color-magenta-hue) - 1deg) 76% 72%);--dh-color-magenta-1000: hsl( calc(var(--dh-color-magenta-hue) - 2deg) 92% 79% );--dh-color-magenta-1100: hsl( calc(var(--dh-color-magenta-hue) - 3deg) 100% 85% );--dh-color-magenta-1200: hsl( calc(var(--dh-color-magenta-hue) - 3deg) 100% 89% );--dh-color-magenta-1300: hsl( calc(var(--dh-color-magenta-hue) - 4deg) 100% 93% );--dh-color-magenta-1400: hsl( calc(var(--dh-color-magenta-hue) - 2deg) 100% 96% )}/*# sourceMappingURL=theme-dark-palette.css.map */
|
|
1
|
+
:root{--dh-color-gray-50-hsl: 300deg, 6.1%, 9.6%;--dh-color-gray-75-hsl: 280deg, 4.6%, 12.7%;--dh-color-gray-100-hsl: 285deg, 4.5%, 17.3%;--dh-color-gray-200-hsl: 285deg, 4.1%, 19.2%;--dh-color-gray-300-hsl: 285deg, 3.7%, 21.2%;--dh-color-gray-400-hsl: 280deg, 2.4%, 24.9%;--dh-color-gray-500-hsl: 270deg, 1.1%, 35.7%;--dh-color-gray-600-hsl: 300deg, 0.5%, 57.1%;--dh-color-gray-700-hsl: 0deg, 0.8%, 75.1%;--dh-color-gray-800-hsl: 60deg, 6.2%, 93.7%;--dh-color-gray-900-hsl: 60deg, 25%, 98.4%;--dh-color-gray-light-hsl: var(--dh-color-gray-900-hsl);--dh-color-gray-mid-hsl: var(--dh-color-gray-600-hsl);--dh-color-gray-dark-hsl: var(--dh-color-gray-300-hsl);--dh-color-black-hsl: var(--dh-color-gray-50-hsl);--dh-color-white-hsl: var(--dh-color-gray-800-hsl);--dh-color-blue-100-hsl: 222deg, 65.3%, 19.2%;--dh-color-blue-200-hsl: 222deg, 66.2%, 25.5%;--dh-color-blue-300-hsl: 222deg, 64.8%, 32.4%;--dh-color-blue-400-hsl: 222deg, 63.2%, 39.4%;--dh-color-blue-500-hsl: 222deg, 60.7%, 46.9%;--dh-color-blue-600-hsl: 222deg, 68.2%, 54.3%;--dh-color-blue-700-hsl: 222deg, 82.7%, 61.6%;--dh-color-blue-800-hsl: 222deg, 93.8%, 68.4%;--dh-color-blue-900-hsl: 222deg, 100%, 74.3%;--dh-color-blue-1000-hsl: 222deg, 100%, 79.6%;--dh-color-blue-1100-hsl: 221deg, 100%, 84.3%;--dh-color-blue-1200-hsl: 221deg, 100%, 89%;--dh-color-blue-1300-hsl: 222deg, 100%, 92.9%;--dh-color-blue-1400-hsl: 224deg, 100%, 96.3%;--dh-color-red-100-hsl: 346deg, 54.3%, 18%;--dh-color-red-200-hsl: 345deg, 55%, 23.5%;--dh-color-red-300-hsl: 346deg, 54.2%, 30%;--dh-color-red-400-hsl: 345deg, 54.3%, 36.9%;--dh-color-red-500-hsl: 345deg, 53.4%, 43.7%;--dh-color-red-600-hsl: 345deg, 54.8%, 51.4%;--dh-color-red-700-hsl: 345deg, 71.3%, 59%;--dh-color-red-800-hsl: 345deg, 91.7%, 67.1%;--dh-color-red-900-hsl: 344deg, 100%, 74.1%;--dh-color-red-1000-hsl: 343deg, 100%, 80%;--dh-color-red-1100-hsl: 343deg, 100%, 85.3%;--dh-color-red-1200-hsl: 344deg, 100%, 89.8%;--dh-color-red-1300-hsl: 344deg, 100%, 93.5%;--dh-color-red-1400-hsl: 344deg, 100%, 96.3%;--dh-color-orange-100-hsl: 20deg, 100%, 13.9%;--dh-color-orange-200-hsl: 22deg, 95.7%, 18%;--dh-color-orange-300-hsl: 23deg, 89.8%, 23.1%;--dh-color-orange-400-hsl: 22deg, 83.7%, 28.8%;--dh-color-orange-500-hsl: 22deg, 79.7%, 34.7%;--dh-color-orange-600-hsl: 22deg, 74.3%, 41.2%;--dh-color-orange-700-hsl: 22deg, 69.8%, 48%;--dh-color-orange-800-hsl: 22deg, 78.2%, 55.1%;--dh-color-orange-900-hsl: 21deg, 94.7%, 63.1%;--dh-color-orange-1000-hsl: 22deg, 100%, 70.6%;--dh-color-orange-1100-hsl: 23deg, 100%, 77.6%;--dh-color-orange-1200-hsl: 24deg, 100%, 84.3%;--dh-color-orange-1300-hsl: 24deg, 100%, 89.8%;--dh-color-orange-1400-hsl: 25deg, 100%, 94.3%;--dh-color-yellow-100-hsl: 51deg, 100%, 9%;--dh-color-yellow-200-hsl: 50deg, 100%, 12%;--dh-color-yellow-300-hsl: 51deg, 100%, 15.1%;--dh-color-yellow-400-hsl: 50deg, 90%, 19.6%;--dh-color-yellow-500-hsl: 49deg, 82.4%, 24.5%;--dh-color-yellow-600-hsl: 48deg, 75%, 29.8%;--dh-color-yellow-700-hsl: 48deg, 70.2%, 35.5%;--dh-color-yellow-800-hsl: 47deg, 65.7%, 41.2%;--dh-color-yellow-900-hsl: 47deg, 61.2%, 47.5%;--dh-color-yellow-1000-hsl: 47deg, 66.2%, 53.5%;--dh-color-yellow-1100-hsl: 46deg, 79.4%, 60%;--dh-color-yellow-1200-hsl: 46deg, 94.2%, 66.5%;--dh-color-yellow-1300-hsl: 49deg, 100%, 73.9%;--dh-color-yellow-1400-hsl: 51deg, 100%, 83.7%;--dh-color-chartreuse-100-hsl: 77deg, 100%, 8.4%;--dh-color-chartreuse-200-hsl: 75deg, 83.6%, 12%;--dh-color-chartreuse-300-hsl: 74deg, 73.2%, 16.1%;--dh-color-chartreuse-400-hsl: 71deg, 67%, 20.2%;--dh-color-chartreuse-500-hsl: 71deg, 62.2%, 24.9%;--dh-color-chartreuse-600-hsl: 70deg, 58.9%, 29.6%;--dh-color-chartreuse-700-hsl: 69deg, 55.7%, 34.5%;--dh-color-chartreuse-800-hsl: 68deg, 52.9%, 40%;--dh-color-chartreuse-900-hsl: 67deg, 50%, 45.5%;--dh-color-chartreuse-1000-hsl: 67deg, 49.2%, 51.4%;--dh-color-chartreuse-1100-hsl: 67deg, 57.8%, 57.3%;--dh-color-chartreuse-1200-hsl: 66deg, 67.2%, 64.1%;--dh-color-chartreuse-1300-hsl: 66deg, 75.7%, 72.5%;--dh-color-chartreuse-1400-hsl: 66deg, 82%, 82.5%;--dh-color-celery-100-hsl: 127deg, 42.9%, 12.4%;--dh-color-celery-200-hsl: 125deg, 43.2%, 15.9%;--dh-color-celery-300-hsl: 125deg, 42.9%, 20.6%;--dh-color-celery-400-hsl: 125deg, 42.6%, 25.3%;--dh-color-celery-500-hsl: 125deg, 41.6%, 30.2%;--dh-color-celery-600-hsl: 126deg, 40.7%, 35.7%;--dh-color-celery-700-hsl: 125deg, 39.3%, 41.4%;--dh-color-celery-800-hsl: 125deg, 36.6%, 47.6%;--dh-color-celery-900-hsl: 125deg, 39.1%, 54.9%;--dh-color-celery-1000-hsl: 125deg, 43.9%, 62.9%;--dh-color-celery-1100-hsl: 125deg, 47.9%, 71.4%;--dh-color-celery-1200-hsl: 126deg, 49.5%, 79.8%;--dh-color-celery-1300-hsl: 126deg, 48.5%, 87.1%;--dh-color-celery-1400-hsl: 127deg, 50%, 92.9%;--dh-color-green-100-hsl: 95deg, 17.1%, 13.7%;--dh-color-green-200-hsl: 92deg, 18.7%, 17.8%;--dh-color-green-300-hsl: 94deg, 21.7%, 22.5%;--dh-color-green-400-hsl: 94deg, 22.9%, 27.5%;--dh-color-green-500-hsl: 93deg, 25.6%, 32.2%;--dh-color-green-600-hsl: 95deg, 27.7%, 37.5%;--dh-color-green-700-hsl: 95deg, 29.6%, 42.4%;--dh-color-green-800-hsl: 94deg, 31.7%, 47.6%;--dh-color-green-900-hsl: 94deg, 37.5%, 52.9%;--dh-color-green-1000-hsl: 94deg, 47.4%, 58.2%;--dh-color-green-1100-hsl: 94deg, 58.9%, 63.7%;--dh-color-green-1200-hsl: 94deg, 70.9%, 70.4%;--dh-color-green-1300-hsl: 94deg, 81.5%, 78.8%;--dh-color-green-1400-hsl: 93deg, 87.7%, 87.3%;--dh-color-seafoam-100-hsl: 156deg, 13.9%, 14.1%;--dh-color-seafoam-200-hsl: 158deg, 17.4%, 18%;--dh-color-seafoam-300-hsl: 159deg, 19.7%, 22.9%;--dh-color-seafoam-400-hsl: 158deg, 22.5%, 27.8%;--dh-color-seafoam-500-hsl: 158deg, 25.7%, 32.7%;--dh-color-seafoam-600-hsl: 159deg, 28.8%, 37.5%;--dh-color-seafoam-700-hsl: 161deg, 33%, 42.2%;--dh-color-seafoam-800-hsl: 161deg, 36.4%, 46.9%;--dh-color-seafoam-900-hsl: 162deg, 41.9%, 51.4%;--dh-color-seafoam-1000-hsl: 161deg, 53.4%, 56.3%;--dh-color-seafoam-1100-hsl: 162deg, 66%, 62%;--dh-color-seafoam-1200-hsl: 161deg, 76.5%, 70%;--dh-color-seafoam-1300-hsl: 158deg, 86.5%, 79.6%;--dh-color-seafoam-1400-hsl: 156deg, 89.1%, 89.2%;--dh-color-cyan-100-hsl: 185deg, 38.5%, 12.7%;--dh-color-cyan-200-hsl: 186deg, 38.1%, 16.5%;--dh-color-cyan-300-hsl: 186deg, 38.9%, 21.2%;--dh-color-cyan-400-hsl: 185deg, 38.3%, 26.1%;--dh-color-cyan-500-hsl: 185deg, 38.4%, 31.2%;--dh-color-cyan-600-hsl: 186deg, 38%, 36.7%;--dh-color-cyan-700-hsl: 185deg, 37.7%, 42.2%;--dh-color-cyan-800-hsl: 185deg, 37.1%, 48%;--dh-color-cyan-900-hsl: 185deg, 42.5%, 54.3%;--dh-color-cyan-1000-hsl: 185deg, 52.5%, 60.4%;--dh-color-cyan-1100-hsl: 186deg, 64.5%, 66.9%;--dh-color-cyan-1200-hsl: 186deg, 78.9%, 73.9%;--dh-color-cyan-1300-hsl: 186deg, 91.6%, 81.4%;--dh-color-cyan-1400-hsl: 186deg, 100%, 89.6%;--dh-color-indigo-100-hsl: 237deg, 58.1%, 24.3%;--dh-color-indigo-200-hsl: 236deg, 51.9%, 30.2%;--dh-color-indigo-300-hsl: 236deg, 46.8%, 36.9%;--dh-color-indigo-400-hsl: 235deg, 42.6%, 43.7%;--dh-color-indigo-500-hsl: 235deg, 40.2%, 50.8%;--dh-color-indigo-600-hsl: 235deg, 48.8%, 57.8%;--dh-color-indigo-700-hsl: 234deg, 59.8%, 64.9%;--dh-color-indigo-800-hsl: 234deg, 74.8%, 72%;--dh-color-indigo-900-hsl: 234deg, 91%, 78.2%;--dh-color-indigo-1000-hsl: 234deg, 100%, 83.3%;--dh-color-indigo-1100-hsl: 234deg, 100%, 87.3%;--dh-color-indigo-1200-hsl: 235deg, 100%, 91.2%;--dh-color-indigo-1300-hsl: 232deg, 100%, 94.1%;--dh-color-indigo-1400-hsl: 236deg, 100%, 96.9%;--dh-color-purple-100-hsl: 263deg, 73.1%, 23.3%;--dh-color-purple-200-hsl: 260deg, 59.2%, 29.8%;--dh-color-purple-300-hsl: 258deg, 49.7%, 36.7%;--dh-color-purple-400-hsl: 257deg, 43.2%, 43.5%;--dh-color-purple-500-hsl: 255deg, 38.3%, 50.4%;--dh-color-purple-600-hsl: 254deg, 45%, 57.3%;--dh-color-purple-700-hsl: 253deg, 53.8%, 64.3%;--dh-color-purple-800-hsl: 251deg, 64.4%, 71.4%;--dh-color-purple-900-hsl: 250deg, 78.8%, 77.8%;--dh-color-purple-1000-hsl: 249deg, 90.6%, 83.3%;--dh-color-purple-1100-hsl: 249deg, 96.8%, 87.6%;--dh-color-purple-1200-hsl: 250deg, 100%, 91.4%;--dh-color-purple-1300-hsl: 251deg, 100%, 94.5%;--dh-color-purple-1400-hsl: 260deg, 88.2%, 96.7%;--dh-color-fuchsia-100-hsl: 301deg, 64.3%, 16.5%;--dh-color-fuchsia-200-hsl: 300deg, 53.2%, 21.8%;--dh-color-fuchsia-300-hsl: 297deg, 43.8%, 28.6%;--dh-color-fuchsia-400-hsl: 294deg, 39.2%, 35.5%;--dh-color-fuchsia-500-hsl: 291deg, 35.2%, 42.9%;--dh-color-fuchsia-600-hsl: 287deg, 32.5%, 50.6%;--dh-color-fuchsia-700-hsl: 283deg, 39.6%, 58.4%;--dh-color-fuchsia-800-hsl: 279deg, 50%, 66.3%;--dh-color-fuchsia-900-hsl: 277deg, 61.5%, 73.5%;--dh-color-fuchsia-1000-hsl: 275deg, 70.9%, 79.8%;--dh-color-fuchsia-1100-hsl: 275deg, 76.3%, 85.1%;--dh-color-fuchsia-1200-hsl: 277deg, 77.8%, 89.4%;--dh-color-fuchsia-1300-hsl: 280deg, 77.1%, 93.1%;--dh-color-fuchsia-1400-hsl: 288deg, 71.4%, 95.9%;--dh-color-magenta-100-hsl: 333deg, 90.7%, 16.9%;--dh-color-magenta-200-hsl: 334deg, 72.4%, 22.7%;--dh-color-magenta-300-hsl: 334deg, 60.3%, 29.6%;--dh-color-magenta-400-hsl: 334deg, 51.6%, 36.5%;--dh-color-magenta-500-hsl: 333deg, 45.7%, 43.3%;--dh-color-magenta-600-hsl: 332deg, 41.5%, 50.4%;--dh-color-magenta-700-hsl: 330deg, 50.7%, 57.8%;--dh-color-magenta-800-hsl: 329deg, 60.7%, 65.1%;--dh-color-magenta-900-hsl: 329deg, 75.9%, 72.4%;--dh-color-magenta-1000-hsl: 328deg, 92.5%, 79.2%;--dh-color-magenta-1100-hsl: 327deg, 100%, 84.7%;--dh-color-magenta-1200-hsl: 327deg, 100%, 89.4%;--dh-color-magenta-1300-hsl: 326deg, 100%, 93.3%;--dh-color-magenta-1400-hsl: 328deg, 100%, 96.3%;--dh-color-gray-50: hsl(var(--dh-color-gray-50-hsl));--dh-color-gray-75: hsl(var(--dh-color-gray-75-hsl));--dh-color-gray-100: hsl(var(--dh-color-gray-100-hsl));--dh-color-gray-200: hsl(var(--dh-color-gray-200-hsl));--dh-color-gray-300: hsl(var(--dh-color-gray-300-hsl));--dh-color-gray-400: hsl(var(--dh-color-gray-400-hsl));--dh-color-gray-500: hsl(var(--dh-color-gray-500-hsl));--dh-color-gray-600: hsl(var(--dh-color-gray-600-hsl));--dh-color-gray-700: hsl(var(--dh-color-gray-700-hsl));--dh-color-gray-800: hsl(var(--dh-color-gray-800-hsl));--dh-color-gray-900: hsl(var(--dh-color-gray-900-hsl));--dh-color-gray-light: hsl(var(--dh-color-gray-light-hsl));--dh-color-gray-mid: hsl(var(--dh-color-gray-mid-hsl));--dh-color-gray-dark: hsl(var(--dh-color-gray-dark-hsl));--dh-color-black: hsl(var(--dh-color-black-hsl));--dh-color-white: hsl(var(--dh-color-white-hsl));--dh-color-blue-100: hsl(var(--dh-color-blue-100-hsl));--dh-color-blue-200: hsl(var(--dh-color-blue-200-hsl));--dh-color-blue-300: hsl(var(--dh-color-blue-300-hsl));--dh-color-blue-400: hsl(var(--dh-color-blue-400-hsl));--dh-color-blue-500: hsl(var(--dh-color-blue-500-hsl));--dh-color-blue-600: hsl(var(--dh-color-blue-600-hsl));--dh-color-blue-700: hsl(var(--dh-color-blue-700-hsl));--dh-color-blue-800: hsl(var(--dh-color-blue-800-hsl));--dh-color-blue-900: hsl(var(--dh-color-blue-900-hsl));--dh-color-blue-1000: hsl(var(--dh-color-blue-1000-hsl));--dh-color-blue-1100: hsl(var(--dh-color-blue-1100-hsl));--dh-color-blue-1200: hsl(var(--dh-color-blue-1200-hsl));--dh-color-blue-1300: hsl(var(--dh-color-blue-1300-hsl));--dh-color-blue-1400: hsl(var(--dh-color-blue-1400-hsl));--dh-color-red-100: hsl(var(--dh-color-red-100-hsl));--dh-color-red-200: hsl(var(--dh-color-red-200-hsl));--dh-color-red-300: hsl(var(--dh-color-red-300-hsl));--dh-color-red-400: hsl(var(--dh-color-red-400-hsl));--dh-color-red-500: hsl(var(--dh-color-red-500-hsl));--dh-color-red-600: hsl(var(--dh-color-red-600-hsl));--dh-color-red-700: hsl(var(--dh-color-red-700-hsl));--dh-color-red-800: hsl(var(--dh-color-red-800-hsl));--dh-color-red-900: hsl(var(--dh-color-red-900-hsl));--dh-color-red-1000: hsl(var(--dh-color-red-1000-hsl));--dh-color-red-1100: hsl(var(--dh-color-red-1100-hsl));--dh-color-red-1200: hsl(var(--dh-color-red-1200-hsl));--dh-color-red-1300: hsl(var(--dh-color-red-1300-hsl));--dh-color-red-1400: hsl(var(--dh-color-red-1400-hsl));--dh-color-orange-100: hsl(var(--dh-color-orange-100-hsl));--dh-color-orange-200: hsl(var(--dh-color-orange-200-hsl));--dh-color-orange-300: hsl(var(--dh-color-orange-300-hsl));--dh-color-orange-400: hsl(var(--dh-color-orange-400-hsl));--dh-color-orange-500: hsl(var(--dh-color-orange-500-hsl));--dh-color-orange-600: hsl(var(--dh-color-orange-600-hsl));--dh-color-orange-700: hsl(var(--dh-color-orange-700-hsl));--dh-color-orange-800: hsl(var(--dh-color-orange-800-hsl));--dh-color-orange-900: hsl(var(--dh-color-orange-900-hsl));--dh-color-orange-1000: hsl(var(--dh-color-orange-1000-hsl));--dh-color-orange-1100: hsl(var(--dh-color-orange-1100-hsl));--dh-color-orange-1200: hsl(var(--dh-color-orange-1200-hsl));--dh-color-orange-1300: hsl(var(--dh-color-orange-1300-hsl));--dh-color-orange-1400: hsl(var(--dh-color-orange-1400-hsl));--dh-color-yellow-100: hsl(var(--dh-color-yellow-100-hsl));--dh-color-yellow-200: hsl(var(--dh-color-yellow-200-hsl));--dh-color-yellow-300: hsl(var(--dh-color-yellow-300-hsl));--dh-color-yellow-400: hsl(var(--dh-color-yellow-400-hsl));--dh-color-yellow-500: hsl(var(--dh-color-yellow-500-hsl));--dh-color-yellow-600: hsl(var(--dh-color-yellow-600-hsl));--dh-color-yellow-700: hsl(var(--dh-color-yellow-700-hsl));--dh-color-yellow-800: hsl(var(--dh-color-yellow-800-hsl));--dh-color-yellow-900: hsl(var(--dh-color-yellow-900-hsl));--dh-color-yellow-1000: hsl(var(--dh-color-yellow-1000-hsl));--dh-color-yellow-1100: hsl(var(--dh-color-yellow-1100-hsl));--dh-color-yellow-1200: hsl(var(--dh-color-yellow-1200-hsl));--dh-color-yellow-1300: hsl(var(--dh-color-yellow-1300-hsl));--dh-color-yellow-1400: hsl(var(--dh-color-yellow-1400-hsl));--dh-color-chartreuse-100: hsl(var(--dh-color-chartreuse-100-hsl));--dh-color-chartreuse-200: hsl(var(--dh-color-chartreuse-200-hsl));--dh-color-chartreuse-300: hsl(var(--dh-color-chartreuse-300-hsl));--dh-color-chartreuse-400: hsl(var(--dh-color-chartreuse-400-hsl));--dh-color-chartreuse-500: hsl(var(--dh-color-chartreuse-500-hsl));--dh-color-chartreuse-600: hsl(var(--dh-color-chartreuse-600-hsl));--dh-color-chartreuse-700: hsl(var(--dh-color-chartreuse-700-hsl));--dh-color-chartreuse-800: hsl(var(--dh-color-chartreuse-800-hsl));--dh-color-chartreuse-900: hsl(var(--dh-color-chartreuse-900-hsl));--dh-color-chartreuse-1000: hsl(var(--dh-color-chartreuse-1000-hsl));--dh-color-chartreuse-1100: hsl(var(--dh-color-chartreuse-1100-hsl));--dh-color-chartreuse-1200: hsl(var(--dh-color-chartreuse-1200-hsl));--dh-color-chartreuse-1300: hsl(var(--dh-color-chartreuse-1300-hsl));--dh-color-chartreuse-1400: hsl(var(--dh-color-chartreuse-1400-hsl));--dh-color-celery-100: hsl(var(--dh-color-celery-100-hsl));--dh-color-celery-200: hsl(var(--dh-color-celery-200-hsl));--dh-color-celery-300: hsl(var(--dh-color-celery-300-hsl));--dh-color-celery-400: hsl(var(--dh-color-celery-400-hsl));--dh-color-celery-500: hsl(var(--dh-color-celery-500-hsl));--dh-color-celery-600: hsl(var(--dh-color-celery-600-hsl));--dh-color-celery-700: hsl(var(--dh-color-celery-700-hsl));--dh-color-celery-800: hsl(var(--dh-color-celery-800-hsl));--dh-color-celery-900: hsl(var(--dh-color-celery-900-hsl));--dh-color-celery-1000: hsl(var(--dh-color-celery-1000-hsl));--dh-color-celery-1100: hsl(var(--dh-color-celery-1100-hsl));--dh-color-celery-1200: hsl(var(--dh-color-celery-1200-hsl));--dh-color-celery-1300: hsl(var(--dh-color-celery-1300-hsl));--dh-color-celery-1400: hsl(var(--dh-color-celery-1400-hsl));--dh-color-green-100: hsl(var(--dh-color-green-100-hsl));--dh-color-green-200: hsl(var(--dh-color-green-200-hsl));--dh-color-green-300: hsl(var(--dh-color-green-300-hsl));--dh-color-green-400: hsl(var(--dh-color-green-400-hsl));--dh-color-green-500: hsl(var(--dh-color-green-500-hsl));--dh-color-green-600: hsl(var(--dh-color-green-600-hsl));--dh-color-green-700: hsl(var(--dh-color-green-700-hsl));--dh-color-green-800: hsl(var(--dh-color-green-800-hsl));--dh-color-green-900: hsl(var(--dh-color-green-900-hsl));--dh-color-green-1000: hsl(var(--dh-color-green-1000-hsl));--dh-color-green-1100: hsl(var(--dh-color-green-1100-hsl));--dh-color-green-1200: hsl(var(--dh-color-green-1200-hsl));--dh-color-green-1300: hsl(var(--dh-color-green-1300-hsl));--dh-color-green-1400: hsl(var(--dh-color-green-1400-hsl));--dh-color-seafoam-100: hsl(var(--dh-color-seafoam-100-hsl));--dh-color-seafoam-200: hsl(var(--dh-color-seafoam-200-hsl));--dh-color-seafoam-300: hsl(var(--dh-color-seafoam-300-hsl));--dh-color-seafoam-400: hsl(var(--dh-color-seafoam-400-hsl));--dh-color-seafoam-500: hsl(var(--dh-color-seafoam-500-hsl));--dh-color-seafoam-600: hsl(var(--dh-color-seafoam-600-hsl));--dh-color-seafoam-700: hsl(var(--dh-color-seafoam-700-hsl));--dh-color-seafoam-800: hsl(var(--dh-color-seafoam-800-hsl));--dh-color-seafoam-900: hsl(var(--dh-color-seafoam-900-hsl));--dh-color-seafoam-1000: hsl(var(--dh-color-seafoam-1000-hsl));--dh-color-seafoam-1100: hsl(var(--dh-color-seafoam-1100-hsl));--dh-color-seafoam-1200: hsl(var(--dh-color-seafoam-1200-hsl));--dh-color-seafoam-1300: hsl(var(--dh-color-seafoam-1300-hsl));--dh-color-seafoam-1400: hsl(var(--dh-color-seafoam-1400-hsl));--dh-color-cyan-100: hsl(var(--dh-color-cyan-100-hsl));--dh-color-cyan-200: hsl(var(--dh-color-cyan-200-hsl));--dh-color-cyan-300: hsl(var(--dh-color-cyan-300-hsl));--dh-color-cyan-400: hsl(var(--dh-color-cyan-400-hsl));--dh-color-cyan-500: hsl(var(--dh-color-cyan-500-hsl));--dh-color-cyan-600: hsl(var(--dh-color-cyan-600-hsl));--dh-color-cyan-700: hsl(var(--dh-color-cyan-700-hsl));--dh-color-cyan-800: hsl(var(--dh-color-cyan-800-hsl));--dh-color-cyan-900: hsl(var(--dh-color-cyan-900-hsl));--dh-color-cyan-1000: hsl(var(--dh-color-cyan-1000-hsl));--dh-color-cyan-1100: hsl(var(--dh-color-cyan-1100-hsl));--dh-color-cyan-1200: hsl(var(--dh-color-cyan-1200-hsl));--dh-color-cyan-1300: hsl(var(--dh-color-cyan-1300-hsl));--dh-color-cyan-1400: hsl(var(--dh-color-cyan-1400-hsl));--dh-color-indigo-100: hsl(var(--dh-color-indigo-100-hsl));--dh-color-indigo-200: hsl(var(--dh-color-indigo-200-hsl));--dh-color-indigo-300: hsl(var(--dh-color-indigo-300-hsl));--dh-color-indigo-400: hsl(var(--dh-color-indigo-400-hsl));--dh-color-indigo-500: hsl(var(--dh-color-indigo-500-hsl));--dh-color-indigo-600: hsl(var(--dh-color-indigo-600-hsl));--dh-color-indigo-700: hsl(var(--dh-color-indigo-700-hsl));--dh-color-indigo-800: hsl(var(--dh-color-indigo-800-hsl));--dh-color-indigo-900: hsl(var(--dh-color-indigo-900-hsl));--dh-color-indigo-1000: hsl(var(--dh-color-indigo-1000-hsl));--dh-color-indigo-1100: hsl(var(--dh-color-indigo-1100-hsl));--dh-color-indigo-1200: hsl(var(--dh-color-indigo-1200-hsl));--dh-color-indigo-1300: hsl(var(--dh-color-indigo-1300-hsl));--dh-color-indigo-1400: hsl(var(--dh-color-indigo-1400-hsl));--dh-color-purple-100: hsl(var(--dh-color-purple-100-hsl));--dh-color-purple-200: hsl(var(--dh-color-purple-200-hsl));--dh-color-purple-300: hsl(var(--dh-color-purple-300-hsl));--dh-color-purple-400: hsl(var(--dh-color-purple-400-hsl));--dh-color-purple-500: hsl(var(--dh-color-purple-500-hsl));--dh-color-purple-600: hsl(var(--dh-color-purple-600-hsl));--dh-color-purple-700: hsl(var(--dh-color-purple-700-hsl));--dh-color-purple-800: hsl(var(--dh-color-purple-800-hsl));--dh-color-purple-900: hsl(var(--dh-color-purple-900-hsl));--dh-color-purple-1000: hsl(var(--dh-color-purple-1000-hsl));--dh-color-purple-1100: hsl(var(--dh-color-purple-1100-hsl));--dh-color-purple-1200: hsl(var(--dh-color-purple-1200-hsl));--dh-color-purple-1300: hsl(var(--dh-color-purple-1300-hsl));--dh-color-purple-1400: hsl(var(--dh-color-purple-1400-hsl));--dh-color-fuchsia-100: hsl(var(--dh-color-fuchsia-100-hsl));--dh-color-fuchsia-200: hsl(var(--dh-color-fuchsia-200-hsl));--dh-color-fuchsia-300: hsl(var(--dh-color-fuchsia-300-hsl));--dh-color-fuchsia-400: hsl(var(--dh-color-fuchsia-400-hsl));--dh-color-fuchsia-500: hsl(var(--dh-color-fuchsia-500-hsl));--dh-color-fuchsia-600: hsl(var(--dh-color-fuchsia-600-hsl));--dh-color-fuchsia-700: hsl(var(--dh-color-fuchsia-700-hsl));--dh-color-fuchsia-800: hsl(var(--dh-color-fuchsia-800-hsl));--dh-color-fuchsia-900: hsl(var(--dh-color-fuchsia-900-hsl));--dh-color-fuchsia-1000: hsl(var(--dh-color-fuchsia-1000-hsl));--dh-color-fuchsia-1100: hsl(var(--dh-color-fuchsia-1100-hsl));--dh-color-fuchsia-1200: hsl(var(--dh-color-fuchsia-1200-hsl));--dh-color-fuchsia-1300: hsl(var(--dh-color-fuchsia-1300-hsl));--dh-color-fuchsia-1400: hsl(var(--dh-color-fuchsia-1400-hsl));--dh-color-magenta-100: hsl(var(--dh-color-magenta-100-hsl));--dh-color-magenta-200: hsl(var(--dh-color-magenta-200-hsl));--dh-color-magenta-300: hsl(var(--dh-color-magenta-300-hsl));--dh-color-magenta-400: hsl(var(--dh-color-magenta-400-hsl));--dh-color-magenta-500: hsl(var(--dh-color-magenta-500-hsl));--dh-color-magenta-600: hsl(var(--dh-color-magenta-600-hsl));--dh-color-magenta-700: hsl(var(--dh-color-magenta-700-hsl));--dh-color-magenta-800: hsl(var(--dh-color-magenta-800-hsl));--dh-color-magenta-900: hsl(var(--dh-color-magenta-900-hsl));--dh-color-magenta-1000: hsl(var(--dh-color-magenta-1000-hsl));--dh-color-magenta-1100: hsl(var(--dh-color-magenta-1100-hsl));--dh-color-magenta-1200: hsl(var(--dh-color-magenta-1200-hsl));--dh-color-magenta-1300: hsl(var(--dh-color-magenta-1300-hsl));--dh-color-magenta-1400: hsl(var(--dh-color-magenta-1400-hsl))}/*# sourceMappingURL=theme-dark-palette.css.map */
|