@bitrix24/b24ui-nuxt
Version:
Bitrix24 UI-Kit for developing web applications REST API for NUXT & VUE
229 lines (228 loc) • 10.3 kB
TypeScript
import type { NumberFieldRootProps } from 'reka-ui';
import type { AppConfig } from '@nuxt/schema';
import theme from '#build/b24ui/input-number';
import type { ButtonProps, BadgeProps, IconComponent } from '../types';
import type { ComponentConfig } from '../types/utils';
type InputNumber = ComponentConfig<typeof theme, AppConfig, 'inputNumber'>;
export interface InputNumberProps extends Pick<NumberFieldRootProps, 'modelValue' | 'defaultValue' | 'min' | 'max' | 'stepSnapping' | 'step' | 'disabled' | 'required' | 'id' | 'name' | 'formatOptions' | 'disableWheelChange' | 'invertWheelChange' | 'readonly'> {
/**
* The element or component this component should render as.
* @defaultValue 'div'
*/
as?: any;
/**
* The placeholder text when the input is empty
*/
placeholder?: string;
/**
* @defaultValue 'air-primary'
*/
color?: InputNumber['variants']['color'];
/**
* @defaultValue 'md'
*/
size?: InputNumber['variants']['size'];
/**
* Removes padding from input
* @defaultValue false
*/
noPadding?: boolean;
/**
* Removes all borders (rings)
* @defaultValue false
*/
noBorder?: boolean;
/**
* Removes all borders (rings) except the bottom one
* @defaultValue false
*/
underline?: boolean;
/**
* Rounds the corners of the button
* @defaultValue false
*/
rounded?: boolean;
tag?: string;
/**
* @defaultValue 'air-primary'
*/
tagColor?: BadgeProps['color'];
/**
* Highlight the ring color like a focus state
* @defaultValue false
*/
highlight?: boolean;
/**
* The orientation of the input menu.
* @defaultValue 'horizontal'
*/
orientation?: 'vertical' | 'horizontal';
/**
* Configure the increment button. The `size` is inherited.
* @defaultValue { color: 'air-tertiary-no-accent' }
*/
increment?: ButtonProps;
/**
* The icon displayed to increment the value.
* @defaultValue icons.plus
* @IconComponent
*/
incrementIcon?: IconComponent;
/** Disable the increment button. */
incrementDisabled?: boolean;
/**
* Configure the decrement button. The `size` is inherited.
* @defaultValue { color: 'air-tertiary-no-accent' }
*/
decrement?: ButtonProps;
/**
* The icon displayed to decrement the value.
* @defaultValue icons.minus
* @IconComponent
*/
decrementIcon?: IconComponent;
/** Disable the decrement button. */
decrementDisabled?: boolean;
/**
* @defaultValue false
*/
autofocus?: boolean;
/**
* @defaultValue 0
*/
autofocusDelay?: number;
/**
* The locale to use for formatting and parsing numbers.
* @defaultValue B24App.locale.code
*/
locale?: string;
class?: any;
b24ui?: InputNumber['slots'];
}
export interface InputNumberEmits {
'update:modelValue': [value: number];
'blur': [event: FocusEvent];
'change': [event: Event];
}
export interface InputNumberSlots {
increment(props?: {}): any;
decrement(props?: {}): any;
}
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<InputNumberProps, {
inputRef: import("vue").Ref<({
$: import("vue").ComponentInternalInstance;
$data: {};
$props: {
readonly asChild?: boolean | undefined;
readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
$attrs: {
[x: string]: unknown;
};
$refs: {
[x: string]: unknown;
};
$slots: Readonly<{
[name: string]: import("vue").Slot<any> | undefined;
}>;
$root: import("vue").ComponentPublicInstance | null;
$parent: import("vue").ComponentPublicInstance | null;
$host: Element | null;
$emit: (event: string, ...args: any[]) => void;
$el: any;
$options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").NumberFieldInputProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
as: import("reka-ui").AsTag | import("vue").Component;
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
beforeCreate?: (() => void) | (() => void)[];
created?: (() => void) | (() => void)[];
beforeMount?: (() => void) | (() => void)[];
mounted?: (() => void) | (() => void)[];
beforeUpdate?: (() => void) | (() => void)[];
updated?: (() => void) | (() => void)[];
activated?: (() => void) | (() => void)[];
deactivated?: (() => void) | (() => void)[];
beforeDestroy?: (() => void) | (() => void)[];
beforeUnmount?: (() => void) | (() => void)[];
destroyed?: (() => void) | (() => void)[];
unmounted?: (() => void) | (() => void)[];
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
};
$forceUpdate: () => void;
$nextTick: typeof import("vue").nextTick;
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
} & Readonly<{
as: import("reka-ui").AsTag | import("vue").Component;
}> & Omit<Readonly<import("reka-ui").NumberFieldInputProps> & Readonly<{}>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
$slots: {
default?: (props: {}) => any;
};
}) | null, ({
$: import("vue").ComponentInternalInstance;
$data: {};
$props: {
readonly asChild?: boolean | undefined;
readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
$attrs: {
[x: string]: unknown;
};
$refs: {
[x: string]: unknown;
};
$slots: Readonly<{
[name: string]: import("vue").Slot<any> | undefined;
}>;
$root: import("vue").ComponentPublicInstance | null;
$parent: import("vue").ComponentPublicInstance | null;
$host: Element | null;
$emit: (event: string, ...args: any[]) => void;
$el: any;
$options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").NumberFieldInputProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
as: import("reka-ui").AsTag | import("vue").Component;
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
beforeCreate?: (() => void) | (() => void)[];
created?: (() => void) | (() => void)[];
beforeMount?: (() => void) | (() => void)[];
mounted?: (() => void) | (() => void)[];
beforeUpdate?: (() => void) | (() => void)[];
updated?: (() => void) | (() => void)[];
activated?: (() => void) | (() => void)[];
deactivated?: (() => void) | (() => void)[];
beforeDestroy?: (() => void) | (() => void)[];
beforeUnmount?: (() => void) | (() => void)[];
destroyed?: (() => void) | (() => void)[];
unmounted?: (() => void) | (() => void)[];
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
};
$forceUpdate: () => void;
$nextTick: typeof import("vue").nextTick;
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
} & Readonly<{
as: import("reka-ui").AsTag | import("vue").Component;
}> & Omit<Readonly<import("reka-ui").NumberFieldInputProps> & Readonly<{}>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
$slots: {
default?: (props: {}) => any;
};
}) | null>;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
blur: (event: FocusEvent) => any;
change: (event: Event) => any;
"update:modelValue": (value: number) => any;
}, string, import("vue").PublicProps, Readonly<InputNumberProps> & Readonly<{
onBlur?: ((event: FocusEvent) => any) | undefined;
onChange?: ((event: Event) => any) | undefined;
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
}>, {
color: InputNumber["variants"]["color"];
orientation: "vertical" | "horizontal";
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, InputNumberSlots>;
export default _default;
type __VLS_WithSlots<T, S> = T & {
new (): {
$slots: S;
};
};