@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","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":["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;;;;;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD,EAAW;EACxB,IAAMC,oBAAoB,GAAG,+BAAUD,KAAK,CAACE,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BC,KAAtC,EAA6C,GAA7C,CAA7B;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,KAAK,CAACE,EAAN,CAASe,UAAT,CAAoBC,aAPrB,CATC;IAkBLC,IAAI;MACFC,SAAS,EAAE,EADT;MAEF,OAAO;QACLN,MAAM,EAAE;MADH,CAFL;MAKFC,eAAe,EAAE;IALf,GAMCf,KAAK,CAACE,EAAN,CAASe,UAAT,CAAoBI,UANrB;MAQF,YAAY;QACVN,eAAe,EAAEd;MADP;IARV,EAlBC;IA8BLqB,MAAM,EAAE,EA9BH;IAgCLC,MAAM,EAAE,EAhC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pB,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;;eA0Je5D,M"}
|
|
@@ -109,7 +109,7 @@ var HvTableHeader = /*#__PURE__*/(0, _react.forwardRef)(function HvTableHeader(p
|
|
|
109
109
|
role: role,
|
|
110
110
|
scope: scope,
|
|
111
111
|
style: style,
|
|
112
|
-
className: (0, _clsx.default)(classes.root, classes[type], className, align !== "inherit" && classes["align".concat((0, _capitalize.default)(align))], variant !== "default" && classes["variant".concat((0, _capitalize.default)(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),
|
|
112
|
+
className: (0, _clsx.default)(classes.root, classes[type], className, align !== "inherit" && classes["align".concat((0, _capitalize.default)(align))], variant !== "default" && classes["variant".concat((0, _capitalize.default)(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),
|
|
113
113
|
"aria-sort": sortable ? sortDirection : undefined
|
|
114
114
|
}, others), /*#__PURE__*/_react.default.createElement("div", {
|
|
115
115
|
className: (0, _clsx.default)(classes.headerContent, align !== "inherit" && classes["alignFlex".concat((0, _capitalize.default)(align))])
|
|
@@ -379,6 +379,11 @@ process.env.NODE_ENV !== "production" ? HvTableHeader.propTypes = {
|
|
|
379
379
|
*/
|
|
380
380
|
variantNone: _propTypes.default.string,
|
|
381
381
|
|
|
382
|
+
/**
|
|
383
|
+
* Styles applied to the component root when its variant is list row
|
|
384
|
+
*/
|
|
385
|
+
variantList: _propTypes.default.string,
|
|
386
|
+
|
|
382
387
|
/**
|
|
383
388
|
* Styles applied to the cell when it's part of a resizable column.
|
|
384
389
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableHeader.js","names":["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","TableContext","tableSectionContext","TableSectionContext","isHeadCell","Sort","Component","components","Th","role","paragraph","root","undefined","headerContent","sortButton","sortIcon","headerParagraph","headerText","sortableHeaderText","resizer","propTypes","PropTypes","elementType","node","string","instanceOf","Object","oneOf","bool","object","shape","head","body","footer","alignLeft","alignRight","alignCenter","alignJustify","alignFlexLeft","alignFlexRight","alignFlexCenter","alignFlexJustify","variantCheckbox","variantExpand","variantActions","variantNone","isRequired","styles","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;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,IAAMA,gBAAgB,GAAG,IAAzB;AAEA;AACA;AACA;;AACA,IAAMC,aAAa,gBAAG,uBAAW,SAASA,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,K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G,MArEC;;IAsEvB;AACJ;AACA;IACIT,QAAQ,EAAEM,mBAAUG,MAzEG;;IA2EvB;AACJ;AACA;IACIU,SAAS,EAAEb,mBAAUG,MA9EE;;IA+EvB;AACJ;AACA;IACIW,UAAU,EAAEd,mBAAUG,MAlFC;;IAmFvB;AACJ;AACA;IACIY,WAAW,EAAEf,mBAAUG,MAtFA;;IAuFvB;AACJ;AACA;IACIa,YAAY,EAAEhB,mBAAUG,MA1FD;;IA2FvB;AACJ;AACA;IACIc,aAAa,EAAEjB,mBAAUG,MA9FF;;IA+FvB;AACJ;AACA;IACIe,cAAc,EAAElB,mBAAUG,MAlGH;;IAmGvB;AACJ;AACA;IACIgB,eAAe,EAAEnB,mBAAUG,MAtGJ;;IAuGvB;AACJ;AACA;IACIiB,gBAAgB,EAAEpB,mBAAUG,MA1GL;;IA2GvB;AACJ;AACA;IACIkB,eAAe,EAAErB,mBAAUG,MA9GJ;;IA+GvB;AACJ;AACA;IACImB,aAAa,EAAEtB,mBAAUG,MAlHF;;IAmHvB;AACJ;AACA;IACIoB,cAAc,EAAEvB,mBAAUG,MAtHH;;IAuHvB;AACJ;AACA;IACIqB,WAAW,EAAExB,mBAAUG,MA1HA;;IA2HvB;AACJ;AACA;IACI3B,SAAS,EAAEwB,mBAAUG,MA9HE;;IA+HvB;AACJ;AACA;IACI1B,QAAQ,EAAEuB,mBAAUG,MAlIG;;IAmIvB;AACJ;AACA;IACIL,OAAO,EAAEE,mBAAUG;EAtII,CAAhB,EAuINsB;AAxOqB,CAA1B;;eA2Oe,sBAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAA8C3E,aAA9C,C"}
|
|
1
|
+
{"version":3,"file":"TableHeader.js","names":["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","TableContext","tableSectionContext","TableSectionContext","isHeadCell","Sort","Component","components","Th","role","paragraph","root","variantList","undefined","headerContent","sortButton","sortIcon","headerParagraph","headerText","sortableHeaderText","resizer","propTypes","PropTypes","elementType","node","string","instanceOf","Object","oneOf","bool","object","shape","head","body","footer","alignLeft","alignRight","alignCenter","alignJustify","alignFlexLeft","alignFlexRight","alignFlexCenter","alignFlexJustify","variantCheckbox","variantExpand","variantActions","variantNone","isRequired","styles","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;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,IAAMA,gBAAgB,GAAG,IAAzB;AAEA;AACA;AACA;;AACA,IAAMC,aAAa,gBAAG,uBAAW,SAASA,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,QAdR,GAiCIX,KAjCJ,CAcEY,IAdF;EAAA,0BAiCIZ,KAjCJ,CAgBEa,YAhBF;EAAA,IAgBEA,YAhBF,oCAgBiB,KAhBjB;EAAA,4BAiCIb,KAjCJ,CAiBEc,oBAjBF;EAAA,IAiBEA,oBAjBF,sCAiByB,KAjBzB;EAAA,4BAiCId,KAjCJ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ACA;IACIgB,eAAe,EAAEnB,mBAAUG,MAtGJ;;IAuGvB;AACJ;AACA;IACIiB,gBAAgB,EAAEpB,mBAAUG,MA1GL;;IA2GvB;AACJ;AACA;IACIkB,eAAe,EAAErB,mBAAUG,MA9GJ;;IA+GvB;AACJ;AACA;IACImB,aAAa,EAAEtB,mBAAUG,MAlHF;;IAmHvB;AACJ;AACA;IACIoB,cAAc,EAAEvB,mBAAUG,MAtHH;;IAuHvB;AACJ;AACA;IACIqB,WAAW,EAAExB,mBAAUG,MA1HA;;IA2HvB;AACJ;AACA;IACIb,WAAW,EAAEU,mBAAUG,MA9HA;;IA+HvB;AACJ;AACA;IACI5B,SAAS,EAAEyB,mBAAUG,MAlIE;;IAmIvB;AACJ;AACA;IACI3B,QAAQ,EAAEwB,mBAAUG,MAtIG;;IAuIvB;AACJ;AACA;IACIL,OAAO,EAAEE,mBAAUG;EA1II,CAAhB,EA2INsB;AA5OqB,CAA1B;;eA+Oe,sBAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAA8C5E,aAA9C,C"}
|
|
@@ -148,6 +148,15 @@ var styles = function styles(theme) {
|
|
|
148
148
|
maxWidth: 32,
|
|
149
149
|
borderLeft: "solid 1px ".concat(theme.hv.palette.atmosphere.atmo4)
|
|
150
150
|
},
|
|
151
|
+
variantList: {
|
|
152
|
+
backgroundColor: "inherit",
|
|
153
|
+
borderBottom: 0,
|
|
154
|
+
height: 16,
|
|
155
|
+
":first-child > &": {
|
|
156
|
+
borderTop: 0,
|
|
157
|
+
height: 16
|
|
158
|
+
}
|
|
159
|
+
},
|
|
151
160
|
stickyColumn: {
|
|
152
161
|
position: "sticky",
|
|
153
162
|
zIndex: 2,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["styles","theme","root","height","verticalAlign","textAlign","padding","hvSpacing","borderBottom","palette","atmo4","head","borderTop","paddingTop","backgroundColor","atmo1","hv","typography","highlightText","transition","transitions","create","duration","shorter","paddingLeft","cursor","atmo3","visibility","body","normalText","footer","alignLeft","alignCenter","alignRight","flexDirection","alignJustify","headerContent","display","alignItems","headerText","overflow","textOverflow","headerParagraph","sortableHeaderText","alignFlexLeft","justifyContent","alignFlexCenter","alignFlexRight","alignFlexJustify","variantNone","variantCheckbox","width","maxWidth","borderRight","atmosphere","variantExpand","variantActions","borderLeft","stickyColumn","position","zIndex","stickyColumnMostLeft","stickyColumnLeastRight","groupColumnMostLeft","groupColumnMostRight","sortable","sorted","sortButton","boxShadow","sortIcon","resizable","resizing","accent","acce1","resizer","right","top","transform","touchAction"],"sources":["../../../src/Table/TableHeader/styles.js"],"sourcesContent":["import { hexToRgbA } from \"@hitachivantara/uikit-react-core\";\n\nconst styles = (theme) => ({\n root: {\n \"--first-row-cell-height\": \"52px\",\n \"--cell-height\": \"32px\",\n\n height: \"var(--cell-height)\",\n verticalAlign: \"inherit\",\n textAlign: \"left\",\n padding: theme.hvSpacing(0, \"xs\", 0, \"32px\"),\n\n borderBottom: `1px solid ${theme.palette.atmo4}`,\n },\n\n head: {\n \":first-child > &\": {\n height: \"var(--first-row-cell-height)\",\n borderTop: `1px solid ${theme.palette.atmo4}`,\n },\n\n paddingTop: 8,\n verticalAlign: \"top\",\n\n backgroundColor: theme.palette.atmo1,\n borderBottom: `1px solid ${theme.palette.atmo4}`,\n ...theme.hv.typography.highlightText,\n\n transition: theme.transitions.create(\"background-color\", {\n duration: theme.transitions.duration.shorter,\n }),\n\n \"&$sortable\": {\n verticalAlign: \"initial\",\n paddingTop: 0,\n paddingLeft: 0,\n cursor: \"pointer\",\n\n \"&:hover\": {\n backgroundColor: theme.palette.atmo3,\n\n \"& $sortIcon\": {\n visibility: \"visible\",\n },\n },\n \"&:focus-within\": {\n backgroundColor: theme.palette.atmo3,\n\n \"& $sortIcon\": {\n visibility: \"visible\",\n },\n },\n // IE fallback code (using focus-within-polyfill)\n \"&.focus-within\": {\n backgroundColor: theme.palette.atmo3,\n\n \"& $sortIcon\": {\n visibility: \"visible\",\n },\n },\n },\n },\n body: {\n backgroundColor: \"inherit\",\n ...theme.hv.typography.normalText,\n\n \"&$sortable:not($variantNone)\": {\n paddingLeft: 32,\n },\n \"&$sorted\": {\n backgroundColor: hexToRgbA(theme.palette.atmo1, 0.4),\n },\n },\n footer: {},\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 headerContent: {\n display: \"flex\",\n alignItems: \"flex-start\",\n },\n headerText: {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n },\n headerParagraph: {\n overflow: \"hidden\",\n display: \"-webkit-box\",\n \"-webkit-line-clamp\": 2,\n \"-webkit-box-orient\": \"vertical\",\n },\n sortableHeaderText: {\n paddingTop: \"8px\",\n },\n alignFlexLeft: {\n justifyContent: \"flex-start\",\n },\n alignFlexCenter: {\n justifyContent: \"center\",\n },\n alignFlexRight: {\n justifyContent: \"flex-end\",\n },\n alignFlexJustify: {\n textAlign: \"justify\",\n },\n\n variantNone: {\n padding: 0,\n },\n variantCheckbox: {\n padding: 0,\n width: 32,\n maxWidth: 32,\n borderRight: `solid 1px ${theme.hv.palette.atmosphere.atmo4}`,\n },\n variantExpand: {},\n variantActions: {\n padding: 0,\n width: 32,\n maxWidth: 32,\n borderLeft: `solid 1px ${theme.hv.palette.atmosphere.atmo4}`,\n },\n\n stickyColumn: {\n position: \"sticky\",\n zIndex: 2,\n\n \"&$groupColumnMostRight+$stickyColumn\": {\n borderLeft: 0,\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 sortable: {},\n sorted: {\n \"& $sortIcon\": {\n visibility: \"visible\",\n },\n },\n sortButton: {\n \"$root$sortable &\": {\n boxShadow: \"none\",\n backgroundColor: \"transparent\",\n },\n },\n sortIcon: {\n display: \"inline-flex\",\n visibility: \"hidden\",\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 resizer: {\n display: \"inline-block\",\n width: 10,\n height: \"100%\",\n position: \"absolute\",\n right: 0,\n top: 0,\n transform: \"translateX(50%)\",\n zIndex: 1,\n touchAction: \"none\",\n },\n});\n\nexport default styles;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;EAAA,OAAY;IACzBC,IAAI,EAAE;MACJ,2BAA2B,MADvB;MAEJ,iBAAiB,MAFb;MAIJC,MAAM,EAAE,oBAJJ;MAKJC,aAAa,EAAE,SALX;MAMJC,SAAS,EAAE,MANP;MAOJC,OAAO,EAAEL,KAAK,CAACM,SAAN,CAAgB,CAAhB,EAAmB,IAAnB,EAAyB,CAAzB,EAA4B,MAA5B,CAPL;MASJC,YAAY,sBAAeP,KAAK,CAACQ,OAAN,CAAcC,KAA7B;IATR,CADmB;IAazBC,IAAI;MACF,oBAAoB;QAClBR,MAAM,EAAE,8BADU;QAElBS,SAAS,sBAAeX,KAAK,CAACQ,OAAN,CAAcC,KAA7B;MAF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;IADH,CAjMe;IAqMzBC,OAAO,EAAE;MACPrC,OAAO,EAAE,cADF;MAEPc,KAAK,EAAE,EAFA;MAGPhD,MAAM,EAAE,MAHD;MAIPwD,QAAQ,EAAE,UAJH;MAKPgB,KAAK,EAAE,CALA;MAMPC,GAAG,EAAE,CANE;MAOPC,SAAS,EAAE,iBAPJ;MAQPjB,MAAM,EAAE,CARD;MASPkB,WAAW,EAAE;IATN;EArMgB,CAAZ;AAAA,CAAf;;eAkNe9E,M"}
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles","theme","root","height","verticalAlign","textAlign","padding","hvSpacing","borderBottom","palette","atmo4","head","borderTop","paddingTop","backgroundColor","atmo1","hv","typography","highlightText","transition","transitions","create","duration","shorter","paddingLeft","cursor","atmo3","visibility","body","normalText","footer","alignLeft","alignCenter","alignRight","flexDirection","alignJustify","headerContent","display","alignItems","headerText","overflow","textOverflow","headerParagraph","sortableHeaderText","alignFlexLeft","justifyContent","alignFlexCenter","alignFlexRight","alignFlexJustify","variantNone","variantCheckbox","width","maxWidth","borderRight","atmosphere","variantExpand","variantActions","borderLeft","variantList","stickyColumn","position","zIndex","stickyColumnMostLeft","stickyColumnLeastRight","groupColumnMostLeft","groupColumnMostRight","sortable","sorted","sortButton","boxShadow","sortIcon","resizable","resizing","accent","acce1","resizer","right","top","transform","touchAction"],"sources":["../../../src/Table/TableHeader/styles.js"],"sourcesContent":["import { hexToRgbA } from \"@hitachivantara/uikit-react-core\";\n\nconst styles = (theme) => ({\n root: {\n \"--first-row-cell-height\": \"52px\",\n \"--cell-height\": \"32px\",\n\n height: \"var(--cell-height)\",\n verticalAlign: \"inherit\",\n textAlign: \"left\",\n padding: theme.hvSpacing(0, \"xs\", 0, \"32px\"),\n\n borderBottom: `1px solid ${theme.palette.atmo4}`,\n },\n\n head: {\n \":first-child > &\": {\n height: \"var(--first-row-cell-height)\",\n borderTop: `1px solid ${theme.palette.atmo4}`,\n },\n\n paddingTop: 8,\n verticalAlign: \"top\",\n\n backgroundColor: theme.palette.atmo1,\n borderBottom: `1px solid ${theme.palette.atmo4}`,\n ...theme.hv.typography.highlightText,\n\n transition: theme.transitions.create(\"background-color\", {\n duration: theme.transitions.duration.shorter,\n }),\n\n \"&$sortable\": {\n verticalAlign: \"initial\",\n paddingTop: 0,\n paddingLeft: 0,\n cursor: \"pointer\",\n\n \"&:hover\": {\n backgroundColor: theme.palette.atmo3,\n\n \"& $sortIcon\": {\n visibility: \"visible\",\n },\n },\n \"&:focus-within\": {\n backgroundColor: theme.palette.atmo3,\n\n \"& $sortIcon\": {\n visibility: \"visible\",\n },\n },\n // IE fallback code (using focus-within-polyfill)\n \"&.focus-within\": {\n backgroundColor: theme.palette.atmo3,\n\n \"& $sortIcon\": {\n visibility: \"visible\",\n },\n },\n },\n },\n body: {\n backgroundColor: \"inherit\",\n ...theme.hv.typography.normalText,\n\n \"&$sortable:not($variantNone)\": {\n paddingLeft: 32,\n },\n \"&$sorted\": {\n backgroundColor: hexToRgbA(theme.palette.atmo1, 0.4),\n },\n },\n footer: {},\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 headerContent: {\n display: \"flex\",\n alignItems: \"flex-start\",\n },\n headerText: {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n },\n headerParagraph: {\n overflow: \"hidden\",\n display: \"-webkit-box\",\n \"-webkit-line-clamp\": 2,\n \"-webkit-box-orient\": \"vertical\",\n },\n sortableHeaderText: {\n paddingTop: \"8px\",\n },\n alignFlexLeft: {\n justifyContent: \"flex-start\",\n },\n alignFlexCenter: {\n justifyContent: \"center\",\n },\n alignFlexRight: {\n justifyContent: \"flex-end\",\n },\n alignFlexJustify: {\n textAlign: \"justify\",\n },\n\n variantNone: {\n padding: 0,\n },\n variantCheckbox: {\n padding: 0,\n width: 32,\n maxWidth: 32,\n borderRight: `solid 1px ${theme.hv.palette.atmosphere.atmo4}`,\n },\n variantExpand: {},\n variantActions: {\n padding: 0,\n width: 32,\n maxWidth: 32,\n borderLeft: `solid 1px ${theme.hv.palette.atmosphere.atmo4}`,\n },\n variantList: {\n backgroundColor: \"inherit\",\n borderBottom: 0,\n height: 16,\n \":first-child > &\": {\n borderTop: 0,\n height: 16,\n },\n },\n stickyColumn: {\n position: \"sticky\",\n zIndex: 2,\n\n \"&$groupColumnMostRight+$stickyColumn\": {\n borderLeft: 0,\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 sortable: {},\n sorted: {\n \"& $sortIcon\": {\n visibility: \"visible\",\n },\n },\n sortButton: {\n \"$root$sortable &\": {\n boxShadow: \"none\",\n backgroundColor: \"transparent\",\n },\n },\n sortIcon: {\n display: \"inline-flex\",\n visibility: \"hidden\",\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 resizer: {\n display: \"inline-block\",\n width: 10,\n height: \"100%\",\n position: \"absolute\",\n right: 0,\n top: 0,\n transform: \"translateX(50%)\",\n zIndex: 1,\n touchAction: \"none\",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,EAAE;MACpBZ,WAAW,sBAAepD,KAAK,CAACe,EAAN,CAASP,OAAT,CAAiB6C,UAAjB,CAA4B5C,KAA3C,CADS;MAGpB;MACA;MACA;MACA;MACA,gBAAgB;QACd2C,WAAW,EAAE;MADC,CAPI;MAWpB,yBAAyB;QACvBI,UAAU,EAAE;MADW;IAXL,CApKG;IAoLzBS,QAAQ,EAAE,EApLe;IAqLzBC,MAAM,EAAE;MACN,eAAe;QACbxC,UAAU,EAAE;MADC;IADT,CArLiB;IA0LzByC,UAAU,EAAE;MACV,oBAAoB;QAClBC,SAAS,EAAE,MADO;QAElBvD,eAAe,EAAE;MAFC;IADV,CA1La;IAgMzBwD,QAAQ,EAAE;MACRjC,OAAO,EAAE,aADD;MAERV,UAAU,EAAE;IAFJ,CAhMe;IAqMzB4C,SAAS,EAAE;MACTlB,WAAW,sBAAepD,KAAK,CAACe,EAAN,CAASP,OAAT,CAAiB6C,UAAjB,CAA4B5C,KAA3C;IADF,CArMc;IAyMzB8D,QAAQ,EAAE;MACRnB,WAAW,sBAAepD,KAAK,CAACe,EAAN,CAASP,OAAT,CAAiBgE,MAAjB,CAAwBC,KAAvC;IADH,CAzMe;IA6MzBC,OAAO,EAAE;MACPtC,OAAO,EAAE,cADF;MAEPc,KAAK,EAAE,EAFA;MAGPhD,MAAM,EAAE,MAHD;MAIPyD,QAAQ,EAAE,UAJH;MAKPgB,KAAK,EAAE,CALA;MAMPC,GAAG,EAAE,CANE;MAOPC,SAAS,EAAE,iBAPJ;MAQPjB,MAAM,EAAE,CARD;MASPkB,WAAW,EAAE;IATN;EA7MgB,CAAZ;AAAA,CAAf;;eA0Ne/E,M"}
|
|
@@ -8,7 +8,9 @@ export type HvTableRowClassKey =
|
|
|
8
8
|
| "hover"
|
|
9
9
|
| "selected"
|
|
10
10
|
| "expanded"
|
|
11
|
-
| "striped"
|
|
11
|
+
| "striped"
|
|
12
|
+
| "variantList"
|
|
13
|
+
| "variantListHead";
|
|
12
14
|
|
|
13
15
|
export interface HvTableRowProps
|
|
14
16
|
extends StandardProps<React.HTMLAttributes<HTMLTableRowElement>, HvTableRowClassKey> {
|
|
@@ -68,10 +68,14 @@ var HvTableRow = /*#__PURE__*/(0, _react.forwardRef)(function HvTableRow(props,
|
|
|
68
68
|
var tableContext = (0, _react.useContext)(_TableContext.default);
|
|
69
69
|
var tableSectionContext = (0, _react.useContext)(_TableSectionContext.default);
|
|
70
70
|
var type = (tableSectionContext === null || tableSectionContext === void 0 ? void 0 : tableSectionContext.type) || "body";
|
|
71
|
+
var isList = tableContext.variant === "listrow";
|
|
71
72
|
var Component = component || (tableContext === null || tableContext === void 0 ? void 0 : (_tableContext$compone = tableContext.components) === null || _tableContext$compone === void 0 ? void 0 : _tableContext$compone.Tr) || defaultComponent;
|
|
72
73
|
return /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({
|
|
73
74
|
ref: ref,
|
|
74
|
-
className: (0, _clsx.default)(classes.root, classes[type],
|
|
75
|
+
className: (0, _clsx.default)(classes.root, classes[type], tableSectionContext.filterClassName, className, isList && {
|
|
76
|
+
"body": classes.variantList,
|
|
77
|
+
"head": classes.variantListHead
|
|
78
|
+
}[type], hover && classes.hover, selected && classes.selected, expanded && classes.expanded, striped && classes.striped),
|
|
75
79
|
role: Component === defaultComponent ? null : "row"
|
|
76
80
|
}, others));
|
|
77
81
|
});
|
|
@@ -154,7 +158,17 @@ process.env.NODE_ENV !== "production" ? HvTableRow.propTypes = {
|
|
|
154
158
|
/**
|
|
155
159
|
* Styles applied to the component root when inside a `HvTableFooter`.
|
|
156
160
|
*/
|
|
157
|
-
footer: _propTypes.default.string
|
|
161
|
+
footer: _propTypes.default.string,
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Styles applied to the component root when its table variant is list.
|
|
165
|
+
*/
|
|
166
|
+
variantList: _propTypes.default.string,
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Styles applied to the component root when its table variant is list.
|
|
170
|
+
*/
|
|
171
|
+
variantListHead: _propTypes.default.string
|
|
158
172
|
}).isRequired
|
|
159
173
|
} : void 0;
|
|
160
174
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableRow.js","names":["defaultComponent","HvTableRow","props","ref","classes","className","component","hover","selected","expanded","striped","others","tableContext","TableContext","tableSectionContext","TableSectionContext","type","Component","components","Tr","root","propTypes","PropTypes","elementType","children","node","string","bool","shape","head","body","footer","isRequired","styles","name"],"sources":["../../../src/Table/TableRow/TableRow.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 styles from \"./styles\";\nimport TableContext from \"../TableContext\";\nimport TableSectionContext from \"../TableSectionContext\";\n\nconst defaultComponent = \"tr\";\n\n/**\n * `HvTableRow` acts as a `tr` element and inherits styles from its context\n */\nconst HvTableRow = forwardRef(function HvTableRow(props, ref) {\n const {\n classes,\n className,\n component,\n hover = false,\n selected = false,\n expanded = false,\n striped = false,\n ...others\n } = props;\n\n const tableContext = useContext(TableContext);\n const tableSectionContext = useContext(TableSectionContext);\n\n const type = tableSectionContext?.type || \"body\";\n\n const Component = component || tableContext?.components?.Tr || defaultComponent;\n\n return (\n <Component\n ref={ref}\n className={clsx(\n classes.root,\n classes[type],\n {\n [classes.hover]: hover,\n [classes.selected]: selected,\n [classes.expanded]: expanded,\n [classes.striped]: striped,\n },\n className\n )}\n role={Component === defaultComponent ? null : \"row\"}\n {...others}\n />\n );\n});\n\nHvTableRow.propTypes = {\n /**\n * The component used for the root node. Either a string to use a HTML element or a component.\n * Defaults to tr.\n */\n component: PropTypes.elementType,\n
|
|
1
|
+
{"version":3,"file":"TableRow.js","names":["defaultComponent","HvTableRow","props","ref","classes","className","component","hover","selected","expanded","striped","others","tableContext","TableContext","tableSectionContext","TableSectionContext","type","isList","variant","Component","components","Tr","root","filterClassName","variantList","variantListHead","propTypes","PropTypes","elementType","children","node","string","bool","shape","head","body","footer","isRequired","styles","name"],"sources":["../../../src/Table/TableRow/TableRow.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 styles from \"./styles\";\nimport TableContext from \"../TableContext\";\nimport TableSectionContext from \"../TableSectionContext\";\n\nconst defaultComponent = \"tr\";\n\n/**\n * `HvTableRow` acts as a `tr` element and inherits styles from its context\n */\nconst HvTableRow = forwardRef(function HvTableRow(props, ref) {\n const {\n classes,\n className,\n component,\n hover = false,\n selected = false,\n expanded = false,\n striped = false,\n ...others\n } = props;\n\n const tableContext = useContext(TableContext);\n const tableSectionContext = useContext(TableSectionContext);\n\n const type = tableSectionContext?.type || \"body\";\n\n const isList = tableContext.variant === \"listrow\";\n\n const Component = component || tableContext?.components?.Tr || defaultComponent;\n\n return (\n <Component\n ref={ref}\n className={clsx(\n classes.root,\n classes[type],\n {\n [classes.hover]: hover,\n [classes.selected]: selected,\n [classes.expanded]: expanded,\n [classes.striped]: striped,\n [classes.variantList]: isList && type === \"body\",\n [classes.variantListHead]: isList && type === \"head\",\n },\n tableSectionContext.filterClassName,\n className\n )}\n role={Component === defaultComponent ? null : \"row\"}\n {...others}\n />\n );\n});\n\nHvTableRow.propTypes = {\n /**\n * The component used for the root node. Either a string to use a HTML element or a component.\n * Defaults to tr.\n */\n component: PropTypes.elementType,\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 /**\n * Whether the table row will shade on hover.\n */\n hover: PropTypes.bool,\n /**\n * Whether the table row will have the selected shading.\n */\n selected: PropTypes.bool,\n /**\n * Whether the table row is expanded.\n */\n expanded: PropTypes.bool,\n /**\n * Whether the table row background is striped.\n */\n striped: 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 component root when selected.\n */\n selected: PropTypes.string,\n /**\n * Styles applied to the component root when expanded.\n */\n expanded: PropTypes.string,\n /**\n * Styles applied to the component root when striped.\n */\n striped: PropTypes.string,\n /**\n * Styles applied to the component root on hover.\n */\n hover: PropTypes.string,\n /**\n * Styles applied to the component root when inside a `HvTableHead`.\n */\n head: PropTypes.string,\n /**\n * Styles applied to the component root when inside a `HvTableBody`.\n */\n body: PropTypes.string,\n /**\n * Styles applied to the component root when inside a `HvTableFooter`.\n */\n footer: PropTypes.string,\n /**\n * Styles applied to the component root when its table variant is list.\n */\n variantList: PropTypes.string,\n /**\n * Styles applied to the component root when its table variant is list.\n */\n variantListHead: PropTypes.string,\n }).isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvTableRow\" })(HvTableRow);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;;;;;;;AAEA,IAAMA,gBAAgB,GAAG,IAAzB;AAEA;AACA;AACA;;AACA,IAAMC,UAAU,gBAAG,uBAAW,SAASA,UAAT,CAAoBC,KAApB,EAA2BC,GAA3B,EAAgC;EAAA;;EAC5D,IACEC,OADF,GASIF,KATJ,CACEE,OADF;EAAA,IAEEC,SAFF,GASIH,KATJ,CAEEG,SAFF;EAAA,IAGEC,SAHF,GASIJ,KATJ,CAGEI,SAHF;EAAA,mBASIJ,KATJ,CAIEK,KAJF;EAAA,IAIEA,KAJF,6BAIU,KAJV;EAAA,sBASIL,KATJ,CAKEM,QALF;EAAA,IAKEA,QALF,gCAKa,KALb;EAAA,sBASIN,KATJ,CAMEO,QANF;EAAA,IAMEA,QANF,gCAMa,KANb;EAAA,qBASIP,KATJ,CAOEQ,OAPF;EAAA,IAOEA,OAPF,+BAOY,KAPZ;EAAA,IAQKC,MARL,0CASIT,KATJ;EAWA,IAAMU,YAAY,GAAG,uBAAWC,qBAAX,CAArB;EACA,IAAMC,mBAAmB,GAAG,uBAAWC,4B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IA3BC;;EA4BrB;AACF;AACA;EACEtB,OAAO,EAAEiB,mBAAUK,IA/BE;;EAgCrB;AACF;AACA;EACE5B,OAAO,EAAEuB,mBAAUM,KAAV,CAAgB;IACvB;AACJ;AACA;IACIX,IAAI,EAAEK,mBAAUI,MAJO;;IAKvB;AACJ;AACA;IACIvB,QAAQ,EAAEmB,mBAAUI,MARG;;IASvB;AACJ;AACA;IACItB,QAAQ,EAAEkB,mBAAUI,MAZG;;IAavB;AACJ;AACA;IACIrB,OAAO,EAAEiB,mBAAUI,MAhBI;;IAiBvB;AACJ;AACA;IACIxB,KAAK,EAAEoB,mBAAUI,MApBM;;IAqBvB;AACJ;AACA;IACIG,IAAI,EAAEP,mBAAUI,MAxBO;;IAyBvB;AACJ;AACA;IACII,IAAI,EAAER,mBAAUI,MA5BO;;IA6BvB;AACJ;AACA;IACIK,MAAM,EAAET,mBAAUI,MAhCK;;IAiCvB;AACJ;AACA;IACIP,WAAW,EAAEG,mBAAUI,MApCA;;IAqCvB;AACJ;AACA;IACIN,eAAe,EAAEE,mBAAUI;EAxCJ,CAAhB,EAyCNM;AA5EkB,CAAvB;;eA+Ee,sBAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAA2CtC,UAA3C,C"}
|
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
+
require("core-js/modules/es.array.concat.js");
|
|
9
|
+
|
|
8
10
|
var _core = require("@material-ui/core");
|
|
9
11
|
|
|
10
12
|
var _styles = require("@material-ui/core/styles");
|
|
@@ -31,9 +33,7 @@ var styles = function styles(theme) {
|
|
|
31
33
|
},
|
|
32
34
|
body: {},
|
|
33
35
|
footer: {},
|
|
34
|
-
selected: {
|
|
35
|
-
backgroundColor: theme.palette.atmo1
|
|
36
|
-
},
|
|
36
|
+
selected: {},
|
|
37
37
|
expanded: {
|
|
38
38
|
backgroundColor: theme.palette.atmo1,
|
|
39
39
|
"& > *[role=cell]": {
|
|
@@ -52,6 +52,31 @@ var styles = function styles(theme) {
|
|
|
52
52
|
"&:hover": {
|
|
53
53
|
backgroundColor: theme.palette.atmo3
|
|
54
54
|
}
|
|
55
|
+
},
|
|
56
|
+
variantList: {
|
|
57
|
+
borderBottom: 0,
|
|
58
|
+
backgroundColor: theme.palette.atmo1,
|
|
59
|
+
height: 52,
|
|
60
|
+
"&$selected": {
|
|
61
|
+
boxShadow: "1px 1px ".concat(theme.hv.palette.accent.acce1, ", -1px -1px ").concat(theme.hv.palette.accent.acce1, ", -1px 1px ").concat(theme.hv.palette.accent.acce1, ", 1px -1px ").concat(theme.hv.palette.accent.acce1),
|
|
62
|
+
"&:hover": {
|
|
63
|
+
boxShadow: "1px 1px ".concat(theme.hv.palette.accent.acce1, ", -1px -1px ").concat(theme.hv.palette.accent.acce1, ", -1px 1px ").concat(theme.hv.palette.accent.acce1, ", 1px -1px ").concat(theme.hv.palette.accent.acce1),
|
|
64
|
+
background: theme.hv.palette.atmosphere.atmo1
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"&:hover": {
|
|
68
|
+
boxShadow: "1px 1px ".concat(theme.hv.palette.atmosphere.atmo4, ", -1px -1px ").concat(theme.hv.palette.atmosphere.atmo4, ", -1px 1px ").concat(theme.hv.palette.atmosphere.atmo4, ", 1px -1px ").concat(theme.hv.palette.atmosphere.atmo4),
|
|
69
|
+
background: theme.hv.palette.atmosphere.atmo1
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
variantListHead: {
|
|
73
|
+
height: 16,
|
|
74
|
+
"&:first-child": {
|
|
75
|
+
height: 16
|
|
76
|
+
},
|
|
77
|
+
"tr&:first-child": {
|
|
78
|
+
height: 16
|
|
79
|
+
}
|
|
55
80
|
}
|
|
56
81
|
};
|
|
57
82
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["styles","theme","root","color","backgroundColor","verticalAlign","outline","minHeight","height","head","body","footer","selected","
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles","theme","root","color","backgroundColor","verticalAlign","outline","minHeight","height","head","body","footer","selected","expanded","palette","atmo1","borderBottom","striped","hover","transition","transitions","create","duration","shortest","atmo3","variantList","boxShadow","hv","accent","acce1","background","atmosphere","atmo4","variantListHead"],"sources":["../../../src/Table/TableRow/styles.js"],"sourcesContent":["import { hexToRgb } from \"@material-ui/core\";\nimport { alpha } from \"@material-ui/core/styles\";\n\nconst styles = (theme) => ({\n root: {\n color: \"inherit\",\n backgroundColor: \"inherit\",\n verticalAlign: \"middle\",\n outline: 0,\n minHeight: 32,\n \"tr&\": {\n height: 32,\n },\n },\n head: {\n \"&:first-child\": {\n height: 52,\n },\n\n \"tr&:first-child\": {\n height: 52,\n },\n },\n body: {},\n footer: {},\n selected: {},\n expanded: {\n backgroundColor: theme.palette.atmo1,\n \"& > *[role=cell]\": {\n borderBottom: \"none\",\n },\n },\n striped: {\n \"&:nth-child(even)\": {\n backgroundColor: alpha(hexToRgb(theme.palette.atmo1), 0.6),\n },\n },\n hover: {\n transition: theme.transitions.create(\"background-color\", {\n duration: theme.transitions.duration.shortest,\n }),\n\n \"&:hover\": {\n backgroundColor: theme.palette.atmo3,\n },\n },\n variantList: {\n borderBottom: 0,\n backgroundColor: theme.palette.atmo1,\n height: 52,\n \"&$selected\": {\n boxShadow: `1px 1px ${theme.hv.palette.accent.acce1}, -1px -1px ${theme.hv.palette.accent.acce1}, -1px 1px ${theme.hv.palette.accent.acce1}, 1px -1px ${theme.hv.palette.accent.acce1}`,\n\n \"&:hover\": {\n boxShadow: `1px 1px ${theme.hv.palette.accent.acce1}, -1px -1px ${theme.hv.palette.accent.acce1}, -1px 1px ${theme.hv.palette.accent.acce1}, 1px -1px ${theme.hv.palette.accent.acce1}`,\n background: theme.hv.palette.atmosphere.atmo1,\n },\n },\n\n \"&:hover\": {\n boxShadow: `1px 1px ${theme.hv.palette.atmosphere.atmo4}, -1px -1px ${theme.hv.palette.atmosphere.atmo4}, -1px 1px ${theme.hv.palette.atmosphere.atmo4}, 1px -1px ${theme.hv.palette.atmosphere.atmo4}`,\n background: theme.hv.palette.atmosphere.atmo1,\n },\n },\n variantListHead: {\n height: 16,\n \"&:first-child\": {\n height: 16,\n },\n\n \"tr&:first-child\": {\n height: 16,\n },\n },\n});\n\nexport default styles;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;EAAA,OAAY;IACzBC,IAAI,EAAE;MACJC,KAAK,EAAE,SADH;MAEJC,eAAe,EAAE,SAFb;MAGJC,aAAa,EAAE,QAHX;MAIJC,OAAO,EAAE,CAJL;MAKJC,SAAS,EAAE,EALP;MAMJ,OAAO;QACLC,MAAM,EAAE;MADH;IANH,CADmB;IAWzBC,IAAI,EAAE;MACJ,iBAAiB;QACfD,MAAM,EAAE;MADO,CADb;MAKJ,mBAAmB;QACjBA,MAAM,EAAE;MADS;IALf,CAXmB;IAoBzBE,IAAI,EAAE,EApBmB;IAqBzBC,MAAM,EAAE,EArBiB;IAsBzBC,QAAQ,EAAE,EAtBe;IAuBzBC,QAAQ,EAAE;MACRT,eAAe,EAAEH,KAAK,CAACa,OAAN,CAAcC,KADvB;MAER,oBAAoB;QAClBC,YAAY,EAAE;MADI;IAFZ,CAvBe;IA6BzBC,OAAO,EAAE;MACP,qBAAqB;QACnBb,eAAe,EAAE,mBAAM,oBAASH,KAAK,CAACa,OAAN,CAAcC,KAAvB,CAAN,EAAqC,GAArC;MADE;IADd,CA7BgB;IAkCzBG,KAAK,EAAE;MACLC,UAAU,EAAElB,KAAK,CAACmB,WAAN,CAAkBC,MAAlB,CAAyB,kBAAzB,EAA6C;QACvDC,QAAQ,EAAErB,KAAK,CAACmB,WAAN,CAAkBE,QAAlB,CAA2BC;MADkB,CAA7C,CADP;MAKL,WAAW;QACTnB,eAAe,EAAEH,KAAK,CAACa,OAAN,CAAcU;MAD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AAE7B,KAAK,CAAC0B,EAAN,CAASb,OAAT,CAAiBiB,UAAjB,CAA4BhB;MAF/B;IAbA,CA3CY;IA6DzBkB,eAAe,EAAE;MACfzB,MAAM,EAAE,EADO;MAEf,iBAAiB;QACfA,MAAM,EAAE;MADO,CAFF;MAMf,mBAAmB;QACjBA,MAAM,EAAE;MADS;IANJ;EA7DQ,CAAZ;AAAA,CAAf;;eAyEeR,M"}
|
package/dist/Table/styles.js
CHANGED
package/dist/Table/styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["styles","theme","root","position","width","hv","typography","normalText","borderSpacing","padding","spacing","textAlign","captionSide","stickyHeader","stickyColumns","backgroundColor","palette","atmosphere","atmo2"],"sources":["../../src/Table/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n position: \"relative\",\n width: \"100%\",\n\n ...theme.hv.typography.normalText,\n\n \"table&\": {\n borderSpacing: 0,\n },\n\n \"& caption\": {\n ...theme.typography.normalText,\n padding: theme.spacing(\"xs\"),\n textAlign: \"left\",\n captionSide: \"bottom\",\n },\n },\n stickyHeader: {},\n stickyColumns: {\n backgroundColor: theme.hv.palette.atmosphere.atmo2,\n },\n});\n\nexport default styles;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;EAAA,OAAY;IACzBC,IAAI;MACFC,QAAQ,EAAE,UADR;MAEFC,KAAK,EAAE;IAFL,GAICH,KAAK,CAACI,EAAN,CAASC,UAAT,CAAoBC,UAJrB;MAMF,UAAU;QACRC,aAAa,EAAE;MADP,CANR;MAUF,6CACKP,KAAK,CAACK,UAAN,CAAiBC,UADtB;QAEEE,OAAO,EAAER,KAAK,CAACS,OAAN,CAAc,IAAd,CAFX;QAGEC,SAAS,EAAE,MAHb;QAIEC,WAAW,EAAE;MAJf;IAVE,EADqB;IAkBzBC,YAAY,EAAE,EAlBW;IAmBzBC,aAAa,EAAE;MACbC,eAAe,EAAEd,KAAK,CAACI,EAAN,CAASW,OAAT,CAAiBC,UAAjB,CAA4BC;IADhC;
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles","theme","root","position","width","hv","typography","normalText","borderSpacing","padding","spacing","textAlign","captionSide","stickyHeader","stickyColumns","backgroundColor","palette","atmosphere","atmo2","listRow","hvSpacing"],"sources":["../../src/Table/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n position: \"relative\",\n width: \"100%\",\n\n ...theme.hv.typography.normalText,\n\n \"table&\": {\n borderSpacing: 0,\n },\n\n \"& caption\": {\n ...theme.typography.normalText,\n padding: theme.spacing(\"xs\"),\n textAlign: \"left\",\n captionSide: \"bottom\",\n },\n },\n stickyHeader: {},\n stickyColumns: {\n backgroundColor: theme.hv.palette.atmosphere.atmo2,\n },\n listRow: {\n \"table&\": {\n borderSpacing: theme.hvSpacing(0, \"xs\"),\n },\n },\n});\n\nexport default styles;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;EAAA,OAAY;IACzBC,IAAI;MACFC,QAAQ,EAAE,UADR;MAEFC,KAAK,EAAE;IAFL,GAICH,KAAK,CAACI,EAAN,CAASC,UAAT,CAAoBC,UAJrB;MAMF,UAAU;QACRC,aAAa,EAAE;MADP,CANR;MAUF,6CACKP,KAAK,CAACK,UAAN,CAAiBC,UADtB;QAEEE,OAAO,EAAER,KAAK,CAACS,OAAN,CAAc,IAAd,CAFX;QAGEC,SAAS,EAAE,MAHb;QAIEC,WAAW,EAAE;MAJf;IAVE,EADqB;IAkBzBC,YAAY,EAAE,EAlBW;IAmBzBC,aAAa,EAAE;MACbC,eAAe,EAAEd,KAAK,CAACI,EAAN,CAASW,OAAT,CAAiBC,UAAjB,CAA4BC;IADhC,CAnBU;IAsBzBC,OAAO,EAAE;MACP,UAAU;QACRX,aAAa,EAAEP,KAAK,CAACmB,SAAN,CAAgB,CAAhB,EAAmB,IAAnB;MADP;IADH;EAtBgB,CAAZ;AAAA,CAAf;;eA6BepB,M"}
|
|
@@ -9,12 +9,10 @@ export type HvProgressBarClassKey =
|
|
|
9
9
|
| "progressBar"
|
|
10
10
|
| "progressDone"
|
|
11
11
|
| "progressError"
|
|
12
|
-
| "progressBarLabel"
|
|
13
|
-
| "progressBarLabelHidden";
|
|
12
|
+
| "progressBarLabel";
|
|
14
13
|
|
|
15
14
|
export interface HvProgressBarProps
|
|
16
|
-
extends StandardProps<React.HTMLAttributes<HTMLDivElement>, HvProgressBarClassKey
|
|
17
|
-
HvProgressBarProps {
|
|
15
|
+
extends StandardProps<React.HTMLAttributes<HTMLDivElement>, HvProgressBarClassKey> {
|
|
18
16
|
/**
|
|
19
17
|
* The value of the progress bar.
|
|
20
18
|
*/
|
|
@@ -27,10 +25,6 @@ export interface HvProgressBarProps
|
|
|
27
25
|
* When uncontrolled and unspecified it will default to "inProgress".
|
|
28
26
|
*/
|
|
29
27
|
status?: string;
|
|
30
|
-
/**
|
|
31
|
-
* If `true` the progress bar will not show the percentage label.
|
|
32
|
-
*/
|
|
33
|
-
undeterminate?: boolean;
|
|
34
28
|
/**
|
|
35
29
|
* Aria Properties passed on to the progress bar.
|
|
36
30
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["className", "classes", "value", "status", "
|
|
3
|
+
var _excluded = ["className", "classes", "value", "status", "labelProps"];
|
|
4
4
|
import "core-js/modules/es.object.freeze.js";
|
|
5
5
|
import React from "react";
|
|
6
6
|
import PropTypes from "prop-types";
|
|
@@ -25,8 +25,6 @@ var HvProgressBar = function HvProgressBar(props) {
|
|
|
25
25
|
value = _props$value === void 0 ? 0 : _props$value,
|
|
26
26
|
_props$status = props.status,
|
|
27
27
|
status = _props$status === void 0 ? statusCategories.inProgress : _props$status,
|
|
28
|
-
_props$undeterminate = props.undeterminate,
|
|
29
|
-
undeterminate = _props$undeterminate === void 0 ? false : _props$undeterminate,
|
|
30
28
|
labelProps = props.labelProps,
|
|
31
29
|
others = _objectWithoutProperties(props, _excluded);
|
|
32
30
|
|
|
@@ -44,7 +42,7 @@ var HvProgressBar = function HvProgressBar(props) {
|
|
|
44
42
|
style: {
|
|
45
43
|
width: "".concat(clampedValue, "%")
|
|
46
44
|
},
|
|
47
|
-
className: clsx(classes.progressBarLabel, status === statusCategories.completed && classes.progressDone
|
|
45
|
+
className: clsx(classes.progressBarLabel, status === statusCategories.completed && classes.progressDone)
|
|
48
46
|
}, labelProps), "".concat(clampedValue, "%")), /*#__PURE__*/React.createElement("div", {
|
|
49
47
|
className: classes.progressBarContainer
|
|
50
48
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -103,12 +101,7 @@ process.env.NODE_ENV !== "production" ? HvProgressBar.propTypes = {
|
|
|
103
101
|
/**
|
|
104
102
|
* Style applied to the progress bar label.
|
|
105
103
|
*/
|
|
106
|
-
progressBarLabel: PropTypes.string
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Style applied to the progress bar label.
|
|
110
|
-
*/
|
|
111
|
-
progressBarLabelHidden: PropTypes.string
|
|
104
|
+
progressBarLabel: PropTypes.string
|
|
112
105
|
}).isRequired,
|
|
113
106
|
|
|
114
107
|
/**
|
|
@@ -125,11 +118,6 @@ process.env.NODE_ENV !== "production" ? HvProgressBar.propTypes = {
|
|
|
125
118
|
*/
|
|
126
119
|
status: PropTypes.oneOf([statusCategories.inProgress, statusCategories.completed, statusCategories.error]),
|
|
127
120
|
|
|
128
|
-
/**
|
|
129
|
-
* If `true` the progress bar will not show the percentage label.
|
|
130
|
-
*/
|
|
131
|
-
undeterminate: PropTypes.bool,
|
|
132
|
-
|
|
133
121
|
/**
|
|
134
122
|
* Aria Properties passed on to the progress bar.
|
|
135
123
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","names":["React","PropTypes","clsx","clamp","HvTypography","withStyles","styles","statusCategories","Object","freeze","inProgress","completed","error","HvProgressBar","props","className","classes","value","status","
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","names":["React","PropTypes","clsx","clamp","HvTypography","withStyles","styles","statusCategories","Object","freeze","inProgress","completed","error","HvProgressBar","props","className","classes","value","status","labelProps","others","clampedValue","root","progress","progressContainer","width","progressBarLabel","progressDone","progressBarContainer","progressBar","progressError","propTypes","string","shape","isRequired","number","oneOf","instanceOf","name"],"sources":["../../../src/ProgressBar/ProgressBar.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport clamp from \"lodash/clamp\";\nimport { HvTypography } from \"@hitachivantara/uikit-react-core\";\n\nimport { withStyles } from \"@material-ui/core\";\n\nimport styles from \"./styles\";\n\nconst statusCategories = Object.freeze({\n inProgress: \"inProgress\",\n completed: \"completed\",\n error: \"error\",\n});\n\n/**\n * ProgressBar provides feedback about a process that is taking place in the application.\n */\nconst HvProgressBar = (props) => {\n const {\n className,\n classes,\n value = 0,\n status = statusCategories.inProgress,\n labelProps,\n ...others\n } = props;\n\n const clampedValue = clamp(value, 0, 100);\n\n return (\n <div\n className={clsx(className, classes.root, classes.progress)}\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n aria-valuenow={clampedValue}\n {...others}\n >\n <div className={classes.progressContainer}>\n <HvTypography\n variant=\"vizText\"\n style={{ width: `${clampedValue}%` }}\n className={clsx(\n classes.progressBarLabel,\n status === statusCategories.completed && classes.progressDone\n )}\n {...labelProps}\n >\n {`${clampedValue}%`}\n </HvTypography>\n <div className={classes.progressBarContainer}>\n <div\n style={{ width: `${clampedValue}%` }}\n className={clsx(\n classes.progressBar,\n status === statusCategories.completed && classes.progressDone,\n status === statusCategories.error && classes.progressError\n )}\n />\n </div>\n </div>\n </div>\n );\n};\n\nHvProgressBar.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\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 * Style applied to the overall container when in progress mode.\n */\n progress: PropTypes.string,\n /**\n * Style applied to the specifc container when in progress mode.\n */\n progressContainer: PropTypes.string,\n /**\n * Style applied to progress bar container.\n */\n progressBarContainer: PropTypes.string,\n /**\n * Style applied to the progress bar.\n */\n progressBar: PropTypes.string,\n /**\n * Style applied to the progress bar when the loading is done.\n */\n progressDone: PropTypes.string,\n /**\n * Style applied to the progress bar when an error occurs.\n */\n progressError: PropTypes.string,\n /**\n * Style applied to the progress bar label.\n */\n progressBarLabel: PropTypes.string,\n }).isRequired,\n /**\n * The value of the progress bar.\n */\n value: PropTypes.number,\n /**\n * The status of the progress bar.\n *\n * inProgress is black, error is red and completed is green.\n *\n * When uncontrolled and unspecified it will default to \"inProgress\".\n */\n status: PropTypes.oneOf([\n statusCategories.inProgress,\n statusCategories.completed,\n statusCategories.error,\n ]),\n /**\n * Aria Properties passed on to the progress bar.\n */\n labelProps: PropTypes.instanceOf(Object),\n};\n\nexport default withStyles(styles, { name: \"HvProgressBar\" })(HvProgressBar);\n"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AAEA,OAAOC,KAAP,MAAkB,cAAlB;AACA,SAASC,YAAT,QAA6B,kCAA7B;AAEA,SAASC,UAAT,QAA2B,mBAA3B;AAEA,OAAOC,MAAP,MAAmB,UAAnB;AAEA,IAAMC,gBAAgB,GAAGC,MAAM,CAACC,MAAP,CAAc;EACrCC,UAAU,EAAE,YADyB;EAErCC,SAAS,EAAE,WAF0B;EAGrCC,KAAK,EAAE;AAH8B,CAAd,CAAzB;AAMA;AACA;AACA;;AACA,IAAMC,aAAa,GAAG,SAAhBA,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|
export var ProgressBarSimulator = function ProgressBarSimulator(_ref) {
|
|
7
7
|
var inc = _ref.inc,
|
|
8
8
|
error = _ref.error,
|
|
9
|
-
undeterminate = _ref.undeterminate,
|
|
10
9
|
ariaLabel = _ref.ariaLabel,
|
|
11
10
|
ariaLive = _ref.ariaLive;
|
|
12
11
|
|
|
@@ -57,7 +56,6 @@ export var ProgressBarSimulator = function ProgressBarSimulator(_ref) {
|
|
|
57
56
|
}, /*#__PURE__*/React.createElement(HvProgressBar, {
|
|
58
57
|
value: value,
|
|
59
58
|
status: status,
|
|
60
|
-
undeterminate: undeterminate,
|
|
61
59
|
labelProps: {
|
|
62
60
|
"aria-label": ariaLabel,
|
|
63
61
|
"aria-busy": false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBarSimulator.js","names":["React","useEffect","useState","HvButton","HvProgressBar","ProgressBarSimulator","inc","error","
|
|
1
|
+
{"version":3,"file":"ProgressBarSimulator.js","names":["React","useEffect","useState","HvButton","HvProgressBar","ProgressBarSimulator","inc","error","ariaLabel","ariaLive","status","setStatus","value","setValue","run","setRun","interval","setInterval","clearInterval","reset","start","width","marginTop","marginLeft","default"],"sources":["../../../src/ProgressBar/ProgressBarSimulator.js"],"sourcesContent":["import React, { useEffect, useState } from \"react\";\n\nimport { HvButton } from \"@hitachivantara/uikit-react-core\";\n\nimport { HvProgressBar } from \"..\";\n\n// eslint-disable-next-line react/prop-types\nexport const ProgressBarSimulator = ({ inc, error, ariaLabel, ariaLive }) => {\n const [status, setStatus] = useState(\"inProgress\");\n const [value, setValue] = useState(0);\n const [run, setRun] = useState(false);\n\n useEffect(() => {\n const interval = setInterval(() => {\n if (value === 100) {\n setRun(false);\n clearInterval(interval);\n setStatus(\"completed\");\n } else if (error && value === error) {\n clearInterval(interval);\n setStatus(\"error\");\n } else if (run) setValue(inc);\n }, 150);\n return () => clearInterval(interval);\n }, [inc, value, run, error]);\n\n const reset = () => {\n setValue(0);\n setStatus(\"inProgress\");\n };\n\n const start = () => {\n setRun(true);\n };\n\n return (\n <div style={{ width: 400 }}>\n <HvProgressBar\n value={value}\n status={status}\n labelProps={{\n \"aria-label\": ariaLabel,\n \"aria-busy\": false,\n \"aria-live\": ariaLive,\n }}\n />\n <div style={{ marginTop: 10 }}>\n <HvButton onClick={start}>Start</HvButton>\n <HvButton style={{ marginLeft: 10 }} onClick={reset}>\n Reset\n </HvButton>\n </div>\n </div>\n );\n};\n\nexport { ProgressBarSimulator as default };\n"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,QAA3B,QAA2C,OAA3C;AAEA,SAASC,QAAT,QAAyB,kCAAzB;AAEA,SAASC,aAAT,QAA8B,IAA9B,C,CAEA;;AACA,OAAO,IAAMC,oBAAoB,GAAG,SAAvBA,oBAAuB,OAAyC;EAAA,IAAtCC,GAAsC,QAAtCA,GAAsC;EAAA,IAAjCC,KAAiC,QAAjCA,KAAiC;EAAA,IAA1BC,SAA0B,QAA1BA,SAA0B;EAAA,IAAfC,QAAe,QAAfA,QAAe;;EAC3E,gBAA4BP,QAAQ,CAAC,YAAD,CAApC;EAAA;EAAA,IAAOQ,MAAP;EAAA,IAAeC,SAAf;;EACA,iBAA0BT,QAAQ,CAAC,CAAD,CAAlC;EAAA;EAAA,IAAOU,KAAP;EAAA,IAAcC,QAAd;;EACA,iBAAsBX,QAAQ,CAAC,KAAD,CAA9B;EAAA;EAAA,IAAOY,GAAP;EAAA,IAAYC,MAAZ;;EAEAd,SAAS,CAAC,YAAM;IACd,IAAMe,QAAQ,GAAGC,WAAW,CAAC,YAAM;MACjC,IAAIL,KAAK,KAAK,GAAd,EAAmB;QACjBG,MAAM,CAAC,KAAD,CAAN;QACAG,aAAa,CAACF,QAAD,CAAb;QACAL,SAAS,CAAC,WAAD,CAAT;MACD,CAJD,MAIO,IAAIJ,KAAK,IAAIK,KAAK,KAAKL,KAAvB,EAA8B;QACnCW,aAAa,CAACF,QAAD,CAAb;QACAL,SAAS,CAAC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