@vuu-ui/vuu-table 2.1.19-beta.1 → 2.1.19-beta.2
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/package.json +12 -13
- package/src/CellFocusState.mjs +25 -0
- package/src/Row.mjs +83 -0
- package/src/Table.css.js +441 -0
- package/src/Table.mjs +297 -0
- package/src/VirtualColSpan.mjs +12 -0
- package/src/applyHighlighting.mjs +28 -0
- package/src/bulk-edit/BulkEditPanel.css.js +27 -0
- package/src/bulk-edit/BulkEditPanel.mjs +77 -0
- package/src/bulk-edit/ColumnCascadingUpdateEditor.css.js +86 -0
- package/src/bulk-edit/ColumnCascadingUpdateEditor.mjs +59 -0
- package/src/bulk-edit/InsertNewRowEditor.css.js +86 -0
- package/src/bulk-edit/InsertNewRowEditor.mjs +59 -0
- package/src/bulk-edit/useBulkEditPanel.mjs +61 -0
- package/src/bulk-edit/useColumnCascadingEditor.mjs +124 -0
- package/src/cell-block/CellBlock.css.js +95 -0
- package/src/cell-block/CellBlock.mjs +32 -0
- package/src/cell-block/cellblock-utils.mjs +114 -0
- package/src/cell-block/useCellBlockSelection.mjs +245 -0
- package/src/cell-renderers/checkbox-cell/CheckboxCell.css.js +16 -0
- package/src/cell-renderers/checkbox-cell/CheckboxCell.mjs +56 -0
- package/src/cell-renderers/checkbox-cell/index.mjs +1 -0
- package/src/cell-renderers/checkbox-row-selector/CheckboxRowSelectorCell.css.js +19 -0
- package/src/cell-renderers/checkbox-row-selector/CheckboxRowSelectorCell.mjs +34 -0
- package/src/cell-renderers/checkbox-row-selector/index.mjs +1 -0
- package/src/cell-renderers/index.mjs +4 -0
- package/src/cell-renderers/input-cell/InputCell.css.js +81 -0
- package/src/cell-renderers/input-cell/InputCell.mjs +73 -0
- package/src/cell-renderers/input-cell/index.mjs +1 -0
- package/src/cell-renderers/input-cell/useInputCell.mjs +199 -0
- package/src/cell-renderers/toggle-cell/ToggleCell.css.js +31 -0
- package/src/cell-renderers/toggle-cell/ToggleCell.mjs +47 -0
- package/src/cell-renderers/toggle-cell/index.mjs +1 -0
- package/src/column-header-pill/ColumnHeaderPill.css.js +34 -0
- package/src/column-header-pill/ColumnHeaderPill.mjs +39 -0
- package/src/column-header-pill/GroupColumnPill.css.js +10 -0
- package/src/column-header-pill/GroupColumnPill.mjs +33 -0
- package/src/column-header-pill/SortIndicator.css.js +15 -0
- package/src/column-header-pill/SortIndicator.mjs +29 -0
- package/src/column-header-pill/index.mjs +3 -0
- package/src/column-resizing/ColumnResizer.css.js +32 -0
- package/src/column-resizing/ColumnResizer.mjs +69 -0
- package/src/column-resizing/index.mjs +2 -0
- package/src/column-resizing/useTableColumnResize.mjs +57 -0
- package/src/data-row/DataRow.mjs +298 -0
- package/src/header-cell/GroupHeaderCell.css.js +91 -0
- package/src/header-cell/GroupHeaderCell.mjs +98 -0
- package/src/header-cell/HeaderCell.css.js +182 -0
- package/src/header-cell/HeaderCell.mjs +126 -0
- package/src/header-cell/index.mjs +2 -0
- package/src/index.mjs +20 -0
- package/src/pagination/PaginationControl.css.js +18 -0
- package/src/pagination/PaginationControl.mjs +34 -0
- package/src/pagination/index.mjs +1 -0
- package/src/pagination/usePagination.mjs +29 -0
- package/src/table-cell/TableCell.css.js +67 -0
- package/src/table-cell/TableCell.mjs +54 -0
- package/src/table-cell/TableGroupCell.css.js +91 -0
- package/src/table-cell/TableGroupCell.mjs +61 -0
- package/src/table-cell/index.mjs +2 -0
- package/src/table-config/useTableConfig.mjs +49 -0
- package/src/table-config.mjs +38 -0
- package/src/table-data-source/DataRowMovingWindow.mjs +66 -0
- package/src/table-data-source/useDataSource.mjs +177 -0
- package/src/table-dom-utils.mjs +162 -0
- package/src/table-header/HeaderProvider.mjs +14 -0
- package/src/table-header/TableHeader.mjs +182 -0
- package/src/table-header/index.mjs +2 -0
- package/src/table-header/useTableHeader.mjs +69 -0
- package/src/useCell.mjs +22 -0
- package/src/useCellEditing.mjs +58 -0
- package/src/useCellFocus.mjs +112 -0
- package/src/useControlledTableNavigation.mjs +34 -0
- package/src/useEditableCell.mjs +18 -0
- package/src/useInitialValue.mjs +6 -0
- package/src/useKeyboardNavigation.mjs +275 -0
- package/src/useMeasuredHeight.mjs +44 -0
- package/src/useResizeObserver.mjs +118 -0
- package/src/useRowClassNameGenerators.mjs +21 -0
- package/src/useSelection.mjs +101 -0
- package/src/useTable.mjs +588 -0
- package/src/useTableContextMenu.mjs +54 -0
- package/src/useTableModel.mjs +344 -0
- package/src/useTableScroll.mjs +382 -0
- package/src/useTableViewport.mjs +120 -0
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.19-beta.
|
|
2
|
+
"version": "2.1.19-beta.2",
|
|
3
3
|
"author": "heswell",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"devDependencies": {
|
|
6
|
-
"@vuu-ui/vuu-data-types": "2.1.19-beta.
|
|
7
|
-
"@vuu-ui/vuu-table-types": "2.1.19-beta.
|
|
8
|
-
"@vuu-ui/vuu-protocol-types": "2.1.19-beta.
|
|
6
|
+
"@vuu-ui/vuu-data-types": "2.1.19-beta.2",
|
|
7
|
+
"@vuu-ui/vuu-table-types": "2.1.19-beta.2",
|
|
8
|
+
"@vuu-ui/vuu-protocol-types": "2.1.19-beta.2"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@salt-ds/core": "1.54.1",
|
|
12
12
|
"@salt-ds/styles": "0.2.1",
|
|
13
13
|
"@salt-ds/window": "0.1.1",
|
|
14
|
-
"@vuu-ui/vuu-context-menu": "2.1.19-beta.
|
|
15
|
-
"@vuu-ui/vuu-data-react": "2.1.19-beta.
|
|
16
|
-
"@vuu-ui/vuu-popups": "2.1.19-beta.
|
|
17
|
-
"@vuu-ui/vuu-table-extras": "2.1.19-beta.
|
|
18
|
-
"@vuu-ui/vuu-ui-controls": "2.1.19-beta.
|
|
19
|
-
"@vuu-ui/vuu-utils": "2.1.19-beta.
|
|
14
|
+
"@vuu-ui/vuu-context-menu": "2.1.19-beta.2",
|
|
15
|
+
"@vuu-ui/vuu-data-react": "2.1.19-beta.2",
|
|
16
|
+
"@vuu-ui/vuu-popups": "2.1.19-beta.2",
|
|
17
|
+
"@vuu-ui/vuu-table-extras": "2.1.19-beta.2",
|
|
18
|
+
"@vuu-ui/vuu-ui-controls": "2.1.19-beta.2",
|
|
19
|
+
"@vuu-ui/vuu-utils": "2.1.19-beta.2"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"clsx": "^2.0.0",
|
|
@@ -25,13 +25,12 @@
|
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
27
|
"README.md",
|
|
28
|
-
"
|
|
29
|
-
"cjs",
|
|
28
|
+
"src",
|
|
30
29
|
"/types"
|
|
31
30
|
],
|
|
32
31
|
"exports": {
|
|
33
32
|
".": {
|
|
34
|
-
"import": "./index.js",
|
|
33
|
+
"import": "./src/index.js",
|
|
35
34
|
"types": "./types/index.d.ts"
|
|
36
35
|
}
|
|
37
36
|
},
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { getAriaCellPos } from "./table-dom-utils.mjs";
|
|
2
|
+
class CellFocusState {
|
|
3
|
+
#cellPos = void 0;
|
|
4
|
+
#el = null;
|
|
5
|
+
outsideViewport = false;
|
|
6
|
+
placeholderEl = null;
|
|
7
|
+
pos = void 0;
|
|
8
|
+
set cell(cell) {
|
|
9
|
+
this.#el = cell;
|
|
10
|
+
this.#cellPos = getAriaCellPos(cell);
|
|
11
|
+
}
|
|
12
|
+
get cellPos() {
|
|
13
|
+
return this.#cellPos;
|
|
14
|
+
}
|
|
15
|
+
set cellPos(cellPos) {
|
|
16
|
+
this.#cellPos = cellPos;
|
|
17
|
+
}
|
|
18
|
+
get el() {
|
|
19
|
+
return this.#el;
|
|
20
|
+
}
|
|
21
|
+
set el(el) {
|
|
22
|
+
this.#el = el;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export { CellFocusState };
|
package/src/Row.mjs
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { isGroupColumn, isJsonColumn, isJsonGroup, isNotHidden, queryClosest } from "@vuu-ui/vuu-utils";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { memo, useCallback } from "react";
|
|
5
|
+
import { TableCell, TableGroupCell } from "./table-cell/index.mjs";
|
|
6
|
+
import { VirtualColSpan } from "./VirtualColSpan.mjs";
|
|
7
|
+
const classBase = "vuuTableRow";
|
|
8
|
+
const Row = /*#__PURE__*/ memo(({ className: classNameProp, classNameGenerator, columns, dataRow, groupToggleTarget = "group-column", highlighted, offset, onCellEdit, onClick, onDataEdited, onToggleGroup, searchPattern, showBookends = true, virtualColSpan = 0, zebraStripes = false, ...htmlAttributes })=>{
|
|
9
|
+
const { childCount, depth, index: rowIndex, isExpanded, isLeaf, isSelected } = dataRow;
|
|
10
|
+
const handleRowClick = useCallback((evt)=>{
|
|
11
|
+
const rangeSelect = evt.shiftKey;
|
|
12
|
+
const keepExistingSelection = evt.ctrlKey || evt.metaKey;
|
|
13
|
+
onClick?.(evt, dataRow, rangeSelect, keepExistingSelection);
|
|
14
|
+
}, [
|
|
15
|
+
dataRow,
|
|
16
|
+
onClick
|
|
17
|
+
]);
|
|
18
|
+
const className = clsx(classBase, classNameProp, classNameGenerator?.(dataRow), {
|
|
19
|
+
[`${classBase}-even`]: zebraStripes && rowIndex % 2 === 0,
|
|
20
|
+
[`${classBase}-highlighted`]: highlighted
|
|
21
|
+
});
|
|
22
|
+
const canExpand = false === isLeaf && childCount > 0;
|
|
23
|
+
const ariaExpanded = isExpanded ? true : canExpand ? false : void 0;
|
|
24
|
+
const ariaLevel = isLeaf && 1 === depth ? void 0 : depth;
|
|
25
|
+
const style = {
|
|
26
|
+
top: offset
|
|
27
|
+
};
|
|
28
|
+
const handleGroupCellClick = useCallback((evt, column)=>{
|
|
29
|
+
if (isGroupColumn(column) || isJsonGroup(column, dataRow)) {
|
|
30
|
+
const toggleIconClicked = null !== queryClosest(evt.target, ".vuuToggleIconButton");
|
|
31
|
+
if ("toggle-icon" === groupToggleTarget) {
|
|
32
|
+
if (!toggleIconClicked) return;
|
|
33
|
+
}
|
|
34
|
+
if (toggleIconClicked) evt.stopPropagation();
|
|
35
|
+
onToggleGroup?.(dataRow, column);
|
|
36
|
+
}
|
|
37
|
+
}, [
|
|
38
|
+
dataRow,
|
|
39
|
+
groupToggleTarget,
|
|
40
|
+
onToggleGroup
|
|
41
|
+
]);
|
|
42
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
43
|
+
...htmlAttributes,
|
|
44
|
+
"aria-expanded": ariaExpanded,
|
|
45
|
+
"aria-selected": isSelected ? "true" : void 0,
|
|
46
|
+
"aria-level": ariaLevel,
|
|
47
|
+
role: "row",
|
|
48
|
+
className: className,
|
|
49
|
+
onClick: handleRowClick,
|
|
50
|
+
style: style,
|
|
51
|
+
children: [
|
|
52
|
+
showBookends ? /*#__PURE__*/ jsx("div", {
|
|
53
|
+
className: "vuuSelectionDecorator vuuStickyLeft",
|
|
54
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
55
|
+
className: "vuuTableRowBookend"
|
|
56
|
+
})
|
|
57
|
+
}) : null,
|
|
58
|
+
/*#__PURE__*/ jsx(VirtualColSpan, {
|
|
59
|
+
width: virtualColSpan
|
|
60
|
+
}),
|
|
61
|
+
columns.filter(isNotHidden).map((column)=>{
|
|
62
|
+
const isGroup = isGroupColumn(column);
|
|
63
|
+
const isJsonCell = isJsonColumn(column);
|
|
64
|
+
const Cell = isGroup && !isJsonCell ? TableGroupCell : TableCell;
|
|
65
|
+
return /*#__PURE__*/ jsx(Cell, {
|
|
66
|
+
column: column,
|
|
67
|
+
dataRow: dataRow,
|
|
68
|
+
onClick: isGroup || isJsonCell ? handleGroupCellClick : void 0,
|
|
69
|
+
onDataEdited: onDataEdited,
|
|
70
|
+
searchPattern: searchPattern
|
|
71
|
+
}, column.name);
|
|
72
|
+
}),
|
|
73
|
+
showBookends ? /*#__PURE__*/ jsx("div", {
|
|
74
|
+
className: "vuuSelectionDecorator vuuStickyRight",
|
|
75
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
76
|
+
className: "vuuTableRowBookend"
|
|
77
|
+
})
|
|
78
|
+
}) : null
|
|
79
|
+
]
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
Row.displayName = "Row";
|
|
83
|
+
export { Row };
|
package/src/Table.css.js
ADDED
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
const css = `
|
|
2
|
+
.vuuTable {
|
|
3
|
+
--vuu-table-cell-outlineWidth: 1px;
|
|
4
|
+
--vuu-table-col-header-row-height: var(--salt-size-base, 32px);
|
|
5
|
+
--vuu-table-col-heading-height: 25px;
|
|
6
|
+
--vuu-table-footer-height: 0px;
|
|
7
|
+
--vuu-table-row-background-selected: var(--vuuTableRow-background-selected, var(--salt-selectable-background-selected));
|
|
8
|
+
--vuu-table-row-background-highlighted: var(--vuuTableRow-background-highlighted, var(--salt-selectable-background-hover));
|
|
9
|
+
--vuu-table-row-borderColor-selected: var(--vuuTableRow-borderColor-selected, var(--salt-selectable-borderColor-selected));
|
|
10
|
+
--vuu-table-row-bookend-background-selected: var(--vuuTableRow-bookend-background-selected, var(--salt-selectable-background-selected));
|
|
11
|
+
--vuu-table-row-height: var(--salt-size-base, 32px);
|
|
12
|
+
--vuu-table-row-selection-borderRadius: var(--vuuTable-row-selection-borderRadius, 5px);
|
|
13
|
+
--table-background: var(--vuuTable-background, var(--salt-container-primary-background));
|
|
14
|
+
--table-height: var(--measured-px-height);
|
|
15
|
+
--table-width: var(--measured-px-width);
|
|
16
|
+
--columnResizer-color: transparent;
|
|
17
|
+
--row-height: var(--row-height-prop, var(--vuu-table-row-height, var(--salt-size-base)));
|
|
18
|
+
--col-header-row-height: var(--col-header-row-height-prop, var(--vuu-table-col-header-row-height, var(--salt-size-base)));
|
|
19
|
+
--cell-borderColor: transparent;
|
|
20
|
+
--row-borderColor: var(--row-background);
|
|
21
|
+
--vuu-table-embedded-control-height: calc(var(--row-height) - 3px);
|
|
22
|
+
background: var(--table-background);
|
|
23
|
+
font-family: var(--vuuTable-fontFamily, var(--salt-typography-fontFamily, sans-serif));
|
|
24
|
+
-webkit-user-select: none;
|
|
25
|
+
user-select: none;
|
|
26
|
+
position: relative;
|
|
27
|
+
|
|
28
|
+
&.vuuTable-viewportRowLimit {
|
|
29
|
+
height: fit-content;
|
|
30
|
+
|
|
31
|
+
& .vuuTable-contentContainer {
|
|
32
|
+
height: calc(var(--measured-px-height) + var(--total-header-height));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
& .vuuTable-scrollbarContainer {
|
|
36
|
+
height: calc(var(--measured-px-height) + var(--horizontal-scrollbar-height));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
& .vuuTable-scrollbarFiller {
|
|
40
|
+
height: var(--horizontal-scrollbar-height);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&.vuuTable-maxViewportRowLimit {
|
|
45
|
+
height: fit-content;
|
|
46
|
+
padding-bottom: var(--horizontal-scrollbar-height);
|
|
47
|
+
|
|
48
|
+
& .vuuTable-contentContainer {
|
|
49
|
+
height: min(calc(var(--measured-px-height) + var(--total-header-height)),
|
|
50
|
+
calc(var(--content-height) + var(--total-header-height)));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
& .vuuTable-scrollbarContainer {
|
|
54
|
+
height: min(calc(var(--measured-px-height) + var(--horizontal-scrollbar-height)),
|
|
55
|
+
calc(var(--content-height) + var(--horizontal-scrollbar-height)));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
& .vuuTable-scrollbarFiller {
|
|
59
|
+
height: var(--horizontal-scrollbar-height);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
& .vuuTable-editing {
|
|
64
|
+
--vuu-table-row-background-highlighted: transparent;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.vuuTable-zebra {
|
|
69
|
+
--table-zebraColor: var(--vuuTable-zebraColor, var(--salt-container-secondary-background));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.vuuTable-colLines {
|
|
73
|
+
--cell-borderColor: var(--salt-separable-tertiary-borderColor);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.vuuTable-rowLines {
|
|
77
|
+
--row-borderColor: var(--salt-separable-tertiary-borderColor);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.vuuTable-scrollbarContainer {
|
|
81
|
+
height: var(--viewport-body-height);
|
|
82
|
+
left: 0;
|
|
83
|
+
top: var(--total-header-height);
|
|
84
|
+
width: var(--table-width);
|
|
85
|
+
position: absolute;
|
|
86
|
+
overflow: auto;
|
|
87
|
+
border-top: none !important;
|
|
88
|
+
border-bottom: none !important;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.vuuTable-scrollbarContainer::-webkit-scrollbar {
|
|
92
|
+
width: 10px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.vuuTable-scrollbarContainer::-webkit-scrollbar:horizontal {
|
|
96
|
+
height: 10px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.vuuTable-scrollbarContainer::-webkit-scrollbar-track {
|
|
100
|
+
background-color: #0000;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.vuuTable-scrollbarContainer::-webkit-scrollbar-thumb {
|
|
104
|
+
background-clip: padding-box;
|
|
105
|
+
background-color: var(--vuu-color-gray-30);
|
|
106
|
+
border: 2px solid #0000;
|
|
107
|
+
border-radius: 10px;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.vuuTable-scrollbarContent {
|
|
111
|
+
height: calc(var(--content-height) + var(--horizontal-scrollbar-height));
|
|
112
|
+
width: var(--content-width);
|
|
113
|
+
position: absolute;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.vuuTable-contentContainer {
|
|
117
|
+
--table-content-container-width: calc(var(--table-width) - var(--vertical-scrollbar-width));
|
|
118
|
+
background: var(--table-background);
|
|
119
|
+
height: calc(100% - var(--horizontal-scrollbar-height) - var(--vuu-table-footer-height));
|
|
120
|
+
overscroll-behavior: none;
|
|
121
|
+
width: var(--table-content-container-width);
|
|
122
|
+
position: relative;
|
|
123
|
+
overflow: auto;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.vuuTable-contentContainer::-webkit-scrollbar {
|
|
127
|
+
display: none;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.vuuTable-table {
|
|
131
|
+
border-collapse: separate;
|
|
132
|
+
border-spacing: 0;
|
|
133
|
+
table-layout: fixed;
|
|
134
|
+
width: var(--content-width);
|
|
135
|
+
border: none;
|
|
136
|
+
margin: 0;
|
|
137
|
+
position: absolute;
|
|
138
|
+
top: 0;
|
|
139
|
+
left: 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.vuuTable-body {
|
|
143
|
+
height: var(--content-height);
|
|
144
|
+
position: relative;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.vuuTable-focusCellPlaceholder {
|
|
148
|
+
height: var(--row-height);
|
|
149
|
+
z-index: -1;
|
|
150
|
+
width: 50px;
|
|
151
|
+
position: absolute;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.vuuPinLeft, .vuuPinRight {
|
|
155
|
+
background-color: inherit;
|
|
156
|
+
z-index: 1;
|
|
157
|
+
position: sticky;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.vuuPinRight {
|
|
161
|
+
& .vuuColumnResizer {
|
|
162
|
+
cursor: default;
|
|
163
|
+
pointer-events: none;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.vuuTableHeaderCell.vuuPinLeft, .vuuTableHeaderCell.vuuPinRight {
|
|
168
|
+
z-index: 2;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.vuuTableHeader {
|
|
172
|
+
--row-height: var(--vuu-table-col-header-row-height);
|
|
173
|
+
background-color: var(--vuuTableHeader-background, var(--table-background));
|
|
174
|
+
border-bottom: solid 1px
|
|
175
|
+
var(--vuuTableHeader-borderColor, var(--salt-separable-tertiary-borderColor));
|
|
176
|
+
color: var(--salt-content-secondary-foreground);
|
|
177
|
+
font-size: var(--VuuTableHeader-fontSize, vasr(--salt-text-label-fontSize));
|
|
178
|
+
white-space: nowrap;
|
|
179
|
+
z-index: 1;
|
|
180
|
+
position: sticky;
|
|
181
|
+
top: 0;
|
|
182
|
+
|
|
183
|
+
& .vuuDraggable-spacer {
|
|
184
|
+
display: var(--vuuDraggable-display, inline-block);
|
|
185
|
+
height: var(--vuu-table-col-header-row-height);
|
|
186
|
+
border-bottom: 1px solid #ccc;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
& .vuuStickyLeft {
|
|
190
|
+
z-index: 1;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
& .vuuStickyRight {
|
|
194
|
+
z-index: 0;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.vuuTableHeader:hover {
|
|
199
|
+
--columnResizer-height: var(--vuu-table-col-header-row-height);
|
|
200
|
+
--columnResizer-color: var(--salt-separable-tertiary-borderColor);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.vuuTable-heading {
|
|
204
|
+
height: var(--vuu-table-col-heading-height);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.sizer-cell {
|
|
208
|
+
height: 0;
|
|
209
|
+
border: none !important;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.vuuDraggable-vuuTable {
|
|
213
|
+
--cell-borderColor: transparent;
|
|
214
|
+
--vuu-table-col-header-row-height: var(--vuuTableHeaderCell-height, 25px);
|
|
215
|
+
--vuuTableHeaderCell-background: var(--salt-container-secondary-background);
|
|
216
|
+
--row-height: 25px;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.vuuTable-pagination {
|
|
220
|
+
--vuu-table-footer-height: 32px;
|
|
221
|
+
|
|
222
|
+
& .vuuTableHeader {
|
|
223
|
+
position: relative;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
& .vuuTable-body {
|
|
227
|
+
height: calc(var(--content-height) - var(--total-header-height));
|
|
228
|
+
position: relative;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
& .vuuTableRow {
|
|
232
|
+
position: relative;
|
|
233
|
+
top: auto;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.vuuTable-footer {
|
|
238
|
+
height: var(--vuu-table-footer-height);
|
|
239
|
+
justify-content: flex-end;
|
|
240
|
+
align-items: center;
|
|
241
|
+
display: flex;
|
|
242
|
+
position: absolute;
|
|
243
|
+
bottom: 0;
|
|
244
|
+
left: 0;
|
|
245
|
+
right: 0;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.vuuHighlight {
|
|
249
|
+
color: #00f;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.DragColumn {
|
|
253
|
+
box-shadow: var(--salt-overlayable-shadow-drag);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
@keyframes fadeIn {
|
|
257
|
+
0% {
|
|
258
|
+
opacity: 0;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
90% {
|
|
262
|
+
opacity: 0;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
100% {
|
|
266
|
+
opacity: 1;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.vuuTable-emptyDisplay {
|
|
271
|
+
justify-content: center;
|
|
272
|
+
align-items: center;
|
|
273
|
+
animation: .8s fadeIn;
|
|
274
|
+
display: flex;
|
|
275
|
+
position: absolute;
|
|
276
|
+
inset: 0;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.vuuTable-emptyDisplay ~ .vuuTable-contentContainer {
|
|
280
|
+
visibility: hidden;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.vuuRowProxy {
|
|
284
|
+
visibility: hidden;
|
|
285
|
+
position: absolute !important;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.vuuTableColHeaderRow {
|
|
289
|
+
height: var(--col-header-row-height);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.vuuTableRow {
|
|
293
|
+
background: var(--row-background, var(--table-background));
|
|
294
|
+
border-bottom: 1px solid var(--row-borderColor, var(--table-background));
|
|
295
|
+
box-sizing: border-box;
|
|
296
|
+
color: var(--salt-content-primary-foreground);
|
|
297
|
+
contain: layout;
|
|
298
|
+
font-size: var(--VuuTableRow-fontSize, vasr(--salt-text-fontSize));
|
|
299
|
+
height: var(--row-height);
|
|
300
|
+
line-height: var(--row-height);
|
|
301
|
+
white-space: nowrap;
|
|
302
|
+
width: 100%;
|
|
303
|
+
position: absolute;
|
|
304
|
+
top: 0;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.vuuTableRow-even {
|
|
308
|
+
--row-background: var(--table-zebraColor);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.vuuTableRow-highlighted {
|
|
312
|
+
background: var(--vuu-table-row-background-highlighted);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.vuuTableRow[aria-selected="true"] {
|
|
316
|
+
background-color: var(--vuu-table-row-background-selected);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.vuuTableRow[aria-expanded="true"] {
|
|
320
|
+
--toggle-icon-transform: rotate(90deg);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.vuuDraggable .vuuTableRow {
|
|
324
|
+
--cell-borderColor: transparent;
|
|
325
|
+
--vuu-selection-decorator-bg: transparent;
|
|
326
|
+
z-index: 1;
|
|
327
|
+
transform: none !important;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.vuuSelectionDecorator {
|
|
331
|
+
background: var(--table-background);
|
|
332
|
+
height: var(--row-height);
|
|
333
|
+
width: var(--table-selection-bookend-width, 4px);
|
|
334
|
+
z-index: 2;
|
|
335
|
+
display: inline-block;
|
|
336
|
+
position: relative;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.vuuTableRow:not([aria-selected="true"]) {
|
|
340
|
+
& .vuuTableRowBookend {
|
|
341
|
+
display: none;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.vuuSelectionDecorator.vuuStickyLeft {
|
|
346
|
+
position: sticky;
|
|
347
|
+
left: 0;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.vuuSelectionDecorator.vuuStickyRight {
|
|
351
|
+
position: sticky;
|
|
352
|
+
right: 0;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.vuuTableRowBookend {
|
|
356
|
+
position: absolute;
|
|
357
|
+
inset: -1px 0 0;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.vuuTable-rowSelection-bordered {
|
|
361
|
+
& .vuuSelectionDecorator {
|
|
362
|
+
& .vuuTableRowBookend {
|
|
363
|
+
background-color: var(--vuu-table-row-bookend-background-selected);
|
|
364
|
+
border-color: var(--vuu-table-row-borderColor-selected);
|
|
365
|
+
width: var(--table-selection-bookend-width, 4px);
|
|
366
|
+
border-width: 1px;
|
|
367
|
+
|
|
368
|
+
&:before {
|
|
369
|
+
content: none !important;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
&.vuuStickyLeft {
|
|
374
|
+
& .vuuTableRowBookend {
|
|
375
|
+
border-left-style: solid;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
&.vuuStickyRight {
|
|
380
|
+
& .vuuTableRowBookend {
|
|
381
|
+
border-right-style: solid;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
& .vuuTableRow[aria-selected="true"] {
|
|
387
|
+
& .vuuSelectionDecorator {
|
|
388
|
+
background-color: var(--table-background);
|
|
389
|
+
border: none;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
& .vuuTableRow:not([aria-selected="true"]):has( + .vuuTableRow[aria-selected="true"]) {
|
|
394
|
+
border-bottom-color: #0000;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
& .vuuTableRow:not([aria-selected="true"]) + .vuuTableRow[aria-selected="true"], & .vuuTableRow[aria-selected="true"][data-first-row="true"] {
|
|
398
|
+
border-radius: 0;
|
|
399
|
+
|
|
400
|
+
&:after {
|
|
401
|
+
background: var(--vuu-table-row-borderColor-selected);
|
|
402
|
+
content: "";
|
|
403
|
+
height: 1px;
|
|
404
|
+
width: calc(var(--content-width) - 8px);
|
|
405
|
+
z-index: 1;
|
|
406
|
+
position: absolute;
|
|
407
|
+
top: 0;
|
|
408
|
+
left: 4px;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
& .vuuStickyLeft .vuuTableRowBookend {
|
|
412
|
+
border-top-left-radius: var(--vuu-table-row-selection-borderRadius);
|
|
413
|
+
border-top-style: solid;
|
|
414
|
+
margin-top: 1px;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
& .vuuStickyRight .vuuTableRowBookend {
|
|
418
|
+
border-top-right-radius: var(--vuu-table-row-selection-borderRadius);
|
|
419
|
+
border-top-style: solid;
|
|
420
|
+
margin-top: 1px;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
& .vuuTableRow[aria-selected="true"]:has( + .vuuTableRow:not([aria-selected="true"])) {
|
|
425
|
+
border-bottom-color: var(--vuu-table-row-borderColor-selected);
|
|
426
|
+
|
|
427
|
+
& .vuuStickyLeft .vuuTableRowBookend {
|
|
428
|
+
border-bottom-left-radius: var(--vuu-table-row-selection-borderRadius);
|
|
429
|
+
border-bottom-style: solid;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
& .vuuStickyRight .vuuTableRowBookend {
|
|
433
|
+
border-bottom-right-radius: var(--vuu-table-row-selection-borderRadius);
|
|
434
|
+
border-bottom-style: solid;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
`;
|
|
441
|
+
export default css;
|