@dbcdk/react-components 0.0.195 → 0.0.196
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/README.md +78 -10
- package/dist/client.cjs +486 -614
- package/dist/client.d.ts +176 -102
- package/dist/client.js +102 -102
- package/dist/components/color-scheme-button/ColorSchemeButton.cjs +7 -4
- package/dist/components/color-scheme-button/ColorSchemeButton.d.ts +7 -3
- package/dist/components/color-scheme-button/ColorSchemeButton.js +7 -4
- package/dist/components/forms/text-area/Textarea.cjs +2 -1
- package/dist/components/forms/text-area/Textarea.d.ts +1 -0
- package/dist/components/forms/text-area/Textarea.js +2 -1
- package/dist/components/highlighted-text/HighlightedText.cjs +6 -3
- package/dist/components/highlighted-text/HighlightedText.js +7 -4
- package/dist/components/json-viewer/JsonNode.cjs +27 -67
- package/dist/components/json-viewer/JsonNode.d.ts +10 -0
- package/dist/components/json-viewer/JsonNode.js +28 -68
- package/dist/components/json-viewer/JsonRow.cjs +85 -0
- package/dist/components/json-viewer/JsonRow.d.ts +5 -0
- package/dist/components/json-viewer/JsonRow.js +79 -0
- package/dist/components/json-viewer/JsonViewer.cjs +36 -253
- package/dist/components/json-viewer/JsonViewer.js +37 -250
- package/dist/components/json-viewer/JsonViewerShell.cjs +208 -0
- package/dist/components/json-viewer/JsonViewerShell.d.ts +25 -0
- package/dist/components/json-viewer/JsonViewerShell.js +202 -0
- package/dist/components/json-viewer/TanstackJsonViewer.cjs +127 -0
- package/dist/components/json-viewer/TanstackJsonViewer.d.ts +17 -0
- package/dist/components/json-viewer/TanstackJsonViewer.js +121 -0
- package/dist/components/json-viewer/types.d.ts +27 -0
- package/dist/components/json-viewer/useJsonViewerState.cjs +111 -0
- package/dist/components/json-viewer/useJsonViewerState.d.ts +42 -0
- package/dist/components/json-viewer/useJsonViewerState.js +108 -0
- package/dist/components/json-viewer/utils.cjs +36 -0
- package/dist/components/json-viewer/utils.d.ts +21 -1
- package/dist/components/json-viewer/utils.js +35 -1
- package/dist/components/lightbox/Lightbox.cjs +2 -2
- package/dist/components/lightbox/Lightbox.d.ts +1 -1
- package/dist/components/lightbox/Lightbox.js +1 -1
- package/dist/components/menu/Menu.cjs +3 -23
- package/dist/components/menu/Menu.js +3 -23
- package/dist/components/menu/Menu.module.css +4 -3
- package/dist/components/metric-tile/MetricTile.cjs +3 -2
- package/dist/components/metric-tile/MetricTile.js +2 -1
- package/dist/components/overlay/tooltip/Tooltip.cjs +7 -2
- package/dist/components/overlay/tooltip/Tooltip.d.ts +7 -1
- package/dist/components/overlay/tooltip/Tooltip.js +7 -2
- package/dist/components/overlay/tooltip/useTooltipTrigger.cjs +7 -1
- package/dist/components/overlay/tooltip/useTooltipTrigger.js +7 -1
- package/dist/components/page-layout/PageLayout.module.css +1 -1
- package/dist/components/table/Table.cjs +45 -16
- package/dist/components/table/Table.d.ts +1 -1
- package/dist/components/table/Table.js +47 -18
- package/dist/components/table/Table.module.css +135 -7
- package/dist/components/table/Table.types.d.ts +47 -1
- package/dist/components/table/TanstackTable.cjs +30 -2
- package/dist/components/table/TanstackTable.js +31 -3
- package/dist/components/table/components/TableBody.d.ts +1 -2
- package/dist/components/table/components/TableHeader.cjs +6 -4
- package/dist/components/table/components/TableHeader.d.ts +2 -1
- package/dist/components/table/components/TableHeader.js +6 -4
- package/dist/components/table/components/TableHeaderCell.cjs +5 -4
- package/dist/components/table/components/TableHeaderCell.d.ts +3 -1
- package/dist/components/table/components/TableHeaderCell.js +5 -4
- package/dist/components/table/components/TableRow.cjs +1 -1
- package/dist/components/table/components/TableRow.d.ts +1 -2
- package/dist/components/table/components/TableRow.js +1 -1
- package/dist/components/table/components/TableSkeletonBody.cjs +30 -0
- package/dist/components/table/components/TableSkeletonBody.d.ts +13 -0
- package/dist/components/table/components/TableSkeletonBody.js +24 -0
- package/dist/components/table/components/table-settings/TableHeaderSettings.cjs +28 -0
- package/dist/components/table/components/table-settings/TableHeaderSettings.d.ts +11 -0
- package/dist/components/table/components/table-settings/TableHeaderSettings.js +26 -0
- package/dist/components/table/components/table-settings/TableSettings.cjs +82 -32
- package/dist/components/table/components/table-settings/TableSettings.d.ts +14 -6
- package/dist/components/table/components/table-settings/TableSettings.js +84 -34
- package/dist/components/table/table.utils.cjs +2 -0
- package/dist/components/table/table.utils.d.ts +6 -0
- package/dist/components/table/table.utils.js +2 -1
- package/dist/components/table/tableSettings.utils.cjs +29 -0
- package/dist/components/table/tableSettings.utils.d.ts +9 -0
- package/dist/components/table/tableSettings.utils.js +24 -0
- package/dist/components/table/tanstackTable.utils.cjs +18 -0
- package/dist/components/table/tanstackTable.utils.js +19 -1
- package/dist/components/theme-button/ThemeButton.cjs +9 -4
- package/dist/components/theme-button/ThemeButton.d.ts +4 -2
- package/dist/components/theme-button/ThemeButton.js +9 -4
- package/dist/components/theme-script/ThemeScript.cjs +10 -4
- package/dist/components/theme-script/ThemeScript.d.ts +9 -1
- package/dist/components/theme-script/ThemeScript.js +10 -4
- package/dist/hooks/useColorScheme.cjs +18 -14
- package/dist/hooks/useColorScheme.d.ts +11 -1
- package/dist/hooks/useColorScheme.js +19 -15
- package/dist/hooks/useGetActiveTheme.cjs +4 -3
- package/dist/hooks/useGetActiveTheme.d.ts +7 -1
- package/dist/hooks/useGetActiveTheme.js +4 -3
- package/dist/hooks/useTableData.cjs +11 -7
- package/dist/hooks/useTableData.d.ts +8 -2
- package/dist/hooks/useTableData.js +11 -7
- package/dist/hooks/useTableSettings.cjs +25 -9
- package/dist/hooks/useTableSettings.d.ts +9 -6
- package/dist/hooks/useTableSettings.js +25 -9
- package/dist/hooks/useTheme.d.ts +6 -0
- package/dist/styles/styles.css +7 -3
- package/dist/styles/themes/dbc/colors.css +1 -1
- package/dist/styles.css +1 -476
- package/dist/tanstack-virtual.cjs +12 -0
- package/dist/tanstack-virtual.d.ts +1 -0
- package/dist/tanstack-virtual.js +1 -0
- package/package.json +13 -1
|
@@ -1,26 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type ViewMode
|
|
1
|
+
import type { ColumnItem, TableSettingsColumn, ViewMode } from '../components/table/Table.types';
|
|
2
|
+
export type { ViewMode } from '../components/table/Table.types';
|
|
3
3
|
export type TableSettingsState = {
|
|
4
4
|
viewMode: ViewMode;
|
|
5
5
|
visibleColumnIds: string[];
|
|
6
|
+
striped: boolean;
|
|
6
7
|
};
|
|
7
8
|
export type TableSettingsStorage = {
|
|
8
9
|
get: (key: string) => TableSettingsState | undefined;
|
|
9
10
|
set: (key: string, next: TableSettingsState) => void;
|
|
10
11
|
};
|
|
11
12
|
export declare const localStorageTableSettingsStorage: TableSettingsStorage;
|
|
12
|
-
interface UseTableSettingsOptions {
|
|
13
|
+
export interface UseTableSettingsOptions<T = unknown> {
|
|
13
14
|
storageKey: string;
|
|
14
|
-
tableColumns?:
|
|
15
|
+
tableColumns?: ReadonlyArray<ColumnItem<T> | TableSettingsColumn>;
|
|
15
16
|
defaultViewMode?: ViewMode;
|
|
16
17
|
defaultVisibleColumnIds?: string[];
|
|
18
|
+
defaultStriped?: boolean;
|
|
17
19
|
storage?: TableSettingsStorage;
|
|
18
20
|
}
|
|
19
|
-
export declare function useTableSettings({ storageKey, tableColumns, defaultViewMode, defaultVisibleColumnIds, storage, }: UseTableSettingsOptions): {
|
|
21
|
+
export declare function useTableSettings<T = unknown>({ storageKey, tableColumns, defaultViewMode, defaultVisibleColumnIds, defaultStriped, storage, }: UseTableSettingsOptions<T>): {
|
|
20
22
|
viewMode: ViewMode;
|
|
21
23
|
toggleViewMode: () => void;
|
|
22
24
|
setViewMode: (mode: ViewMode) => void;
|
|
23
25
|
visibleColumnIds: string[];
|
|
24
26
|
setVisibleColumnIds: (ids: string[]) => void;
|
|
27
|
+
striped: boolean;
|
|
28
|
+
setStriped: (nextStriped: boolean) => void;
|
|
25
29
|
};
|
|
26
|
-
export {};
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { useMemo, useState, useEffect, useCallback } from 'react';
|
|
3
|
+
import { isSettingsColumnHidden, getSettingsColumnId } from '../components/table/tableSettings.utils';
|
|
3
4
|
import { writeLocalStorage, readLocalStorage } from '../utils/localStorage.utils';
|
|
4
5
|
|
|
5
6
|
function getDefaultVisibleIds(tableColumns) {
|
|
6
7
|
var _a;
|
|
7
|
-
return (_a = tableColumns == null ? void 0 : tableColumns.filter((c) =>
|
|
8
|
-
var _a2;
|
|
9
|
-
return !((_a2 = c.meta) == null ? void 0 : _a2.hidden);
|
|
10
|
-
}).map((c) => c.id).filter(Boolean)) != null ? _a : [];
|
|
8
|
+
return (_a = tableColumns == null ? void 0 : tableColumns.filter((c) => !isSettingsColumnHidden(c)).map(getSettingsColumnId).filter((id) => typeof id === "string" && id.length > 0)) != null ? _a : [];
|
|
11
9
|
}
|
|
12
10
|
function mergeDefaults(stored, defaults) {
|
|
13
11
|
const viewMode = (stored == null ? void 0 : stored.viewMode) === "compact" || (stored == null ? void 0 : stored.viewMode) === "wrapped" ? stored.viewMode : defaults.viewMode;
|
|
14
12
|
const visibleColumnIds = Array.isArray(stored == null ? void 0 : stored.visibleColumnIds) && stored.visibleColumnIds.length > 0 ? stored.visibleColumnIds : defaults.visibleColumnIds;
|
|
15
|
-
|
|
13
|
+
const striped = typeof (stored == null ? void 0 : stored.striped) === "boolean" ? stored.striped : defaults.striped;
|
|
14
|
+
return { viewMode, visibleColumnIds, striped };
|
|
16
15
|
}
|
|
17
16
|
const localStorageTableSettingsStorage = {
|
|
18
17
|
get: (key) => {
|
|
@@ -28,19 +27,23 @@ function useTableSettings({
|
|
|
28
27
|
tableColumns,
|
|
29
28
|
defaultViewMode = "compact",
|
|
30
29
|
defaultVisibleColumnIds,
|
|
30
|
+
defaultStriped = false,
|
|
31
31
|
storage = localStorageTableSettingsStorage
|
|
32
32
|
}) {
|
|
33
33
|
const defaults = useMemo(() => {
|
|
34
34
|
return {
|
|
35
35
|
viewMode: defaultViewMode,
|
|
36
|
-
visibleColumnIds: defaultVisibleColumnIds != null ? defaultVisibleColumnIds : getDefaultVisibleIds(tableColumns)
|
|
36
|
+
visibleColumnIds: defaultVisibleColumnIds != null ? defaultVisibleColumnIds : getDefaultVisibleIds(tableColumns),
|
|
37
|
+
striped: defaultStriped
|
|
37
38
|
};
|
|
38
|
-
}, [defaultViewMode, defaultVisibleColumnIds, tableColumns]);
|
|
39
|
+
}, [defaultViewMode, defaultVisibleColumnIds, defaultStriped, tableColumns]);
|
|
39
40
|
const [state, setState] = useState(defaults);
|
|
40
41
|
useEffect(() => {
|
|
41
42
|
const stored = storage.get(storageKey);
|
|
42
43
|
const next = mergeDefaults(stored, defaults);
|
|
43
|
-
setState(
|
|
44
|
+
setState(
|
|
45
|
+
(prev) => prev.viewMode === next.viewMode && prev.striped === next.striped && prev.visibleColumnIds.length === next.visibleColumnIds.length && prev.visibleColumnIds.every((id, index) => id === next.visibleColumnIds[index]) ? prev : next
|
|
46
|
+
);
|
|
44
47
|
}, [storageKey, storage, defaults]);
|
|
45
48
|
const persist = useCallback(
|
|
46
49
|
(next) => storage.set(storageKey, next),
|
|
@@ -75,12 +78,25 @@ function useTableSettings({
|
|
|
75
78
|
},
|
|
76
79
|
[persist]
|
|
77
80
|
);
|
|
81
|
+
const setStriped = useCallback(
|
|
82
|
+
(nextStriped) => {
|
|
83
|
+
setState((prev) => {
|
|
84
|
+
if (prev.striped === nextStriped) return prev;
|
|
85
|
+
const next = { ...prev, striped: nextStriped };
|
|
86
|
+
persist(next);
|
|
87
|
+
return next;
|
|
88
|
+
});
|
|
89
|
+
},
|
|
90
|
+
[persist]
|
|
91
|
+
);
|
|
78
92
|
return {
|
|
79
93
|
viewMode: state.viewMode,
|
|
80
94
|
toggleViewMode,
|
|
81
95
|
setViewMode,
|
|
82
96
|
visibleColumnIds: state.visibleColumnIds,
|
|
83
|
-
setVisibleColumnIds
|
|
97
|
+
setVisibleColumnIds,
|
|
98
|
+
striped: state.striped,
|
|
99
|
+
setStriped
|
|
84
100
|
};
|
|
85
101
|
}
|
|
86
102
|
|
package/dist/hooks/useTheme.d.ts
CHANGED
|
@@ -3,6 +3,12 @@ export type { ThemeId };
|
|
|
3
3
|
export interface UseThemeOptions {
|
|
4
4
|
/** The theme the app should fall back to when nothing is stored yet. */
|
|
5
5
|
defaultTheme?: ThemeId;
|
|
6
|
+
/**
|
|
7
|
+
* Storage key used for the cookie + localStorage entry. Defaults to a
|
|
8
|
+
* shared key, so apps that run on the same origin (e.g. multiple products
|
|
9
|
+
* under one domain) should each pass their own value here — otherwise
|
|
10
|
+
* they'll unintentionally read and overwrite each other's persisted theme.
|
|
11
|
+
*/
|
|
6
12
|
storageKey?: string;
|
|
7
13
|
}
|
|
8
14
|
export declare function useTheme(options?: UseThemeOptions): {
|
package/dist/styles/styles.css
CHANGED
|
@@ -172,12 +172,16 @@ tr.dbc-table--hover:hover td:last-child {
|
|
|
172
172
|
cursor: pointer;
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
.dbc-table--striped tbody tr:nth-child(even)
|
|
175
|
+
.dbc-table--striped tbody tr:nth-child(even) > th,
|
|
176
|
+
.dbc-table--striped tbody tr:nth-child(even) > td {
|
|
176
177
|
background-color: var(--table-row-bg-alt);
|
|
178
|
+
border-block-end-color: transparent;
|
|
177
179
|
}
|
|
178
180
|
|
|
179
|
-
.dbc-table--striped.dbc-table--hover tbody tr:hover,
|
|
180
|
-
.dbc-table--striped
|
|
181
|
+
.dbc-table--striped.dbc-table--hover tbody tr:hover > th,
|
|
182
|
+
.dbc-table--striped.dbc-table--hover tbody tr:hover > td,
|
|
183
|
+
.dbc-table--striped tr.dbc-table--hover:hover > th,
|
|
184
|
+
.dbc-table--striped tr.dbc-table--hover:hover > td {
|
|
181
185
|
background-color: var(--table-row-bg-hover);
|
|
182
186
|
}
|
|
183
187
|
|
|
@@ -268,7 +268,7 @@ html {
|
|
|
268
268
|
--table-border-subtle: light-dark(#eef1f4, rgba(255, 255, 255, 0.08));
|
|
269
269
|
--table-divider: light-dark(#e8ebef, rgba(255, 255, 255, 0.08));
|
|
270
270
|
|
|
271
|
-
--table-header-fg: var(--color-fg-
|
|
271
|
+
--table-header-fg: var(--color-fg-muted);
|
|
272
272
|
--table-cell-fg: var(--color-fg-default);
|
|
273
273
|
|
|
274
274
|
/* ==========================================================================
|
package/dist/styles.css
CHANGED
|
@@ -1,476 +1 @@
|
|
|
1
|
-
@import './
|
|
2
|
-
@import './css-helper-classes/flex.css';
|
|
3
|
-
@import './css-helper-classes/typography.css';
|
|
4
|
-
@import './css-helper-classes/scrollbar.css';
|
|
5
|
-
|
|
6
|
-
* {
|
|
7
|
-
font-family: var(--font-family);
|
|
8
|
-
box-sizing: border-box;
|
|
9
|
-
margin: 0;
|
|
10
|
-
padding: 0;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
body {
|
|
14
|
-
color: var(--color-fg-default);
|
|
15
|
-
background-color: var(--color-bg-page);
|
|
16
|
-
font-size: var(--font-size-sm);
|
|
17
|
-
margin: 0;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
@media (min-height: 500px) {
|
|
21
|
-
body {
|
|
22
|
-
overflow-y: scroll;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
h1 {
|
|
27
|
-
font-size: var(--font-size-xl);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
h2 {
|
|
31
|
-
font-size: var(--font-size-lg);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
h3 {
|
|
35
|
-
font-size: var(--font-size-md);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
h4 {
|
|
39
|
-
font-size: var(--font-size-sm);
|
|
40
|
-
font-weight: var(--font-weight-medium);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
body.dbc-app {
|
|
44
|
-
max-width: 1600px;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.dbc-overflow-auto {
|
|
48
|
-
overflow: auto;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.dbc-font-mono {
|
|
52
|
-
font-family: monospace;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.dbc-pulse {
|
|
56
|
-
position: relative;
|
|
57
|
-
display: inline-flex;
|
|
58
|
-
align-items: center;
|
|
59
|
-
justify-content: center;
|
|
60
|
-
border-radius: var(--border-radius-round);
|
|
61
|
-
color: var(--color-primary-500, var(--color-brand));
|
|
62
|
-
transform-origin: center;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.dbc-pulse::after {
|
|
66
|
-
content: '';
|
|
67
|
-
position: absolute;
|
|
68
|
-
inset: 0;
|
|
69
|
-
border-radius: inherit;
|
|
70
|
-
animation: dbc-pulse 1.8s ease-out infinite;
|
|
71
|
-
pointer-events: none;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
@keyframes dbc-pulse {
|
|
75
|
-
0% {
|
|
76
|
-
opacity: 0.2;
|
|
77
|
-
}
|
|
78
|
-
20% {
|
|
79
|
-
opacity: 0.55;
|
|
80
|
-
}
|
|
81
|
-
60% {
|
|
82
|
-
opacity: 0.15;
|
|
83
|
-
}
|
|
84
|
-
100% {
|
|
85
|
-
opacity: 0;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
@media (prefers-reduced-motion: reduce) {
|
|
90
|
-
.dbc-pulse::after {
|
|
91
|
-
animation: none;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.dbc-table {
|
|
96
|
-
--card-label-width: 260px;
|
|
97
|
-
|
|
98
|
-
border-collapse: collapse;
|
|
99
|
-
font-size: var(--font-size-sm);
|
|
100
|
-
line-height: var(--line-height-normal);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/* Default compact table cell padding.
|
|
104
|
-
This applies to the first row too, avoiding uneven first-row spacing. */
|
|
105
|
-
.dbc-table th,
|
|
106
|
-
.dbc-table td {
|
|
107
|
-
padding-block: var(--spacing-xxs);
|
|
108
|
-
padding-inline: var(--spacing-xxs);
|
|
109
|
-
vertical-align: baseline;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.dbc-table th {
|
|
113
|
-
white-space: nowrap;
|
|
114
|
-
text-align: left;
|
|
115
|
-
max-width: var(--card-label-width);
|
|
116
|
-
overflow: hidden;
|
|
117
|
-
text-overflow: ellipsis;
|
|
118
|
-
font-size: var(--font-size-table-header);
|
|
119
|
-
line-height: var(--line-height-table-header);
|
|
120
|
-
color: var(--table-header-fg);
|
|
121
|
-
letter-spacing: var(--letter-spacing-wide);
|
|
122
|
-
font-weight: normal;
|
|
123
|
-
/* A bit more breathing room between the label and its value than the
|
|
124
|
-
shared th/td padding-inline gives on its own. */
|
|
125
|
-
padding-right: var(--spacing-xs);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.dbc-table td {
|
|
129
|
-
min-width: 0;
|
|
130
|
-
margin: 0;
|
|
131
|
-
font-size: var(--font-size-sm);
|
|
132
|
-
color: var(--color-fg-default);
|
|
133
|
-
font-weight: var(--font-weight-default);
|
|
134
|
-
word-break: break-word;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/* Larger vertical padding (default is --spacing-xxs) */
|
|
138
|
-
.dbc-table--md th,
|
|
139
|
-
.dbc-table--md td {
|
|
140
|
-
padding-block: var(--spacing-xs);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/* --hover can go on the <table> (every row hovers) or directly on a <tr>
|
|
144
|
-
(opt in only specific rows, leaving the rest unaffected). */
|
|
145
|
-
.dbc-table--hover tbody tr:hover,
|
|
146
|
-
tr.dbc-table--hover:hover {
|
|
147
|
-
background-color: var(--color-bg-contextual);
|
|
148
|
-
cursor: pointer;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/* Round the hovered row's leading/trailing edge (tr itself can't take a
|
|
152
|
-
border-radius reliably in table layout) — same token as Menu.item's
|
|
153
|
-
hover background. */
|
|
154
|
-
.dbc-table--hover tbody tr:hover th:first-child,
|
|
155
|
-
.dbc-table--hover tbody tr:hover td:first-child,
|
|
156
|
-
tr.dbc-table--hover:hover th:first-child,
|
|
157
|
-
tr.dbc-table--hover:hover td:first-child {
|
|
158
|
-
border-top-left-radius: var(--border-radius-md);
|
|
159
|
-
border-bottom-left-radius: var(--border-radius-md);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.dbc-table--hover tbody tr:hover th:last-child,
|
|
163
|
-
.dbc-table--hover tbody tr:hover td:last-child,
|
|
164
|
-
tr.dbc-table--hover:hover th:last-child,
|
|
165
|
-
tr.dbc-table--hover:hover td:last-child {
|
|
166
|
-
border-top-right-radius: var(--border-radius-md);
|
|
167
|
-
border-bottom-right-radius: var(--border-radius-md);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.dbc-table--clickableRow tbody tr:hover {
|
|
171
|
-
background-color: var(--color-bg-contextual);
|
|
172
|
-
cursor: pointer;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.dbc-table--striped tbody tr:nth-child(even) {
|
|
176
|
-
background-color: var(--table-row-bg-alt);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.dbc-table--striped.dbc-table--hover tbody tr:hover,
|
|
180
|
-
.dbc-table--striped tr.dbc-table--hover:hover {
|
|
181
|
-
background-color: var(--table-row-bg-hover);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.dbc-full-width {
|
|
185
|
-
width: 100%;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
/* Bordered table */
|
|
189
|
-
|
|
190
|
-
.dbc-table--bordered {
|
|
191
|
-
width: auto;
|
|
192
|
-
border: var(--border-width-thin) solid var(--color-border-default);
|
|
193
|
-
border-collapse: collapse;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.dbc-table--bordered th,
|
|
197
|
-
.dbc-table--bordered td {
|
|
198
|
-
border: var(--border-width-thin) solid var(--color-border-default);
|
|
199
|
-
padding: var(--spacing-xs) var(--spacing-sm);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.dbc-table--bordered thead th {
|
|
203
|
-
background-color: var(--color-bg-surface);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
/* Alignment modifier */
|
|
207
|
-
|
|
208
|
-
.dbc-table--align-middle,
|
|
209
|
-
.dbc-table--align-middle th,
|
|
210
|
-
.dbc-table--align-middle td {
|
|
211
|
-
vertical-align: middle;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/* Per-cell text alignment. Apply directly to a th/td to right-align that
|
|
215
|
-
column's header/content. */
|
|
216
|
-
.dbc-table th.dbc-table--align-right,
|
|
217
|
-
.dbc-table td.dbc-table--align-right {
|
|
218
|
-
text-align: right;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/* ==========================================================================
|
|
222
|
-
Text / utility classes
|
|
223
|
-
========================================================================== */
|
|
224
|
-
|
|
225
|
-
.dbc-highlight {
|
|
226
|
-
color: var(--color-highlight-fg, inherit);
|
|
227
|
-
background-color: var(--color-highlight-bg, var(--color-status-warning-bg));
|
|
228
|
-
font-family: inherit;
|
|
229
|
-
font-size: inherit;
|
|
230
|
-
border-radius: var(--border-radius-sm);
|
|
231
|
-
box-decoration-break: clone;
|
|
232
|
-
-webkit-box-decoration-break: clone;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.dbc-code {
|
|
236
|
-
color: var(--color-code-fg, inherit);
|
|
237
|
-
background-color: var(--color-code-bg, var(--color-bg-contextual));
|
|
238
|
-
border-radius: var(--border-radius-sm);
|
|
239
|
-
padding-inline: var(--spacing-xxs);
|
|
240
|
-
font-family: var(--font-family-mono);
|
|
241
|
-
font-size: 0.9em;
|
|
242
|
-
box-decoration-break: clone;
|
|
243
|
-
-webkit-box-decoration-break: clone;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
.dbc-muted-text {
|
|
247
|
-
color: var(--color-fg-subtle);
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
.dbc-tabular-nums {
|
|
251
|
-
font-variant-numeric: tabular-nums;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
.dbc-sm-text {
|
|
255
|
-
font-size: var(--font-size-sm);
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
.dbc-md-text {
|
|
259
|
-
font-size: var(--font-size-md);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.dbc-lg-text {
|
|
263
|
-
font-size: var(--font-size-lg);
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
.dbc-medium-text {
|
|
267
|
-
font-weight: var(--font-weight-medium);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.dbc-bold-text {
|
|
271
|
-
font-weight: var(--font-weight-bold);
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
.dbc-center-text {
|
|
275
|
-
text-align: center;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
/* ==========================================================================
|
|
279
|
-
Layout utilities
|
|
280
|
-
========================================================================== */
|
|
281
|
-
|
|
282
|
-
@media screen and (min-height: 400px) {
|
|
283
|
-
body.dbc-app {
|
|
284
|
-
overflow: hidden;
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
.grow-container {
|
|
289
|
-
display: flex;
|
|
290
|
-
flex-direction: column;
|
|
291
|
-
flex: 1;
|
|
292
|
-
overflow: auto;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
.hideScrollBar {
|
|
296
|
-
scrollbar-width: none;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
.hideScrollBar::-webkit-scrollbar {
|
|
300
|
-
display: none;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
.fitContent {
|
|
304
|
-
white-space: nowrap !important;
|
|
305
|
-
width: 1% !important;
|
|
306
|
-
min-width: 1% !important;
|
|
307
|
-
max-width: 1% !important;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
.dbc-full-height {
|
|
311
|
-
height: 100%;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
.dbc-offset-height {
|
|
315
|
-
transform: translateY(-8vh);
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
/* ==========================================================================
|
|
319
|
-
Scrollbars
|
|
320
|
-
========================================================================== */
|
|
321
|
-
|
|
322
|
-
/* Firefox equivalent of the thin, muted webkit scrollbar below. */
|
|
323
|
-
* {
|
|
324
|
-
scrollbar-width: thin;
|
|
325
|
-
scrollbar-color: var(--color-border-strong) transparent;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
::-webkit-scrollbar {
|
|
329
|
-
width: 10px;
|
|
330
|
-
height: 10px;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
::-webkit-scrollbar-track {
|
|
334
|
-
background: transparent;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
::-webkit-scrollbar-thumb {
|
|
338
|
-
background-color: var(--color-border-strong);
|
|
339
|
-
border-radius: 4px;
|
|
340
|
-
border: 2px solid var(--color-bg-surface);
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
::-webkit-scrollbar-thumb:hover {
|
|
344
|
-
background-color: var(--color-fg-subtle);
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
/* ==========================================================================
|
|
348
|
-
Animations
|
|
349
|
-
========================================================================== */
|
|
350
|
-
|
|
351
|
-
.animate--expand {
|
|
352
|
-
animation: expand 0.15s ease-in-out forwards;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
.animate--collapse {
|
|
356
|
-
animation: collapse 0.15s ease-in-out forwards;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
.spin {
|
|
360
|
-
display: inline-block;
|
|
361
|
-
animation: spin 2s linear infinite;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
@keyframes expand {
|
|
365
|
-
0% {
|
|
366
|
-
max-height: 0;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
100% {
|
|
370
|
-
max-height: 100vh;
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
@keyframes collapse {
|
|
375
|
-
0% {
|
|
376
|
-
max-height: 100vh;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
100% {
|
|
380
|
-
max-height: 0;
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
@keyframes spin {
|
|
385
|
-
from {
|
|
386
|
-
transform: rotate(0deg);
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
to {
|
|
390
|
-
transform: rotate(360deg);
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
/* ==========================================================================
|
|
395
|
-
Accessibility
|
|
396
|
-
========================================================================== */
|
|
397
|
-
|
|
398
|
-
.srOnly {
|
|
399
|
-
position: absolute;
|
|
400
|
-
width: 1px;
|
|
401
|
-
height: 1px;
|
|
402
|
-
padding: 0;
|
|
403
|
-
margin: -1px;
|
|
404
|
-
overflow: hidden;
|
|
405
|
-
clip: rect(0, 0, 0, 0);
|
|
406
|
-
border: 0;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
/* ==========================================================================
|
|
410
|
-
Print
|
|
411
|
-
========================================================================== */
|
|
412
|
-
|
|
413
|
-
@media print {
|
|
414
|
-
/* --- What to print (only content explicitly opted in via
|
|
415
|
-
printSelection()'s NOT_PRINTABLE_ATTRIBUTE gate, or a Modal) --- */
|
|
416
|
-
body[data-not-printable='true'] > *:not([data-not-printable='false']):not([role='dialog']) {
|
|
417
|
-
display: none !important;
|
|
418
|
-
}
|
|
419
|
-
body [data-not-printable='true'] {
|
|
420
|
-
display: none !important;
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
/* --- Page setup --- */
|
|
424
|
-
@page {
|
|
425
|
-
size: A4;
|
|
426
|
-
margin: 12mm;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
html,
|
|
430
|
-
body {
|
|
431
|
-
height: auto !important; /* avoid 100vh/100% truncation */
|
|
432
|
-
overflow: visible !important; /* allow pagination */
|
|
433
|
-
}
|
|
434
|
-
* {
|
|
435
|
-
overflow: visible !important;
|
|
436
|
-
transform: none !important;
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
/* Modal (components/overlay/modal/Modal) portals a position:fixed,
|
|
440
|
-
scroll-clipped overlay directly onto body, wrapping the actual
|
|
441
|
-
`role="dialog"` element. It has no class or attribute of its own to
|
|
442
|
-
target, but it's always body's direct child that contains the dialog,
|
|
443
|
-
so :has() reaches it. */
|
|
444
|
-
body > div:has([role='dialog']) {
|
|
445
|
-
position: static !important;
|
|
446
|
-
inset: auto !important;
|
|
447
|
-
overflow: visible !important;
|
|
448
|
-
padding: 0 !important;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
[role='dialog'] {
|
|
452
|
-
position: static !important;
|
|
453
|
-
width: 100% !important;
|
|
454
|
-
max-width: none !important;
|
|
455
|
-
height: auto !important;
|
|
456
|
-
max-height: none !important;
|
|
457
|
-
overflow: visible !important;
|
|
458
|
-
transform: none !important;
|
|
459
|
-
contain: none !important;
|
|
460
|
-
box-shadow: none !important;
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
/* --- Page breaks --- */
|
|
464
|
-
/* Use this class on any element that should start on a new page. */
|
|
465
|
-
.dbc-page-break-before:not(:first-of-type) {
|
|
466
|
-
margin-top: 0 !important;
|
|
467
|
-
break-before: page !important;
|
|
468
|
-
page-break-before: always !important; /* legacy */
|
|
469
|
-
}
|
|
470
|
-
/* Utility to discourage breaking inside certain blocks. */
|
|
471
|
-
.dbc-avoid-break,
|
|
472
|
-
[role='dialog'] {
|
|
473
|
-
break-inside: auto !important;
|
|
474
|
-
page-break-inside: auto !important;
|
|
475
|
-
}
|
|
476
|
-
}
|
|
1
|
+
@import './styles/styles.css';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var TanstackJsonViewer = require('./components/json-viewer/TanstackJsonViewer');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.keys(TanstackJsonViewer).forEach(function (k) {
|
|
8
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return TanstackJsonViewer[k]; }
|
|
11
|
+
});
|
|
12
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/json-viewer/TanstackJsonViewer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/json-viewer/TanstackJsonViewer';
|