apex-grid 3.4.0 → 3.5.0

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 (109) hide show
  1. package/CHANGELOG.md +101 -0
  2. package/README.md +45 -6
  3. package/components/grid.d.ts +127 -0
  4. package/components/grid.js +25 -0
  5. package/components/grid.js.map +1 -1
  6. package/components/header-row.js +8 -0
  7. package/components/header-row.js.map +1 -1
  8. package/components/header.js +5 -3
  9. package/components/header.js.map +1 -1
  10. package/components/row.js +32 -4
  11. package/components/row.js.map +1 -1
  12. package/components/virtualizer.d.ts +5 -1
  13. package/components/virtualizer.js +72 -2
  14. package/components/virtualizer.js.map +1 -1
  15. package/controllers/navigation.d.ts +1 -0
  16. package/controllers/navigation.js +10 -5
  17. package/controllers/navigation.js.map +1 -1
  18. package/controllers/reorder.js +4 -2
  19. package/controllers/reorder.js.map +1 -1
  20. package/controllers/state.d.ts +9 -3
  21. package/controllers/state.js +11 -1
  22. package/controllers/state.js.map +1 -1
  23. package/custom-elements.json +439 -181
  24. package/docs/assets/hierarchy.js +1 -1
  25. package/docs/assets/navigation.js +1 -1
  26. package/docs/assets/search.js +1 -1
  27. package/docs/classes/ApexGrid.html +586 -0
  28. package/docs/classes/ApexGridPaginator.html +36 -0
  29. package/docs/classes/ApexGridToolbar.html +67 -0
  30. package/docs/functions/localize.html +2 -2
  31. package/docs/functions/setup.html +1 -2
  32. package/docs/hierarchy.html +1 -1
  33. package/docs/index.html +33 -6
  34. package/docs/interfaces/ApexCellValidationFailedEvent.html +1 -1
  35. package/docs/interfaces/ApexCellValueChangedEvent.html +1 -1
  36. package/docs/interfaces/ApexCellValueChangingEvent.html +2 -2
  37. package/docs/interfaces/ApexColumnMovedEvent.html +2 -2
  38. package/docs/interfaces/ApexColumnMovingEvent.html +1 -1
  39. package/docs/interfaces/ApexDetailContext.html +2 -2
  40. package/docs/interfaces/ApexGridEventMap.html +5 -5
  41. package/docs/interfaces/ApexRowMovingEvent.html +1 -1
  42. package/docs/interfaces/ApexRowPinningEvent.html +1 -1
  43. package/docs/interfaces/BaseApexCellContext.html +1 -1
  44. package/docs/interfaces/BaseApexEditorContext.html +1 -1
  45. package/docs/interfaces/BaseColumnConfiguration.html +3 -3
  46. package/docs/interfaces/CSVExportOptions.html +2 -2
  47. package/docs/interfaces/DataPipelineConfiguration.html +2 -2
  48. package/docs/interfaces/EditingHistoryConfiguration.html +1 -1
  49. package/docs/interfaces/ExportFormat.html +2 -2
  50. package/docs/interfaces/ExportOptions.html +1 -1
  51. package/docs/interfaces/GridRowPinningConfiguration.html +1 -1
  52. package/docs/interfaces/GridRowReorderingConfiguration.html +2 -2
  53. package/docs/interfaces/PaginationConfiguration.html +1 -1
  54. package/docs/interfaces/PaginationState.html +1 -1
  55. package/docs/media/_tokens.scss +29 -8
  56. package/docs/media/package.json +3 -4
  57. package/docs/media/state-persistence.html +0 -10
  58. package/docs/modules.html +1 -1
  59. package/docs/types/DataPipelineParams.html +2 -2
  60. package/docs/types/EditMode.html +2 -2
  61. package/docs/types/GridLocaleText.html +1 -1
  62. package/docs/types/PaginationMode.html +1 -1
  63. package/docs/variables/EN_LOCALE.html +3 -3
  64. package/docs/variables/esLocale.html +1 -1
  65. package/i18n/en.d.ts +14 -0
  66. package/i18n/en.js +14 -0
  67. package/i18n/en.js.map +1 -1
  68. package/i18n/es.js +14 -0
  69. package/i18n/es.js.map +1 -1
  70. package/index.d.ts +2 -0
  71. package/index.js +2 -0
  72. package/index.js.map +1 -1
  73. package/internal/feature-module.d.ts +22 -0
  74. package/internal/feature-module.js +5 -0
  75. package/internal/feature-module.js.map +1 -1
  76. package/internal/index.d.ts +2 -2
  77. package/internal/index.js +1 -1
  78. package/internal/index.js.map +1 -1
  79. package/internal/utils.d.ts +14 -0
  80. package/internal/utils.js +5 -0
  81. package/internal/utils.js.map +1 -1
  82. package/package.json +1 -2
  83. package/setup.d.ts +12 -11
  84. package/setup.js +12 -4
  85. package/setup.js.map +1 -1
  86. package/styles/_common.css.js +1 -1
  87. package/styles/_common.css.js.map +1 -1
  88. package/styles/_tokens.css.js +1 -1
  89. package/styles/_tokens.css.js.map +1 -1
  90. package/styles/body-cell/body-cell.css.js +1 -1
  91. package/styles/body-cell/body-cell.css.js.map +1 -1
  92. package/styles/body-row/body-row.css.js +1 -1
  93. package/styles/body-row/body-row.css.js.map +1 -1
  94. package/styles/filter-row/filter-row.css.js +1 -1
  95. package/styles/filter-row/filter-row.css.js.map +1 -1
  96. package/styles/grid/_grid.base.css.js +1 -1
  97. package/styles/grid/_grid.base.css.js.map +1 -1
  98. package/styles/grid/grid.css.js +1 -1
  99. package/styles/grid/grid.css.js.map +1 -1
  100. package/styles/group-header-row/group-header-row.css.js +1 -1
  101. package/styles/group-header-row/group-header-row.css.js.map +1 -1
  102. package/styles/header-cell/header-cell.css.js +1 -1
  103. package/styles/header-cell/header-cell.css.js.map +1 -1
  104. package/styles/header-row/header-row.base.css.js +1 -1
  105. package/styles/header-row/header-row.base.css.js.map +1 -1
  106. package/styles/paginator/paginator.css.js +1 -1
  107. package/styles/paginator/paginator.css.js.map +1 -1
  108. package/styles/toolbar/toolbar.css.js +1 -1
  109. package/styles/toolbar/toolbar.css.js.map +1 -1
