@rws-aoa/react-library
Version:
RWS AOA Design System
62 lines (61 loc) • 1.61 kB
JavaScript
import { jsx as a } from "react/jsx-runtime";
import { TextField as i, inputLabelClasses as s, formHelperTextClasses as o, inputBaseClasses as e } from "@mui/material";
import { l as n } from "../../../chunks/lodash.CA_K01A9.js";
import { FontNormalSxProps as t } from "../../../_constants.js";
function m({
optional: l,
...r
}) {
return /* @__PURE__ */ a(i, { ...r, required: !l, slotProps: {
inputLabel: {
shrink: !1,
...r.slotProps?.inputLabel
},
...r.slotProps
}, sx: n.merge({
[`.${e.root}`]: {
...t,
marginTop: "35px",
[`&.${e.multiline}`]: {
padding: 0
},
[`:not(.${o.error})::after`]: {
borderColor: "var(--color-rijks-skyblue)"
},
[`.${e.input}`]: {
padding: "17px 12px 16px",
":disabled": {
backgroundColor: "var(--color-disabled)",
borderColor: "var(--color-disabled)"
}
}
},
[`.${s.root}`]: {
...t,
marginLeft: "-14px",
marginTop: "-10px",
":disabled": {
color: "var(--color-text-disabled)"
},
[`:focus:not(.${o.error})`]: {
color: "var(--color-rijks-skyblue)"
},
[`:not(.${o.required})::after`]: {
content: '"(optioneel)"',
marginLeft: "5px",
fontSize: "calc(var(--font-size-text) * 0.75)"
},
[`&.${o.error}`]: {
...t,
fontWeight: "bold"
},
[`&.${o.disabled}`]: {
color: "var(--color-text-disabled)"
}
}
}, r.sx), variant: "outlined" });
}
export {
m as AoaInput
};
//# sourceMappingURL=Input.js.map