@join-x5/react-data-grid 1.3.1-alpha-0 → 1.4.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 (35) hide show
  1. package/dist/DataGrid.es.js +87 -65
  2. package/dist/DataGrid.es.js.map +1 -1
  3. package/dist/Table/index.es.js +34 -34
  4. package/dist/Table/index.es.js.map +1 -1
  5. package/dist/TableBody/DataGridTableBody.d.ts +12 -0
  6. package/dist/TableBody/DataGridTableBody.es.js +41 -0
  7. package/dist/TableBody/DataGridTableBody.es.js.map +1 -0
  8. package/dist/TableBody/DataGridTableBodyVirtual.d.ts +2 -0
  9. package/dist/TableBody/DataGridTableBodyVirtual.es.js +18 -0
  10. package/dist/TableBody/DataGridTableBodyVirtual.es.js.map +1 -0
  11. package/dist/TableBody/hook.d.ts +839 -0
  12. package/dist/TableBody/hook.es.js +49 -0
  13. package/dist/TableBody/hook.es.js.map +1 -0
  14. package/dist/TableBody/index.d.ts +3 -11
  15. package/dist/TableBody/types.d.ts +2 -0
  16. package/dist/TableCell/hook.es.js +5 -5
  17. package/dist/TableCell/hook.es.js.map +1 -1
  18. package/dist/TableHead/index.d.ts +4 -2
  19. package/dist/TableHead/index.es.js +16 -13
  20. package/dist/TableHead/index.es.js.map +1 -1
  21. package/dist/TableHeadCell/index.es.js +82 -84
  22. package/dist/TableHeadCell/index.es.js.map +1 -1
  23. package/dist/TableInputCell/hook.d.ts +30 -30
  24. package/dist/TableRow/index.d.ts +2 -3
  25. package/dist/TableRow/index.es.js +16 -17
  26. package/dist/TableRow/index.es.js.map +1 -1
  27. package/dist/index.cjs +1 -1
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.es.js +61 -60
  30. package/dist/index.es.js.map +1 -1
  31. package/dist/types.d.ts +36 -2
  32. package/package.json +10 -9
  33. package/dist/TableBody/index.es.js +0 -26
  34. package/dist/TableBody/index.es.js.map +0 -1
  35. package/dist/TableRow/types.d.ts +0 -2
@@ -49,17 +49,17 @@ export declare const useTableCellTextInput: <T extends HTMLInputElement | HTMLTe
49
49
  autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
50
50
  autoFocus?: boolean | undefined;
51
51
  className?: string | undefined;
52
- contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
52
+ contentEditable?: (boolean | "false" | "true") | "inherit" | "plaintext-only" | undefined;
53
53
  contextMenu?: string | undefined;
54
54
  dir?: string | undefined;
55
- draggable?: (boolean | "true" | "false") | undefined;
55
+ draggable?: (boolean | "false" | "true") | undefined;
56
56
  enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
57
57
  hidden?: boolean | undefined;
58
58
  id?: string | undefined;
59
59
  lang?: string | undefined;
60
60
  nonce?: string | undefined;
61
61
  slot?: string | undefined;
62
- spellCheck?: (boolean | "true" | "false") | undefined;
62
+ spellCheck?: (boolean | "false" | "true") | undefined;
63
63
  style?: import('react').CSSProperties | undefined;
64
64
  tabIndex?: number | undefined;
65
65
  title?: string | undefined;
@@ -93,11 +93,11 @@ export declare const useTableCellTextInput: <T extends HTMLInputElement | HTMLTe
93
93
  exportparts?: string | undefined;
94
94
  part?: string | undefined;
95
95
  "aria-activedescendant"?: string | undefined;
96
- "aria-atomic"?: (boolean | "true" | "false") | undefined;
96
+ "aria-atomic"?: (boolean | "false" | "true") | undefined;
97
97
  "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
98
98
  "aria-braillelabel"?: string | undefined;
99
99
  "aria-brailleroledescription"?: string | undefined;
100
- "aria-busy"?: (boolean | "true" | "false") | undefined;
100
+ "aria-busy"?: (boolean | "false" | "true") | undefined;
101
101
  "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
102
102
  "aria-colcount"?: number | undefined;
103
103
  "aria-colindex"?: number | undefined;
@@ -108,37 +108,37 @@ export declare const useTableCellTextInput: <T extends HTMLInputElement | HTMLTe
108
108
  "aria-describedby"?: string | undefined;
109
109
  "aria-description"?: string | undefined;
110
110
  "aria-details"?: string | undefined;
