@eui/eds-react 22.0.0-alpha.14 → 22.0.0-alpha.16

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 (101) hide show
  1. package/eds-datepicker/eds-date-adapter.d.ts +56 -0
  2. package/eds-datepicker/eds-date-adapter.d.ts.map +1 -0
  3. package/eds-datepicker/eds-date-adapter.js +69 -0
  4. package/eds-datepicker/eds-date-adapter.js.map +1 -0
  5. package/eds-datepicker/eds-datepicker.css +137 -0
  6. package/eds-datepicker/eds-datepicker.d.ts +67 -0
  7. package/eds-datepicker/eds-datepicker.d.ts.map +1 -0
  8. package/eds-datepicker/eds-datepicker.js +203 -0
  9. package/eds-datepicker/eds-datepicker.js.map +1 -0
  10. package/eds-datepicker/eds-luxon-date-adapter.d.ts +33 -0
  11. package/eds-datepicker/eds-luxon-date-adapter.d.ts.map +1 -0
  12. package/eds-datepicker/eds-luxon-date-adapter.js +90 -0
  13. package/eds-datepicker/eds-luxon-date-adapter.js.map +1 -0
  14. package/eds-datepicker/eds-timepicker.css +69 -0
  15. package/eds-datepicker/eds-timepicker.d.ts +44 -0
  16. package/eds-datepicker/eds-timepicker.d.ts.map +1 -0
  17. package/eds-datepicker/eds-timepicker.js +122 -0
  18. package/eds-datepicker/eds-timepicker.js.map +1 -0
  19. package/eds-datepicker/index.d.ts +8 -0
  20. package/eds-datepicker/index.d.ts.map +1 -0
  21. package/eds-datepicker/index.js +5 -0
  22. package/eds-datepicker/index.js.map +1 -0
  23. package/eds-label/eds-label.css +19 -0
  24. package/eds-label/eds-label.d.ts +22 -0
  25. package/eds-label/eds-label.d.ts.map +1 -0
  26. package/eds-label/eds-label.js +15 -0
  27. package/eds-label/eds-label.js.map +1 -0
  28. package/eds-label/index.d.ts +3 -0
  29. package/eds-label/index.d.ts.map +1 -0
  30. package/eds-label/index.js +2 -0
  31. package/eds-label/index.js.map +1 -0
  32. package/eds-shell/eds-shell-sidebar.css +1 -0
  33. package/eds-shell/eds-shell.css +2 -1
  34. package/eds-table/eds-table-context.d.ts +56 -0
  35. package/eds-table/eds-table-context.d.ts.map +1 -0
  36. package/eds-table/eds-table-context.js +12 -0
  37. package/eds-table/eds-table-context.js.map +1 -0
  38. package/eds-table/eds-table-expandable-row.d.ts +22 -0
  39. package/eds-table/eds-table-expandable-row.d.ts.map +1 -0
  40. package/eds-table/eds-table-expandable-row.js +25 -0
  41. package/eds-table/eds-table-expandable-row.js.map +1 -0
  42. package/eds-table/eds-table-filter.d.ts +38 -0
  43. package/eds-table/eds-table-filter.d.ts.map +1 -0
  44. package/eds-table/eds-table-filter.js +66 -0
  45. package/eds-table/eds-table-filter.js.map +1 -0
  46. package/eds-table/eds-table-highlight.d.ts +38 -0
  47. package/eds-table/eds-table-highlight.d.ts.map +1 -0
  48. package/eds-table/eds-table-highlight.js +81 -0
  49. package/eds-table/eds-table-highlight.js.map +1 -0
  50. package/eds-table/eds-table-selectable-header.d.ts +19 -0
  51. package/eds-table/eds-table-selectable-header.d.ts.map +1 -0
  52. package/eds-table/eds-table-selectable-header.js +38 -0
  53. package/eds-table/eds-table-selectable-header.js.map +1 -0
  54. package/eds-table/eds-table-selectable-row.d.ts +21 -0
  55. package/eds-table/eds-table-selectable-row.d.ts.map +1 -0
  56. package/eds-table/eds-table-selectable-row.js +92 -0
  57. package/eds-table/eds-table-selectable-row.js.map +1 -0
  58. package/eds-table/eds-table-sort.model.d.ts +11 -0
  59. package/eds-table/eds-table-sort.model.d.ts.map +1 -0
  60. package/eds-table/eds-table-sort.model.js +5 -0
  61. package/eds-table/eds-table-sort.model.js.map +1 -0
  62. package/eds-table/eds-table-sortable-col.d.ts +32 -0
  63. package/eds-table/eds-table-sortable-col.d.ts.map +1 -0
  64. package/eds-table/eds-table-sortable-col.js +65 -0
  65. package/eds-table/eds-table-sortable-col.js.map +1 -0
  66. package/eds-table/eds-table-sticky-col.d.ts +25 -0
  67. package/eds-table/eds-table-sticky-col.d.ts.map +1 -0
  68. package/eds-table/eds-table-sticky-col.js +23 -0
  69. package/eds-table/eds-table-sticky-col.js.map +1 -0
  70. package/eds-table/eds-table.css +410 -0
  71. package/eds-table/eds-table.d.ts +92 -0
  72. package/eds-table/eds-table.d.ts.map +1 -0
  73. package/eds-table/eds-table.js +353 -0
  74. package/eds-table/eds-table.js.map +1 -0
  75. package/eds-table/index.d.ts +20 -0
  76. package/eds-table/index.d.ts.map +1 -0
  77. package/eds-table/index.js +10 -0
  78. package/eds-table/index.js.map +1 -0
  79. package/index.d.ts +6 -0
  80. package/index.d.ts.map +1 -1
  81. package/index.js +3 -0
  82. package/index.js.map +1 -1
  83. package/package.json +22 -2
  84. package/showcase/doc-page.d.ts +56 -0
  85. package/showcase/doc-page.d.ts.map +1 -0
  86. package/showcase/doc-page.js +104 -0
  87. package/showcase/doc-page.js.map +1 -0
  88. package/showcase/index.d.ts +7 -0
  89. package/showcase/index.d.ts.map +1 -0
  90. package/showcase/index.js +7 -0
  91. package/showcase/index.js.map +1 -0
  92. package/showcase/jsx-to-string.d.ts +15 -0
  93. package/showcase/jsx-to-string.d.ts.map +1 -0
  94. package/showcase/jsx-to-string.js +98 -0
  95. package/showcase/jsx-to-string.js.map +1 -0
  96. package/showcase/shared.d.ts +64 -0
  97. package/showcase/shared.d.ts.map +1 -0
  98. package/showcase/shared.js +43 -0
  99. package/showcase/shared.js.map +1 -0
  100. package/showcase/showcase.css +407 -0
  101. package/styles.css +4 -0
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ /**
4
+ * `EdsTableStickyCol` — pure React port of the Angular `th[edsStickyCol], td[edsStickyCol]`
5
+ * directive. Marks a column cell as sticky by adding the `eds-table__col--sticky` class (the
6
+ * directive's sole behavior — `host: { class: 'eds-table__col--sticky' }`). Only first or last
7
+ * columns can be sticky. The sticky offset / shadow classes are applied at runtime by the
8
+ * enclosing `EdsTable` sticky handler (mirrors the Angular `stickyFeatureHandler`).
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * <EdsTableStickyCol as="th">Name</EdsTableStickyCol>
13
+ * <EdsTableStickyCol as="td">{row.name}</EdsTableStickyCol>
14
+ * ```
15
+ */
16
+ export const EdsTableStickyCol = React.forwardRef(function EdsTableStickyCol({ as = 'td', className, children, ...rest }, ref) {
17
+ const Cell = as;
18
+ const rootClass = className
19
+ ? `eds-table__col--sticky ${className}`
20
+ : 'eds-table__col--sticky';
21
+ return (_jsx(Cell, { ref: ref, className: rootClass, ...rest, children: children }));
22
+ });
23
+ //# sourceMappingURL=eds-table-sticky-col.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eds-table-sticky-col.js","sourceRoot":"","sources":["../../src/eds-table/eds-table-sticky-col.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC,UAAU,CAC7C,SAAS,iBAAiB,CAAC,EAAE,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG;IACvE,MAAM,IAAI,GAAG,EAAE,CAAC;IAChB,MAAM,SAAS,GAAG,SAAS;QACvB,CAAC,CAAC,0BAA0B,SAAS,EAAE;QACvC,CAAC,CAAC,wBAAwB,CAAC;IAC/B,OAAO,CACH,KAAC,IAAI,IAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,KAAM,IAAI,YACzC,QAAQ,GACN,CACV,CAAC;AACN,CAAC,CACJ,CAAC"}
@@ -0,0 +1,410 @@
1
+ /* eds-table — 1:1 pure-React port of eds-table.scss (+ eds-table-filter.scss, sortable-col, states, mq).
2
+ * Authored against bare classes (no .eui-21 wrapper, no :host); --eds-* tokens copied verbatim.
3
+ * base.media(base.$eds-bkp-mobile) → @media (max-width: 767px). */
4
+
5
+ /* === table.scss === */
6
+ .eds-table {
7
+ display: block;
8
+ position: relative;
9
+ width: 100%;
10
+ }
11
+
12
+ .eds-table .eds-table__scroll-viewport {
13
+ min-height: 100%;
14
+ width: 100%;
15
+ }
16
+
17
+ .eds-table .eds-table__scrollable-wrapper {
18
+ overflow: auto;
19
+ }
20
+
21
+ .eds-table .eds-table__orderable-cols-preview,
22
+ .eds-table .eds-table__orderable-rows-preview {
23
+ display: none;
24
+ }
25
+
26
+ .eds-table tr[edshighlighted] {
27
+ background-color: var(--eds-c-border-divider) !important;
28
+ position: relative;
29
+ z-index: 2;
30
+ }
31
+
32
+ .eds-table caption {
33
+ text-align: start;
34
+ font-style: italic;
35
+ }
36
+
37
+ .eds-table .eds-table__cell-select {
38
+ width: 48px;
39
+ text-align: center;
40
+ padding: var(--eds-sp-xs);
41
+ }
42
+
43
+ .eds-table .eds-table__cell-select-checkbox-container {
44
+ display: flex;
45
+ align-items: center;
46
+ justify-content: center;
47
+ }
48
+
49
+ .eds-table .eds-table__loading-overlay {
50
+ position: absolute;
51
+ inset: 0;
52
+ display: flex;
53
+ align-items: center;
54
+ justify-content: center;
55
+ background-color: rgba(255, 255, 255, 0.7);
56
+ z-index: 10;
57
+ }
58
+
59
+ .eds-table .eds-table__loading-spinner {
60
+ width: 32px;
61
+ height: 32px;
62
+ border: 3px solid var(--eds-c-border-divider);
63
+ border-top-color: var(--eds-c-border-primary);
64
+ border-radius: 50%;
65
+ animation: eds-table-spin 0.8s linear infinite;
66
+ }
67
+
68
+ .eds-table .eds-table__skeleton-line {
69
+ height: 16px;
70
+ background: var(--eds-c-surface-hover);
71
+ border-radius: var(--eds-br-s);
72
+ /* animation: eds-table-pulse 1.5s ease-in-out infinite; */
73
+ }
74
+
75
+ .eds-table .eds-table__expandable-row td {
76
+ background-color: var(--eds-c-surface-default);
77
+ }
78
+
79
+ /* === table-filter.scss === */
80
+ .eds-table .eds-table-filter {
81
+ align-items: center;
82
+ display: flex;
83
+ justify-content: flex-end;
84
+ position: relative;
85
+ }
86
+
87
+ .eds-table .eds-table-filter--responsive {
88
+ width: 100%;
89
+ }
90
+
91
+ .eds-table .eds-table-filter__input {
92
+ padding-left: var(--eds-sp-2xl) !important;
93
+ }
94
+
95
+ .eds-table .eds-table-filter__icon {
96
+ left: var(--eds-sp-xs);
97
+ position: absolute;
98
+ top: var(--eds-sp-xs);
99
+ }
100
+
101
+ /* Standalone eds-table-filter host (rendered outside the table too) */
102
+ .eds-table-filter {
103
+ display: flex;
104
+ align-items: center;
105
+ justify-content: flex-end;
106
+ }
107
+
108
+ .eds-table-filter .eds-table-filter__form {
109
+ width: 100%;
110
+ max-width: 320px;
111
+ }
112
+
113
+ /* === table-sortable-col.scss === */
114
+ .eds-table .eds-table__sortable-col {
115
+ cursor: pointer;
116
+ user-select: none;
117
+ }
118
+
119
+ .eds-table .eds-table__sortable-col--disabled {
120
+ cursor: default;
121
+ }
122
+
123
+ .eds-table .eds-table__sortable-col-multisort-index {
124
+ font: var(--eds-f-paragraph-xs);
125
+ color: var(--eds-c-foreground-subtler);
126
+ margin-left: var(--eds-sp-3xs);
127
+ }
128
+
129
+ .eds-table .eds-table__sortable-col .eds-table__sortable-col-content {
130
+ align-items: center;
131
+ display: flex;
132
+ vertical-align: middle;
133
+ white-space: nowrap;
134
+ justify-content: space-between;
135
+ }
136
+
137
+ .eds-table .eds-table__sortable-col .eds-table__sortable-col-content .eds-table__sortable-col-content-label {
138
+ align-items: center;
139
+ display: flex;
140
+ user-select: none;
141
+ gap: var(--eds-sp-2xs);
142
+ }
143
+
144
+ /* === table.states.scss === */
145
+ .eds-table .eds-table__row--selected td {
146
+ background-color: var(--eds-c-surface-selected);
147
+ }
148
+
149
+ .eds-table .eds-table__row--selectable {
150
+ cursor: pointer;
151
+ }
152
+
153
+ .eds-table .eds-table__col--sticky {
154
+ position: sticky;
155
+ z-index: 1;
156
+ background-color: inherit;
157
+ }
158
+
159
+ .eds-table .eds-table__col--sticky-shadowed-first {
160
+ box-shadow: inset -5px 0 8px -8px rgba(0, 0, 0, 0.2);
161
+ }
162
+
163
+ .eds-table .eds-table__col--sticky-shadowed-last {
164
+ box-shadow: inset 5px 0 8px -8px rgba(0, 0, 0, 0.2);
165
+ }
166
+
167
+ .eds-table--virtual-scroll {
168
+ width: 100%;
169
+ height: 100%;
170
+ }
171
+
172
+ .eds-table--fixed-layout {
173
+ table-layout: fixed;
174
+ width: 100%;
175
+ }
176
+
177
+ .eds-table--bordered td,
178
+ .eds-table--bordered th {
179
+ border: var(--eds-bw-xs) solid var(--eds-c-border-divider);
180
+ }
181
+
182
+ .eds-table--compact thead tr th {
183
+ padding: var(--eds-sp-3xs) var(--eds-sp-s);
184
+ }
185
+
186
+ .eds-table--compact tbody tr {
187
+ height: calc(2 * var(--eds-sp-m));
188
+ }
189
+
190
+ .eds-table--compact tbody tr td {
191
+ padding: 0 var(--eds-sp-s);
192
+ }
193
+
194
+ .eds-table--flat thead tr th {
195
+ background-color: transparent;
196
+ border: none;
197
+ }
198
+
199
+ .eds-table--flat tbody tr {
200
+ border: none;
201
+ }
202
+
203
+ .eds-table--flat tbody tr td {
204
+ background-color: transparent;
205
+ border: none;
206
+ }
207
+
208
+ .eds-table--flat tbody tr:hover td {
209
+ background-color: var(--eds-c-surface-hover);
210
+ }
211
+
212
+ .eds-table--flat tfoot tr {
213
+ border: none;
214
+ }
215
+
216
+ .eds-table--flat tfoot tr td {
217
+ background-color: transparent;
218
+ border: none;
219
+ }
220
+
221
+ .eds-table--flat tr {
222
+ border: none;
223
+ }
224
+
225
+ .eds-table--loading {
226
+ pointer-events: none;
227
+ opacity: 0.6;
228
+ }
229
+
230
+ .eds-table--cols-orderable .cdk-drag-placeholder {
231
+ background-color: var(--eds-c-surface-elevation);
232
+ color: var(--eds-c-foreground-default);
233
+ cursor: move;
234
+ opacity: 1;
235
+ }
236
+
237
+ .eds-table--cols-orderable tr {
238
+ display: table-row;
239
+ }
240
+
241
+ .eds-table--cols-orderable tr th.cdk-drag:not(.cdk-drag-disabled) {
242
+ cursor: move;
243
+ }
244
+
245
+ .eds-table--sticky {
246
+ max-width: none !important;
247
+ }
248
+
249
+ .eds-table--sticky tbody tr:nth-of-type(odd) td {
250
+ background-color: var(--eds-c-surface-default);
251
+ }
252
+
253
+ .eds-table--sticky tbody tr:nth-of-type(odd):hover td {
254
+ background-color: var(--eds-c-surface-hover);
255
+ }
256
+
257
+ .eds-table--sticky tbody tr:nth-of-type(even) td {
258
+ background-color: var(--eds-c-surface-elevation);
259
+ }
260
+
261
+ .eds-table--sticky tbody tr:nth-of-type(even):hover td {
262
+ background-color: var(--eds-c-surface-hover);
263
+ }
264
+
265
+ .eds-table--sticky-header thead {
266
+ position: sticky;
267
+ top: 0;
268
+ z-index: 8;
269
+ }
270
+
271
+ .eds-table--sticky-header thead th,
272
+ .eds-table--sticky-header thead td {
273
+ background-color: inherit;
274
+ }
275
+
276
+ .eds-table--sticky-header.eds-table--sticky-cols thead {
277
+ z-index: 9;
278
+ }
279
+
280
+ .eds-table--sticky-footer tfoot {
281
+ position: sticky;
282
+ bottom: -1px;
283
+ z-index: 8;
284
+ }
285
+
286
+ .eds-table--sticky-footer tfoot tr td {
287
+ background-color: inherit;
288
+ }
289
+
290
+ .eds-table--sticky-cols .eds-table__col--sticky {
291
+ position: sticky;
292
+ z-index: 1;
293
+ }
294
+
295
+ .eds-table--sticky-cols th.eds-table__col--sticky.eds-table__col--sticky-shadowed-first,
296
+ .eds-table--sticky-cols tbody td.eds-table__col--sticky.eds-table__col--sticky-shadowed-first,
297
+ .eds-table--sticky-cols tfoot td.eds-table__col--sticky.eds-table__col--sticky-shadowed-first {
298
+ box-shadow: inset -5px 0 8px -8px rgba(0, 0, 0, 0.2);
299
+ }
300
+
301
+ .eds-table--sticky-cols th.eds-table__col--sticky.eds-table__col--sticky-shadowed-last,
302
+ .eds-table--sticky-cols tbody td.eds-table__col--sticky.eds-table__col--sticky-shadowed-last,
303
+ .eds-table--sticky-cols tfoot td.eds-table__col--sticky.eds-table__col--sticky-shadowed-last {
304
+ box-shadow: inset 5px 0 8px -8px rgba(0, 0, 0, 0.2);
305
+ }
306
+
307
+ /* === table.mq.scss — base.media(base.$eds-bkp-mobile) === */
308
+ @media (max-width: 767px) {
309
+ .eds-table--responsive {
310
+ width: 100% !important;
311
+ }
312
+
313
+ .eds-table--responsive thead,
314
+ .eds-table--responsive tbody,
315
+ .eds-table--responsive tfoot,
316
+ .eds-table--responsive th,
317
+ .eds-table--responsive td,
318
+ .eds-table--responsive tr {
319
+ display: block;
320
+ }
321
+
322
+ .eds-table--responsive thead tr {
323
+ left: -9999px;
324
+ position: absolute;
325
+ top: -9999px;
326
+ }
327
+
328
+ .eds-table--responsive tr {
329
+ height: auto;
330
+ }
331
+
332
+ .eds-table--responsive td {
333
+ border: none;
334
+ border-bottom: var(--eds-bw-s) solid var(--eds-c-border-divider);
335
+ padding-left: 50%;
336
+ position: relative;
337
+ text-align: left !important;
338
+ left: unset !important;
339
+ right: unset !important;
340
+ }
341
+
342
+ .eds-table--responsive td::before {
343
+ color: var(--eds-c-foreground-subtler);
344
+ content: attr(data-col-label);
345
+ left: var(--eds-sp-xs);
346
+ padding-right: var(--eds-sp-xs);
347
+ position: absolute;
348
+ width: 45%;
349
+ overflow: hidden;
350
+ text-overflow: ellipsis;
351
+ white-space: nowrap;
352
+ font: var(--eds-f-label-m-semi-bold);
353
+ }
354
+
355
+ .eds-table--responsive tfoot tr td:empty {
356
+ display: none !important;
357
+ }
358
+
359
+ .eds-table--responsive .actionsColumn,
360
+ .eds-table--responsive .actions-column {
361
+ justify-content: flex-start;
362
+ text-align: left;
363
+ width: 100%;
364
+ }
365
+
366
+ /* Sticky table mobile reset */
367
+ .eds-table .eds-table__sticky-container {
368
+ height: auto;
369
+ width: auto !important;
370
+ }
371
+
372
+ .eds-table--sticky-cols th,
373
+ .eds-table--sticky-cols td {
374
+ width: auto;
375
+ z-index: auto;
376
+ }
377
+
378
+ .eds-table--sticky-cols th .eds-table__col--sticky,
379
+ .eds-table--sticky-cols td .eds-table__col--sticky {
380
+ width: auto;
381
+ z-index: auto;
382
+ }
383
+
384
+ .eds-table--sticky-cols th .eds-table__col--sticky.eds-table__col--sticky-shadowed-first,
385
+ .eds-table--sticky-cols th .eds-table__col--sticky.eds-table__col--sticky-shadowed-last,
386
+ .eds-table--sticky-cols td .eds-table__col--sticky.eds-table__col--sticky-shadowed-first,
387
+ .eds-table--sticky-cols td .eds-table__col--sticky.eds-table__col--sticky-shadowed-last {
388
+ box-shadow: none !important;
389
+ }
390
+
391
+ .eds-table--sticky-cols tfoot tr td:empty {
392
+ display: none !important;
393
+ }
394
+ }
395
+
396
+ @keyframes eds-table-spin {
397
+ to {
398
+ transform: rotate(360deg);
399
+ }
400
+ }
401
+
402
+ @keyframes eds-table-pulse {
403
+ 0%,
404
+ 100% {
405
+ opacity: 1;
406
+ }
407
+ 50% {
408
+ opacity: 0.5;
409
+ }
410
+ }
@@ -0,0 +1,92 @@
1
+ import * as React from 'react';
2
+ import { EdsTableSort } from './eds-table-sort.model.js';
3
+ /** Scroll direction reported during async virtual scroll (mirrors the Angular type). */
4
+ export type EdsTableScrollDirection = 'UP' | 'DOWN';
5
+ /** Render-slot context passed to `renderBody` for each row. */
6
+ export interface EdsTableRowContext<DATA = unknown> {
7
+ /** The row data (`$implicit` in the Angular body template). */
8
+ row: DATA;
9
+ /** The row index (`index` in the Angular body template). */
10
+ index: number;
11
+ }
12
+ export interface EdsTableProps<DATA = unknown> extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onScroll'> {
13
+ /** Data to display in the table. @default [] */
14
+ data?: DATA[];
15
+ /** Unique property identifier for rows. @default 'id' */
16
+ propId?: string;
17
+ /** Row height used by virtual scroll calculation. @default 41 */
18
+ itemSize?: number;
19
+ /** Rows to be pre-selected. @default [] */
20
+ preselectedRows?: DATA[];
21
+ /** Whether the table uses virtual scroll. @default false */
22
+ isVirtualScroll?: boolean;
23
+ /** Whether to cache data when scrolling (virtual scroll). @default false */
24
+ isVirtualScrollCache?: boolean;
25
+ /** Whether the table header is sticky. @default false */
26
+ hasStickyHeader?: boolean;
27
+ /** Whether the table footer is sticky. @default false */
28
+ hasStickyFooter?: boolean;
29
+ /** Whether columns are sticky. @default false */
30
+ hasStickyCols?: boolean;
31
+ /** Whether the table is responsive (cards layout on mobile). @default true */
32
+ edsTableResponsive?: boolean;
33
+ /** Whether the table uses async data (server-side pagination/sorting/filtering). @default false */
34
+ isAsync?: boolean;
35
+ /** Total length of async virtual scroll items. @default 0 */
36
+ virtualScrollAsyncItemsLength?: number;
37
+ /** Number of rows to load per virtual scroll batch. @default 50 */
38
+ virtualScrollNbRows?: number;
39
+ /** Whether a loading state is displayed. @default false */
40
+ isLoading?: boolean;
41
+ /** Whether 'select all' only selects visible rows (current page). @default true */
42
+ isSelectOnlyVisibleRows?: boolean;
43
+ /** Whether the table uses bordered styles. @default false */
44
+ edsTableBordered?: boolean;
45
+ /** Whether the table uses a fixed layout. @default false */
46
+ edsTableFixedLayout?: boolean;
47
+ /** Whether the table uses compact styling. @default false */
48
+ edsTableCompact?: boolean;
49
+ /** Whether the table uses flat styling. @default false */
50
+ isFlat?: boolean;
51
+ /** Emitted on virtual scroll changes (mirrors `scrollChange`). */
52
+ onScrollChange?: (event: {
53
+ start: number;
54
+ end: number;
55
+ }) => void;
56
+ /** Emitted when the row selection changes (mirrors `rowsSelect`). */
57
+ onRowsSelect?: (rows: DATA[]) => void;
58
+ /** Emitted when sort changes (mirrors `sortChange`). */
59
+ onSortChange?: (sorts: EdsTableSort[]) => void;
60
+ /** Header slot — renders inside `<thead>` (mirrors `edsTableTemplate="header"`). */
61
+ renderHeader?: () => React.ReactNode;
62
+ /** Body row slot — rendered once per row inside `<tbody>` (mirrors `edsTableTemplate="body"`). */
63
+ renderBody?: (ctx: EdsTableRowContext<DATA>) => React.ReactNode;
64
+ /** Footer slot — renders inside `<tfoot>` (mirrors `edsTableTemplate="footer"`). */
65
+ renderFooter?: () => React.ReactNode;
66
+ /** No-data slot — rendered inside `<tbody>` when there are no rows (mirrors `edsTableTemplate="noData"`). */
67
+ renderNoData?: () => React.ReactNode;
68
+ /** Caption slot — renders inside `<caption>` (mirrors `edsTableTemplate="caption"`). */
69
+ renderCaption?: () => React.ReactNode;
70
+ }
71
+ /**
72
+ * `edsTableFilterData` — pure React port of the Angular `EdsTable.filterData()` method. Returns the
73
+ * rows whose (deeply-walked) property values contain the filter string (case-insensitive). Use it to
74
+ * client-side filter the `data` you pass to `EdsTable` in response to `EdsTableFilter`'s
75
+ * `onFilterChange` (the Angular component filtered internally; React keeps `data` consumer-owned).
76
+ *
77
+ * @example
78
+ * ```tsx
79
+ * const [filter, setFilter] = useState('');
80
+ * const rows = useMemo(() => edsTableFilterData(filter, allRows), [filter, allRows]);
81
+ * <EdsTableFilter onFilterChange={setFilter} />
82
+ * <EdsTable data={rows} renderBody={…} />
83
+ * ```
84
+ */
85
+ export declare function edsTableFilterData<DATA>(filter: string, rows: DATA[]): DATA[];
86
+ /**
87
+ * Generic `forwardRef` wrapper preserving the `<DATA>` type parameter (which `forwardRef` erases).
88
+ */
89
+ export declare const EdsTable: <DATA = unknown>(props: EdsTableProps<DATA> & {
90
+ ref?: React.Ref<HTMLDivElement>;
91
+ }) => React.ReactElement;
92
+ //# sourceMappingURL=eds-table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eds-table.d.ts","sourceRoot":"","sources":["../../src/eds-table/eds-table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,EAAE,YAAY,EAAqB,MAAM,2BAA2B,CAAC;AAE5E,wFAAwF;AACxF,MAAM,MAAM,uBAAuB,GAAG,IAAI,GAAG,MAAM,CAAC;AAEpD,+DAA+D;AAC/D,MAAM,WAAW,kBAAkB,CAAC,IAAI,GAAG,OAAO;IAC9C,+DAA+D;IAC/D,GAAG,EAAE,IAAI,CAAC;IACV,4DAA4D;IAC5D,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,aAAa,CAAC,IAAI,GAAG,O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