UNPKG

naive-ui

Version:

A Vue 3 Component Library. Fairly Complete, Theme Customizable, Uses TypeScript, Fast

876 lines (875 loc) 31.7 kB
import type { PropType, SlotsType } from 'vue'; import type { ExtractPublicPropTypes, MaybeArray } from '../../_utils'; import type { FormValidationStatus } from '../../form/src/public-types'; import type { InputOtpAllowInput, InputOtpOnBlur, InputOtpOnFinish, InputOtpOnFocus, InputOtpOnUpdateValue, InputOtpSize, InputOtpSlots } from './public-types'; export declare const inputOtpProps: { defaultValue: { type: PropType<string[]>; default: never[]; }; value: PropType<null | string[]>; length: { type: NumberConstructor; default: number; }; block: BooleanConstructor; size: PropType<InputOtpSize>; disabled: BooleanConstructor; mask: BooleanConstructor; readonly: BooleanConstructor; status: PropType<FormValidationStatus>; gap: PropType<string | number>; placeholder: { type: StringConstructor; default: string; }; allowInput: PropType<InputOtpAllowInput>; onBlur: PropType<MaybeArray<InputOtpOnBlur>>; onFocus: PropType<MaybeArray<InputOtpOnFocus>>; 'onUpdate:value': PropType<MaybeArray<InputOtpOnUpdateValue>>; onUpdateValue: PropType<MaybeArray<InputOtpOnUpdateValue>>; onFinish: PropType<MaybeArray<InputOtpOnFinish>>; theme: PropType<import("../../_mixins").Theme<"InputOtp", { inputWidthSmall: string; inputWidthMedium: string; inputWidthLarge: string; gapSmall: string; gapMedium: string; gapLarge: string; }, { Input: import("../../_mixins").Theme<"Input", { fontWeight: string; countTextColorDisabled: string; countTextColor: string; heightTiny: string; heightSmall: string; heightMedium: string; heightLarge: string; fontSizeTiny: string; fontSizeSmall: string; fontSizeMedium: string; fontSizeLarge: string; lineHeight: string; lineHeightTextarea: string; borderRadius: string; iconSize: string; groupLabelColor: string; groupLabelTextColor: string; textColor: string; textColorDisabled: string; textDecorationColor: string; caretColor: string; placeholderColor: string; placeholderColorDisabled: string; color: string; colorDisabled: string; colorFocus: string; groupLabelBorder: string; border: string; borderHover: string; borderDisabled: string; borderFocus: string; boxShadowFocus: string; loadingColor: string; loadingColorWarning: string; borderWarning: string; borderHoverWarning: string; colorFocusWarning: string; borderFocusWarning: string; boxShadowFocusWarning: string; caretColorWarning: string; loadingColorError: string; borderError: string; borderHoverError: string; colorFocusError: string; borderFocusError: string; boxShadowFocusError: string; caretColorError: string; clearColor: string; clearColorHover: string; clearColorPressed: string; iconColor: string; iconColorDisabled: string; iconColorHover: string; iconColorPressed: string; suffixTextColor: string; paddingTiny: string; paddingSmall: string; paddingMedium: string; paddingLarge: string; clearSize: string; }, any>; }>>; themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"InputOtp", { inputWidthSmall: string; inputWidthMedium: string; inputWidthLarge: string; gapSmall: string; gapMedium: string; gapLarge: string; }, { Input: import("../../_mixins").Theme<"Input", { fontWeight: string; countTextColorDisabled: string; countTextColor: string; heightTiny: string; heightSmall: string; heightMedium: string; heightLarge: string; fontSizeTiny: string; fontSizeSmall: string; fontSizeMedium: string; fontSizeLarge: string; lineHeight: string; lineHeightTextarea: string; borderRadius: string; iconSize: string; groupLabelColor: string; groupLabelTextColor: string; textColor: string; textColorDisabled: string; textDecorationColor: string; caretColor: string; placeholderColor: string; placeholderColorDisabled: string; color: string; colorDisabled: string; colorFocus: string; groupLabelBorder: string; border: string; borderHover: string; borderDisabled: string; borderFocus: string; boxShadowFocus: string; loadingColor: string; loadingColorWarning: string; borderWarning: string; borderHoverWarning: string; colorFocusWarning: string; borderFocusWarning: string; boxShadowFocusWarning: string; caretColorWarning: string; loadingColorError: string; borderError: string; borderHoverError: string; colorFocusError: string; borderFocusError: string; boxShadowFocusError: string; caretColorError: string; clearColor: string; clearColorHover: string; clearColorPressed: string; iconColor: string; iconColorDisabled: string; iconColorHover: string; iconColorPressed: string; suffixTextColor: string; paddingTiny: string; paddingSmall: string; paddingMedium: string; paddingLarge: string; clearSize: string; }, any>; }>>>; builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"InputOtp", { inputWidthSmall: string; inputWidthMedium: string; inputWidthLarge: string; gapSmall: string; gapMedium: string; gapLarge: string; }, { Input: import("../../_mixins").Theme<"Input", { fontWeight: string; countTextColorDisabled: string; countTextColor: string; heightTiny: string; heightSmall: string; heightMedium: string; heightLarge: string; fontSizeTiny: string; fontSizeSmall: string; fontSizeMedium: string; fontSizeLarge: string; lineHeight: string; lineHeightTextarea: string; borderRadius: string; iconSize: string; groupLabelColor: string; groupLabelTextColor: string; textColor: string; textColorDisabled: string; textDecorationColor: string; caretColor: string; placeholderColor: string; placeholderColorDisabled: string; color: string; colorDisabled: string; colorFocus: string; groupLabelBorder: string; border: string; borderHover: string; borderDisabled: string; borderFocus: string; boxShadowFocus: string; loadingColor: string; loadingColorWarning: string; borderWarning: string; borderHoverWarning: string; colorFocusWarning: string; borderFocusWarning: string; boxShadowFocusWarning: string; caretColorWarning: string; loadingColorError: string; borderError: string; borderHoverError: string; colorFocusError: string; borderFocusError: string; boxShadowFocusError: string; caretColorError: string; clearColor: string; clearColorHover: string; clearColorPressed: string; iconColor: string; iconColorDisabled: string; iconColorHover: string; iconColorPressed: string; suffixTextColor: string; paddingTiny: string; paddingSmall: string; paddingMedium: string; paddingLarge: string; clearSize: string; }, any>; }>>>; }; export type InputOtpProps = ExtractPublicPropTypes<typeof inputOtpProps>; declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ defaultValue: { type: PropType<string[]>; default: never[]; }; value: PropType<null | string[]>; length: { type: NumberConstructor; default: number; }; block: BooleanConstructor; size: PropType<InputOtpSize>; disabled: BooleanConstructor; mask: BooleanConstructor; readonly: BooleanConstructor; status: PropType<FormValidationStatus>; gap: PropType<string | number>; placeholder: { type: StringConstructor; default: string; }; allowInput: PropType<InputOtpAllowInput>; onBlur: PropType<MaybeArray<InputOtpOnBlur>>; onFocus: PropType<MaybeArray<InputOtpOnFocus>>; 'onUpdate:value': PropType<MaybeArray<InputOtpOnUpdateValue>>; onUpdateValue: PropType<MaybeArray<InputOtpOnUpdateValue>>; onFinish: PropType<MaybeArray<InputOtpOnFinish>>; theme: PropType<import("../../_mixins").Theme<"InputOtp", { inputWidthSmall: string; inputWidthMedium: string; inputWidthLarge: string; gapSmall: string; gapMedium: string; gapLarge: string; }, { Input: import("../../_mixins").Theme<"Input", { fontWeight: string; countTextColorDisabled: string; countTextColor: string; heightTiny: string; heightSmall: string; heightMedium: string; heightLarge: string; fontSizeTiny: string; fontSizeSmall: string; fontSizeMedium: string; fontSizeLarge: string; lineHeight: string; lineHeightTextarea: string; borderRadius: string; iconSize: string; groupLabelColor: string; groupLabelTextColor: string; textColor: string; textColorDisabled: string; textDecorationColor: string; caretColor: string; placeholderColor: string; placeholderColorDisabled: string; color: string; colorDisabled: string; colorFocus: string; groupLabelBorder: string; border: string; borderHover: string; borderDisabled: string; borderFocus: string; boxShadowFocus: string; loadingColor: string; loadingColorWarning: string; borderWarning: string; borderHoverWarning: string; colorFocusWarning: string; borderFocusWarning: string; boxShadowFocusWarning: string; caretColorWarning: string; loadingColorError: string; borderError: string; borderHoverError: string; colorFocusError: string; borderFocusError: string; boxShadowFocusError: string; caretColorError: string; clearColor: string; clearColorHover: string; clearColorPressed: string; iconColor: string; iconColorDisabled: string; iconColorHover: string; iconColorPressed: string; suffixTextColor: string; paddingTiny: string; paddingSmall: string; paddingMedium: string; paddingLarge: string; clearSize: string; }, any>; }>>; themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"InputOtp", { inputWidthSmall: string; inputWidthMedium: string; inputWidthLarge: string; gapSmall: string; gapMedium: string; gapLarge: string; }, { Input: import("../../_mixins").Theme<"Input", { fontWeight: string; countTextColorDisabled: string; countTextColor: string; heightTiny: string; heightSmall: string; heightMedium: string; heightLarge: string; fontSizeTiny: string; fontSizeSmall: string; fontSizeMedium: string; fontSizeLarge: string; lineHeight: string; lineHeightTextarea: string; borderRadius: string; iconSize: string; groupLabelColor: string; groupLabelTextColor: string; textColor: string; textColorDisabled: string; textDecorationColor: string; caretColor: string; placeholderColor: string; placeholderColorDisabled: string; color: string; colorDisabled: string; colorFocus: string; groupLabelBorder: string; border: string; borderHover: string; borderDisabled: string; borderFocus: string; boxShadowFocus: string; loadingColor: string; loadingColorWarning: string; borderWarning: string; borderHoverWarning: string; colorFocusWarning: string; borderFocusWarning: string; boxShadowFocusWarning: string; caretColorWarning: string; loadingColorError: string; borderError: string; borderHoverError: string; colorFocusError: string; borderFocusError: string; boxShadowFocusError: string; caretColorError: string; clearColor: string; clearColorHover: string; clearColorPressed: string; iconColor: string; iconColorDisabled: string; iconColorHover: string; iconColorPressed: string; suffixTextColor: string; paddingTiny: string; paddingSmall: string; paddingMedium: string; paddingLarge: string; clearSize: string; }, any>; }>>>; builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"InputOtp", { inputWidthSmall: string; inputWidthMedium: string; inputWidthLarge: string; gapSmall: string; gapMedium: string; gapLarge: string; }, { Input: import("../../_mixins").Theme<"Input", { fontWeight: string; countTextColorDisabled: string; countTextColor: string; heightTiny: string; heightSmall: string; heightMedium: string; heightLarge: string; fontSizeTiny: string; fontSizeSmall: string; fontSizeMedium: string; fontSizeLarge: string; lineHeight: string; lineHeightTextarea: string; borderRadius: string; iconSize: string; groupLabelColor: string; groupLabelTextColor: string; textColor: string; textColorDisabled: string; textDecorationColor: string; caretColor: string; placeholderColor: string; placeholderColorDisabled: string; color: string; colorDisabled: string; colorFocus: string; groupLabelBorder: string; border: string; borderHover: string; borderDisabled: string; borderFocus: string; boxShadowFocus: string; loadingColor: string; loadingColorWarning: string; borderWarning: string; borderHoverWarning: string; colorFocusWarning: string; borderFocusWarning: string; boxShadowFocusWarning: string; caretColorWarning: string; loadingColorError: string; borderError: string; borderHoverError: string; colorFocusError: string; borderFocusError: string; boxShadowFocusError: string; caretColorError: string; clearColor: string; clearColorHover: string; clearColorPressed: string; iconColor: string; iconColorDisabled: string; iconColorHover: string; iconColorPressed: string; suffixTextColor: string; paddingTiny: string; paddingSmall: string; paddingMedium: string; paddingLarge: string; clearSize: string; }, any>; }>>>; }>, { mergedTheme: import("vue").ComputedRef<{ common: import("naive-ui").ThemeCommonVars; self: { inputWidthSmall: string; inputWidthMedium: string; inputWidthLarge: string; gapSmall: string; gapMedium: string; gapLarge: string; }; peers: { Input: import("../../_mixins").Theme<"Input", { fontWeight: string; countTextColorDisabled: string; countTextColor: string; heightTiny: string; heightSmall: string; heightMedium: string; heightLarge: string; fontSizeTiny: string; fontSizeSmall: string; fontSizeMedium: string; fontSizeLarge: string; lineHeight: string; lineHeightTextarea: string; borderRadius: string; iconSize: string; groupLabelColor: string; groupLabelTextColor: string; textColor: string; textColorDisabled: string; textDecorationColor: string; caretColor: string; placeholderColor: string; placeholderColorDisabled: string; color: string; colorDisabled: string; colorFocus: string; groupLabelBorder: string; border: string; borderHover: string; borderDisabled: string; borderFocus: string; boxShadowFocus: string; loadingColor: string; loadingColorWarning: string; borderWarning: string; borderHoverWarning: string; colorFocusWarning: string; borderFocusWarning: string; boxShadowFocusWarning: string; caretColorWarning: string; loadingColorError: string; borderError: string; borderHoverError: string; colorFocusError: string; borderFocusError: string; boxShadowFocusError: string; caretColorError: string; clearColor: string; clearColorHover: string; clearColorPressed: string; iconColor: string; iconColorDisabled: string; iconColorHover: string; iconColorPressed: string; suffixTextColor: string; paddingTiny: string; paddingSmall: string; paddingMedium: string; paddingLarge: string; clearSize: string; }, any>; }; peerOverrides: { Input?: { peers?: { [x: string]: any; } | undefined; } | undefined; }; }>; perItemValueArray: import("vue").ComputedRef<string[]>; mergedClsPrefix: import("vue").Ref<string, string>; inputRefList: import("vue").Ref<{ wrapperElRef: HTMLElement | null; textareaElRef: HTMLTextAreaElement | null; inputElRef: HTMLInputElement | null; isCompositing: boolean; blur: () => void; clear: () => void; focus: () => void; select: () => void; activate: () => void; deactivate: () => void; scrollTo: (options: ScrollToOptions) => void; }[], { wrapperElRef: HTMLElement | null; textareaElRef: HTMLTextAreaElement | null; inputElRef: HTMLInputElement | null; isCompositing: boolean; blur: () => void; clear: () => void; focus: () => void; select: () => void; activate: () => void; deactivate: () => void; scrollTo: (options: ScrollToOptions) => void; }[] | { wrapperElRef: HTMLElement | null; textareaElRef: HTMLTextAreaElement | null; inputElRef: HTMLInputElement | null; isCompositing: boolean; blur: () => void; clear: () => void; focus: () => void; select: () => void; activate: () => void; deactivate: () => void; scrollTo: (options: ScrollToOptions) => void; }[]>; inputType: import("vue").ComputedRef<"text" | "password">; rtlEnabled: import("vue").Ref<import("../../config-provider/src/internal-interface").RtlItem | undefined, import("../../config-provider/src/internal-interface").RtlItem | undefined> | undefined; mergedStatus: import("vue").ComputedRef<FormValidationStatus | undefined>; mergedDisabled: import("vue").ComputedRef<boolean>; cssVars: import("vue").ComputedRef<{ '--n-gap': string; '--n-input-width': string; }> | undefined; themeClass: import("vue").Ref<string, string> | undefined; getTemplateEvents: (index: number) => { onInput: (value: string) => void; onPaste: (event: ClipboardEvent) => void; onKeydown: (event: KeyboardEvent) => void; onFocus: (event: FocusEvent) => void; onBlur: (event: FocusEvent) => void; }; onRender: (() => void) | undefined; }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ defaultValue: { type: PropType<string[]>; default: never[]; }; value: PropType<null | string[]>; length: { type: NumberConstructor; default: number; }; block: BooleanConstructor; size: PropType<InputOtpSize>; disabled: BooleanConstructor; mask: BooleanConstructor; readonly: BooleanConstructor; status: PropType<FormValidationStatus>; gap: PropType<string | number>; placeholder: { type: StringConstructor; default: string; }; allowInput: PropType<InputOtpAllowInput>; onBlur: PropType<MaybeArray<InputOtpOnBlur>>; onFocus: PropType<MaybeArray<InputOtpOnFocus>>; 'onUpdate:value': PropType<MaybeArray<InputOtpOnUpdateValue>>; onUpdateValue: PropType<MaybeArray<InputOtpOnUpdateValue>>; onFinish: PropType<MaybeArray<InputOtpOnFinish>>; theme: PropType<import("../../_mixins").Theme<"InputOtp", { inputWidthSmall: string; inputWidthMedium: string; inputWidthLarge: string; gapSmall: string; gapMedium: string; gapLarge: string; }, { Input: import("../../_mixins").Theme<"Input", { fontWeight: string; countTextColorDisabled: string; countTextColor: string; heightTiny: string; heightSmall: string; heightMedium: string; heightLarge: string; fontSizeTiny: string; fontSizeSmall: string; fontSizeMedium: string; fontSizeLarge: string; lineHeight: string; lineHeightTextarea: string; borderRadius: string; iconSize: string; groupLabelColor: string; groupLabelTextColor: string; textColor: string; textColorDisabled: string; textDecorationColor: string; caretColor: string; placeholderColor: string; placeholderColorDisabled: string; color: string; colorDisabled: string; colorFocus: string; groupLabelBorder: string; border: string; borderHover: string; borderDisabled: string; borderFocus: string; boxShadowFocus: string; loadingColor: string; loadingColorWarning: string; borderWarning: string; borderHoverWarning: string; colorFocusWarning: string; borderFocusWarning: string; boxShadowFocusWarning: string; caretColorWarning: string; loadingColorError: string; borderError: string; borderHoverError: string; colorFocusError: string; borderFocusError: string; boxShadowFocusError: string; caretColorError: string; clearColor: string; clearColorHover: string; clearColorPressed: string; iconColor: string; iconColorDisabled: string; iconColorHover: string; iconColorPressed: string; suffixTextColor: string; paddingTiny: string; paddingSmall: string; paddingMedium: string; paddingLarge: string; clearSize: string; }, any>; }>>; themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"InputOtp", { inputWidthSmall: string; inputWidthMedium: string; inputWidthLarge: string; gapSmall: string; gapMedium: string; gapLarge: string; }, { Input: import("../../_mixins").Theme<"Input", { fontWeight: string; countTextColorDisabled: string; countTextColor: string; heightTiny: string; heightSmall: string; heightMedium: string; heightLarge: string; fontSizeTiny: string; fontSizeSmall: string; fontSizeMedium: string; fontSizeLarge: string; lineHeight: string; lineHeightTextarea: string; borderRadius: string; iconSize: string; groupLabelColor: string; groupLabelTextColor: string; textColor: string; textColorDisabled: string; textDecorationColor: string; caretColor: string; placeholderColor: string; placeholderColorDisabled: string; color: string; colorDisabled: string; colorFocus: string; groupLabelBorder: string; border: string; borderHover: string; borderDisabled: string; borderFocus: string; boxShadowFocus: string; loadingColor: string; loadingColorWarning: string; borderWarning: string; borderHoverWarning: string; colorFocusWarning: string; borderFocusWarning: string; boxShadowFocusWarning: string; caretColorWarning: string; loadingColorError: string; borderError: string; borderHoverError: string; colorFocusError: string; borderFocusError: string; boxShadowFocusError: string; caretColorError: string; clearColor: string; clearColorHover: string; clearColorPressed: string; iconColor: string; iconColorDisabled: string; iconColorHover: string; iconColorPressed: string; suffixTextColor: string; paddingTiny: string; paddingSmall: string; paddingMedium: string; paddingLarge: string; clearSize: string; }, any>; }>>>; builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"InputOtp", { inputWidthSmall: string; inputWidthMedium: string; inputWidthLarge: string; gapSmall: string; gapMedium: string; gapLarge: string; }, { Input: import("../../_mixins").Theme<"Input", { fontWeight: string; countTextColorDisabled: string; countTextColor: string; heightTiny: string; heightSmall: string; heightMedium: string; heightLarge: string; fontSizeTiny: string; fontSizeSmall: string; fontSizeMedium: string; fontSizeLarge: string; lineHeight: string; lineHeightTextarea: string; borderRadius: string; iconSize: string; groupLabelColor: string; groupLabelTextColor: string; textColor: string; textColorDisabled: string; textDecorationColor: string; caretColor: string; placeholderColor: string; placeholderColorDisabled: string; color: string; colorDisabled: string; colorFocus: string; groupLabelBorder: string; border: string; borderHover: string; borderDisabled: string; borderFocus: string; boxShadowFocus: string; loadingColor: string; loadingColorWarning: string; borderWarning: string; borderHoverWarning: string; colorFocusWarning: string; borderFocusWarning: string; boxShadowFocusWarning: string; caretColorWarning: string; loadingColorError: string; borderError: string; borderHoverError: string; colorFocusError: string; borderFocusError: string; boxShadowFocusError: string; caretColorError: string; clearColor: string; clearColorHover: string; clearColorPressed: string; iconColor: string; iconColorDisabled: string; iconColorHover: string; iconColorPressed: string; suffixTextColor: string; paddingTiny: string; paddingSmall: string; paddingMedium: string; paddingLarge: string; clearSize: string; }, any>; }>>>; }>> & Readonly<{}>, { readonly: boolean; block: boolean; length: number; disabled: boolean; mask: boolean; placeholder: string; defaultValue: string[]; }, SlotsType<InputOtpSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>; export default _default;