@onewelcome/react-lib-components 0.1.8-alpha → 0.1.9-alpha

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.
@@ -2,7 +2,7 @@ import React, { useState, useEffect, Fragment, useRef, createRef, useLayoutEffec
2
2
  import { createPortal } from 'react-dom';
3
3
 
4
4
  function _extends() {
5
- _extends = Object.assign || function (target) {
5
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
6
6
  for (var i = 1; i < arguments.length; i++) {
7
7
  var source = arguments[i];
8
8
 
@@ -15,7 +15,6 @@ function _extends() {
15
15
 
16
16
  return target;
17
17
  };
18
-
19
18
  return _extends.apply(this, arguments);
20
19
  }
21
20
 
@@ -1588,8 +1587,8 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
1588
1587
  }, children), domRoot)));
1589
1588
  });
1590
1589
 
1591
- var css$C = ".Pagination_module_paginationWrapper__7eec36d0 {\n font-family: var(--font-family);\n font-size: var(--font-size);\n color: var(--greyed-out);\n display: flex;\n flex-direction: column;\n}\n.Pagination_module_paginationWrapper__7eec36d0 .Pagination_module_formElement__7eec36d0 {\n height: 2.5rem;\n}\n.Pagination_module_paginationWrapper__7eec36d0 .Pagination_module_formElement__7eec36d0 button {\n min-height: 2.5rem;\n}\n.Pagination_module_paginationWrapper__7eec36d0 .Pagination_module_total__7eec36d0 {\n flex: 1 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.Pagination_module_paginationWrapper__7eec36d0 .Pagination_module_total__7eec36d0 span > span {\n font-weight: 700;\n font-family: var(--font-family);\n font-size: var(--font-size);\n margin-left: 0.25rem;\n}\n.Pagination_module_paginationWrapper__7eec36d0 .Pagination_module_pagination__7eec36d0 {\n flex: 1 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-top: 1rem;\n}\n.Pagination_module_paginationWrapper__7eec36d0 .Pagination_module_pagination__7eec36d0 .Pagination_module_previous__7eec36d0,\n.Pagination_module_paginationWrapper__7eec36d0 .Pagination_module_pagination__7eec36d0 .Pagination_module_next__7eec36d0 {\n display: flex;\n align-items: center;\n}\n.Pagination_module_paginationWrapper__7eec36d0 .Pagination_module_pagination__7eec36d0 .Pagination_module_previous__7eec36d0 button,\n.Pagination_module_paginationWrapper__7eec36d0 .Pagination_module_pagination__7eec36d0 .Pagination_module_next__7eec36d0 button {\n margin: 0.25rem;\n}\n.Pagination_module_paginationWrapper__7eec36d0 .Pagination_module_pagination__7eec36d0 .Pagination_module_previous__7eec36d0 button span:before,\n.Pagination_module_paginationWrapper__7eec36d0 .Pagination_module_pagination__7eec36d0 .Pagination_module_next__7eec36d0 button span:before {\n font-size: 0.75rem;\n}\n.Pagination_module_paginationWrapper__7eec36d0 .Pagination_module_perPage__7eec36d0 {\n display: none;\n align-items: center;\n}\n.Pagination_module_paginationWrapper__7eec36d0 .Pagination_module_page__7eec36d0 {\n display: flex;\n align-items: center;\n flex-basis: min-content;\n}\n.Pagination_module_paginationWrapper__7eec36d0 .Pagination_module_pageSizeSelect__7eec36d0 {\n border-color: #fff;\n margin: 0 0.25rem;\n}\n.Pagination_module_paginationWrapper__7eec36d0 .Pagination_module_pageSizeSelect__7eec36d0 button {\n min-width: 3.4375rem;\n padding: 0;\n}\n.Pagination_module_paginationWrapper__7eec36d0 .Pagination_module_pageSizeSelect__7eec36d0 button div[data-display] {\n left: 0.5rem;\n}\n.Pagination_module_paginationWrapper__7eec36d0 .Pagination_module_pageSizeSelect__7eec36d0 button div:not([data-display]) {\n right: 0.5rem;\n}\n.Pagination_module_paginationWrapper__7eec36d0 .Pagination_module_currentValueInput__7eec36d0 {\n margin: 0 0.25rem 0 0;\n padding: 0;\n}\n.Pagination_module_paginationWrapper__7eec36d0 .Pagination_module_currentValueInput__7eec36d0 input {\n border-radius: var(--input-border-radius);\n padding: 0 1rem;\n width: auto;\n text-align: center;\n}\n\n@media screen and (min-width: 30em) {\n .Pagination_module_paginationWrapper__7eec36d0 {\n flex-direction: row;\n }\n .Pagination_module_paginationWrapper__7eec36d0 .Pagination_module_total__7eec36d0 {\n justify-content: flex-start;\n }\n .Pagination_module_paginationWrapper__7eec36d0 .Pagination_module_pagination__7eec36d0 {\n margin-top: 0;\n justify-content: flex-end;\n }\n .Pagination_module_paginationWrapper__7eec36d0 .Pagination_module_pagination__7eec36d0 .Pagination_module_previous__7eec36d0 button,\n.Pagination_module_paginationWrapper__7eec36d0 .Pagination_module_pagination__7eec36d0 .Pagination_module_next__7eec36d0 button {\n margin: 0.5rem;\n }\n}\n@media screen and (min-width: 48em) {\n .Pagination_module_paginationWrapper__7eec36d0 .Pagination_module_perPage__7eec36d0 {\n display: flex;\n }\n}";
1592
- var modules_e3c5bce1 = {"pagination-wrapper":"Pagination_module_paginationWrapper__7eec36d0","form-element":"Pagination_module_formElement__7eec36d0","total":"Pagination_module_total__7eec36d0","pagination":"Pagination_module_pagination__7eec36d0","previous":"Pagination_module_previous__7eec36d0","next":"Pagination_module_next__7eec36d0","per-page":"Pagination_module_perPage__7eec36d0","page":"Pagination_module_page__7eec36d0","page-size-select":"Pagination_module_pageSizeSelect__7eec36d0","current-value-input":"Pagination_module_currentValueInput__7eec36d0"};
1590
+ var css$C = ".Pagination_module_paginationWrapper__87a18f48 {\n font-family: var(--font-family);\n font-size: var(--font-size);\n color: var(--greyed-out);\n display: flex;\n flex-direction: column;\n}\n.Pagination_module_paginationWrapper__87a18f48 .Pagination_module_formElement__87a18f48 {\n height: 2.5rem;\n}\n.Pagination_module_paginationWrapper__87a18f48 .Pagination_module_formElement__87a18f48 button {\n min-height: 2.5rem;\n}\n.Pagination_module_paginationWrapper__87a18f48 .Pagination_module_total__87a18f48 {\n flex: 1 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.Pagination_module_paginationWrapper__87a18f48 .Pagination_module_total__87a18f48 span > span {\n font-weight: 700;\n font-family: var(--font-family);\n font-size: var(--font-size);\n margin-left: 0.25rem;\n}\n.Pagination_module_paginationWrapper__87a18f48 .Pagination_module_pagination__87a18f48 {\n flex: 1 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-top: 1rem;\n}\n.Pagination_module_paginationWrapper__87a18f48 .Pagination_module_pagination__87a18f48 .Pagination_module_previous__87a18f48,\n.Pagination_module_paginationWrapper__87a18f48 .Pagination_module_pagination__87a18f48 .Pagination_module_next__87a18f48 {\n display: flex;\n align-items: center;\n}\n.Pagination_module_paginationWrapper__87a18f48 .Pagination_module_pagination__87a18f48 .Pagination_module_previous__87a18f48 button,\n.Pagination_module_paginationWrapper__87a18f48 .Pagination_module_pagination__87a18f48 .Pagination_module_next__87a18f48 button {\n margin: 0.25rem;\n}\n.Pagination_module_paginationWrapper__87a18f48 .Pagination_module_pagination__87a18f48 .Pagination_module_previous__87a18f48 button span:before,\n.Pagination_module_paginationWrapper__87a18f48 .Pagination_module_pagination__87a18f48 .Pagination_module_next__87a18f48 button span:before {\n font-size: 0.75rem;\n}\n.Pagination_module_paginationWrapper__87a18f48 .Pagination_module_perPage__87a18f48 {\n display: none;\n align-items: center;\n}\n.Pagination_module_paginationWrapper__87a18f48 .Pagination_module_page__87a18f48 {\n display: flex;\n align-items: center;\n flex-basis: min-content;\n}\n.Pagination_module_paginationWrapper__87a18f48 .Pagination_module_pageSizeSelect__87a18f48 {\n border-color: #fff;\n margin: 0 0.25rem;\n}\n.Pagination_module_paginationWrapper__87a18f48 .Pagination_module_pageSizeSelect__87a18f48 button {\n min-width: 3.4375rem;\n padding: 0;\n}\n.Pagination_module_paginationWrapper__87a18f48 .Pagination_module_pageSizeSelect__87a18f48 button div[data-display] {\n left: 0.5rem;\n}\n.Pagination_module_paginationWrapper__87a18f48 .Pagination_module_pageSizeSelect__87a18f48 button div:not([data-display]) {\n right: 0.5rem;\n}\n.Pagination_module_paginationWrapper__87a18f48 .Pagination_module_currentValueInput__87a18f48 {\n margin: 0 0.25rem 0 0;\n padding: 0;\n}\n.Pagination_module_paginationWrapper__87a18f48 .Pagination_module_currentValueInput__87a18f48 input {\n border-radius: var(--input-border-radius);\n padding: 0 1rem;\n width: auto;\n text-align: center;\n}\n\n@media screen and (min-width: 30em) {\n .Pagination_module_paginationWrapper__87a18f48 {\n flex-direction: row;\n }\n .Pagination_module_paginationWrapper__87a18f48 .Pagination_module_total__87a18f48 {\n justify-content: flex-start;\n }\n .Pagination_module_paginationWrapper__87a18f48 .Pagination_module_pagination__87a18f48 {\n margin-top: 0;\n justify-content: flex-end;\n }\n .Pagination_module_paginationWrapper__87a18f48 .Pagination_module_pagination__87a18f48 .Pagination_module_previous__87a18f48 button,\n.Pagination_module_paginationWrapper__87a18f48 .Pagination_module_pagination__87a18f48 .Pagination_module_next__87a18f48 button {\n margin: 0 0.5rem;\n }\n}\n@media screen and (min-width: 48em) {\n .Pagination_module_paginationWrapper__87a18f48 .Pagination_module_perPage__87a18f48 {\n display: flex;\n }\n}";
1591
+ var modules_e3c5bce1 = {"pagination-wrapper":"Pagination_module_paginationWrapper__87a18f48","form-element":"Pagination_module_formElement__87a18f48","total":"Pagination_module_total__87a18f48","pagination":"Pagination_module_pagination__87a18f48","previous":"Pagination_module_previous__87a18f48","next":"Pagination_module_next__87a18f48","per-page":"Pagination_module_perPage__87a18f48","page":"Pagination_module_page__87a18f48","page-size-select":"Pagination_module_pageSizeSelect__87a18f48","current-value-input":"Pagination_module_currentValueInput__87a18f48"};
1593
1592
  n(css$C,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
1594
1593
 
1595
1594
  var css$B = ".Input_module_inputWrapper__ca7df3b0 {\n position: relative;\n display: flex;\n align-items: center;\n padding: 0 1.25rem;\n background-color: var(--input-background-color);\n border-color: var(--input-border-color);\n border-style: var(--input-border-style);\n border-width: var(--input-border-width);\n border-radius: var(--input-border-radius);\n transition: all 0.2s ease-in-out;\n}\n.Input_module_inputWrapper__ca7df3b0:hover:not(:disabled) {\n border-color: var(--default);\n}\n.Input_module_inputWrapper__ca7df3b0.Input_module_disabled__ca7df3b0, .Input_module_inputWrapper__ca7df3b0.Input_module_disabled__ca7df3b0 input {\n background-color: var(--disabled);\n border-color: #fff;\n cursor: not-allowed;\n}\n.Input_module_inputWrapper__ca7df3b0.Input_module_error__ca7df3b0 {\n border-color: var(--error);\n}\n.Input_module_inputWrapper__ca7df3b0.Input_module_focus__ca7df3b0 {\n border-color: var(--color-primary);\n}\n\n.Input_module_input__ca7df3b0 {\n height: 4rem;\n border: 0;\n color: var(--greyed-out);\n font-size: var(--font-size);\n font-family: var(--font-family);\n width: 100%;\n box-sizing: border-box;\n padding: 0;\n}\n.Input_module_input__ca7df3b0:focus:not(:disabled) {\n outline: none;\n border-color: var(--color-primary);\n}\n\n.Input_module_error__ca7df3b0 input {\n color: var(--error);\n padding-right: 3.75rem;\n}\n.Input_module_error__ca7df3b0 input.Input_module_removeExtraIndent__ca7df3b0 {\n padding-right: 1.25rem;\n}\n\n.Input_module_warning__ca7df3b0 {\n color: var(--error);\n position: absolute;\n height: 100%;\n width: 1.25rem;\n right: 1.25rem;\n top: 0px;\n font-size: 1.125rem;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.Input_module_warning__ca7df3b0:before {\n height: 1.3125rem;\n}\n.Input_module_warning__ca7df3b0.Input_module_extraIndent__ca7df3b0 {\n right: 3.75rem;\n}\n\n.Input_module_inputWrapper__ca7df3b0 [data-prefix],\n.Input_module_inputWrapper__ca7df3b0 [data-suffix] {\n transition: all 0.2s ease-in-out;\n display: block;\n z-index: 1;\n}";
@@ -3540,8 +3539,8 @@ var FormGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3540
3539
  })))));
