@uxf/data-grid 11.0.0-beta.2 → 11.0.0-beta.21

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 (53) hide show
  1. package/_generator/cli.js +29 -0
  2. package/_generator/index.js +40 -0
  3. package/_store/reducer.d.ts +2 -2
  4. package/_store/reducer.js +32 -19
  5. package/_story-utils/grid-type.d.ts +2 -0
  6. package/_story-utils/loader.js +1 -1
  7. package/_story-utils/schema.js +12 -0
  8. package/bin/uxf-data-grid-generator.js +8 -0
  9. package/data-grid.js +7 -8
  10. package/data-grid.stories.js +34 -3
  11. package/filter-handler/date.d.ts +3 -0
  12. package/filter-handler/date.js +43 -0
  13. package/filter-handler/index.js +4 -0
  14. package/filter-handler/multi-select.d.ts +3 -0
  15. package/filter-handler/multi-select.js +29 -0
  16. package/hidden-columns/hidden-columns.js +2 -4
  17. package/package.json +8 -3
  18. package/pagination/pagination.d.ts +1 -1
  19. package/pagination/pagination.js +2 -2
  20. package/pagination/pagination.stories.js +1 -1
  21. package/row-counts/row-counts.d.ts +1 -0
  22. package/row-counts/row-counts.js +7 -1
  23. package/row-counts/row-counts.stories.js +1 -1
  24. package/selected-rows-toolbar/selected-rows-toolbar.js +1 -1
  25. package/selected-rows-toolbar/selected-rows-toolbar.stories.js +4 -1
  26. package/styles.css +605 -0
  27. package/table/components/action-cell-wrapper.d.ts +2 -0
  28. package/table/components/{action-cell-base.js → action-cell-wrapper.js} +3 -29
  29. package/table/components/action-cell.d.ts +7 -0
  30. package/table/components/action-cell.js +14 -0
  31. package/{hooks → table/hooks}/use-rdg-visuals.d.ts +2 -2
  32. package/{hooks → table/hooks}/use-rdg-visuals.js +2 -2
  33. package/table/hooks/use-react-data-grid-columns.d.ts +2 -1
  34. package/table/hooks/use-react-data-grid-columns.js +21 -29
  35. package/table/index.d.ts +2 -0
  36. package/table/index.js +2 -0
  37. package/table/table.d.ts +1 -1
  38. package/table/table.js +15 -7
  39. package/table/table.stories.js +1 -1
  40. package/table/types.d.ts +10 -12
  41. package/toolbar-control/toolbar-control.js +2 -2
  42. package/types/components.d.ts +0 -5
  43. package/types/data-grid-props.d.ts +13 -12
  44. package/types/index.d.ts +0 -1
  45. package/types/index.js +0 -1
  46. package/types/state.d.ts +6 -3
  47. package/use-data-grid-control/use-data-grid-control.d.ts +3 -1
  48. package/use-data-grid-control/use-data-grid-control.js +1 -1
  49. package/use-data-grid-fetching/use-data-grid-fetching.d.ts +7 -1
  50. package/use-data-grid-fetching/use-data-grid-fetching.js +3 -1
  51. package/table/components/action-cell-base.d.ts +0 -4
  52. package/types/ui-components.d.ts +0 -18
  53. package/types/ui-components.js +0 -2
