@hitachivantara/uikit-react-core
Version:
UI Kit Core React components.
51 lines (50 loc) • 1.34 kB
JavaScript
import { outlineStyles } from "../utils/focusUtils.js";
import { theme } from "@hitachivantara/uikit-styles";
import { createClasses } from "@hitachivantara/uikit-react-utils";
//#region src/CheckBox/CheckBox.styles.tsx
var { staticClasses, useClasses } = createClasses("HvCheckBox", {
root: { display: "inline-block" },
container: {
cursor: "pointer",
display: "flex",
alignItems: "center",
transition: "background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
borderRadius: theme.radii.base,
"&:hover:not($disabled)": { backgroundColor: theme.colors.bgHover },
":where(:has($label)) $checkbox": { borderRadius: "inherit" }
},
invalidContainer: {},
disabled: {
cursor: "not-allowed",
"& $label": {
color: theme.colors.textDisabled,
cursor: "not-allowed"
}
},
focusVisible: {
backgroundColor: theme.colors.bgPageSecondary,
...outlineStyles
},
checkbox: {},
invalidCheckbox: {},
label: {
verticalAlign: "middle",
...theme.typography.body,
cursor: "pointer",
lineHeight: "32px",
flex: 1
},
checked: {},
indeterminate: {},
semantic: {},
left: {
"& $label": {
paddingLeft: theme.space.xs,
textAlign: "right"
},
"& $container": { flexDirection: "row-reverse" }
},
right: { "& $label": { paddingRight: theme.space.xs } }
});
//#endregion
export { staticClasses, useClasses };