3541
3540
  });
3542
3541
 
3543
- var css$e = ".Wrapper_module_floatingWrapper__0b897a43 {\n position: relative;\n}\n\n.Wrapper_module_floatingLabel__0b897a43 {\n font-size: 1rem;\n position: absolute;\n z-index: 1;\n top: 1.3125rem;\n left: 1.35rem;\n transform-origin: left top;\n transition: all 0.2s ease-in-out;\n pointer-events: none;\n}\n.Wrapper_module_floatingLabel__0b897a43.Wrapper_module_floatingLabelActive__0b897a43 {\n font-size: 0.75rem;\n transform: translateY(-0.75rem);\n color: var(--default);\n}\n.Wrapper_module_floatingLabel__0b897a43.Wrapper_module_error__0b897a43 {\n color: var(--error);\n}\n\n.Wrapper_module_wrapper__0b897a43 + fieldset,\n.Wrapper_module_wrapper__0b897a43 + .Wrapper_module_wrapper__0b897a43 {\n margin-top: 1rem;\n}\n\n.Wrapper_module_required__0b897a43:after {\n content: \" *\";\n}";
3544
- var modules_e401a244 = {"floating-wrapper":"Wrapper_module_floatingWrapper__0b897a43","floating-label":"Wrapper_module_floatingLabel__0b897a43","floating-label-active":"Wrapper_module_floatingLabelActive__0b897a43","error":"Wrapper_module_error__0b897a43","wrapper":"Wrapper_module_wrapper__0b897a43","required":"Wrapper_module_required__0b897a43"};
3542
+ var css$e = ".Wrapper_module_floatingWrapper__24a1c678 {\n position: relative;\n}\n\n.Wrapper_module_floatingLabel__24a1c678 {\n font-family: var(--font-family);\n font-size: 1rem;\n position: absolute;\n z-index: 1;\n top: 1.3125rem;\n left: 1.35rem;\n transform-origin: left top;\n transition: all 0.2s ease-in-out;\n pointer-events: none;\n}\n.Wrapper_module_floatingLabel__24a1c678.Wrapper_module_floatingLabelActive__24a1c678 {\n font-size: 0.75rem;\n transform: translateY(-0.75rem);\n color: var(--default);\n}\n.Wrapper_module_floatingLabel__24a1c678.Wrapper_module_error__24a1c678 {\n color: var(--error);\n}\n\n.Wrapper_module_wrapper__24a1c678 + fieldset,\n.Wrapper_module_wrapper__24a1c678 + .Wrapper_module_wrapper__24a1c678 {\n margin-top: 1rem;\n}\n\n.Wrapper_module_required__24a1c678:after {\n content: \" *\";\n}";
3543
+ var modules_e401a244 = {"floating-wrapper":"Wrapper_module_floatingWrapper__24a1c678","floating-label":"Wrapper_module_floatingLabel__24a1c678","floating-label-active":"Wrapper_module_floatingLabelActive__24a1c678","error":"Wrapper_module_error__24a1c678","wrapper":"Wrapper_module_wrapper__24a1c678","required":"Wrapper_module_required__24a1c678"};
3545
3544
  n(css$e,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
3546
3545
 
3547
3546
  var _excluded$h = ["children", "className", "error", "errorMessage", "errorId", "errorMessageIcon", "errorMessageIconPosition", "helperText", "helperId", "floatingLabel", "floatingLabelActive", "required", "helperProps", "helperIndent", "labelProps", "label", "disabled", "name", "innerClassName"];
@@ -4384,8 +4383,8 @@ var WizardSteps = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4384
4383
  }));
