@dhis2-ui/table 10.16.3-alpha.1 → 10.16.4

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 (82) hide show
  1. package/build/cjs/data-table/data-table-cell.js +25 -27
  2. package/build/cjs/data-table/data-table-column-header/data-table-column-header.js +58 -62
  3. package/build/cjs/data-table/data-table-column-header/filter-handle.js +5 -6
  4. package/build/cjs/data-table/data-table-column-header/sorter.js +6 -7
  5. package/build/cjs/data-table/data-table-row/data-table-row.js +13 -15
  6. package/build/cjs/data-table/data-table-row/expand-handle-cell.js +12 -15
  7. package/build/cjs/data-table/data-table-row/expanded-row.js +19 -22
  8. package/build/cjs/data-table/data-table.js +11 -13
  9. package/build/cjs/data-table/data-table.prod.stories.js +128 -146
  10. package/build/cjs/data-table/table-elements/table-body.js +19 -23
  11. package/build/cjs/data-table/table-elements/table-data-cell/table-data-cell.js +23 -25
  12. package/build/cjs/data-table/table-elements/table-foot.js +13 -17
  13. package/build/cjs/data-table/table-elements/table-head.js +13 -17
  14. package/build/cjs/data-table/table-elements/table-header-cell/table-header-cell.js +42 -46
  15. package/build/cjs/data-table/table-elements/table-header-cell-action.js +18 -22
  16. package/build/cjs/data-table/table-elements/table-row.js +19 -23
  17. package/build/cjs/data-table/table-elements/table-scroll-box.js +16 -20
  18. package/build/cjs/data-table/table-elements/table-toolbar.js +15 -19
  19. package/build/cjs/data-table/table-elements/table.js +21 -25
  20. package/build/cjs/data-table/table-elements/table.stories.internal.js +111 -120
  21. package/build/cjs/locales/index.js +40 -21
  22. package/build/cjs/stacked-table/content-with-title.js +12 -16
  23. package/build/cjs/stacked-table/stacked-table-body.js +10 -13
  24. package/build/cjs/stacked-table/stacked-table-cell-head.js +17 -20
  25. package/build/cjs/stacked-table/stacked-table-cell.js +11 -12
  26. package/build/cjs/stacked-table/stacked-table-foot.js +10 -13
  27. package/build/cjs/stacked-table/stacked-table-head.js +10 -13
  28. package/build/cjs/stacked-table/stacked-table-row-head.js +8 -11
  29. package/build/cjs/stacked-table/stacked-table-row.js +13 -19
  30. package/build/cjs/stacked-table/stacked-table.js +6 -7
  31. package/build/cjs/stacked-table/stacked-table.test.js +14 -23
  32. package/build/cjs/stacked-table/table.js +11 -14
  33. package/build/cjs/table/table-body.js +10 -13
  34. package/build/cjs/table/table-cell-head.js +19 -22
  35. package/build/cjs/table/table-cell.js +19 -22
  36. package/build/cjs/table/table-foot.js +10 -13
  37. package/build/cjs/table/table-head.js +10 -13
  38. package/build/cjs/table/table-row-head.js +12 -15
  39. package/build/cjs/table/table-row.js +9 -11
  40. package/build/cjs/table/table.js +16 -19
  41. package/build/es/data-table/data-table-cell.js +24 -25
  42. package/build/es/data-table/data-table-column-header/data-table-column-header.js +57 -60
  43. package/build/es/data-table/data-table-column-header/filter-handle.js +5 -6
  44. package/build/es/data-table/data-table-column-header/sorter.js +6 -7
  45. package/build/es/data-table/data-table-row/data-table-row.js +12 -13
  46. package/build/es/data-table/data-table-row/expand-handle-cell.js +12 -15
  47. package/build/es/data-table/data-table-row/expanded-row.js +19 -22
  48. package/build/es/data-table/data-table.js +10 -11
  49. package/build/es/data-table/data-table.prod.stories.js +127 -144
  50. package/build/es/data-table/table-elements/table-body.js +18 -21
  51. package/build/es/data-table/table-elements/table-data-cell/table-data-cell.js +22 -23
  52. package/build/es/data-table/table-elements/table-foot.js +12 -15
  53. package/build/es/data-table/table-elements/table-head.js +12 -15
  54. package/build/es/data-table/table-elements/table-header-cell/table-header-cell.js +41 -44
  55. package/build/es/data-table/table-elements/table-header-cell-action.js +17 -20
  56. package/build/es/data-table/table-elements/table-row.js +18 -21
  57. package/build/es/data-table/table-elements/table-scroll-box.js +15 -18
  58. package/build/es/data-table/table-elements/table-toolbar.js +14 -17
  59. package/build/es/data-table/table-elements/table.js +20 -23
  60. package/build/es/data-table/table-elements/table.stories.internal.js +110 -118
  61. package/build/es/locales/index.js +34 -15
  62. package/build/es/stacked-table/content-with-title.js +11 -14
  63. package/build/es/stacked-table/stacked-table-body.js +10 -13
  64. package/build/es/stacked-table/stacked-table-cell-head.js +17 -20
  65. package/build/es/stacked-table/stacked-table-cell.js +11 -12
  66. package/build/es/stacked-table/stacked-table-foot.js +10 -13
  67. package/build/es/stacked-table/stacked-table-head.js +10 -13
  68. package/build/es/stacked-table/stacked-table-row-head.js +8 -11
  69. package/build/es/stacked-table/stacked-table-row.js +13 -19
  70. package/build/es/stacked-table/stacked-table.js +6 -7
  71. package/build/es/stacked-table/stacked-table.test.js +14 -23
  72. package/build/es/stacked-table/table.js +11 -14
  73. package/build/es/table/table-body.js +10 -13
  74. package/build/es/table/table-cell-head.js +19 -22
  75. package/build/es/table/table-cell.js +19 -22
  76. package/build/es/table/table-foot.js +10 -13
  77. package/build/es/table/table-head.js +10 -13
  78. package/build/es/table/table-row-head.js +12 -15
  79. package/build/es/table/table-row.js +8 -9
  80. package/build/es/table/table.js +16 -19
  81. package/package.json +3 -3
  82. package/src/locales/index.js +48 -15