package/styles.css ADDED
@@ -0,0 +1,605 @@
1
+ @import url("react-data-grid/lib/styles.css");
2
+
3
+ @layer rdg.Root {
4
+ .uxf-data-grid__table {
5
+ --rdg-color-scheme: light;
6
+ --rdg-color: theme("colors.lightHigh");
7
+ --rdg-border-color: theme("colors.lightBorder");
8
+ --rdg-summary-border-color: theme("colors.lightBorder");
9
+ --rdg-background-color: theme("colors.white");
10
+ --rdg-header-background-color: theme("colors.gray.50");
11
+ --rdg-row-hover-background-color: theme("colors.gray.50");
12
+ --rdg-row-selected-background-color: theme("colors.gray.100/.75");
13
+ --rdg-row-selected-hover-background-color: theme("colors.gray.200/.75");
14
+ --rdg-selection-color: theme("colors.lightBorder");
15
+ --rdg-font-size: 14px;
16
+
17
+ :root .dark & {
18
+ --rdg-color-scheme: dark;
19
+ --rdg-color: theme("colors.darkHigh");
20
+ --rdg-border-color: theme("colors.darkBorder");
21
+ --rdg-summary-border-color: theme("colors.darkBorder");
22
+ --rdg-background-color: theme("colors.gray.950");
23
+ --rdg-header-background-color: theme("colors.gray.900");
24
+ --rdg-row-hover-background-color: theme("colors.gray.950");
25
+ --rdg-row-selected-background-color: theme("colors.gray.900/.75");
26
+ --rdg-row-selected-hover-background-color: theme("colors.gray.800/.75");
27
+ --rdg-selection-color: theme("colors.darkBorder");
28
+ --rdg-font-size: 14px;
29
+ }
30
+ }
31
+ }
32
+
33
+ .uxf-data-grid {
34
+ border: 1px solid var(--rdg-border-color);
35
+ border-radius: theme("borderRadius.DEFAULT");
36
+
37
+ &.no-border {
38
+ border-style: none;
39
+ }
40
+
41
+ &__action-cell {
42
+ background-color: var(--rdg-background-color);
43
+ border-inline-start: 1px solid var(--rdg-border-color);
44
+ position: sticky;
45
+ right: 0;
46
+ }
47
+
48
+ &__action-cell-wrapper {
49
+ @apply space-x-2;
50
+
51
+ align-items: center;
52
+ display: flex;
53
+ height: 100%;
54
+ justify-content: center;
55
+ text-align: center;
56
+ width: 100%;
57
+
58
+ .uxf-icon {
59
+ color: theme("colors.lightMedium");
60
+
61
+ :root .dark & {
62
+ color: theme("colors.darkMedium");
63
+ }
64
+ }
65
+ }
66
+
67
+ &__body-cell {
68
+ &--boolean {
69
+ align-items: center;
70
+ display: flex;
71
+ height: 100%;
72
+ width: 100%;
73
+ }
74
+ }
75
+
76
+ &__drawer {
77
+ @apply ease-in-out;
78
+
79
+ background-color: theme("colors.gray.900/.25");
80
+ inset: 0;
81
+ overflow: hidden;
82
+ position: fixed;
83
+ z-index: theme("zIndex.modal");
84
+
85
+ :root .dark & {
86
+ background-color: theme("colors.gray.900/.75");
87
+ }
88
+
89
+ &--open {
90
+ @apply transition-opacity duration-500;
91
+
92
+ opacity: 100;
93
+ transform: translateX(0);
94
+ }
95
+
96
+ &--closed {
97
+ @apply transition-all delay-500;
98
+
99
+ opacity: 0;
100
+ transform: translateX(100%);
101
+ }
102
+
103
+ &-body-wrapper {
104
+ @apply transition-all duration-500 ease-in-out;
105
+
106
+ background-color: theme("colors.white");
107
+ box-shadow: theme("boxShadow.xl");
108
+ height: 100%;
109
+ max-width: theme("maxWidth.sm");
110
+ position: absolute;
111
+ right: 0;
112
+ transform: translateX(100%);
113
+ width: theme("width.11/12");
114
+
115
+ &--open {
116
+ transform: translateX(0);
117
+ }
118
+ }
119
+
120
+ &-body {
121
+ display: flex;
122
+ flex-direction: column;
123
+ height: 100%;
124
+ max-width: theme("maxWidth.sm");
125
+ overflow-y: scroll;
126
+ padding-bottom: theme("spacing.10");
127
+ position: relative;
128
+ width: 100%;
129
+
130
+ :root .dark & {
131
+ background-color: theme("colors.gray.950");
132
+ color: theme("colors.gray.100");
133
+ }
134
+ }
135
+
136
+ &-close-button {
137
+ margin-left: auto;
138
+ margin-right: theme("spacing.4");
139
+ margin-top: theme("spacing.4") !important;
140
+ }
141
+
142
+ &-header {
143
+ font-weight: theme("fontWeight.bold");
144
+ padding: theme("spacing.8") theme("spacing.4") theme("spacing.4");
145
+ }
146
+
147
+ &-content {
148
+ padding: theme("spacing.4");
149
+ }
150
+
151
+ &-backdrop {
152
+ cursor: pointer;
153
+ height: 100%;
154
+ width: 100vw;
155
+ }
156
+ }
157
+
158
+ &__fallback {
159
+ align-items: center;
160
+ color: theme("colors.gray.600"); /* ?? */
161
+ display: flex;
162
+ grid-column: 1/-1;
163
+ justify-content: center;
164
+ text-align: center;
165
+ }
166
+
167
+ &__filter {
168
+ &--date {
169
+ display: grid;
170
+ gap: theme("spacing.4");
171
+ grid-template-columns: repeat(2, 1fr);
172
+ }
173
+
174
+ &--interval {
175
+ display: grid;
176
+ gap: theme("spacing.4");
177
+ grid-template-columns: 1fr min-content 1fr;
178
+
179
+ .uxf-data-grid__filter-gap {
180
+ align-items: center;
181
+ display: flex;
182
+ padding-top: theme("spacing.5");
183
+ }
184
+ }
185
+ }
186
+
187
+ &__filters {
188
+ @apply space-y-4;
189
+ }
190
+
191
+ &__filter-list {
192
+ @apply space-x-2;
193
+
194
+ padding: theme("spacing.2");
195
+ }
196
+
197
+ &__footer {
198
+ align-items: center;
199
+ display: flex;
200
+ flex-wrap: wrap;
201
+ gap: theme("spacing.4");
202
+ justify-content: flex-end;
203
+ padding: theme("spacing.2");
204
+
205
+ &.no-border {
206
+ padding-inline: 0;
207
+ }
208
+ }
209
+
210
+ &__linear-progress {
211
+ border-radius: 20px;
212
+ height: 3px;
213
+ left: 0;
214
+ overflow: hidden;
215
+ position: absolute;
216
+ right: 0;
217
+ z-index: 1;
218
+
219
+ &.is-loading::before {
220
+ animation: datagridlineanim 1s linear infinite;
221
+ background-color: theme("colors.dataGridSecondary");
222
+ border-radius: inherit;
223
+ content: "";
224
+ height: 3px;
225
+ left: -50%;
226
+ position: absolute;
227
+ width: 40%;
228
+ }
229
+ }
230
+
231
+ &__linear-progress-wrapper {
232
+ position: relative;
233
+ }
234
+
235
+ &__pagination-counts {
236
+ @apply text-sm;
237
+
238
+ color: theme("colors.lightLow");
239
+ }
240
+
241
+ &__plugin-fulltext {
242
+ color: theme("colors.gray.400");
243
+ margin: theme("spacing.2") 0;
244
+ width: 100%;
245
+
246
+ @screen sm {
247
+ width: auto;
248
+ }
249
+
250
+ .uxf-icon {
251
+ color: theme("colors.lightMedium");
252
+
253
+ :root .dark & {
254
+ color: theme("colors.darkMedium");
255
+ }
256
+ }
257
+ }
258
+
259
+ &__plugin-button {
260
+ flex-shrink: 0;
261
+ margin: theme("spacing.2") 0;
262
+
263
+ .uxf-icon {
264
+ color: theme("colors.lightMedium");
265
+
266
+ :root .dark & {
267
+ color: theme("colors.darkMedium");
268
+ }
269
+ }
270
+ }
271
+
272
+ &__rows-per-page {
273
+ @apply text-sm;
274
+
275
+ align-items: center;
276
+ color: theme("colors.lightLow");
277
+ display: flex;
278
+ flex-wrap: wrap;
279
+ gap: theme("spacing.2");
280
+
281
+ .uxf-select {
282
+ width: theme("width.28");
283
+ }
284
+ }
285
+
286
+ &__select-row-checkbox-wrapper {
287
+ align-items: center;
288
+ color: theme("colors.white");
289
+ display: flex;
290
+ height: 100%;
291
+ justify-content: center;
292
+ width: 100%;
293
+ }
294
+
295
+ &__selected-rows-toolbar-wrapper {
296
+ align-items: center;
297
+ bottom: theme("spacing.8");
298
+ display: flex;
299
+ justify-content: center;
300
+ left: 0;
301
+ pointer-events: none;
302
+ position: fixed;
303
+ right: 0;
304
+ z-index: theme("zIndex.fixed");
305
+ }
306
+
307
+ &__selected-rows-toolbar {
308
+ @apply text-sm drop-shadow-xl;
309
+
310
+ align-items: center;
311
+ background-color: theme("colors.dataGridPrimary");
312
+ border: 1px solid theme("colors.lightBorder");
313
+ border-radius: 999px;
314
+ color: theme("colors.white");
315
+ display: flex;
316
+ justify-content: center;
317
+ padding: theme("spacing.2") theme("spacing.6");
318
+ pointer-events: auto;
319
+
320
+ :root .dark & {
321
+ border-color: theme("colors.darkBorder");
322
+ }
323
+ }
324
+
325
+ &__selected-rows-toolbar-actions {
326
+ @apply space-x-2;
327
+
328
+ align-items: center;
329
+ display: flex;
330
+ padding-left: theme("spacing.4");
331
+ }
332
+
333
+ &__table {
334
+ &::-webkit-scrollbar {
335
+ height: 8px;
336
+ width: 8px;
337
+ }
338
+
339
+ &::-webkit-scrollbar-track {
340
+ background-color: transparent;
341
+ }
342
+
343
+ &::-webkit-scrollbar-thumb,
344
+ &::-webkit-scrollbar-thumb:hover {
345
+ background-color: theme("colors.lightLow");
346
+ border-radius: 999px;
347
+
348
+ :root .dark & {
349
+ background-color: theme("colors.darkLow");
350
+ }
351
+ }
352
+ }
353
+
354
+ &__toolbar {
355
+ align-items: center;
356
+ border-bottom: 1px solid theme("colors.lightBorder");
357
+ display: flex;
358
+ flex-wrap: wrap;
359
+ gap: theme("spacing.2");
360
+ justify-content: flex-end;
361
+ padding: theme("spacing.2");
362
+
363
+ &.no-border {
364
+ padding-right: 0;
365
+ }
366
+
367
+ :root .dark & {
368
+ border-bottom-color: theme("colors.darkBorder");
369
+ }
370
+
371
+ @screen md {
372
+ padding-block: 0;
373
+ padding-left: 0;
374
+ }
375
+ }
376
+
377
+ &__toolbar-tab {
378
+ @apply text-sm;
379
+
380
+ align-items: center;
381
+ border-bottom: 2px solid transparent;
382
+ color: theme("colors.lightMedium");
383
+ display: inline-flex;
384
+ font-weight: theme("fontWeight.medium");
385
+ padding: theme("spacing.4");
386
+ white-space: nowrap;
387
+
388
+ :root .dark & {
389
+ color: theme("colors.darkMedium");
390
+ }
391
+
392
+ &:hover {
393
+ color: theme("colors.lightHigh");
394
+
395
+ :root .dark & {
396
+ color: theme("colors.darkHigh");
397
+ }
398
+ }
399
+
400
+ &.is-active {
401
+ border-bottom-color: currentcolor;
402
+ color: theme("colors.dataGridPrimary");
403
+ }
404
+ }
405
+
406
+ &__toolbar-tabs {
407
+ align-self: stretch;
408
+ display: flex;
409
+ flex: 1;
410
+
411
+ &-nav {
412
+ &--desktop {
413
+ @apply space-x-4;
414
+
415
+ display: none;
416
+ margin-bottom: -1px;
417
+
418
+ @screen md {
419
+ display: flex;
420
+ }
421
+ }
422
+
423
+ &--mobile {
424
+ align-items: center;
425
+ display: flex;
426
+ width: max-content;
427
+ z-index: theme("zIndex.10");
428
+
429
+ @screen md {
430
+ display: none;
431
+ }
432
+
433
+ .uxf-data-grid__toolbar-tabs-button {
434
+ align-items: center;
435
+ display: flex;
436
+ margin: 0;
437
+
438
+ &-icon {
439
+ color: theme("colors.lightHigh");
440
+ margin-left: theme("spacing.1");
441
+
442
+ :root .dark & {
443
+ color: theme("colors.darkHigh");
444
+ }
445
+ }
446
+ }
447
+ }
448
+
449
+ &-text {
450
+ color: theme("colors.lightHigh");
451
+
452
+ :root .dark & {
453
+ color: theme("colors.darkHigh");
454
+ }
455
+ }
456
+ }
457
+
458
+ &-modal-content {
459
+ @apply divide-lightBorder dark:divide-darkBorder divide-y;
460
+
461
+ align-items: flex-start;
462
+ display: flex;
463
+ flex-direction: column;
464
+ padding-bottom: theme("spacing.4");
465
+ padding-top: theme("spacing.1");
466
+ text-align: left;
467
+ }
468
+
469
+ &-modal-button {
470
+ border-radius: 0;
471
+ justify-content: flex-start;
472
+ width: 100%;
473
+ }
474
+
475
+ &-modal-button-text {
476
+ color: theme("colors.lightHigh");
477
+
478
+ :root .dark & {
479
+ color: theme("colors.darkHigh");
480
+ }
481
+ }
482
+
483
+ &-modal-active-tab-icon {
484
+ color: theme("colors.lightMedium");
485
+ margin-right: theme("spacing.3");
486
+
487
+ :root .dark & {
488
+ color: theme("colors.darkMedium");
489
+ }
490
+ }
491
+ }
492
+
493
+ &__toolbar-control {
494
+ align-items: center;
495
+ display: flex;
496
+ flex-direction: row;
497
+ gap: theme("spacing.2");
498
+ justify-content: space-between;
499
+ order: 3;
500
+ width: 100%;
501
+
502
+ @screen xs {
503
+ order: 2;
504
+ width: auto;
505
+ }
506
+ }
507
+
508
+ &__toolbar-customs {
509
+ align-items: center;
510
+ display: flex;
511
+ flex-direction: row;
512
+ gap: theme("spacing.2");
513
+ order: 2;
514
+
515
+ @screen xs {
516
+ order: 2;
517
+ }
518
+
519
+ @screen md {
520
+ margin-block: theme("spacing.2");
521
+ }
522
+
523
+ &-mobile {
524
+ display: flex;
525
+
526
+ @screen md {
527
+ display: none;
528
+ }
529
+ }
530
+
531
+ &-desktop {
532
+ display: none;
533
+
534
+ @screen md {
535
+ display: flex;
536
+ gap: theme("spacing.2");
537
+ }
538
+ }
539
+ }
540
+ }
541
+
542
+ /* TODO: tohle je imo k ničemu, že Vejvis? */
543
+
544
+ /* .rdg-cell.action {
545
+ align-items: center;
546
+ border-right: 0;
547
+ box-shadow: -3px 0 15px rgba(221 221 221 / 50%);
548
+ display: flex;
549
+ justify-content: center;
550
+ position: sticky;
551
+ right: 0;
552
+ text-align: right;
553
+ } */
554
+
555
+ .rdg-header-row {
556
+ color: theme("colors.lightLow");
557
+ font-weight: theme("fontWeight.normal");
558
+
559
+ :root .dark & {
560
+ color: theme("colors.darkLow");
561
+ }
562
+
563
+ .rdg-cell {
564
+ background-color: var(--rdg-header-background-color);
565
+
566
+ :root .dark & {
567
+ color: theme("colors.darkMedium");
568
+ }
569
+
570
+ &:not(:first-child) {
571
+ border-inline-start: 1px solid var(--rdg-border-color);
572
+ }
573
+ }
574
+ }
575
+
576
+ .rdg-header-sort-name + span {
577
+ align-items: center;
578
+ display: flex;
579
+ }
580
+
581
+ .rdg-cell {
582
+ border-block-end-width: 1px;
583
+ border-color: var(--rdg-border-color);
584
+ border-inline-end: none;
585
+
586
+ &.rdg-cell-frozen {
587
+ box-shadow: none;
588
+ }
589
+ }
590
+
591
+ @keyframes datagridlineanim {
592
+ 0% {
593
+ left: -40%;
594
+ }
595
+
596
+ 50% {
597
+ left: 20%;
598
+ width: 80%;
599
+ }
600
+
601
+ 100% {
602
+ left: 100%;
603
+ width: 100%;
604
+ }
605
+ }
@@ -0,0 +1,2 @@
1
+ import React, { PropsWithChildren } from "react";
2
+ export declare function ActionCellWrapper(props: PropsWithChildren): React.JSX.Element;
@@ -23,11 +23,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.ActionCellBase = exports.ActionCellWrapper = void 0;
27
- const button_1 = require("@uxf/ui/button");
28
- const icon_1 = require("@uxf/ui/icon");
26
+ exports.ActionCellWrapper = void 0;
29
27
  const react_1 = __importStar(require("react"));