4385
4384
  });
4386
4385
 
4387
- var css$7 = ".DataGrid_module_tableWrapper__66a6f06a {\n overflow-x: auto;\n}\n\n.DataGrid_module_table__66a6f06a {\n border-collapse: collapse;\n padding-top: 0.5rem;\n width: 100%;\n position: relative;\n}\n\n.DataGrid_module_pagination__66a6f06a {\n margin-top: 1rem;\n padding: 0 1rem;\n}\n\n@media only screen and (min-width: 50em) {\n .DataGrid_module_pagination__66a6f06a {\n padding: 0 1.25rem;\n }\n}";
4388
- var modules_b8d590e8 = {"table-wrapper":"DataGrid_module_tableWrapper__66a6f06a","table":"DataGrid_module_table__66a6f06a","pagination":"DataGrid_module_pagination__66a6f06a"};
4386
+ var css$7 = ".DataGrid_module_gridWrapper__f048f02f {\n padding: 1rem 0;\n}\n\n.DataGrid_module_tableWrapper__f048f02f {\n overflow-x: auto;\n}\n\n.DataGrid_module_table__f048f02f {\n border-collapse: collapse;\n padding-top: 0.5rem;\n width: 100%;\n position: relative;\n}\n\n.DataGrid_module_pagination__f048f02f {\n margin-top: 1rem;\n padding: 0 1rem;\n}\n\n@media only screen and (min-width: 50em) {\n .DataGrid_module_pagination__f048f02f {\n padding: 0 1.25rem;\n }\n}";
4387
+ var modules_b8d590e8 = {"grid-wrapper":"DataGrid_module_gridWrapper__f048f02f","table-wrapper":"DataGrid_module_tableWrapper__f048f02f","table":"DataGrid_module_table__f048f02f","pagination":"DataGrid_module_pagination__f048f02f"};
4389
4388
  n(css$7,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
4390
4389
 
4391
4390
  var css$6 = ".DataGridHeaderCell_module_headerCell__cbbe0d16 {\n font-weight: normal;\n text-align: left;\n padding: 0 0.625rem;\n}\n.DataGridHeaderCell_module_headerCell__cbbe0d16:first-child {\n padding-left: 1rem;\n}\n.DataGridHeaderCell_module_headerCell__cbbe0d16:last-child {\n padding-right: 1rem;\n}\n.DataGridHeaderCell_module_headerCell__cbbe0d16 > * {\n display: inline-flex;\n}\n.DataGridHeaderCell_module_headerCell__cbbe0d16 > button {\n padding: 0;\n margin: 0;\n border: 0;\n background: none;\n cursor: pointer;\n}\n\n.DataGridHeaderCell_module_headline__cbbe0d16 {\n font-family: var(--font-family);\n font-size: var(--font-size);\n line-height: 1.5;\n font-weight: 700;\n color: var(--default);\n}\n\n.DataGridHeaderCell_module_sortingIndicatorContainer__cbbe0d16 {\n display: flex;\n flex-direction: column;\n padding-left: 0.5rem;\n justify-content: center;\n}\n.DataGridHeaderCell_module_sortingIndicatorContainer__cbbe0d16 > * {\n font-size: 0.625rem;\n}\n.DataGridHeaderCell_module_sortingIndicatorContainer__cbbe0d16 .DataGridHeaderCell_module_indicator__cbbe0d16 {\n color: var(--greyed-out);\n}\n.DataGridHeaderCell_module_sortingIndicatorContainer__cbbe0d16 .DataGridHeaderCell_module_indicator__cbbe0d16.DataGridHeaderCell_module_active__cbbe0d16 {\n color: var(--color-primary);\n}\n.DataGridHeaderCell_module_sortingIndicatorContainer__cbbe0d16 .DataGridHeaderCell_module_indicator__cbbe0d16.DataGridHeaderCell_module_hidden__cbbe0d16 {\n visibility: hidden;\n}\n\n@media only screen and (min-width: 50em) {\n .DataGridHeaderCell_module_headerCell__cbbe0d16:first-child {\n padding-left: 1.25rem;\n }\n .DataGridHeaderCell_module_headerCell__cbbe0d16:last-child {\n padding-right: 1.25rem;\n }\n}";
@@ -4446,7 +4445,7 @@ var css$5 = ".DataGridHeader_module_thead__e75f00b8::after {\n content: \"\";\n
4446
4445
  var modules_bec66042 = {"thead":"DataGridHeader_module_thead__e75f00b8","row":"DataGridHeader_module_row__e75f00b8","context-menu":"DataGridHeader_module_contextMenu__e75f00b8"};
4447
4446
  n(css$5,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
4448
4447
 
4449
- var _excluded$6 = ["initialSort", "onSort", "headers", "disableContextMenuColumn", "enableMultiSorting"];
4448
+ var _excluded$6 = ["initialSort", "onSort", "headers", "disableContextMenuColumn", "enableMultiSorting", "spacing"];
4450
4449
  var sortingStates = [undefined, 'ASC', 'DESC'];
4451
4450
  var DataGridHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4452
4451
  var initialSort = _ref.initialSort,
@@ -4454,6 +4453,7 @@ var DataGridHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4454
4453
  headers = _ref.headers,
4455
4454
  disableContextMenuColumn = _ref.disableContextMenuColumn,
4456
4455
  enableMultiSorting = _ref.enableMultiSorting,
4456
+ spacing = _ref.spacing,
4457
4457
  rest = _objectWithoutPropertiesLoose(_ref, _excluded$6);
4458
4458
 
4459
4459
  var _useState = useState(initialSort || []),
@@ -4496,11 +4496,21 @@ var DataGridHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4496
4496
  setSortList(newSort);
4497
4497
  };
4498
4498
 
4499
- var headerCells = headers.map(function (header) {
4499
+ var headerCells = headers.map(function (header, index) {
4500
4500
  if (header.hidden) {
4501
4501
  return null;
4502
4502
  }
4503
4503
 
4504
+ var headerStyle = {};
4505
+
4506
+ if (index === 0) {
4507
+ headerStyle.paddingLeft = spacing == null ? void 0 : spacing.paddingLeft;
4508
+ }
4509
+
4510
+ if (index === headers.length - 1 && disableContextMenuColumn) {
4511
+ headerStyle.paddingRight = spacing == null ? void 0 : spacing.paddingRight;
4512
+ }
4513
+
4504
4514
  var sort = sortList.find(function (item) {
4505
4515
  return item.name === header.name;
4506
4516
  });
@@ -4510,7 +4520,8 @@ var DataGridHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4510
4520
  headline: header.headline,
4511
4521
  disableSorting: header.disableSorting || !onSort,
4512
4522
  onSort: wrapOnSort,
4513
- activeSortDirection: sort == null ? void 0 : sort.direction
4523
+ activeSortDirection: sort == null ? void 0 : sort.direction,
4524
+ style: headerStyle
4514
4525
  });
4515
4526
  });
4516
4527
  return React.createElement("thead", _extends({}, rest, {
@@ -4519,13 +4530,16 @@ var DataGridHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4519
4530
  }), React.createElement("tr", {
4520
4531
  className: modules_bec66042['row']
4521
4532
  }, headerCells, !disableContextMenuColumn && React.createElement("td", {
4533
+ style: {
4534
+ paddingRight: spacing == null ? void 0 : spacing.paddingRight
4535
+ },
4522
4536
  "aria-label": "context menu",
4523
4537
  className: modules_bec66042['context-menu']
4524
4538
  })));
4525
4539
  });
