@onewelcome/react-lib-components 1.2.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 (97) hide show
  1. package/dist/Button/IconButton.d.ts +2 -1
  2. package/dist/DataGrid/DataGrid.d.ts +1 -0
  3. package/dist/DataGrid/DataGridActions/DataGridActions.d.ts +2 -1
  4. package/dist/Form/Form.d.ts +3 -3
  5. package/dist/Notifications/SlideInModal/SlideInModal.d.ts +1 -1
  6. package/dist/Tabs/Tab.d.ts +5 -9
  7. package/dist/Tabs/TabButton.d.ts +3 -6
  8. package/dist/Tabs/Tabs.d.ts +1 -2
  9. package/dist/hooks/useDebouncedCallback.d.ts +1 -0
  10. package/dist/index.d.ts +1 -0
  11. package/dist/react-lib-components.cjs.development.js +472 -395
  12. package/dist/react-lib-components.cjs.development.js.map +1 -1
  13. package/dist/react-lib-components.cjs.production.min.js +1 -1
  14. package/dist/react-lib-components.cjs.production.min.js.map +1 -1
  15. package/dist/react-lib-components.esm.js +473 -397
  16. package/dist/react-lib-components.esm.js.map +1 -1
  17. package/package.json +1 -1
  18. package/src/Breadcrumbs/Breadcrumbs.tsx +46 -38
  19. package/src/Button/BaseButton.tsx +23 -20
  20. package/src/Button/Button.module.scss +9 -0
  21. package/src/Button/Button.tsx +40 -40
  22. package/src/Button/IconButton.tsx +28 -28
  23. package/src/ContextMenu/ContextMenu.tsx +161 -160
  24. package/src/ContextMenu/ContextMenuItem.tsx +55 -49
  25. package/src/DataGrid/DataGrid.tsx +1 -0
  26. package/src/DataGrid/DataGridActions/DataGridActions.module.scss +1 -1
  27. package/src/DataGrid/DataGridActions/DataGridActions.test.tsx +4 -2
  28. package/src/DataGrid/DataGridActions/DataGridActions.tsx +95 -87
  29. package/src/DataGrid/DataGridActions/DataGridColumnsToggle.tsx +64 -64
  30. package/src/DataGrid/DataGridBody/DataGridCell.tsx +42 -44
  31. package/src/DataGrid/DataGridBody/DataGridRow.tsx +29 -29
  32. package/src/DataGrid/DataGridHeader/DataGridHeader.tsx +78 -78
  33. package/src/DataGrid/DataGridHeader/DataGridHeaderCell.tsx +48 -48
  34. package/src/Form/Checkbox/Checkbox.tsx +134 -130
  35. package/src/Form/Fieldset/Fieldset.tsx +81 -78
  36. package/src/Form/Form.tsx +9 -4
  37. package/src/Form/FormControl/FormControl.module.scss +1 -20
  38. package/src/Form/FormControl/FormControl.tsx +36 -35
  39. package/src/Form/FormGroup/FormGroup.tsx +62 -62
  40. package/src/Form/FormHelperText/FormHelperText.tsx +19 -18
  41. package/src/Form/FormSelectorWrapper/FormSelectorWrapper.tsx +58 -53
  42. package/src/Form/Input/Input.tsx +90 -87
  43. package/src/Form/Label/Label.tsx +17 -16
  44. package/src/Form/Radio/Radio.tsx +91 -91
  45. package/src/Form/Select/Option.tsx +66 -60
  46. package/src/Form/Select/Select.tsx +207 -209
  47. package/src/Form/Textarea/Textarea.tsx +51 -53
  48. package/src/Form/Toggle/Toggle.tsx +26 -23
  49. package/src/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.tsx +51 -43
  50. package/src/Form/Wrapper/InputWrapper/InputWrapper.tsx +112 -106
  51. package/src/Form/Wrapper/RadioWrapper/RadioWrapper.tsx +67 -62
  52. package/src/Form/Wrapper/SelectWrapper/SelectWrapper.tsx +42 -37
  53. package/src/Form/Wrapper/TextareaWrapper/TextareaWrapper.tsx +94 -94
  54. package/src/Form/Wrapper/Wrapper/Wrapper.tsx +73 -73
  55. package/src/Icon/Icon.module.scss +1 -0
  56. package/src/Icon/Icon.tsx +19 -16
  57. package/src/Link/Link.tsx +68 -63
  58. package/src/Notifications/BaseModal/BaseModal.tsx +68 -68
  59. package/src/Notifications/BaseModal/BaseModalActions/BaseModalActions.tsx +13 -10
  60. package/src/Notifications/BaseModal/BaseModalContent/BaseModalContent.tsx +33 -25
  61. package/src/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.tsx +20 -17
  62. package/src/Notifications/Dialog/Dialog.tsx +83 -83
  63. package/src/Notifications/Dialog/DialogActions/DialogActions.tsx +17 -14
  64. package/src/Notifications/Dialog/DialogTitle/DialogTitle.tsx +15 -12
  65. package/src/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.tsx +40 -40
  66. package/src/Notifications/SlideInModal/SlideInModal.module.scss +5 -5
  67. package/src/Notifications/SlideInModal/SlideInModal.test.tsx +7 -2
  68. package/src/Notifications/SlideInModal/SlideInModal.tsx +47 -27
  69. package/src/Pagination/Pagination.tsx +169 -169
  70. package/src/Popover/Popover.module.scss +1 -0
  71. package/src/Popover/Popover.tsx +43 -33
  72. package/src/ProgressBar/ProgressBar.tsx +17 -14
  73. package/src/Skeleton/Skeleton.tsx +23 -20
  74. package/src/StatusIndicator/StatusIndicator.tsx +18 -15
  75. package/src/Tabs/{TabPanel.module.scss → Tab.module.scss} +1 -1
  76. package/src/Tabs/Tab.test.tsx +1 -39
  77. package/src/Tabs/Tab.tsx +16 -10
  78. package/src/Tabs/TabButton.module.scss +0 -4
  79. package/src/Tabs/TabButton.test.tsx +3 -31
  80. package/src/Tabs/TabButton.tsx +35 -49
  81. package/src/Tabs/Tabs.test.tsx +40 -33
  82. package/src/Tabs/Tabs.tsx +107 -101
  83. package/src/TextEllipsis/TextEllipsis.tsx +50 -41
  84. package/src/Tiles/Tile.tsx +58 -56
  85. package/src/Tiles/Tiles.tsx +44 -41
  86. package/src/Tooltip/Tooltip.tsx +101 -100
  87. package/src/Typography/Typography.tsx +47 -44
  88. package/src/Wizard/BaseWizardSteps/BaseWizardSteps.tsx +55 -52
  89. package/src/Wizard/WizardSteps/WizardSteps.tsx +25 -22
  90. package/src/hooks/useDebouncedCallback.test.ts +140 -0
  91. package/src/hooks/useDebouncedCallback.tsx +32 -0
  92. package/src/index.ts +1 -0
  93. package/src/mixins.module.scss +2 -2
  94. package/src/util/helper.test.tsx +0 -28
  95. package/dist/Tabs/TabPanel.d.ts +0 -8
  96. package/src/Tabs/TabPanel.test.tsx +0 -92
  97. package/src/Tabs/TabPanel.tsx +0 -43
