@deephaven/components 0.49.1 → 0.49.2-theme-plugins.29

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.
Files changed (75) hide show
  1. package/css/BaseStyleSheet.css +4 -3
  2. package/css/BaseStyleSheet.css.map +1 -1
  3. package/dist/AutoCompleteInput.css.map +1 -1
  4. package/dist/ComboBox.css.map +1 -1
  5. package/dist/CustomTimeSelect.css.map +1 -1
  6. package/dist/DraggableItemList.css.map +1 -1
  7. package/dist/EditableItemList.d.ts.map +1 -1
  8. package/dist/EditableItemList.js +2 -1
  9. package/dist/EditableItemList.js.map +1 -1
  10. package/dist/HierarchicalCheckboxMenu.css.map +1 -1
  11. package/dist/ItemList.css.map +1 -1
  12. package/dist/ItemListItem.css.map +1 -1
  13. package/dist/LoadingOverlay.css +5 -0
  14. package/dist/LoadingOverlay.css.map +1 -1
  15. package/dist/LoadingOverlay.d.ts.map +1 -1
  16. package/dist/LoadingOverlay.js +1 -0
  17. package/dist/LoadingOverlay.js.map +1 -1
  18. package/dist/LoadingSpinner.css +45 -3
  19. package/dist/LoadingSpinner.css.map +1 -1
  20. package/dist/LoadingSpinner.d.ts.map +1 -1
  21. package/dist/LoadingSpinner.js +13 -14
  22. package/dist/LoadingSpinner.js.map +1 -1
  23. package/dist/MaskedInput.css.map +1 -1
  24. package/dist/SearchInput.css.map +1 -1
  25. package/dist/SelectValueList.css.map +1 -1
  26. package/dist/SocketedButton.css.map +1 -1
  27. package/dist/ThemeExport.module.css.map +1 -1
  28. package/dist/TimeSlider.css.map +1 -1
  29. package/dist/TimeSlider.module.css.map +1 -1
  30. package/dist/ToastNotification.css.map +1 -1
  31. package/dist/UISwitch.css.map +1 -1
  32. package/dist/ValidateLabelInput.css.map +1 -1
  33. package/dist/context-actions/ContextActions.css.map +1 -1
  34. package/dist/context-actions/ContextMenu.js +3 -1
  35. package/dist/context-actions/ContextMenu.js.map +1 -1
  36. package/dist/declaration.d.js.map +1 -1
  37. package/dist/index.d.ts +1 -0
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +1 -0
  40. package/dist/index.js.map +1 -1
  41. package/dist/menu-actions/DropdownMenu.css.map +1 -1
  42. package/dist/navigation/MenuItem.css.map +1 -1
  43. package/dist/navigation/Page.css.map +1 -1
  44. package/dist/navigation/Stack.css.map +1 -1
  45. package/dist/popper/Popper.css.map +1 -1
  46. package/dist/theme/ThemeContext.d.ts +11 -0
  47. package/dist/theme/ThemeContext.d.ts.map +1 -0
  48. package/dist/theme/ThemeContext.js +4 -0
  49. package/dist/theme/ThemeContext.js.map +1 -0
  50. package/dist/theme/ThemeModel.d.ts +25 -0
  51. package/dist/theme/ThemeModel.d.ts.map +1 -0
  52. package/dist/theme/ThemeModel.js +12 -0
  53. package/dist/theme/ThemeModel.js.map +1 -0
  54. package/dist/theme/ThemeUtils.d.ts +37 -0
  55. package/dist/theme/ThemeUtils.d.ts.map +1 -0
  56. package/dist/theme/ThemeUtils.js +100 -0
  57. package/dist/theme/ThemeUtils.js.map +1 -0
  58. package/dist/theme/index.d.ts +6 -0
  59. package/dist/theme/index.d.ts.map +1 -0
  60. package/dist/theme/index.js +6 -0
  61. package/dist/theme/index.js.map +1 -0
  62. package/dist/theme/useInitializeThemeContextValue.d.ts +7 -0
  63. package/dist/theme/useInitializeThemeContextValue.d.ts.map +1 -0
  64. package/dist/theme/useInitializeThemeContextValue.js +46 -0
  65. package/dist/theme/useInitializeThemeContextValue.js.map +1 -0
  66. package/dist/theme/useTheme.d.ts +7 -0
  67. package/dist/theme/useTheme.d.ts.map +1 -0
  68. package/dist/theme/useTheme.js +10 -0
  69. package/dist/theme/useTheme.js.map +1 -0
  70. package/package.json +7 -7
  71. package/scss/BaseStyleSheet.scss +21 -8
  72. package/scss/bootstrap_overrides.scss +14 -4
  73. package/scss/new_variables.scss +10 -3
  74. package/scss/theme_default_dark.scss +54 -0
  75. package/scss/theme_default_light.scss +54 -0