@@ -7,16 +7,18 @@
7
7
  // This is the single rebrand surface: override ~12 values on `apex-grid` and
8
8
  // the whole grid re-skins. Values fall back to self-contained literals, so a
9
9
  // grid mounted with zero consumer CSS already looks premium; the brand tokens
10
- // additionally re-tint from the igniteui palette when it is present.
10
+ // additionally re-tint from an Ignite UI palette when one is present.
11
11
  // No `!important`, no downstream hardcoded numerics — every rule resolves here.
12
12
  // ─────────────────────────────────────────────────────────────────────────
13
13
 
14
14
  :host {
15
15
  // ── Brand ────────────────────────────────────────────────────────────
16
- // Re-tints from the igniteui palette when its CSS is loaded (so the grid
17
- // auto-matches an igniteui host app), and falls back to the self-contained
18
- // premium blue otherwise. This igniteui hook used to live in the per-theme
19
- // files; folding it here keeps that integration without named themes.
16
+ // Re-tints from an Ignite UI palette when its CSS is loaded (so the grid
17
+ // auto-matches such a host app), and falls back to the self-contained
18
+ // premium blue otherwise. `--ig-primary-*` is the whole integration: it is
19
+ // what an Ignite UI theme actually defines, and reading it costs nothing
20
+ // when absent. This hook used to live in the per-theme files; folding it
21
+ // here keeps the integration without named themes.
20
22
  --ag-brand: var(--ig-primary-500, #0d6fd3); /* primary blue */
21
23
  --ag-brand-strong: var(--ig-primary-700, #0a56b8); /* hover / pressed */
22
24
 
@@ -111,14 +113,14 @@
111
113
  // Built-in dark theme. Opt in with `<apex-grid theme="dark">`.
112
114
  // Only color/surface tokens are flipped to a neutral slate palette; geometry,
113
115
  // typography, motion, and the brand hue (which still auto-tints from the
114
- // igniteui palette when present) are inherited from the light block above.
116
+ // Ignite UI palette when present) are inherited from the light block above.
115
117
  // `theme~='dark'` matches a space-separated word so `theme="dark compact"`
116
118
  // style stacking keeps working. These tokens inherit across the shadow
117
119
  // boundary to every child component, so the whole grid re-skins from here.
118
120
  // ─────────────────────────────────────────────────────────────────────────
119
121
  :host([theme~='dark']) {
120
122
  // ── Brand ── brighter fallbacks so the accent reads on a dark surface;
121
- // still re-tints from the igniteui palette first when it is present.
123
+ // still re-tints from an Ignite UI palette first when it is present.
122
124
  --ag-brand: var(--ig-primary-500, #3b82f6);
123
125
  --ag-brand-strong: var(--ig-primary-400, #60a5fa);
124
126
 
@@ -169,7 +171,7 @@
169
171
  // little brand into the surfaces/gridlines so the grid wears its brand even
170
172
  // at rest, a brand-tinted variant. Because every value is `color-mix(... var
171
173
  // (--ag-brand) ...)`, it follows whatever brand is in effect (including the
172
- // igniteui auto-tint) with no per-brand CSS.
174
+ // Ignite UI auto-tint) with no per-brand CSS.
173
175
  // The light variant mixes into the white neutrals; the dark variant (higher
174
176
  // specificity, so it wins under `theme="dark tinted"`) mixes the SAME token
175
177
  // set into the slate neutrals. Body row surface stays untinted for legibility.
@@ -191,3 +193,22 @@
191
193
  --ag-row-hover: color-mix(in srgb, var(--ag-brand) 12%, var(--ag-surface));
192
194
  --ag-text-muted: color-mix(in srgb, var(--ag-brand) 28%, #94a3b8);
193
195
  }
196
+
197
+ // ─────────────────────────────────────────────────────────────────────────
198
+ // Reduced motion. Every transition in the grid is declared with one of the
199
+ // three `--ag-dur-*` tokens (nothing hardcodes a duration, and there are no
200
+ // keyframe animations), so zeroing them here is the whole opt-out: hover
201
+ // washes, focus rings, chevron rotation and bar fills all become instant while
202
+ // the end states stay identical. `prefers-reduced-motion` is a user request,
203
+ // not a preference we can override, hence no `--ag-*` escape hatch.
204
+ // A consumer that adds its own transitions inside the grid should either use
205
+ // these tokens or guard them the same way. Row reorder / expansion animations
206
+ // live in JS and already bail out (`internal/flip.ts`).
207
+ // ─────────────────────────────────────────────────────────────────────────
208
+ @media (prefers-reduced-motion: reduce) {
209
+ :host {
210
+ --ag-dur-fast: 0ms;
211
+ --ag-dur-med: 0ms;
212
+ --ag-dur-slow: 0ms;
213
+ }
214
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apex-grid",
3
- "version": "3.4.0",
3
+ "version": "3.5.0",
4
4
  "description": "Web component data grid following open-wc recommendations",
5
5
  "keywords": [
6
6
  "lit",
@@ -30,7 +30,8 @@
30
30
  },
31
31
  "scripts": {
32
32
  "analyze": "cem analyze --litelement --globs \"src/**/*.{js,ts}\" --exclude \"src/styles/**/*\"",
33
- "build": "npm run analyze && node scripts/build.js && npm run typedoc",
33
+ "cem:check": "node scripts/check-cem-drift.js",
34
+ "build": "npm run analyze && npm run cem:check && node scripts/build.js && npm run typedoc",
34
35
  "build:tsc": "tsc",
35
36
  "dev:vite": "vite build",
36
37
  "format": "biome check --fix && npm run format:stylelint",
@@ -52,8 +53,6 @@
52
53
  "dependencies": {
53
54
  "@lit-labs/virtualizer": "^2.1.0",
54
55
  "@lit/context": "^1.1.5",
55
- "igniteui-theming": "~19.1.0",
56
- "igniteui-webcomponents": "~6.1.0",
57
56
  "lit": "^3.3.0"
58
57
  },
59
58
  "devDependencies": {
@@ -54,7 +54,6 @@
54
54
  }
55
55
  apex-grid {
56
56
  min-height: 420px;
57
- --ig-size: 2;
58
57
  }
59
58
  .snapshot {
60
59
  margin: 0;
@@ -79,15 +78,6 @@
79
78
  letter-spacing: 0.04em;
80
79
  }
81
80
  </style>
82
- <script type="module">
83
- try {
84
- const resp = await fetch('https://cdn.jsdelivr.net/npm/igniteui-webcomponents@5/themes/light/bootstrap.css');
85
- const css = await resp.text();
86
- const style = document.createElement('style');
87
- style.textContent = css.replaceAll(':root', 'apex-grid');
88
- document.head.appendChild(style);
89
- } catch (e) { /* theme is cosmetic */ }
90
- </script>
91
81
  </head>
92
82
  <body>
93
83
  <h2>State Persistence — getState / setState</h2>