111
- "aria-disabled"?: (boolean | "true" | "false") | undefined;
111
+ "aria-disabled"?: (boolean | "false" | "true") | undefined;
112
112
  "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
113
113
  "aria-errormessage"?: string | undefined;
114
- "aria-expanded"?: (boolean | "true" | "false") | undefined;
114
+ "aria-expanded"?: (boolean | "false" | "true") | undefined;
115
115
  "aria-flowto"?: string | undefined;
116
- "aria-grabbed"?: (boolean | "true" | "false") | undefined;
116
+ "aria-grabbed"?: (boolean | "false" | "true") | undefined;
117
117
  "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
118
- "aria-hidden"?: (boolean | "true" | "false") | undefined;
118
+ "aria-hidden"?: (boolean | "false" | "true") | undefined;
119
119
  "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
120
120
  "aria-keyshortcuts"?: string | undefined;
121
121
  "aria-label"?: string | undefined;
122
122
  "aria-labelledby"?: string | undefined;
123
123
  "aria-level"?: number | undefined;
124
124
  "aria-live"?: "off" | "assertive" | "polite" | undefined;
125
- "aria-modal"?: (boolean | "true" | "false") | undefined;
126
- "aria-multiline"?: (boolean | "true" | "false") | undefined;
127
- "aria-multiselectable"?: (boolean | "true" | "false") | undefined;
125
+ "aria-modal"?: (boolean | "false" | "true") | undefined;
126
+ "aria-multiline"?: (boolean | "false" | "true") | undefined;
127
+ "aria-multiselectable"?: (boolean | "false" | "true") | undefined;
128
128
  "aria-orientation"?: "horizontal" | "vertical" | undefined;
129
129
  "aria-owns"?: string | undefined;
130
130
  "aria-placeholder"?: string | undefined;
131
131
  "aria-posinset"?: number | undefined;
132
132
  "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
133
- "aria-readonly"?: (boolean | "true" | "false") | undefined;
133
+ "aria-readonly"?: (boolean | "false" | "true") | undefined;
134
134
  "aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
135
- "aria-required"?: (boolean | "true" | "false") | undefined;
135
+ "aria-required"?: (boolean | "false" | "true") | undefined;
136
136
  "aria-roledescription"?: string | undefined;
137
137
  "aria-rowcount"?: number | undefined;
138
138
  "aria-rowindex"?: number | undefined;
139
139
  "aria-rowindextext"?: string | undefined;
140
140
  "aria-rowspan"?: number | undefined;
141
- "aria-selected"?: (boolean | "true" | "false") | undefined;
141
+ "aria-selected"?: (boolean | "false" | "true") | undefined;
142
142
  "aria-setsize"?: number | undefined;
143
143
  "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
144
144
  "aria-valuemax"?: number | undefined;
