@hitachivantara/uikit-react-lab 3.45.12 → 3.47.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/QueryBuilder/Context.js +4 -1
  2. package/dist/QueryBuilder/Context.js.map +1 -1
  3. package/dist/QueryBuilder/Rule/Value/Value.js +1 -5
  4. package/dist/QueryBuilder/Rule/Value/Value.js.map +1 -1
  5. package/dist/QueryBuilder/index.d.ts +1 -0
  6. package/dist/QueryBuilder/index.js +20 -0
  7. package/dist/QueryBuilder/index.js.map +1 -1
  8. package/dist/Table/Table.d.ts +5 -1
  9. package/dist/Table/Table.js +20 -5
  10. package/dist/Table/Table.js.map +1 -1
  11. package/dist/Table/TableBody/TableBody.js +33 -5
  12. package/dist/Table/TableBody/TableBody.js.map +1 -1
  13. package/dist/Table/TableBody/styles.js.map +1 -1
  14. package/dist/Table/TableCell/TableCell.d.ts +3 -1
  15. package/dist/Table/TableCell/TableCell.js +22 -2
  16. package/dist/Table/TableCell/TableCell.js.map +1 -1
  17. package/dist/Table/TableCell/styles.js +28 -0
  18. package/dist/Table/TableCell/styles.js.map +1 -1
  19. package/dist/Table/TableHeader/TableHeader.d.ts +1 -0
  20. package/dist/Table/TableHeader/TableHeader.js +6 -1
  21. package/dist/Table/TableHeader/TableHeader.js.map +1 -1
  22. package/dist/Table/TableHeader/styles.js +9 -0
  23. package/dist/Table/TableHeader/styles.js.map +1 -1
  24. package/dist/Table/TableRow/TableRow.d.ts +3 -1
  25. package/dist/Table/TableRow/TableRow.js +16 -2
  26. package/dist/Table/TableRow/TableRow.js.map +1 -1
  27. package/dist/Table/TableRow/styles.js +28 -3
  28. package/dist/Table/TableRow/styles.js.map +1 -1
  29. package/dist/Table/styles.js +5 -0
  30. package/dist/Table/styles.js.map +1 -1
  31. package/dist/index.js +13 -1
  32. package/dist/index.js.map +1 -1
  33. package/dist/legacy/QueryBuilder/Context.js +3 -3
  34. package/dist/legacy/QueryBuilder/Context.js.map +1 -1
  35. package/dist/legacy/QueryBuilder/Rule/Value/Value.js +1 -5
  36. package/dist/legacy/QueryBuilder/Rule/Value/Value.js.map +1 -1
  37. package/dist/legacy/QueryBuilder/index.d.ts +1 -0
  38. package/dist/legacy/QueryBuilder/index.js +1 -0
  39. package/dist/legacy/QueryBuilder/index.js.map +1 -1
  40. package/dist/legacy/Table/Table.d.ts +5 -1
  41. package/dist/legacy/Table/Table.js +21 -6
  42. package/dist/legacy/Table/Table.js.map +1 -1
  43. package/dist/legacy/Table/TableBody/TableBody.js +31 -6
  44. package/dist/legacy/Table/TableBody/TableBody.js.map +1 -1
  45. package/dist/legacy/Table/TableBody/styles.js.map +1 -1
  46. package/dist/legacy/Table/TableCell/TableCell.d.ts +3 -1
  47. package/dist/legacy/Table/TableCell/TableCell.js +22 -2
  48. package/dist/legacy/Table/TableCell/TableCell.js.map +1 -1
  49. package/dist/legacy/Table/TableCell/styles.js +28 -0
  50. package/dist/legacy/Table/TableCell/styles.js.map +1 -1
  51. package/dist/legacy/Table/TableHeader/TableHeader.d.ts +1 -0
  52. package/dist/legacy/Table/TableHeader/TableHeader.js +6 -1
  53. package/dist/legacy/Table/TableHeader/TableHeader.js.map +1 -1
  54. package/dist/legacy/Table/TableHeader/styles.js +9 -0
  55. package/dist/legacy/Table/TableHeader/styles.js.map +1 -1
  56. package/dist/legacy/Table/TableRow/TableRow.d.ts +3 -1
  57. package/dist/legacy/Table/TableRow/TableRow.js +16 -2
  58. package/dist/legacy/Table/TableRow/TableRow.js.map +1 -1
  59. package/dist/legacy/Table/TableRow/styles.js +27 -3
  60. package/dist/legacy/Table/TableRow/styles.js.map +1 -1
  61. package/dist/legacy/Table/styles.js +5 -0
  62. package/dist/legacy/Table/styles.js.map +1 -1
  63. package/dist/legacy/index.js +1 -0
  64. package/dist/legacy/index.js.map +1 -1
  65. package/dist/modern/QueryBuilder/Context.js +3 -3
  66. package/dist/modern/QueryBuilder/Context.js.map +1 -1
  67. package/dist/modern/QueryBuilder/Rule/Value/Value.js +1 -5
  68. package/dist/modern/QueryBuilder/Rule/Value/Value.js.map +1 -1
  69. package/dist/modern/QueryBuilder/index.d.ts +1 -0
  70. package/dist/modern/QueryBuilder/index.js +1 -0
  71. package/dist/modern/QueryBuilder/index.js.map +1 -1
  72. package/dist/modern/Table/Table.d.ts +5 -1
  73. package/dist/modern/Table/Table.js +21 -7
  74. package/dist/modern/Table/Table.js.map +1 -1
  75. package/dist/modern/Table/TableBody/TableBody.js +30 -7
  76. package/dist/modern/Table/TableBody/TableBody.js.map +1 -1
  77. package/dist/modern/Table/TableBody/styles.js.map +1 -1
  78. package/dist/modern/Table/TableCell/TableCell.d.ts +3 -1
  79. package/dist/modern/Table/TableCell/TableCell.js +22 -2
  80. package/dist/modern/Table/TableCell/TableCell.js.map +1 -1
  81. package/dist/modern/Table/TableCell/styles.js +28 -0
  82. package/dist/modern/Table/TableCell/styles.js.map +1 -1
  83. package/dist/modern/Table/TableHeader/TableHeader.d.ts +1 -0
  84. package/dist/modern/Table/TableHeader/TableHeader.js +6 -1
  85. package/dist/modern/Table/TableHeader/TableHeader.js.map +1 -1
  86. package/dist/modern/Table/TableHeader/styles.js +9 -0
  87. package/dist/modern/Table/TableHeader/styles.js.map +1 -1
  88. package/dist/modern/Table/TableRow/TableRow.d.ts +3 -1
  89. package/dist/modern/Table/TableRow/TableRow.js +16 -2
  90. package/dist/modern/Table/TableRow/TableRow.js.map +1 -1
  91. package/dist/modern/Table/TableRow/styles.js +26 -3
  92. package/dist/modern/Table/TableRow/styles.js.map +1 -1
  93. package/dist/modern/Table/styles.js +5 -0
  94. package/dist/modern/Table/styles.js.map +1 -1
  95. package/dist/modern/index.js +1 -0
  96. package/dist/modern/index.js.map +1 -1
  97. package/package.json +3 -3
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- const _excluded = ["classes", "className", "component", "stickyHeader", "stickyColumns"];
4
- import React, { forwardRef, useMemo } from "react";
3
+ const _excluded = ["classes", "className", "component", "stickyHeader", "stickyColumns", "variant"];
4
+ import React, { useRef, forwardRef, useMemo } from "react";
5
5
  import PropTypes from "prop-types";
6
6
  import clsx from "clsx";
7
7
  import { withStyles } from "@material-ui/core";
@@ -51,20 +51,24 @@ const HvTable = /*#__PURE__*/forwardRef(function HvTable(props, ref) {
51
51
  className,
52
52
  component = defaultComponent,
53
53
  stickyHeader = false,
54
- stickyColumns = false
54
+ stickyColumns = false,
55
+ variant = "default"
55
56
  } = props,
56
57
  others = _objectWithoutProperties(props, _excluded);
57
58
 
59
+ const containerRef = useRef(ref);
58
60
  const components = useMemo(() => computeTablePartComponents(component), [component]);
59
61
  const tableContext = useMemo(() => ({
60
- components
61
- }), [components]);
62
+ components,
63
+ variant,
64
+ containerRef
65
+ }), [components, variant, containerRef]);
62
66
  return /*#__PURE__*/React.createElement(TableContext.Provider, {
63
67
  value: tableContext
64
68
  }, /*#__PURE__*/React.createElement(components.Table, _extends({
65
69
  ref: ref,
66
70
  role: component === defaultComponent ? null : "table",
67
- className: clsx(classes.root, className, stickyHeader && classes.stickyHeader, stickyColumns && classes.stickyColumns)
71
+ className: clsx(classes.root, className, stickyHeader && classes.stickyHeader, stickyColumns && classes.stickyColumns, variant !== "default" && classes.listRow)
68
72
  }, others)));
69
73
  });
70
74
  process.env.NODE_ENV !== "production" ? HvTable.propTypes = {
@@ -96,6 +100,11 @@ process.env.NODE_ENV !== "production" ? HvTable.propTypes = {
96
100
  */
97
101
  stickyColumns: PropTypes.bool,
98
102
 
103
+ /**
104
+ * Whether the `HvTable` has the list row styles or the default.
105
+ */
106
+ variant: PropTypes.oneOf(["listrow", "default"]),
107
+
99
108
  /**
100
109
  * A Jss Object used to override or extend the styles applied.
101
110
  */
@@ -113,7 +122,12 @@ process.env.NODE_ENV !== "production" ? HvTable.propTypes = {
113
122
  /**
114
123
  * Styles applied to the component root class when it has sticky columns.
115
124
  */
116
- stickyColumns: PropTypes.string
125
+ stickyColumns: PropTypes.string,
126
+
127
+ /**
128
+ * Styles applied to the component root class when it has sticky columns.
129
+ */
130
+ listRow: PropTypes.string
117
131
  }).isRequired
118
132
  } : void 0;