@@ -14,7 +14,13 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import React, { ComponentPropsWithRef, Fragment, useRef, useState } from "react";
17
+ import React, {
18
+ ComponentPropsWithRef,
19
+ ForwardRefRenderFunction,
20
+ Fragment,
21
+ useRef,
22
+ useState
23
+ } from "react";
18
24
  import { Button, Props as ButtonProps } from "../../Button/Button";
19
25
  import { IconButton } from "../../Button/IconButton";
20
26
  import { Icon, Icons } from "../../Icon/Icon";
@@ -29,97 +35,99 @@ export interface Props extends ComponentPropsWithRef<"div"> {
29
35
  addBtnProps?: ButtonProps;
30
36
  columnsBtnProps?: ButtonProps;
31
37
  searchBtnProps?: ButtonProps;
38
+ searchIconBtnProps?: ButtonProps;
32
39
  headers: HeaderCell[];
33
40
  onColumnToggled: (colName: ColumnName) => void;
34
41
  }
35
42
 
36
- export const DataGridActions = React.forwardRef<HTMLDivElement, Props>(
37
- (
38
- {
39
- className,
40
- enableAddBtn,
41
- enableColumnsBtn,
42
- enableSearchBtn,
43
- addBtnProps = {},
44
- columnsBtnProps = {},
45
- searchBtnProps = {},
46
- headers,
47
- onColumnToggled,
48
- ...rest
49
- }: Props,
50
- ref
51
- ) => {
52
- const isHidden = !(enableAddBtn || enableColumnsBtn || enableSearchBtn);
53
- const [showColsPopover, setShowColsPopover] = useState(false);
54
- const showColumnBtn = useRef<HTMLButtonElement>(null);
43
+ const DataGridActionsComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
44
+ {
45
+ className,
46
+ enableAddBtn,
47
+ enableColumnsBtn,
48
+ enableSearchBtn,
49
+ addBtnProps = {},
50
+ columnsBtnProps = {},
51
+ searchBtnProps = {},
52
+ searchIconBtnProps = {},
53
+ headers,
54
+ onColumnToggled,
55
+ ...rest
56
+ }: Props,
57
+ ref
58
+ ) => {
59
+ const isHidden = !(enableAddBtn || enableColumnsBtn || enableSearchBtn);
60
+ const [showColsPopover, setShowColsPopover] = useState(false);
61
+ const showColumnBtn = useRef<HTMLButtonElement>(null);
55
62
 
56
- return isHidden ? null : (
57
- <div {...rest} ref={ref} className={`${classes["actions"]} ${className ?? ""}`}>
58
- <div className={classes["left-actions"]}>
59
- {enableAddBtn && (
63
+ return isHidden ? null : (
64
+ <div {...rest} ref={ref} className={`${classes["actions"]} ${className ?? ""}`}>
65
+ <div className={classes["left-actions"]}>
66
+ {enableAddBtn && (
67
+ <Button
68
+ color="primary"
69
+ startIcon={<Icon icon={Icons.Plus} />}
70
+ title="Add item"
71
+ type="button"
72
+ variant="outline"
73
+ children="Add item"
74
+ {...addBtnProps}
75
+ />
76
+ )}
77
+ </div>
78
+ <div className={classes["right-actions"]}>
79
+ {enableColumnsBtn && (
80
+ <Fragment>
60
81
  <Button
61
- color="primary"
62
- startIcon={<Icon icon={Icons.Plus} />}
63
- title="Add item"
64
- type="button"
65
- variant="outline"
66
- children="Add item"
67
- {...addBtnProps}
82
+ startIcon={<Icon icon={Icons.Change} />}
83
+ title="Show/hide columns"
84
+ variant="text"
85
+ children="Columns"
86
+ {...columnsBtnProps}
87
+ className={`${classes["desktop"]} ${columnsBtnProps?.className ?? ""}`}
88
+ ref={showColumnBtn}
89
+ onClick={() => setShowColsPopover(true)}
90
+ />
91
+ <IconButton
92
+ title="Show/hide columns"
93
+ {...columnsBtnProps}
94
+ onClick={() => setShowColsPopover(true)}
95
+ className={`${classes["mobile"]} ${columnsBtnProps?.className ?? ""}`}
96
+ >
97
+ <Icon icon={Icons.Change} />
98
+ </IconButton>
99
+ <DataGridColumnsToggle
100
+ aria-hidden={!showColsPopover}
101
+ open={showColsPopover}
102
+ headers={headers}
103
+ onClose={() => setShowColsPopover(false)}
104
+ onToggleClicked={onColumnToggled}
105
+ anchorEl={showColumnBtn}
68
106
  />
69
- )}
70
- </div>
71
- <div className={classes["right-actions"]}>
72
- {enableColumnsBtn && (
73
- <Fragment>
74
- <Button
75
- startIcon={<Icon icon={Icons.Change} />}
76
- title="Show/hide columns"
77
- variant="text"
78
- children="Columns"
79
- {...columnsBtnProps}
80
- className={`${classes["desktop"]} ${columnsBtnProps?.className ?? ""}`}
81
- ref={showColumnBtn}
82
- onClick={() => setShowColsPopover(true)}
83
- />
84
- <IconButton
85
- title="Show/hide columns"
86
- {...columnsBtnProps}
87
- onClick={() => setShowColsPopover(true)}
88
- className={`${classes["mobile"]} ${columnsBtnProps?.className ?? ""}`}
89
- >
90
- <Icon icon={Icons.Change} />
91
- </IconButton>
92
- <DataGridColumnsToggle
93
- aria-hidden={!showColsPopover}
94
- open={showColsPopover}
95
- headers={headers}
96
- onClose={() => setShowColsPopover(false)}
97
- onToggleClicked={onColumnToggled}
98
- anchorEl={showColumnBtn}
99
- />
100
- </Fragment>
101
- )}
102
- {enableSearchBtn && (
103
- <Fragment>
104
- <Button
105
- startIcon={<Icon icon={Icons.TableSearch} />}
106
- title="Search"
107
- variant="text"
108
- children="Search"
109
- {...searchBtnProps}
110
- className={`${classes["desktop"]} ${searchBtnProps?.className ?? ""}`}
111
- />
112
- <IconButton
113
- title="Search"
114
- {...searchBtnProps}
115
- className={`${classes["mobile"]} ${columnsBtnProps?.className ?? ""}`}
116
- >
117
- <Icon icon={Icons.TableSearch} />
118
- </IconButton>
119
- </Fragment>
120
- )}
121
- </div>
107
+ </Fragment>
108
+ )}
109
+ {enableSearchBtn && (
110
+ <Fragment>
111
+ <Button
112
+ startIcon={<Icon icon={Icons.TableSearch} />}
113
+ title="Search"
114
+ variant="text"
115
+ children="Search"
116
+ {...searchBtnProps}
117
+ className={`${classes["desktop"]} ${searchBtnProps?.className ?? ""}`}
118
+ />
119
+ <IconButton
120
+ title="Search"
121
+ {...searchIconBtnProps}
122
+ className={`${classes["mobile"]} ${columnsBtnProps?.className ?? ""}`}
123
+ >
124
+ <Icon icon={Icons.TableSearch} />
125
+ </IconButton>
126
+ </Fragment>
127
+ )}
122
128
  </div>
123
- );
124
- }
125
- );
129
+ </div>
130
+ );
131
+ };
132
+
133
+ export const DataGridActions = React.forwardRef(DataGridActionsComponent);
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import React, { Fragment, useState } from "react";
17
+ import React, { ForwardRefRenderFunction, Fragment, useState } from "react";
18
18
  import { IconButton } from "../../Button/IconButton";