@@ -350,17 +350,17 @@ export declare const useDataGridInputCell: (cell: ReactTableCell<unknown, unknow
350
350
  autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
351
351
  autoFocus?: boolean | undefined;
352
352
  className?: string | undefined;
353
- contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
353
+ contentEditable?: (boolean | "false" | "true") | "inherit" | "plaintext-only" | undefined;
354
354
  contextMenu?: string | undefined;
355
355
  dir?: string | undefined;
356
- draggable?: (boolean | "true" | "false") | undefined;
356
+ draggable?: (boolean | "false" | "true") | undefined;
357
357
  enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
358
358
  hidden?: boolean | undefined;
359
359
  id?: string | undefined;
360
360
  lang?: string | undefined;
361
361
  nonce?: string | undefined;
362
362
  slot?: string | undefined;
363
- spellCheck?: (boolean | "true" | "false") | undefined;
363
+ spellCheck?: (boolean | "false" | "true") | undefined;
364
364
  style?: import('react').CSSProperties | undefined;
365
365
  tabIndex?: number | undefined;
366
366
  title?: string | undefined;
@@ -394,11 +394,11 @@ export declare const useDataGridInputCell: (cell: ReactTableCell<unknown, unknow
394
394
  exportparts?: string | undefined;
395
395
  part?: string | undefined;
396
396
  "aria-activedescendant"?: string | undefined;
397
- "aria-atomic"?: (boolean | "true" | "false") | undefined;
397
+ "aria-atomic"?: (boolean | "false" | "true") | undefined;
398
398
  "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
399
399
  "aria-braillelabel"?: string | undefined;
400
400
  "aria-brailleroledescription"?: string | undefined;
401
- "aria-busy"?: (boolean | "true" | "false") | undefined;
401
+ "aria-busy"?: (boolean | "false" | "true") | undefined;
402
402
  "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
403
403
  "aria-colcount"?: number | undefined;
404
404
  "aria-colindex"?: number | undefined;
@@ -409,37 +409,37 @@ export declare const useDataGridInputCell: (cell: ReactTableCell<unknown, unknow
409
409
  "aria-describedby"?: string | undefined;
410
410
  "aria-description"?: string | undefined;
411
411
  "aria-details"?: string | undefined;
412
- "aria-disabled"?: (boolean | "true" | "false") | undefined;
412
+ "aria-disabled"?: (boolean | "false" | "true") | undefined;
413
413
  "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
414
414
  "aria-errormessage"?: string | undefined;
415
- "aria-expanded"?: (boolean | "true" | "false") | undefined;
415
+ "aria-expanded"?: (boolean | "false" | "true") | undefined;
416
416
  "aria-flowto"?: string | undefined;
417
- "aria-grabbed"?: (boolean | "true" | "false") | undefined;
417
+ "aria-grabbed"?: (boolean | "false" | "true") | undefined;
418
418
  "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
419
- "aria-hidden"?: (boolean | "true" | "false") | undefined;
419
+ "aria-hidden"?: (boolean | "false" | "true") | undefined;
420
420
  "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
421
421
  "aria-keyshortcuts"?: string | undefined;
422
422
  "aria-label"?: string | undefined;
423
423
  "aria-labelledby"?: string | undefined;
424
424
  "aria-level"?: number | undefined;
425
425
  "aria-live"?: "off" | "assertive" | "polite" | undefined;
426
- "aria-modal"?: (boolean | "true" | "false") | undefined;
427
- "aria-multiline"?: (boolean | "true" | "false") | undefined;
428
- "aria-multiselectable"?: (boolean | "true" | "false") | undefined;
426
+ "aria-modal"?: (boolean | "false" | "true") | undefined;
427
+ "aria-multiline"?: (boolean | "false" | "true") | undefined;
428
+ "aria-multiselectable"?: (boolean | "false" | "true") | undefined;
429
429
  "aria-orientation"?: "horizontal" | "vertical" | undefined;
430
430
  "aria-owns"?: string | undefined;
431
431
  "aria-placeholder"?: string | undefined;
432
432
  "aria-posinset"?: number | undefined;
433
433
  "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
434
- "aria-readonly"?: (boolean | "true" | "false") | undefined;
434
+ "aria-readonly"?: (boolean | "false" | "true") | undefined;
435
435
  "aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
436
- "aria-required"?: (boolean | "true" | "false") | undefined;
436
+ "aria-required"?: (boolean | "false" | "true") | undefined;
437
437
  "aria-roledescription"?: string | undefined;
438
438
  "aria-rowcount"?: number | undefined;
439
439
  "aria-rowindex"?: number | undefined;
440
440
  "aria-rowindextext"?: string | undefined;
441
441
  "aria-rowspan"?: number | undefined;
442
- "aria-selected"?: (boolean | "true" | "false") | undefined;
442
+ "aria-selected"?: (boolean | "false" | "true") | undefined;
443
443
  "aria-setsize"?: number | undefined;
444
444
  "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
445
445
  "aria-valuemax"?: number | undefined;
@@ -1,5 +1,4 @@
1
- import { FRC } from '@join-x5/react-theme';
1
+ import { HTMLAttributes } from 'react';
2
2
  import { GetDataGridTableRow } from '../types';
3
- import { TableRowProps } from './types';
4
- export declare const TableRow: FRC<HTMLTableRowElement, TableRowProps>;
3
+ export type TableRowProps = HTMLAttributes<HTMLTableRowElement>;
5
4
  export declare const getDataGridTableRow: GetDataGridTableRow;
@@ -1,25 +1,24 @@
1
1
  "use client";
2
- import { jsx as t } from "@emotion/react/jsx-runtime";
3
- import G from "@emotion/styled/base";
4
- import { forwardRef as d } from "@join-x5/react-theme";
5
- import { getDataGridTableCell as i } from "../TableCell/index.es.js";
6
- const I = /* @__PURE__ */ G("tr", process.env.NODE_ENV === "production" ? {
2
+ import { jsx as l } from "@emotion/react/jsx-runtime";
3
+ import I from "@emotion/styled/base";
4
+ import { forwardRef as m } from "@join-x5/react-theme";
5
+ import { getDataGridTableCell as Z } from "../TableCell/index.es.js";
6
+ const g = /* @__PURE__ */ I("tr", process.env.NODE_ENV === "production" ? {
7
7
  target: "ewtrhmz0"
8
8
  } : {
9
9
  target: "ewtrhmz0",
10
- label: "Container"
11
- })(":hover [data-cell]{:not([data-focused], [data-active], [data-disabled]) [data-edit-icon]{visibility:visible;}:not([data-focused], [data-active]):not(:focus){", (c) => ({
12
- "--background-color": c.theme.colors.grey[10],
13
- "--border-color": c.theme.colors.grey[20]
14
- }), ";}}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3NhZHlrb3ZzZC9qb2luLXg1L3BhY2thZ2VzL2RhdGEtZ3JpZC9zcmMvVGFibGVSb3cvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWEyQiIsImZpbGUiOiIvaG9tZS9zYWR5a292c2Qvam9pbi14NS9wYWNrYWdlcy9kYXRhLWdyaWQvc3JjL1RhYmxlUm93L2luZGV4LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIid1c2UgY2xpZW50JztcblxuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5pbXBvcnQge2ZvcndhcmRSZWZ9IGZyb20gJ0Bqb2luLXg1L3JlYWN0LXRoZW1lJztcblxuaW1wb3J0IHtnZXREYXRhR3JpZFRhYmxlQ2VsbH0gZnJvbSAnVGFibGVDZWxsJztcblxuaW1wb3J0IHR5cGUge0ZSQ30gZnJvbS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mlkVGFibGVSb3dQcm9wcz4gPSBwcm9wcyA9PiB7XG4gIGNvbnN0IHtyb3csIC4uLnJlc3R9ID0gcHJvcHM7XG5cbiAgY29uc3QgY29udGVudCA9IHJvdy5nZXRWaXNpYmxlQ2VsbHMoKS5tYXAoZ2V0RGF0YUdyaWRUYWJsZUNlbGwpO1xuXG4gIHJldHVybiA8VGFibGVSb3cgey4uLnJlc3R9Pntjb250ZW50fTwvVGFibGVSb3c+O1xufTtcblxuZXhwb3J0IGNvbnN0IGdldERhdGFHcmlkVGFibGVSb3c6IEdldERhdGFHcmlkVGFibGVSb3cgPSByb3cgPT4ge1xuICByZXR1cm4gPERhdGFHcmlkVGFibGVSb3cga2V5PXtyb3cuaWR9IHJvdz17cm93fSAvPjtcbn07XG4iXX0= */")), e = d((c, b) => /* @__PURE__ */ t(I, { ref: b, ...c })), a = (c) => {
10
+ label: "TableRow"
11
+ })(":hover [data-cell]{:not([data-focused], [data-active], [data-disabled]) [data-edit-icon]{visibility:visible;}:not([data-focused], [data-active]):not(:focus){", (b) => ({
12
+ "--background-color": b.theme.colors.grey[10],
13
+ "--border-color": b.theme.colors.grey[20]
14
+ }), ";}}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3NhZHlrb3ZzZC9qb2luLXg1L3BhY2thZ2VzL2RhdGEtZ3JpZC9zcmMvVGFibGVSb3cvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWMwQiIsImZpbGUiOiIvaG9tZS9zYWR5a292c2Qvam9pbi14NS9wYWNrYWdlcy9kYXRhLWdyaWQvc3JjL1RhYmxlUm93L2luZGV4LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIid1c2UgY2xpZW50JztcblxuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHtmb3J3YXJk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GFHcmlkVGFibGVSb3c6IEZSQzxIVE1MVGFibGVSb3dFbGVtZW50LCBEYXRhR3JpZFRhYmxlUm93UHJvcHM+ID0gZm9yd2FyZFJlZigocHJvcHMsIHJlZikgPT4ge1xuICBjb25zdCB7cm93LCAuLi5yZXN0fSA9IHByb3BzO1xuXG4gIGNvbnN0IGNvbnRlbnQgPSByb3cuZ2V0VmlzaWJsZUNlbGxzKCkubWFwKGdldERhdGFHcmlkVGFibGVDZWxsKTtcblxuICByZXR1cm4gKFxuICAgIDxUYWJsZVJvdyByZWY9e3JlZn0gey4uLnJlc3R9PlxuICAgICAge2NvbnRlbnR9XG4gICAgPC9UYWJsZVJvdz5cbiAgKTtcbn0pO1xuXG5leHBvcnQgY29uc3QgZ2V0RGF0YUdyaWRUYWJsZVJvdzogR2V0RGF0YUdyaWRUYWJsZVJvdyA9IChyb3csIHByb3BzKSA9PiAoXG4gIDxEYXRhR3JpZFRhYmxlUm93IGtleT17cm93LmlkfSByb3c9e3Jvd30gey4uLnByb3BzfSAvPlxuKTtcbiJdfQ== */")), e = m((b, c) => {
15
15
  const {
16
- row: b,
17
- ...l
18
- } = c, m = b.getVisibleCells().map(i);
19
- return /* @__PURE__ */ t(e, { ...l, children: m });
20
- }, V = (c) => /* @__PURE__ */ t(a, { row: c }, c.id);
16
+ row: t,
17
+ ...d
18
+ } = b, G = t.getVisibleCells().map(Z);
19
+ return /* @__PURE__ */ l(g, { ref: c, ...d, children: G });
20
+ }), W = (b, c) => /* @__PURE__ */ l(e, { row: b, ...c }, b.id);
21
21
  export {
22
- e as TableRow,
23
- V as getDataGridTableRow
22
+ W as getDataGridTableRow
24
23
  };
