first commit
This commit is contained in:
63
node_modules/vant/es/password-input/PasswordInput.d.ts
generated
vendored
Normal file
63
node_modules/vant/es/password-input/PasswordInput.d.ts
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
import { type ExtractPropTypes } from 'vue';
|
||||
export declare const passwordInputProps: {
|
||||
info: StringConstructor;
|
||||
mask: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
value: {
|
||||
type: import("vue").PropType<string>;
|
||||
default: string;
|
||||
};
|
||||
gutter: (NumberConstructor | StringConstructor)[];
|
||||
length: {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
default: number;
|
||||
};
|
||||
focused: BooleanConstructor;
|
||||
errorInfo: StringConstructor;
|
||||
};
|
||||
export type PasswordInputProps = ExtractPropTypes<typeof passwordInputProps>;
|
||||
declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
||||
info: StringConstructor;
|
||||
mask: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
value: {
|
||||
type: import("vue").PropType<string>;
|
||||
default: string;
|
||||
};
|
||||
gutter: (NumberConstructor | StringConstructor)[];
|
||||
length: {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
default: number;
|
||||
};
|
||||
focused: BooleanConstructor;
|
||||
errorInfo: StringConstructor;
|
||||
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "focus"[], "focus", import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
||||
info: StringConstructor;
|
||||
mask: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
value: {
|
||||
type: import("vue").PropType<string>;
|
||||
default: string;
|
||||
};
|
||||
gutter: (NumberConstructor | StringConstructor)[];
|
||||
length: {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
default: number;
|
||||
};
|
||||
focused: BooleanConstructor;
|
||||
errorInfo: StringConstructor;
|
||||
}>> & Readonly<{
|
||||
onFocus?: ((...args: any[]) => any) | undefined;
|
||||
}>, {
|
||||
length: string | number;
|
||||
mask: boolean;
|
||||
value: string;
|
||||
focused: boolean;
|
||||
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
||||
export default _default;
|
||||
78
node_modules/vant/es/password-input/PasswordInput.mjs
generated
vendored
Normal file
78
node_modules/vant/es/password-input/PasswordInput.mjs
generated
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
import { defineComponent, createVNode as _createVNode } from "vue";
|
||||
import { addUnit, truthProp, numericProp, BORDER_LEFT, makeStringProp, BORDER_SURROUND, createNamespace, makeNumericProp } from "../utils/index.mjs";
|
||||
const [name, bem] = createNamespace("password-input");
|
||||
const passwordInputProps = {
|
||||
info: String,
|
||||
mask: truthProp,
|
||||
value: makeStringProp(""),
|
||||
gutter: numericProp,
|
||||
length: makeNumericProp(6),
|
||||
focused: Boolean,
|
||||
errorInfo: String
|
||||
};
|
||||
var stdin_default = defineComponent({
|
||||
name,
|
||||
props: passwordInputProps,
|
||||
emits: ["focus"],
|
||||
setup(props, {
|
||||
emit
|
||||
}) {
|
||||
const onTouchStart = (event) => {
|
||||
event.stopPropagation();
|
||||
emit("focus", event);
|
||||
};
|
||||
const renderPoints = () => {
|
||||
const Points = [];
|
||||
const {
|
||||
mask,
|
||||
value,
|
||||
gutter,
|
||||
focused
|
||||
} = props;
|
||||
const length = +props.length;
|
||||
for (let i = 0; i < length; i++) {
|
||||
const char = value[i];
|
||||
const showBorder = i !== 0 && !gutter;
|
||||
const showCursor = focused && i === value.length;
|
||||
let style;
|
||||
if (i !== 0 && gutter) {
|
||||
style = {
|
||||
marginLeft: addUnit(gutter)
|
||||
};
|
||||
}
|
||||
Points.push(_createVNode("li", {
|
||||
"class": [{
|
||||
[BORDER_LEFT]: showBorder
|
||||
}, bem("item", {
|
||||
focus: showCursor
|
||||
})],
|
||||
"style": style
|
||||
}, [mask ? _createVNode("i", {
|
||||
"style": {
|
||||
visibility: char ? "visible" : "hidden"
|
||||
}
|
||||
}, null) : char, showCursor && _createVNode("div", {
|
||||
"class": bem("cursor")
|
||||
}, null)]));
|
||||
}
|
||||
return Points;
|
||||
};
|
||||
return () => {
|
||||
const info = props.errorInfo || props.info;
|
||||
return _createVNode("div", {
|
||||
"class": bem()
|
||||
}, [_createVNode("ul", {
|
||||
"class": [bem("security"), {
|
||||
[BORDER_SURROUND]: !props.gutter
|
||||
}],
|
||||
"onTouchstartPassive": onTouchStart
|
||||
}, [renderPoints()]), info && _createVNode("div", {
|
||||
"class": bem(props.errorInfo ? "error-info" : "info")
|
||||
}, [info])]);
|
||||
};
|
||||
}
|
||||
});
|
||||
export {
|
||||
stdin_default as default,
|
||||
passwordInputProps
|
||||
};
|
||||
1
node_modules/vant/es/password-input/index.css
generated
vendored
Normal file
1
node_modules/vant/es/password-input/index.css
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
:root,:host{--van-password-input-height: 50px;--van-password-input-margin: 0 var(--van-padding-md);--van-password-input-font-size: 20px;--van-password-input-radius: 6px;--van-password-input-background: var(--van-background-2);--van-password-input-info-color: var(--van-text-color-2);--van-password-input-info-font-size: var(--van-font-size-md);--van-password-input-error-info-color: var(--van-danger-color);--van-password-input-dot-size: 10px;--van-password-input-dot-color: var(--van-text-color);--van-password-input-text-color: var(--van-text-color);--van-password-input-cursor-color: var(--van-text-color);--van-password-input-cursor-width: 1px;--van-password-input-cursor-height: 40%;--van-password-input-cursor-duration: 1s}.van-password-input{position:relative;margin:var(--van-password-input-margin);-webkit-user-select:none;user-select:none}.van-password-input__info,.van-password-input__error-info{margin-top:var(--van-padding-md);font-size:var(--van-password-input-info-font-size);text-align:center}.van-password-input__info{color:var(--van-password-input-info-color)}.van-password-input__error-info{color:var(--van-password-input-error-info-color)}.van-password-input__security{display:flex;width:100%;height:var(--van-password-input-height);cursor:pointer}.van-password-input__security:after{border-radius:var(--van-password-input-radius)}.van-password-input__security li{position:relative;display:flex;flex:1;align-items:center;justify-content:center;height:100%;color:var(--van-password-input-text-color);font-size:var(--van-password-input-font-size);line-height:1.2;background:var(--van-password-input-background)}.van-password-input__security i{position:absolute;top:50%;left:50%;width:var(--van-password-input-dot-size);height:var(--van-password-input-dot-size);background:var(--van-password-input-dot-color);border-radius:100%;transform:translate(-50%,-50%);visibility:hidden}.van-password-input__cursor{position:absolute;top:50%;left:50%;width:var(--van-password-input-cursor-width);height:var(--van-password-input-cursor-height);background:var(--van-password-input-cursor-color);transform:translate(-50%,-50%);animation:var(--van-password-input-cursor-duration) van-cursor-flicker infinite}@keyframes van-cursor-flicker{0%{opacity:0}50%{opacity:1}to{opacity:0}}
|
||||
51
node_modules/vant/es/password-input/index.d.ts
generated
vendored
Normal file
51
node_modules/vant/es/password-input/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
export declare const PasswordInput: import("../utils").WithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
||||
info: StringConstructor;
|
||||
mask: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
value: {
|
||||
type: import("vue").PropType<string>;
|
||||
default: string;
|
||||
};
|
||||
gutter: (NumberConstructor | StringConstructor)[];
|
||||
length: {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
default: number;
|
||||
};
|
||||
focused: BooleanConstructor;
|
||||
errorInfo: StringConstructor;
|
||||
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "focus"[], "focus", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
||||
info: StringConstructor;
|
||||
mask: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
value: {
|
||||
type: import("vue").PropType<string>;
|
||||
default: string;
|
||||
};
|
||||
gutter: (NumberConstructor | StringConstructor)[];
|
||||
length: {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
default: number;
|
||||
};
|
||||
focused: BooleanConstructor;
|
||||
errorInfo: StringConstructor;
|
||||
}>> & Readonly<{
|
||||
onFocus?: ((...args: any[]) => any) | undefined;
|
||||
}>, {
|
||||
length: string | number;
|
||||
mask: boolean;
|
||||
value: string;
|
||||
focused: boolean;
|
||||
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
||||
export default PasswordInput;
|
||||
export { passwordInputProps } from './PasswordInput';
|
||||
export type { PasswordInputProps } from './PasswordInput';
|
||||
export type { PasswordInputThemeVars } from './types';
|
||||
declare module 'vue' {
|
||||
interface GlobalComponents {
|
||||
VanPasswordInput: typeof PasswordInput;
|
||||
}
|
||||
}
|
||||
10
node_modules/vant/es/password-input/index.mjs
generated
vendored
Normal file
10
node_modules/vant/es/password-input/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { withInstall } from "../utils/index.mjs";
|
||||
import _PasswordInput from "./PasswordInput.mjs";
|
||||
const PasswordInput = withInstall(_PasswordInput);
|
||||
var stdin_default = PasswordInput;
|
||||
import { passwordInputProps } from "./PasswordInput.mjs";
|
||||
export {
|
||||
PasswordInput,
|
||||
stdin_default as default,
|
||||
passwordInputProps
|
||||
};
|
||||
1
node_modules/vant/es/password-input/style/index.d.ts
generated
vendored
Normal file
1
node_modules/vant/es/password-input/style/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
2
node_modules/vant/es/password-input/style/index.mjs
generated
vendored
Normal file
2
node_modules/vant/es/password-input/style/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import "../../style/base.css";
|
||||
import "../index.css";
|
||||
17
node_modules/vant/es/password-input/types.d.ts
generated
vendored
Normal file
17
node_modules/vant/es/password-input/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
export type PasswordInputThemeVars = {
|
||||
passwordInputHeight?: string;
|
||||
passwordInputMargin?: string;
|
||||
passwordInputFontSize?: string;
|
||||
passwordInputRadius?: string;
|
||||
passwordInputBackground?: string;
|
||||
passwordInputInfoColor?: string;
|
||||
passwordInputInfoFontSize?: string;
|
||||
passwordInputErrorInfoColor?: string;
|
||||
passwordInputDotSize?: string;
|
||||
passwordInputDotColor?: string;
|
||||
passwordInputTextColor?: string;
|
||||
passwordInputCursorColor?: string;
|
||||
passwordInputCursorWidth?: string;
|
||||
passwordInputCursorHeight?: string;
|
||||
passwordInputCursorDuration?: string;
|
||||
};
|
||||
0
node_modules/vant/es/password-input/types.mjs
generated
vendored
Normal file
0
node_modules/vant/es/password-input/types.mjs
generated
vendored
Normal file
Reference in New Issue
Block a user