simple-table-core 4.1.6 → 4.1.8
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 +15 -7
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/styles.css +1 -1
- package/dist/consts/general-consts.d.ts +0 -4
- package/dist/core/SimpleTableVanilla.d.ts +19 -275
- package/dist/core/api/TableAPIContext.d.ts +74 -0
- package/dist/core/api/TableAPIImpl.d.ts +2 -74
- package/dist/core/api/buildTableAPIContext.d.ts +61 -0
- package/dist/core/dev/UnvirtualizedRowsWarning.d.ts +20 -0
- package/dist/core/initialization/createDataManagers.d.ts +37 -0
- package/dist/core/initialization/wireMountManagers.d.ts +43 -0
- package/dist/core/pipeline/syncPivotPipeline.d.ts +41 -0
- package/dist/core/rendering/RenderContext.d.ts +125 -0
- package/dist/core/rendering/RenderOrchestrator.d.ts +8 -119
- package/dist/core/rendering/SectionRenderer.d.ts +21 -15
- package/dist/core/rendering/TableRenderer.d.ts +6 -98
- package/dist/core/rendering/TableRendererDeps.d.ts +98 -0
- package/dist/core/rendering/buildRenderContext.d.ts +94 -0
- package/dist/core/rendering/cellRenderContexts.d.ts +11 -0
- package/dist/core/rendering/renderBodySections.d.ts +14 -0
- package/dist/core/rendering/renderHeaderSections.d.ts +13 -0
- package/dist/core/rendering/sectionCaches.d.ts +24 -0
- package/dist/core/rendering/sectionExtraRows.d.ts +19 -0
- package/dist/core/rendering/sectionLayout.d.ts +42 -0
- package/dist/core/vanilla/VanillaLiveHost.d.ts +103 -0
- package/dist/core/vanilla/applyTableUpdate.d.ts +10 -0
- package/dist/core/vanilla/createVanillaRenderContext.d.ts +4 -0
- package/dist/core/vanilla/destroyTableResources.d.ts +26 -0
- package/dist/core/vanilla/syncRowSelectionManager.d.ts +13 -0
- package/dist/core/vanilla/tableContainers.d.ts +5 -0
- package/dist/core/vanilla/toTableAPIContextHost.d.ts +3 -0
- package/dist/hooks/contentHeight.d.ts +3 -1
- package/dist/hooks/scrollbarWidth.d.ts +0 -43
- package/dist/hooks/useAggregatedRows.d.ts +0 -2
- package/dist/index.es.js +1 -1
- package/dist/managers/AccordionController.d.ts +39 -0
- package/dist/managers/AnimationCoordinator.d.ts +15 -1
- package/dist/managers/AutoSizeManager.d.ts +64 -0
- package/dist/managers/CellSlideAnimator.d.ts +54 -0
- package/dist/managers/DragHandlerManager.d.ts +4 -26
- package/dist/managers/ExternalScrollController.d.ts +68 -0
- package/dist/managers/ScrollRenderCoalescer.d.ts +32 -0
- package/dist/managers/SelectionManager/mouseUtils.d.ts +3 -3
- package/dist/styles.css +1 -1
- package/dist/types/Theme.d.ts +1 -1
- package/dist/utils/accordionAnimation.d.ts +0 -5
- package/dist/utils/bodyCell/editing.d.ts +1 -1
- package/dist/utils/bodyCell/editors/booleanDropdown.d.ts +1 -1
- package/dist/utils/bodyCell/editors/datePicker.d.ts +1 -1
- package/dist/utils/bodyCell/editors/enumDropdown.d.ts +1 -1
- package/dist/utils/bodyCell/selection.d.ts +0 -1
- package/dist/utils/bodyCell/styling.d.ts +2 -0
- package/dist/utils/cellScrollUtils.d.ts +1 -1
- package/dist/utils/cellUtils.d.ts +0 -4
- package/dist/utils/collapseUtils.d.ts +0 -10
- package/dist/utils/externalScroll.d.ts +0 -10
- package/dist/utils/formatters.d.ts +0 -2
- package/dist/utils/headerCell/eventTracking.d.ts +2 -2
- package/dist/utils/headerCell/styling.d.ts +0 -1
- package/dist/utils/headerWidthUtils.d.ts +7 -2
- package/dist/utils/infiniteScrollUtils.d.ts +0 -1
- package/dist/utils/parkAndStagger.d.ts +44 -0
- package/dist/utils/resizeUtils/domUpdates.d.ts +1 -1
- package/dist/utils/resizeUtils/maxWidth.d.ts +2 -1
- package/dist/utils/rowSelectionUtils.d.ts +0 -4
- package/dist/utils/rowSeparatorRenderer.d.ts +0 -1
- package/dist/utils/rowUtils.d.ts +1 -27
- package/dist/utils/setAbsoluteCellPosition.d.ts +31 -0
- package/dist/utils/stateRowRenderer.d.ts +0 -1
- package/dist/utils/tableDomScope.d.ts +20 -0
- package/package.json +4 -3
- package/src/styles/all-themes.css +1 -0
- package/src/styles/base.css +46 -148
- package/src/styles/themes/modern-black.css +139 -0
- package/dist/managers/ColumnManager.d.ts +0 -42
- package/dist/managers/RowManager.d.ts +0 -56
- package/dist/managers/TableManager.d.ts +0 -72
- package/dist/types/BoundingBox.d.ts +0 -11
- package/dist/types/DragHandlerProps.d.ts +0 -14
- package/dist/types/OnSortProps.d.ts +0 -3
- package/dist/types/SharedTableProps.d.ts +0 -24
- package/dist/types/TableBodyProps.d.ts +0 -20
- package/dist/types/TableHeaderProps.d.ts +0 -17
- package/dist/types/TableHeaderSectionProps.d.ts +0 -19
- package/dist/types/TableRowProps.d.ts +0 -29
- package/dist/utils/columnIndicesUtils.d.ts +0 -15
- package/dist/utils/columnVirtualizationUtils.d.ts +0 -128
|
@@ -13,4 +13,3 @@ export interface CreateRowSeparatorOptions {
|
|
|
13
13
|
/** Keep separator width in sync with section layout (resize, pinned width changes). */
|
|
14
14
|
export declare const applyRowSeparatorSectionWidth: (separator: HTMLElement, sectionWidthPx?: number) => void;
|
|
15
15
|
export declare const createRowSeparator: (options: CreateRowSeparatorOptions) => HTMLElement;
|
|
16
|
-
export declare const createSpacerRow: (position: number, rowHeight: number, heightOffsets: HeightOffsets | undefined, customTheme: CustomTheme, className: string, height?: number) => HTMLElement;
|
package/dist/utils/rowUtils.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import TableRow from "../types/TableRow";
|
|
2
1
|
import Row from "../types/Row";
|
|
3
|
-
import
|
|
2
|
+
import { Accessor } from "../types/ColumnDef";
|
|
4
3
|
import CellValue from "../types/CellValue";
|
|
5
|
-
import RowState from "../types/RowState";
|
|
6
4
|
import { CustomTheme } from "../types/CustomTheme";
|
|
7
5
|
import { GetRowId } from "../types/GetRowId";
|
|
8
6
|
import { GenerateRowIdParams } from "../types/GenerateRowIdParams";
|
|
@@ -161,27 +159,3 @@ export declare const hasNestedRows: (row: Row, groupingKey?: string) => boolean;
|
|
|
161
159
|
* @returns true if the row is expanded, false otherwise
|
|
162
160
|
*/
|
|
163
161
|
export declare const isRowExpanded: (expandStateRowId: string | number, depth: number, expandedDepths: Set<number>, expandedRows: Map<string, number>, collapsedRows: Map<string, number>) => boolean;
|
|
164
|
-
/**
|
|
165
|
-
* Flatten rows recursively based on row grouping configuration
|
|
166
|
-
* Now calculates ALL properties including position and isLastGroupRow
|
|
167
|
-
* Also injects special state rows for loading/error/empty states (only if renderers are available)
|
|
168
|
-
* Also injects nested grid rows when a header has nestedTable configuration
|
|
169
|
-
*/
|
|
170
|
-
export declare const flattenRowsWithGrouping: ({ depth, expandedDepths, expandedRows, collapsedRows, rowGrouping, getRowId, rows, displayPositionOffset, rowStateMap, hasLoadingRenderer, hasErrorRenderer, hasEmptyRenderer, headers, rowHeight, headerHeight, customTheme, }: {
|
|
171
|
-
depth?: number;
|
|
172
|
-
expandedDepths: Set<number>;
|
|
173
|
-
expandedRows: Map<string, number>;
|
|
174
|
-
collapsedRows: Map<string, number>;
|
|
175
|
-
rowGrouping?: Accessor[];
|
|
176
|
-
getRowId?: GetRowId;
|
|
177
|
-
rows: Row[];
|
|
178
|
-
displayPositionOffset?: number;
|
|
179
|
-
rowStateMap?: Map<string | number, RowState>;
|
|
180
|
-
hasLoadingRenderer?: boolean;
|
|
181
|
-
hasErrorRenderer?: boolean;
|
|
182
|
-
hasEmptyRenderer?: boolean;
|
|
183
|
-
headers?: ColumnDef[];
|
|
184
|
-
rowHeight: number;
|
|
185
|
-
headerHeight: number;
|
|
186
|
-
customTheme: CustomTheme;
|
|
187
|
-
}) => TableRow[];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Write absolute `left`/`top` while preserving an in-flight FLIP visual position.
|
|
3
|
+
*
|
|
4
|
+
* FLIP inverts use `transform: translate3d(...)` relative to `style.left/top`.
|
|
5
|
+
* Updating left/top without adjusting that translate moves the painted cell by
|
|
6
|
+
* the same delta — then `play()` "corrects" it with a new invert, which reads
|
|
7
|
+
* as a jump during rapid reorders.
|
|
8
|
+
*
|
|
9
|
+
* Column-drag does NOT compensate here: {@link CellSlideAnimator} snapshots
|
|
10
|
+
* visuals before left writes and applies the hold+tween after.
|
|
11
|
+
*/
|
|
12
|
+
export declare const setFlipCompensationEnabled: (enabled: boolean) => void;
|
|
13
|
+
/** Parse translate/matrix CSS into tx/ty. */
|
|
14
|
+
export declare const parseCssTranslate: (transform: string) => {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
} | null;
|
|
18
|
+
/**
|
|
19
|
+
* Painted translate in style.left/top space. Prefers the computed matrix so a
|
|
20
|
+
* running WAAPI slide is not mistaken for its start keyframe (`style.transform`
|
|
21
|
+
* stays at the invert until the animation finishes).
|
|
22
|
+
*/
|
|
23
|
+
export declare const readLiveTranslate: (element: HTMLElement) => {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
} | null;
|
|
27
|
+
/**
|
|
28
|
+
* Set absolute cell coordinates, compensating any active FLIP translate so the
|
|
29
|
+
* visual position does not drift when the logical slot moves.
|
|
30
|
+
*/
|
|
31
|
+
export declare const setAbsoluteCellPosition: (element: HTMLElement, nextLeft: number, nextTop: number) => void;
|
|
@@ -12,4 +12,3 @@ export interface StateRowRenderContext {
|
|
|
12
12
|
emptyStateRenderer?: EmptyStateRenderer;
|
|
13
13
|
}
|
|
14
14
|
export declare const createStateRow: (tableRow: TableRowType, context: StateRowRenderContext) => HTMLElement;
|
|
15
|
-
export declare const cleanupStateRow: (rowElement: HTMLElement) => void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Class on the per-instance table wrapper created by DOMManager. */
|
|
2
|
+
export declare const TABLE_ROOT_CLASS = "simple-table-root";
|
|
3
|
+
export declare const TABLE_ROOT_SELECTOR = ".simple-table-root";
|
|
4
|
+
/** Walks up from `from` to this table's `.simple-table-root`, or null. */
|
|
5
|
+
export declare const resolveTableRoot: (from: Element | null | undefined) => HTMLElement | null;
|
|
6
|
+
/**
|
|
7
|
+
* True when `el` belongs to this table instance, not a nested table inside it.
|
|
8
|
+
* Nested grids mount their own `.simple-table-root` under the parent.
|
|
9
|
+
*/
|
|
10
|
+
export declare const isOwnedByTable: (root: Element, el: Element) => boolean;
|
|
11
|
+
/**
|
|
12
|
+
* `querySelectorAll` within `root`, skipping nodes that belong to a nested table.
|
|
13
|
+
* Pass this instance's `.simple-table-root` (or any descendant of it).
|
|
14
|
+
*/
|
|
15
|
+
export declare const queryAllInTable: <E extends Element = HTMLElement>(root: ParentNode | null | undefined, selector: string) => E[];
|
|
16
|
+
/** First match of `queryAllInTable`, or null. */
|
|
17
|
+
export declare const queryInTable: <E extends Element = HTMLElement>(root: ParentNode | null | undefined, selector: string) => E | null;
|
|
18
|
+
/** Looks up an element by `id` inside this table, not `document.getElementById`. */
|
|
19
|
+
export declare const getElementByIdInTable: (root: ParentNode | null | undefined, id: string) => HTMLElement | null;
|
|
20
|
+
export declare const escapeTableAttrValue: (value: string) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "simple-table-core",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.8",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/index.es.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
"@storybook/test-runner": "^0.19.1",
|
|
43
43
|
"@types/node": "^16.18.111",
|
|
44
44
|
"cssnano": "^7.0.6",
|
|
45
|
+
"playwright": "1.58.2",
|
|
45
46
|
"postcss-calc": "^10.1.1",
|
|
46
47
|
"postcss-custom-properties": "^14.0.4",
|
|
47
48
|
"postcss-import": "^16.1.0",
|
|
48
49
|
"postcss-preset-env": "^10.1.5",
|
|
49
|
-
"playwright": "1.58.2",
|
|
50
50
|
"rollup": "^2.79.2",
|
|
51
51
|
"rollup-plugin-delete": "^2.1.0",
|
|
52
52
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
@@ -57,7 +57,8 @@
|
|
|
57
57
|
"storybook": "^8.6.14",
|
|
58
58
|
"ts-loader": "^9.5.4",
|
|
59
59
|
"tslib": "^2.8.1",
|
|
60
|
-
"typescript": "^5.0.0"
|
|
60
|
+
"typescript": "^5.0.0",
|
|
61
|
+
"vitest": "^2.1.9"
|
|
61
62
|
},
|
|
62
63
|
"browserslist": {
|
|
63
64
|
"production": [
|
package/src/styles/base.css
CHANGED
|
@@ -86,8 +86,13 @@
|
|
|
86
86
|
font-family: inherit;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
input {
|
|
90
|
-
color:
|
|
89
|
+
.simple-table-root input {
|
|
90
|
+
color: var(--st-cell-color);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.simple-table-root input::placeholder {
|
|
94
|
+
color: var(--st-muted-text-color);
|
|
95
|
+
opacity: 1;
|
|
91
96
|
}
|
|
92
97
|
|
|
93
98
|
/* Safari scrollbar styling */
|
|
@@ -206,7 +211,7 @@ input {
|
|
|
206
211
|
display: block;
|
|
207
212
|
/* `*` does not target ::after; border-box keeps the bottom border inside the flex line. */
|
|
208
213
|
box-sizing: border-box;
|
|
209
|
-
width: var(--st-after-width,
|
|
214
|
+
width: var(--st-after-width, 11.01px);
|
|
210
215
|
flex-shrink: 0;
|
|
211
216
|
background-color: var(--st-header-background-color);
|
|
212
217
|
border-bottom: var(--st-border-width) solid var(--st-border-color);
|
|
@@ -218,11 +223,6 @@ input {
|
|
|
218
223
|
border-bottom: var(--st-border-width) solid var(--st-border-color);
|
|
219
224
|
}
|
|
220
225
|
|
|
221
|
-
.st-header-grid {
|
|
222
|
-
position: relative;
|
|
223
|
-
min-width: 100%;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
226
|
.st-horizontal-scrollbar-middle,
|
|
227
227
|
.st-horizontal-scrollbar-left,
|
|
228
228
|
.st-horizontal-scrollbar-right,
|
|
@@ -373,12 +373,6 @@ input {
|
|
|
373
373
|
background-color: var(--st-selected-row-background-color);
|
|
374
374
|
}
|
|
375
375
|
|
|
376
|
-
.st-sticky-top
|
|
377
|
-
.st-row.hovered:not(.st-cell-editing):not(.st-cell-column-selected):not(
|
|
378
|
-
.st-cell-column-selected-last
|
|
379
|
-
):not(.st-cell-column-selected-first) {
|
|
380
|
-
background-color: var(--st-hover-row-background-color);
|
|
381
|
-
}
|
|
382
376
|
.st-row.hovered .st-cell-editing,
|
|
383
377
|
.st-row.hovered
|
|
384
378
|
.st-cell:not(.st-cell-selected):not(.st-cell-selected-first):not(.st-cell-column-selected):not(
|
|
@@ -497,9 +491,6 @@ input {
|
|
|
497
491
|
.st-header-cell.st-header-editable {
|
|
498
492
|
cursor: pointer;
|
|
499
493
|
}
|
|
500
|
-
.st-header-cell.draggable {
|
|
501
|
-
cursor: grab;
|
|
502
|
-
}
|
|
503
494
|
.st-header-cell.st-header-selected {
|
|
504
495
|
background-color: var(--st-header-selected-background-color);
|
|
505
496
|
}
|
|
@@ -727,10 +718,6 @@ input {
|
|
|
727
718
|
outline-offset: 2px;
|
|
728
719
|
}
|
|
729
720
|
|
|
730
|
-
.st-collapse-icon-container {
|
|
731
|
-
cursor: pointer;
|
|
732
|
-
}
|
|
733
|
-
|
|
734
721
|
.st-expand-icon {
|
|
735
722
|
cursor: pointer;
|
|
736
723
|
color: var(--st-header-label-color);
|
|
@@ -774,6 +761,40 @@ input {
|
|
|
774
761
|
.st-dragging.st-sub-header {
|
|
775
762
|
background-color: var(--st-dragging-sub-header-background-color);
|
|
776
763
|
}
|
|
764
|
+
/* Keep the dragged header above neighbors while they slide past (DOM order
|
|
765
|
+
would otherwise flip who paints on top mid-animation). */
|
|
766
|
+
.st-header-cell.st-dragging {
|
|
767
|
+
z-index: 2;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
/*
|
|
771
|
+
* Column-drag / FLIP pass-through paint.
|
|
772
|
+
*
|
|
773
|
+
* Body cells use `background-color: transparent` so a shared row fill shows
|
|
774
|
+
* through — when two cells slide past each other you see labels overlap, not
|
|
775
|
+
* opaque rectangles stacking. Neighboring headers do the same during reorder
|
|
776
|
+
* (the header strip already paints `--st-header-background-color`).
|
|
777
|
+
* `.st-flip-active` covers slides that continue after dragend.
|
|
778
|
+
*
|
|
779
|
+
* The dragged header keeps `--st-dragging-background-color` (see below) so the
|
|
780
|
+
* active column stays visually marked.
|
|
781
|
+
*/
|
|
782
|
+
.simple-table-root.st-column-reordering .st-header-cell,
|
|
783
|
+
.simple-table-root.st-column-reordering .st-header-cell.st-sub-header,
|
|
784
|
+
.st-header-cell.st-flip-active,
|
|
785
|
+
.st-header-cell.st-flip-active.st-sub-header {
|
|
786
|
+
background-color: transparent;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
/* Dragged header fill wins over the pass-through rule above. */
|
|
790
|
+
.simple-table-root.st-column-reordering .st-header-cell.st-dragging:not(.st-sub-header),
|
|
791
|
+
.st-header-cell.st-flip-active.st-dragging:not(.st-sub-header) {
|
|
792
|
+
background-color: var(--st-dragging-background-color);
|
|
793
|
+
}
|
|
794
|
+
.simple-table-root.st-column-reordering .st-header-cell.st-dragging.st-sub-header,
|
|
795
|
+
.st-header-cell.st-flip-active.st-dragging.st-sub-header {
|
|
796
|
+
background-color: var(--st-dragging-sub-header-background-color);
|
|
797
|
+
}
|
|
777
798
|
|
|
778
799
|
/* Loading skeleton styles */
|
|
779
800
|
.st-loading-skeleton {
|
|
@@ -1166,10 +1187,6 @@ input {
|
|
|
1166
1187
|
padding: var(--st-spacing-medium);
|
|
1167
1188
|
}
|
|
1168
1189
|
|
|
1169
|
-
/* Column Editor Search Styles */
|
|
1170
|
-
.st-column-editor-search {
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
1190
|
/* Column Editor List */
|
|
1174
1191
|
.st-column-editor-list {
|
|
1175
1192
|
display: flex;
|
|
@@ -1346,12 +1363,6 @@ input {
|
|
|
1346
1363
|
background: color-mix(in srgb, var(--st-column-editor-text-color) 12%, transparent);
|
|
1347
1364
|
}
|
|
1348
1365
|
|
|
1349
|
-
.st-column-pin-pinned-mark {
|
|
1350
|
-
display: flex;
|
|
1351
|
-
align-items: center;
|
|
1352
|
-
justify-content: center;
|
|
1353
|
-
}
|
|
1354
|
-
|
|
1355
1366
|
/* Pinned left/right: same surface as .st-column-pin-btn:hover */
|
|
1356
1367
|
.st-column-pin-pinned-active {
|
|
1357
1368
|
background: color-mix(in srgb, var(--st-column-editor-text-color) 12%, transparent);
|
|
@@ -1495,11 +1506,6 @@ input {
|
|
|
1495
1506
|
align-items: center;
|
|
1496
1507
|
}
|
|
1497
1508
|
|
|
1498
|
-
.st-nested-headers {
|
|
1499
|
-
display: flex;
|
|
1500
|
-
flex-direction: column;
|
|
1501
|
-
}
|
|
1502
|
-
|
|
1503
1509
|
.st-column-editor-popout.open {
|
|
1504
1510
|
min-width: 240px;
|
|
1505
1511
|
width: auto;
|
|
@@ -1566,77 +1572,6 @@ input {
|
|
|
1566
1572
|
color: var(--st-button-active-text-color);
|
|
1567
1573
|
}
|
|
1568
1574
|
|
|
1569
|
-
@keyframes slide-in-left {
|
|
1570
|
-
from {
|
|
1571
|
-
transform: translateX(-100%);
|
|
1572
|
-
}
|
|
1573
|
-
to {
|
|
1574
|
-
transform: translateX(0);
|
|
1575
|
-
}
|
|
1576
|
-
}
|
|
1577
|
-
|
|
1578
|
-
@keyframes slide-in-right {
|
|
1579
|
-
from {
|
|
1580
|
-
transform: translateX(100%);
|
|
1581
|
-
}
|
|
1582
|
-
to {
|
|
1583
|
-
transform: translateX(0);
|
|
1584
|
-
}
|
|
1585
|
-
}
|
|
1586
|
-
|
|
1587
|
-
/* Group Header Styles */
|
|
1588
|
-
.st-group-header {
|
|
1589
|
-
background-color: var(--st-header-background-color);
|
|
1590
|
-
cursor: pointer;
|
|
1591
|
-
user-select: none;
|
|
1592
|
-
height: 40px;
|
|
1593
|
-
display: flex;
|
|
1594
|
-
align-items: center;
|
|
1595
|
-
border-bottom: var(--st-border-width) solid var(--st-border-color);
|
|
1596
|
-
color: var(--st-cell-color);
|
|
1597
|
-
font-weight: 500;
|
|
1598
|
-
transition: background-color var(--st-transition-duration) var(--st-transition-ease);
|
|
1599
|
-
}
|
|
1600
|
-
|
|
1601
|
-
.st-group-header:hover {
|
|
1602
|
-
background-color: var(--st-button-hover-background-color);
|
|
1603
|
-
}
|
|
1604
|
-
|
|
1605
|
-
.st-group-header-content {
|
|
1606
|
-
display: flex;
|
|
1607
|
-
align-items: center;
|
|
1608
|
-
gap: var(--st-spacing-medium);
|
|
1609
|
-
}
|
|
1610
|
-
|
|
1611
|
-
.st-group-toggle-icon {
|
|
1612
|
-
font-size: 0.8em;
|
|
1613
|
-
width: 16px;
|
|
1614
|
-
height: 16px;
|
|
1615
|
-
display: flex;
|
|
1616
|
-
align-items: center;
|
|
1617
|
-
justify-content: center;
|
|
1618
|
-
}
|
|
1619
|
-
|
|
1620
|
-
.st-group-name {
|
|
1621
|
-
font-weight: 600;
|
|
1622
|
-
}
|
|
1623
|
-
|
|
1624
|
-
.st-group-count {
|
|
1625
|
-
color: var(--st-cell-odd-row-color);
|
|
1626
|
-
font-size: 0.9em;
|
|
1627
|
-
}
|
|
1628
|
-
|
|
1629
|
-
/* Animation for expand/collapse */
|
|
1630
|
-
.st-group-header.expanded .st-group-toggle-icon {
|
|
1631
|
-
transform: rotate(0deg);
|
|
1632
|
-
transition: transform var(--st-transition-duration) var(--st-transition-ease);
|
|
1633
|
-
}
|
|
1634
|
-
|
|
1635
|
-
.st-group-header.collapsed .st-group-toggle-icon {
|
|
1636
|
-
transform: rotate(-90deg);
|
|
1637
|
-
transition: transform var(--st-transition-duration) var(--st-transition-ease);
|
|
1638
|
-
}
|
|
1639
|
-
|
|
1640
1575
|
/* Row expand icon animation */
|
|
1641
1576
|
.st-expand-icon-container {
|
|
1642
1577
|
transition: transform var(--st-transition-duration) var(--st-transition-ease);
|
|
@@ -1822,12 +1757,6 @@ input {
|
|
|
1822
1757
|
color: var(--st-selected-cell-color);
|
|
1823
1758
|
}
|
|
1824
1759
|
|
|
1825
|
-
.st-dropdown-divider {
|
|
1826
|
-
height: 1px;
|
|
1827
|
-
margin: 4px 0;
|
|
1828
|
-
background-color: var(--st-border-color);
|
|
1829
|
-
}
|
|
1830
|
-
|
|
1831
1760
|
/* Datepicker css */
|
|
1832
1761
|
|
|
1833
1762
|
.st-datepicker {
|
|
@@ -2037,25 +1966,6 @@ input {
|
|
|
2037
1966
|
margin-bottom: var(--st-spacing-medium);
|
|
2038
1967
|
}
|
|
2039
1968
|
|
|
2040
|
-
/* Filter Select - Dropdown selectors */
|
|
2041
|
-
.st-filter-select {
|
|
2042
|
-
width: 100%;
|
|
2043
|
-
padding: var(--st-control-padding-y) var(--st-control-padding-x);
|
|
2044
|
-
border: var(--st-border-width) solid var(--st-border-color);
|
|
2045
|
-
border-radius: var(--st-border-radius);
|
|
2046
|
-
font-size: var(--st-overlay-font-size);
|
|
2047
|
-
background-color: var(--st-odd-row-background-color);
|
|
2048
|
-
color: var(--st-cell-color);
|
|
2049
|
-
font-family: inherit;
|
|
2050
|
-
cursor: pointer;
|
|
2051
|
-
outline: none;
|
|
2052
|
-
transition: border-color var(--st-transition-duration) var(--st-transition-ease);
|
|
2053
|
-
}
|
|
2054
|
-
|
|
2055
|
-
.st-filter-select:focus {
|
|
2056
|
-
border-color: var(--st-editable-cell-focus-border-color);
|
|
2057
|
-
}
|
|
2058
|
-
|
|
2059
1969
|
/* Filter Actions - Button container and buttons */
|
|
2060
1970
|
.st-filter-actions {
|
|
2061
1971
|
display: flex;
|
|
@@ -2282,14 +2192,6 @@ input {
|
|
|
2282
2192
|
font-style: italic;
|
|
2283
2193
|
}
|
|
2284
2194
|
|
|
2285
|
-
/* Row number styling */
|
|
2286
|
-
.st-row-number {
|
|
2287
|
-
font-size: 0.8em;
|
|
2288
|
-
opacity: 0.6;
|
|
2289
|
-
user-select: none;
|
|
2290
|
-
font-weight: 500;
|
|
2291
|
-
}
|
|
2292
|
-
|
|
2293
2195
|
/* Selection cell with row buttons layout */
|
|
2294
2196
|
.st-selection-cell-content {
|
|
2295
2197
|
display: flex;
|
|
@@ -2365,6 +2267,10 @@ input {
|
|
|
2365
2267
|
animation: st-tooltip-fade-in 0.2s ease-out;
|
|
2366
2268
|
}
|
|
2367
2269
|
|
|
2270
|
+
.simple-table-root.st-column-reordering .st-tooltip {
|
|
2271
|
+
display: none;
|
|
2272
|
+
}
|
|
2273
|
+
|
|
2368
2274
|
@keyframes st-tooltip-fade-in {
|
|
2369
2275
|
from {
|
|
2370
2276
|
opacity: 0;
|
|
@@ -2387,14 +2293,6 @@ input {
|
|
|
2387
2293
|
width: 100%;
|
|
2388
2294
|
}
|
|
2389
2295
|
|
|
2390
|
-
/* Empty spacer for pinned sections when state row is shown */
|
|
2391
|
-
.st-row.st-state-row-spacer {
|
|
2392
|
-
display: block;
|
|
2393
|
-
position: absolute;
|
|
2394
|
-
width: 100%;
|
|
2395
|
-
background-color: transparent;
|
|
2396
|
-
}
|
|
2397
|
-
|
|
2398
2296
|
/* The cell within state row that spans full width */
|
|
2399
2297
|
.st-state-row-cell {
|
|
2400
2298
|
grid-column: 1 / -1;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/* Modern Black Theme — near-black surfaces, hairline borders, logo-blue accent.
|
|
2
|
+
*
|
|
3
|
+
* Matches the Simple Table marketing site dark tokens:
|
|
4
|
+
* paper #0A0A0A, surface #141414, ink #FAFAFA, muted #A3A3A3,
|
|
5
|
+
* line #262626, accent #3B82F6 / hover #60A5FA.
|
|
6
|
+
*
|
|
7
|
+
* Same spacing as modern-dark (12px cell padding, 4px radius). Selection
|
|
8
|
+
* uses a light blue wash instead of a solid fill so it sits on the flat
|
|
9
|
+
* surface instead of fighting it.
|
|
10
|
+
*
|
|
11
|
+
* All structural rules live in base.css and are driven by these tokens.
|
|
12
|
+
*/
|
|
13
|
+
.theme-modern-black {
|
|
14
|
+
/* Layout/Structure variables - same room as modern-dark */
|
|
15
|
+
--st-border-radius: 4px;
|
|
16
|
+
--st-cell-padding: 12px;
|
|
17
|
+
|
|
18
|
+
/* Spacing variables */
|
|
19
|
+
--st-spacing-small: 4px;
|
|
20
|
+
--st-spacing-medium: 8px;
|
|
21
|
+
|
|
22
|
+
/* Overlay / filter control sizing (tracks roomier modern cell padding) */
|
|
23
|
+
--st-overlay-font-size: 14px;
|
|
24
|
+
--st-overlay-padding: 12px;
|
|
25
|
+
--st-control-padding-y: 8px;
|
|
26
|
+
--st-control-padding-x: 12px;
|
|
27
|
+
--st-datepicker-day-size: 32px;
|
|
28
|
+
|
|
29
|
+
/* Scrollbar variables */
|
|
30
|
+
--st-scrollbar-bg-color: #0a0a0a;
|
|
31
|
+
--st-scrollbar-thumb-color: #3a3a3a;
|
|
32
|
+
--st-scrollbar-width: thin;
|
|
33
|
+
|
|
34
|
+
/* Base/Structural colors */
|
|
35
|
+
--st-border-color: #262626;
|
|
36
|
+
--st-footer-background-color: #141414;
|
|
37
|
+
--st-footer-text-color: #a3a3a3;
|
|
38
|
+
--st-last-group-row-separator-border-color: #262626;
|
|
39
|
+
|
|
40
|
+
/* Row colors - flat surface, hover instead of stripes */
|
|
41
|
+
--st-odd-row-background-color: #141414;
|
|
42
|
+
--st-even-row-background-color: #141414;
|
|
43
|
+
--st-hover-row-background-color: #1c1c1c;
|
|
44
|
+
--st-selected-row-background-color: #18213d;
|
|
45
|
+
|
|
46
|
+
/* Column colors - no alternating columns by default */
|
|
47
|
+
--st-odd-column-background-color: #141414;
|
|
48
|
+
--st-even-column-background-color: #141414;
|
|
49
|
+
|
|
50
|
+
/* Header colors */
|
|
51
|
+
--st-header-background-color: #141414;
|
|
52
|
+
--st-sub-header-background-color: #0a0a0a;
|
|
53
|
+
--st-header-label-color: #fafafa;
|
|
54
|
+
--st-header-icon-color: #a3a3a3;
|
|
55
|
+
|
|
56
|
+
/* Cell colors */
|
|
57
|
+
--st-cell-color: #fafafa;
|
|
58
|
+
--st-cell-odd-row-color: #a3a3a3;
|
|
59
|
+
--st-edit-cell-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
|
|
60
|
+
--st-sub-cell-background-color: #0a0a0a;
|
|
61
|
+
--st-sub-cell-hover-background-color: #1c1c1c;
|
|
62
|
+
|
|
63
|
+
/* Selection colors - light blue wash, not a solid fill */
|
|
64
|
+
--st-selected-cell-background-color: #18213d;
|
|
65
|
+
--st-selected-first-cell-background-color: #19274f;
|
|
66
|
+
--st-selected-cell-color: #fafafa;
|
|
67
|
+
--st-selected-first-cell-color: #fafafa;
|
|
68
|
+
--st-selected-sub-cell-background-color: #18213d;
|
|
69
|
+
--st-selected-sub-cell-color: #fafafa;
|
|
70
|
+
--st-dragging-background-color: #1c1c1c;
|
|
71
|
+
--st-dragging-sub-header-background-color: #262626;
|
|
72
|
+
|
|
73
|
+
/* Interactive element colors */
|
|
74
|
+
--st-resize-handle-color: #262626;
|
|
75
|
+
--st-resize-handle-selected-color: #60a5fa;
|
|
76
|
+
|
|
77
|
+
/* Border colors */
|
|
78
|
+
--st-selected-border-color: #3b82f6;
|
|
79
|
+
--st-editable-cell-focus-border-color: #60a5fa;
|
|
80
|
+
--st-focus-ring-color: #60a5fa;
|
|
81
|
+
|
|
82
|
+
/* Button colors */
|
|
83
|
+
--st-button-hover-background-color: #1c1c1c;
|
|
84
|
+
--st-button-active-background-color: #3b82f6;
|
|
85
|
+
--st-button-active-text-color: var(--st-white);
|
|
86
|
+
--st-next-prev-btn-color: #a3a3a3;
|
|
87
|
+
--st-next-prev-btn-disabled-color: #525252;
|
|
88
|
+
--st-page-btn-color: #fafafa;
|
|
89
|
+
--st-page-btn-hover-background-color: #1c1c1c;
|
|
90
|
+
|
|
91
|
+
/* Checkbox colors */
|
|
92
|
+
--st-checkbox-background-color: #141414;
|
|
93
|
+
--st-checkbox-checked-background-color: #3b82f6;
|
|
94
|
+
--st-checkbox-checked-border-color: #3b82f6;
|
|
95
|
+
--st-checkbox-border-color: #262626;
|
|
96
|
+
|
|
97
|
+
/* Column editor colors */
|
|
98
|
+
--st-column-editor-background-color: #141414;
|
|
99
|
+
--st-column-editor-popout-background-color: #141414;
|
|
100
|
+
--st-column-editor-text-color: #a3a3a3;
|
|
101
|
+
|
|
102
|
+
/* Form element colors */
|
|
103
|
+
--st-datepicker-weekday-color: #a3a3a3;
|
|
104
|
+
--st-datepicker-other-month-color: #525252;
|
|
105
|
+
--st-filter-button-disabled-background-color: #1c1c1c;
|
|
106
|
+
--st-filter-button-disabled-text-color: #737373;
|
|
107
|
+
--st-muted-text-color: #a3a3a3;
|
|
108
|
+
|
|
109
|
+
/* Flash/Animation colors */
|
|
110
|
+
--st-cell-flash-color: #19274f;
|
|
111
|
+
--st-copy-flash-color: #60a5fa;
|
|
112
|
+
--st-warning-flash-color: #ef4444;
|
|
113
|
+
|
|
114
|
+
/* Tooltip variables */
|
|
115
|
+
--st-tooltip-background-color: #fafafa;
|
|
116
|
+
--st-tooltip-text-color: #171717;
|
|
117
|
+
--st-tooltip-border-radius: 6px;
|
|
118
|
+
--st-tooltip-padding: 6px 10px;
|
|
119
|
+
--st-tooltip-font-size: 12px;
|
|
120
|
+
--st-tooltip-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
|
|
121
|
+
|
|
122
|
+
/* Header selection colors */
|
|
123
|
+
--st-header-selected-background-color: #3b82f6;
|
|
124
|
+
--st-header-selected-label-color: var(--st-white);
|
|
125
|
+
--st-header-selected-icon-color: var(--st-white);
|
|
126
|
+
--st-header-highlight-indicator-color: #1e3a8a;
|
|
127
|
+
--st-selection-highlight-indicator-color: #262626;
|
|
128
|
+
|
|
129
|
+
/* Utility colors */
|
|
130
|
+
--st-loading-skeleton-bg-color: #1c1c1c;
|
|
131
|
+
--st-chart-color: #3b82f6;
|
|
132
|
+
--st-chart-fill-color: #60a5fa;
|
|
133
|
+
|
|
134
|
+
/* Drag and drop colors */
|
|
135
|
+
--st-drag-separator-color: #3b82f6;
|
|
136
|
+
|
|
137
|
+
/* Body background for state rows */
|
|
138
|
+
--st-body-background-color: #141414;
|
|
139
|
+
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import ColumnDef, { Accessor } from "../types/ColumnDef";
|
|
2
|
-
import { ColumnVisibilityState } from "../types/ColumnVisibilityTypes";
|
|
3
|
-
export interface ColumnManagerConfig {
|
|
4
|
-
headers: ColumnDef[];
|
|
5
|
-
collapsedHeaders: Set<Accessor>;
|
|
6
|
-
onColumnOrderChange?: (newHeaders: ColumnDef[]) => void;
|
|
7
|
-
onColumnVisibilityChange?: (visibilityState: ColumnVisibilityState) => void;
|
|
8
|
-
onColumnWidthChange?: (headers: ColumnDef[]) => void;
|
|
9
|
-
}
|
|
10
|
-
export interface ColumnManagerState {
|
|
11
|
-
headers: ColumnDef[];
|
|
12
|
-
collapsedHeaders: Set<Accessor>;
|
|
13
|
-
columnVisibility: ColumnVisibilityState;
|
|
14
|
-
draggedHeader: ColumnDef | null;
|
|
15
|
-
hoveredHeader: ColumnDef | null;
|
|
16
|
-
}
|
|
17
|
-
type StateChangeCallback = (state: ColumnManagerState) => void;
|
|
18
|
-
export declare class ColumnManager {
|
|
19
|
-
private config;
|
|
20
|
-
private state;
|
|
21
|
-
private subscribers;
|
|
22
|
-
constructor(config: ColumnManagerConfig);
|
|
23
|
-
private buildColumnVisibilityState;
|
|
24
|
-
updateConfig(config: Partial<ColumnManagerConfig>): void;
|
|
25
|
-
subscribe(callback: StateChangeCallback): () => void;
|
|
26
|
-
private notifySubscribers;
|
|
27
|
-
setHeaders(headers: ColumnDef[]): void;
|
|
28
|
-
setCollapsedHeaders(collapsedHeaders: Set<Accessor>): void;
|
|
29
|
-
toggleColumnCollapse(accessor: Accessor): void;
|
|
30
|
-
setColumnVisibility(accessor: Accessor, visible: boolean): void;
|
|
31
|
-
updateColumnWidth(accessor: Accessor, width: number | string): void;
|
|
32
|
-
reorderColumns(newHeaders: ColumnDef[]): void;
|
|
33
|
-
setDraggedHeader(header: ColumnDef | null): void;
|
|
34
|
-
setHoveredHeader(header: ColumnDef | null): void;
|
|
35
|
-
getState(): ColumnManagerState;
|
|
36
|
-
getHeaders(): ColumnDef[];
|
|
37
|
-
getCollapsedHeaders(): Set<Accessor>;
|
|
38
|
-
getColumnVisibility(): ColumnVisibilityState;
|
|
39
|
-
isColumnVisible(accessor: Accessor): boolean;
|
|
40
|
-
destroy(): void;
|
|
41
|
-
}
|
|
42
|
-
export {};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import ColumnDef, { Accessor } from "../types/ColumnDef";
|
|
2
|
-
import Row from "../types/Row";
|
|
3
|
-
import RowState from "../types/RowState";
|
|
4
|
-
import TableRow from "../types/TableRow";
|
|
5
|
-
import { HeightOffsets } from "../utils/infiniteScrollUtils";
|
|
6
|
-
import { CustomTheme } from "../types/CustomTheme";
|
|
7
|
-
import { GetRowId } from "../types/GetRowId";
|
|
8
|
-
export interface RowManagerConfig {
|
|
9
|
-
rows: Row[];
|
|
10
|
-
headers: ColumnDef[];
|
|
11
|
-
rowGrouping?: Accessor[];
|
|
12
|
-
getRowId?: GetRowId;
|
|
13
|
-
rowHeight: number;
|
|
14
|
-
headerHeight: number;
|
|
15
|
-
customTheme: CustomTheme;
|
|
16
|
-
hasLoadingRenderer: boolean;
|
|
17
|
-
hasErrorRenderer: boolean;
|
|
18
|
-
hasEmptyRenderer: boolean;
|
|
19
|
-
}
|
|
20
|
-
export interface RowManagerState {
|
|
21
|
-
expandedRows: Map<string, number>;
|
|
22
|
-
collapsedRows: Map<string, number>;
|
|
23
|
-
expandedDepths: Set<number>;
|
|
24
|
-
rowStateMap: Map<string | number, RowState>;
|
|
25
|
-
aggregatedRows: Row[];
|
|
26
|
-
flattenedRows: TableRow[];
|
|
27
|
-
heightOffsets: HeightOffsets;
|
|
28
|
-
paginatableRows: TableRow[];
|
|
29
|
-
parentEndPositions: number[];
|
|
30
|
-
}
|
|
31
|
-
type StateChangeCallback = (state: RowManagerState) => void;
|
|
32
|
-
export declare class RowManager {
|
|
33
|
-
private config;
|
|
34
|
-
private state;
|
|
35
|
-
private subscribers;
|
|
36
|
-
constructor(config: RowManagerConfig);
|
|
37
|
-
private getAllAggregationHeaders;
|
|
38
|
-
private calculateAggregation;
|
|
39
|
-
private computeAggregatedRows;
|
|
40
|
-
private computeFlattenedRows;
|
|
41
|
-
updateConfig(config: Partial<RowManagerConfig>): void;
|
|
42
|
-
subscribe(callback: StateChangeCallback): () => void;
|
|
43
|
-
private notifySubscribers;
|
|
44
|
-
setExpandedRows(expandedRows: Map<string, number>): void;
|
|
45
|
-
setCollapsedRows(collapsedRows: Map<string, number>): void;
|
|
46
|
-
setExpandedDepths(expandedDepths: Set<number>): void;
|
|
47
|
-
setRowStateMap(rowStateMap: Map<string | number, RowState>): void;
|
|
48
|
-
getState(): RowManagerState;
|
|
49
|
-
getAggregatedRows(): Row[];
|
|
50
|
-
getFlattenedRows(): TableRow[];
|
|
51
|
-
getHeightOffsets(): HeightOffsets;
|
|
52
|
-
getPaginatableRows(): TableRow[];
|
|
53
|
-
getParentEndPositions(): number[];
|
|
54
|
-
destroy(): void;
|
|
55
|
-
}
|
|
56
|
-
export {};
|