25
24
  //# sourceMappingURL=index.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../../src/TableRow/index.tsx"],"sourcesContent":["'use client';\n\nimport styled from '@emotion/styled';\n\nimport {forwardRef} from '@join-x5/react-theme';\n\nimport {getDataGridTableCell} from 'TableCell';\n\nimport type {FRC} from '@join-x5/react-theme';\nimport type {Row} from '@tanstack/react-table';\nimport type {GetDataGridTableRow} from '../types';\nimport type {TableRowProps} from './types';\n\nconst Container = styled.tr`\n :hover [data-cell] {\n :not([data-focused], [data-active], [data-disabled]) [data-edit-icon] {\n visibility: visible;\n }\n\n :not([data-focused], [data-active]):not(:focus) {\n ${props => ({\n '--background-color': props.theme.colors.grey[10],\n '--border-color': props.theme.colors.grey[20],\n })}\n }\n }\n`;\n\nexport const TableRow: FRC<HTMLTableRowElement, TableRowProps> = forwardRef((props, ref) => {\n return <Container ref={ref} {...props} />;\n});\n\ntype DataGridTableRowProps = {row: Row<unknown>} & TableRowProps;\n\nconst DataGridTableRow: React.FC<DataGridTableRowProps> = props => {\n const {row, ...rest} = props;\n\n const content = row.getVisibleCells().map(getDataGridTableCell);\n\n return <TableRow {...rest}>{content}</TableRow>;\n};\n\nexport const getDataGridTableRow: GetDataGridTableRow = row => {\n return <DataGridTableRow key={row.id} row={row} />;\n};\n"],"names":["row","rest"],"mappings":";;;;;AAaA;AAAe;AAAA;AAAA;AAAA;AAAA;AAOG;AACsC;AAElD;AAYJ;AAAM;AAACA;AAAQC;AAIf;AACF;;;;;"}
