@hitachivantara/uikit-react-lab 3.45.10 → 3.46.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.
- package/dist/ProgressBar/ProgressBar.d.ts +2 -8
- package/dist/ProgressBar/ProgressBar.js +3 -15
- package/dist/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/ProgressBar/ProgressBarSimulator.js +0 -2
- package/dist/ProgressBar/ProgressBarSimulator.js.map +1 -1
- package/dist/ProgressBar/styles.js +0 -5
- package/dist/ProgressBar/styles.js.map +1 -1
- package/dist/Table/Table.d.ts +5 -1
- package/dist/Table/Table.js +20 -5
- package/dist/Table/Table.js.map +1 -1
- package/dist/Table/TableBody/TableBody.js +33 -5
- package/dist/Table/TableBody/TableBody.js.map +1 -1
- package/dist/Table/TableBody/styles.js.map +1 -1
- package/dist/Table/TableCell/TableCell.d.ts +3 -1
- package/dist/Table/TableCell/TableCell.js +22 -2
- package/dist/Table/TableCell/TableCell.js.map +1 -1
- package/dist/Table/TableCell/styles.js +28 -0
- package/dist/Table/TableCell/styles.js.map +1 -1
- package/dist/Table/TableHeader/TableHeader.d.ts +1 -0
- package/dist/Table/TableHeader/TableHeader.js +6 -1
- package/dist/Table/TableHeader/TableHeader.js.map +1 -1
- package/dist/Table/TableHeader/styles.js +9 -0
- package/dist/Table/TableHeader/styles.js.map +1 -1
- package/dist/Table/TableRow/TableRow.d.ts +3 -1
- package/dist/Table/TableRow/TableRow.js +16 -2
- package/dist/Table/TableRow/TableRow.js.map +1 -1
- package/dist/Table/TableRow/styles.js +28 -3
- package/dist/Table/TableRow/styles.js.map +1 -1
- package/dist/Table/styles.js +5 -0
- package/dist/Table/styles.js.map +1 -1
- package/dist/legacy/ProgressBar/ProgressBar.d.ts +2 -8
- package/dist/legacy/ProgressBar/ProgressBar.js +3 -15
- package/dist/legacy/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/legacy/ProgressBar/ProgressBarSimulator.js +0 -2
- package/dist/legacy/ProgressBar/ProgressBarSimulator.js.map +1 -1
- package/dist/legacy/ProgressBar/styles.js +0 -5
- package/dist/legacy/ProgressBar/styles.js.map +1 -1
- package/dist/legacy/Table/Table.d.ts +5 -1
- package/dist/legacy/Table/Table.js +21 -6
- package/dist/legacy/Table/Table.js.map +1 -1
- package/dist/legacy/Table/TableBody/TableBody.js +31 -6
- package/dist/legacy/Table/TableBody/TableBody.js.map +1 -1
- package/dist/legacy/Table/TableBody/styles.js.map +1 -1
- package/dist/legacy/Table/TableCell/TableCell.d.ts +3 -1
- package/dist/legacy/Table/TableCell/TableCell.js +22 -2
- package/dist/legacy/Table/TableCell/TableCell.js.map +1 -1
- package/dist/legacy/Table/TableCell/styles.js +28 -0
- package/dist/legacy/Table/TableCell/styles.js.map +1 -1
- package/dist/legacy/Table/TableHeader/TableHeader.d.ts +1 -0
- package/dist/legacy/Table/TableHeader/TableHeader.js +6 -1
- package/dist/legacy/Table/TableHeader/TableHeader.js.map +1 -1
- package/dist/legacy/Table/TableHeader/styles.js +9 -0
- package/dist/legacy/Table/TableHeader/styles.js.map +1 -1
- package/dist/legacy/Table/TableRow/TableRow.d.ts +3 -1
- package/dist/legacy/Table/TableRow/TableRow.js +16 -2
- package/dist/legacy/Table/TableRow/TableRow.js.map +1 -1
- package/dist/legacy/Table/TableRow/styles.js +27 -3
- package/dist/legacy/Table/TableRow/styles.js.map +1 -1
- package/dist/legacy/Table/styles.js +5 -0
- package/dist/legacy/Table/styles.js.map +1 -1
- package/dist/modern/ProgressBar/ProgressBar.d.ts +2 -8
- package/dist/modern/ProgressBar/ProgressBar.js +3 -14
- package/dist/modern/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/modern/ProgressBar/ProgressBarSimulator.js +0 -2
- package/dist/modern/ProgressBar/ProgressBarSimulator.js.map +1 -1
- package/dist/modern/ProgressBar/styles.js +0 -5
- package/dist/modern/ProgressBar/styles.js.map +1 -1
- package/dist/modern/Table/Table.d.ts +5 -1
- package/dist/modern/Table/Table.js +21 -7
- package/dist/modern/Table/Table.js.map +1 -1
- package/dist/modern/Table/TableBody/TableBody.js +30 -7
- package/dist/modern/Table/TableBody/TableBody.js.map +1 -1
- package/dist/modern/Table/TableBody/styles.js.map +1 -1
- package/dist/modern/Table/TableCell/TableCell.d.ts +3 -1
- package/dist/modern/Table/TableCell/TableCell.js +22 -2
- package/dist/modern/Table/TableCell/TableCell.js.map +1 -1
- package/dist/modern/Table/TableCell/styles.js +28 -0
- package/dist/modern/Table/TableCell/styles.js.map +1 -1
- package/dist/modern/Table/TableHeader/TableHeader.d.ts +1 -0
- package/dist/modern/Table/TableHeader/TableHeader.js +6 -1
- package/dist/modern/Table/TableHeader/TableHeader.js.map +1 -1
- package/dist/modern/Table/TableHeader/styles.js +9 -0
- package/dist/modern/Table/TableHeader/styles.js.map +1 -1
- package/dist/modern/Table/TableRow/TableRow.d.ts +3 -1
- package/dist/modern/Table/TableRow/TableRow.js +16 -2
- package/dist/modern/Table/TableRow/TableRow.js.map +1 -1
- package/dist/modern/Table/TableRow/styles.js +26 -3
- package/dist/modern/Table/TableRow/styles.js.map +1 -1
- package/dist/modern/Table/styles.js +5 -0
- package/dist/modern/Table/styles.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["styles","theme","root","display","flexDirection","alignItems","justifyContent","progress","width","progressContainer","progressBarContainer","height","backgroundColor","hv","palette","atmosphere","atmo4","progressBar","progressDone","semantic","sema1","progressError","sema4","progressBarLabel"
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles","theme","root","display","flexDirection","alignItems","justifyContent","progress","width","progressContainer","progressBarContainer","height","backgroundColor","hv","palette","atmosphere","atmo4","progressBar","progressDone","semantic","sema1","progressError","sema4","progressBarLabel"],"sources":["../../../src/ProgressBar/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n\n progress: {\n width: \"100%\",\n },\n\n progressContainer: {\n width: \"100%\",\n },\n\n progressBarContainer: {\n display: \"flex\",\n width: \"100%\",\n height: 4,\n backgroundColor: theme.hv.palette.atmosphere.atmo4,\n },\n\n progressBar: {\n backgroundColor: \"#000\",\n height: 4,\n },\n\n progressDone: {\n backgroundColor: theme.hv.palette.semantic.sema1,\n },\n\n progressError: {\n backgroundColor: theme.hv.palette.semantic.sema4,\n },\n\n progressBarLabel: {\n backgroundColor: \"transparent\",\n display: \"flex\",\n justifyContent: \"end\",\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;EAAA,OAAY;IACzBC,IAAI,EAAE;MACJC,OAAO,EAAE,MADL;MAEJC,aAAa,EAAE,QAFX;MAGJC,UAAU,EAAE,QAHR;MAIJC,cAAc,EAAE;IAJZ,CADmB;IAQzBC,QAAQ,EAAE;MACRC,KAAK,EAAE;IADC,CARe;IAYzBC,iBAAiB,EAAE;MACjBD,KAAK,EAAE;IADU,CAZM;IAgBzBE,oBAAoB,EAAE;MACpBP,OAAO,EAAE,MADW;MAEpBK,KAAK,EAAE,MAFa;MAGpBG,MAAM,EAAE,CAHY;MAIpBC,eAAe,EAAEX,KAAK,CAACY,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BC;IAJzB,CAhBG;IAuBzBC,WAAW,EAAE;MACXL,eAAe,EAAE,MADN;MAEXD,MAAM,EAAE;IAFG,CAvBY;IA4BzBO,YAAY,EAAE;MACZN,eAAe,EAAEX,KAAK,CAACY,EAAN,CAASC,OAAT,CAAiBK,QAAjB,CAA0BC;IAD/B,CA5BW;IAgCzBC,aAAa,EAAE;MACbT,eAAe,EAAEX,KAAK,CAACY,EAAN,CAASC,OAAT,CAAiBK,QAAjB,CAA0BG;IAD9B,CAhCU;IAoCzBC,gBAAgB,EAAE;MAChBX,eAAe,EAAE,aADD;MAEhBT,OAAO,EAAE,MAFO;MAGhBG,cAAc,EAAE;IAHA;EApCO,CAAZ;AAAA,CAAf;;AA2CA,eAAeN,MAAf"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StandardProps } from "@material-ui/core";
|
|
2
2
|
|
|
3
|
-
export type HvTableClassKey = "root" | "stickyHeader" | "stickyColumns";
|
|
3
|
+
export type HvTableClassKey = "root" | "stickyHeader" | "stickyColumns" | "listRow";
|
|
4
4
|
|
|
5
5
|
export interface HvTableProps
|
|
6
6
|
extends StandardProps<React.TableHTMLAttributes<HTMLTableElement>, HvTableClassKey> {
|
|
@@ -20,6 +20,10 @@ export interface HvTableProps
|
|
|
20
20
|
* Whether the `HvTable` has sticky columns.
|
|
21
21
|
*/
|
|
22
22
|
stickyColumns?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Variant of table.
|
|
25
|
+
*/
|
|
26
|
+
variant?: "listrow" | "default";
|
|
23
27
|
}
|
|
24
28
|
|
|
25
29
|
export default function HvTable(props: HvTableProps): JSX.Element | null;
|
|
@@ -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
|
-
var _excluded = ["classes", "className", "component", "stickyHeader", "stickyColumns"];
|
|
4
|
-
import React, { forwardRef, useMemo } from "react";
|
|
3
|
+
var _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";
|
|
@@ -54,22 +54,27 @@ var HvTable = /*#__PURE__*/forwardRef(function HvTable(props, ref) {
|
|
|
54
54
|
stickyHeader = _props$stickyHeader === void 0 ? false : _props$stickyHeader,
|
|
55
55
|
_props$stickyColumns = props.stickyColumns,
|
|
56
56
|
stickyColumns = _props$stickyColumns === void 0 ? false : _props$stickyColumns,
|
|
57
|
+
_props$variant = props.variant,
|
|
58
|
+
variant = _props$variant === void 0 ? "default" : _props$variant,
|
|
57
59
|
others = _objectWithoutProperties(props, _excluded);
|
|
58
60
|
|
|
61
|
+
var containerRef = useRef(ref);
|
|
59
62
|
var components = useMemo(function () {
|
|
60
63
|
return computeTablePartComponents(component);
|
|
61
64
|
}, [component]);
|
|
62
65
|
var tableContext = useMemo(function () {
|
|
63
66
|
return {
|
|
64
|
-
components: components
|
|
67
|
+
components: components,
|
|
68
|
+
variant: variant,
|
|
69
|
+
containerRef: containerRef
|
|
65
70
|
};
|
|
66
|
-
}, [components]);
|
|
71
|
+
}, [components, variant, containerRef]);
|
|
67
72
|
return /*#__PURE__*/React.createElement(TableContext.Provider, {
|
|
68
73
|
value: tableContext
|
|
69
74
|
}, /*#__PURE__*/React.createElement(components.Table, _extends({
|
|
70
75
|
ref: ref,
|
|
71
76
|
role: component === defaultComponent ? null : "table",
|
|
72
|
-
className: clsx(classes.root, className, stickyHeader && classes.stickyHeader, stickyColumns && classes.stickyColumns)
|
|
77
|
+
className: clsx(classes.root, className, stickyHeader && classes.stickyHeader, stickyColumns && classes.stickyColumns, variant !== "default" && classes.listRow)
|
|
73
78
|
}, others)));
|
|
74
79
|
});
|
|
75
80
|
process.env.NODE_ENV !== "production" ? HvTable.propTypes = {
|
|
@@ -101,6 +106,11 @@ process.env.NODE_ENV !== "production" ? HvTable.propTypes = {
|
|
|
101
106
|
*/
|
|
102
107
|
stickyColumns: PropTypes.bool,
|
|
103
108
|
|
|
109
|
+
/**
|
|
110
|
+
* Whether the `HvTable` has the list row styles or the default.
|
|
111
|
+
*/
|
|
112
|
+
variant: PropTypes.oneOf(["listrow", "default"]),
|
|
113
|
+
|
|
104
114
|
/**
|
|
105
115
|
* A Jss Object used to override or extend the styles applied.
|
|
106
116
|
*/
|
|
@@ -118,7 +128,12 @@ process.env.NODE_ENV !== "production" ? HvTable.propTypes = {
|
|
|
118
128
|
/**
|
|
119
129
|
* Styles applied to the component root class when it has sticky columns.
|
|
120
130
|
*/
|
|
121
|
-
stickyColumns: PropTypes.string
|
|
131
|
+
stickyColumns: PropTypes.string,
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Styles applied to the component root class when it has sticky columns.
|
|
135
|
+
*/
|
|
136
|
+
listRow: PropTypes.string
|
|
122
137
|
}).isRequired
|
|
123
138
|
} : void 0;
|
|
124
139
|
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 }),
|
|
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,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B,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,19 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["classes", "className", "component"];
|
|
4
|
-
import
|
|
3
|
+
var _excluded = ["classes", "className", "component", "children", "withNavigation"];
|
|
4
|
+
import "core-js/modules/es.array.map.js";
|
|
5
|
+
import React, { forwardRef, useContext, useRef } from "react";
|
|
5
6
|
import PropTypes from "prop-types";
|
|
6
7
|
import clsx from "clsx";
|
|
7
8
|
import { withStyles } from "@material-ui/core";
|
|
9
|
+
import { useForkRef } from "@hitachivantara/uikit-react-core";
|
|
10
|
+
import Focus from "@hitachivantara/uikit-react-core/dist/Focus";
|
|
8
11
|
import TableContext from "../TableContext";
|
|
9
12
|
import TableSectionContext from "../TableSectionContext";
|
|
10
13
|
import styles from "./styles";
|
|
11
14
|
var tableSectionContext = {
|
|
12
|
-
type: "body"
|
|
15
|
+
type: "body",
|
|
16
|
+
filterClassName: "grid"
|
|
13
17
|
};
|
|
14
18
|
var defaultComponent = "tbody";
|
|
15
19
|
/**
|
|
@@ -17,23 +21,39 @@ var defaultComponent = "tbody";
|
|
|
17
21
|
* `HvTableCell` and `HvTableRow` elements in it inherit body-specific styles
|
|
18
22
|
*/
|
|
19
23
|
|
|
20
|
-
var HvTableBody = /*#__PURE__*/forwardRef(function HvTableBody(props,
|
|
24
|
+
var HvTableBody = /*#__PURE__*/forwardRef(function HvTableBody(props, externalRef) {
|
|
21
25
|
var _tableContext$compone;
|
|
22
26
|
|
|
23
27
|
var classes = props.classes,
|
|
24
28
|
className = props.className,
|
|
25
29
|
component = props.component,
|
|
30
|
+
children = props.children,
|
|
31
|
+
_props$withNavigation = props.withNavigation,
|
|
32
|
+
withNavigation = _props$withNavigation === void 0 ? false : _props$withNavigation,
|
|
26
33
|
others = _objectWithoutProperties(props, _excluded);
|
|
27
34
|
|
|
28
35
|
var tableContext = useContext(TableContext);
|
|
36
|
+
var bodyRef = useRef(null);
|
|
37
|
+
var handleRef = useForkRef(externalRef, bodyRef);
|
|
29
38
|
var Component = component || (tableContext === null || tableContext === void 0 ? void 0 : (_tableContext$compone = tableContext.components) === null || _tableContext$compone === void 0 ? void 0 : _tableContext$compone.TBody) || defaultComponent;
|
|
30
39
|
return /*#__PURE__*/React.createElement(TableSectionContext.Provider, {
|
|
31
40
|
value: tableSectionContext
|
|
32
41
|
}, /*#__PURE__*/React.createElement(Component, _extends({
|
|
33
42
|
className: clsx(classes.root, className),
|
|
34
|
-
ref:
|
|
43
|
+
ref: handleRef,
|
|
35
44
|
role: Component === defaultComponent ? null : "rowgroup"
|
|
36
|
-
}, others))
|
|
45
|
+
}, others), withNavigation ? children.map(function (element) {
|
|
46
|
+
return /*#__PURE__*/React.createElement(Focus, {
|
|
47
|
+
rootRef: bodyRef,
|
|
48
|
+
key: "row-".concat(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));
|
|
37
57
|
});
|
|
38
58
|
process.env.NODE_ENV !== "production" ? HvTableBody.propTypes = {
|
|
39
59
|
/**
|
|
@@ -52,6 +72,11 @@ process.env.NODE_ENV !== "production" ? HvTableBody.propTypes = {
|
|
|
52
72
|
*/
|
|
53
73
|
component: PropTypes.elementType,
|
|
54
74
|
|
|
75
|
+
/**
|
|
76
|
+
* Sets whether or not there should be arrow navigation between the table rows
|
|
77
|
+
*/
|
|
78
|
+
withNavigation: PropTypes.bool,
|
|
79
|
+
|
|
55
80
|
/**
|
|
56
81
|
* A Jss Object used to override or extend the styles applied.
|
|
57
82
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableBody.js","names":["React","forwardRef","useContext","PropTypes","clsx","withStyles","TableContext","TableSectionContext","styles","tableSectionContext","type","defaultComponent","HvTableBody","props","
|
|
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,IAAMC,mBAAmB,GAAG;EAC1BC,IAAI,EAAE,MADoB;EA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;MAGE,QAAQ,EAAC,MAHX;MAIE,SAAS,EAAC,MAJZ;MAKE,WAAW,EAAEtB,mBAAmB,CAACE,eALnC;MAME,cAAc,EAAE,CANlB;MAOE,aAAa,EAAE,KAPjB;MAQE,QAAQ,EAAEmB,OAAO,CAAChB,KAAR,CAAckB;IAR1B,GAUGF,OAVH,CADF;EAcD,CAfD,CADW,GAiBXX,QAvBN,CADF,CADF;AA6BD,CAxC6B,CAA9B;AA0CA,wCAAAN,WAAW,CAACoB,SAAZ,GAAwB;EACtB;AACF;AACA;EACEhB,SAAS,EAAEhB,SAAS,CAACiC,MAJC;;EAKtB;AACF;AACA;EACEf,QAAQ,EAAElB,SAAS,CAACkC,IARE;;EAStB;AACF;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
|
|
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,IAAMA,MAAM,GAAG,SAATA,MAAS;EAAA,OAAO;IACpBC,IAAI,EAAE;MACJC,eAAe,EAAE,SADb;MAEJC,QAAQ,EAAE,UAFN;MAGJC,MAAM,EAAE;IAHJ;EADc,CAAP;AAAA,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.
|
|
@@ -53,7 +53,7 @@ var HvTableCell = /*#__PURE__*/forwardRef(function HvTableCell(props, ref) {
|
|
|
53
53
|
ref: ref,
|
|
54
54
|
role: Component === defaultComponent ? null : "cell",
|
|
55
55
|
style: style,
|
|
56
|
-
className: clsx(classes.root, classes[type], className, align !== "inherit" && classes["align".concat(capitalize(align))], variant !== "default" && classes["variant".concat(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)
|
|
56
|
+
className: clsx(classes.root, classes[type], className, align !== "inherit" && classes["align".concat(capitalize(align))], variant !== "default" && classes["variant".concat(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])
|
|
57
57
|
}, others), children);
|
|
58
58
|
});
|
|
59
59
|
process.env.NODE_ENV !== "production" ? HvTableCell.propTypes = {
|
|
@@ -86,7 +86,7 @@ process.env.NODE_ENV !== "production" ? HvTableCell.propTypes = {
|
|
|
86
86
|
/**
|
|
87
87
|
* Sets the cell's variant.
|
|
88
88
|
*/
|
|
89
|
-
variant: PropTypes.oneOf(["checkbox", "expand", "actions", "default", "none"]),
|
|
89
|
+
variant: PropTypes.oneOf(["checkbox", "expand", "actions", "default", "listcheckbox", "listactions", "none"]),
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
92
|
* Specify the cell's type.
|
|
@@ -229,6 +229,26 @@ process.env.NODE_ENV !== "production" ? HvTableCell.propTypes = {
|
|
|
229
229
|
*/
|
|
230
230
|
variantNone: PropTypes.string,
|
|
231
231
|
|
|
232
|
+
/**
|
|
233
|
+
* Styles applied to the component root when its variant is list
|
|
234
|
+
*/
|
|
235
|
+
variantList: PropTypes.string,
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Styles applied to the cell when its variant is list and actions.
|
|
239
|
+
*/
|
|
240
|
+
variantListactions: PropTypes.string,
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Styles applied to the cell when its variant is list and checkbox.
|
|
244
|
+
*/
|
|
245
|
+
variantListcheckbox: PropTypes.string,
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Styles applied to the cell when its variant is list and the type is head .
|
|
249
|
+
*/
|
|
250
|
+
variantListHead: PropTypes.string,
|
|
251
|
+
|
|
232
252
|
/**
|
|
233
253
|
* Styles applied to the cell when it's part of a resizable column.
|
|
234
254
|
*/
|
|
@@ -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","typeProp","type","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,U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CAACsC,MA3EH;;IA4EvB;AACJ;AACA;IACIiB,WAAW,EAAEvD,SAAS,CAACsC,MA/EA;;IAiFvB;AACJ;AACA;IACIZ,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","typeProp","type","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,IAAMC,gBAAgB,GAAG,IAAzB;AAEA;AACA;AACA;;AACA,IAAMC,WAAW,gBAAGV,UAAU,CAAC,SAASU,WAAT,CAAqBC,KAArB,EAA4BC,GAA5B,EAAiC;EAAA;;EAC9D,IACEC,QADF,GA2BIF,KA3BJ,CACEE,QADF;EAAA,IAGEC,SAHF,GA2BIH,KA3BJ,CAGEG,SAHF;EAAA,IAKEC,SALF,GA2BIJ,KA3BJ,CAKEI,SALF;EAAA,IAMEC,KANF,GA2BIL,KA3BJ,CAMEK,KANF;EAAA,IAOEC,OAPF,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AAE1B,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"}
|
|
@@ -77,6 +77,34 @@ var styles = function styles(theme) {
|
|
|
77
77
|
paddingTop: 0,
|
|
78
78
|
paddingBottom: 0
|
|
79
79
|
},
|
|
80
|
+
variantList: {
|
|
81
|
+
minHeight: 52,
|
|
82
|
+
"td&": {
|
|
83
|
+
height: 52
|
|
84
|
+
},
|
|
85
|
+
padding: "0, 0, 0, 32px",
|
|
86
|
+
border: 0
|
|
87
|
+
},
|
|
88
|
+
variantListHead: {
|
|
89
|
+
backgroundColor: "inherit",
|
|
90
|
+
"td&": {
|
|
91
|
+
height: 16
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
variantListactions: {
|
|
95
|
+
borderLeft: "solid 2px ".concat(theme.hv.palette.atmosphere.atmo2),
|
|
96
|
+
paddingLeft: "0",
|
|
97
|
+
textAlign: "center",
|
|
98
|
+
width: 130,
|
|
99
|
+
maxWidth: 130
|
|
100
|
+
},
|
|
101
|
+
variantListcheckbox: {
|
|
102
|
+
borderRight: "solid 2px ".concat(theme.hv.palette.atmosphere.atmo2),
|
|
103
|
+
padding: 0,
|
|
104
|
+
textAlign: "center",
|
|
105
|
+
width: 34,
|
|
106
|
+
maxWidth: 34
|
|
107
|
+
},
|
|
80
108
|
stickyColumn: {
|
|
81
109
|
position: "sticky",
|
|
82
110
|
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","
|
|
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,IAAMC,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD,EAAW;EACxB,IAAMC,oBAAoB,GAAGH,SAAS,CAACE,KAAK,CAACE,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BC,KAA7B,EAAoC,GAApC,CAAtC;EAEA,OAAO;IACLC,IAAI,EAAE;MACJC,aAAa,EAAE,SADX;MAEJC,SAAS,EAAE,MAFP;MAGJC,OAAO,EAAET,KAAK,CAACU,SAAN,CAAgB,KAAhB,EAAuB,IAAvB,EAA6B,KAA7B,EAAoC,MAApC,CAHL;MAKJC,YAAY,sBAAeX,KAAK,CAACE,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BQ,KAA3C;IALR,CADD;IASLC,IAAI;MACFC,MAAM,EAAE,EADN;MAEFP,aAAa,EAAE,KAFb;MAIFQ,eAAe,EAAEf,KAAK,CAACE,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BC,KAJ3C;MAKFW,SAAS,sBAAehB,KAAK,CAACE,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BQ,KAA3C,CALP;MAMFD,YAAY,sBAAeX,KAAK,CAACE,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BQ,KAA3C;IANV,GAOCZ,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C,KAAK,CAACE,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BQ,KAA3C,CADS;MAGnB,iBAAiB;QACfwB,UAAU,EAAE;MADG;IAHE,CAtHhB;IA6HLmB,oBAAoB,EAAE;MACpBrB,WAAW,sBAAelC,KAAK,CAACE,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BQ,KAA3C,CADS;MAGpB;MACA;MACA;MACA;MACA,gBAAgB;QACdsB,WAAW,EAAE;MADC,CAPI;MAWpB,yBAAyB;QACvBE,UAAU,EAAE;MADW;IAXL,CA7HjB;IA6ILoB,SAAS,EAAE;MACTtB,WAAW,sBAAelC,KAAK,CAACE,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BQ,KAA3C;IADF,CA7IN;IAiJL6C,QAAQ,EAAE;MACRvB,WAAW,sBAAelC,KAAK,CAACE,EAAN,CAASC,OAAT,CAAiBuD,MAAjB,CAAwBC,KAAvC;IADH;EAjJL,CAAP;AAqJD,CAxJD;;AA0JA,eAAe5D,MAAf"}
|
|
@@ -70,7 +70,7 @@ var HvTableHeader = /*#__PURE__*/forwardRef(function HvTableHeader(props, ref) {
|
|
|
70
70
|
role: role,
|
|
71
71
|
scope: scope,
|
|
72
72
|
style: style,
|
|
73
|
-
className: clsx(classes.root, classes[type], className, align !== "inherit" && classes["align".concat(capitalize(align))], variant !== "default" && classes["variant".concat(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),
|
|
73
|
+
className: clsx(classes.root, classes[type], className, align !== "inherit" && classes["align".concat(capitalize(align))], variant !== "default" && classes["variant".concat(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),
|
|
74
74
|
"aria-sort": sortable ? sortDirection : undefined
|
|
75
75
|
}, others), /*#__PURE__*/React.createElement("div", {
|
|
76
76
|
className: clsx(classes.headerContent, align !== "inherit" && classes["alignFlex".concat(capitalize(align))])
|
|
@@ -340,6 +340,11 @@ process.env.NODE_ENV !== "production" ? HvTableHeader.propTypes = {
|
|
|
340
340
|
*/
|
|
341
341
|
variantNone: PropTypes.string,
|
|
342
342
|
|
|
343
|
+
/**
|
|
344
|
+
* Styles applied to the component root when its variant is list row
|
|
345
|
+
*/
|
|
346
|
+
variantList: PropTypes.string,
|
|
347
|
+
|
|
343
348
|
/**
|
|
344
349
|
* Styles applied to the cell when it's part of a resizable column.
|
|
345
350
|
*/
|
|
@@ -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","scopeProp","scope","align","variant","typeProp","type","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,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,CAAC6D,MA1FD;;IA2FvB;AACJ;AACA;IACIa,aAAa,EAAE1E,SAAS,CAAC6D,MA9FF;;IA+FvB;AACJ;AACA;IACIc,cAAc,EAAE3E,SAAS,CAAC6D,MAlGH;;IAmGvB;AACJ;AACA;IACIe,eAAe,EAAE5E,SAAS,CAAC6D,MAtGJ;;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","scopeProp","scope","align","variant","typeProp","type","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);\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,IAAMC,gBAAgB,GAAG,IAAzB;AAEA;AACA;AACA;;AACA,IAAMC,aAAa,gBAAGhB,UAAU,CAAC,SAASgB,aAAT,CAAuBC,KAAvB,EAA8BC,GAA9B,EAAmC;EAAA;;EAClE,IACEC,QADF,GAiCIF,KAjCJ,CACEE,QADF;EAAA,IAGEC,SAHF,GAiCIH,KAjCJ,CAGEG,SAHF;EAAA,IAKEC,SALF,GAiCIJ,KAjCJ,CAKEI,SALF;EAAA,IAMEC,KANF,GAiCIL,KAjCJ,CAMEK,KANF;EAAA,IAOEC,OAPF,GAiCIN,KAjCJ,CAOEM,OAPF;EAAA,IASSC,SATT,GAiCIP,KAjCJ,CASEQ,KATF;EAAA,mBAiCIR,KAjCJ,CAWES,KAXF;EAAA,IAWEA,KAXF,6BAWU,SAXV;EAAA,qBAiCIT,KAjCJ,CAYEU,OAZF;EAAA,IAYEA,OAZF,+BAYY,SAZZ;EAAA,IAcQC,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