30
- const ActionCellWrapper = (props) => {
28
+ function ActionCellWrapper(props) {
31
29
  const innerRef = (0, react_1.useRef)(null);
32
30
  (0, react_1.useEffect)(() => {
33
31
  var _a;
@@ -56,29 +54,5 @@ const ActionCellWrapper = (props) => {
56
54
  };
57
55
  }, []);
58
56
  return (react_1.default.createElement("div", { className: "uxf-data-grid__action-cell-wrapper", ref: innerRef }, props.children));
59
- };
57
+ }
60
58
  exports.ActionCellWrapper = ActionCellWrapper;
61
- const Button = (props) => {
62
- if (props.getUrl) {
63
- const href = props.getUrl(props.row);
64
- if (!href) {
65
- return null;
66
- }
67
- return (react_1.default.createElement(button_1.Button, { href: href, title: props.title, variant: "white", size: "sm", isIconButton: true },
68
- react_1.default.createElement(icon_1.Icon, { name: props.icon })));
69
- }
70
- if (props.onClick) {
71
- return (react_1.default.createElement(button_1.Button, { variant: "white", size: "sm", onClick: () => { var _a; return (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, props.row); }, isIconButton: true },
72
- react_1.default.createElement(icon_1.Icon, { name: props.icon })));
73
- }
74
- return null;
75
- };
76
- const ActionCellBase = (props) => {
77
- const onRemove = props.onRemove;
78
- const handleRemove = onRemove ? () => onRemove(props.row, props.reload) : undefined;
79
- return (react_1.default.createElement(exports.ActionCellWrapper, null,
80
- react_1.default.createElement(Button, { row: props.row, onClick: props.onOpen, getUrl: props.getOpenUrl, icon: "circle-info", title: "Detail" }),
81
- react_1.default.createElement(Button, { row: props.row, onClick: props.onEdit, getUrl: props.getEditUrl, icon: "pen", title: "Upravit" }),
82
- react_1.default.createElement(Button, { row: props.row, onClick: handleRemove, getUrl: undefined, icon: "trash", title: "Smazat" })));
83
- };
84
- exports.ActionCellBase = ActionCellBase;
@@ -0,0 +1,7 @@
1
+ import { ButtonListProps } from "@uxf/ui/button-list";
2
+ import React from "react";
3
+ export interface ActionCellProps {
4
+ buttons: ButtonListProps["buttons"];
5
+ visibleButtonsCount: ButtonListProps["visibleButtonsCount"];
6
+ }
7
+ export declare function ActionCell(props: ActionCellProps): React.JSX.Element;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ActionCell = void 0;
7
+ const button_list_1 = require("@uxf/ui/button-list");
8
+ const react_1 = __importDefault(require("react"));
9
+ const action_cell_wrapper_1 = require("./action-cell-wrapper");
10
+ function ActionCell(props) {
11
+ return (react_1.default.createElement(action_cell_wrapper_1.ActionCellWrapper, null,
12
+ react_1.default.createElement(button_list_1.ButtonList, { buttons: props.buttons, visibleButtonsCount: props.visibleButtonsCount, variant: "white", size: "xs" })));
13
+ }
14
+ exports.ActionCell = ActionCell;
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { DataGridHandle } from "react-data-grid";
3
- import { BaseGridType, DataGridBaseProps } from "../types";
3
+ import { DataGridBaseProps } from "../../types/data-grid-props";
4
+ import { BaseGridType } from "../../types/schema";
4
5
  export declare function useRdgVisuals(props: {
5
6
  headerRowHeight?: DataGridBaseProps<BaseGridType, any>["headerRowHeight"];
6
- mode?: DataGridBaseProps<BaseGridType, any>["mode"];
7
7
  rowHeight?: DataGridBaseProps<BaseGridType, any>["rowHeight"];
8
8
  rows: any[];
9
9
  }): {
@@ -9,7 +9,7 @@ function useRdgVisuals(props) {
9
9
  const rowHeight = (_a = props.rowHeight) !== null && _a !== void 0 ? _a : 44;
10
10
  const headerRowHeight = (_b = props.headerRowHeight) !== null && _b !== void 0 ? _b : 36;
11
11
  const contentHeight = typeof rowHeight === "function"
12
- ? props.rows.reduce((prev, curr) => prev + rowHeight({ type: "ROW", row: curr }))
12
+ ? props.rows.reduce((prev, curr) => prev + rowHeight(curr))
13
13
  : rowHeight * props.rows.length;
14
14
  const ref = (0, react_1.useRef)(null);
15
15
  const size = {
@@ -36,7 +36,7 @@ function useRdgVisuals(props) {
36
36
  return () => observer.disconnect();
37
37
  }, [mounted, storedSize]);
38
38
  return {
39
- className: `uxf-data-grid__table ${props.mode === "light" ? "rdg-light" : props.mode === "dark" ? "rdg-dark" : ""}`,
39
+ className: "uxf-data-grid__table rdg-light",
40
40
  headerRowHeight,
41
41
  ready: mounted,
42
42
  ref,
@@ -1,3 +1,4 @@
1
1
  import { Column } from "react-data-grid";
2
+ import { DataGridState } from "../../types";
2
3
  import { TableProps } from "../types";
3
- export declare function useReactDataGridColumns(props: TableProps<any>): Column<any>[];
4
+ export declare function useReactDataGridColumns(props: TableProps<any>, state: DataGridState): Column<any>[];