119
133
  export default withStyles(styles, {
@@ -1 +1 @@
1
- {"version":3,"file":"Table.js","names":["React","forwardRef","useMemo","PropTypes","clsx","withStyles","TableContext","styles","defaultComponent","computeTablePartComponents","rootComponent","Table","THead","TBody","Tr","Th","Td","HvTable","props","ref","classes","className","component","stickyHeader","stickyColumns","others","components","tableContext","root","propTypes","elementType","children","node","isRequired","string","bool","shape","name"],"sources":["../../../src/Table/Table.js"],"sourcesContent":["import React, { forwardRef, useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { withStyles } from \"@material-ui/core\";\n\nimport TableContext from \"./TableContext\";\nimport styles from \"./styles\";\n\nconst defaultComponent = \"table\";\n\nconst computeTablePartComponents = (rootComponent) => {\n if (rootComponent === \"table\") {\n return {\n Table: \"table\",\n THead: \"thead\",\n TBody: \"tbody\",\n Tr: \"tr\",\n Th: \"th\",\n Td: \"td\",\n };\n }\n\n return {\n Table: rootComponent,\n THead: rootComponent,\n TBody: rootComponent,\n Tr: rootComponent,\n Th: rootComponent,\n Td: rootComponent,\n };\n};\n\n/**\n * A Table gathers relational data, it displays values arranged to allow quick numerical analysis\n * like comparison and sorting.\n *\n * **HvTable** component offers a set of HTML-equivalent elements, **styled to Design System's specification**,\n * for building tables.\n * You can rely on these **elements** when your table doesn’t have many interactions or you need it to be very lightweight.\n *\n * For better data handling and **advanced features** we recommend the use of the utility hooks collection .\n * See the <a href=\"?id=lab-table-hooks--main&viewMode=docs\" target=\"_self\">Table Hooks documentation</a> for more details.\n *\n * **PLEASE NOTE**: This Table implementation is still a WIP. There might be breaking changes.\n */\nconst HvTable = forwardRef(function HvTable(props, ref) {\n const {\n classes,\n className,\n component = defaultComponent,\n stickyHeader = false,\n stickyColumns = false,\n ...others\n } = props;\n\n const components = useMemo(() => computeTablePartComponents(component), [component]);\n\n const tableContext = useMemo(() => ({ components }), [components]);\n\n return (\n <TableContext.Provider value={tableContext}>\n <components.Table\n ref={ref}\n role={component === defaultComponent ? null : \"table\"}\n className={clsx(\n classes.root,\n {\n [classes.stickyHeader]: stickyHeader,\n [classes.stickyColumns]: stickyColumns,\n },\n className\n )}\n {...others}\n />\n </TableContext.Provider>\n );\n});\n\nHvTable.propTypes = {\n /**\n * The component used for the root node. Either a string to use a HTML element or a component.\n * Defaults to `table`.\n *\n * When using non-table elements, layout is up to the developer using the component.\n */\n component: PropTypes.elementType,\n\n /**\n * Content to be rendered\n */\n children: PropTypes.node.isRequired,\n\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n\n /**\n * Whether the `HvTable` has a sticky header row.\n */\n stickyHeader: PropTypes.bool,\n /**\n * Whether the `HvTable` has sticky columns.\n */\n stickyColumns: PropTypes.bool,\n\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the component root class when it has a sticky header.\n */\n stickyHeader: PropTypes.string,\n /**\n * Styles applied to the component root class when it has sticky columns.\n */\n stickyColumns: PropTypes.string,\n }).isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvTable\" })(HvTable);\n"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,OAA5B,QAA2C,OAA3C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AAEA,SAASC,UAAT,QAA2B,mBAA3B;AAEA,OAAOC,YAAP,MAAyB,gBAAzB;AACA,OAAOC,MAAP,MAAmB,UAAnB;AAEA,MAAMC,gBAAgB,GAAG,OAAzB;;AAEA,MAAMC,0BAA0B,GAAIC,aAAD,IAAmB;EACpD,IAAIA,aAAa,KAAK,OAAtB,EAA+B;IAC7B,OAAO;M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;AAiBD,CA/ByB,CAA1B;AAiCA,wCAAAR,OAAO,CAACY,SAAR,GAAoB;EAClB;AACF;AACA;AACA;AACA;AACA;EACEP,SAAS,EAAEnB,SAAS,CAAC2B,WAPH;;EASlB;AACF;AACA;EACEC,QAAQ,EAAE5B,SAAS,CAAC6B,IAAV,CAAeC,UAZP;;EAclB;AACF;AACA;EACEZ,SAAS,EAAElB,SAAS,CAAC+B,MAjBH;;EAmBlB;AACF;AACA;EACEX,YAAY,EAAEpB,SAAS,CAACgC,IAtBN;;EAuBlB;AACF;AACA;EACEX,aAAa,EAAErB,SAAS,CAACgC,IA1BP;;EA4BlB;AACF;AACA;EACEf,OAAO,EAAEjB,SAAS,CAACiC,KAAV,CAAgB;IACvB;AACJ;AACA;IACIR,IAAI,EAAEzB,SAAS,CAAC+B,MAJO;;IAKvB;AACJ;AACA;IACIX,YAAY,EAAEpB,SAAS,CAAC+B,MARD;;IASvB;AACJ;AACA;IACIV,aAAa,EAAErB,SAAS,CAAC+B;EAZF,CAAhB,EAaND;AA5Ce,CAApB;AA+CA,eAAe5B,UAAU,CAACE,MAAD,EAAS;EAAE8B,IAAI,EAAE;AAAR,CAAT,CAAV,CAAwCpB,OAAxC,CAAf"}
1
+ {"version":3,"file":"Table.js","names":["React","useRef","forwardRef","useMemo","PropTypes","clsx","withStyles","TableContext","styles","defaultComponent","computeTablePartComponents","rootComponent","Table","THead","TBody","Tr","Th","Td","HvTable","props","ref","classes","className","component","stickyHeader","stickyColumns","variant","others","containerRef","components","tableContext","root","listRow","propTypes","elementType","children","node","isRequired","string","bool","oneOf","shape","name"],"sources":["../../../src/Table/Table.js"],"sourcesContent":["import React, { useRef, forwardRef, useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { withStyles } from \"@material-ui/core\";\n\nimport TableContext from \"./TableContext\";\nimport styles from \"./styles\";\n\nconst defaultComponent = \"table\";\n\nconst computeTablePartComponents = (rootComponent) => {\n if (rootComponent === \"table\") {\n return {\n Table: \"table\",\n THead: \"thead\",\n TBody: \"tbody\",\n Tr: \"tr\",\n Th: \"th\",\n Td: \"td\",\n };\n }\n\n return {\n Table: rootComponent,\n THead: rootComponent,\n TBody: rootComponent,\n Tr: rootComponent,\n Th: rootComponent,\n Td: rootComponent,\n };\n};\n\n/**\n * A Table gathers relational data, it displays values arranged to allow quick numerical analysis\n * like comparison and sorting.\n *\n * **HvTable** component offers a set of HTML-equivalent elements, **styled to Design System's specification**,\n * for building tables.\n * You can rely on these **elements** when your table doesn’t have many interactions or you need it to be very lightweight.\n *\n * For better data handling and **advanced features** we recommend the use of the utility hooks collection .\n * See the <a href=\"?id=lab-table-hooks--main&viewMode=docs\" target=\"_self\">Table Hooks documentation</a> for more details.\n *\n * **PLEASE NOTE**: This Table implementation is still a WIP. There might be breaking changes.\n */\nconst HvTable = forwardRef(function HvTable(props, ref) {\n const {\n classes,\n className,\n component = defaultComponent,\n stickyHeader = false,\n stickyColumns = false,\n variant = \"default\",\n ...others\n } = props;\n\n const containerRef = useRef(ref);\n\n const components = useMemo(() => computeTablePartComponents(component), [component]);\n\n const tableContext = useMemo(\n () => ({ components, variant, containerRef }),\n [components, variant, containerRef]\n );\n\n return (\n <TableContext.Provider value={tableContext}>\n <components.Table\n ref={ref}\n role={component === defaultComponent ? null : \"table\"}\n className={clsx(\n classes.root,\n {\n [classes.stickyHeader]: stickyHeader,\n [classes.stickyColumns]: stickyColumns,\n [classes.listRow]: variant === \"listrow\",\n },\n className\n )}\n {...others}\n />\n </TableContext.Provider>\n );\n});\n\nHvTable.propTypes = {\n /**\n * The component used for the root node. Either a string to use a HTML element or a component.\n * Defaults to `table`.\n *\n * When using non-table elements, layout is up to the developer using the component.\n */\n component: PropTypes.elementType,\n /**\n * Content to be rendered\n */\n children: PropTypes.node.isRequired,\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * Whether the `HvTable` has a sticky header row.\n */\n stickyHeader: PropTypes.bool,\n /**\n * Whether the `HvTable` has sticky columns.\n */\n stickyColumns: PropTypes.bool,\n /**\n * Whether the `HvTable` has the list row styles or the default.\n */\n variant: PropTypes.oneOf([\"listrow\", \"default\"]),\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the component root class when it has a sticky header.\n */\n stickyHeader: PropTypes.string,\n /**\n * Styles applied to the component root class when it has sticky columns.\n */\n stickyColumns: PropTypes.string,\n /**\n * Styles applied to the component root class when it has sticky columns.\n */\n listRow: PropTypes.string,\n }).isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvTable\" })(HvTable);\n"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,MAAhB,EAAwBC,UAAxB,EAAoCC,OAApC,QAAmD,OAAnD;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AAEA,SAASC,UAAT,QAA2B,mBAA3B;AAEA,OAAOC,YAAP,MAAyB,gBAAzB;AACA,OAAOC,MAAP,MAAmB,UAAnB;AAEA,MAAMC,gBAAgB,GAAG,OAAzB;;AAEA,MAAMC,0BAA0B,GAAIC,aAAD,IAAmB;EACpD,IAAIA,aAAa,KAAK,OAAtB,EAA+B;IAC7B,OAAO;MACLC,KAAK,EAAE,OADF;MAELC,KAAK,EAAE,OAFF;MAGLC,KAAK,EAAE,OAHF;MAILC,EAAE,EAAE,IAJC;MAKLC,EAAE,EAAE,IALC;MAMLC,EAAE,EAAE;IANC,CAAP;EAQD;;EAED,OAAO;IACLL,KAAK,EAAED,aADF;IAELE,KAAK,EAAEF,aAFF;IAGLG,KAAK,EAAEH,aAHF;IAILI,EAAE,EAAEJ,aAJC;IAKLK,EAAE,EAAEL,aALC;IAMLM,EAAE,EAAEN;EANC,CAAP;AAQD,CApBD;AAsBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAMO,OAAO,gB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SAAS,CAACkC,MAfH;;EAgBlB;AACF;AACA;EACEd,YAAY,EAAEpB,SAAS,CAACmC,IAnBN;;EAoBlB;AACF;AACA;EACEd,aAAa,EAAErB,SAAS,CAACmC,IAvBP;;EAwBlB;AACF;AACA;EACEb,OAAO,EAAEtB,SAAS,CAACoC,KAAV,CAAgB,CAAC,SAAD,EAAY,SAAZ,CAAhB,CA3BS;;EA4BlB;AACF;AACA;EACEnB,OAAO,EAAEjB,SAAS,CAACqC,KAAV,CAAgB;IACvB;AACJ;AACA;IACIV,IAAI,EAAE3B,SAAS,CAACkC,MAJO;;IAKvB;AACJ;AACA;IACId,YAAY,EAAEpB,SAAS,CAACkC,MARD;;IASvB;AACJ;AACA;IACIb,aAAa,EAAErB,SAAS,CAACkC,MAZF;;IAavB;AACJ;AACA;IACIN,OAAO,EAAE5B,SAAS,CAACkC;EAhBI,CAAhB,EAiBND;AAhDe,CAApB;AAmDA,eAAe/B,UAAU,CAACE,MAAD,EAAS;EAAEkC,IAAI,EAAE;AAAR,CAAT,CAAV,CAAwCxB,OAAxC,CAAf"}
@@ -1,15 +1,18 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- const _excluded = ["classes", "className", "component"];
4
- import React, { forwardRef, useContext } from "react";
3
+ const _excluded = ["classes", "className", "component", "children", "withNavigation"];
4
+ import React, { forwardRef, useContext, useRef } from "react";
5
5
  import PropTypes from "prop-types";
6
6
  import clsx from "clsx";
7
7
  import { withStyles } from "@material-ui/core";
8
+ import { useForkRef } from "@hitachivantara/uikit-react-core";
9
+ import Focus from "@hitachivantara/uikit-react-core/dist/Focus";
8
10
  import TableContext from "../TableContext";
9
11
  import TableSectionContext from "../TableSectionContext";
10
12
  import styles from "./styles";
11
13
  const tableSectionContext = {
12
- type: "body"
14
+ type: "body",
15
+ filterClassName: "grid"
13
16
  };
14
17
  const defaultComponent = "tbody";
15
18
  /**
@@ -17,25 +20,40 @@ const defaultComponent = "tbody";
17
20
  * `HvTableCell` and `HvTableRow` elements in it inherit body-specific styles
18
21
  */
19
22
 
20
- const HvTableBody = /*#__PURE__*/forwardRef(function HvTableBody(props, ref) {
23
+ const HvTableBody = /*#__PURE__*/forwardRef(function HvTableBody(props, externalRef) {
21
24
  var _tableContext$compone;
22
25
 
23
26
  const {
24
27
  classes,
25
28
  className,
26
- component
29
+ component,
30
+ children,
31
+ withNavigation = false
27
32
  } = props,
28
33
  others = _objectWithoutProperties(props, _excluded);
29
34
 
30
35
  const tableContext = useContext(TableContext);
36
+ const bodyRef = useRef(null);
37
+ const handleRef = useForkRef(externalRef, bodyRef);
31
38
  const Component = component || (tableContext === null || tableContext === void 0 ? void 0 : (_tableContext$compone = tableContext.components) === null || _tableContext$compone === void 0 ? void 0 : _tableContext$compone.TBody) || defaultComponent;
32
39
  return /*#__PURE__*/React.createElement(TableSectionContext.Provider, {
33
40
  value: tableSectionContext
34
41
  }, /*#__PURE__*/React.createElement(Component, _extends({
35
42
  className: clsx(classes.root, className),
36
- ref: ref,
43
+ ref: handleRef,
37
44
  role: Component === defaultComponent ? null : "rowgroup"
38
- }, others)));
45
+ }, others), withNavigation ? children.map(element => {
46
+ return /*#__PURE__*/React.createElement(Focus, {
47
+ rootRef: bodyRef,
48
+ key: `row-${element.key}`,
49
+ strategy: "grid",
50
+ useArrows: "true",
51
+ filterClass: tableSectionContext.filterClassName,
52
+ navigationJump: 1,
53
+ focusDisabled: false,
54
+ selected: element.props.selected
55
+ }, element);
56
+ }) : children));
39
57
  });
40
58
  process.env.NODE_ENV !== "production" ? HvTableBody.propTypes = {
41
59
  /**
@@ -54,6 +72,11 @@ process.env.NODE_ENV !== "production" ? HvTableBody.propTypes = {
54
72
  */
55
73
  component: PropTypes.elementType,
56
74
 
75
+ /**
76
+ * Sets whether or not there should be arrow navigation between the table rows
77
+ */
78
+ withNavigation: PropTypes.bool,
79
+
57
80
  /**
58
81
  * A Jss Object used to override or extend the styles applied.
59
82
  */
@@ -1 +1 @@
1
- {"version":3,"file":"TableBody.js","names":["React","forwardRef","useContext","PropTypes","clsx","withStyles","TableContext","TableSectionContext","styles","tableSectionContext","type","defaultComponent","HvTableBody","props","ref","classes","className","component","others","tableContext","Component","components","TBody","root","propTypes","string","children","node","elementType","shape","isRequired","name"],"sources":["../../../../src/Table/TableBody/TableBody.js"],"sourcesContent":["import React, { forwardRef, useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { withStyles } from \"@material-ui/core\";\n\nimport TableContext from \"../TableContext\";\nimport TableSectionContext from \"../TableSectionContext\";\nimport styles from \"./styles\";\n\nconst tableSectionContext = {\n type: \"body\",\n};\n\nconst defaultComponent = \"tbody\";\n\n/**\n * HvTableBody acts as a `tbody` element.\n * `HvTableCell` and `HvTableRow` elements in it inherit body-specific styles\n */\nconst HvTableBody = forwardRef(function HvTableBody(props, ref) {\n const { classes, className, component, ...others } = props;\n\n const tableContext = useContext(TableContext);\n\n const Component = component || tableContext?.components?.TBody || defaultComponent;\n\n return (\n <TableSectionContext.Provider value={tableSectionContext}>\n <Component\n className={clsx(classes.root, className)}\n ref={ref}\n role={Component === defaultComponent ? null : \"rowgroup\"}\n {...others}\n />\n </TableSectionContext.Provider>\n );\n});\n\nHvTableBody.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * Content to be rendered\n */\n children: PropTypes.node,\n /**\n * The component used for the root node. Either a string to use a HTML element or a component.\n * Defaults to tbody.\n */\n component: PropTypes.elementType,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n }).isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvTableBody\" })(HvTableBody);\n"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,UAA5B,QAA8C,OAA9C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAO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,CAAgB;IACvB;AACJ;AACA;IACIN,IAAI,EAAEpB,SAAS,CAACsB;EAJO,CAAhB,EAKNK;AAtBmB,CAAxB;AAyBA,eAAezB,UAAU,CAACG,MAAD,EAAS;EAAEuB,IAAI,EAAE;AAAR,CAAT,CAAV,CAA4CnB,WAA5C,CAAf"}
1
+ {"version":3,"file":"TableBody.js","names":["React","forwardRef","useContext","useRef","PropTypes","clsx","withStyles","useForkRef","Focus","TableContext","TableSectionContext","styles","tableSectionContext","type","filterClassName","defaultComponent","HvTableBody","props","externalRef","classes","className","component","children","withNavigation","others","tableContext","bodyRef","handleRef","Component","components","TBody","root","map","element","key","selected","propTypes","string","node","elementType","bool","shape","isRequired","name"],"sources":["../../../../src/Table/TableBody/TableBody.js"],"sourcesContent":["import React, { forwardRef, useContext, useRef } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { withStyles } from \"@material-ui/core\";\nimport { useForkRef } from \"@hitachivantara/uikit-react-core\";\n\nimport Focus from \"@hitachivantara/uikit-react-core/dist/Focus\";\nimport TableContext from \"../TableContext\";\nimport TableSectionContext from \"../TableSectionContext\";\nimport styles from \"./styles\";\n\nconst tableSectionContext = {\n type: \"body\",\n filterClassName: \"grid\",\n};\n\nconst defaultComponent = \"tbody\";\n\n/**\n * HvTableBody acts as a `tbody` element.\n * `HvTableCell` and `HvTableRow` elements in it inherit body-specific styles\n */\nconst HvTableBody = forwardRef(function HvTableBody(props, externalRef) {\n const { classes, className, component, children, withNavigation = false, ...others } = props;\n\n const tableContext = useContext(TableContext);\n\n const bodyRef = useRef(null);\n\n const handleRef = useForkRef(externalRef, bodyRef);\n\n const Component = component || tableContext?.components?.TBody || defaultComponent;\n\n return (\n <TableSectionContext.Provider value={tableSectionContext}>\n <Component\n className={clsx(classes.root, className)}\n ref={handleRef}\n role={Component === defaultComponent ? null : \"rowgroup\"}\n {...others}\n >\n {withNavigation\n ? children.map((element) => {\n return (\n <Focus\n rootRef={bodyRef}\n key={`row-${element.key}`}\n strategy=\"grid\"\n useArrows=\"true\"\n filterClass={tableSectionContext.filterClassName}\n navigationJump={1}\n focusDisabled={false}\n selected={element.props.selected}\n >\n {element}\n </Focus>\n );\n })\n : children}\n </Component>\n </TableSectionContext.Provider>\n );\n});\n\nHvTableBody.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * Content to be rendered\n */\n children: PropTypes.node,\n /**\n * The component used for the root node. Either a string to use a HTML element or a component.\n * Defaults to tbody.\n */\n component: PropTypes.elementType,\n /**\n * Sets whether or not there should be arrow navigation between the table rows\n */\n withNavigation: PropTypes.bool,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n }).isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvTableBody\" })(HvTableBody);\n"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,UAA5B,EAAwCC,MAAxC,QAAsD,OAAtD;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AAEA,SAASC,UAAT,QAA2B,mBAA3B;AACA,SAASC,UAAT,QAA2B,kCAA3B;AAEA,OAAOC,KAAP,MAAkB,6CAAlB;AACA,OAAOC,YAAP,MAAyB,iBAAzB;AACA,OAAOC,mBAAP,MAAgC,wBAAhC;AACA,OAAOC,MAAP,MAAmB,UAAnB;AAEA,MAAMC,mBAAmB,GAAG;EAC1BC,IAAI,EAAE,MADoB;EAE1BC,eAAe,EAAE;AAFS,CAA5B;AAKA,MAAMC,gBAAgB,GAAG,OAAzB;AAEA;AACA;AACA;AACA;;AACA,MAAMC,WAAW,gBAAGf,UAAU,CAAC,SAASe,WAAT,CAAqBC,KAArB,EAA4BC,WAA5B,EAAyC;EAAA;;EACtE,MAAM;IAAEC,OAAF;IAAWC,SAAX;IAAsBC,SAAtB;IAAiCC,QAAjC;IAA2CC,cAAc,GAAG;E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ACF;AACA;AACA;EACEjB,SAAS,EAAEjB,SAAS,CAACmC,WAbC;;EActB;AACF;AACA;EACEhB,cAAc,EAAEnB,SAAS,CAACoC,IAjBJ;;EAkBtB;AACF;AACA;EACErB,OAAO,EAAEf,SAAS,CAACqC,KAAV,CAAgB;IACvB;AACJ;AACA;IACIV,IAAI,EAAE3B,SAAS,CAACiC;EAJO,CAAhB,EAKNK;AA1BmB,CAAxB;AA6BA,eAAepC,UAAU,CAACK,MAAD,EAAS;EAAEgC,IAAI,EAAE;AAAR,CAAT,CAAV,CAA4C3B,WAA5C,CAAf"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["styles","root","backgroundColor","position","zIndex"],"sources":["../../../../src/Table/TableBody/styles.js"],"sourcesContent":["const styles = () => ({\n root: {\n backgroundColor: \"inherit\",\n\n position: \"relative\",\n zIndex: 0,\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAG,OAAO;EACpBC,IAAI,EAAE;IACJC,eAAe,EAAE,SADb;IAGJC,QAAQ,EAAE,UAHN;IAIJC,MAAM,EAAE;EAJJ;AADc,CAAP,CAAf;;AASA,eAAeJ,MAAf"}
1
+ {"version":3,"file":"styles.js","names":["styles","root","backgroundColor","position","zIndex"],"sources":["../../../../src/Table/TableBody/styles.js"],"sourcesContent":["const styles = () => ({\n root: {\n backgroundColor: \"inherit\",\n position: \"relative\",\n zIndex: 0,\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAG,OAAO;EACpBC,IAAI,EAAE;IACJC,eAAe,EAAE,SADb;IAEJC,QAAQ,EAAE,UAFN;IAGJC,MAAM,EAAE;EAHJ;AADc,CAAP,CAAf;;AAQA,eAAeJ,MAAf"}
@@ -15,6 +15,8 @@ export type HvTableCellClassKey =
15
15
  | "variantCheckbox"
16
16
  | "variantExpand"
17
17
  | "variantActions"
18
+ | "variantListactions"
19
+ | "variantListcheckbox"
18
20
  | "variantNone"
19
21
  | "resizable"
20
22
  | "resizing";
@@ -38,7 +40,7 @@ export interface HvTableCellProps
38
40
  /**
39
41
  * Sets the cell's variant.
40
42
  */
41
- variant?: "checkbox" | "expand" | "actions" | "default" | "none";
43
+ variant?: "checkbox" | "expand" | "actions" | "default" | "listcheckbox" | "listactions" | "none";
42
44
 
43
45
  /**
44
46
  * Specify the cell type.
@@ -45,7 +45,7 @@ const HvTableCell = /*#__PURE__*/forwardRef(function HvTableCell(props, ref) {
45
45
  ref: ref,
46
46
  role: Component === defaultComponent ? null : "cell",
47
47
  style: style,
48
- className: clsx(classes.root, classes[type], className, align !== "inherit" && classes[`align${capitalize(align)}`], variant !== "default" && classes[`variant${capitalize(variant)}`], sorted && classes.sorted, stickyColumn && classes.stickyColumn, stickyColumnMostLeft && classes.stickyColumnMostLeft, stickyColumnLeastRight && classes.stickyColumnLeastRight, groupColumnMostLeft && classes.groupColumnMostLeft, groupColumnMostRight && classes.groupColumnMostRight, resizable && classes.resizable, resizing && classes.resizing)
48
+ className: clsx(classes.root, classes[type], className, align !== "inherit" && classes[`align${capitalize(align)}`], variant !== "default" && classes[`variant${capitalize(variant)}`], sorted && classes.sorted, stickyColumn && classes.stickyColumn, stickyColumnMostLeft && classes.stickyColumnMostLeft, stickyColumnLeastRight && classes.stickyColumnLeastRight, groupColumnMostLeft && classes.groupColumnMostLeft, groupColumnMostRight && classes.groupColumnMostRight, resizable && classes.resizable, resizing && classes.resizing, tableContext.variant === "listrow" && [classes.variantList, type !== "body" && classes.variantListHead])
49
49
  }, others), children);
50
50
  });
51
51
  process.env.NODE_ENV !== "production" ? HvTableCell.propTypes = {
@@ -78,7 +78,7 @@ process.env.NODE_ENV !== "production" ? HvTableCell.propTypes = {
78
78
  /**
79
79
  * Sets the cell's variant.
80
80
  */
81
- variant: PropTypes.oneOf(["checkbox", "expand", "actions", "default", "none"]),
81
+ variant: PropTypes.oneOf(["checkbox", "expand", "actions", "default", "listcheckbox", "listactions", "none"]),
82
82
 
83
83
  /**
84
84
  * Specify the cell's type.
@@ -221,6 +221,26 @@ process.env.NODE_ENV !== "production" ? HvTableCell.propTypes = {
221
221
  */
222
222
  variantNone: PropTypes.string,
223
223
 
224
+ /**
225
+ * Styles applied to the component root when its variant is list
226
+ */
227
+ variantList: PropTypes.string,
228
+
229
+ /**
230
+ * Styles applied to the cell when its variant is list and actions.
231
+ */
232
+ variantListactions: PropTypes.string,
233
+
234
+ /**
235
+ * Styles applied to the cell when its variant is list and checkbox.
236
+ */
237
+ variantListcheckbox: PropTypes.string,
238
+
239
+ /**
240
+ * Styles applied to the cell when its variant is list and the type is head .
241
+ */
242
+ variantListHead: PropTypes.string,
243
+
224
244
  /**
225
245
  * Styles applied to the cell when it's part of a resizable column.
226
246
  */
@@ -1 +1 @@
1
- {"version":3,"file":"TableCell.js","names":["React","forwardRef","useContext","PropTypes","clsx","capitalize","withStyles","styles","TableContext","TableSectionContext","defaultComponent","HvTableCell","props","ref","children","component","className","style","classes","align","variant","type","typeProp","stickyColumn","stickyColumnMostLeft","stickyColumnLeastRight","groupColumnMostLeft","groupColumnMostRight","sorted","resizable","resizing","others","tableContext","tableSectionContext","Component","components","Td","root","propTypes","elementType","node","string","instanceOf","Object","oneOf","bool","shape","head","body","footer","sortIcon","alignLeft","alignRight","alignCenter","alignJustify","variantCheckbox","variantExpand","variantActions","variantNone","isRequired","name"],"sources":["../../../../src/Table/TableCell/TableCell.js"],"sourcesContent":["import React, { forwardRef, useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport capitalize from \"lodash/capitalize\";\n\nimport { withStyles } from \"@material-ui/core\";\nimport styles from \"./styles\";\nimport TableContext from \"../TableContext\";\nimport TableSectionContext from \"../TableSectionContext\";\n\nconst defaultComponent = \"td\";\n\n/**\n * `HvTableCell` acts as a `td` element and inherits styles from its context\n */\nconst HvTableCell = forwardRef(function HvTableCell(props, ref) {\n const {\n children,\n\n component,\n\n className,\n style,\n classes,\n\n align = \"inherit\",\n variant = \"default\",\n\n type: typeProp,\n\n stickyColumn = false,\n stickyColumnMostLeft = false,\n stickyColumnLeastRight = false,\n\n groupColumnMostLeft = false,\n groupColumnMostRight = false,\n\n sorted = false,\n\n resizable = false,\n resizing = false,\n\n ...others\n } = props;\n\n const tableContext = useContext(TableContext);\n const tableSectionContext = useContext(TableSectionContext);\n\n const type = typeProp || tableSectionContext?.type || \"body\";\n\n const Component = component || tableContext?.components?.Td || defaultComponent;\n\n return (\n <Component\n ref={ref}\n role={Component === defaultComponent ? null : \"cell\"}\n style={style}\n className={clsx(\n classes.root,\n classes[type],\n {\n [classes[`align${capitalize(align)}`]]: align !== \"inherit\",\n [classes[`variant${capitalize(variant)}`]]: variant !== \"default\",\n\n [classes.sorted]: sorted,\n\n [classes.stickyColumn]: stickyColumn,\n [classes.stickyColumnMostLeft]: stickyColumnMostLeft,\n [classes.stickyColumnLeastRight]: stickyColumnLeastRight,\n\n [classes.groupColumnMostLeft]: groupColumnMostLeft,\n [classes.groupColumnMostRight]: groupColumnMostRight,\n\n [classes.resizable]: resizable,\n [classes.resizing]: resizing,\n },\n className\n )}\n {...others}\n >\n {children}\n </Component>\n );\n});\n\nHvTableCell.propTypes = {\n /**\n * The component used for the root node. Either a string to use a HTML element or a component.\n * Defaults to td.\n */\n component: PropTypes.elementType,\n\n /**\n * Content to be rendered\n */\n children: PropTypes.node,\n\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * Inline styles to be applied to the root element.\n */\n style: PropTypes.instanceOf(Object),\n\n /**\n * Set the text-align on the table cell content.\n */\n align: PropTypes.oneOf([\"center\", \"inherit\", \"justify\", \"left\", \"right\"]),\n /**\n * Sets the cell's variant.\n */\n variant: PropTypes.oneOf([\"checkbox\", \"expand\", \"actions\", \"default\", \"none\"]),\n\n /**\n * Specify the cell's type.\n * The prop defaults to the value inherited from the parent TableHead, TableBody, or TableFooter components.\n */\n type: PropTypes.oneOf([\"body\", \"footer\", \"head\"]),\n\n /**\n * Whether or not the cell is part of a sorted column.\n */\n sorted: PropTypes.bool,\n\n /**\n * The cell is part of a sticky column.\n */\n stickyColumn: PropTypes.bool,\n /**\n * The cell is part of the last sticky to the left column.\n */\n stickyColumnMostLeft: PropTypes.bool,\n /**\n * The cell is part of the first sticky to the right column.\n */\n stickyColumnLeastRight: PropTypes.bool,\n\n /**\n * The cell is part of the first column in the group.\n */\n groupColumnMostLeft: PropTypes.bool,\n /**\n * The cell is part of the last column in the group.\n */\n groupColumnMostRight: PropTypes.bool,\n\n /**\n * Whether or not the cell is resizable\n */\n resizable: PropTypes.bool,\n /**\n * Whether or not the cell is being resized\n */\n resizing: PropTypes.bool,\n\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n\n /**\n * Styles applied to the cell when it's in the table head.\n */\n head: PropTypes.string,\n /**\n * Styles applied to the cell when it's in the table body.\n */\n body: PropTypes.string,\n /**\n * Styles applied to the cell when it's in the table footer.\n */\n footer: PropTypes.string,\n\n /**\n * Styles applied to the cell when it's part of a sticky column.\n */\n stickyColumn: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of the last sticky to the left column.\n */\n stickyColumnMostLeft: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of the first right sticky column.\n */\n stickyColumnLeastRight: PropTypes.string,\n\n /**\n * Styles applied to the cell when it's part of the first column in the group.\n */\n groupColumnMostLeft: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of the last column in the group.\n */\n groupColumnMostRight: PropTypes.string,\n\n /**\n * Styles applied to the cell when it's part of a sorted column.\n */\n sorted: PropTypes.string,\n\n sortIcon: PropTypes.string,\n\n /**\n * Styles applied to the component root when it is left aligned\n */\n alignLeft: PropTypes.string,\n /**\n * Styles applied to the component root when it is right aligned\n */\n alignRight: PropTypes.string,\n /**\n * Styles applied to the component root when it is center aligned\n */\n alignCenter: PropTypes.string,\n /**\n * Styles applied to the component root when it is justified\n */\n alignJustify: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is checkbox\n */\n variantCheckbox: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is expand\n */\n variantExpand: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is actions\n */\n variantActions: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is none\n */\n variantNone: PropTypes.string,\n\n /**\n * Styles applied to the cell when it's part of a resizable column.\n */\n resizable: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of a resizing column.\n */\n resizing: PropTypes.string,\n }).isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvTableCell\" })(HvTableCell);\n"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,UAA5B,QAA8C,OAA9C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AACA,OAAOC,UAAP,MAAuB,mBAAvB;AAEA,SAASC,UAAT,QAA2B,mBAA3B;AACA,OAAOC,MAAP,MAAmB,UAAnB;AACA,OAAOC,YAAP,MAAyB,iBAAzB;AACA,OAAOC,mBAAP,MAAgC,wBAAhC;AAEA,MAAMC,gBAAgB,GAAG,IAAzB;AAEA;AACA;AACA;;AACA,MAAMC,WAAW,gBAAGV,UAAU,CAAC,SAASU,WAAT,CAAqBC,KAArB,EAA4BC,GAA5B,EAAiC;EAAA;;EAC9D,MAAM;IACJC,QADI;IAGJC,SAHI;IAKJC,SALI;IAMJC,KANI;IAOJC,OAPI;IASJC,KAAK,GAAG,SATJ;IAUJC,OAAO,GAAG,SAVN;IAYJC,IAAI,EAAEC,QAZF;IAcJC,YAAY,GAAG,KAdX;IAeJC,oBAAoB,GAAG,KAfnB;IAgBJC,sBAAsB,GAAG,KAhBrB;IAkBJC,mBAAmB,GAAG,KAlBlB;IAmBJC,oBAAoB,GAAG,KAnBnB;IAqBJC,MAAM,GAAG,KArBL;IAuBJC,SAAS,GAAG,KAvBR;IAwBJC,QAAQ,GAAG;EAxBP,IA2BFlB,KA3BJ;EAAA,MA0BKm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SAAS,EAAE1B,SAAS,CAACsC,MApFE;;IAqFvB;AACJ;AACA;IACIX,QAAQ,EAAE3B,SAAS,CAACsC;EAxFG,CAAhB,EAyFNkB;AApKmB,CAAxB;AAuKA,eAAerD,UAAU,CAACC,MAAD,EAAS;EAAEqD,IAAI,EAAE;AAAR,CAAT,CAAV,CAA4CjD,WAA5C,CAAf"}
1
+ {"version":3,"file":"TableCell.js","names":["React","forwardRef","useContext","PropTypes","clsx","capitalize","withStyles","styles","TableContext","TableSectionContext","defaultComponent","HvTableCell","props","ref","children","component","className","style","classes","align","variant","type","typeProp","stickyColumn","stickyColumnMostLeft","stickyColumnLeastRight","groupColumnMostLeft","groupColumnMostRight","sorted","resizable","resizing","others","tableContext","tableSectionContext","Component","components","Td","root","variantList","variantListHead","propTypes","elementType","node","string","instanceOf","Object","oneOf","bool","shape","head","body","footer","sortIcon","alignLeft","alignRight","alignCenter","alignJustify","variantCheckbox","variantExpand","variantActions","variantNone","variantListactions","variantListcheckbox","isRequired","name"],"sources":["../../../../src/Table/TableCell/TableCell.js"],"sourcesContent":["import React, { forwardRef, useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport capitalize from \"lodash/capitalize\";\n\nimport { withStyles } from \"@material-ui/core\";\nimport styles from \"./styles\";\nimport TableContext from \"../TableContext\";\nimport TableSectionContext from \"../TableSectionContext\";\n\nconst defaultComponent = \"td\";\n\n/**\n * `HvTableCell` acts as a `td` element and inherits styles from its context\n */\nconst HvTableCell = forwardRef(function HvTableCell(props, ref) {\n const {\n children,\n\n component,\n\n className,\n style,\n classes,\n\n align = \"inherit\",\n variant = \"default\",\n\n type: typeProp,\n\n stickyColumn = false,\n stickyColumnMostLeft = false,\n stickyColumnLeastRight = false,\n\n groupColumnMostLeft = false,\n groupColumnMostRight = false,\n\n sorted = false,\n\n resizable = false,\n resizing = false,\n\n ...others\n } = props;\n\n const tableContext = useContext(TableContext);\n const tableSectionContext = useContext(TableSectionContext);\n\n const type = typeProp || tableSectionContext?.type || \"body\";\n\n const Component = component || tableContext?.components?.Td || defaultComponent;\n\n return (\n <Component\n ref={ref}\n role={Component === defaultComponent ? null : \"cell\"}\n style={style}\n className={clsx(\n classes.root,\n classes[type],\n {\n [classes[`align${capitalize(align)}`]]: align !== \"inherit\",\n [classes[`variant${capitalize(variant)}`]]: variant !== \"default\",\n [classes.variantList]: tableContext.variant === \"listrow\",\n [classes.variantListHead]: tableContext.variant === \"listrow\" && type !== \"body\",\n [classes.sorted]: sorted,\n\n [classes.stickyColumn]: stickyColumn,\n [classes.stickyColumnMostLeft]: stickyColumnMostLeft,\n [classes.stickyColumnLeastRight]: stickyColumnLeastRight,\n\n [classes.groupColumnMostLeft]: groupColumnMostLeft,\n [classes.groupColumnMostRight]: groupColumnMostRight,\n\n [classes.resizable]: resizable,\n [classes.resizing]: resizing,\n },\n className\n )}\n {...others}\n >\n {children}\n </Component>\n );\n});\n\nHvTableCell.propTypes = {\n /**\n * The component used for the root node. Either a string to use a HTML element or a component.\n * Defaults to td.\n */\n component: PropTypes.elementType,\n /**\n * Content to be rendered\n */\n children: PropTypes.node,\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * Inline styles to be applied to the root element.\n */\n style: PropTypes.instanceOf(Object),\n /**\n * Set the text-align on the table cell content.\n */\n align: PropTypes.oneOf([\"center\", \"inherit\", \"justify\", \"left\", \"right\"]),\n /**\n * Sets the cell's variant.\n */\n variant: PropTypes.oneOf([\n \"checkbox\",\n \"expand\",\n \"actions\",\n \"default\",\n \"listcheckbox\",\n \"listactions\",\n \"none\",\n ]),\n /**\n * Specify the cell's type.\n * The prop defaults to the value inherited from the parent TableHead, TableBody, or TableFooter components.\n */\n type: PropTypes.oneOf([\"body\", \"footer\", \"head\"]),\n /**\n * Whether or not the cell is part of a sorted column.\n */\n sorted: PropTypes.bool,\n /**\n * The cell is part of a sticky column.\n */\n stickyColumn: PropTypes.bool,\n /**\n * The cell is part of the last sticky to the left column.\n */\n stickyColumnMostLeft: PropTypes.bool,\n /**\n * The cell is part of the first sticky to the right column.\n */\n stickyColumnLeastRight: PropTypes.bool,\n /**\n * The cell is part of the first column in the group.\n */\n groupColumnMostLeft: PropTypes.bool,\n /**\n * The cell is part of the last column in the group.\n */\n groupColumnMostRight: PropTypes.bool,\n /**\n * Whether or not the cell is resizable\n */\n resizable: PropTypes.bool,\n /**\n * Whether or not the cell is being resized\n */\n resizing: PropTypes.bool,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the cell when it's in the table head.\n */\n head: PropTypes.string,\n /**\n * Styles applied to the cell when it's in the table body.\n */\n body: PropTypes.string,\n /**\n * Styles applied to the cell when it's in the table footer.\n */\n footer: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of a sticky column.\n */\n stickyColumn: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of the last sticky to the left column.\n */\n stickyColumnMostLeft: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of the first right sticky column.\n */\n stickyColumnLeastRight: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of the first column in the group.\n */\n groupColumnMostLeft: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of the last column in the group.\n */\n groupColumnMostRight: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of a sorted column.\n */\n sorted: PropTypes.string,\n\n sortIcon: PropTypes.string,\n /**\n * Styles applied to the component root when it is left aligned\n */\n alignLeft: PropTypes.string,\n /**\n * Styles applied to the component root when it is right aligned\n */\n alignRight: PropTypes.string,\n /**\n * Styles applied to the component root when it is center aligned\n */\n alignCenter: PropTypes.string,\n /**\n * Styles applied to the component root when it is justified\n */\n alignJustify: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is checkbox\n */\n variantCheckbox: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is expand\n */\n variantExpand: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is actions\n */\n variantActions: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is none\n */\n variantNone: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is list\n */\n variantList: PropTypes.string,\n /**\n * Styles applied to the cell when its variant is list and actions.\n */\n variantListactions: PropTypes.string,\n /**\n * Styles applied to the cell when its variant is list and checkbox.\n */\n variantListcheckbox: PropTypes.string,\n /**\n * Styles applied to the cell when its variant is list and the type is head .\n */\n variantListHead: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of a resizable column.\n */\n resizable: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of a resizing column.\n */\n resizing: PropTypes.string,\n }).isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvTableCell\" })(HvTableCell);\n"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,UAA5B,QAA8C,OAA9C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AACA,OAAOC,UAAP,MAAuB,mBAAvB;AAEA,SAASC,UAAT,QAA2B,mBAA3B;AACA,OAAOC,MAAP,MAAmB,UAAnB;AACA,OAAOC,YAAP,MAAyB,iBAAzB;AACA,OAAOC,mBAAP,MAAgC,wBAAhC;AAEA,MAAMC,gBAAgB,GAAG,IAAzB;AAEA;AACA;AACA;;AACA,MAAMC,WAAW,gBAAGV,UAAU,CAAC,SAASU,WAAT,CAAqBC,KAArB,EAA4BC,GAA5B,EAAiC;EAAA;;EAC9D,MAAM;IACJC,QADI;IAGJC,SAHI;IAKJC,SALI;IAMJC,KANI;IAOJC,OAPI;IASJC,KAAK,GAAG,SATJ;IAUJC,OAAO,GAAG,SAVN;IAYJC,IAAI,EAAEC,QAZF;IAcJC,YAAY,GAAG,KAdX;IAeJC,oBAAoB,GAAG,KAfnB;IAgBJC,sBAAsB,GAAG,KAhBrB;IAkBJC,mBAAmB,GAAG,KAlBlB;IAmBJC,oBAAoB,GAAG,KAnBnB;IAqBJC,MAAM,GAAG,KAr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EtD,SAAS,CAACwC,MA9DJ;;IA+DvB;AACJ;AACA;IACIe,aAAa,EAAEvD,SAAS,CAACwC,MAlEF;;IAmEvB;AACJ;AACA;IACIgB,cAAc,EAAExD,SAAS,CAACwC,MAtEH;;IAuEvB;AACJ;AACA;IACIiB,WAAW,EAAEzD,SAAS,CAACwC,MA1EA;;IA2EvB;AACJ;AACA;IACIL,WAAW,EAAEnC,SAAS,CAACwC,MA9EA;;IA+EvB;AACJ;AACA;IACIkB,kBAAkB,EAAE1D,SAAS,CAACwC,MAlFP;;IAmFvB;AACJ;AACA;IACImB,mBAAmB,EAAE3D,SAAS,CAACwC,MAtFR;;IAuFvB;AACJ;AACA;IACIJ,eAAe,EAAEpC,SAAS,CAACwC,MA1FJ;;IA2FvB;AACJ;AACA;IACId,SAAS,EAAE1B,SAAS,CAACwC,MA9FE;;IA+FvB;AACJ;AACA;IACIb,QAAQ,EAAE3B,SAAS,CAACwC;EAlGG,CAAhB,EAmGNoB;AA7KmB,CAAxB;AAgLA,eAAezD,UAAU,CAACC,MAAD,EAAS;EAAEyD,IAAI,EAAE;AAAR,CAAT,CAAV,CAA4CrD,WAA5C,CAAf"}
@@ -69,6 +69,34 @@ const styles = theme => {
69
69
  paddingTop: 0,
70
70
  paddingBottom: 0
71
71
  },
72
+ variantList: {
73
+ minHeight: 52,
74
+ "td&": {
75
+ height: 52
76
+ },
77
+ padding: "0, 0, 0, 32px",
78
+ border: 0
79
+ },
80
+ variantListHead: {
81
+ backgroundColor: "inherit",
82
+ "td&": {
83
+ height: 16
84
+ }
85
+ },
86
+ variantListactions: {
87
+ borderLeft: `solid 2px ${theme.hv.palette.atmosphere.atmo2}`,
88
+ paddingLeft: "0",
89
+ textAlign: "center",
90
+ width: 130,
91
+ maxWidth: 130
92
+ },
93
+ variantListcheckbox: {
94
+ borderRight: `solid 2px ${theme.hv.palette.atmosphere.atmo2}`,
95
+ padding: 0,
96
+ textAlign: "center",
97
+ width: 34,
98
+ maxWidth: 34
99
+ },
72
100
  stickyColumn: {
73
101
  position: "sticky",
74
102
  zIndex: 2,
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["hexToRgbA","styles","theme","semiTransparentAtmo1","hv","palette","atmosphere","atmo1","root","verticalAlign","textAlign","padding","hvSpacing","borderBottom","atmo4","head","height","backgroundColor","borderTop","typography","highlightText","body","minHeight","normalText","footer","sorted","alignLeft","alignCenter","alignRight","flexDirection","alignJustify","variantNone","variantCheckbox","width","maxWidth","overflow","borderRight","variantActions","borderLeft","variantExpand","paddingLeft","paddingTop","paddingBottom","stickyColumn","position","zIndex","background","atmo2","backgroundImage","stickyColumnMostLeft","stickyColumnLeastRight","groupColumnMostLeft","groupColumnMostRight","resizable","resizing","accent","acce1"],"sources":["../../../../src/Table/TableCell/styles.js"],"sourcesContent":["import { hexToRgbA } from \"@hitachivantara/uikit-react-core\";\n\nconst styles = (theme) => {\n const semiTransparentAtmo1 = hexToRgbA(theme.hv.palette.atmosphere.atmo1, 0.4);\n\n return {\n root: {\n verticalAlign: \"inherit\",\n textAlign: \"left\",\n padding: theme.hvSpacing(\"8px\", \"xs\", \"8px\", \"32px\"),\n\n borderBottom: `1px solid ${theme.hv.palette.atmosphere.atmo4}`,\n },\n\n head: {\n height: 52,\n verticalAlign: \"top\",\n\n backgroundColor: theme.hv.palette.atmosphere.atmo1,\n borderTop: `1px solid ${theme.hv.palette.atmosphere.atmo4}`,\n borderBottom: `1px solid ${theme.hv.palette.atmosphere.atmo4}`,\n ...theme.hv.typography.highlightText,\n },\n body: {\n minHeight: 32,\n \"td&\": {\n height: 32,\n },\n backgroundColor: \"inherit\",\n ...theme.hv.typography.normalText,\n\n \"&$sorted\": {\n backgroundColor: semiTransparentAtmo1,\n },\n },\n footer: {},\n\n sorted: {},\n\n alignLeft: {\n textAlign: \"left\",\n },\n alignCenter: {\n textAlign: \"center\",\n },\n alignRight: {\n textAlign: \"right\",\n flexDirection: \"row-reverse\",\n },\n alignJustify: {\n textAlign: \"justify\",\n },\n\n variantNone: {\n padding: 0,\n },\n variantCheckbox: {\n padding: 0,\n width: 32,\n maxWidth: 32,\n overflow: \"hidden\",\n borderRight: `solid 1px ${theme.hv.palette.atmosphere.atmo4}`,\n },\n variantActions: {\n padding: 0,\n width: 32,\n maxWidth: 32,\n borderLeft: `solid 1px ${theme.hv.palette.atmosphere.atmo4}`,\n },\n variantExpand: {\n paddingLeft: 0,\n paddingTop: 0,\n paddingBottom: 0,\n },\n\n stickyColumn: {\n position: \"sticky\",\n zIndex: 2,\n background: theme.hv.palette.atmosphere.atmo2,\n\n \"&$groupColumnMostRight+$stickyColumn\": {\n borderLeft: 0,\n },\n\n \"&$sorted\": {\n backgroundColor: theme.hv.palette.atmosphere.atmo2,\n backgroundImage: `linear-gradient(to right, ${semiTransparentAtmo1}, ${semiTransparentAtmo1})`,\n },\n },\n stickyColumnMostLeft: {\n borderRight: `solid 1px ${theme.hv.palette.atmosphere.atmo4}`,\n },\n stickyColumnLeastRight: {\n borderLeft: `solid 1px ${theme.hv.palette.atmosphere.atmo4}`,\n },\n\n groupColumnMostLeft: {\n borderLeft: `solid 1px ${theme.hv.palette.atmosphere.atmo4}`,\n\n \"&:first-child\": {\n borderLeft: 0,\n },\n },\n groupColumnMostRight: {\n borderRight: `solid 1px ${theme.hv.palette.atmosphere.atmo4}`,\n\n // due to the \":has()\" selector not being supported in browsers,\n // this need to be managed with inline styles\n // To be uncommented when not needed (see comment in src/Table/hooks/useSticky.js)\n // \"&:last-child,&:has(+ $stickyColumnLeastRight)\": {\n \"&:last-child\": {\n borderRight: 0,\n },\n\n \"&+:not($stickyColumn)\": {\n borderLeft: 0,\n },\n },\n\n resizable: {\n borderRight: `solid 1px ${theme.hv.palette.atmosphere.atmo4}`,\n },\n\n resizing: {\n borderRight: `solid 2px ${theme.hv.palette.accent.acce1}`,\n },\n };\n};\n\nexport default styles;\n"],"mappings":";;;;;;AAAA,SAASA,SAAT,QAA0B,kCAA1B;;AAEA,MAAMC,MAAM,GAAIC,KAA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BC,UAAjB,CAA4BQ,KAAM;IADrC,CAvFnB;IA2FLqC,mBAAmB,EAAE;MACnBb,UAAU,EAAG,aAAYpC,KAAK,CAACE,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BQ,KAAM,EADxC;MAGnB,iBAAiB;QACfwB,UAAU,EAAE;MADG;IAHE,CA3FhB;IAkGLc,oBAAoB,EAAE;MACpBhB,WAAW,EAAG,aAAYlC,KAAK,CAACE,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BQ,KAAM,EADxC;MAGpB;MACA;MACA;MACA;MACA,gBAAgB;QACdsB,WAAW,EAAE;MADC,CAPI;MAWpB,yBAAyB;QACvBE,UAAU,EAAE;MADW;IAXL,CAlGjB;IAkHLe,SAAS,EAAE;MACTjB,WAAW,EAAG,aAAYlC,KAAK,CAACE,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BQ,KAAM;IADnD,CAlHN;IAsHLwC,QAAQ,EAAE;MACRlB,WAAW,EAAG,aAAYlC,KAAK,CAACE,EAAN,CAASC,OAAT,CAAiBkD,MAAjB,CAAwBC,KAAM;IADhD;EAtHL,CAAP;AA0HD,CA7HD;;AA+HA,eAAevD,MAAf"}
1
+ {"version":3,"file":"styles.js","names":["hexToRgbA","styles","theme","semiTransparentAtmo1","hv","palette","atmosphere","atmo1","root","verticalAlign","textAlign","padding","hvSpacing","borderBottom","atmo4","head","height","backgroundColor","borderTop","typography","highlightText","body","minHeight","normalText","footer","sorted","alignLeft","alignCenter","alignRight","flexDirection","alignJustify","variantNone","variantCheckbox","width","maxWidth","overflow","borderRight","variantActions","borderLeft","variantExpand","paddingLeft","paddingTop","paddingBottom","variantList","border","variantListHead","variantListactions","atmo2","variantListcheckbox","stickyColumn","position","zIndex","background","backgroundImage","stickyColumnMostLeft","stickyColumnLeastRight","groupColumnMostLeft","groupColumnMostRight","resizable","resizing","accent","acce1"],"sources":["../../../../src/Table/TableCell/styles.js"],"sourcesContent":["import { hexToRgbA } from \"@hitachivantara/uikit-react-core\";\n\nconst styles = (theme) => {\n const semiTransparentAtmo1 = hexToRgbA(theme.hv.palette.atmosphere.atmo1, 0.4);\n\n return {\n root: {\n verticalAlign: \"inherit\",\n textAlign: \"left\",\n padding: theme.hvSpacing(\"8px\", \"xs\", \"8px\", \"32px\"),\n\n borderBottom: `1px solid ${theme.hv.palette.atmosphere.atmo4}`,\n },\n\n head: {\n height: 52,\n verticalAlign: \"top\",\n\n backgroundColor: theme.hv.palette.atmosphere.atmo1,\n borderTop: `1px solid ${theme.hv.palette.atmosphere.atmo4}`,\n borderBottom: `1px solid ${theme.hv.palette.atmosphere.atmo4}`,\n ...theme.hv.typography.highlightText,\n },\n body: {\n minHeight: 32,\n \"td&\": {\n height: 32,\n },\n backgroundColor: \"inherit\",\n ...theme.hv.typography.normalText,\n\n \"&$sorted\": {\n backgroundColor: semiTransparentAtmo1,\n },\n },\n footer: {},\n\n sorted: {},\n\n alignLeft: {\n textAlign: \"left\",\n },\n alignCenter: {\n textAlign: \"center\",\n },\n alignRight: {\n textAlign: \"right\",\n flexDirection: \"row-reverse\",\n },\n alignJustify: {\n textAlign: \"justify\",\n },\n\n variantNone: {\n padding: 0,\n },\n variantCheckbox: {\n padding: 0,\n width: 32,\n maxWidth: 32,\n overflow: \"hidden\",\n borderRight: `solid 1px ${theme.hv.palette.atmosphere.atmo4}`,\n },\n variantActions: {\n padding: 0,\n width: 32,\n maxWidth: 32,\n borderLeft: `solid 1px ${theme.hv.palette.atmosphere.atmo4}`,\n },\n variantExpand: {\n paddingLeft: 0,\n paddingTop: 0,\n paddingBottom: 0,\n },\n variantList: {\n minHeight: 52,\n \"td&\": {\n height: 52,\n },\n padding: \"0, 0, 0, 32px\",\n border: 0,\n },\n variantListHead: {\n backgroundColor: \"inherit\",\n \"td&\": {\n height: 16,\n },\n },\n variantListactions: {\n borderLeft: `solid 2px ${theme.hv.palette.atmosphere.atmo2}`,\n paddingLeft: \"0\",\n textAlign: \"center\",\n width: 130,\n maxWidth: 130,\n },\n variantListcheckbox: {\n borderRight: `solid 2px ${theme.hv.palette.atmosphere.atmo2}`,\n padding: 0,\n textAlign: \"center\",\n width: 34,\n maxWidth: 34,\n },\n stickyColumn: {\n position: \"sticky\",\n zIndex: 2,\n background: theme.hv.palette.atmosphere.atmo2,\n\n \"&$groupColumnMostRight+$stickyColumn\": {\n borderLeft: 0,\n },\n\n \"&$sorted\": {\n backgroundColor: theme.hv.palette.atmosphere.atmo2,\n backgroundImage: `linear-gradient(to right, ${semiTransparentAtmo1}, ${semiTransparentAtmo1})`,\n },\n },\n stickyColumnMostLeft: {\n borderRight: `solid 1px ${theme.hv.palette.atmosphere.atmo4}`,\n },\n stickyColumnLeastRight: {\n borderLeft: `solid 1px ${theme.hv.palette.atmosphere.atmo4}`,\n },\n\n groupColumnMostLeft: {\n borderLeft: `solid 1px ${theme.hv.palette.atmosphere.atmo4}`,\n\n \"&:first-child\": {\n borderLeft: 0,\n },\n },\n groupColumnMostRight: {\n borderRight: `solid 1px ${theme.hv.palette.atmosphere.atmo4}`,\n\n // due to the \":has()\" selector not being supported in browsers,\n // this need to be managed with inline styles\n // To be uncommented when not needed (see comment in src/Table/hooks/useSticky.js)\n // \"&:last-child,&:has(+ $stickyColumnLeastRight)\": {\n \"&:last-child\": {\n borderRight: 0,\n },\n\n \"&+:not($stickyColumn)\": {\n borderLeft: 0,\n },\n },\n\n resizable: {\n borderRight: `solid 1px ${theme.hv.palette.atmosphere.atmo4}`,\n },\n\n resizing: {\n borderRight: `solid 2px ${theme.hv.palette.accent.acce1}`,\n },\n };\n};\n\nexport default styles;\n"],"mappings":";;;;;;AAAA,SAASA,SAAT,QAA0B,kCAA1B;;AAEA,MAAMC,MAAM,GAAIC,KAAD,IAAW;EACxB,MAAMC,oBAAoB,GAAGH,SAAS,CAACE,KAAK,CAACE,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BC,KAA7B,EAAoC,GAApC,CAAtC;EAEA,OAAO;IACLC,IAAI,EAAE;MAC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M;IADhD;EAjJL,CAAP;AAqJD,CAxJD;;AA0JA,eAAe5D,MAAf"}
@@ -21,6 +21,7 @@ export type HvTableHeaderClassKey =
21
21
  | "variantCheckbox"
22
22
  | "variantExpand"
23
23
  | "variantActions"
24
+ | "variantList"
24
25
  | "variantNone"
25
26
  | "sortable"
26
27
  | "sorted"
@@ -59,7 +59,7 @@ const HvTableHeader = /*#__PURE__*/forwardRef(function HvTableHeader(props, ref)
59
59
  role: role,
60
60
  scope: scope,
61
61
  style: style,
62
- className: clsx(classes.root, classes[type], className, align !== "inherit" && classes[`align${capitalize(align)}`], variant !== "default" && classes[`variant${capitalize(variant)}`], stickyColumn && classes.stickyColumn, stickyColumnMostLeft && classes.stickyColumnMostLeft, stickyColumnLeastRight && classes.stickyColumnLeastRight, groupColumnMostLeft && classes.groupColumnMostLeft, groupColumnMostRight && classes.groupColumnMostRight, sortable && classes.sortable, sorted && classes.sorted, resizable && classes.resizable, resizing && classes.resizing),
62
+ className: clsx(classes.root, classes[type], className, align !== "inherit" && classes[`align${capitalize(align)}`], variant !== "default" && classes[`variant${capitalize(variant)}`], stickyColumn && classes.stickyColumn, stickyColumnMostLeft && classes.stickyColumnMostLeft, stickyColumnLeastRight && classes.stickyColumnLeastRight, groupColumnMostLeft && classes.groupColumnMostLeft, groupColumnMostRight && classes.groupColumnMostRight, sortable && classes.sortable, sorted && classes.sorted, resizable && classes.resizable, resizing && classes.resizing, tableContext.variant === "listrow" && classes.variantList),
63
63
  "aria-sort": sortable ? sortDirection : undefined
64
64
  }, others), /*#__PURE__*/React.createElement("div", {
65
65
  className: clsx(classes.headerContent, align !== "inherit" && classes[`alignFlex${capitalize(align)}`])
@@ -329,6 +329,11 @@ process.env.NODE_ENV !== "production" ? HvTableHeader.propTypes = {
329
329
  */
330
330
  variantNone: PropTypes.string,
331
331
 
332
+ /**
333
+ * Styles applied to the component root when its variant is list row
334
+ */
335
+ variantList: PropTypes.string,
336
+
332
337
  /**
333
338
  * Styles applied to the cell when it's part of a resizable column.
334
339
  */
@@ -1 +1 @@
1
- {"version":3,"file":"TableHeader.js","names":["React","forwardRef","useContext","useMemo","PropTypes","object","clsx","capitalize","withStyles","HvButton","HvTypography","getSortIcon","isParagraph","styles","TableContext","TableSectionContext","defaultComponent","HvTableHeader","props","ref","children","component","className","style","classes","scope","scopeProp","align","variant","type","typeProp","stickyColumn","stickyColumnMostLeft","stickyColumnLeastRight","groupColumnMostLeft","groupColumnMostRight","sortDirection","sorted","sortable","headerTextProps","resizerProps","resizable","resizing","others","tableContext","tableSectionContext","isHeadCell","Sort","Component","components","Th","role","paragraph","root","undefined","headerContent","sortButton","sortIcon","headerParagraph","headerText","sortableHeaderText","resizer","propTypes","elementType","node","string","instanceOf","Object","oneOf","bool","shape","head","body","footer","alignLeft","alignRight","alignCenter","alignJustify","alignFlexLeft","alignFlexRight","alignFlexCenter","alignFlexJustify","variantCheckbox","variantExpand","variantActions","variantNone","isRequired","name"],"sources":["../../../../src/Table/TableHeader/TableHeader.js"],"sourcesContent":["import React, { forwardRef, useContext, useMemo } from \"react\";\nimport PropTypes, { object } from \"prop-types\";\nimport clsx from \"clsx\";\nimport capitalize from \"lodash/capitalize\";\n\nimport { withStyles } from \"@material-ui/core\";\nimport { HvButton, HvTypography } from \"@hitachivantara/uikit-react-core\";\nimport { getSortIcon, isParagraph } from \"./utils\";\nimport styles from \"./styles\";\nimport TableContext from \"../TableContext\";\nimport TableSectionContext from \"../TableSectionContext\";\n\nconst defaultComponent = \"th\";\n\n/**\n * `HvTableHeader` acts as a `th` element and inherits styles from its context\n */\nconst HvTableHeader = forwardRef(function HvTableHeader(props, ref) {\n const {\n children,\n\n component,\n\n className,\n style,\n classes,\n\n scope: scopeProp,\n\n align = \"inherit\",\n variant = \"default\",\n\n type: typeProp,\n\n stickyColumn = false,\n stickyColumnMostLeft = false,\n stickyColumnLeastRight = false,\n\n groupColumnMostLeft = false,\n groupColumnMostRight = false,\n\n sortDirection = \"none\",\n sorted,\n sortable,\n headerTextProps,\n\n resizerProps = {},\n resizable = false,\n resizing = false,\n\n ...others\n } = props;\n\n const tableContext = useContext(TableContext);\n const tableSectionContext = useContext(TableSectionContext);\n\n const type = typeProp || tableSectionContext?.type || \"body\";\n const isHeadCell = type === \"head\";\n\n const scope = scopeProp ?? isHeadCell ? \"col\" : \"row\";\n\n const Sort = useMemo(() => getSortIcon(sorted && sortDirection), [sorted, sortDirection]);\n\n const Component = component || tableContext?.components?.Th || defaultComponent;\n\n // eslint-disable-next-line no-nested-ternary\n const role = Component === defaultComponent ? null : isHeadCell ? \"columnheader\" : \"rowheader\";\n const paragraph = isParagraph(children);\n return (\n <Component\n ref={ref}\n role={role}\n scope={scope}\n style={style}\n className={clsx(\n classes.root,\n classes[type],\n {\n [classes[`align${capitalize(align)}`]]: align !== \"inherit\",\n [classes[`variant${capitalize(variant)}`]]: variant !== \"default\",\n\n [classes.stickyColumn]: stickyColumn,\n [classes.stickyColumnMostLeft]: stickyColumnMostLeft,\n [classes.stickyColumnLeastRight]: stickyColumnLeastRight,\n\n [classes.groupColumnMostLeft]: groupColumnMostLeft,\n [classes.groupColumnMostRight]: groupColumnMostRight,\n\n [classes.sortable]: sortable,\n [classes.sorted]: sorted,\n [classes.resizable]: resizable,\n [classes.resizing]: resizing,\n },\n className\n )}\n aria-sort={sortable ? sortDirection : undefined}\n {...others}\n >\n <div\n className={clsx(classes.headerContent, {\n [classes[`alignFlex${capitalize(align)}`]]: align !== \"inherit\",\n })}\n >\n {isHeadCell && sortable && (\n <HvButton className={classes.sortButton} icon overrideIconColors={false}>\n <Sort className={classes.sortIcon} />\n </HvButton>\n )}\n <HvTypography\n component=\"div\"\n className={clsx({\n [classes.headerText]: !paragraph,\n [classes.headerParagraph]: paragraph,\n [classes.sortableHeaderText]: sortable,\n })}\n variant=\"highlightText\"\n {...headerTextProps}\n >\n {children}\n </HvTypography>\n {resizable && <div {...resizerProps} className={classes.resizer} />}\n </div>\n </Component>\n );\n});\n\nHvTableHeader.propTypes = {\n /**\n * The component used for the root node. Either a string to use a HTML element or a component.\n * Defaults to th.\n */\n component: PropTypes.elementType,\n\n /**\n * Content to be rendered\n */\n children: PropTypes.node,\n\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * Inline styles to be applied to the root element.\n */\n style: PropTypes.instanceOf(Object),\n\n /**\n * The scope of cells that the header element relates to.\n */\n scope: PropTypes.oneOf([\"col\", \"row\", \"colgroup\", \"rowgroup\"]),\n\n /**\n * Set the text-align on the table cell content.\n */\n align: PropTypes.oneOf([\"center\", \"inherit\", \"justify\", \"left\", \"right\"]),\n /**\n * Sets the cell's variant.\n */\n variant: PropTypes.oneOf([\"checkbox\", \"expand\", \"actions\", \"default\", \"none\"]),\n\n /**\n * Specify the cell type.\n * The prop defaults to the value inherited from the parent TableHead, TableBody, or TableFooter components.\n */\n type: PropTypes.oneOf([\"body\", \"footer\", \"head\"]),\n\n /**\n * The cell is part of a sticky column.\n */\n stickyColumn: PropTypes.bool,\n /**\n * The cell is part of the last sticky to the left column.\n */\n stickyColumnMostLeft: PropTypes.bool,\n /**\n * The cell is part of the first sticky to the right column.\n */\n stickyColumnLeastRight: PropTypes.bool,\n\n /**\n * The cell is part of the first column in the group.\n */\n groupColumnMostLeft: PropTypes.bool,\n /**\n * The cell is part of the last column in the group.\n */\n groupColumnMostRight: PropTypes.bool,\n\n /**\n * Whether or not the cell is sorted\n */\n sorted: PropTypes.bool,\n /**\n * Whether or not the cell is sortable\n */\n sortable: PropTypes.bool,\n /**\n * Set sort direction icon and aria-sort.\n */\n sortDirection: PropTypes.oneOf([\"ascending\", \"descending\", false]),\n /**\n * Extra props to be passed onto the text in the header.\n */\n headerTextProps: PropTypes.instanceOf(object),\n\n /**\n * Whether or not the cell is resizable\n */\n resizable: PropTypes.bool,\n /**\n * Whether or not the cell is being resized\n */\n resizing: PropTypes.bool,\n\n /**\n * The resize props injected in the resize handler\n */\n resizerProps: PropTypes.instanceOf(object),\n\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n\n /**\n * Styles applied to the cell when it's in the table head.\n */\n head: PropTypes.string,\n /**\n * Styles applied to the cell when it's in the table body.\n */\n body: PropTypes.string,\n /**\n * Styles applied to the cell when it's in the table footer.\n */\n footer: PropTypes.string,\n\n /**\n * Styles applied to the cell when it's part of a sticky column.\n */\n stickyColumn: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of the last sticky to the left column.\n */\n stickyColumnMostLeft: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of the first right sticky column.\n */\n stickyColumnLeastRight: PropTypes.string,\n\n /**\n * Styles applied to the cell when it's part of the first column in the group.\n */\n groupColumnMostLeft: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of the last column in the group.\n */\n groupColumnMostRight: PropTypes.string,\n\n /**\n * Styles applied to the container of the header cell content.\n */\n headerContent: PropTypes.string,\n /**\n * Styles applied to the text of the header cell.\n */\n headerText: PropTypes.string,\n /**\n * Styles applied to the text of the header cell when it is a paragraph.\n */\n headerParagraph: PropTypes.string,\n /**\n * Styles applied to the text of the header cell when it is sorted.\n */\n sortableHeaderText: PropTypes.string,\n\n /**\n * Styles applied to the component root when it is sorted.\n */\n sorted: PropTypes.string,\n /**\n * Styles applied to the component root when it is sortable.\n */\n sortable: PropTypes.string,\n /**\n * Styles applied to the sort button component.\n */\n sortButton: PropTypes.string,\n /**\n * Styles applied to the sort icon component.\n */\n sortIcon: PropTypes.string,\n\n /**\n * Styles applied to the component root when it is left aligned\n */\n alignLeft: PropTypes.string,\n /**\n * Styles applied to the component root when it is right aligned\n */\n alignRight: PropTypes.string,\n /**\n * Styles applied to the component root when it is center aligned\n */\n alignCenter: PropTypes.string,\n /**\n * Styles applied to the component root when it is justified\n */\n alignJustify: PropTypes.string,\n /**\n * Styles applied to the header content when it is left aligned\n */\n alignFlexLeft: PropTypes.string,\n /**\n * Styles applied to the header content when it is right aligned\n */\n alignFlexRight: PropTypes.string,\n /**\n * Styles applied to the header content when it is center aligned\n */\n alignFlexCenter: PropTypes.string,\n /**\n * Styles applied to the header content when it is justified\n */\n alignFlexJustify: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is checkbox\n */\n variantCheckbox: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is expand\n */\n variantExpand: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is actions\n */\n variantActions: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is none\n */\n variantNone: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of a resizable column.\n */\n resizable: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of a resizing column.\n */\n resizing: PropTypes.string,\n /**\n * Styles applied to the resizer object when column is resizable.\n */\n resizer: PropTypes.string,\n }).isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvTableHeader\" })(HvTableHeader);\n"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,UAA5B,EAAwCC,OAAxC,QAAuD,OAAvD;AACA,OAAOC,SAAP,IAAoBC,MAApB,QAAkC,YAAlC;AACA,OAAOC,IAAP,MAAiB,MAAjB;AACA,OAAOC,UAAP,MAAuB,mBAAvB;AAEA,SAASC,UAAT,QAA2B,mBAA3B;AACA,SAASC,QAAT,EAAmBC,YAAnB,QAAuC,kCAAvC;AACA,SAASC,WAAT,EAAsBC,WAAtB,QAAyC,SAAzC;AACA,OAAOC,MAAP,MAAmB,UAAnB;AACA,OAAOC,YAAP,MAAyB,iBAAzB;AACA,OAAOC,mBAAP,MAAgC,wBAAhC;AAEA,MAAMC,gBAAgB,GAAG,IAAzB;AAEA;AACA;AACA;;AACA,MAAMC,aAAa,gBAAGhB,UAAU,CAAC,SAASgB,aAAT,CAAuBC,KAAvB,EAA8BC,GAA9B,EAAmC;EAAA;;EAClE,MAAM;IACJC,QADI;IAGJC,SAHI;IAKJC,SALI;IAMJC,KANI;IAOJC,OAPI;IASJC,KAAK,EAAEC,SATH;IAWJC,KAAK,GA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GJ;;IAuGvB;AACJ;AACA;IACIgB,gBAAgB,EAAE7E,SAAS,CAAC6D,MA1GL;;IA2GvB;AACJ;AACA;IACIiB,eAAe,EAAE9E,SAAS,CAAC6D,MA9GJ;;IA+GvB;AACJ;AACA;IACIkB,aAAa,EAAE/E,SAAS,CAAC6D,MAlHF;;IAmHvB;AACJ;AACA;IACImB,cAAc,EAAEhF,SAAS,CAAC6D,MAtHH;;IAuHvB;AACJ;AACA;IACIoB,WAAW,EAAEjF,SAAS,CAAC6D,MA1HA;;IA2HvB;AACJ;AACA;IACIxB,SAAS,EAAErC,SAAS,CAAC6D,MA9HE;;IA+HvB;AACJ;AACA;IACIvB,QAAQ,EAAEtC,SAAS,CAAC6D,MAlIG;;IAmIvB;AACJ;AACA;IACIJ,OAAO,EAAEzD,SAAS,CAAC6D;EAtII,CAAhB,EAuINqB;AAxOqB,CAA1B;AA2OA,eAAe9E,UAAU,CAACK,MAAD,EAAS;EAAE0E,IAAI,EAAE;AAAR,CAAT,CAAV,CAA8CtE,aAA9C,CAAf"}
1
+ {"version":3,"file":"TableHeader.js","names":["React","forwardRef","useContext","useMemo","PropTypes","object","clsx","capitalize","withStyles","HvButton","HvTypography","getSortIcon","isParagraph","styles","TableContext","TableSectionContext","defaultComponent","HvTableHeader","props","ref","children","component","className","style","classes","scope","scopeProp","align","variant","type","typeProp","stickyColumn","stickyColumnMostLeft","stickyColumnLeastRight","groupColumnMostLeft","groupColumnMostRight","sortDirection","sorted","sortable","headerTextProps","resizerProps","resizable","resizing","others","tableContext","tableSectionContext","isHeadCell","Sort","Component","components","Th","role","paragraph","root","variantList","undefined","headerContent","sortButton","sortIcon","headerParagraph","headerText","sortableHeaderText","resizer","propTypes","elementType","node","string","instanceOf","Object","oneOf","bool","shape","head","body","footer","alignLeft","alignRight","alignCenter","alignJustify","alignFlexLeft","alignFlexRight","alignFlexCenter","alignFlexJustify","variantCheckbox","variantExpand","variantActions","variantNone","isRequired","name"],"sources":["../../../../src/Table/TableHeader/TableHeader.js"],"sourcesContent":["import React, { forwardRef, useContext, useMemo } from \"react\";\nimport PropTypes, { object } from \"prop-types\";\nimport clsx from \"clsx\";\nimport capitalize from \"lodash/capitalize\";\n\nimport { withStyles } from \"@material-ui/core\";\nimport { HvButton, HvTypography } from \"@hitachivantara/uikit-react-core\";\nimport { getSortIcon, isParagraph } from \"./utils\";\nimport styles from \"./styles\";\nimport TableContext from \"../TableContext\";\nimport TableSectionContext from \"../TableSectionContext\";\n\nconst defaultComponent = \"th\";\n\n/**\n * `HvTableHeader` acts as a `th` element and inherits styles from its context\n */\nconst HvTableHeader = forwardRef(function HvTableHeader(props, ref) {\n const {\n children,\n\n component,\n\n className,\n style,\n classes,\n\n scope: scopeProp,\n\n align = \"inherit\",\n variant = \"default\",\n\n type: typeProp,\n\n stickyColumn = false,\n stickyColumnMostLeft = false,\n stickyColumnLeastRight = false,\n\n groupColumnMostLeft = false,\n groupColumnMostRight = false,\n\n sortDirection = \"none\",\n sorted,\n sortable,\n headerTextProps,\n\n resizerProps = {},\n resizable = false,\n resizing = false,\n\n ...others\n } = props;\n\n const tableContext = useContext(TableContext);\n const tableSectionContext = useContext(TableSectionContext);\n\n const type = typeProp || tableSectionContext?.type || \"body\";\n const isHeadCell = type === \"head\";\n\n const scope = scopeProp ?? isHeadCell ? \"col\" : \"row\";\n\n const Sort = useMemo(() => getSortIcon(sorted && sortDirection), [sorted, sortDirection]);\n\n const Component = component || tableContext?.components?.Th || defaultComponent;\n\n // eslint-disable-next-line no-nested-ternary\n const role = Component === defaultComponent ? null : isHeadCell ? \"columnheader\" : \"rowheader\";\n const paragraph = isParagraph(children);\n return (\n <Component\n ref={ref}\n role={role}\n scope={scope}\n style={style}\n className={clsx(\n classes.root,\n classes[type],\n {\n [classes[`align${capitalize(align)}`]]: align !== \"inherit\",\n [classes[`variant${capitalize(variant)}`]]: variant !== \"default\",\n [classes.variantList]: tableContext.variant === \"listrow\",\n [classes.stickyColumn]: stickyColumn,\n [classes.stickyColumnMostLeft]: stickyColumnMostLeft,\n [classes.stickyColumnLeastRight]: stickyColumnLeastRight,\n\n [classes.groupColumnMostLeft]: groupColumnMostLeft,\n [classes.groupColumnMostRight]: groupColumnMostRight,\n\n [classes.sortable]: sortable,\n [classes.sorted]: sorted,\n [classes.resizable]: resizable,\n [classes.resizing]: resizing,\n },\n className\n )}\n aria-sort={sortable ? sortDirection : undefined}\n {...others}\n >\n <div\n className={clsx(classes.headerContent, {\n [classes[`alignFlex${capitalize(align)}`]]: align !== \"inherit\",\n })}\n >\n {isHeadCell && sortable && (\n <HvButton className={classes.sortButton} icon overrideIconColors={false}>\n <Sort className={classes.sortIcon} />\n </HvButton>\n )}\n <HvTypography\n component=\"div\"\n className={clsx({\n [classes.headerText]: !paragraph,\n [classes.headerParagraph]: paragraph,\n [classes.sortableHeaderText]: sortable,\n })}\n variant=\"highlightText\"\n {...headerTextProps}\n >\n {children}\n </HvTypography>\n {resizable && <div {...resizerProps} className={classes.resizer} />}\n </div>\n </Component>\n );\n});\n\nHvTableHeader.propTypes = {\n /**\n * The component used for the root node. Either a string to use a HTML element or a component.\n * Defaults to th.\n */\n component: PropTypes.elementType,\n\n /**\n * Content to be rendered\n */\n children: PropTypes.node,\n\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * Inline styles to be applied to the root element.\n */\n style: PropTypes.instanceOf(Object),\n\n /**\n * The scope of cells that the header element relates to.\n */\n scope: PropTypes.oneOf([\"col\", \"row\", \"colgroup\", \"rowgroup\"]),\n\n /**\n * Set the text-align on the table cell content.\n */\n align: PropTypes.oneOf([\"center\", \"inherit\", \"justify\", \"left\", \"right\"]),\n /**\n * Sets the cell's variant.\n */\n variant: PropTypes.oneOf([\"checkbox\", \"expand\", \"actions\", \"default\", \"none\"]),\n\n /**\n * Specify the cell type.\n * The prop defaults to the value inherited from the parent TableHead, TableBody, or TableFooter components.\n */\n type: PropTypes.oneOf([\"body\", \"footer\", \"head\"]),\n\n /**\n * The cell is part of a sticky column.\n */\n stickyColumn: PropTypes.bool,\n /**\n * The cell is part of the last sticky to the left column.\n */\n stickyColumnMostLeft: PropTypes.bool,\n /**\n * The cell is part of the first sticky to the right column.\n */\n stickyColumnLeastRight: PropTypes.bool,\n\n /**\n * The cell is part of the first column in the group.\n */\n groupColumnMostLeft: PropTypes.bool,\n /**\n * The cell is part of the last column in the group.\n */\n groupColumnMostRight: PropTypes.bool,\n\n /**\n * Whether or not the cell is sorted\n */\n sorted: PropTypes.bool,\n /**\n * Whether or not the cell is sortable\n */\n sortable: PropTypes.bool,\n /**\n * Set sort direction icon and aria-sort.\n */\n sortDirection: PropTypes.oneOf([\"ascending\", \"descending\", false]),\n /**\n * Extra props to be passed onto the text in the header.\n */\n headerTextProps: PropTypes.instanceOf(object),\n\n /**\n * Whether or not the cell is resizable\n */\n resizable: PropTypes.bool,\n /**\n * Whether or not the cell is being resized\n */\n resizing: PropTypes.bool,\n\n /**\n * The resize props injected in the resize handler\n */\n resizerProps: PropTypes.instanceOf(object),\n\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n\n /**\n * Styles applied to the cell when it's in the table head.\n */\n head: PropTypes.string,\n /**\n * Styles applied to the cell when it's in the table body.\n */\n body: PropTypes.string,\n /**\n * Styles applied to the cell when it's in the table footer.\n */\n footer: PropTypes.string,\n\n /**\n * Styles applied to the cell when it's part of a sticky column.\n */\n stickyColumn: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of the last sticky to the left column.\n */\n stickyColumnMostLeft: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of the first right sticky column.\n */\n stickyColumnLeastRight: PropTypes.string,\n\n /**\n * Styles applied to the cell when it's part of the first column in the group.\n */\n groupColumnMostLeft: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of the last column in the group.\n */\n groupColumnMostRight: PropTypes.string,\n\n /**\n * Styles applied to the container of the header cell content.\n */\n headerContent: PropTypes.string,\n /**\n * Styles applied to the text of the header cell.\n */\n headerText: PropTypes.string,\n /**\n * Styles applied to the text of the header cell when it is a paragraph.\n */\n headerParagraph: PropTypes.string,\n /**\n * Styles applied to the text of the header cell when it is sorted.\n */\n sortableHeaderText: PropTypes.string,\n\n /**\n * Styles applied to the component root when it is sorted.\n */\n sorted: PropTypes.string,\n /**\n * Styles applied to the component root when it is sortable.\n */\n sortable: PropTypes.string,\n /**\n * Styles applied to the sort button component.\n */\n sortButton: PropTypes.string,\n /**\n * Styles applied to the sort icon component.\n */\n sortIcon: PropTypes.string,\n\n /**\n * Styles applied to the component root when it is left aligned\n */\n alignLeft: PropTypes.string,\n /**\n * Styles applied to the component root when it is right aligned\n */\n alignRight: PropTypes.string,\n /**\n * Styles applied to the component root when it is center aligned\n */\n alignCenter: PropTypes.string,\n /**\n * Styles applied to the component root when it is justified\n */\n alignJustify: PropTypes.string,\n /**\n * Styles applied to the header content when it is left aligned\n */\n alignFlexLeft: PropTypes.string,\n /**\n * Styles applied to the header content when it is right aligned\n */\n alignFlexRight: PropTypes.string,\n /**\n * Styles applied to the header content when it is center aligned\n */\n alignFlexCenter: PropTypes.string,\n /**\n * Styles applied to the header content when it is justified\n */\n alignFlexJustify: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is checkbox\n */\n variantCheckbox: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is expand\n */\n variantExpand: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is actions\n */\n variantActions: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is none\n */\n variantNone: PropTypes.string,\n /**\n * Styles applied to the component root when its variant is list row\n */\n variantList: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of a resizable column.\n */\n resizable: PropTypes.string,\n /**\n * Styles applied to the cell when it's part of a resizing column.\n */\n resizing: PropTypes.string,\n /**\n * Styles applied to the resizer object when column is resizable.\n */\n resizer: PropTypes.string,\n }).isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvTableHeader\" })(HvTableHeader);\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;AACA;IACIxB,QAAQ,EAAEtC,SAAS,CAAC8D,MAtIG;;IAuIvB;AACJ;AACA;IACIJ,OAAO,EAAE1D,SAAS,CAAC8D;EA1II,CAAhB,EA2INqB;AA5OqB,CAA1B;AA+OA,eAAe/E,UAAU,CAACK,MAAD,EAAS;EAAE2E,IAAI,EAAE;AAAR,CAAT,CAAV,CAA8CvE,aAA9C,CAAf"}
@@ -124,6 +124,15 @@ const styles = theme => ({
124
124
  maxWidth: 32,
125
125
  borderLeft: `solid 1px ${theme.hv.palette.atmosphere.atmo4}`
126
126
  },
127
+ variantList: {
128
+ backgroundColor: "inherit",
129
+ borderBottom: 0,
130
+ height: 16,
131
+ ":first-child > &": {
132
+ borderTop: 0,
133
+ height: 16
134
+ }
135
+ },
127
136
  stickyColumn: {
128
137
  position: "sticky",
129
138
  zIndex: 2,