@@ -0,0 +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 ThemePreloadStyleContent = `:root{${string}`;\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 = {\n '--dh-accent-color': '#4c7dee', // dark theme --dh-color-blue-700\n '--dh-background-color': '#1a171a', // dark theme --dh-color-gray-50\n} satisfies Record<`--dh-${string}`, string>;\n\nexport const THEME_CACHE_LOCAL_STORAGE_KEY = 'deephaven.themeCache';\n\nexport interface ThemePreloadData {\n themeKey: string;\n preloadStyleContent?: ThemePreloadStyleContent;\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":"AAIA,OAAO,IAAMA,sBAAsB,GAAG,cAAqC;AAC3E,OAAO,IAAMC,uBAAuB,GAAG,eAAsC;;AAE7E;AACA,OAAO,IAAMC,8BAA8B,GAAG;EAC5C,mBAAmB,EAAE,SAAS;EAAE;EAChC,uBAAuB,EAAE,SAAS,CAAE;AACtC,CAA4C;;AAE5C,OAAO,IAAMC,6BAA6B,GAAG,sBAAsB"}
@@ -0,0 +1,37 @@
1
+ import { ThemeData, ThemePreloadData, ThemePreloadStyleContent, ThemeRegistrationData } from './ThemeModel';
2
+ /**
3
+ * Creates a string containing preload style content for the current theme.
4
+ * This resolves the current values of a few CSS variables that can be used
5
+ * to style the page before the theme is loaded on next page load.
6
+ */
7
+ export declare function calculatePreloadStyleContent(): ThemePreloadStyleContent;
8
+ /**
9
+ * Returns an array of the active themes. The first item will always be one
10
+ * of the base themes. Optionally, the second item will be a custom theme.
11
+ */
12
+ export declare function getActiveThemes(themeKey: string, themeRegistration: ThemeRegistrationData): [ThemeData] | [ThemeData, ThemeData];
13
+ /**
14
+ * Get default base theme data.
15
+ */
16
+ export declare function getDefaultBaseThemes(): ThemeData[];
17
+ /**
18
+ * Get the preload data from local storage or null if it does not exist or is
19
+ * invalid
20
+ */
21
+ export declare function getThemePreloadData(): ThemePreloadData | null;
22
+ /**
23
+ * Store theme preload data in local storage.
24
+ * @param preloadData The preload data to set
25
+ */
26
+ export declare function setThemePreloadData(preloadData: ThemePreloadData): void;
27
+ /**
28
+ * Derive unique theme key from plugin root path and theme name.
29
+ * @param pluginName The root path of the plugin
30
+ * @param themeName The name of the theme
31
+ */
32
+ export declare function getThemeKey(pluginName: string, themeName: string): string;
33
+ /**
34
+ * Preload minimal theme variables from the cache.
35
+ */
36
+ export declare function preloadTheme(): void;
37
+ //# sourceMappingURL=ThemeUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeUtils.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeUtils.ts"],"names":[],"mappings":"AAIA,OAAO,EAIL,SAAS,EACT,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EAEtB,MAAM,cAAc,CAAC;AAItB;;;;GAIG;AACH,wBAAgB,4BAA4B,IAAI,wBAAwB,CAWvE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,qBAAqB,GACvC,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,EAAE,SAAS,CAAC,CA4BtC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,SAAS,EAAE,CAalD;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,gBAAgB,GAAG,IAAI,CAU7D;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"}
@@ -0,0 +1,100 @@
1
+ import Log from '@deephaven/log';
2
+ import { assertNotNull } from '@deephaven/utils';
3
+ import darkTheme from "../../scss/theme_default_dark.scss?inline.js";
4
+ import lightTheme from "../../scss/theme_default_light.scss?inline.js";
5
+ import { DEFAULT_DARK_THEME_KEY, DEFAULT_LIGHT_THEME_KEY, DEFAULT_PRELOAD_DATA_VARIABLES, THEME_CACHE_LOCAL_STORAGE_KEY } from "./ThemeModel.js";
6
+ var log = Log.module('ThemeUtils');
7
+
8
+ /**
9
+ * Creates a string containing preload style content for the current theme.
10
+ * This resolves the current values of a few CSS variables that can be used
11
+ * to style the page before the theme is loaded on next page load.
12
+ */
13
+ export function calculatePreloadStyleContent() {
14
+ var bodyStyle = getComputedStyle(document.body);
15
+
16
+ // Calculate the current preload variables. If the variable is not set, use
17
+ // the default value.
18
+ var pairs = Object.entries(DEFAULT_PRELOAD_DATA_VARIABLES).map(_ref => {
19
+ var [key, defaultValue] = _ref;
20
+ return "".concat(key, ":").concat(bodyStyle.getPropertyValue(key) || defaultValue);
21
+ });
22
+ return ":root{".concat(pairs.join(';'), "}");
23
+ }
24
+
25
+ /**
26
+ * Returns an array of the active themes. The first item will always be one
27
+ * of the base themes. Optionally, the second item will be a custom theme.
28
+ */
29
+ export function getActiveThemes(themeKey, themeRegistration) {
30
+ var _custom$baseThemeKey;
31
+ var custom = themeRegistration.custom.find(theme => theme.themeKey === themeKey);
32
+ var baseThemeKey = (_custom$baseThemeKey = custom === null || custom === void 0 ? void 0 : custom.baseThemeKey) !== null && _custom$baseThemeKey !== void 0 ? _custom$baseThemeKey : themeKey;
33
+ var base = themeRegistration.base.find(theme => theme.themeKey === baseThemeKey);
34
+ if (base == null) {
35
+ log.error("No registered base theme found for theme key: '".concat(baseThemeKey, "'"));
36
+ base = themeRegistration.base.find(theme => theme.themeKey === DEFAULT_DARK_THEME_KEY);
37
+ assertNotNull(base, "Default base theme '".concat(DEFAULT_DARK_THEME_KEY, "' is not registered"));
38
+ }
39
+ log.debug('Applied themes:', base.themeKey, custom === null || custom === void 0 ? void 0 : custom.themeKey);
40
+ return custom == null ? [base] : [base, custom];
41
+ }
42
+
43
+ /**
44
+ * Get default base theme data.
45
+ */
46
+ export function getDefaultBaseThemes() {
47
+ return [{
48
+ name: 'Default Dark',
49
+ themeKey: DEFAULT_DARK_THEME_KEY,
50
+ styleContent: darkTheme
51
+ }, {
52
+ name: 'Default Light',
53
+ themeKey: DEFAULT_LIGHT_THEME_KEY,
54
+ styleContent: lightTheme
55
+ }];
56
+ }
57
+
58
+ /**
59
+ * Get the preload data from local storage or null if it does not exist or is
60
+ * invalid
61
+ */
62
+ export function getThemePreloadData() {
63
+ var data = localStorage.getItem(THEME_CACHE_LOCAL_STORAGE_KEY);
64
+ try {
65
+ return data == null ? null : JSON.parse(data);
66
+ } catch (_unused) {
67
+ // ignore
68
+ }
69
+ return null;
70
+ }
71
+
72
+ /**
73
+ * Store theme preload data in local storage.
74
+ * @param preloadData The preload data to set
75
+ */
76
+ export function setThemePreloadData(preloadData) {
77
+ localStorage.setItem(THEME_CACHE_LOCAL_STORAGE_KEY, JSON.stringify(preloadData));
78
+ }
79
+
80
+ /**
81
+ * Derive unique theme key from plugin root path and theme name.
82
+ * @param pluginName The root path of the plugin
83
+ * @param themeName The name of the theme
84
+ */
85
+ export function getThemeKey(pluginName, themeName) {
86
+ return "".concat(pluginName, "_").concat(themeName);
87
+ }
88
+
89
+ /**
90
+ * Preload minimal theme variables from the cache.
91
+ */
92
+ export function preloadTheme() {
93
+ var _getThemePreloadData$, _getThemePreloadData;
94
+ var preloadStyleContent = (_getThemePreloadData$ = (_getThemePreloadData = getThemePreloadData()) === null || _getThemePreloadData === void 0 ? void 0 : _getThemePreloadData.preloadStyleContent) !== null && _getThemePreloadData$ !== void 0 ? _getThemePreloadData$ : calculatePreloadStyleContent();
95
+ log.debug('Preloading theme content:', "'".concat(preloadStyleContent, "'"));
96
+ var style = document.createElement('style');
97
+ style.innerHTML = preloadStyleContent;
98
+ document.head.appendChild(style);
99
+ }
100
+ //# sourceMappingURL=ThemeUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeUtils.js","names":["Log","assertNotNull","darkTheme","lightTheme","DEFAULT_DARK_THEME_KEY","DEFAULT_LIGHT_THEME_KEY","DEFAULT_PRELOAD_DATA_VARIABLES","THEME_CACHE_LOCAL_STORAGE_KEY","log","module","calculatePreloadStyleContent","bodyStyle","getComputedStyle","document","body","pairs","Object","entries","map","key","defaultValue","getPropertyValue","join","getActiveThemes","themeKey","themeRegistration","custom","find","theme","baseThemeKey","base","error","debug","getDefaultBaseThemes","name","styleContent","getThemePreloadData","data","localStorage","getItem","JSON","parse","setThemePreloadData","preloadData","setItem","stringify","getThemeKey","pluginName","themeName","preloadTheme","preloadStyleContent","style","createElement","innerHTML","head","appendChild"],"sources":["../../src/theme/ThemeUtils.ts"],"sourcesContent":["import Log from '@deephaven/log';\nimport { assertNotNull } from '@deephaven/utils';\nimport darkTheme from '../../scss/theme_default_dark.scss?inline';\nimport lightTheme from '../../scss/theme_default_light.scss?inline';\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\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 * 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 );\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: darkTheme,\n },\n {\n name: 'Default Light',\n themeKey: DEFAULT_LIGHT_THEME_KEY,\n styleContent: lightTheme,\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 * 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":"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"}
@@ -0,0 +1,6 @@
1
+ export * from './ThemeContext';
2
+ export * from './ThemeModel';
3
+ export * from './ThemeUtils';
4
+ export * from './useInitializeThemeContextValue';
5
+ export * from './useTheme';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,kCAAkC,CAAC;AACjD,cAAc,YAAY,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from "./ThemeContext.js";
2
+ export * from "./ThemeModel.js";
3
+ export * from "./ThemeUtils.js";
4
+ export * from "./useInitializeThemeContextValue.js";
5
+ export * from "./useTheme.js";
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/theme/index.ts"],"sourcesContent":["export * from './ThemeContext';\nexport * from './ThemeModel';\nexport * from './ThemeUtils';\nexport * from './useInitializeThemeContextValue';\nexport * from './useTheme';\n"],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { ThemeContextValue } from './ThemeContext';
2
+ /**
3
+ * Initialize a `ThemeContextValue`.
4
+ */
5
+ export declare function useInitializeThemeContextValue(): ThemeContextValue;
6
+ export default useInitializeThemeContextValue;
7
+ //# sourceMappingURL=useInitializeThemeContextValue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInitializeThemeContextValue.d.ts","sourceRoot":"","sources":["../../src/theme/useInitializeThemeContextValue.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAWnD;;GAEG;AACH,wBAAgB,8BAA8B,IAAI,iBAAiB,CAsDlE;AAED,eAAe,8BAA8B,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { useCallback, useEffect, useMemo, useState } from 'react';
2
+ import Log from '@deephaven/log';
3
+ import { DEFAULT_DARK_THEME_KEY } from "./ThemeModel.js";
4
+ import { calculatePreloadStyleContent, getActiveThemes, getThemePreloadData, setThemePreloadData } from "./ThemeUtils.js";
5
+ var log = Log.module('useInitializeThemeContextValue');
6
+
7
+ /**
8
+ * Initialize a `ThemeContextValue`.
9
+ */
10
+ export function useInitializeThemeContextValue() {
11
+ var [selectedThemeKey, setSelectedThemeKey] = useState(() => {
12
+ var _getThemePreloadData$, _getThemePreloadData;
13
+ return (_getThemePreloadData$ = (_getThemePreloadData = getThemePreloadData()) === null || _getThemePreloadData === void 0 ? void 0 : _getThemePreloadData.themeKey) !== null && _getThemePreloadData$ !== void 0 ? _getThemePreloadData$ : DEFAULT_DARK_THEME_KEY;
14
+ });
15
+ var [themeRegistration, setThemeRegistration] = useState(null);
16
+ var activeThemes = useMemo(() => themeRegistration == null ? null : getActiveThemes(selectedThemeKey, themeRegistration), [selectedThemeKey, themeRegistration]);
17
+
18
+ /**
19
+ * Register the given custom themes with the cache and activate theming.
20
+ */
21
+ var registerThemes = useCallback(themeRegistrationData => {
22
+ log.debug('Registering themes', themeRegistrationData);
23
+ setThemeRegistration(themeRegistrationData);
24
+ }, []);
25
+
26
+ // Once themes are activated, cache the preload data for next time page is
27
+ // refreshed.
28
+ useEffect(() => {
29
+ if (activeThemes == null) {
30
+ return;
31
+ }
32
+ log.debug('Active themes:', activeThemes.map(theme => theme.themeKey));
33
+ setThemePreloadData({
34
+ themeKey: selectedThemeKey,
35
+ preloadStyleContent: calculatePreloadStyleContent()
36
+ });
37
+ }, [activeThemes, selectedThemeKey, themeRegistration]);
38
+ return useMemo(() => ({
39
+ activeThemes,
40
+ selectedThemeKey,
41
+ registerThemes,
42
+ setSelectedThemeKey
43
+ }), [activeThemes, registerThemes, selectedThemeKey]);
44
+ }
45
+ export default useInitializeThemeContextValue;
46
+ //# sourceMappingURL=useInitializeThemeContextValue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInitializeThemeContextValue.js","names":["useCallback","useEffect","useMemo","useState","Log","DEFAULT_DARK_THEME_KEY","calculatePreloadStyleContent","getActiveThemes","getThemePreloadData","setThemePreloadData","log","module","useInitializeThemeContextValue","selectedThemeKey","setSelectedThemeKey","themeKey","themeRegistration","setThemeRegistration","activeThemes","registerThemes","themeRegistrationData","debug","map","theme","preloadStyleContent"],"sources":["../../src/theme/useInitializeThemeContextValue.ts"],"sourcesContent":["import { useCallback, useEffect, useMemo, useState } from 'react';\nimport Log from '@deephaven/log';\nimport { ThemeContextValue } from './ThemeContext';\nimport { DEFAULT_DARK_THEME_KEY, ThemeRegistrationData } from './ThemeModel';\nimport {\n calculatePreloadStyleContent,\n getActiveThemes,\n getThemePreloadData,\n setThemePreloadData,\n} from './ThemeUtils';\n\nconst log = Log.module('useInitializeThemeContextValue');\n\n/**\n * Initialize a `ThemeContextValue`.\n */\nexport function useInitializeThemeContextValue(): ThemeContextValue {\n const [selectedThemeKey, setSelectedThemeKey] = useState<string>(\n () => getThemePreloadData()?.themeKey ?? DEFAULT_DARK_THEME_KEY\n );\n\n const [themeRegistration, setThemeRegistration] =\n useState<ThemeRegistrationData | null>(null);\n\n const activeThemes = useMemo(\n () =>\n themeRegistration == null\n ? null\n : getActiveThemes(selectedThemeKey, themeRegistration),\n [selectedThemeKey, themeRegistration]\n );\n\n /**\n * Register the given custom themes with the cache and activate theming.\n */\n const registerThemes = useCallback(\n (themeRegistrationData: ThemeRegistrationData) => {\n log.debug('Registering themes', themeRegistrationData);\n setThemeRegistration(themeRegistrationData);\n },\n []\n );\n\n // Once themes are activated, cache the preload data for next time page is\n // refreshed.\n useEffect(() => {\n if (activeThemes == null) {\n return;\n }\n\n log.debug(\n 'Active themes:',\n activeThemes.map(theme => theme.themeKey)\n );\n\n setThemePreloadData({\n themeKey: selectedThemeKey,\n preloadStyleContent: calculatePreloadStyleContent(),\n });\n }, [activeThemes, selectedThemeKey, themeRegistration]);\n\n return useMemo(\n () => ({\n activeThemes,\n selectedThemeKey,\n registerThemes,\n setSelectedThemeKey,\n }),\n [activeThemes, registerThemes, selectedThemeKey]\n );\n}\n\nexport default useInitializeThemeContextValue;\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AACjE,OAAOC,GAAG,MAAM,gBAAgB;AAAC,SAExBC,sBAAsB;AAAA,SAE7BC,4BAA4B,EAC5BC,eAAe,EACfC,mBAAmB,EACnBC,mBAAmB;AAGrB,IAAMC,GAAG,GAAGN,GAAG,CAACO,MAAM,CAAC,gCAAgC,CAAC;;AAExD;AACA;AACA;AACA,OAAO,SAASC,8BAA8B,GAAsB;EAClE,IAAM,CAACC,gBAAgB,EAAEC,mBAAmB,CAAC,GAAGX,QAAQ,CACtD;IAAA;IAAA,wDAAMK,mBAAmB,EAAE,yDAArB,qBAAuBO,QAAQ,yEAAIV,sBAAsB;EAAA,EAChE;EAED,IAAM,CAACW,iBAAiB,EAAEC,oBAAoB,CAAC,GAC7Cd,QAAQ,CAA+B,IAAI,CAAC;EAE9C,IAAMe,YAAY,GAAGhB,OAAO,CAC1B,MACEc,iBAAiB,IAAI,IAAI,GACrB,IAAI,GACJT,eAAe,CAACM,gBAAgB,EAAEG,iBAAiB,CAAC,EAC1D,CAACH,gBAAgB,EAAEG,iBAAiB,CAAC,CACtC;;EAED;AACF;AACA;EACE,IAAMG,cAAc,GAAGnB,WAAW,CAC/BoB,qBAA4C,IAAK;IAChDV,GAAG,CAACW,KAAK,CAAC,oBAAoB,EAAED,qBAAqB,CAAC;IACtDH,oBAAoB,CAACG,qBAAqB,CAAC;EAC7C,CAAC,EACD,EAAE,CACH;;EAED;EACA;EACAnB,SAAS,CAAC,MAAM;IACd,IAAIiB,YAAY,IAAI,IAAI,EAAE;MACxB;IACF;IAEAR,GAAG,CAACW,KAAK,CACP,gBAAgB,EAChBH,YAAY,CAACI,GAAG,CAACC,KAAK,IAAIA,KAAK,CAACR,QAAQ,CAAC,CAC1C;IAEDN,mBAAmB,CAAC;MAClBM,QAAQ,EAAEF,gBAAgB;MAC1BW,mBAAmB,EAAElB,4BAA4B;IACnD,CAAC,CAAC;EACJ,CAAC,EAAE,CAACY,YAAY,EAAEL,gBAAgB,EAAEG,iBAAiB,CAAC,CAAC;EAEvD,OAAOd,OAAO,CACZ,OAAO;IACLgB,YAAY;IACZL,gBAAgB;IAChBM,cAAc;IACdL;EACF,CAAC,CAAC,EACF,CAACI,YAAY,EAAEC,cAAc,EAAEN,gBAAgB,CAAC,CACjD;AACH;AAEA,eAAeD,8BAA8B"}
@@ -0,0 +1,7 @@
1
+ import { ThemeContextValue } from './ThemeContext';
2
+ /**
3
+ * Hook to get the current `ThemeContextValue`.
4
+ */
5
+ export declare function useTheme(): ThemeContextValue;
6
+ export default useTheme;
7
+ //# sourceMappingURL=useTheme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/theme/useTheme.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEjE;;GAEG;AACH,wBAAgB,QAAQ,IAAI,iBAAiB,CAK5C;AAED,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { useContextOrThrow } from '@deephaven/react-hooks';
2
+ import { ThemeContext } from "./ThemeContext.js";
3
+ /**
4
+ * Hook to get the current `ThemeContextValue`.
5
+ */
6
+ export function useTheme() {
7
+ return useContextOrThrow(ThemeContext, 'No ThemeContext value found. Component must be wrapped in a ThemeContext.Provider');
8
+ }
9
+ export default useTheme;
10
+ //# sourceMappingURL=useTheme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTheme.js","names":["useContextOrThrow","ThemeContext","useTheme"],"sources":["../../src/theme/useTheme.ts"],"sourcesContent":["import { useContextOrThrow } from '@deephaven/react-hooks';\nimport { ThemeContext, ThemeContextValue } from './ThemeContext';\n\n/**\n * Hook to get the current `ThemeContextValue`.\n */\nexport function useTheme(): ThemeContextValue {\n return useContextOrThrow(\n ThemeContext,\n 'No ThemeContext value found. Component must be wrapped in a ThemeContext.Provider'\n );\n}\n\nexport default useTheme;\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,wBAAwB;AAAC,SAClDC,YAAY;AAErB;AACA;AACA;AACA,OAAO,SAASC,QAAQ,GAAsB;EAC5C,OAAOF,iBAAiB,CACtBC,YAAY,EACZ,mFAAmF,CACpF;AACH;AAEA,eAAeC,QAAQ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/components",
3
- "version": "0.49.1",
3
+ "version": "0.49.2-theme-plugins.29+dec7d960",
4
4
  "description": "Deephaven React component library",
5
5
  "author": "Deephaven Data Labs LLC",
6
6
  "license": "Apache-2.0",
@@ -24,10 +24,10 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@adobe/react-spectrum": "^3.29.0",
27
- "@deephaven/icons": "^0.49.0",
28
- "@deephaven/log": "^0.49.0",
29
- "@deephaven/react-hooks": "^0.49.0",
30
- "@deephaven/utils": "^0.49.0",
27
+ "@deephaven/icons": "^0.49.2-theme-plugins.29+dec7d960",
28
+ "@deephaven/log": "^0.49.2-theme-plugins.29+dec7d960",
29
+ "@deephaven/react-hooks": "^0.49.2-theme-plugins.29+dec7d960",
30
+ "@deephaven/utils": "^0.49.2-theme-plugins.29+dec7d960",
31
31
  "@fortawesome/fontawesome-svg-core": "^6.2.1",
32
32
  "@fortawesome/react-fontawesome": "^0.2.0",
33
33
  "@react-spectrum/theme-default": "^3.5.1",
@@ -51,7 +51,7 @@
51
51
  "react-dom": "^17.x"
52
52
  },
