@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
89 lines (87 loc) • 2.47 kB
JavaScript
import { defineComponentSlotStyle } from "../../core/system/config.js";
import { getInputHeightStyle, getInputPaddingStartResetStyle, inputStyle } from "../input/input.style.js";
import { buttonStyle } from "../button/button.style.js";
//#region src/components/password-input/password-input.style.ts
const passwordInputStyle = defineComponentSlotStyle({
base: {
button: {
...buttonStyle.base,
rounded: "l1",
_readOnly: { cursor: "pointer" }
},
field: inputStyle.base,
root: {}
},
variants: {
base: { button: {
layerStyle: "ghost",
focusVisibleRing: "none",
_hover: { layerStyle: "ghost.hover" },
_focusVisible: { layerStyle: "ghost.hover" }
} },
filled: { field: inputStyle.variants?.filled },
flushed: {
field: inputStyle.variants?.flushed,
root: getInputPaddingStartResetStyle("& > input")
},
outline: { field: inputStyle.variants?.outline },
plain: { field: inputStyle.variants?.plain }
},
sizes: {
xs: {
button: {
boxSize: `calc({--height} - {spaces.2})`,
fontSize: inputStyle.sizes?.xs.fontSize
},
field: inputStyle.sizes?.xs,
root: getInputHeightStyle(inputStyle.sizes?.xs.minH, "& > input")
},
sm: {
button: {
boxSize: `calc({--height} - {spaces.2})`,
fontSize: inputStyle.sizes?.sm.fontSize
},
field: inputStyle.sizes?.sm,
root: getInputHeightStyle(inputStyle.sizes?.sm.minH, "& > input")
},
md: {
button: {
boxSize: `calc({--height} - {spaces.2})`,
fontSize: inputStyle.sizes?.md.fontSize
},
field: inputStyle.sizes?.md,
root: getInputHeightStyle(inputStyle.sizes?.md.minH, "& > input")
},
lg: {
button: {
boxSize: `calc({--height} - {spaces.2.5})`,
fontSize: inputStyle.sizes?.lg.fontSize
},
field: inputStyle.sizes?.lg,
root: getInputHeightStyle(inputStyle.sizes?.lg.minH, "& > input")
},
xl: {
button: {
boxSize: `calc({--height} - {spaces.3})`,
fontSize: inputStyle.sizes?.xl.fontSize
},
field: inputStyle.sizes?.xl,
root: getInputHeightStyle(inputStyle.sizes?.xl.minH, "& > input")
},
"2xl": {
button: {
boxSize: `calc({--height} - {spaces.3})`,
fontSize: inputStyle.sizes?.["2xl"].fontSize
},
field: inputStyle.sizes?.["2xl"],
root: getInputHeightStyle(inputStyle.sizes?.["2xl"]?.minH, "& > input")
}
},
defaultProps: {
size: "md",
variant: "outline"
}
});
//#endregion
export { passwordInputStyle };
//# sourceMappingURL=password-input.style.js.map