@huntflow/ui 0.3.33 → 0.3.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.d.ts +2 -0
- package/dist/components/ui-pin-input/index.d.ts +3 -0
- package/dist/components/ui-pin-input/pin-input-code-snippet.d.ts +1 -0
- package/dist/components/ui-pin-input/pin-input.vue.d.ts +22 -0
- package/dist/components/ui-pin-input/types.d.ts +25 -0
- package/dist/ui.es.js +3080 -2643
- package/package.json +1 -1
|
@@ -6,6 +6,8 @@ export { UiIcon, injectSvgSprite } from './ui-icon';
|
|
|
6
6
|
export type { UiIconProps, IconType } from './ui-icon';
|
|
7
7
|
export { UiInput } from './ui-input';
|
|
8
8
|
export type { UiInputProps, UiInputSize } from './ui-input';
|
|
9
|
+
export { UiPinInput } from './ui-pin-input';
|
|
10
|
+
export type { UiPinInputProps, UiPinInputType, UiPinInputValue } from './ui-pin-input';
|
|
9
11
|
export { UiLabel } from './ui-label';
|
|
10
12
|
export { UiLoader } from './ui-loader';
|
|
11
13
|
export type { UiLoaderSize } from './ui-loader';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const pinInputCodeSnippet = "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { UiPinInput } from '@huntflow/ui';\n\nconst code = ref<number[]>([]);\n</script>\n\n<template>\n <ui-pin-input\n v-model=\"code\"\n aria-label=\"\u041A\u043E\u0434 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F\"\n />\n</template>";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { UiPinInputProps, UiPinInputType, UiPinInputValue } from './types';
|
|
2
|
+
declare const _default: <Type extends UiPinInputType = "number">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
4
|
+
readonly "onUpdate:modelValue"?: ((value: UiPinInputValue<Type>) => any) | undefined;
|
|
5
|
+
readonly onEnter?: (() => any) | undefined;
|
|
6
|
+
readonly onComplete?: ((code: string) => any) | undefined;
|
|
7
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue" | "onEnter" | "onComplete"> & ({
|
|
8
|
+
modelValue?: UiPinInputValue<Type>;
|
|
9
|
+
} & UiPinInputProps<Type>) & Partial<{}>> & import('vue').PublicProps;
|
|
10
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
11
|
+
focus: () => void;
|
|
12
|
+
}>): void;
|
|
13
|
+
attrs: any;
|
|
14
|
+
slots: {};
|
|
15
|
+
emit: (((evt: "enter") => void) & ((evt: "complete", code: string) => void)) & ((evt: "update:modelValue", value: UiPinInputValue<Type>) => void);
|
|
16
|
+
}>) => import('vue').VNode & {
|
|
17
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_PrettifyLocal<T> = {
|
|
21
|
+
[K in keyof T]: T[K];
|
|
22
|
+
} & {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { PinInputRootProps } from 'reka-ui';
|
|
2
|
+
export type UiPinInputType = 'number' | 'text';
|
|
3
|
+
export type UiPinInputValue<Type extends UiPinInputType = 'number'> = NonNullable<PinInputRootProps<Type>['modelValue']>;
|
|
4
|
+
export type UiPinInputProps<Type extends UiPinInputType = 'number'> = {
|
|
5
|
+
/** Количество ячеек. */
|
|
6
|
+
length?: number;
|
|
7
|
+
/** Допустимые символы: цифры или текст. */
|
|
8
|
+
type?: Type;
|
|
9
|
+
/** Отключает все ячейки. */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/** Состояние ошибки или текст сообщения под полями. */
|
|
12
|
+
error?: boolean | string;
|
|
13
|
+
/** Включает автозаполнение одноразового кода. */
|
|
14
|
+
otp?: boolean;
|
|
15
|
+
/** Скрывает введенные символы. */
|
|
16
|
+
mask?: boolean;
|
|
17
|
+
/** Фокусирует первую ячейку при монтировании. */
|
|
18
|
+
autofocus?: boolean;
|
|
19
|
+
/** Идентификатор поля для связи с внешним label. */
|
|
20
|
+
id?: string;
|
|
21
|
+
/** Имя поля в HTML-форме. */
|
|
22
|
+
name?: string;
|
|
23
|
+
/** Делает поле обязательным в HTML-форме. */
|
|
24
|
+
required?: boolean;
|
|
25
|
+
};
|