53
53
  "devDependencies": {
54
- "@deephaven/mocks": "^0.49.0"
54
+ "@deephaven/mocks": "^0.49.2-theme-plugins.29+dec7d960"
55
55
  },
56
56
  "files": [
57
57
  "dist",
@@ -64,5 +64,5 @@
64
64
  "publishConfig": {
65
65
  "access": "public"
66
66
  },
67
- "gitHead": "d14b58ca26fc5bdae33c60673aba4732262cc1f3"
67
+ "gitHead": "dec7d960df0ebffe5b4da380c0aa68f692df0514"
68
68
  }
@@ -20,7 +20,7 @@ html {
20
20
 
21
21
  body {
22
22
  min-height: 100%;
23
- background-color: $background;
23
+ background-color: var(--dh-background-color);
24
24
  color: $foreground;
25
25
  margin: 0;
26
26
  padding: 0;
@@ -30,7 +30,7 @@ body {
30
30
  }
31
31
 
32
32
  #root {
33
- background-color: $background;
33
+ background-color: var(--dh-background-color);
34
34
 
35
35
  .app {
36
36
  height: 100vh;
@@ -174,7 +174,8 @@ span.btn-disabled-wrapper {
174
174
 
175
175
  .btn-spinner {
176
176
  padding: $btn-padding-y 1rem;
177
- .fa-layers {
177
+ .fa-layers,
178
+ .loading-spinner {
178
179
  margin-right: 0.5rem;
179
180
  }
180
181
  }
@@ -255,7 +256,9 @@ span.btn-disabled-wrapper {
255
256
  border-radius: 2px;
256
257
  margin-bottom: 2px;
257
258
  filter: saturate(0%);
258
- transition: filter 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
259
+ transition:
260
+ filter 0.15s ease-in-out,
261
+ box-shadow 0.15s ease-in-out;
259
262
  pointer-events: none;
260
263
  }
261
264
 
@@ -712,7 +715,8 @@ input[type='number']::-webkit-inner-spin-button {
712
715
 
713
716
  .monaco-checkbox:focus {
714
717
  border: none !important;
715
- box-shadow: $input-btn-focus-box-shadow,
718
+ box-shadow:
719
+ $input-btn-focus-box-shadow,
716
720
  0 0 0 1px $input-focus-border-color; //can't use regular border due to position of checkbox
717
721
  }
718
722
  }
@@ -746,7 +750,9 @@ input[type='number']::-webkit-inner-spin-button {
746
750
  linear-gradient(0deg, $input-bg, $input-bg);
747
751
  background-size: $custom-select-bg-size, cover;
748
752
  background-repeat: no-repeat;
749
- background-position: bottom 50% right $custom-select-padding-x, center;
753
+ background-position:
754
+ bottom 50% right $custom-select-padding-x,
755
+ center;
750
756
  //make the dotted duplicate focus line on firefox go away
751
757
  &:-moz-focusring {
752
758
  color: rgba(0, 0, 0, 0%);
@@ -835,11 +841,18 @@ input[type='number']::-webkit-inner-spin-button {
835
841
  /// used by marching ants animation
836
842
  @keyframes march {
837
843
  from {
838
- background-position: 0 top, 0 bottom, left 0, right 0;
844
+ background-position:
845
+ 0 top,
846
+ 0 bottom,
847
+ left 0,
848
+ right 0;
839
849
  }
840
850
 
841
851
  to {
842
- background-position: $ant-size top, $ant-size bottom, left $ant-size,
852
+ background-position:
853
+ $ant-size top,
854
+ $ant-size bottom,
855
+ left $ant-size,
843
856
  right $ant-size;
844
857
  }
845
858
  }
@@ -95,8 +95,15 @@ $theme-color-interval: 9%;
95
95
  $yiq-contrasted-threshold: 180;
96
96
 
97
97
  // Override fonts
98
- $font-family-sans-serif: 'Fira Sans', -apple-system, blinkmacsystemfont,
99
- 'Segoe UI', 'Roboto', 'Helvetica Neue', arial, sans-serif; //fira sans then native system ui fallbacks
98
+ $font-family-sans-serif:
99
+ 'Fira Sans',
100
+ -apple-system,
101
+ blinkmacsystemfont,
102
+ 'Segoe UI',
103
+ 'Roboto',
104
+ 'Helvetica Neue',
105
+ arial,
106
+ sans-serif; //fira sans then native system ui fallbacks
100
107
  $font-family-monospace: 'Fira Mono', menlo, monaco, consolas, 'Liberation Mono',
101
108
  'Courier New', monospace;
102
109
  $font-family-base: $font-family-sans-serif;
@@ -126,8 +133,11 @@ $box-shadow-900: 0 0.1rem 1rem rgba(0, 0, 0, 45%); //darkest shadow for $black p
126
133
  //Override Btn
127
134
  $btn-border-radius: 4rem;
128
135
  $btn-padding-x: 1.5rem;
129
- $btn-transition: color 0.12s ease-in-out, background-color 0.12s ease-in-out,
130
- border-color 0.12s ease-in-out, box-shadow 0.12s ease-in-out; //default 0.15 is too long
136
+ $btn-transition:
137
+ color 0.12s ease-in-out,
138
+ background-color 0.12s ease-in-out,
139
+ border-color 0.12s ease-in-out,
140
+ box-shadow 0.12s ease-in-out; //default 0.15 is too long
131
141
  $btn-border-width: 2px;
132
142
 
133
143
  //Override Inputs
@@ -20,9 +20,16 @@ $ant-thickness: 1px;
20
20
  linear-gradient(to right, $color-2 50%, $color-1 50%),
21
21
  linear-gradient(to bottom, $color-2 50%, $color-1 50%),
22
22
  linear-gradient(to bottom, $color-2 50%, $color-1 50%);
23
- background-size: $ant-size $ant-thickness, $ant-size $ant-thickness,
24
- $ant-thickness $ant-size, $ant-thickness $ant-size;
25
- background-position: 0 top, 0 bottom, left 0, right 0;
23
+ background-size:
24
+ $ant-size $ant-thickness,
25
+ $ant-size $ant-thickness,
26
+ $ant-thickness $ant-size,
27
+ $ant-thickness $ant-size;
28
+ background-position:
29
+ 0 top,
30
+ 0 bottom,
31
+ left 0,
32
+ right 0;
26
33
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
27
34
  animation: march 0.5s;
28
35
  animation-timing-function: linear;
@@ -0,0 +1,54 @@
1
+ :root {
2
+ /* Grays */
3
+ --dh-color-gray-900: #fcfcfa;
4
+ --dh-color-gray-800: #f0f0ee;
5
+ --dh-color-gray-700: #c0bfbf;
6
+ --dh-color-gray-600: #929192;
7
+ --dh-color-gray-500: #5b5a5c;
8
+ --dh-color-gray-400: #403e41;
9
+ --dh-color-gray-300: #373438;
10
+ --dh-color-gray-200: #322f33;
11
+ --dh-color-gray-100: #2d2a2e;
12
+ --dh-color-gray-75: #211f22;
13
+ --dh-color-gray-50: #1a171a;
14
+
15
+ /* Blues */
16
+ --dh-color-blue-100: #112451;
17
+ --dh-color-blue-200: #16306c;
18
+ --dh-color-blue-300: #1d3d88;
19
+ --dh-color-blue-400: #254ba4;
20
+ --dh-color-blue-500: #2f5bc0;
21
+ --dh-color-blue-600: #3b6bda;
22
+ --dh-color-blue-700: #4c7dee;
23
+ --dh-color-blue-800: #6390fa;
24
+ --dh-color-blue-900: #7ca4ff;
25
+ --dh-color-blue-1000: #97b7ff;
26
+ --dh-color-blue-1100: #afc9ff;
27
+ --dh-color-blue-1200: #c7d9ff;
28
+ --dh-color-blue-1300: #dbe6ff;
29
+ --dh-color-blue-1400: #ecf1ff;
30
+
31
+ /* Seafoam */
32
+ --dh-color-seafoam-100: #1f2925;
33
+ --dh-color-seafoam-200: #263630;
34
+ --dh-color-seafoam-300: #2f463e;
35
+ --dh-color-seafoam-400: #37574b;
36
+ --dh-color-seafoam-500: #3e6959;
37
+ --dh-color-seafoam-600: #447b68;
38
+ --dh-color-seafoam-700: #488f78;
39
+ --dh-color-seafoam-800: #4ca387;
40
+ --dh-color-seafoam-900: #4fb797;
41
+ --dh-color-seafoam-1000: #54cba6;
42
+ --dh-color-seafoam-1100: #5edeb7;
43
+ --dh-color-seafoam-1200: #78edc7;
44
+ --dh-color-seafoam-1300: #9ef8d7;
45
+ --dh-color-seafoam-1400: #cbfce8;
46
+
47
+ /* Semantic */
48
+ --dh-color-black: var(--dh-color-gray-50);
49
+ --dh-color-white: var(--dh-color-gray-800);
50
+ --dh-accent-color: var(--dh-color-blue-700);
51
+ --dh-background-color: var(--dh-color-black);
52
+ --dh-foreground-color: var(--dh-color-white);
53
+ --dh-grid-background-color: var(--dh-background-color);
54
+ }
@@ -0,0 +1,54 @@
1
+ :root {
2
+ /* Grays */
3
+ --dh-color-gray-900: #000;
4
+ --dh-color-gray-800: #222;
5
+ --dh-color-gray-700: #464646;
6
+ --dh-color-gray-600: #6d6d6d;
7
+ --dh-color-gray-500: #909090;
8
+ --dh-color-gray-400: #b1b1b1;
9
+ --dh-color-gray-300: #d5d5d5;
10
+ --dh-color-gray-200: #e6e6e6;
11
+ --dh-color-gray-100: #f8f8f8;
12
+ --dh-color-gray-75: #fdfdfd;
13
+ --dh-color-gray-50: #fff;
14
+
15
+ /* Blues */
16
+ --dh-color-blue-100: #112451;
17
+ --dh-color-blue-200: #16306c;
18
+ --dh-color-blue-300: #1d3d88;
19
+ --dh-color-blue-400: #254ba4;
20
+ --dh-color-blue-500: #2f5bc0;
21
+ --dh-color-blue-600: #3b6bda;
22
+ --dh-color-blue-700: #4c7dee;
23
+ --dh-color-blue-800: #6390fa;
24
+ --dh-color-blue-900: #7ca4ff;
25
+ --dh-color-blue-1000: #97b7ff;
26
+ --dh-color-blue-1100: #afc9ff;
27
+ --dh-color-blue-1200: #c7d9ff;
28
+ --dh-color-blue-1300: #dbe6ff;
29
+ --dh-color-blue-1400: #ecf1ff;
30
+
31
+ /* Seafoam */
32
+ --dh-color-seafoam-100: #1f2925;
33
+ --dh-color-seafoam-200: #263630;
34
+ --dh-color-seafoam-300: #2f463e;
35
+ --dh-color-seafoam-400: #37574b;
36
+ --dh-color-seafoam-500: #3e6959;
37
+ --dh-color-seafoam-600: #447b68;
38
+ --dh-color-seafoam-700: #488f78;
39
+ --dh-color-seafoam-800: #4ca387;
40
+ --dh-color-seafoam-900: #4fb797;
41
+ --dh-color-seafoam-1000: #54cba6;
42
+ --dh-color-seafoam-1100: #5edeb7;
43
+ --dh-color-seafoam-1200: #78edc7;
44
+ --dh-color-seafoam-1300: #9ef8d7;
45
+ --dh-color-seafoam-1400: #cbfce8;
46
+
47
+ /* Semantic */
48
+ --dh-color-black: var(--dh-color-gray-50);
49
+ --dh-color-white: var(--dh-color-gray-75);
50
+ --dh-accent-color: var(--dh-color-blue-700);
51
+ --dh-background-color: var(--dh-color-white);
52
+ --dh-foreground-color: var(--dh-color-black);
53
+ --dh-grid-background-color: var(--dh-background-color);
54
+ }