import { FormInputProps } from "@lifesg/react-design-system/form"; import { InputGroupAddonPosition } from "@lifesg/react-design-system/input-group"; import * as Icons from "@lifesg/react-icons"; import { IYupValidationRule, TComponentOmitProps } from "../../frontend-engine"; import { IBaseFieldSchema } from "../types"; type TCustomOptions = { preventCopyAndPaste?: boolean | undefined; preventDragAndDrop?: boolean | undefined; addOn?: TIconAddOn | TLabelAddOn | undefined; }; type TIconAddOn = { type: "icon"; icon: keyof typeof Icons; color?: string | undefined; position?: InputGroupAddonPosition | undefined; }; type TLabelAddOn = { type: "label"; value: string; position?: InputGroupAddonPosition | undefined; }; export type TCustomOptionsText = TCustomOptions & { textTransform?: "uppercase" | undefined; }; export interface ITextFieldSchema extends IBaseFieldSchema<"text-field", V>, TComponentOmitProps { customOptions?: TCustomOptionsText | undefined; } export interface IEmailFieldSchema extends IBaseFieldSchema<"email-field", V>, TComponentOmitProps { customOptions?: TCustomOptions | undefined; } export interface INumericFieldValidationRule extends IYupValidationRule { decimals?: number | undefined; } export interface INumericFieldSchema extends IBaseFieldSchema<"numeric-field", V, INumericFieldValidationRule>, TComponentOmitProps { customOptions?: TCustomOptions | undefined; } export {};