@bitrix24/b24ui-nuxt
Version:
Bitrix24 UI-Kit for developing web applications REST API for NUXT & VUE
659 lines (658 loc) • 18.4 kB
TypeScript
import type { VariantProps } from 'tailwind-variants';
import type { NumberFieldRootProps } from 'reka-ui';
import type { ButtonProps, IconComponent } from '../types';
import type { PartialString } from '../types/utils';
declare const inputNumber: import("tailwind-variants").TVReturnType<{
size: {
xs: string;
sm: string;
md: string;
lg: string;
};
color: {
default: string;
danger: string;
success: string;
warning: string;
primary: string;
secondary: string;
collab: string;
ai: string;
};
tagColor: {
default: {
tag: string;
};
danger: {
tag: string;
};
success: {
tag: string;
};
warning: {
tag: string;
};
primary: {
tag: string;
};
secondary: {
tag: string;
};
collab: {
tag: string;
};
ai: {
tag: string;
};
};
rounded: {
true: string;
false: string;
};
noPadding: {
true: {
base: string;
};
};
noBorder: {
true: string;
};
underline: {
true: string;
};
disabled: {
true: {
increment: string;
decrement: string;
};
};
orientation: {
horizontal: {
base: string;
increment: string;
decrement: string;
};
vertical: {
increment: string;
decrement: string;
};
};
highlight: {
true: string;
};
}, {
root: string;
base: string;
increment: string;
decrement: string;
tag: string;
}, undefined, {
size: {
xs: string;
sm: string;
md: string;
lg: string;
};
color: {
default: string;
danger: string;
success: string;
warning: string;
primary: string;
secondary: string;
collab: string;
ai: string;
};
tagColor: {
default: {
tag: string;
};
danger: {
tag: string;
};
success: {
tag: string;
};
warning: {
tag: string;
};
primary: {
tag: string;
};
secondary: {
tag: string;
};
collab: {
tag: string;
};
ai: {
tag: string;
};
};
rounded: {
true: string;
false: string;
};
noPadding: {
true: {
base: string;
};
};
noBorder: {
true: string;
};
underline: {
true: string;
};
disabled: {
true: {
increment: string;
decrement: string;
};
};
orientation: {
horizontal: {
base: string;
increment: string;
decrement: string;
};
vertical: {
increment: string;
decrement: string;
};
};
highlight: {
true: string;
};
}, {
root: string;
base: string;
increment: string;
decrement: string;
tag: string;
}, import("tailwind-variants").TVReturnType<{
size: {
xs: string;
sm: string;
md: string;
lg: string;
};
color: {
default: string;
danger: string;
success: string;
warning: string;
primary: string;
secondary: string;
collab: string;
ai: string;
};
tagColor: {
default: {
tag: string;
};
danger: {
tag: string;
};
success: {
tag: string;
};
warning: {
tag: string;
};
primary: {
tag: string;
};
secondary: {
tag: string;
};
collab: {
tag: string;
};
ai: {
tag: string;
};
};
rounded: {
true: string;
false: string;
};
noPadding: {
true: {
base: string;
};
};
noBorder: {
true: string;
};
underline: {
true: string;
};
disabled: {
true: {
increment: string;
decrement: string;
};
};
orientation: {
horizontal: {
base: string;
increment: string;
decrement: string;
};
vertical: {
increment: string;
decrement: string;
};
};
highlight: {
true: string;
};
}, {
root: string;
base: string;
increment: string;
decrement: string;
tag: string;
}, undefined, {
size: {
xs: string;
sm: string;
md: string;
lg: string;
};
color: {
default: string;
danger: string;
success: string;
warning: string;
primary: string;
secondary: string;
collab: string;
ai: string;
};
tagColor: {
default: {
tag: string;
};
danger: {
tag: string;
};
success: {
tag: string;
};
warning: {
tag: string;
};
primary: {
tag: string;
};
secondary: {
tag: string;
};
collab: {
tag: string;
};
ai: {
tag: string;
};
};
rounded: {
true: string;
false: string;
};
noPadding: {
true: {
base: string;
};
};
noBorder: {
true: string;
};
underline: {
true: string;
};
disabled: {
true: {
increment: string;
decrement: string;
};
};
orientation: {
horizontal: {
base: string;
increment: string;
decrement: string;
};
vertical: {
increment: string;
decrement: string;
};
};
highlight: {
true: string;
};
}, {
root: string;
base: string;
increment: string;
decrement: string;
tag: string;
}, import("tailwind-variants").TVReturnType<{
size: {
xs: string;
sm: string;
md: string;
lg: string;
};
color: {
default: string;
danger: string;
success: string;
warning: string;
primary: string;
secondary: string;
collab: string;
ai: string;
};
tagColor: {
default: {
tag: string;
};
danger: {
tag: string;
};
success: {
tag: string;
};
warning: {
tag: string;
};
primary: {
tag: string;
};
secondary: {
tag: string;
};
collab: {
tag: string;
};
ai: {
tag: string;
};
};
rounded: {
true: string;
false: string;
};
noPadding: {
true: {
base: string;
};
};
noBorder: {
true: string;
};
underline: {
true: string;
};
disabled: {
true: {
increment: string;
decrement: string;
};
};
orientation: {
horizontal: {
base: string;
increment: string;
decrement: string;
};
vertical: {
increment: string;
decrement: string;
};
};
highlight: {
true: string;
};
}, {
root: string;
base: string;
increment: string;
decrement: string;
tag: string;
}, undefined, unknown, unknown, undefined>>>;
type InputNumberVariants = VariantProps<typeof inputNumber>;
export interface InputNumberProps extends Pick<NumberFieldRootProps, 'modelValue' | 'defaultValue' | 'min' | 'max' | 'stepSnapping' | 'step' | 'disabled' | 'required' | 'id' | 'name' | 'formatOptions' | 'disableWheelChange'> {
/**
* The element or component this component should render as.
* @defaultValue 'div'
*/
as?: any;
/**
* The placeholder text when the input is empty
*/
placeholder?: string;
/**
* @defaultValue 'primary'
*/
color?: InputNumberVariants['color'];
/**
* @defaultValue 'md'
*/
size?: InputNumberVariants['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 'primary'
*/
tagColor?: InputNumberVariants['tagColor'];
/**
* 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: 'link', depth: 'light' }
*/
increment?: ButtonProps;
/**
* The icon displayed to increment the value.
* @defaultValue icons.plus
* @IconComponent
*/
incrementIcon?: IconComponent;
/**
* Configure the decrement button. The `size` is inherited.
* @defaultValue { color: 'link', depth: 'light' }
*/
decrement?: ButtonProps;
/**
* The icon displayed to decrement the value.
* @defaultValue icons.minus
* @IconComponent
*/
decrementIcon?: IconComponent;
/**
* @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?: PartialString<typeof inputNumber.slots>;
}
export interface InputNumberEmits {
(e: 'update:modelValue', payload: number): void;
(e: 'blur', event: FocusEvent): void;
(e: 'change', payload: Event): void;
}
export interface InputNumberSlots {
increment(props?: {}): any;
decrement(props?: {}): any;
}
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<InputNumberProps>, {
orientation: string;
color: string;
size: string;
}>>, {
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?(_: {}): 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?(_: {}): any;
};
}) | null>;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {
size: "md" | "xs" | "sm" | "lg";
orientation: "vertical" | "horizontal";
color: "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai";
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<InputNumberSlots> & InputNumberSlots>;
export default _default;
type __VLS_WithDefaults<P, D> = {
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
default: D[K];
}> : P[K];
};
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
type __VLS_TypePropsToOption<T> = {
[K in keyof T]-?: {} extends Pick<T, K> ? {
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
} : {
type: import('vue').PropType<T[K]>;
required: true;
};
};
type __VLS_WithTemplateSlots<T, S> = T & {
new (): {
$slots: S;
};
};
type __VLS_PrettifyLocal<T> = {
[K in keyof T]: T[K];
} & {};