@@ -4,27 +4,24 @@ import { colors } from '@dhis2/ui-constants';
4
4
  import cx from 'classnames';
5
5
  import PropTypes from 'prop-types';
6
6
  import React, { forwardRef } from 'react';
7
- export const TableBody = /*#__PURE__*/forwardRef((_ref, ref) => {
8
- let {
9
- children,
10
- className,
11
- dataTest = 'dhis2-uicore-tablebody',
12
- role,
13
- loading,
14
- ...props
15
- } = _ref;
16
- return /*#__PURE__*/React.createElement("tbody", _extends({}, props, {
17
- "data-test": dataTest,
18
- ref: ref,
19
- role: role,
20
- className: _JSXStyle.dynamic([["2478922139", [colors.blue600]]]) + " " + (cx(className, {
21
- loading
22
- }) || "")
23
- }), children, /*#__PURE__*/React.createElement(_JSXStyle, {
24
- id: "2478922139",
25
- dynamic: [colors.blue600]
26
- }, ["tbody.__jsx-style-dynamic-selector{position:relative;}", ".loading.__jsx-style-dynamic-selector:before{content:'';position:absolute;top:0;bottom:0;inset-inline-start:0;inset-inline-end:0;background-color:rgba(255,255,255,0.8);}", `.loading.__jsx-style-dynamic-selector:after{content:'';position:absolute;top:calc(50% - 24px);inset-inline-start:calc(50% - 24px);width:48px;height:48px;border:6px solid rgba(110,122,138,0.15);border-bottom-color:${colors.blue600};border-radius:50%;-webkit-animation:rotation-__jsx-style-dynamic-selector 1s linear infinite;animation:rotation-__jsx-style-dynamic-selector 1s linear infinite;}`, "@-webkit-keyframes rotation-__jsx-style-dynamic-selector{0%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}100%{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}", "@keyframes rotation-__jsx-style-dynamic-selector{0%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}100%{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}"]));
27
- });
7
+ export const TableBody = /*#__PURE__*/forwardRef(({
8
+ children,
9
+ className,
10
+ dataTest = 'dhis2-uicore-tablebody',
11
+ role,
12
+ loading,
13
+ ...props
14
+ }, ref) => /*#__PURE__*/React.createElement("tbody", _extends({}, props, {
15
+ "data-test": dataTest,
16
+ ref: ref,
17
+ role: role,
18
+ className: _JSXStyle.dynamic([["2478922139", [colors.blue600]]]) + " " + (cx(className, {
19
+ loading
20
+ }) || "")
21
+ }), children, /*#__PURE__*/React.createElement(_JSXStyle, {
22
+ id: "2478922139",
23
+ dynamic: [colors.blue600]
24
+ }, ["tbody.__jsx-style-dynamic-selector{position:relative;}", ".loading.__jsx-style-dynamic-selector:before{content:'';position:absolute;top:0;bottom:0;inset-inline-start:0;inset-inline-end:0;background-color:rgba(255,255,255,0.8);}", `.loading.__jsx-style-dynamic-selector:after{content:'';position:absolute;top:calc(50% - 24px);inset-inline-start:calc(50% - 24px);width:48px;height:48px;border:6px solid rgba(110,122,138,0.15);border-bottom-color:${colors.blue600};border-radius:50%;-webkit-animation:rotation-__jsx-style-dynamic-selector 1s linear infinite;animation:rotation-__jsx-style-dynamic-selector 1s linear infinite;}`, "@-webkit-keyframes rotation-__jsx-style-dynamic-selector{0%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}100%{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}", "@keyframes rotation-__jsx-style-dynamic-selector{0%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}100%{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}"])));
28
25
  TableBody.displayName = 'TableBody';
