@hitachivantara/uikit-react-core
Version:
Core React components for the NEXT Design System.
107 lines (106 loc) • 3.35 kB
JavaScript
import { createClasses } from "@hitachivantara/uikit-react-utils";
import { theme } from "@hitachivantara/uikit-styles";
import { staticClasses as staticClasses$1 } from "../../Pagination/Pagination.styles.js";
import "../../Pagination/Pagination.js";
import { staticClasses as staticClasses$2 } from "../../BulkActions/BulkActions.styles.js";
import "../../BulkActions/BulkActions.js";
import { staticClasses as staticClasses$3 } from "../TableCell/TableCell.styles.js";
import "../TableCell/TableCell.js";
import { staticClasses as staticClasses$4 } from "../TableRow/TableRow.styles.js";
import "../TableRow/TableRow.js";
import { staticClasses as staticClasses$5 } from "../TableHeader/TableHeader.styles.js";
import "../TableHeader/TableHeader.js";
import { staticClasses as staticClasses$6 } from "../TableContainer/TableContainer.styles.js";
import "../TableContainer/TableContainer.js";
const { staticClasses, useClasses } = createClasses("HvTableSection", {
root: {},
header: {
// Only apply the border to divide the header and content when both are displayed
"+ div": {
borderTopLeftRadius: 0,
borderTopRightRadius: 0
}
},
actions: {},
content: {
marginTop: 0,
padding: 0,
// Apply border radius to the first child if there's not an header
"&:first-of-type": {
"& > :first-of-type": {
borderTopLeftRadius: "inherit",
borderTopRightRadius: "inherit"
}
},
"& > :last-child": {
borderBottomLeftRadius: "inherit",
borderBottomRightRadius: "inherit"
},
[`& .${staticClasses$6.root}`]: {
paddingBottom: 0,
borderTopLeftRadius: "inherit",
borderTopRightRadius: "inherit"
},
[`& .${staticClasses$5.head}`]: {
backgroundColor: theme.colors.bgPage,
borderBottomColor: theme.colors.bgPageSecondary,
[`&.${staticClasses$5.variantCheckbox}`]: {
borderRight: "none"
},
[`&.${staticClasses$5.variantActions}`]: {
borderLeft: "none"
}
},
// Remove border for the last table row
[`& .${staticClasses$4.root}`]: {
"&:last-child": {
[`& .${staticClasses$3.root}`]: { borderBottom: "none" }
}
},
[`& .${staticClasses$3.root}`]: {
borderBottomColor: theme.colors.borderSubtle
},
[`& .${staticClasses$3.variantCheckbox}`]: {
borderRight: "none"
},
[`& .${staticClasses$3.variantActions}`]: {
borderLeft: "none"
},
[`& .${staticClasses$2.root}`]: {
marginBottom: 0,
border: "none",
borderBottom: `1px solid ${theme.colors.borderSubtle}`,
padding: theme.spacing("xs", "sm")
},
[`& .${staticClasses$1.root}`]: {
margin: 0,
backgroundColor: theme.colors.bgPage,
padding: theme.space.xs,
borderTop: `1px solid ${theme.colors.borderSubtle}`,
borderBottomLeftRadius: "inherit",
borderBottomRightRadius: "inherit"
},
[`& .${staticClasses$1.pageSizeOptions}`]: {
left: theme.space.sm
},
[`& .${staticClasses$1.pageSizeHeader}`]: {
border: "none",
"&:hover": {
border: "none"
}
}
},
hidden: {},
raisedHeader: {
"& $content": {
paddingTop: 0
}
},
hasHeader: {},
/** @deprecated use `hasHeader` instead */
spaceTop: {}
});
export {
staticClasses,
useClasses
};