import { TextField } from "./TextField.mjs";
import { jsx } from "react/jsx-runtime";
function NumericalInput({
  value,
  onChange,
  ...props
}) {
  return /* @__PURE__ */jsx(TextField, {
    ...props,
    keyboardType: "decimal-pad",
    onChangeText: e => {
      const newValue = e?.replace(/[^0-9.]/g, "").replace(/(\..*)\./g, "$1");
      onChange && onChange(newValue);
    },
    value: value?.toString()
  });
}
export { NumericalInput };
//# sourceMappingURL=NumericalInput.mjs.map
