@hitachivantara/uikit-react-core
Version:
Core React components for the NEXT Design System.
70 lines (69 loc) • 2.21 kB
JavaScript
"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
const uikitStyles = require("@hitachivantara/uikit-styles");
const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvSingleCalendar", {
root: {
overflow: "hidden"
},
calendarGrid: {
display: "grid",
gridTemplateColumns: "repeat(7, 1fr)",
"& $cellsInRange": {
backgroundColor: uikitStyles.theme.colors.bgPageSecondary,
"& $startBookend": {
borderLeft: `1px solid ${uikitStyles.theme.colors.text}`,
backgroundColor: uikitStyles.theme.colors.bgPageSecondary,
"&:hover": {
borderRight: `1px solid ${uikitStyles.theme.colors.text}`
}
}
},
"&:hover $cellsInRange": {
backgroundColor: uikitStyles.theme.colors.bgPageSecondary,
"& $startBookend": {
borderLeft: `1px solid ${uikitStyles.theme.colors.text}`,
borderRight: "inherit"
}
},
"& $cellsInRange:hover": {
backgroundColor: uikitStyles.theme.colors.bgPageSecondary,
"& $calendarDate": {
borderRight: `1px solid ${uikitStyles.theme.colors.text}`
}
},
"& $cellsInRange:hover ~ $cellsInRange": {
backgroundColor: uikitStyles.theme.colors.bgContainer
// controls the right side of the hovered range
},
"& $cellsOutsideRange:hover ~ $cellsInRange": {
backgroundColor: uikitStyles.theme.colors.bgContainer
// control the right side when hovering outside of the range
}
},
calendarDay: {
display: "flex",
justifyContent: "center",
flexDirection: "column",
textAlign: "center",
height: "40px",
width: "40px"
},
navigationContainer: {},
focusSelection: {},
navigationMonth: {},
calendarDate: {},
calendarDateNotInMonth: {},
calendarDateSelected: {},
calendarDateInvalid: {},
calendarDateInSelectionRange: {},
startBookend: {},
endBookend: {},
cellsInRange: {
backgroundColor: uikitStyles.theme.colors.bgPageSecondary
},
cellsOutsideRange: {},
cellContainer: {}
});
exports.staticClasses = staticClasses;
exports.useClasses = useClasses;