1
+ {"version":3,"file":"index.es.js","sources":["../../src/TableRow/index.tsx"],"sourcesContent":["'use client';\n\nimport styled from '@emotion/styled';\nimport {forwardRef} from '@join-x5/react-theme';\n\nimport {getDataGridTableCell} from 'TableCell';\n\nimport type {HTMLAttributes} from 'react';\nimport type {Row} from '@tanstack/react-table';\nimport type {FRC} from '@join-x5/react-theme';\nimport type {GetDataGridTableRow} from '../types';\n\nexport type TableRowProps = HTMLAttributes<HTMLTableRowElement>;\n\nconst TableRow = styled.tr`\n :hover [data-cell] {\n :not([data-focused], [data-active], [data-disabled]) [data-edit-icon] {\n visibility: visible;\n }\n\n :not([data-focused], [data-active]):not(:focus) {\n ${props => ({\n '--background-color': props.theme.colors.grey[10],\n '--border-color': props.theme.colors.grey[20],\n })}\n }\n }\n`;\n\ntype DataGridTableRowProps = {row: Row<unknown>} & TableRowProps;\n\nconst DataGridTableRow: FRC<HTMLTableRowElement, DataGridTableRowProps> = forwardRef((props, ref) => {\n const {row, ...rest} = props;\n\n const content = row.getVisibleCells().map(getDataGridTableCell);\n\n return (\n <TableRow ref={ref} {...rest}>\n {content}\n </TableRow>\n );\n});\n\nexport const getDataGridTableRow: GetDataGridTableRow = (row, props) => (\n <DataGridTableRow key={row.id} row={row} {...props} />\n);\n"],"names":["row","rest"],"mappings":";;;;;AAcA;AAAc;AAAA;AAAA;AAAA;AAAA;AAOI;AACsC;AAElD;AAQJ;AAAM;AAACA;AAAQC;AAIf;AAKF;;;;"}