19
19
  import { Toggle } from "../../Form/Toggle/Toggle";
20
20
  import { Icon, Icons } from "../../Icon/Icon";
@@ -35,70 +35,70 @@ export interface Props extends PopoverProps {
35
35
  domRoot?: HTMLElement;
36
36
  }
37
37
 
38
- export const DataGridColumnsToggle = React.forwardRef<HTMLDivElement, Props>(
39
- (
40
- {
41
- open,
42
- headers,
43
- titleLabel = "Show columns",
44
- closeButtonTitle = "Close show columns dialog",
45
- onClose,
46
- onToggleClicked,
47
- className,
48
- domRoot = document.body,
49
- ...rest
50
- }: Props,
51
- ref
52
- ) => {
53
- const [id] = useState(generateID());
54
- const labelledId = id + "_header";
38
+ const DataGridColumnsToggleComponent: ForwardRefRenderFunction<HTMLDivElement, Props> = (
39
+ {
40
+ open,
41
+ headers,
42
+ titleLabel = "Show columns",
43
+ closeButtonTitle = "Close show columns dialog",
44
+ onClose,
45
+ onToggleClicked,
46
+ className,
47
+ domRoot = document.body,
48
+ ...rest
49
+ }: Props,
50
+ ref
51
+ ) => {
52
+ const [id] = useState(generateID());
53
+ const labelledId = id + "_header";
55
54
 
56
- const toggles = headers.map(item => (
57
- <Toggle
58
- key={item.name}
59
- name={item.name}
60
- checked={!item.hidden}
61
- onChange={() => onToggleClicked(item.name)}
62
- >
63
- {item.headline}
64
- </Toggle>
65
- ));
55
+ const toggles = headers.map(item => (
56
+ <Toggle
57
+ key={item.name}
58
+ name={item.name}
59
+ checked={!item.hidden}
60
+ onChange={() => onToggleClicked(item.name)}
61
+ >
62
+ {item.headline}
63
+ </Toggle>
64
+ ));
66
65
 
67
- const handleBackdropClick = () => onClose();
66
+ const handleBackdropClick = () => onClose();
68
67
 
69
- return (
70
- <Popover
71
- {...rest}
72
- ref={ref}
73
- className={`${classes["popover"]} ${className}`}
74
- show={open}
75
- role="dialog"
76
- aria-modal="true"
77
- aria-labelledby={labelledId}
78
- >
79
- {open &&
80
- createPortal(
81
- <div className={classes["backdrop"]} onClick={handleBackdropClick}></div>,
82
- domRoot
83
- )}
84
- {open && (
85
- <Fragment>
86
- <div className={classes["header"]}>
87
- <Typography id={labelledId} className={classes["title"]} tag="span" variant="h4">
88
- {titleLabel}
89
- </Typography>
90
- <IconButton
91
- onClick={onClose}
92
- className={`${classes["close-btn"]}`}
93
- title={closeButtonTitle}
94
- >
95
- <Icon icon={Icons.Times} />
96
- </IconButton>
97
- </div>
98
- <div className={classes["content"]}>{toggles}</div>
99
- </Fragment>
68
+ return (
69
+ <Popover
70
+ {...rest}
71
+ ref={ref}
72
+ className={`${classes["popover"]} ${className}`}
73
+ show={open}
74
+ role="dialog"
75
+ aria-modal="true"
76
+ aria-labelledby={labelledId}
77
+ >
78
+ {open &&
79
+ createPortal(
80
+ <div className={classes["backdrop"]} onClick={handleBackdropClick}></div>,
81
+ domRoot
100
82
  )}
101
- </Popover>
102
- );
103
- }
104
- );
83
+ {open && (
84
+ <Fragment>
85
+ <div className={classes["header"]}>
86
+ <Typography id={labelledId} className={classes["title"]} tag="span" variant="h4">
87
+ {titleLabel}
88
+ </Typography>
89
+ <IconButton
90
+ onClick={onClose}
91
+ className={`${classes["close-btn"]}`}
92
+ title={closeButtonTitle}
93
+ >
94
+ <Icon icon={Icons.Times} />
95
+ </IconButton>
96
+ </div>
97
+ <div className={classes["content"]}>{toggles}</div>
98
+ </Fragment>
99
+ )}
100
+ </Popover>
101
+ );
102
+ };
103
+
104
+ export const DataGridColumnsToggle = React.forwardRef(DataGridColumnsToggleComponent);
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import React, { ComponentPropsWithRef, ReactChild } from "react";
17
+ import React, { ForwardRefRenderFunction, ComponentPropsWithRef, ReactChild } from "react";
18
18
  import { Typography } from "../../Typography/Typography";
19
19
  import classes from "./DataGridCell.module.scss";
20
20
 
@@ -27,48 +27,46 @@ export interface Props extends ComponentPropsWithRef<"td"> {
27
27
  disableContextMenuColumn?: boolean;
28
28
  }
29
29
 
30
- export const DataGridCell = React.forwardRef<HTMLTableCellElement, Props>(
31
- (
32
- {
33
- children,
34
- className,
35
- isLoading,
36
- spacing,
37
- cellIndex,
38
- columnLength,
39
- disableContextMenuColumn,
40
- ...rest
41
- }: Props,
42
- ref
43
- ) => {
44
- let cellStyle: React.CSSProperties = {};
30
+ const DataGridCellComponent: ForwardRefRenderFunction<HTMLTableCellElement, Props> = (
31
+ {
32
+ children,
33
+ className,
34
+ isLoading,
35
+ spacing,
36
+ cellIndex,
37
+ columnLength,
38
+ disableContextMenuColumn,
39
+ ...rest
40
+ }: Props,
41
+ ref
42
+ ) => {
43
+ let cellStyle: React.CSSProperties = {};
45
44
 
46
- if (cellIndex === 0) {
47
- cellStyle.paddingLeft = spacing?.paddingLeft;
48
- }
49
- if (
50
- (cellIndex === columnLength && !disableContextMenuColumn) ||
51
- (columnLength && cellIndex === columnLength - 1 && disableContextMenuColumn)
52
- ) {
53
- cellStyle.paddingRight = spacing?.paddingRight;
54
- }
55
-
56
- return (
57
- <td
58
- {...rest}
59
- ref={ref}
60
- style={{ ...rest.style, ...cellStyle }}
61
- className={`${classes["cell"]} ${className ?? ""}`}
62
- >
63
- {isLoading && (
64
- <div className={classes["loading"]} aria-busy="true" aria-live="polite"></div>
65
- )}
66
- {!isLoading && (
67
- <Typography variant="body" tag="span">
68
- {children}
69
- </Typography>
70
- )}
71
- </td>
72
- );
45
+ if (cellIndex === 0) {
46
+ cellStyle.paddingLeft = spacing?.paddingLeft;
47
+ }
48
+ if (
49
+ (cellIndex === columnLength && !disableContextMenuColumn) ||
50
+ (columnLength && cellIndex === columnLength - 1 && disableContextMenuColumn)
51
+ ) {
52
+ cellStyle.paddingRight = spacing?.paddingRight;
73
53
  }
74
- );
54
+
55
+ return (
56
+ <td
57
+ {...rest}
58
+ ref={ref}
59
+ style={{ ...rest.style, ...cellStyle }}
60
+ className={`${classes["cell"]} ${className ?? ""}`}
61
+ >
62
+ {isLoading && <div className={classes["loading"]} aria-busy="true" aria-live="polite"></div>}
63
+ {!isLoading && (
64
+ <Typography variant="body" tag="span">
65
+ {children}
66
+ </Typography>
67
+ )}
68
+ </td>
69
+ );
70
+ };
71
+
72
+ export const DataGridCell = React.forwardRef(DataGridCellComponent);
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import React, { ComponentPropsWithRef } from "react";
17
+ import React, { ForwardRefRenderFunction, ComponentPropsWithRef } from "react";
18
18
  import { HeaderCell } from "../datagrid.interfaces";
19
19
  import classes from "./DataGridRow.module.scss";
20
20
 
@@ -25,34 +25,34 @@ export interface Props extends ComponentPropsWithRef<"tr"> {
25
25
  disableContextMenuColumn?: boolean;
26
26
  }
27
27
 
28
- export const DataGridRow = React.forwardRef<HTMLTableRowElement, Props>(
29
- (
30
- { children, className, headers, isLoading, spacing, disableContextMenuColumn, ...rest }: Props,
31
- ref
32
- ) => {
33
- const visibleCells = React.Children.map(children as React.ReactElement[], (child, index) => {
34
- if (child) {
35
- const cellWithSpacing = React.cloneElement(child, {
36
- spacing: spacing,
37
- cellIndex: index,
38
- columnLength: headers?.length,
39
- disableContextMenuColumn
40
- });
28
+ const DataGridRowComponent: ForwardRefRenderFunction<HTMLTableRowElement, Props> = (
29
+ { children, className, headers, isLoading, spacing, disableContextMenuColumn, ...rest }: Props,
30
+ ref
31
+ ) => {
32
+ const visibleCells = React.Children.map(children as React.ReactElement[], (child, index) => {
33
+ if (child) {
34
+ const cellWithSpacing = React.cloneElement(child, {
35
+ spacing: spacing,
36
+ cellIndex: index,
37
+ columnLength: headers?.length,
38
+ disableContextMenuColumn
39
+ });
41
40
 
42
- const visible = headers && headers.length > index ? !headers[index].hidden : true;
43
- return visible && cellWithSpacing;
44
- }
45
- return null;
46
- });
41
+ const visible = headers && headers.length > index ? !headers[index].hidden : true;
42
+ return visible && cellWithSpacing;
43
+ }
44
+ return null;
45
+ });
47
46
 
48
- const classNames = [classes["row"]];
49
- className && classNames.push(className);
50
- isLoading && classNames.push(classes["loading"]);
47
+ const classNames = [classes["row"]];
48
+ className && classNames.push(className);
49
+ isLoading && classNames.push(classes["loading"]);
51
50
 
52
- return (
53
- <tr {...rest} ref={ref} className={classNames.join(" ")}>
54
- {visibleCells}
55
- </tr>
56
- );
57
- }
58
- );
51
+ return (
52
+ <tr {...rest} ref={ref} className={classNames.join(" ")}>
53
+ {visibleCells}
54
+ </tr>
55
+ );
56
+ };
57
+
58
+ export const DataGridRow = React.forwardRef(DataGridRowComponent);