@revolist/revogrid 4.24.2 → 4.25.0
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/dist/cjs/app-globals-Dmf-wvGw.js +8 -0
- package/dist/cjs/{cell-renderer-DnOCJ9ge.js → cell-renderer-Cf2Pu4S0.js} +3 -3
- package/dist/cjs/{column.drag.plugin-DSiFObaj.js → column.drag.plugin-E_K6cIAy.js} +101 -13
- package/dist/cjs/{column.service-CD70rNL2.js → column.service-C7p5eC5V.js} +1 -1
- package/dist/cjs/{dimension.helpers-CB5sNw5J.js → dimension.helpers-CgHhnN1d.js} +1 -1
- package/dist/cjs/{edit.utils-DDxnq9lw.js → edit.utils-rAcGublN.js} +1 -1
- package/dist/cjs/{filter.button-C4xpvyyE.js → filter.button-F2Bw3UAd.js} +1 -1
- package/dist/cjs/{header-cell-renderer-JXYFwayd.js → header-cell-renderer-DHClfIto.js} +2 -2
- package/dist/cjs/{index-BF6JDcMr.js → index--FdNLz1Z.js} +1 -1
- package/dist/cjs/{index-Dq8Xzj5l.js → index-DRvxCueo.js} +61 -20
- package/dist/cjs/index.cjs.js +556 -47
- package/dist/cjs/loader.cjs.js +3 -4
- package/dist/cjs/revo-grid.cjs.entry.js +256 -28
- package/dist/cjs/revo-grid.cjs.js +4 -5
- package/dist/cjs/revogr-attribution_7.cjs.entry.js +9 -9
- package/dist/cjs/revogr-clipboard_3.cjs.entry.js +6 -6
- package/dist/cjs/revogr-data_4.cjs.entry.js +8 -8
- package/dist/cjs/revogr-filter-panel.cjs.entry.js +19 -6
- package/dist/cjs/{text-editor-CvgloQdG.js → text-editor-F04kTx53.js} +2 -2
- package/dist/cjs/{viewport.store-Ci8H1bI9.js → viewport.store-B4Clk4m9.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -3
- package/dist/collection/components/editors/revogr-edit-style.css +2 -2
- package/dist/collection/components/header/revogr-header-style.css +2 -2
- package/dist/collection/components/overlay/revogr-overlay-style.css +9 -6
- package/dist/collection/components/revoGrid/revo-grid-style.css +451 -276
- package/dist/collection/components/revoGrid/revo-grid.js +106 -35
- package/dist/collection/components/scroll/revogr-viewport-scroll-style.css +6 -4
- package/dist/collection/components/selectionFocus/revogr-focus-style.css +1 -1
- package/dist/collection/components/selectionTempRange/revogr-temp-range-style.css +2 -2
- package/dist/collection/index.js +1 -0
- package/dist/collection/plugins/filter/filter.panel.js +36 -3
- package/dist/collection/plugins/filter/filter.plugin.js +21 -6
- package/dist/collection/plugins/filter/filter.style.css +43 -38
- package/dist/collection/serve/controller.js +18 -2
- package/dist/collection/themeManager/presets/aurora.js +89 -0
- package/dist/collection/themeManager/presets/high-contrast-dark.js +89 -0
- package/dist/collection/themeManager/presets/high-contrast.js +89 -0
- package/dist/collection/themeManager/presets/index.js +25 -0
- package/dist/collection/themeManager/presets/midnight.js +89 -0
- package/dist/collection/themeManager/presets/ocean.js +89 -0
- package/dist/collection/themeManager/presets/shared.js +64 -0
- package/dist/collection/themeManager/theme.service.js +141 -20
- package/dist/collection/types/theme.js +73 -1
- package/dist/esm/app-globals-CA4dvSNd.js +6 -0
- package/dist/{revo-grid/cell-renderer-BQjko1zB.js → esm/cell-renderer-11cf-lu3.js} +3 -3
- package/dist/{revo-grid/column.drag.plugin-Cf9DYdQj.js → esm/column.drag.plugin-DKgC_0I1.js} +100 -14
- package/dist/esm/{column.service-BnFqXqQG.js → column.service-Cfw3L0PN.js} +1 -1
- package/dist/esm/{dimension.helpers-CXrsUc6f.js → dimension.helpers-fl4HSSK9.js} +1 -1
- package/dist/esm/{edit.utils-CXmmCnxE.js → edit.utils-4e9fsqOR.js} +1 -1
- package/dist/esm/{filter.button-B-RBiF67.js → filter.button-DMhpuAiw.js} +1 -1
- package/dist/esm/{header-cell-renderer-B3mYpZD3.js → header-cell-renderer-Cqtg1ETB.js} +2 -2
- package/dist/esm/{index-Chp_81rd.js → index-CtimkLsB.js} +62 -20
- package/dist/esm/{index-DBqlJITb.js → index-D24ku9ej.js} +1 -1
- package/dist/esm/index.js +513 -13
- package/dist/esm/loader.js +4 -5
- package/dist/esm/revo-grid.entry.js +255 -27
- package/dist/esm/revo-grid.js +5 -6
- package/dist/esm/revogr-attribution_7.entry.js +9 -9
- package/dist/esm/revogr-clipboard_3.entry.js +6 -6
- package/dist/esm/revogr-data_4.entry.js +8 -8
- package/dist/esm/revogr-filter-panel.entry.js +19 -6
- package/dist/{revo-grid/text-editor-DQtz2Y7B.js → esm/text-editor-DlMnLkRK.js} +2 -2
- package/dist/{revo-grid/viewport.store-D5jEuhLq.js → esm/viewport.store-BSXmsiZc.js} +1 -1
- package/dist/revo-grid/app-globals-CA4dvSNd.js +6 -0
- package/dist/{esm/cell-renderer-BQjko1zB.js → revo-grid/cell-renderer-11cf-lu3.js} +3 -3
- package/dist/{esm/column.drag.plugin-Cf9DYdQj.js → revo-grid/column.drag.plugin-DKgC_0I1.js} +100 -14
- package/dist/revo-grid/{column.service-BnFqXqQG.js → column.service-Cfw3L0PN.js} +1 -1
- package/dist/revo-grid/{dimension.helpers-CXrsUc6f.js → dimension.helpers-fl4HSSK9.js} +1 -1
- package/dist/revo-grid/{edit.utils-CXmmCnxE.js → edit.utils-4e9fsqOR.js} +1 -1
- package/dist/revo-grid/{filter.button-B-RBiF67.js → filter.button-DMhpuAiw.js} +1 -1
- package/dist/revo-grid/{header-cell-renderer-B3mYpZD3.js → header-cell-renderer-Cqtg1ETB.js} +2 -2
- package/dist/revo-grid/{index-Chp_81rd.js → index-CtimkLsB.js} +62 -20
- package/dist/revo-grid/{index-DBqlJITb.js → index-D24ku9ej.js} +1 -1
- package/dist/revo-grid/index.esm.js +513 -13
- package/dist/revo-grid/revo-grid.entry.js +255 -27
- package/dist/revo-grid/revo-grid.esm.js +5 -6
- package/dist/revo-grid/revogr-attribution_7.entry.js +9 -9
- package/dist/revo-grid/revogr-clipboard_3.entry.js +6 -6
- package/dist/revo-grid/revogr-data_4.entry.js +8 -8
- package/dist/revo-grid/revogr-filter-panel.entry.js +19 -6
- package/dist/{esm/text-editor-DQtz2Y7B.js → revo-grid/text-editor-DlMnLkRK.js} +2 -2
- package/dist/{esm/viewport.store-D5jEuhLq.js → revo-grid/viewport.store-BSXmsiZc.js} +1 -1
- package/dist/types/components/revoGrid/revo-grid.d.ts +16 -4
- package/dist/types/components.d.ts +28 -7
- package/dist/types/index.d.ts +1 -0
- package/dist/types/plugins/filter/filter.panel.d.ts +4 -0
- package/dist/types/plugins/filter/filter.plugin.d.ts +1 -0
- package/dist/types/plugins/filter/filter.types.d.ts +5 -0
- package/dist/types/stencil-public-runtime.d.ts +1 -0
- package/dist/types/themeManager/presets/aurora.d.ts +8 -0
- package/dist/types/themeManager/presets/high-contrast-dark.d.ts +8 -0
- package/dist/types/themeManager/presets/high-contrast.d.ts +8 -0
- package/dist/types/themeManager/presets/index.d.ts +33 -0
- package/dist/types/themeManager/presets/midnight.d.ts +8 -0
- package/dist/types/themeManager/presets/ocean.d.ts +8 -0
- package/dist/types/themeManager/presets/shared.d.ts +81 -0
- package/dist/types/themeManager/theme.service.d.ts +9 -6
- package/dist/types/types/theme.d.ts +88 -1
- package/hydrate/index.js +1307 -597
- package/hydrate/index.mjs +1307 -597
- package/package.json +4 -4
- package/standalone/index.js +1 -1
- package/standalone/revo-grid.js +1 -1
- package/standalone/revogr-edit2.js +1 -1
- package/standalone/revogr-filter-panel.js +1 -1
- package/standalone/revogr-focus2.js +1 -1
- package/standalone/revogr-header2.js +1 -1
- package/standalone/revogr-overlay-selection2.js +1 -1
- package/standalone/revogr-temp-range2.js +1 -1
- package/standalone/revogr-viewport-scroll2.js +1 -1
- package/dist/cjs/app-globals-CPPhEXmy.js +0 -26
- package/dist/cjs/theme.service-BgnxGIjK.js +0 -72
- package/dist/collection/global/global.js +0 -18
- package/dist/collection/themeManager/theme.compact.js +0 -8
- package/dist/collection/themeManager/theme.default.js +0 -8
- package/dist/collection/themeManager/theme.material.js +0 -8
- package/dist/esm/app-globals-B_B_OtEa.js +0 -24
- package/dist/esm/theme.service-BmnDvr6P.js +0 -69
- package/dist/revo-grid/app-globals-B_B_OtEa.js +0 -24
- package/dist/revo-grid/theme.service-BmnDvr6P.js +0 -69
- package/dist/types/global/global.d.ts +0 -1
- package/dist/types/themeManager/theme.compact.d.ts +0 -4
- package/dist/types/themeManager/theme.default.d.ts +0 -4
- package/dist/types/themeManager/theme.material.d.ts +0 -4
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { generateFakeDataObjectAsync } from './data.js';
|
|
2
|
+
import { modernThemeDefinitions } from './build/index.esm.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Map of prevented events
|
|
@@ -296,12 +297,16 @@ globalThis.timerUpdate = function (checked, inteval = 3) {
|
|
|
296
297
|
*/
|
|
297
298
|
globalThis.theme = function (theme) {
|
|
298
299
|
const grid = document.querySelector('revo-grid');
|
|
299
|
-
|
|
300
|
+
const selectedTheme = theme || 'default';
|
|
301
|
+
const definition = modernThemeDefinitions.find(
|
|
302
|
+
item => item.name === selectedTheme,
|
|
303
|
+
);
|
|
304
|
+
if (definition?.colorScheme === 'dark' || selectedTheme.includes('dark')) {
|
|
300
305
|
document.documentElement.setAttribute('data-bs-theme', 'dark');
|
|
301
306
|
} else {
|
|
302
307
|
document.documentElement.removeAttribute('data-bs-theme');
|
|
303
308
|
}
|
|
304
|
-
grid.theme =
|
|
309
|
+
grid.theme = selectedTheme;
|
|
305
310
|
};
|
|
306
311
|
|
|
307
312
|
globalThis.onload = onLoad;
|
|
@@ -426,6 +431,7 @@ globalThis.setColumnGroupOffsetBugDemo = () => {
|
|
|
426
431
|
function onLoad() {
|
|
427
432
|
const grid = document.querySelector('revo-grid');
|
|
428
433
|
|
|
434
|
+
grid.themeDefinitions = modernThemeDefinitions;
|
|
429
435
|
grid.readonly = false;
|
|
430
436
|
grid.range = true;
|
|
431
437
|
grid.useClipboard = { rangeFill: true };
|
|
@@ -434,6 +440,16 @@ function onLoad() {
|
|
|
434
440
|
|
|
435
441
|
grid.exporting = true;
|
|
436
442
|
grid.rowHeaders = true;
|
|
443
|
+
const initialTheme = new URLSearchParams(location.search).get('theme');
|
|
444
|
+
if (initialTheme) {
|
|
445
|
+
globalThis.theme(initialTheme);
|
|
446
|
+
const themeOption = Array.from(
|
|
447
|
+
document.querySelectorAll('input[name="theme"]'),
|
|
448
|
+
).find(option => option.value === initialTheme);
|
|
449
|
+
if (themeOption) {
|
|
450
|
+
themeOption.checked = true;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
437
453
|
// grid.rowDefinitions = [{
|
|
438
454
|
// size: 200,
|
|
439
455
|
// type: 'rgRow',
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built by Revolist OU ❤️
|
|
3
|
+
*/
|
|
4
|
+
import { defineTheme } from "../../types/theme";
|
|
5
|
+
import { createPresetTokens } from "./shared";
|
|
6
|
+
const auroraFoundation = [
|
|
7
|
+
'#34d399',
|
|
8
|
+
'rgba(52, 211, 153, 0.88)',
|
|
9
|
+
'#071714',
|
|
10
|
+
'#ecfdf5',
|
|
11
|
+
'#285047',
|
|
12
|
+
'rgba(0, 0, 0, 0.5)',
|
|
13
|
+
'#d1fae5',
|
|
14
|
+
'#1c3d36',
|
|
15
|
+
];
|
|
16
|
+
const auroraGrid = [
|
|
17
|
+
'#0c2420',
|
|
18
|
+
'#ecfdf5',
|
|
19
|
+
'#245047',
|
|
20
|
+
null,
|
|
21
|
+
null,
|
|
22
|
+
'#17352f',
|
|
23
|
+
null,
|
|
24
|
+
'#103d34',
|
|
25
|
+
'#0d2e28',
|
|
26
|
+
'#0a201c',
|
|
27
|
+
'#86cbb8',
|
|
28
|
+
'rgba(110, 231, 183, 0.08)',
|
|
29
|
+
];
|
|
30
|
+
const auroraFilterPanel = [
|
|
31
|
+
'#0b201c',
|
|
32
|
+
'#285047',
|
|
33
|
+
'rgba(0, 0, 0, 0.52)',
|
|
34
|
+
'#12352e',
|
|
35
|
+
'#23483f',
|
|
36
|
+
'#37695d',
|
|
37
|
+
'#34d399',
|
|
38
|
+
'#2dd4bf',
|
|
39
|
+
'#86cbb8',
|
|
40
|
+
'#d1fae5',
|
|
41
|
+
'#86a89f',
|
|
42
|
+
'0 0 0 3px rgba(52, 211, 153, 0.2)',
|
|
43
|
+
'#86a89f',
|
|
44
|
+
'#5eead4',
|
|
45
|
+
];
|
|
46
|
+
const auroraTypography = [
|
|
47
|
+
'12px',
|
|
48
|
+
'42px',
|
|
49
|
+
'11px',
|
|
50
|
+
'650',
|
|
51
|
+
'uppercase',
|
|
52
|
+
'left',
|
|
53
|
+
'left',
|
|
54
|
+
'0 12px',
|
|
55
|
+
'0 12px',
|
|
56
|
+
];
|
|
57
|
+
const auroraSelection = [
|
|
58
|
+
'#34d399',
|
|
59
|
+
'rgba(52, 211, 153, 0.12)',
|
|
60
|
+
'#34d399',
|
|
61
|
+
'#071714',
|
|
62
|
+
'rgba(45, 212, 191, 0.22)',
|
|
63
|
+
'#fbbf24',
|
|
64
|
+
'#5eead4',
|
|
65
|
+
'#2dd4bf',
|
|
66
|
+
];
|
|
67
|
+
const auroraButtons = [
|
|
68
|
+
'#052e27',
|
|
69
|
+
'#34d399',
|
|
70
|
+
'#10b981',
|
|
71
|
+
'#fb7185',
|
|
72
|
+
'#37695d',
|
|
73
|
+
'#d1fae5',
|
|
74
|
+
];
|
|
75
|
+
/** Compact graphite and evergreen preset with luminous emerald states. */
|
|
76
|
+
export const auroraTheme = defineTheme({
|
|
77
|
+
name: 'aurora',
|
|
78
|
+
extends: 'darkCompact',
|
|
79
|
+
colorScheme: 'dark',
|
|
80
|
+
defaultRowSize: 34,
|
|
81
|
+
tokens: createPresetTokens({
|
|
82
|
+
foundation: auroraFoundation,
|
|
83
|
+
grid: auroraGrid,
|
|
84
|
+
filterPanel: auroraFilterPanel,
|
|
85
|
+
typography: auroraTypography,
|
|
86
|
+
selection: auroraSelection,
|
|
87
|
+
buttons: auroraButtons,
|
|
88
|
+
}),
|
|
89
|
+
});
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built by Revolist OU ❤️
|
|
3
|
+
*/
|
|
4
|
+
import { defineTheme } from "../../types/theme";
|
|
5
|
+
import { createPresetTokens } from "./shared";
|
|
6
|
+
const highContrastDarkFoundation = [
|
|
7
|
+
'#ffd400',
|
|
8
|
+
'rgba(255, 212, 0, 0.94)',
|
|
9
|
+
'#050505',
|
|
10
|
+
'#ffffff',
|
|
11
|
+
'#d1d5db',
|
|
12
|
+
'rgba(0, 0, 0, 0.8)',
|
|
13
|
+
'#ffffff',
|
|
14
|
+
'#bfc7d5',
|
|
15
|
+
];
|
|
16
|
+
const highContrastDarkGrid = [
|
|
17
|
+
'#171717',
|
|
18
|
+
'#ffffff',
|
|
19
|
+
'#e5e7eb',
|
|
20
|
+
'#005f73',
|
|
21
|
+
'#303030',
|
|
22
|
+
'#737b87',
|
|
23
|
+
'#737b87',
|
|
24
|
+
'#182c3f',
|
|
25
|
+
'#202a33',
|
|
26
|
+
'#222222',
|
|
27
|
+
'#ffffff',
|
|
28
|
+
'#303030',
|
|
29
|
+
];
|
|
30
|
+
const highContrastDarkFilterPanel = [
|
|
31
|
+
'#0a0a0a',
|
|
32
|
+
'#ffffff',
|
|
33
|
+
'rgba(0, 0, 0, 0.85)',
|
|
34
|
+
'#171717',
|
|
35
|
+
'#d1d5db',
|
|
36
|
+
'#e5e7eb',
|
|
37
|
+
'#ffd400',
|
|
38
|
+
'#00e5ff',
|
|
39
|
+
'#e5e7eb',
|
|
40
|
+
'#ffffff',
|
|
41
|
+
'#d1d5db',
|
|
42
|
+
'0 0 0 3px #ffd400',
|
|
43
|
+
'#e5e7eb',
|
|
44
|
+
'#ffd400',
|
|
45
|
+
];
|
|
46
|
+
const highContrastDarkTypography = [
|
|
47
|
+
'14px',
|
|
48
|
+
'48px',
|
|
49
|
+
'13px',
|
|
50
|
+
'700',
|
|
51
|
+
'none',
|
|
52
|
+
'left',
|
|
53
|
+
'left',
|
|
54
|
+
'0 14px',
|
|
55
|
+
'0 14px',
|
|
56
|
+
];
|
|
57
|
+
const highContrastDarkSelection = [
|
|
58
|
+
'#00e5ff',
|
|
59
|
+
'rgba(0, 229, 255, 0.2)',
|
|
60
|
+
'#ffd400',
|
|
61
|
+
'#000000',
|
|
62
|
+
'rgba(0, 229, 255, 0.32)',
|
|
63
|
+
'#ffd400',
|
|
64
|
+
'#ff7ad9',
|
|
65
|
+
'#ffd400',
|
|
66
|
+
];
|
|
67
|
+
const highContrastDarkButtons = [
|
|
68
|
+
'#000000',
|
|
69
|
+
'#ffd400',
|
|
70
|
+
'#7cfc00',
|
|
71
|
+
'#ff8080',
|
|
72
|
+
'#ffffff',
|
|
73
|
+
'#ffffff',
|
|
74
|
+
];
|
|
75
|
+
/** High-contrast dark preset with luminous yellow and cyan interaction states. */
|
|
76
|
+
export const highContrastDarkTheme = defineTheme({
|
|
77
|
+
name: 'highContrastDark',
|
|
78
|
+
extends: 'darkMaterial',
|
|
79
|
+
colorScheme: 'dark',
|
|
80
|
+
defaultRowSize: 40,
|
|
81
|
+
tokens: createPresetTokens({
|
|
82
|
+
foundation: highContrastDarkFoundation,
|
|
83
|
+
grid: highContrastDarkGrid,
|
|
84
|
+
filterPanel: highContrastDarkFilterPanel,
|
|
85
|
+
typography: highContrastDarkTypography,
|
|
86
|
+
selection: highContrastDarkSelection,
|
|
87
|
+
buttons: highContrastDarkButtons,
|
|
88
|
+
}),
|
|
89
|
+
});
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built by Revolist OU ❤️
|
|
3
|
+
*/
|
|
4
|
+
import { defineTheme } from "../../types/theme";
|
|
5
|
+
import { createPresetTokens } from "./shared";
|
|
6
|
+
const highContrastFoundation = [
|
|
7
|
+
'#003eaa',
|
|
8
|
+
'rgba(0, 62, 170, 0.92)',
|
|
9
|
+
'#ffffff',
|
|
10
|
+
'#000000',
|
|
11
|
+
'#374151',
|
|
12
|
+
'rgba(0, 0, 0, 0.35)',
|
|
13
|
+
'#111827',
|
|
14
|
+
'#374151',
|
|
15
|
+
];
|
|
16
|
+
const highContrastGrid = [
|
|
17
|
+
'#111827',
|
|
18
|
+
'#ffffff',
|
|
19
|
+
'#ffffff',
|
|
20
|
+
'#003eaa',
|
|
21
|
+
'#1f2937',
|
|
22
|
+
'#6b7280',
|
|
23
|
+
'#6b7280',
|
|
24
|
+
'#d6e9ff',
|
|
25
|
+
'#e8f2ff',
|
|
26
|
+
'#e5e7eb',
|
|
27
|
+
'#000000',
|
|
28
|
+
'#d1d5db',
|
|
29
|
+
];
|
|
30
|
+
const highContrastFilterPanel = [
|
|
31
|
+
'#ffffff',
|
|
32
|
+
'#111827',
|
|
33
|
+
'rgba(0, 0, 0, 0.4)',
|
|
34
|
+
'#ffffff',
|
|
35
|
+
'#4b5563',
|
|
36
|
+
'#111827',
|
|
37
|
+
'#003eaa',
|
|
38
|
+
'#003eaa',
|
|
39
|
+
'#374151',
|
|
40
|
+
'#000000',
|
|
41
|
+
'#374151',
|
|
42
|
+
'0 0 0 3px #ffbf00',
|
|
43
|
+
'#111827',
|
|
44
|
+
'#003eaa',
|
|
45
|
+
];
|
|
46
|
+
const highContrastTypography = [
|
|
47
|
+
'14px',
|
|
48
|
+
'48px',
|
|
49
|
+
'13px',
|
|
50
|
+
'700',
|
|
51
|
+
'none',
|
|
52
|
+
'left',
|
|
53
|
+
'left',
|
|
54
|
+
'0 14px',
|
|
55
|
+
'0 14px',
|
|
56
|
+
];
|
|
57
|
+
const highContrastSelection = [
|
|
58
|
+
'#003eaa',
|
|
59
|
+
'rgba(0, 95, 204, 0.2)',
|
|
60
|
+
'#003eaa',
|
|
61
|
+
'#ffffff',
|
|
62
|
+
'rgba(0, 95, 204, 0.3)',
|
|
63
|
+
'#a61b1b',
|
|
64
|
+
'#5b21b6',
|
|
65
|
+
'#ffbf00',
|
|
66
|
+
];
|
|
67
|
+
const highContrastButtons = [
|
|
68
|
+
'#ffffff',
|
|
69
|
+
'#003eaa',
|
|
70
|
+
'#006b3c',
|
|
71
|
+
'#b91c1c',
|
|
72
|
+
'#111827',
|
|
73
|
+
'#111827',
|
|
74
|
+
];
|
|
75
|
+
/** High-contrast light preset with dark structure and vivid blue focus states. */
|
|
76
|
+
export const highContrastTheme = defineTheme({
|
|
77
|
+
name: 'highContrast',
|
|
78
|
+
extends: 'material',
|
|
79
|
+
colorScheme: 'light',
|
|
80
|
+
defaultRowSize: 40,
|
|
81
|
+
tokens: createPresetTokens({
|
|
82
|
+
foundation: highContrastFoundation,
|
|
83
|
+
grid: highContrastGrid,
|
|
84
|
+
filterPanel: highContrastFilterPanel,
|
|
85
|
+
typography: highContrastTypography,
|
|
86
|
+
selection: highContrastSelection,
|
|
87
|
+
buttons: highContrastButtons,
|
|
88
|
+
}),
|
|
89
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built by Revolist OU ❤️
|
|
3
|
+
*/
|
|
4
|
+
export { oceanTheme } from './ocean';
|
|
5
|
+
export { midnightTheme } from './midnight';
|
|
6
|
+
export { auroraTheme } from './aurora';
|
|
7
|
+
export { highContrastTheme } from './high-contrast';
|
|
8
|
+
export { highContrastDarkTheme } from './high-contrast-dark';
|
|
9
|
+
import { oceanTheme } from "./ocean";
|
|
10
|
+
import { midnightTheme } from "./midnight";
|
|
11
|
+
import { auroraTheme } from "./aurora";
|
|
12
|
+
import { highContrastTheme } from "./high-contrast";
|
|
13
|
+
import { highContrastDarkTheme } from "./high-contrast-dark";
|
|
14
|
+
/** Accessible light and dark high-contrast choices. */
|
|
15
|
+
export const highContrastThemeDefinitions = [
|
|
16
|
+
highContrastTheme,
|
|
17
|
+
highContrastDarkTheme,
|
|
18
|
+
];
|
|
19
|
+
/** Ready-to-register modern presets. Presets remain opt-in and per grid. */
|
|
20
|
+
export const modernThemeDefinitions = [
|
|
21
|
+
oceanTheme,
|
|
22
|
+
midnightTheme,
|
|
23
|
+
auroraTheme,
|
|
24
|
+
...highContrastThemeDefinitions,
|
|
25
|
+
];
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built by Revolist OU ❤️
|
|
3
|
+
*/
|
|
4
|
+
import { defineTheme } from "../../types/theme";
|
|
5
|
+
import { createPresetTokens } from "./shared";
|
|
6
|
+
const midnightFoundation = [
|
|
7
|
+
'#8b5cf6',
|
|
8
|
+
'rgba(139, 92, 246, 0.9)',
|
|
9
|
+
'#0b1020',
|
|
10
|
+
'#f8fafc',
|
|
11
|
+
'#334155',
|
|
12
|
+
'rgba(0, 0, 0, 0.5)',
|
|
13
|
+
'#dbeafe',
|
|
14
|
+
'#25324d',
|
|
15
|
+
];
|
|
16
|
+
const midnightGrid = [
|
|
17
|
+
'#121a2f',
|
|
18
|
+
'#e2e8f0',
|
|
19
|
+
'#2a3855',
|
|
20
|
+
null,
|
|
21
|
+
null,
|
|
22
|
+
'#202c46',
|
|
23
|
+
null,
|
|
24
|
+
'#172554',
|
|
25
|
+
'#111c35',
|
|
26
|
+
'#10182b',
|
|
27
|
+
'#94a3b8',
|
|
28
|
+
'rgba(100, 116, 139, 0.12)',
|
|
29
|
+
];
|
|
30
|
+
const midnightFilterPanel = [
|
|
31
|
+
'#111827',
|
|
32
|
+
'#334155',
|
|
33
|
+
'rgba(0, 0, 0, 0.55)',
|
|
34
|
+
'#1e293b',
|
|
35
|
+
'#334155',
|
|
36
|
+
'#475569',
|
|
37
|
+
'#22d3ee',
|
|
38
|
+
'#22d3ee',
|
|
39
|
+
'#94a3b8',
|
|
40
|
+
'#e2e8f0',
|
|
41
|
+
'#94a3b8',
|
|
42
|
+
'0 0 0 3px rgba(34, 211, 238, 0.2)',
|
|
43
|
+
'#94a3b8',
|
|
44
|
+
'#22d3ee',
|
|
45
|
+
];
|
|
46
|
+
const midnightTypography = [
|
|
47
|
+
'13px',
|
|
48
|
+
'46px',
|
|
49
|
+
'12px',
|
|
50
|
+
'650',
|
|
51
|
+
'none',
|
|
52
|
+
'left',
|
|
53
|
+
'left',
|
|
54
|
+
'0 14px',
|
|
55
|
+
'0 14px',
|
|
56
|
+
];
|
|
57
|
+
const midnightSelection = [
|
|
58
|
+
'#22d3ee',
|
|
59
|
+
'rgba(34, 211, 238, 0.12)',
|
|
60
|
+
'#22d3ee',
|
|
61
|
+
'#0b1020',
|
|
62
|
+
'rgba(34, 211, 238, 0.24)',
|
|
63
|
+
'#f472b6',
|
|
64
|
+
'#a78bfa',
|
|
65
|
+
'#22d3ee',
|
|
66
|
+
];
|
|
67
|
+
const midnightButtons = [
|
|
68
|
+
'#ffffff',
|
|
69
|
+
'#7c3aed',
|
|
70
|
+
'#059669',
|
|
71
|
+
'#e11d48',
|
|
72
|
+
'#475569',
|
|
73
|
+
'#e2e8f0',
|
|
74
|
+
];
|
|
75
|
+
/** Deep navy preset with cyan selection and violet action accents. */
|
|
76
|
+
export const midnightTheme = defineTheme({
|
|
77
|
+
name: 'midnight',
|
|
78
|
+
extends: 'darkMaterial',
|
|
79
|
+
colorScheme: 'dark',
|
|
80
|
+
defaultRowSize: 40,
|
|
81
|
+
tokens: createPresetTokens({
|
|
82
|
+
foundation: midnightFoundation,
|
|
83
|
+
grid: midnightGrid,
|
|
84
|
+
filterPanel: midnightFilterPanel,
|
|
85
|
+
typography: midnightTypography,
|
|
86
|
+
selection: midnightSelection,
|
|
87
|
+
buttons: midnightButtons,
|
|
88
|
+
}),
|
|
89
|
+
});
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built by Revolist OU ❤️
|
|
3
|
+
*/
|
|
4
|
+
import { defineTheme } from "../../types/theme";
|
|
5
|
+
import { createPresetTokens } from "./shared";
|
|
6
|
+
const oceanFoundation = [
|
|
7
|
+
'#2563eb',
|
|
8
|
+
'rgba(37, 99, 235, 0.88)',
|
|
9
|
+
'#f8fafc',
|
|
10
|
+
'#0f172a',
|
|
11
|
+
'#cbd5e1',
|
|
12
|
+
'rgba(15, 23, 42, 0.16)',
|
|
13
|
+
'#334155',
|
|
14
|
+
'#d8e2ee',
|
|
15
|
+
];
|
|
16
|
+
const oceanGrid = [
|
|
17
|
+
'#eef4fb',
|
|
18
|
+
'#0f172a',
|
|
19
|
+
'#d7e2ee',
|
|
20
|
+
null,
|
|
21
|
+
null,
|
|
22
|
+
'#e5edf5',
|
|
23
|
+
null,
|
|
24
|
+
'#dbeafe',
|
|
25
|
+
'#eff6ff',
|
|
26
|
+
'#e7f0fa',
|
|
27
|
+
'#475569',
|
|
28
|
+
'#f1f5f9',
|
|
29
|
+
];
|
|
30
|
+
const oceanFilterPanel = [
|
|
31
|
+
'#ffffff',
|
|
32
|
+
'#dbe4ef',
|
|
33
|
+
'rgba(15, 23, 42, 0.18)',
|
|
34
|
+
'#f1f5f9',
|
|
35
|
+
'#e2e8f0',
|
|
36
|
+
'#cbd5e1',
|
|
37
|
+
'#2563eb',
|
|
38
|
+
'#2563eb',
|
|
39
|
+
'#64748b',
|
|
40
|
+
'#334155',
|
|
41
|
+
'#64748b',
|
|
42
|
+
'0 0 0 3px rgba(37, 99, 235, 0.2)',
|
|
43
|
+
'#64748b',
|
|
44
|
+
'#2563eb',
|
|
45
|
+
];
|
|
46
|
+
const oceanTypography = [
|
|
47
|
+
'13px',
|
|
48
|
+
'44px',
|
|
49
|
+
'12px',
|
|
50
|
+
'650',
|
|
51
|
+
'none',
|
|
52
|
+
'left',
|
|
53
|
+
'left',
|
|
54
|
+
'0 14px',
|
|
55
|
+
'0 14px',
|
|
56
|
+
];
|
|
57
|
+
const oceanSelection = [
|
|
58
|
+
'#2563eb',
|
|
59
|
+
'rgba(37, 99, 235, 0.1)',
|
|
60
|
+
'#2563eb',
|
|
61
|
+
'#ffffff',
|
|
62
|
+
'rgba(37, 99, 235, 0.22)',
|
|
63
|
+
'#f97316',
|
|
64
|
+
'#64748b',
|
|
65
|
+
'#3b82f6',
|
|
66
|
+
];
|
|
67
|
+
const oceanButtons = [
|
|
68
|
+
'#ffffff',
|
|
69
|
+
'#2563eb',
|
|
70
|
+
'#059669',
|
|
71
|
+
'#dc2626',
|
|
72
|
+
'#cbd5e1',
|
|
73
|
+
'#334155',
|
|
74
|
+
];
|
|
75
|
+
/** Bright blue and slate preset for data-heavy daytime interfaces. */
|
|
76
|
+
export const oceanTheme = defineTheme({
|
|
77
|
+
name: 'ocean',
|
|
78
|
+
extends: 'material',
|
|
79
|
+
colorScheme: 'light',
|
|
80
|
+
defaultRowSize: 38,
|
|
81
|
+
tokens: createPresetTokens({
|
|
82
|
+
foundation: oceanFoundation,
|
|
83
|
+
grid: oceanGrid,
|
|
84
|
+
filterPanel: oceanFilterPanel,
|
|
85
|
+
typography: oceanTypography,
|
|
86
|
+
selection: oceanSelection,
|
|
87
|
+
buttons: oceanButtons,
|
|
88
|
+
}),
|
|
89
|
+
});
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built by Revolist OU ❤️
|
|
3
|
+
*/
|
|
4
|
+
export const modernSystemFont = "Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif";
|
|
5
|
+
/** Maps compact, typed preset data to the public semantic theme-token contract. */
|
|
6
|
+
export function createPresetTokens({ foundation, grid, filterPanel, typography, selection, buttons, }) {
|
|
7
|
+
const [primary, primaryTransparent, background, foreground, divider, shadow, text, border,] = foundation;
|
|
8
|
+
const [headerBg, headerColor, headerBorder, headerFocusedBg, headerHoverBg, cellBorder, cellVerticalBorder, focusedBg, rowHover, rowHeadersBg, rowHeadersColor, cellDisabledBg,] = grid;
|
|
9
|
+
const [filterPanelBg, filterPanelBorder, filterPanelShadow, filterPanelInputBg, filterPanelDivider, filterPanelSelectBorder, filterPanelSelectBorderHover, filterPanelReorderAccent, filterPanelReorderColor, filterPanelText, filterPanelMutedText, filterPanelFocusRing, filterPanelIcon, filterPanelIconActive,] = filterPanel;
|
|
10
|
+
const [fontSize, headerHeight, headerFontSize, headerFontWeight, headerTextTransform, headerTextAlign, cellTextAlign, headerPadding, cellPadding,] = typography;
|
|
11
|
+
const [selectionBorder, selectionBg, autofillHandleBg, autofillHandleBorder, rangeHandleBg, temporaryRangeBorder, temporarySelectionBorder, headerResizeHover,] = selection;
|
|
12
|
+
const [buttonText, buttonBg, buttonSuccessBg, buttonDangerBg, buttonOutlineBorder, buttonOutlineText,] = buttons;
|
|
13
|
+
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ primary,
|
|
14
|
+
primaryTransparent,
|
|
15
|
+
background,
|
|
16
|
+
foreground,
|
|
17
|
+
divider,
|
|
18
|
+
shadow,
|
|
19
|
+
text,
|
|
20
|
+
border,
|
|
21
|
+
headerBg,
|
|
22
|
+
headerColor,
|
|
23
|
+
headerBorder }, (headerFocusedBg ? { headerFocusedBg } : {})), (headerHoverBg ? { headerHoverBg } : {})), { cellBorder }), (cellVerticalBorder ? { cellVerticalBorder } : {})), { focusedBg,
|
|
24
|
+
rowHover,
|
|
25
|
+
rowHeadersBg,
|
|
26
|
+
rowHeadersColor,
|
|
27
|
+
cellDisabledBg,
|
|
28
|
+
filterPanelBg,
|
|
29
|
+
filterPanelBorder,
|
|
30
|
+
filterPanelShadow,
|
|
31
|
+
filterPanelInputBg,
|
|
32
|
+
filterPanelDivider,
|
|
33
|
+
filterPanelSelectBorder,
|
|
34
|
+
filterPanelSelectBorderHover,
|
|
35
|
+
filterPanelReorderAccent,
|
|
36
|
+
filterPanelReorderColor,
|
|
37
|
+
filterPanelText,
|
|
38
|
+
filterPanelMutedText,
|
|
39
|
+
filterPanelFocusRing,
|
|
40
|
+
filterPanelIcon,
|
|
41
|
+
filterPanelIconActive, fontFamily: modernSystemFont, fontSize,
|
|
42
|
+
headerHeight,
|
|
43
|
+
headerFontSize,
|
|
44
|
+
headerFontWeight,
|
|
45
|
+
headerTextTransform,
|
|
46
|
+
headerTextAlign,
|
|
47
|
+
cellTextAlign,
|
|
48
|
+
headerPadding,
|
|
49
|
+
cellPadding,
|
|
50
|
+
selectionBorder,
|
|
51
|
+
selectionBg,
|
|
52
|
+
autofillHandleBg,
|
|
53
|
+
autofillHandleBorder,
|
|
54
|
+
rangeHandleBg,
|
|
55
|
+
temporaryRangeBorder,
|
|
56
|
+
temporarySelectionBorder,
|
|
57
|
+
headerResizeHover,
|
|
58
|
+
buttonText,
|
|
59
|
+
buttonBg,
|
|
60
|
+
buttonSuccessBg,
|
|
61
|
+
buttonDangerBg,
|
|
62
|
+
buttonOutlineBorder,
|
|
63
|
+
buttonOutlineText });
|
|
64
|
+
}
|