@hitachivantara/uikit-react-lab 3.45.11 → 3.46.1
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
|
@@ -132,6 +132,15 @@ var styles = function styles(theme) {
|
|
|
132
132
|
maxWidth: 32,
|
|
133
133
|
borderLeft: "solid 1px ".concat(theme.hv.palette.atmosphere.atmo4)
|
|
134
134
|
},
|
|
135
|
+
variantList: {
|
|
136
|
+
backgroundColor: "inherit",
|
|
137
|
+
borderBottom: 0,
|
|
138
|
+
height: 16,
|
|
139
|
+
":first-child > &": {
|
|
140
|
+
borderTop: 0,
|
|
141
|
+
height: 16
|
|
142
|
+
}
|
|
143
|
+
},
|
|
135
144
|
stickyColumn: {
|
|
136
145
|
position: "sticky",
|
|
137
146
|
zIndex: 2,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["hexToRgbA","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,SAASA,SAAT,QAA0B,kCAA1B;;AAEA,IAAMC,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;IAaz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Lc;IAiMzB6D,QAAQ,EAAE;MACRlB,WAAW,sBAAepD,KAAK,CAACe,EAAN,CAASP,OAAT,CAAiB+D,MAAjB,CAAwBC,KAAvC;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;;AAkNA,eAAe9E,MAAf"}
|
|
1
|
+
{"version":3,"file":"styles.js","names":["hexToRgbA","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\",\n },\n});\n\nexport default styles;\n"],"mappings":";;;;;;;;;;;;;AAAA,SAASA,SAAT,QAA0B,kCAA1B;;AAEA,IAAMC,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;MAFS,CADlB;MAMFG,UAAU,EAAE,CANV;MAOFT,aAAa,EAAE,KAPb;MASFU,eAAe,EAAEb,KAAK,CAACQ,OAAN,CAAcM,KAT7B;MAUFP,YAAY,sBAAeP,KAAK,CAACQ,OAAN,CAAcC,KAA7B;IAVV,GAWCT,KAAK,CAACe,EAAN,CAASC,UAAT,CAAoBC,aAXrB;MAaFC,UAAU,EAAElB,KAAK,CAACmB,WAAN,CAAkBC,MAAlB,CAAyB,kBAAzB,EAA6C;QACvDC,QAAQ,EAAErB,KAAK,CAACmB,WAAN,CAAkBE,QAAlB,CAA2BC;MADkB,CAA7C,CAbV;MAiBF,cAAc;QACZnB,aAAa,EAAE,SADH;QAEZS,UAAU,EAAE,CAFA;QAGZW,WAAW,EAAE,CAHD;QAIZC,MAAM,EAAE,SAJI;QAMZ,WAAW;UACTX,eAAe,EAAEb,KAAK,CAAC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|
| "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> {
|
|
@@ -32,10 +32,14 @@ var HvTableRow = /*#__PURE__*/forwardRef(function HvTableRow(props, ref) {
|
|
|
32
32
|
var tableContext = useContext(TableContext);
|
|
33
33
|
var tableSectionContext = useContext(TableSectionContext);
|
|
34
34
|
var type = (tableSectionContext === null || tableSectionContext === void 0 ? void 0 : tableSectionContext.type) || "body";
|
|
35
|
+
var isList = tableContext.variant === "listrow";
|
|
35
36
|
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;
|
|
36
37
|
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
37
38
|
ref: ref,
|
|
38
|
-
className: clsx(classes.root, classes[type],
|
|
39
|
+
className: clsx(classes.root, classes[type], tableSectionContext.filterClassName, className, isList && {
|
|
40
|
+
"body": classes.variantList,
|
|
41
|
+
"head": classes.variantListHead
|
|
42
|
+
}[type], hover && classes.hover, selected && classes.selected, expanded && classes.expanded, striped && classes.striped),
|
|
39
43
|
role: Component === defaultComponent ? null : "row"
|
|
40
44
|
}, others));
|
|
41
45
|
});
|
|
@@ -118,7 +122,17 @@ process.env.NODE_ENV !== "production" ? HvTableRow.propTypes = {
|
|
|
118
122
|
/**
|
|
119
123
|
* Styles applied to the component root when inside a `HvTableFooter`.
|
|
120
124
|
*/
|
|
121
|
-
footer: PropTypes.string
|
|
125
|
+
footer: PropTypes.string,
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Styles applied to the component root when its table variant is list.
|
|
129
|
+
*/
|
|
130
|
+
variantList: PropTypes.string,
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Styles applied to the component root when its table variant is list.
|
|
134
|
+
*/
|
|
135
|
+
variantListHead: PropTypes.string
|
|
122
136
|
}).isRequired
|
|
123
137
|
} : void 0;
|
|
124
138
|
export default withStyles(styles, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableRow.js","names":["React","forwardRef","useContext","PropTypes","clsx","withStyles","styles","TableContext","TableSectionContext","defaultComponent","HvTableRow","props","ref","classes","className","component","hover","selected","expanded","striped","others","tableContext","tableSectionContext","type","Component","components","Tr","root","propTypes","elementType","children","node","string","bool","shape","head","body","footer","isRequired","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":["React","forwardRef","useContext","PropTypes","clsx","withStyles","styles","TableContext","TableSectionContext","defaultComponent","HvTableRow","props","ref","classes","className","component","hover","selected","expanded","striped","others","tableContext","tableSectionContext","type","isList","variant","Component","components","Tr","root","filterClassName","variantList","variantListHead","propTypes","elementType","children","node","string","bool","shape","head","body","footer","isRequired","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,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,UAA5B,QAA8C,OAA9C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AAEA,SAASC,UAAT,QAA2B,mBAA3B;AAEA,OAAOC,MAAP,MAAmB,UAAnB;AACA,OAAOC,YAAP,MAAyB,iBAAzB;AACA,OAAOC,mBAAP,MAAgC,wBAAhC;AAEA,IAAMC,gBAAgB,GAAG,IAAzB;AAEA;AACA;AACA;;AACA,IAAMC,UAAU,gBAAGT,UAAU,CAAC,SAASS,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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,CAA2ClC,UAA3C,CAAf"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "core-js/modules/es.array.concat.js";
|
|
1
2
|
import { hexToRgb } from "@material-ui/core";
|
|
2
3
|
import { alpha } from "@material-ui/core/styles";
|
|
3
4
|
|
|
@@ -23,9 +24,7 @@ var styles = function styles(theme) {
|
|
|
23
24
|
},
|
|
24
25
|
body: {},
|
|
25
26
|
footer: {},
|
|
26
|
-
selected: {
|
|
27
|
-
backgroundColor: theme.palette.atmo1
|
|
28
|
-
},
|
|
27
|
+
selected: {},
|
|
29
28
|
expanded: {
|
|
30
29
|
backgroundColor: theme.palette.atmo1,
|
|
31
30
|
"& > *[role=cell]": {
|
|
@@ -44,6 +43,31 @@ var styles = function styles(theme) {
|
|
|
44
43
|
"&:hover": {
|
|
45
44
|
backgroundColor: theme.palette.atmo3
|
|
46
45
|
}
|
|
46
|
+
},
|
|
47
|
+
variantList: {
|
|
48
|
+
borderBottom: 0,
|
|
49
|
+
backgroundColor: theme.palette.atmo1,
|
|
50
|
+
height: 52,
|
|
51
|
+
"&$selected": {
|
|
52
|
+
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),
|
|
53
|
+
"&:hover": {
|
|
54
|
+
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),
|
|
55
|
+
background: theme.hv.palette.atmosphere.atmo1
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"&:hover": {
|
|
59
|
+
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),
|
|
60
|
+
background: theme.hv.palette.atmosphere.atmo1
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
variantListHead: {
|
|
64
|
+
height: 16,
|
|
65
|
+
"&:first-child": {
|
|
66
|
+
height: 16
|
|
67
|
+
},
|
|
68
|
+
"tr&:first-child": {
|
|
69
|
+
height: 16
|
|
70
|
+
}
|
|
47
71
|
}
|
|
48
72
|
};
|
|
49
73
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["hexToRgb","alpha","styles","theme","root","color","backgroundColor","verticalAlign","outline","minHeight","height","head","body","footer","selected","
|
|
1
|
+
{"version":3,"file":"styles.js","names":["hexToRgb","alpha","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,SAASA,QAAT,QAAyB,mBAAzB;AACA,SAASC,KAAT,QAAsB,0BAAtB;;AAEA,IAAMC,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,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AiBc,MAAjB,CAAwBC,KAAvK,CADA;UAETC,UAAU,EAAE7B,KAAK,CAAC0B,EAAN,CAASb,OAAT,CAAiBiB,UAAjB,CAA4BhB;QAF/B;MAHC,CAJH;MAaX,WAAW;QACTW,SAAS,oBAAazB,KAAK,CAAC0B,EAAN,CAASb,OAAT,CAAiBiB,UAAjB,CAA4BC,KAAzC,yBAA6D/B,KAAK,CAAC0B,EAAN,CAASb,OAAT,CAAiBiB,UAAjB,CAA4BC,KAAzF,wBAA4G/B,KAAK,CAAC0B,EAAN,CAASb,OAAT,CAAiBiB,UAAjB,CAA4BC,KAAxI,wBAA2J/B,KAAK,CAAC0B,EAAN,CAASb,OAAT,CAAiBiB,UAAjB,CAA4BC,KAAvL,CADA;QAETF,UAAU,EAAE7B,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;;AAyEA,eAAeR,MAAf"}
|
|
@@ -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;;AA6BA,eAAepB,MAAf"}
|
|
@@ -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
|
-
const _excluded = ["className", "classes", "value", "status", "
|
|
3
|
+
const _excluded = ["className", "classes", "value", "status", "labelProps"];
|
|
4
4
|
import React from "react";
|
|
5
5
|
import PropTypes from "prop-types";
|
|
6
6
|
import clsx from "clsx";
|
|
@@ -23,7 +23,6 @@ const HvProgressBar = props => {
|
|
|
23
23
|
classes,
|
|
24
24
|
value = 0,
|
|
25
25
|
status = statusCategories.inProgress,
|
|
26
|
-
undeterminate = false,
|
|
27
26
|
labelProps
|
|
28
27
|
} = props,
|
|
29
28
|
others = _objectWithoutProperties(props, _excluded);
|
|
@@ -42,7 +41,7 @@ const HvProgressBar = props => {
|
|
|
42
41
|
style: {
|
|
43
42
|
width: `${clampedValue}%`
|
|
44
43
|
},
|
|
45
|
-
className: clsx(classes.progressBarLabel, status === statusCategories.completed && classes.progressDone
|
|
44
|
+
className: clsx(classes.progressBarLabel, status === statusCategories.completed && classes.progressDone)
|
|
46
45
|
}, labelProps), `${clampedValue}%`), /*#__PURE__*/React.createElement("div", {
|
|
47
46
|
className: classes.progressBarContainer
|
|
48
47
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -101,12 +100,7 @@ process.env.NODE_ENV !== "production" ? HvProgressBar.propTypes = {
|
|
|
101
100
|
/**
|
|
102
101
|
* Style applied to the progress bar label.
|
|
103
102
|
*/
|
|
104
|
-
progressBarLabel: PropTypes.string
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Style applied to the progress bar label.
|
|
108
|
-
*/
|
|
109
|
-
progressBarLabelHidden: PropTypes.string
|
|
103
|
+
progressBarLabel: PropTypes.string
|
|
110
104
|
}).isRequired,
|
|
111
105
|
|
|
112
106
|
/**
|
|
@@ -123,11 +117,6 @@ process.env.NODE_ENV !== "production" ? HvProgressBar.propTypes = {
|
|
|
123
117
|
*/
|
|
124
118
|
status: PropTypes.oneOf([statusCategories.inProgress, statusCategories.completed, statusCategories.error]),
|
|
125
119
|
|
|
126
|
-
/**
|
|
127
|
-
* If `true` the progress bar will not show the percentage label.
|
|
128
|
-
*/
|
|
129
|
-
undeterminate: PropTypes.bool,
|
|
130
|
-
|
|
131
120
|
/**
|
|
132
121
|
* Aria Properties passed on to the progress bar.
|
|
133
122
|
*/
|
|
@@ -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,SA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T,CAAV,CAA8CzB,aAA9C,CAAf"}
|
|
@@ -6,7 +6,6 @@ import { HvProgressBar } from ".."; // eslint-disable-next-line react/prop-types
|
|
|
6
6
|
export const ProgressBarSimulator = ({
|
|
7
7
|
inc,
|
|
8
8
|
error,
|
|
9
|
-
undeterminate,
|
|
10
9
|
ariaLabel,
|
|
11
10
|
ariaLive
|
|
12
11
|
}) => {
|
|
@@ -43,7 +42,6 @@ export const ProgressBarSimulator = ({
|
|
|
43
42
|
}, /*#__PURE__*/React.createElement(HvProgressBar, {
|
|
44
43
|
value: value,
|
|
45
44
|
status: status,
|
|
46
|
-
undeterminate: undeterminate,
|
|
47
45
|
labelProps: {
|
|
48
46
|
"aria-label": ariaLabel,
|
|
49
47
|
"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,MAAMC,oBAAoB,GAAG,CAAC;EAAEC,GAAF;EAAOC,KAAP;EAAcC,SAAd;EAAyBC;AAAzB,CAAD,KAAyC;EAC3E,MAAM,CAACC,MAAD,EAASC,SAAT,IAAsBT,QAAQ,CAAC,YAAD,CAApC;EACA,MAAM,CAACU,KAAD,EAAQC,QAAR,IAAoBX,QAAQ,CAAC,CAAD,CAAlC;EACA,MAAM,CAACY,GAAD,EAAMC,MAAN,IAAgBb,QAAQ,CAAC,KAAD,CAA9B;EAEAD,SAAS,CAAC,MAAM;IACd,MAAMe,QAAQ,GAAGC,WAAW,CAAC,MAAM;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,OAAD,CAAT;MACD,CAHM,MAGA,IAAIG,GAAJ,EAASD,QAAQ,CAACP,GAAD,CAAR;IACjB,CAT2B,EASzB,GATyB,CAA5B;IAUA,OAAO,MAAMY,aAAa,CAACF,QAAD,CAA1B;EACD,CAZQ,EAYN,CAACV,GAAD,EAAMM,KAAN,EAAaE,GAAb,EAAkBP,KAAlB,CAZM,CAAT;;EAcA,MAAMY,KAAK,GAAG,MAAM;IAClBN,QAAQ,CAAC,CAAD,CAAR;IACAF,SAAS,CAAC,YAAD,CAAT;EACD,CAHD;;EAKA,MAAMS,KAAK,GAAG,MAAM;IAClBL,MAAM,CAAC,IAAD,CAAN;EACD,CAFD;;EAIA,oBACE;IAAK,KAAK,EAAE;MAAEM,KAAK,EAAE;IAAT;EAAZ,gBACE,oBAAC,aAAD;IACE,KAAK,EAAET,KADT;IAEE,MAAM,EAAEF,MAFV;IAGE,UAAU,EAAE;MACV,cAAcF,SADJ;MAEV,aAAa,KAFH;MAGV,aAAaC;IAHH;EAHd,EADF,eAUE;IAAK,KAAK,EAAE;MAAEa,SAAS,EAAE;IAAb;EAAZ,gBACE,oBAAC,QAAD;IAAU,OAAO,EAAEF;EAAnB,WADF,eAEE,oBAAC,QAAD;IAAU,KAAK,EAAE;MAAEG,UAAU,EAAE;IAAd,CAAjB;IAAqC,OAAO,EAAEJ;EAA9C,WAFF,CAVF,CADF;AAmBD,CA/CM;AAiDP,SAASd,oBAAoB,IAAImB,OAAjC"}
|
|
@@ -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,MAAMA,MAAM,GAAIC,KAAD,KAAY;EACzBC,IAAI,EAAE;IACJC,OAAO,EAAE,MADL;IAEJC,aAAa,EAAE,QAFX;IAGJC,UAAU,EAAE,QAHR;IAIJC,cAAc,EAAE;EAJZ,CADmB;EAQzBC,QAAQ,EAAE;IACRC,KAAK,EAAE;EADC,CARe;EAYzBC,iBAAiB,EAAE;IACjBD,KAAK,EAAE;EADU,CAZM;EAgBzBE,oBAAoB,EAAE;IACpBP,OAAO,EAAE,MADW;IAEpBK,KAAK,EAAE,MAFa;IAGpBG,MAAM,EAAE,CAHY;IAIpBC,eAAe,EAAEX,KAAK,CAACY,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BC;EAJzB,CAhBG;EAuBzBC,WAAW,EAAE;IACXL,eAAe,EAAE,MADN;IAEXD,MAAM,EAAE;EAFG,CAvBY;EA4BzBO,YAAY,EAAE;IACZN,eAAe,EAAEX,KAAK,CAACY,EAAN,CAASC,OAAT,CAAiBK,QAAjB,CAA0BC;EAD/B,CA5BW;EAgCzBC,aAAa,EAAE;IACbT,eAAe,EAAEX,KAAK,CAACY,EAAN,CAASC,OAAT,CAAiBK,QAAjB,CAA0BG;EAD9B,CAhCU;EAoCzBC,gBAAgB,EAAE;IAChBX,eAAe,EAAE,aADD;IAEhBT,OAAO,EAAE,MAFO;IAGhBG,cAAc,EAAE;EAHA;AApCO,CAAZ,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
|
-
const _excluded = ["classes", "className", "component", "stickyHeader", "stickyColumns"];
|
|
4
|
-
import React, { forwardRef, useMemo } from "react";
|
|
3
|
+
const _excluded = ["classes", "className", "component", "stickyHeader", "stickyColumns", "variant"];
|
|
4
|
+
import React, { useRef, forwardRef, useMemo } from "react";
|
|
5
5
|
import PropTypes from "prop-types";
|
|
6
6
|
import clsx from "clsx";
|
|
7
7
|
import { withStyles } from "@material-ui/core";
|
|
@@ -51,20 +51,24 @@ const HvTable = /*#__PURE__*/forwardRef(function HvTable(props, ref) {
|
|
|
51
51
|
className,
|
|
52
52
|
component = defaultComponent,
|
|
53
53
|
stickyHeader = false,
|
|
54
|
-
stickyColumns = false
|
|
54
|
+
stickyColumns = false,
|
|
55
|
+
variant = "default"
|
|
55
56
|
} = props,
|
|
56
57
|
others = _objectWithoutProperties(props, _excluded);
|
|
57
58
|
|
|
59
|
+
const containerRef = useRef(ref);
|
|
58
60
|
const components = useMemo(() => computeTablePartComponents(component), [component]);
|
|
59
61
|
const tableContext = useMemo(() => ({
|
|
60
|
-
components
|
|
61
|
-
|
|
62
|
+
components,
|
|
63
|
+
variant,
|
|
64
|
+
containerRef
|
|
65
|
+
}), [components, variant, containerRef]);
|
|
62
66
|
return /*#__PURE__*/React.createElement(TableContext.Provider, {
|
|
63
67
|
value: tableContext
|
|
64
68
|
}, /*#__PURE__*/React.createElement(components.Table, _extends({
|
|
65
69
|
ref: ref,
|
|
66
70
|
role: component === defaultComponent ? null : "table",
|
|
67
|
-
className: clsx(classes.root, className, stickyHeader && classes.stickyHeader, stickyColumns && classes.stickyColumns)
|
|
71
|
+
className: clsx(classes.root, className, stickyHeader && classes.stickyHeader, stickyColumns && classes.stickyColumns, variant !== "default" && classes.listRow)
|
|
68
72
|
}, others)));
|
|
69
73
|
});
|
|
70
74
|
process.env.NODE_ENV !== "production" ? HvTable.propTypes = {
|
|
@@ -96,6 +100,11 @@ process.env.NODE_ENV !== "production" ? HvTable.propTypes = {
|
|
|
96
100
|
*/
|
|
97
101
|
stickyColumns: PropTypes.bool,
|
|
98
102
|
|
|
103
|
+
/**
|
|
104
|
+
* Whether the `HvTable` has the list row styles or the default.
|
|
105
|
+
*/
|
|
106
|
+
variant: PropTypes.oneOf(["listrow", "default"]),
|
|
107
|
+
|
|
99
108
|
/**
|
|
100
109
|
* A Jss Object used to override or extend the styles applied.
|
|
101
110
|
*/
|
|
@@ -113,7 +122,12 @@ process.env.NODE_ENV !== "production" ? HvTable.propTypes = {
|
|
|
113
122
|
/**
|
|
114
123
|
* Styles applied to the component root class when it has sticky columns.
|
|
115
124
|
*/
|
|
116
|
-
stickyColumns: PropTypes.string
|
|
125
|
+
stickyColumns: PropTypes.string,
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Styles applied to the component root class when it has sticky columns.
|
|
129
|
+
*/
|
|
130
|
+
listRow: PropTypes.string
|
|
117
131
|
}).isRequired
|
|
118
132
|
} : void 0;
|
|
119
133
|
export default withStyles(styles, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.js","names":["React","forwardRef","useMemo","PropTypes","clsx","withStyles","TableContext","styles","defaultComponent","computeTablePartComponents","rootComponent","Table","THead","TBody","Tr","Th","Td","HvTable","props","ref","classes","className","component","stickyHeader","stickyColumns","others","components","tableContext","root","propTypes","elementType","children","node","isRequired","string","bool","shape","name"],"sources":["../../../src/Table/Table.js"],"sourcesContent":["import React, { forwardRef, useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { withStyles } from \"@material-ui/core\";\n\nimport TableContext from \"./TableContext\";\nimport styles from \"./styles\";\n\nconst defaultComponent = \"table\";\n\nconst computeTablePartComponents = (rootComponent) => {\n if (rootComponent === \"table\") {\n return {\n Table: \"table\",\n THead: \"thead\",\n TBody: \"tbody\",\n Tr: \"tr\",\n Th: \"th\",\n Td: \"td\",\n };\n }\n\n return {\n Table: rootComponent,\n THead: rootComponent,\n TBody: rootComponent,\n Tr: rootComponent,\n Th: rootComponent,\n Td: rootComponent,\n };\n};\n\n/**\n * A Table gathers relational data, it displays values arranged to allow quick numerical analysis\n * like comparison and sorting.\n *\n * **HvTable** component offers a set of HTML-equivalent elements, **styled to Design System's specification**,\n * for building tables.\n * You can rely on these **elements** when your table doesn’t have many interactions or you need it to be very lightweight.\n *\n * For better data handling and **advanced features** we recommend the use of the utility hooks collection .\n * See the <a href=\"?id=lab-table-hooks--main&viewMode=docs\" target=\"_self\">Table Hooks documentation</a> for more details.\n *\n * **PLEASE NOTE**: This Table implementation is still a WIP. There might be breaking changes.\n */\nconst HvTable = forwardRef(function HvTable(props, ref) {\n const {\n classes,\n className,\n component = defaultComponent,\n stickyHeader = false,\n stickyColumns = false,\n ...others\n } = props;\n\n const components = useMemo(() => computeTablePartComponents(component), [component]);\n\n const tableContext = useMemo(() => ({ components }),
|
|
1
|
+
{"version":3,"file":"Table.js","names":["React","useRef","forwardRef","useMemo","PropTypes","clsx","withStyles","TableContext","styles","defaultComponent","computeTablePartComponents","rootComponent","Table","THead","TBody","Tr","Th","Td","HvTable","props","ref","classes","className","component","stickyHeader","stickyColumns","variant","others","containerRef","components","tableContext","root","listRow","propTypes","elementType","children","node","isRequired","string","bool","oneOf","shape","name"],"sources":["../../../src/Table/Table.js"],"sourcesContent":["import React, { useRef, forwardRef, useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { withStyles } from \"@material-ui/core\";\n\nimport TableContext from \"./TableContext\";\nimport styles from \"./styles\";\n\nconst defaultComponent = \"table\";\n\nconst computeTablePartComponents = (rootComponent) => {\n if (rootComponent === \"table\") {\n return {\n Table: \"table\",\n THead: \"thead\",\n TBody: \"tbody\",\n Tr: \"tr\",\n Th: \"th\",\n Td: \"td\",\n };\n }\n\n return {\n Table: rootComponent,\n THead: rootComponent,\n TBody: rootComponent,\n Tr: rootComponent,\n Th: rootComponent,\n Td: rootComponent,\n };\n};\n\n/**\n * A Table gathers relational data, it displays values arranged to allow quick numerical analysis\n * like comparison and sorting.\n *\n * **HvTable** component offers a set of HTML-equivalent elements, **styled to Design System's specification**,\n * for building tables.\n * You can rely on these **elements** when your table doesn’t have many interactions or you need it to be very lightweight.\n *\n * For better data handling and **advanced features** we recommend the use of the utility hooks collection .\n * See the <a href=\"?id=lab-table-hooks--main&viewMode=docs\" target=\"_self\">Table Hooks documentation</a> for more details.\n *\n * **PLEASE NOTE**: This Table implementation is still a WIP. There might be breaking changes.\n */\nconst HvTable = forwardRef(function HvTable(props, ref) {\n const {\n classes,\n className,\n component = defaultComponent,\n stickyHeader = false,\n stickyColumns = false,\n variant = \"default\",\n ...others\n } = props;\n\n const containerRef = useRef(ref);\n\n const components = useMemo(() => computeTablePartComponents(component), [component]);\n\n const tableContext = useMemo(\n () => ({ components, variant, containerRef }),\n [components, variant, containerRef]\n );\n\n return (\n <TableContext.Provider value={tableContext}>\n <components.Table\n ref={ref}\n role={component === defaultComponent ? null : \"table\"}\n className={clsx(\n classes.root,\n {\n [classes.stickyHeader]: stickyHeader,\n [classes.stickyColumns]: stickyColumns,\n [classes.listRow]: variant === \"listrow\",\n },\n className\n )}\n {...others}\n />\n </TableContext.Provider>\n );\n});\n\nHvTable.propTypes = {\n /**\n * The component used for the root node. Either a string to use a HTML element or a component.\n * Defaults to `table`.\n *\n * When using non-table elements, layout is up to the developer using the component.\n */\n component: PropTypes.elementType,\n /**\n * Content to be rendered\n */\n children: PropTypes.node.isRequired,\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * Whether the `HvTable` has a sticky header row.\n */\n stickyHeader: PropTypes.bool,\n /**\n * Whether the `HvTable` has sticky columns.\n */\n stickyColumns: PropTypes.bool,\n /**\n * Whether the `HvTable` has the list row styles or the default.\n */\n variant: PropTypes.oneOf([\"listrow\", \"default\"]),\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the component root class when it has a sticky header.\n */\n stickyHeader: PropTypes.string,\n /**\n * Styles applied to the component root class when it has sticky columns.\n */\n stickyColumns: PropTypes.string,\n /**\n * Styles applied to the component root class when it has sticky columns.\n */\n listRow: PropTypes.string,\n }).isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvTable\" })(HvTable);\n"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,MAAhB,EAAwBC,UAAxB,EAAoCC,OAApC,QAAmD,OAAnD;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AAEA,SAASC,UAAT,QAA2B,mBAA3B;AAEA,OAAOC,YAAP,MAAyB,gBAAzB;AACA,OAAOC,MAAP,MAAmB,UAAnB;AAEA,MAAMC,gBAAgB,GAAG,OAAzB;;AAE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