@vlinderclimate/net-zero-ui
Version:
<div align="center"> <img src="https://storage.yandexcloud.net/static.vlinderstorage.com/Telegram_VlinderTech.png" width=200 /> </div> <h1 align="center">Net Zero UI kit</h1>
198 lines (197 loc) • 5.79 kB
TypeScript
/// <reference types="react" />
import { Theme } from "@mui/material/styles";
import { InputProps as MuiInputProps } from "@mui/material/Input";
import { EndAdornmentProps } from "./EndAdornment";
export interface InputProps extends Omit<MuiInputProps, "color" | "size"> {
/**
* The color of the component. The prop defaults to the value (`'primary'`)
*/
color?: "primary" | "secondary";
/**
* The size of the component. The prop defaults to the value (`'md'`)
*/
size?: "xs" | "sm" | "md" | "lg";
/**
* If `true`, `Input` element wouldn't render error icon in default.
* The props defaults to the value `false`.
*/
overrideErrorAdornment?: boolean;
/**
* If not undefined, an action button is rendered as part of end adornment.
*/
actionButtonProps?: EndAdornmentProps["actionButtonProps"];
}
interface StyledInputProps extends Omit<InputProps, "color" | "size"> {
size?: InputProps["size"];
$append?: boolean;
}
interface ExtendedStyledInputProps extends StyledInputProps {
theme: Theme;
}
export declare const getFontSize: ({ size, theme }: ExtendedStyledInputProps) => {
main: 18;
mobile: 18;
} | {
main: 19;
mobile: 18;
} | {
main: 21;
mobile: 19;
} | {
main: 23;
mobile: 21;
} | undefined;
export declare const getPadding: ({ size, theme, $append: append }: ExtendedStyledInputProps) => {
main: string;
mobile: string;
} | undefined;
export declare const getLineHeight: ({ size, theme }: ExtendedStyledInputProps) => {
main: "24px";
mobile: "20px";
} | {
main: "24px";
mobile: "24px";
} | undefined;
export declare const formCommonStyles: (theme: Theme) => {
[x: string]: string | {
display: string;
backgroundColor?: undefined;
height?: undefined;
boxShadow?: undefined;
borderRadius?: undefined;
borderBottom?: undefined;
fontSize?: undefined;
lineHeight?: undefined;
marginTop?: undefined;
"&.Mui-focused"?: undefined;
appearance?: undefined;
"&.Mui-error"?: undefined;
} | {
backgroundColor: string;
display?: undefined;
height?: undefined;
boxShadow?: undefined;
borderRadius?: undefined;
borderBottom?: undefined;
fontSize?: undefined;
lineHeight?: undefined;
marginTop?: undefined;
"&.Mui-focused"?: undefined;
appearance?: undefined;
"&.Mui-error"?: undefined;
} | {
height: string;
display?: undefined;
backgroundColor?: undefined;
boxShadow?: undefined;
borderRadius?: undefined;
borderBottom?: undefined;
fontSize?: undefined;
lineHeight?: undefined;
marginTop?: undefined;
"&.Mui-focused"?: undefined;
appearance?: undefined;
"&.Mui-error"?: undefined;
} | {
boxShadow: string;
display?: undefined;
backgroundColor?: undefined;
height?: undefined;
borderRadius?: undefined;
borderBottom?: undefined;
fontSize?: undefined;
lineHeight?: undefined;
marginTop?: undefined;
"&.Mui-focused"?: undefined;
appearance?: undefined;
"&.Mui-error"?: undefined;
} | {
backgroundColor: string;
borderRadius: number;
borderBottom: string;
boxShadow: string;
fontSize: 15;
lineHeight: "20px";
marginTop: number;
"&.Mui-focused": {
borderBottomColor: string;
boxShadow?: undefined;
};
display?: undefined;
height?: undefined;
appearance?: undefined;
"&.Mui-error"?: undefined;
} | {
appearance: string;
display?: undefined;
backgroundColor?: undefined;
height?: undefined;
boxShadow?: undefined;
borderRadius?: undefined;
borderBottom?: undefined;
fontSize?: undefined;
lineHeight?: undefined;
marginTop?: undefined;
"&.Mui-focused"?: undefined;
"&.Mui-error"?: undefined;
} | {
"&.Mui-focused": {
boxShadow: string;
borderBottomColor?: undefined;
};
"&.Mui-error": {
boxShadow: string;
};
display?: undefined;
backgroundColor?: undefined;
height?: undefined;
boxShadow?: undefined;
borderRadius?: undefined;
borderBottom?: undefined;
fontSize?: undefined;
lineHeight?: undefined;
marginTop?: undefined;
appearance?: undefined;
};
caretColor: string;
backgroundColor: string;
transition: string;
fieldset: {
display: string;
};
"&.MuiInputBase-colorSecondary": {
backgroundColor: string;
};
"& input": {
height: string;
};
"&.Input-outlined": {
boxShadow: string;
};
"&.Mui-focused, &:hover": {
boxShadow: string;
};
"&.Mui-error": {
boxShadow: string;
};
"&.Mui-disabled": {
backgroundColor: string;
};
"&.Input-standard": {
backgroundColor: string;
borderRadius: number;
borderBottom: string;
boxShadow: string;
fontSize: 15;
lineHeight: "20px";
marginTop: number;
"&.Mui-focused": {
borderBottomColor: string;
};
};
"& [type=number]": {
appearance: string;
};
};
declare const Input: React.FC<InputProps>;
export default Input;