4526
4540
 
4527
- var css$4 = ".DataGridActions_module_actions__b4702fe2 {\n margin-bottom: 1rem;\n padding: 0 1rem;\n display: flex;\n flex-wrap: wrap;\n}\n\n.DataGridActions_module_leftActions__b4702fe2 {\n flex: 1;\n}\n\n.DataGridActions_module_rightActions__b4702fe2 {\n display: flex;\n gap: 1rem;\n}\n\n.DataGridActions_module_desktop__b4702fe2 {\n display: none;\n}\n\n@media only screen and (min-width: 50em) {\n .DataGridActions_module_actions__b4702fe2 {\n padding: 0 1.25rem;\n }\n}\n@media only screen and (min-width: 30em) {\n .DataGridActions_module_desktop__b4702fe2 {\n display: block;\n }\n\n .DataGridActions_module_mobile__b4702fe2 {\n display: none;\n }\n}";
4528
- var modules_3f552d89 = {"actions":"DataGridActions_module_actions__b4702fe2","left-actions":"DataGridActions_module_leftActions__b4702fe2","right-actions":"DataGridActions_module_rightActions__b4702fe2","desktop":"DataGridActions_module_desktop__b4702fe2","mobile":"DataGridActions_module_mobile__b4702fe2"};
4541
+ var css$4 = ".DataGridActions_module_actions__a2bfe2f8 {\n margin-bottom: 1rem;\n padding: 0 1rem;\n display: flex;\n flex-wrap: wrap;\n}\n\n.DataGridActions_module_leftActions__a2bfe2f8 {\n flex: 1;\n}\n\n.DataGridActions_module_rightActions__a2bfe2f8 {\n display: flex;\n gap: 1rem;\n}\n\n.DataGridActions_module_desktop__a2bfe2f8 {\n display: none;\n}\n\n@media only screen and (min-width: 50em) {\n .DataGridActions_module_actions__a2bfe2f8 {\n padding: 0 1.25rem;\n }\n}\n@media only screen and (min-width: 30em) {\n .DataGridActions_module_desktop__a2bfe2f8 {\n display: block;\n }\n .DataGridActions_module_mobile__a2bfe2f8 {\n display: none;\n }\n}";
4542
+ var modules_3f552d89 = {"actions":"DataGridActions_module_actions__a2bfe2f8","left-actions":"DataGridActions_module_leftActions__a2bfe2f8","right-actions":"DataGridActions_module_rightActions__a2bfe2f8","desktop":"DataGridActions_module_desktop__a2bfe2f8","mobile":"DataGridActions_module_mobile__a2bfe2f8"};
4529
4543
  n(css$4,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
4530
4544
 
4531
4545
  var css$3 = ".DataGridColumnsToggle_module_popover__89304f63 {\n background-color: var(--modal-background-color);\n z-index: 1;\n min-width: 17.5rem;\n}\n\n.DataGridColumnsToggle_module_backdrop__89304f63 {\n content: \"\";\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n background-color: transparent;\n}\n\n.DataGridColumnsToggle_module_header__89304f63 {\n min-width: 5rem;\n padding: 1rem 0.5rem 1rem 1.5rem;\n background-color: var(--modal-header-background-color);\n border-top-left-radius: 0.5rem;\n border-top-right-radius: 0.5rem;\n display: flex;\n align-items: center;\n}\n\n.DataGridColumnsToggle_module_title__89304f63 {\n flex: 1;\n margin: 0;\n}\n\n.DataGridColumnsToggle_module_closeBtn__89304f63 {\n margin-left: 0.5rem;\n}\n\n.DataGridColumnsToggle_module_content__89304f63 {\n padding: 1.5rem;\n display: flex;\n flex-direction: column;\n gap: 1.25rem;\n}";
@@ -4688,15 +4702,30 @@ var css$2 = ".DataGridCell_module_srOnly__5fbf1b86 {\n position: absolute;\n w
4688
4702
  var modules_e636700c = {"sr-only":"DataGridCell_module_srOnly__5fbf1b86","hidden":"DataGridCell_module_hidden__5fbf1b86","slide-in":"DataGridCell_module_slideIn__5fbf1b86","slide-out":"DataGridCell_module_slideOut__5fbf1b86","cell":"DataGridCell_module_cell__5fbf1b86","loading":"DataGridCell_module_loading__5fbf1b86","shimmer":"DataGridCell_module_shimmer__5fbf1b86"};
4689
4703
  n(css$2,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
4690
4704
 
4691
- var _excluded$3 = ["children", "className", "isLoading"];
4705
+ var _excluded$3 = ["children", "className", "isLoading", "spacing", "cellIndex", "columnLength", "disableContextMenuColumn"];
4692
4706
  var DataGridCell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4693
4707
  var children = _ref.children,
4694
4708
  className = _ref.className,
4695
4709
  isLoading = _ref.isLoading,
4710
+ spacing = _ref.spacing,
4711
+ cellIndex = _ref.cellIndex,
4712
+ columnLength = _ref.columnLength,
4713
+ disableContextMenuColumn = _ref.disableContextMenuColumn,
4696
4714
  rest = _objectWithoutPropertiesLoose(_ref, _excluded$3);
4697
4715
 
4716
+ var cellStyle = {};
4717
+
4718
+ if (cellIndex === 0) {
4719
+ cellStyle.paddingLeft = spacing == null ? void 0 : spacing.paddingLeft;
4720
+ }
4721
+
4722
+ if (cellIndex === columnLength && !disableContextMenuColumn || columnLength && cellIndex === columnLength - 1 && disableContextMenuColumn) {
4723
+ cellStyle.paddingRight = spacing == null ? void 0 : spacing.paddingRight;
4724
+ }
4725
+
4698
4726
  return React.createElement("td", _extends({}, rest, {
4699
4727
  ref: ref,
4728
+ style: _extends({}, rest.style, cellStyle),
4700
4729
  className: modules_e636700c['cell'] + " " + (className != null ? className : '')
4701
4730
  }), isLoading && React.createElement("div", {
4702
4731
  className: modules_e636700c['loading'],
@@ -4712,17 +4741,29 @@ var css$1 = ".DataGridRow_module_row__620d6a13 {\n background-color: var(--data
4712
4741
  var modules_fb55f208 = {"row":"DataGridRow_module_row__620d6a13","loading":"DataGridRow_module_loading__620d6a13"};
4713
4742
  n(css$1,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
4714
4743
 
4715
- var _excluded$2 = ["children", "className", "headers", "isLoading"];
4744
+ var _excluded$2 = ["children", "className", "headers", "isLoading", "spacing", "disableContextMenuColumn"];
4716
4745
  var DataGridRow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4717
4746
  var children = _ref.children,
4718
4747
  className = _ref.className,
4719
4748
  headers = _ref.headers,
4720
4749
  isLoading = _ref.isLoading,
4750
+ spacing = _ref.spacing,
4751
+ disableContextMenuColumn = _ref.disableContextMenuColumn,
4721
4752
  rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
4722
4753
 
4723
4754
  var visibleCells = React.Children.map(children, function (child, index) {
4724
- var visible = (headers == null ? void 0 : headers.length) > index ? !headers[index].hidden : true;
4725
- return visible && child;
4755
+ if (child) {
4756
+ var cellWithSpacing = React.cloneElement(child, {
4757
+ spacing: spacing,
4758
+ cellIndex: index,
4759
+ columnLength: headers == null ? void 0 : headers.length,
4760
+ disableContextMenuColumn: disableContextMenuColumn
4761
+ });
4762
+ var visible = (headers == null ? void 0 : headers.length) > index ? !headers[index].hidden : true;
4763
+ return visible && cellWithSpacing;
4764
+ }
4765
+
4766
+ return null;
4726
4767
  });
4727
4768
  var classNames = [modules_fb55f208['row']];
4728
4769
  className && classNames.push(className);
@@ -4737,7 +4778,7 @@ var css = ".DataGridBody_module_empty__243e0ebe {\n text-align: center;\n heig
4737
4778
  var modules_532fe2cf = {"empty":"DataGridBody_module_empty__243e0ebe"};
4738
4779
  n(css,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
4739
4780
 
4740
- var _excluded$1 = ["children", "data", "headers", "isLoading", "disableContextMenuColumn", "emptyLabel"];
4781
+ var _excluded$1 = ["children", "data", "headers", "isLoading", "disableContextMenuColumn", "emptyLabel", "spacing"];
4741
4782
  var skeletonLoadingRows = 9;
4742
4783
 
4743
4784
  var DataGridBodyInner = function DataGridBodyInner(_ref, ref) {
@@ -4747,6 +4788,7 @@ var DataGridBodyInner = function DataGridBodyInner(_ref, ref) {
4747
4788
  isLoading = _ref.isLoading,
4748
4789
  disableContextMenuColumn = _ref.disableContextMenuColumn,
4749
4790
  emptyLabel = _ref.emptyLabel,
4791
+ spacing = _ref.spacing,
4750
4792
  rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
4751
4793
 
4752
4794
  var renderContent = function renderContent() {
@@ -4787,7 +4829,9 @@ var DataGridBodyInner = function DataGridBodyInner(_ref, ref) {
4787
4829
  item: item,
4788
4830
  index: index
4789
4831
  }), {
4790
- headers: headers
4832
+ headers: headers,
4833
+ spacing: spacing,
4834
+ disableContextMenuColumn: disableContextMenuColumn
4791
4835
  });
4792
4836
  });
4793
4837
  };
@@ -4799,7 +4843,7 @@ var DataGridBodyInner = function DataGridBodyInner(_ref, ref) {
4799
4843
 
4800
4844
  var DataGridBody = /*#__PURE__*/React.forwardRef(DataGridBodyInner);
4801
4845
 
4802
- var _excluded = ["children", "data", "initialSort", "onSort", "headers", "actions", "paginationProps", "disableContextMenuColumn", "isLoading", "enableMultiSorting", "emptyLabel"];
4846
+ var _excluded = ["children", "data", "initialSort", "onSort", "headers", "actions", "paginationProps", "disableContextMenuColumn", "isLoading", "enableMultiSorting", "emptyLabel", "spacing", "style"];
4803
4847
 
4804
4848
  var DataGridInner = function DataGridInner(_ref, ref) {
4805
4849
  var _paginationProps$clas;
@@ -4816,6 +4860,8 @@ var DataGridInner = function DataGridInner(_ref, ref) {
4816
4860
  isLoading = _ref.isLoading,
4817
4861
  enableMultiSorting = _ref.enableMultiSorting,
4818
4862
  emptyLabel = _ref.emptyLabel,
4863
+ spacing = _ref.spacing,
4864
+ style = _ref.style,
4819
4865
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
4820
4866
 
4821
4867
  if (!headers) {
@@ -4830,6 +4876,7 @@ var DataGridInner = function DataGridInner(_ref, ref) {
4830
4876
  internalHeaders = _useState[0],
4831
4877
  setInternalHeaders = _useState[1];
4832
4878
 
4879
+ var styleWithSpacing = useSpacing(spacing, style);
4833
4880
  useEffect(function () {
4834
4881
  return setInternalHeaders(headers);
4835
4882
  }, [headers]);
@@ -4842,9 +4889,46 @@ var DataGridInner = function DataGridInner(_ref, ref) {
4842
4889
  }));
4843
4890
  };
4844
4891
 
4892
+ if (styleWithSpacing != null && styleWithSpacing.padding) {
4893
+ var splitPaddings = styleWithSpacing.padding.toString().split(' ');
4894
+ var paddingLeftIndex = 0;
4895
+
4896
+ if (splitPaddings.length >= 2) {
4897
+ paddingLeftIndex = 1;
4898
+ }
4899
+
4900
+ if (splitPaddings.length === 4) {
4901
+ paddingLeftIndex = 3;
4902
+ }
4903
+
4904
+ Object.defineProperties(styleWithSpacing, {
4905
+ paddingTop: {
4906
+ value: splitPaddings[0]
4907
+ },
4908
+ paddingRight: {
4909
+ value: splitPaddings[splitPaddings.length - 1 > 0 ? 1 : 0]
4910
+ },
4911
+ paddingBottom: {
4912
+ value: splitPaddings[splitPaddings.length / 3 >= 1 ? 2 : 0]
4913
+ },
4914
+ paddingLeft: {
4915
+ value: splitPaddings[paddingLeftIndex]
4916
+ }
4917
+ });
4918
+ }
4919
+
4845
4920
  return React.createElement("div", _extends({}, rest, {
4846
- ref: ref
4921
+ className: modules_b8d590e8['grid-wrapper'],
4922
+ ref: ref,
4923
+ style: {
4924
+ paddingTop: styleWithSpacing == null ? void 0 : styleWithSpacing.paddingTop,
4925
+ paddingBottom: styleWithSpacing == null ? void 0 : styleWithSpacing.paddingBottom
4926
+ }
4847
4927
  }), React.createElement(DataGridActions, _extends({}, actions, {
4928
+ style: {
4929
+ paddingLeft: styleWithSpacing == null ? void 0 : styleWithSpacing.paddingLeft,
4930
+ paddingRight: styleWithSpacing == null ? void 0 : styleWithSpacing.paddingRight
4931
+ },
4848
4932
  headers: internalHeaders,
4849
4933
  onColumnToggled: onColumnToggled
4850
4934
  })), React.createElement("div", {
@@ -4856,15 +4940,21 @@ var DataGridInner = function DataGridInner(_ref, ref) {
4856
4940
  initialSort: initialSort,
4857
4941
  onSort: onSort,
4858
4942
  disableContextMenuColumn: disableContextMenuColumn,
4859
- enableMultiSorting: enableMultiSorting
4943
+ enableMultiSorting: enableMultiSorting,
4944
+ spacing: styleWithSpacing
4860
4945
  }), React.createElement(DataGridBody, {
4861
4946
  children: children,
4862
4947
  data: data,
4863
4948
  headers: internalHeaders,
4864
4949
  isLoading: isLoading,
4865
4950
  disableContextMenuColumn: disableContextMenuColumn,
4866
- emptyLabel: emptyLabel
4951
+ emptyLabel: emptyLabel,
4952
+ spacing: styleWithSpacing
4867
4953
  }))), paginationProps && !isLoading && React.createElement(Pagination, _extends({}, paginationProps, {
4954
+ style: _extends({}, paginationProps.style, {
4955
+ paddingLeft: styleWithSpacing == null ? void 0 : styleWithSpacing.paddingLeft,
4956
+ paddingRight: styleWithSpacing == null ? void 0 : styleWithSpacing.paddingRight
4957
+ }),
4868
4958
  className: modules_b8d590e8['pagination'] + " " + ((_paginationProps$clas = paginationProps.className) != null ? _paginationProps$clas : '')
4869
4959
  })));
4870
4960
  };