29
26
  TableBody.propTypes = {
30
27
  /** Should be `<TableRow>` components */
@@ -11,30 +11,29 @@ const rtlCorrespondingAlignments = {
11
11
  right: 'left',
12
12
  center: 'center'
13
13
  };
14
- export const TableDataCell = /*#__PURE__*/forwardRef((_ref, ref) => {
14
+ export const TableDataCell = /*#__PURE__*/forwardRef(({
15
+ active,
16
+ align = 'left',
17
+ backgroundColor,
18
+ bordered,
19
+ children,
20
+ className,
21
+ colSpan,
22
+ dataTest = 'dhis2-uicore-tabledatacel',
23
+ error,
24
+ large,
25
+ left = 'auto',
26
+ muted,
27
+ role,
28
+ rowSpan,
29
+ scope,
30
+ staticStyle,
31
+ valid,
32
+ width = 'auto',
33
+ onClick,
34
+ ...props
35
+ }, ref) => {
15
36
  var _rtlCorrespondingAlig;
16
- let {
17
- active,
18
- align = 'left',
19
- backgroundColor,
20
- bordered,
21
- children,
22
- className,
23
- colSpan,
24
- dataTest = 'dhis2-uicore-tabledatacel',
25
- error,
26
- large,
27
- left = 'auto',
28
- muted,
29
- role,
30
- rowSpan,
31
- scope,
32
- staticStyle,
33
- valid,
34
- width = 'auto',
35
- onClick,
36
- ...props
37
- } = _ref;
38
37
  const rtlAlign = (_rtlCorrespondingAlig = rtlCorrespondingAlignments[align]) !== null && _rtlCorrespondingAlig !== void 0 ? _rtlCorrespondingAlig : align;
39
38
  return /*#__PURE__*/React.createElement("td", _extends({}, props, {
40
39
  ref: ref,
@@ -1,21 +1,18 @@
1
1
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import PropTypes from 'prop-types';
3
3
  import React, { forwardRef } from 'react';
4
- export const TableFoot = /*#__PURE__*/forwardRef((_ref, ref) => {
5
- let {
6
- children,
7
- className,
8
- dataTest = 'dhis2-uicore-tablefoot',
9
- role,
10
- ...props
11
- } = _ref;
12
- return /*#__PURE__*/React.createElement("tfoot", _extends({}, props, {
13
- className: className,
14
- "data-test": dataTest,
15
- ref: ref,
16
- role: role
17
- }), children);
18
- });
4
+ export const TableFoot = /*#__PURE__*/forwardRef(({
5
+ children,
6
+ className,
7
+ dataTest = 'dhis2-uicore-tablefoot',
8
+ role,
9
+ ...props
10
+ }, ref) => /*#__PURE__*/React.createElement("tfoot", _extends({}, props, {
11
+ className: className,
12
+ "data-test": dataTest,
13
+ ref: ref,
14
+ role: role
15
+ }), children));
19
16
  TableFoot.displayName = 'TableFoot';
20
17
  TableFoot.propTypes = {
21
18
  /** Should be `<TableRow>` components */
@@ -1,21 +1,18 @@
1
1
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import PropTypes from 'prop-types';
3
3
  import React, { forwardRef } from 'react';
4
- export const TableHead = /*#__PURE__*/forwardRef((_ref, ref) => {
5
- let {
6
- children,
7
- className,
8
- dataTest,
9
- role,
10
- ...props
11
- } = _ref;
12
- return /*#__PURE__*/React.createElement("thead", _extends({}, props, {
13
- className: className,
14
- "data-test": dataTest,
15
- ref: ref,
16
- role: role
17
- }), children);
18
- });
4
+ export const TableHead = /*#__PURE__*/forwardRef(({
5
+ children,
6
+ className,
7
+ dataTest,
8
+ role,
9
+ ...props
10
+ }, ref) => /*#__PURE__*/React.createElement("thead", _extends({}, props, {
11
+ className: className,
12
+ "data-test": dataTest,
13
+ ref: ref,
14
+ role: role
15
+ }), children));
19
16
  TableHead.displayName = 'TableHead';
20
17
  TableHead.propTypes = {
21
18
  /** Should be `<TableRowHead>` components */
@@ -7,57 +7,54 @@ import PropTypes from 'prop-types';
7
7
  import React, { forwardRef } from 'react';
8
8
  import styles from './table-header-cell.styles.js';
9
9
  const AUTO = 'auto';
10
- export const TableHeaderCell = /*#__PURE__*/forwardRef((_ref, ref) => {
11
- let {
10
+ export const TableHeaderCell = /*#__PURE__*/forwardRef(({
11
+ active,
12
+ align = 'left',
13
+ backgroundColor,
14
+ bordered,
15
+ children,
16
+ className,
17
+ colSpan,
18
+ dataTest = 'dhis2-uicore-tablecell',
19
+ error,
20
+ fixed,
21
+ large,
22
+ left = AUTO,
23
+ muted,
24
+ rowSpan,
25
+ role,
26
+ scope,
27
+ staticStyle,
28
+ top = AUTO,
29
+ valid,
30
+ width = AUTO,
31
+ onClick,
32
+ ...props
33
+ }, ref) => /*#__PURE__*/React.createElement("th", _extends({}, props, {
34
+ ref: ref,
35
+ colSpan: colSpan,
36
+ rowSpan: rowSpan,
37
+ onClick: onClick,
38
+ "data-test": dataTest,
39
+ role: role,
40
+ scope: scope,
41
+ className: `jsx-${styles.__hash}` + " " + _JSXStyle.dynamic([["2588011372", [left, top, align, width, backgroundColor || colors.grey200, backgroundColor || colors.grey300, backgroundColor || colors.grey300, backgroundColor || colors.grey200]]]) + " " + (cx(className, {
12
42
  active,
13
- align = 'left',
14
- backgroundColor,
15
43
  bordered,
16
- children,
17
- className,
18
- colSpan,
19
- dataTest = 'dhis2-uicore-tablecell',
20
44
  error,
21
45
  fixed,
46
+ fixedHorizontally: fixed && left !== AUTO,
22
47
  large,
23
- left = AUTO,
24
48
  muted,
25
- rowSpan,
26
- role,
27
- scope,
28
49
  staticStyle,
29
- top = AUTO,
30
- valid,
31
- width = AUTO,
32
- onClick,
33
- ...props
34
- } = _ref;
35
- return /*#__PURE__*/React.createElement("th", _extends({}, props, {
36
- ref: ref,
37
- colSpan: colSpan,
38
- rowSpan: rowSpan,
39
- onClick: onClick,
40
- "data-test": dataTest,
41
- role: role,
42
- scope: scope,
43
- className: `jsx-${styles.__hash}` + " " + _JSXStyle.dynamic([["2588011372", [left, top, align, width, backgroundColor || colors.grey200, backgroundColor || colors.grey300, backgroundColor || colors.grey300, backgroundColor || colors.grey200]]]) + " " + (cx(className, {
44
- active,
45
- bordered,
46
- error,
47
- fixed,
48
- fixedHorizontally: fixed && left !== AUTO,
49
- large,
50
- muted,
51
- staticStyle,
52
- valid
53
- }) || "")
54
- }), children, /*#__PURE__*/React.createElement(_JSXStyle, {
55
- id: styles.__hash
56
- }, styles), /*#__PURE__*/React.createElement(_JSXStyle, {
57
- id: "2588011372",
58
- dynamic: [left, top, align, width, backgroundColor || colors.grey200, backgroundColor || colors.grey300, backgroundColor || colors.grey300, backgroundColor || colors.grey200]
59
- }, [`th.__jsx-style-dynamic-selector{inset-inline-start:${left};top:${top};text-align:${align};width:${width};background-color:${backgroundColor || colors.grey200};}`, `thead th.fixedHorizontally.__jsx-style-dynamic-selector{background-color:${backgroundColor || colors.grey300};}`, `tbody>tr:hover>th.__jsx-style-dynamic-selector:not(.staticStyle),tfoot>tr:hover>th.__jsx-style-dynamic-selector:not(.staticStyle){background-color:${backgroundColor || colors.grey300};}`, `tbody>tr:active>th.__jsx-style-dynamic-selector:not(.staticStyle){background-color:${backgroundColor || colors.grey200};}`]));
60
- });
50
+ valid
51
+ }) || "")
52
+ }), children, /*#__PURE__*/React.createElement(_JSXStyle, {
53
+ id: styles.__hash
54
+ }, styles), /*#__PURE__*/React.createElement(_JSXStyle, {
55
+ id: "2588011372",
56
+ dynamic: [left, top, align, width, backgroundColor || colors.grey200, backgroundColor || colors.grey300, backgroundColor || colors.grey300, backgroundColor || colors.grey200]
57
+ }, [`th.__jsx-style-dynamic-selector{inset-inline-start:${left};top:${top};text-align:${align};width:${width};background-color:${backgroundColor || colors.grey200};}`, `thead th.fixedHorizontally.__jsx-style-dynamic-selector{background-color:${backgroundColor || colors.grey300};}`, `tbody>tr:hover>th.__jsx-style-dynamic-selector:not(.staticStyle),tfoot>tr:hover>th.__jsx-style-dynamic-selector:not(.staticStyle){background-color:${backgroundColor || colors.grey300};}`, `tbody>tr:active>th.__jsx-style-dynamic-selector:not(.staticStyle){background-color:${backgroundColor || colors.grey200};}`])));
61
58
  TableHeaderCell.displayName = 'TableHeaderCell';
62
59
  const stylePropType = mutuallyExclusive(['valid', 'error', 'muted'], PropTypes.bool);
63
60
  TableHeaderCell.propTypes = {
@@ -3,26 +3,23 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
3
3
  import { colors } from '@dhis2/ui-constants';
4
4
  import PropTypes from 'prop-types';
5
5
  import React, { forwardRef } from 'react';
6
- export const TableHeaderCellAction = /*#__PURE__*/forwardRef((_ref, ref) => {
7
- let {
8
- onClick,
9
- children,
10
- className,
11
- dataTest = 'dhis2-uicore-tableheadercellaction',
12
- title,
13
- ...props
14
- } = _ref;
15
- return /*#__PURE__*/React.createElement("button", _extends({}, props, {
16
- "data-test": dataTest,
17
- onClick: onClick,
18
- title: title,
19
- ref: ref,
20
- className: _JSXStyle.dynamic([["4225768774", [colors.grey400]]]) + " " + (className || "")
21
- }), children, /*#__PURE__*/React.createElement(_JSXStyle, {
22
- id: "4225768774",
23
- dynamic: [colors.grey400]
24
- }, ["button.__jsx-style-dynamic-selector{border:none;padding:0;background:transparent;width:24px;height:24px;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;cursor:pointer;border-radius:4px;margin-inline-start:2px;}", `button.__jsx-style-dynamic-selector:hover,button.__jsx-style-dynamic-selector:focus-visible{background:${colors.grey400};}`, "button.__jsx-style-dynamic-selector:active,button.__jsx-style-dynamic-selector:focus{outline:none;}"]));
25
- });
6
+ export const TableHeaderCellAction = /*#__PURE__*/forwardRef(({
7
+ onClick,
8
+ children,
9
+ className,
10
+ dataTest = 'dhis2-uicore-tableheadercellaction',
11
+ title,
12
+ ...props
13
+ }, ref) => /*#__PURE__*/React.createElement("button", _extends({}, props, {
14
+ "data-test": dataTest,
15
+ onClick: onClick,
16
+ title: title,
17
+ ref: ref,
18
+ className: _JSXStyle.dynamic([["4225768774", [colors.grey400]]]) + " " + (className || "")
19
+ }), children, /*#__PURE__*/React.createElement(_JSXStyle, {
20
+ id: "4225768774",
21
+ dynamic: [colors.grey400]
22
+ }, ["button.__jsx-style-dynamic-selector{border:none;padding:0;background:transparent;width:24px;height:24px;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;cursor:pointer;border-radius:4px;margin-inline-start:2px;}", `button.__jsx-style-dynamic-selector:hover,button.__jsx-style-dynamic-selector:focus-visible{background:${colors.grey400};}`, "button.__jsx-style-dynamic-selector:active,button.__jsx-style-dynamic-selector:focus{outline:none;}"])));
26
23
  TableHeaderCellAction.displayName = 'TableHeaderCellAction';
27
24
  TableHeaderCellAction.propTypes = {
28
25
  children: PropTypes.node,
@@ -3,28 +3,25 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
3
3
  import cx from 'classnames';
4
4
  import PropTypes from 'prop-types';
5
5
  import React, { forwardRef } from 'react';
6
- export const TableRow = /*#__PURE__*/forwardRef((_ref, ref) => {
7
- let {
8
- children,
9
- className,
10
- dataTest = 'dhis2-uicore-tablerow',
11
- draggable,
12
- role,
6
+ export const TableRow = /*#__PURE__*/forwardRef(({
7
+ children,
8
+ className,
9
+ dataTest = 'dhis2-uicore-tablerow',
10
+ draggable,
11
+ role,
12
+ selected,
13
+ ...props
14
+ }, ref) => /*#__PURE__*/React.createElement("tr", _extends({}, props, {
15
+ ref: ref,
16
+ "data-test": dataTest,
17
+ role: role,
18
+ className: "jsx-1820444258" + " " + (cx(className, {
13
19
  selected,
14
- ...props
15
- } = _ref;
16
- return /*#__PURE__*/React.createElement("tr", _extends({}, props, {
17
- ref: ref,
18
- "data-test": dataTest,
19
- role: role,
20
- className: "jsx-1820444258" + " " + (cx(className, {
21
- selected,
22
- draggable
23
- }) || "")
24
- }), children, /*#__PURE__*/React.createElement(_JSXStyle, {
25
- id: "1820444258"
26
- }, ["tbody>tr.draggable.jsx-1820444258,tfoot>tr.draggable.jsx-1820444258{cursor:move;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}"]));
27
- });
20
+ draggable
21
+ }) || "")
22
+ }), children, /*#__PURE__*/React.createElement(_JSXStyle, {
23
+ id: "1820444258"
24
+ }, ["tbody>tr.draggable.jsx-1820444258,tfoot>tr.draggable.jsx-1820444258{cursor:move;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}"])));
28
25
  TableRow.displayName = 'TableRow';
29
26
  TableRow.propTypes = {
30
27
  /** Should be `<TableDataCell>` or `<TableDataCellHead>` components */
@@ -3,24 +3,21 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
3
3
  import { colors } from '@dhis2/ui-constants';
4
4
  import PropTypes from 'prop-types';
5
5
  import React, { forwardRef } from 'react';
6
- export const TableScrollBox = /*#__PURE__*/forwardRef((_ref, ref) => {
7
- let {
8
- children,
9
- className,
10
- dataTest = 'dhis2-uicore-tablescrollbox',
11
- maxHeight = 'auto',
12
- maxWidth = 'auto',
13
- ...props
14
- } = _ref;
15
- return /*#__PURE__*/React.createElement("div", _extends({}, props, {
16
- "data-test": dataTest,
17
- ref: ref,
18
- className: _JSXStyle.dynamic([["2859562182", [colors.grey300, maxHeight, maxWidth]]]) + " " + (className || "")
19
- }), children, /*#__PURE__*/React.createElement(_JSXStyle, {
20
- id: "2859562182",
21
- dynamic: [colors.grey300, maxHeight, maxWidth]
22
- }, [`div.__jsx-style-dynamic-selector{border:1px solid ${colors.grey300};border-top:none;box-sizing:border-box;max-height:${maxHeight};max-width:${maxWidth};overflow:auto;}`]));
23
- });
6
+ export const TableScrollBox = /*#__PURE__*/forwardRef(({
7
+ children,
8
+ className,
9
+ dataTest = 'dhis2-uicore-tablescrollbox',
10
+ maxHeight = 'auto',
11
+ maxWidth = 'auto',
12
+ ...props
13
+ }, ref) => /*#__PURE__*/React.createElement("div", _extends({}, props, {
14
+ "data-test": dataTest,
15
+ ref: ref,
16
+ className: _JSXStyle.dynamic([["2859562182", [colors.grey300, maxHeight, maxWidth]]]) + " " + (className || "")
17
+ }), children, /*#__PURE__*/React.createElement(_JSXStyle, {
18
+ id: "2859562182",
19
+ dynamic: [colors.grey300, maxHeight, maxWidth]
20
+ }, [`div.__jsx-style-dynamic-selector{border:1px solid ${colors.grey300};border-top:none;box-sizing:border-box;max-height:${maxHeight};max-width:${maxWidth};overflow:auto;}`])));
24
21
  TableScrollBox.displayName = 'TableScrollBox';
25
22
  TableScrollBox.propTypes = {
26
23
  children: PropTypes.node,
@@ -4,23 +4,20 @@ import { colors, spacers } from '@dhis2/ui-constants';
4
4
  import cx from 'classnames';
5
5
  import PropTypes from 'prop-types';
6
6
  import React, { forwardRef } from 'react';
7
- export const TableToolbar = /*#__PURE__*/forwardRef((_ref, ref) => {
8
- let {
9
- children,
10
- className,
11
- dataTest = 'dhis2-uicore-tabletoolbar',
12
- position = 'top',
13
- ...props
14
- } = _ref;
15
- return /*#__PURE__*/React.createElement("div", _extends({}, props, {
16
- "data-test": dataTest,
17
- ref: ref,
18
- className: _JSXStyle.dynamic([["247244135", [colors.grey300, spacers.dp12]]]) + " " + (cx(className, position) || "")
19
- }), children, /*#__PURE__*/React.createElement(_JSXStyle, {
20
- id: "247244135",
21
- dynamic: [colors.grey300, spacers.dp12]
22
- }, [`div.__jsx-style-dynamic-selector{width:100%;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;border:1px solid ${colors.grey300};padding:${spacers.dp12};}`, "div.top.__jsx-style-dynamic-selector{border-bottom:none;}", "div.bottom.__jsx-style-dynamic-selector{border-top:none;}"]));
23
- });
7
+ export const TableToolbar = /*#__PURE__*/forwardRef(({
8
+ children,
9
+ className,
10
+ dataTest = 'dhis2-uicore-tabletoolbar',
11
+ position = 'top',
12
+ ...props
13
+ }, ref) => /*#__PURE__*/React.createElement("div", _extends({}, props, {
14
+ "data-test": dataTest,
15
+ ref: ref,
16
+ className: _JSXStyle.dynamic([["247244135", [colors.grey300, spacers.dp12]]]) + " " + (cx(className, position) || "")
17
+ }), children, /*#__PURE__*/React.createElement(_JSXStyle, {
18
+ id: "247244135",
19
+ dynamic: [colors.grey300, spacers.dp12]
20
+ }, [`div.__jsx-style-dynamic-selector{width:100%;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;border:1px solid ${colors.grey300};padding:${spacers.dp12};}`, "div.top.__jsx-style-dynamic-selector{border-bottom:none;}", "div.bottom.__jsx-style-dynamic-selector{border-top:none;}"])));
24
21
  TableToolbar.displayName = 'TableToolbar';
25
22
  TableToolbar.propTypes = {
26
23
  children: PropTypes.node,
@@ -4,29 +4,26 @@ import { colors } from '@dhis2/ui-constants';
4
4
  import cx from 'classnames';
5
5
  import PropTypes from 'prop-types';
6
6
  import React, { forwardRef } from 'react';
7
- export const Table = /*#__PURE__*/forwardRef((_ref, ref) => {
8
- let {
9
- children,
10
- className,
11
- dataTest = 'dhis2-uicore-table',
12
- layout = 'auto',
13
- role,
14
- borderless,
15
- width = '100%',
16
- ...props
17
- } = _ref;
18
- return /*#__PURE__*/React.createElement("table", _extends({}, props, {
19
- "data-test": dataTest,
20
- ref: ref,
21
- role: role,
22
- className: _JSXStyle.dynamic([["3140496910", [layout, width, colors.grey300]]]) + " " + (cx(className, {
23
- borderless
24
- }) || "")
25
- }), children, /*#__PURE__*/React.createElement(_JSXStyle, {
26
- id: "3140496910",
27
- dynamic: [layout, width, colors.grey300]
28
- }, [`table.__jsx-style-dynamic-selector{table-layout:${layout};border-collapse:separate;border-spacing:0;width:${width};box-sizing:border-box;border:1px solid ${colors.grey300};}`, "table.borderless.__jsx-style-dynamic-selector{border:none;}"]));
29
- });
7
+ export const Table = /*#__PURE__*/forwardRef(({
8
+ children,
9
+ className,
10
+ dataTest = 'dhis2-uicore-table',
11
+ layout = 'auto',
12
+ role,
13
+ borderless,
14
+ width = '100%',
15
+ ...props
16
+ }, ref) => /*#__PURE__*/React.createElement("table", _extends({}, props, {
17
+ "data-test": dataTest,
18
+ ref: ref,
19
+ role: role,
20
+ className: _JSXStyle.dynamic([["3140496910", [layout, width, colors.grey300]]]) + " " + (cx(className, {
21
+ borderless
22
+ }) || "")
23
+ }), children, /*#__PURE__*/React.createElement(_JSXStyle, {
24
+ id: "3140496910",
25
+ dynamic: [layout, width, colors.grey300]
26
+ }, [`table.__jsx-style-dynamic-selector{table-layout:${layout};border-collapse:separate;border-spacing:0;width:${width};box-sizing:border-box;border:1px solid ${colors.grey300};}`, "table.borderless.__jsx-style-dynamic-selector{border:none;}"])));
30
27
  Table.displayName = 'Table';
31
28
  Table.propTypes = {
32
29
  /**