@keenmate/web-grid 1.1.0 → 1.2.0-rc02

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.
Files changed (47) hide show
  1. package/README.md +20 -15
  2. package/ai/fill-handle.txt +1 -1
  3. package/ai/frozen-columns.txt +2 -2
  4. package/ai/row-locking.txt +1 -1
  5. package/ai/styling-theming.txt +13 -12
  6. package/component-variables.manifest.json +8 -7
  7. package/dist/grid.d.ts +98 -11
  8. package/dist/logger.d.ts +1 -0
  9. package/dist/modules/click-events/index.d.ts +5 -1
  10. package/dist/modules/contextmenu/index.d.ts +10 -1
  11. package/dist/modules/datepicker/datepicker.d.ts +2 -0
  12. package/dist/modules/rendering/tree-render.d.ts +8 -0
  13. package/dist/perf.d.ts +15 -0
  14. package/dist/types.d.ts +15 -4
  15. package/dist/web-component.d.ts +31 -3
  16. package/dist/web-grid.js +3009 -2411
  17. package/dist/web-grid.umd.js +109 -114
  18. package/package.json +9 -3
  19. package/src/css/animations.css +14 -0
  20. package/src/css/{_cells.css → cells.css} +1 -1
  21. package/src/css/controls.css +3 -0
  22. package/src/css/dark-mode.css +67 -0
  23. package/src/css/{_dialogs.css → dialogs.css} +9 -68
  24. package/src/css/{_dirty-indicator.css → dirty-indicator.css} +37 -37
  25. package/src/css/{_dropdown.css → dropdown.css} +1 -1
  26. package/src/css/{_editors.css → editors.css} +14 -8
  27. package/src/css/floating.css +71 -0
  28. package/src/css/{_freeze.css → freeze.css} +5 -5
  29. package/src/css/{_header.css → header.css} +1 -1
  30. package/src/css/main.css +53 -48
  31. package/src/css/{_navigation.css → navigation.css} +10 -5
  32. package/src/css/{_resize.css → resize.css} +1 -1
  33. package/src/css/{_selection.css → selection.css} +1 -1
  34. package/src/css/{_shortcuts.css → shortcuts.css} +4 -4
  35. package/src/css/{_modifiers.css → states.css} +8 -2
  36. package/src/css/tree.css +71 -0
  37. package/src/css/{_variables.css → variables.css} +55 -42
  38. package/src/css/_dark-mode.css +0 -93
  39. package/src/css/_tree.css +0 -73
  40. /package/src/css/{_cell-selection.css → cell-selection.css} +0 -0
  41. /package/src/css/{_fill-handle.css → fill-handle.css} +0 -0
  42. /package/src/css/{_pagination.css → pagination.css} +0 -0
  43. /package/src/css/{_reorder.css → reorder.css} +0 -0
  44. /package/src/css/{_row-locking.css → row-locking.css} +0 -0
  45. /package/src/css/{_table.css → table.css} +0 -0
  46. /package/src/css/{_toolbar.css → toolbar.css} +0 -0
  47. /package/src/css/{_virtual-scroll.css → virtual-scroll.css} +0 -0
@@ -25,7 +25,7 @@
25
25
  padding: 0;
26
26
  border: none;
27
27
  border-radius: 50%;
28
- background: var(--wg-surface-1);
28
+ background: var(--wg-main-bg);
29
29
  color: var(--wg-text-color-2);
30
30
  cursor: pointer;
31
31
  opacity: 0.7;
@@ -33,7 +33,7 @@
33
33
 
34
34
  .wg__shortcuts-help-icon:hover {
35
35
  opacity: 1;
36
- background: var(--wg-surface-2);
36
+ background: var(--wg-elevated-bg);
37
37
  }
38
38
 
39
39
  .wg__shortcuts-help-icon svg {
@@ -49,7 +49,7 @@
49
49
  right: 0;
50
50
  margin-top: var(--wg-spacing-xs);
51
51
  padding: var(--wg-spacing-md);
52
- background: var(--wg-surface-1);
52
+ background: var(--wg-main-bg);
53
53
  border: 1px solid var(--wg-border-color);
54
54
  border-radius: var(--wg-border-radius-md);
55
55
  box-shadow: var(--wg-dialog-shadow);
@@ -113,7 +113,7 @@
113
113
  font-size: var(--wg-font-size-xs);
114
114
  font-weight: var(--wg-font-weight-semibold);
115
115
  color: var(--wg-text-color-1);
116
- background: var(--wg-surface-2);
116
+ background: var(--wg-elevated-bg);
117
117
  border: 1px solid var(--wg-border-color);
118
118
  border-radius: var(--wg-border-radius-sm);
119
119
  }
