@keenmate/web-grid 1.0.0-rc14 → 1.0.0-rc15
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 +2 -0
- package/dist/modules/navigation/focus.d.ts +6 -0
- package/dist/modules/navigation/index.d.ts +1 -1
- package/dist/modules/types.d.ts +1 -0
- package/dist/web-component.d.ts +1 -0
- package/dist/web-grid.js +679 -612
- package/dist/web-grid.umd.js +44 -44
- package/package.json +1 -1
- package/src/css/_cells.css +5 -2
- package/src/css/_navigation.css +9 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keenmate/web-grid",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-rc15",
|
|
4
4
|
"description": "Framework-agnostic data grid web component with sorting, filtering, inline editing, and keyboard navigation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/web-grid.umd.js",
|
package/src/css/_cells.css
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
color: var(--wg-cell-color);
|
|
10
10
|
height: var(--wg-row-min-height); /* In table layout, height acts as min-height */
|
|
11
11
|
box-sizing: border-box; /* Include padding in width calculation */
|
|
12
|
+
/* Positioned ancestor for absolute children (checkbox, edit button, etc.) */
|
|
13
|
+
position: relative;
|
|
12
14
|
/* Account for sticky header when scrolling into view */
|
|
13
15
|
scroll-margin-top: calc(3.0 * var(--wg-rem));
|
|
14
16
|
scroll-margin-bottom: calc(0.5 * var(--wg-rem));
|
|
@@ -50,7 +52,6 @@
|
|
|
50
52
|
============================================================================== */
|
|
51
53
|
.wg__cell--editable {
|
|
52
54
|
cursor: pointer;
|
|
53
|
-
position: relative;
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
.wg__cell--editable:hover {
|
|
@@ -96,7 +97,9 @@
|
|
|
96
97
|
|
|
97
98
|
/* ==============================================================================
|
|
98
99
|
READ-ONLY CELLS (permanent styling, not focus-related)
|
|
100
|
+
Only apply when the grid IS editable - distinguishes non-editable columns
|
|
101
|
+
from editable ones. When the entire grid is read-only, no gray background.
|
|
99
102
|
============================================================================== */
|
|
100
|
-
.wg--navigate-mode .wg__cell:not(.wg__cell--editable) {
|
|
103
|
+
.wg--editable.wg--navigate-mode .wg__cell:not(.wg__cell--editable) {
|
|
101
104
|
background: var(--wg-cell-readonly-bg);
|
|
102
105
|
}
|
package/src/css/_navigation.css
CHANGED
|
@@ -9,18 +9,19 @@
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
/* Remove browser default focus outline - we handle it with .wg__cell--focused */
|
|
12
|
-
.wg--
|
|
12
|
+
.wg--editable .wg__cell:focus {
|
|
13
13
|
outline: none;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
/* Focused cell styling - Excel-like green border for ALL
|
|
17
|
-
.wg--
|
|
16
|
+
/* Focused cell styling - Excel-like green border for ALL editable modes */
|
|
17
|
+
/* Must use .wg--editable prefix to match :focus rule specificity (0-3-0) so source order wins */
|
|
18
|
+
.wg--editable .wg__cell.wg__cell--focused {
|
|
18
19
|
outline: var(--wg-focus-outline);
|
|
19
20
|
outline-offset: -2px;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
/* Focus styling for always-editing mode (editTrigger: 'always' / input-matrix mode) */
|
|
23
|
-
/* In this mode,
|
|
24
|
+
/* In this mode, the <td> doesn't have :focus (the inner input does), so no specificity conflict */
|
|
24
25
|
.wg__cell.wg__cell--always-edit-focused {
|
|
25
26
|
outline: var(--wg-focus-outline);
|
|
26
27
|
outline-offset: -2px;
|
|
@@ -36,8 +37,7 @@
|
|
|
36
37
|
ROW FOCUS (master/detail patterns)
|
|
37
38
|
==============================================================================
|
|
38
39
|
Must be in this file (after _cells.css) so source order beats the
|
|
39
|
-
.wg--navigate-mode .wg__cell:not(.wg__cell--editable) readonly rule
|
|
40
|
-
at equal specificity (0,3,0).
|
|
40
|
+
.wg--editable.wg--navigate-mode .wg__cell:not(.wg__cell--editable) readonly rule.
|
|
41
41
|
*/
|
|
42
42
|
.wg__row--focused > .wg__cell {
|
|
43
43
|
background: var(--wg-row-focus-bg);
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
background: var(--wg-row-focus-row-number-bg);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
/* Navigate mode: override read-only cell background (needs
|
|
51
|
-
.wg--navigate-mode .wg__row--focused > .wg__cell {
|
|
50
|
+
/* Navigate mode: override read-only cell background (needs higher specificity than _cells.css rule) */
|
|
51
|
+
.wg--editable.wg--navigate-mode .wg__row--focused > .wg__cell {
|
|
52
52
|
background: var(--wg-row-focus-bg);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
.wg--navigate-mode .wg__row--focused > .wg__cell.wg__row-number {
|
|
55
|
+
.wg--editable.wg--navigate-mode .wg__row--focused > .wg__cell.wg__row-number {
|
|
56
56
|
background: var(--wg-row-focus-row-number-bg);
|
|
57
57
|
}
|