@@ -1,9 +1,15 @@
1
1
  /* ==============================================================================
2
- MODIFIERS
2
+ STATES — Tier-2 canonical concern
3
3
  ==============================================================================
4
- Table style modifiers: striped rows, hoverable rows, empty state
4
+ Cross-feature state and presentation modifiers: striped rows, row hover,
5
+ empty state, loading state. Feature-specific state modifiers (cell focused,
6
+ cell dirty, cell editing) live in their feature files.
5
7
  */
6
8
 
9
+ /* ==============================================================================
10
+ ROW VARIANTS
11
+ ============================================================================== */
12
+
7
13
  /* Striped rows */
8
14
  .wg--striped tbody tr:nth-child(even) {
9
15
  background: var(--wg-row-bg-even);
@@ -0,0 +1,71 @@
1
+ /* ==============================================================================
2
+ TREE COLUMN
3
+ ==============================================================================
4
+ Indent + chevron rendered inside a cell when column.isTree is true.
5
+ Inline-flex wrapper: chevron (or leaf spacer) + cell-body sit on one row.
6
+ Per-level depth comes from `padding-inline-start: level * --wg-tree-indent`,
7
+ set inline by JS.
8
+ */
9
+
10
+ :host {
11
+ --wg-tree-indent: 1.25rem; /* per-level indent */
12
+ --wg-tree-chevron-size: 1rem; /* chevron width/height (also used for leaf spacer) */
13
+ --wg-tree-chevron-color: var(--wg-text-color-2);
14
+ --wg-tree-chevron-gap: 4px; /* gap between chevron and content */
15
+ }
16
+
17
+ .wg__tree-cell {
18
+ display: inline-flex;
19
+ align-items: center;
20
+ gap: var(--wg-tree-chevron-gap);
21
+ /* `padding-inline-start: level * --wg-tree-indent` is set inline by JS */
22
+ }
23
+
24
+ .wg__tree-cell-body {
25
+ min-width: 0;
26
+ overflow: hidden;
27
+ text-overflow: inherit;
28
+ white-space: inherit;
29
+ }
30
+
31
+ .wg__tree-chevron {
32
+ all: unset;
33
+ display: inline-flex;
34
+ align-items: center;
35
+ justify-content: center;
36
+ width: var(--wg-tree-chevron-size);
37
+ height: var(--wg-tree-chevron-size);
38
+ border-radius: 2px;
39
+ font-size: 0.85em;
40
+ line-height: 1;
41
+ color: var(--wg-tree-chevron-color);
42
+ cursor: pointer;
43
+ flex-shrink: 0;
44
+ transition: transform 0.12s ease, background 0.1s ease;
45
+ }
46
+
47
+ .wg__tree-chevron:hover:not(.wg__tree-chevron--leaf) {
48
+ background: var(--wg-hover-bg);
49
+ }
50
+
51
+ .wg__tree-chevron--expanded {
52
+ transform: rotate(90deg);
53
+ }
54
+
55
+ .wg__tree-leaf-spacer {
56
+ display: inline-block;
57
+ width: var(--wg-tree-chevron-size);
58
+ height: var(--wg-tree-chevron-size);
59
+ flex-shrink: 0;
60
+ }
61
+
62
+ /* While the cell is being edited, let the editor absolute-fill the <td> as it
63
+ normally does. The chevron/indent are visual aids for display mode; they come
64
+ back when editing ends. */
65
+ .wg__cell--editing .wg__tree-chevron,
66
+ .wg__cell--editing .wg__tree-leaf-spacer {
67
+ display: none;
68
+ }
69
+ .wg__cell--editing .wg__tree-cell {
70
+ display: contents; /* wrapper disappears from layout */
71
+ }
@@ -49,36 +49,46 @@
49
49
  --wg-accent-color-light: var(--base-accent-color-light, color-mix(in srgb, var(--wg-accent-color) 15%, transparent));
50
50
 
51
51
  /* Text Color Levels (FluentUI-style hierarchy) */
52
- --wg-text-color-1: var(--base-text-color-1, #242424);
53
- --wg-text-color-2: var(--base-text-color-2, #424242);
54
- --wg-text-color-3: var(--base-text-color-3, #707070);
52
+ /* light-dark() fallbacks activate when the consumer sets `color-scheme: dark`
53
+ (or `light dark`) on the page — typically via `body { color-scheme: dark }`.
54
+ The framework-class dark-mode blocks in dark-mode.css remain the primary
55
+ mechanism for data-theme="dark" / data-bs-theme="dark" / .dark switches. */
56
+ --wg-text-color-1: var(--base-text-color-1, light-dark(#242424, #f5f5f5));
57
+ --wg-text-color-2: var(--base-text-color-2, light-dark(#424242, #d4d4d4));
58
+ --wg-text-color-3: var(--base-text-color-3, light-dark(#707070, #a3a3a3));
55
59
  --wg-text-on-accent: var(--base-text-color-on-accent, #ffffff);
56
60
 
57
- /* Background/Surface Colors */
58
- --wg-surface-1: var(--base-main-bg, #ffffff);
59
- --wg-surface-2: var(--base-elevated-bg, #f5f5f5);
60
- --wg-surface-3: var(--base-hover-bg, #ebebeb);
61
- --wg-surface-floating: var(--base-dropdown-bg, var(--base-main-bg, #ffffff));
61
+ /* Background Colors (semantic taxonomy matching pure-admin's --base-* names) */
62
+ --wg-main-bg: var(--base-main-bg, light-dark(#ffffff, #1a1a1a));
63
+ --wg-elevated-bg: var(--base-elevated-bg, light-dark(#f5f5f5, #2b2b2b));
64
+ /* Dropdown / floating surface (toolbar, context menu, dropdown panels):
65
+ primary lookup is --base-dropdown-bg; falls back through --base-elevated-bg
66
+ so theme-designer's elevated-bg also covers floating UI. */
67
+ --wg-dropdown-bg: var(--base-dropdown-bg, var(--base-elevated-bg, var(--base-main-bg, light-dark(#ffffff, #2b2b2b))));
62
68
 
63
69
  /* Border Colors */
64
- --wg-border-color: var(--base-border-color, #e0e0e0);
65
- --wg-border-color-hover: var(--base-border-color, #d1d1d1);
70
+ --wg-border-color: var(--base-border-color, light-dark(#e0e0e0, #3d3d3d));
71
+ --wg-border-color-hover: var(--base-border-color, light-dark(#d1d1d1, #5a5a5a));
66
72
 
67
73
  /* Input Colors */
68
- --wg-input-bg: var(--base-input-bg, #ffffff);
74
+ --wg-input-bg: var(--base-input-bg, light-dark(#ffffff, #1f1f1f));
69
75
  --wg-input-color: var(--base-input-color, var(--wg-text-color-1));
70
- --wg-input-border: var(--base-input-border, 1px solid #d1d1d1);
76
+ --wg-input-border: var(--base-input-border, 1px solid light-dark(#d1d1d1, #5a5a5a));
71
77
  --wg-input-border-hover: var(--base-input-border-hover, 1px solid #0078d4);
72
78
  --wg-input-border-focus: var(--base-input-border-focus, 1px solid #0078d4);
73
- --wg-input-placeholder-color: var(--base-input-placeholder-color, #707070);
79
+ --wg-input-placeholder-color: var(--base-input-placeholder-color, light-dark(#707070, #a3a3a3));
74
80
 
75
81
  /* Danger/Error Colors */
76
- --wg-danger-color: var(--base-danger-color, #d13438);
77
- --wg-danger-bg-light: var(--base-danger-bg-light, #fde7e9);
82
+ --wg-danger-color: var(--base-danger-color, light-dark(#d13438, #f87c86));
83
+ --wg-danger-bg-light: var(--base-danger-bg-light, light-dark(#fde7e9, #442726));
78
84
 
79
- /* Hover/Active States */
80
- --wg-hover-bg: var(--base-hover-bg, #f0f0f0);
81
- --wg-active-bg: var(--base-hover-bg, #e0e0e0);
85
+ /* Hover/Active States
86
+ Adaptive via color-mix so the highlight stays visible in both light and dark
87
+ modes (always steps toward the text color). The flat-color fallback in
88
+ --base-main-bg ensures the mix has a valid second operand even when the
89
+ consumer hasn't set any --base-* vars. */
90
+ --wg-hover-bg: var(--base-hover-bg, color-mix(in srgb, var(--wg-text-color-1) 8%, var(--base-main-bg, light-dark(#ffffff, #1a1a1a))));
91
+ --wg-active-bg: var(--base-active-bg, color-mix(in srgb, var(--wg-text-color-1) 14%, var(--base-main-bg, light-dark(#ffffff, #1a1a1a))));
82
92
 
83
93
  /* ==========================================================================
84
94
  TYPOGRAPHY
@@ -113,7 +123,7 @@
113
123
  /* ==========================================================================
114
124
  TABLE COMPONENT
115
125
  ========================================================================== */
116
- --wg-table-bg: var(--wg-surface-1);
126
+ --wg-table-bg: var(--wg-main-bg);
117
127
  --wg-table-border: 1px solid var(--wg-border-color);
118
128
  --wg-row-number-width: calc(4.0 * var(--wg-rem));
119
129
  --wg-actions-column-width: calc(3.2 * var(--wg-rem));
@@ -121,9 +131,9 @@
121
131
  /* ==========================================================================
122
132
  HEADER COMPONENT
123
133
  ========================================================================== */
124
- --wg-header-bg: var(--wg-surface-2);
125
- --wg-header-bg-hover: var(--wg-surface-3);
126
- --wg-header-bg-sorted: var(--wg-surface-3);
134
+ --wg-header-bg: var(--wg-elevated-bg);
135
+ --wg-header-bg-hover: var(--wg-hover-bg);
136
+ --wg-header-bg-sorted: var(--wg-hover-bg);
127
137
  --wg-header-color: var(--wg-text-color-1);
128
138
  --wg-header-border: 2px solid var(--wg-border-color);
129
139
  --wg-header-separator: 1px solid var(--wg-border-color); /* Vertical separator between headers */
@@ -143,20 +153,20 @@
143
153
  --wg-cell-splitter-color: var(--wg-border-color);
144
154
  --wg-cell-splitter-width: 1px;
145
155
  --wg-cell-bg-hover: var(--wg-hover-bg);
146
- --wg-cell-bg-editing: var(--wg-surface-1);
147
- --wg-cell-readonly-bg: var(--base-disabled-bg, var(--wg-surface-2));
156
+ --wg-cell-bg-editing: var(--wg-main-bg);
157
+ --wg-cell-readonly-bg: var(--base-disabled-bg, var(--wg-elevated-bg));
148
158
 
149
159
  /* ==========================================================================
150
160
  ROW COMPONENT
151
161
  ========================================================================== */
152
162
  --wg-row-border: 1px solid var(--wg-border-color);
153
- --wg-row-bg-even: var(--wg-surface-2);
154
- --wg-row-bg-hover: var(--wg-surface-3);
163
+ --wg-row-bg-even: var(--wg-elevated-bg);
164
+ --wg-row-bg-hover: var(--wg-hover-bg);
155
165
 
156
166
  /* ==========================================================================
157
167
  FILTER ROW
158
168
  ========================================================================== */
159
- --wg-filter-bg: var(--wg-surface-1);
169
+ --wg-filter-bg: var(--wg-main-bg);
160
170
  --wg-filter-border: 1px solid var(--wg-border-color);
161
171
  --wg-filter-padding: var(--wg-spacing-xs) var(--wg-spacing-sm);
162
172
 
@@ -181,14 +191,14 @@
181
191
  ========================================================================== */
182
192
  --wg-pagination-padding: var(--wg-spacing-md);
183
193
  --wg-pagination-gap: calc(1.6 * var(--wg-rem));
184
- --wg-pagination-bg: var(--wg-surface-1);
194
+ --wg-pagination-bg: var(--wg-main-bg);
185
195
  --wg-pagination-border: 1px solid var(--wg-border-color);
186
196
 
187
197
  /* Pagination Button */
188
198
  --wg-pagination-btn-padding: calc(0.6 * var(--wg-rem)) calc(1.6 * var(--wg-rem));
189
- --wg-pagination-btn-bg: var(--wg-surface-1);
190
- --wg-pagination-btn-bg-hover: var(--wg-surface-2);
191
- --wg-pagination-btn-bg-active: var(--wg-surface-3);
199
+ --wg-pagination-btn-bg: var(--wg-main-bg);
200
+ --wg-pagination-btn-bg-hover: var(--wg-elevated-bg);
201
+ --wg-pagination-btn-bg-active: var(--wg-hover-bg);
192
202
  --wg-pagination-btn-border: 1px solid var(--wg-border-color);
193
203
  --wg-pagination-btn-border-hover: 1px solid var(--wg-border-color-hover);
194
204
  --wg-pagination-btn-border-radius: var(--wg-border-radius-sm);
@@ -212,15 +222,15 @@
212
222
  /* ==========================================================================
213
223
  DIRTY INDICATOR (unsaved changes)
214
224
  ========================================================================== */
215
- --wg-dirty-indicator-color: #ed8b00;
225
+ --wg-dirty-indicator-color: light-dark(#ed8b00, #ffa940);
216
226
  --wg-dirty-indicator-size: 6px;
217
- --wg-dirty-cell-bg: rgba(237, 139, 0, 0.08);
218
- --wg-dirty-row-number-border-color: #ed8b00;
227
+ --wg-dirty-cell-bg: light-dark(rgba(237, 139, 0, 0.08), rgba(255, 169, 64, 0.12));
228
+ --wg-dirty-row-number-border-color: light-dark(#ed8b00, #ffa940);
219
229
 
220
230
  /* ==========================================================================
221
231
  EDITOR
222
232
  ========================================================================== */
223
- --wg-editor-bg: var(--wg-surface-1);
233
+ --wg-editor-bg: var(--wg-main-bg);
224
234
  --wg-editor-outline: 2px solid var(--wg-accent-color);
225
235
  --wg-editor-outline-offset: -2px;
226
236
  --wg-editor-validating-opacity: 0.7;
@@ -242,7 +252,7 @@
242
252
  /* ==========================================================================
243
253
  ROW TOOLBAR
244
254
  ========================================================================== */
245
- --wg-toolbar-bg: var(--wg-surface-floating);
255
+ --wg-toolbar-bg: var(--wg-dropdown-bg);
246
256
  --wg-toolbar-border: 1px solid var(--wg-border-color);
247
257
  --wg-toolbar-border-radius: var(--wg-border-radius-sm);
248
258
  --wg-toolbar-shadow: var(--base-dropdown-box-shadow, 0 2px 8px rgba(0, 0, 0, 0.15));
@@ -272,9 +282,12 @@
272
282
 
273
283
  /* ==========================================================================
274
284
  TOOLTIP
275
- ========================================================================== */
276
- --wg-tooltip-bg: var(--base-tooltip-bg, #333);
277
- --wg-tooltip-color: var(--base-tooltip-color, #fff);
285
+ ==========================================================================
286
+ Tooltip is inverse-colored (light text on dark bg in light mode; flips in
287
+ dark mode). Primary lookup is --base-tooltip-bg; falls back through the
288
+ new --base-inverse-bg from the unified cross-component taxonomy. */
289
+ --wg-tooltip-bg: var(--base-tooltip-bg, var(--base-inverse-bg, light-dark(#333333, #f5f5f5)));
290
+ --wg-tooltip-color: var(--base-tooltip-color, light-dark(#ffffff, #1a1a1a));
278
291
  --wg-tooltip-max-width: 300px;
279
292
  --wg-tooltip-arrow-size: 8px;
280
293
 
@@ -324,13 +337,13 @@
324
337
  /* ==========================================================================
325
338
  ROW LOCKING
326
339
  ========================================================================== */
327
- --wg-row-locked-bg: var(--base-disabled-bg, var(--wg-surface-2));
340
+ --wg-row-locked-bg: var(--base-disabled-bg, var(--wg-elevated-bg));
328
341
  --wg-row-locked-opacity: 0.7;
329
342
 
330
343
  /* ==========================================================================
331
344
  FREEZE PANES (Sticky Columns)
332
345
  ========================================================================== */
333
- --wg-frozen-column-bg: var(--wg-surface-1);
346
+ --wg-frozen-column-bg: var(--wg-main-bg);
334
347
  --wg-frozen-header-bg: color-mix(in srgb, var(--wg-accent-color) 8%, var(--wg-header-bg));
335
348
  --wg-frozen-column-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
336
349
  --wg-frozen-column-shadow-active: 6px 0 12px rgba(0, 0, 0, 0.25); /* Enhanced shadow when scrolled */
@@ -351,7 +364,7 @@
351
364
  FILL HANDLE (Excel-like autofill)
352
365
  ========================================================================== */
353
366
  --wg-fill-handle-size: 8px;
354
- --wg-fill-handle-bg: var(--wg-surface-1);
367
+ --wg-fill-handle-bg: var(--wg-main-bg);
355
368
  --wg-fill-handle-border-color: var(--wg-accent-color);
356
369
  --wg-fill-handle-border-width: 2px;
357
370
  --wg-fill-range-bg: color-mix(in srgb, var(--wg-accent-color) 15%, transparent);
@@ -1,93 +0,0 @@
1
- /* ==============================================================================
2
- DARK MODE / LIGHT MODE SUPPORT
3
- ==============================================================================
4
- Dark mode is controlled by:
5
- 1. OS preference: @media (prefers-color-scheme: dark)
6
- 2. data-theme="dark" on host or ancestor (via :host-context)
7
- 3. data-bs-theme="dark" (Bootstrap 5.3+) on host or ancestor
8
- 4. .dark class on host or ancestor (Tailwind CSS convention)
9
-
10
- Light mode override (overrides OS dark preference):
11
- 1. data-theme="light" on host or ancestor (via :host-context)
12
- 2. data-bs-theme="light" (Bootstrap 5.3+) on host or ancestor
13
- 3. .light class on host or ancestor (Tailwind CSS convention)
14
-
15
- NOTE: Ancestor matching uses :host-context() because shadow DOM stylesheets
16
- cannot see elements outside the shadow boundary with regular selectors.
17
- */
18
- @media (prefers-color-scheme: dark) {
19
- :host {
20
- --wg-surface-1: #1f1f1f;
21
- --wg-surface-2: #2b2b2b;
22
- --wg-surface-3: #333333;
23
- --wg-surface-floating: #2b2b2b;
24
- --wg-text-color-1: #e0e0e0;
25
- --wg-text-color-2: #c0c0c0;
26
- --wg-text-color-3: #a0a0a0;
27
- --wg-border-color: #3d3d3d;
28
- --wg-border-color-hover: #5a5a5a;
29
- --wg-input-bg: #1f1f1f;
30
- --wg-input-border: 1px solid #5a5a5a;
31
- --wg-hover-bg: #3a3a3a;
32
- --wg-active-bg: #4a4a4a;
33
- --wg-danger-bg-light: #442726;
34
- --wg-danger-color: #f87c86;
35
- --wg-dirty-indicator-color: #ffa940;
36
- --wg-dirty-cell-bg: rgba(255, 169, 64, 0.12);
37
- --wg-dirty-row-number-border-color: #ffa940;
38
- }
39
- }
40
-
41
- /* Explicit dark mode via data-theme, data-bs-theme attribute, or .dark class */
42
- :host([data-theme="dark"]),
43
- :host-context([data-theme="dark"]),
44
- :host([data-bs-theme="dark"]),
45
- :host-context([data-bs-theme="dark"]),
46
- :host-context(.dark) {
47
- --wg-surface-1: #1f1f1f;
48
- --wg-surface-2: #2b2b2b;
49
- --wg-surface-3: #333333;
50
- --wg-surface-floating: #2b2b2b;
51
- --wg-text-color-1: #e0e0e0;
52
- --wg-text-color-2: #c0c0c0;
53
- --wg-text-color-3: #a0a0a0;
54
- --wg-border-color: #3d3d3d;
55
- --wg-border-color-hover: #5a5a5a;
56
- --wg-input-bg: #1f1f1f;
57
- --wg-input-border: 1px solid #5a5a5a;
58
- --wg-hover-bg: #3a3a3a;
59
- --wg-active-bg: #4a4a4a;
60
- --wg-danger-bg-light: #442726;
61
- --wg-danger-color: #f87c86;
62
- --wg-dirty-indicator-color: #ffa940;
63
- --wg-dirty-row-number-border-color: #ffa940;
64
- }
65
-
66
- /* ==============================================================================
67
- EXPLICIT LIGHT MODE OVERRIDE
68
- ==============================================================================
69
- When the app forces light mode (e.g. via data-theme="light" on <html> or <body>),
70
- these selectors override the OS dark mode media query above by restoring the
71
- --base-* fallback chain from _variables.css.
72
- */
73
- :host([data-theme="light"]),
74
- :host-context([data-theme="light"]),
75
- :host([data-bs-theme="light"]),
76
- :host-context([data-bs-theme="light"]),
77
- :host-context(.light) {
78
- --wg-surface-1: var(--base-main-bg, #ffffff);
79
- --wg-surface-2: var(--base-elevated-bg, #f5f5f5);
80
- --wg-surface-3: var(--base-hover-bg, #ebebeb);
81
- --wg-surface-floating: var(--base-dropdown-bg, var(--base-main-bg, #ffffff));
82
- --wg-text-color-1: var(--base-text-color-1, #242424);
83
- --wg-text-color-2: var(--base-text-color-2, #424242);
84
- --wg-text-color-3: var(--base-text-color-3, #707070);
85
- --wg-border-color: var(--base-border-color, #e0e0e0);
86
- --wg-border-color-hover: var(--base-border-color, #d1d1d1);
87
- --wg-input-bg: var(--base-input-bg, #ffffff);
88
- --wg-input-border: var(--base-input-border, 1px solid #d1d1d1);
89
- --wg-hover-bg: var(--base-hover-bg, #f0f0f0);
90
- --wg-active-bg: var(--base-hover-bg, #e0e0e0);
91
- --wg-danger-bg-light: var(--base-danger-bg-light, #fde7e9);
92
- --wg-danger-color: var(--base-danger-color, #d13438);
93
- }
package/src/css/_tree.css DELETED
@@ -1,73 +0,0 @@
1
- /* ==============================================================================
2
- TREE COLUMN
3
- ==============================================================================
4
- Indent + chevron rendered inside a cell when column.isTree is true.
5
- The chevron is absolutely positioned so it can't affect row height; the
6
- wrapper's padding-left reserves space for (level * indent + chevron + gap).
7
- */
8
-
9
- :host {
10
- --wg-tree-indent: 1.6rem; /* per-level indent */
11
- --wg-tree-chevron-size: 1.6rem; /* chevron width/height */
12
- --wg-tree-chevron-color: var(--wg-text-color-2);
13
- --wg-tree-chevron-gap: var(--wg-spacing-xs);
14
- }
15
-
16
- .wg__tree-cell {
17
- position: relative;
18
- width: 100%;
19
- min-width: 0;
20
- /* padding-left + width: 100% would overflow the cell with content-box; force
21
- padding to be included in the width so the wrapper exactly fills the cell. */
22
- box-sizing: border-box;
23
- /* Fill the cell vertically so clicks anywhere inside the cell land on the
24
- wrapper, not the cell's padding band. Helps for the dblclick-toggle hit area. */
25
- min-height: 100%;
26
- }
27
-
28
- .wg__tree-cell-content {
29
- overflow: hidden;
30
- text-overflow: inherit;
31
- white-space: inherit;
32
- }
33
-
34
- .wg__tree-chevron {
35
- position: absolute;
36
- top: 50%;
37
- /* `left` is set inline by JS = level * indent */
38
- transform: translateY(-50%);
39
- display: inline-flex;
40
- align-items: center;
41
- justify-content: center;
42
- width: var(--wg-tree-chevron-size);
43
- height: var(--wg-tree-chevron-size);
44
- padding: 0;
45
- border: 0;
46
- background: transparent;
47
- color: var(--wg-tree-chevron-color);
48
- font-size: 0.9em;
49
- line-height: 1;
50
- cursor: pointer;
51
- user-select: none;
52
- border-radius: 3px;
53
- }
54
-
55
- .wg__tree-chevron:hover:not(.wg__tree-chevron--leaf) {
56
- background: var(--wg-hover-bg);
57
- }
58
-
59
- .wg__tree-chevron--leaf {
60
- cursor: default;
61
- pointer-events: none;
62
- background: transparent;
63
- }
64
-
65
- /* While the cell is being edited, let the editor absolute-fill the <td> as it
66
- normally does. The chevron/indent are visual aids for display mode; they come
67
- back when editing ends. */
68
- .wg__cell--editing .wg__tree-chevron {
69
- display: none;
70
- }
71
- .wg__cell--editing .wg__tree-cell {
72
- display: contents; /* wrapper disappears from layout */
73
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes