@banmao/blocks 0.0.1-alpha.2 → 0.0.1-alpha.3
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/Login/index.d.ts +3 -0
- package/dist/components/Login/src/components/LoginForm.d.ts +70 -0
- package/dist/components/Login/src/index.d.ts +94 -0
- package/dist/components/Login/src/types.d.ts +110 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -6
- package/package.json +1 -1
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
|
+
title: {
|
|
3
|
+
type: PropType<LoginProps["title"]>;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
subTitle: {
|
|
7
|
+
type: PropType<LoginProps["subTitle"]>;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
forgotUrl: {
|
|
11
|
+
type: PropType<LoginProps["forgotUrl"]>;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
signUpUrl: {
|
|
15
|
+
type: PropType<LoginProps["signUpUrl"]>;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
radius: {
|
|
19
|
+
type: (NumberConstructor | BooleanConstructor)[];
|
|
20
|
+
default: number;
|
|
21
|
+
};
|
|
22
|
+
shadow: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
actions: {
|
|
27
|
+
type: PropType<LoginProps["actions"]>;
|
|
28
|
+
};
|
|
29
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, (keyof globalThis.LoginEmits)[], keyof globalThis.LoginEmits, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
30
|
+
title: {
|
|
31
|
+
type: PropType<LoginProps["title"]>;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
subTitle: {
|
|
35
|
+
type: PropType<LoginProps["subTitle"]>;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
forgotUrl: {
|
|
39
|
+
type: PropType<LoginProps["forgotUrl"]>;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
signUpUrl: {
|
|
43
|
+
type: PropType<LoginProps["signUpUrl"]>;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
radius: {
|
|
47
|
+
type: (NumberConstructor | BooleanConstructor)[];
|
|
48
|
+
default: number;
|
|
49
|
+
};
|
|
50
|
+
shadow: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
default: boolean;
|
|
53
|
+
};
|
|
54
|
+
actions: {
|
|
55
|
+
type: PropType<LoginProps["actions"]>;
|
|
56
|
+
};
|
|
57
|
+
}>> & Readonly<{
|
|
58
|
+
onFinish?: ((...args: any[]) => any) | undefined;
|
|
59
|
+
onError?: ((...args: any[]) => any) | undefined;
|
|
60
|
+
onCaptcha?: ((...args: any[]) => any) | undefined;
|
|
61
|
+
onWechatFinish?: ((...args: any[]) => any) | undefined;
|
|
62
|
+
}>, {
|
|
63
|
+
title: string | undefined;
|
|
64
|
+
subTitle: string | undefined;
|
|
65
|
+
forgotUrl: string | undefined;
|
|
66
|
+
signUpUrl: string | undefined;
|
|
67
|
+
radius: number | boolean;
|
|
68
|
+
shadow: boolean;
|
|
69
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
70
|
+
export default _default;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
|
+
title: {
|
|
3
|
+
type: PropType<LoginProps["title"]>;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
subTitle: {
|
|
7
|
+
type: PropType<LoginProps["subTitle"]>;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
layout: {
|
|
11
|
+
type: PropType<LoginProps["layout"]>;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
bg: {
|
|
15
|
+
type: PropType<LoginProps["bg"]>;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
forgotUrl: {
|
|
19
|
+
type: PropType<LoginProps["forgotUrl"]>;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
signUpUrl: {
|
|
23
|
+
type: PropType<LoginProps["signUpUrl"]>;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
bgImageUrl: {
|
|
27
|
+
type: PropType<LoginProps["bgImageUrl"]>;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
logo: {
|
|
31
|
+
type: PropType<LoginProps["logo"]>;
|
|
32
|
+
};
|
|
33
|
+
imagePosition: {
|
|
34
|
+
type: PropType<LoginProps["imagePosition"]>;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
actions: {
|
|
38
|
+
type: PropType<LoginProps["actions"]>;
|
|
39
|
+
};
|
|
40
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, (keyof globalThis.LoginEmits)[], keyof globalThis.LoginEmits, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
41
|
+
title: {
|
|
42
|
+
type: PropType<LoginProps["title"]>;
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
45
|
+
subTitle: {
|
|
46
|
+
type: PropType<LoginProps["subTitle"]>;
|
|
47
|
+
default: string;
|
|
48
|
+
};
|
|
49
|
+
layout: {
|
|
50
|
+
type: PropType<LoginProps["layout"]>;
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
bg: {
|
|
54
|
+
type: PropType<LoginProps["bg"]>;
|
|
55
|
+
default: string;
|
|
56
|
+
};
|
|
57
|
+
forgotUrl: {
|
|
58
|
+
type: PropType<LoginProps["forgotUrl"]>;
|
|
59
|
+
default: string;
|
|
60
|
+
};
|
|
61
|
+
signUpUrl: {
|
|
62
|
+
type: PropType<LoginProps["signUpUrl"]>;
|
|
63
|
+
default: string;
|
|
64
|
+
};
|
|
65
|
+
bgImageUrl: {
|
|
66
|
+
type: PropType<LoginProps["bgImageUrl"]>;
|
|
67
|
+
default: string;
|
|
68
|
+
};
|
|
69
|
+
logo: {
|
|
70
|
+
type: PropType<LoginProps["logo"]>;
|
|
71
|
+
};
|
|
72
|
+
imagePosition: {
|
|
73
|
+
type: PropType<LoginProps["imagePosition"]>;
|
|
74
|
+
default: string;
|
|
75
|
+
};
|
|
76
|
+
actions: {
|
|
77
|
+
type: PropType<LoginProps["actions"]>;
|
|
78
|
+
};
|
|
79
|
+
}>> & Readonly<{
|
|
80
|
+
onFinish?: ((...args: any[]) => any) | undefined;
|
|
81
|
+
onError?: ((...args: any[]) => any) | undefined;
|
|
82
|
+
onCaptcha?: ((...args: any[]) => any) | undefined;
|
|
83
|
+
onWechatFinish?: ((...args: any[]) => any) | undefined;
|
|
84
|
+
}>, {
|
|
85
|
+
title: string | undefined;
|
|
86
|
+
subTitle: string | undefined;
|
|
87
|
+
layout: globalThis.LoginLayout | undefined;
|
|
88
|
+
bg: string | undefined;
|
|
89
|
+
forgotUrl: string | undefined;
|
|
90
|
+
signUpUrl: string | undefined;
|
|
91
|
+
bgImageUrl: string | undefined;
|
|
92
|
+
imagePosition: "left" | "right" | undefined;
|
|
93
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
94
|
+
export default _default;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { PropType, VNodeChild } from 'vue';
|
|
2
|
+
export type LoginLayout = "simple" | "column" | "muted" | "card";
|
|
3
|
+
export interface Action {
|
|
4
|
+
name: "Weixin";
|
|
5
|
+
label: string;
|
|
6
|
+
config: Record<string, any>;
|
|
7
|
+
}
|
|
8
|
+
export interface LoginProps {
|
|
9
|
+
/**
|
|
10
|
+
* 登录页方式,默认为 simple
|
|
11
|
+
* - simple: 一个简单的登录样式,表单居中,无背景图片
|
|
12
|
+
* - column: 两列布局的登录页面,需要配合 bg 属性
|
|
13
|
+
* - muted: 在简单样式基础上,使用柔和的颜色作为背景图,需要配合 bg 属性
|
|
14
|
+
* - card: 以卡片的形式展示两列布局的登录布局,需要配合 bg 属性
|
|
15
|
+
*/
|
|
16
|
+
layout?: LoginLayout;
|
|
17
|
+
/** 登录页的背景图,仅当 layout = column 或 card */
|
|
18
|
+
bg?: string;
|
|
19
|
+
/** 登录页的描述语,默认为 Login to your account */
|
|
20
|
+
subTitle?: string;
|
|
21
|
+
/** title 登录页标题, 默认为 Welcome back */
|
|
22
|
+
title?: string;
|
|
23
|
+
/** 忘记登录密码,当设置了忘记登录密码,显示 "忘记密码?" 超链接 */
|
|
24
|
+
forgotUrl?: string;
|
|
25
|
+
/** 立即注册的地址,默认为 /signup */
|
|
26
|
+
signUpUrl?: string;
|
|
27
|
+
/** 授权登录 */
|
|
28
|
+
actions?: Action[];
|
|
29
|
+
bgImageUrl?: string;
|
|
30
|
+
logo?: () => VNodeChild;
|
|
31
|
+
imagePosition?: 'left' | 'right';
|
|
32
|
+
}
|
|
33
|
+
export interface LoginEmits {
|
|
34
|
+
/** 表单登录提交 */
|
|
35
|
+
finish: (values: Record<string, string>) => void;
|
|
36
|
+
error: (error: any) => void;
|
|
37
|
+
captcha: () => Record<string, string>;
|
|
38
|
+
wechatFinish: (values: Record<string, any>) => void;
|
|
39
|
+
}
|
|
40
|
+
export type LoginEmitsType = keyof LoginEmits;
|
|
41
|
+
export declare const loginEmits: LoginEmitsType[];
|
|
42
|
+
export declare const loginProps: {
|
|
43
|
+
title: {
|
|
44
|
+
type: PropType<LoginProps["title"]>;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
subTitle: {
|
|
48
|
+
type: PropType<LoginProps["subTitle"]>;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
51
|
+
layout: {
|
|
52
|
+
type: PropType<LoginProps["layout"]>;
|
|
53
|
+
default: string;
|
|
54
|
+
};
|
|
55
|
+
bg: {
|
|
56
|
+
type: PropType<LoginProps["bg"]>;
|
|
57
|
+
default: string;
|
|
58
|
+
};
|
|
59
|
+
forgotUrl: {
|
|
60
|
+
type: PropType<LoginProps["forgotUrl"]>;
|
|
61
|
+
default: string;
|
|
62
|
+
};
|
|
63
|
+
signUpUrl: {
|
|
64
|
+
type: PropType<LoginProps["signUpUrl"]>;
|
|
65
|
+
default: string;
|
|
66
|
+
};
|
|
67
|
+
bgImageUrl: {
|
|
68
|
+
type: PropType<LoginProps["bgImageUrl"]>;
|
|
69
|
+
default: string;
|
|
70
|
+
};
|
|
71
|
+
logo: {
|
|
72
|
+
type: PropType<LoginProps["logo"]>;
|
|
73
|
+
};
|
|
74
|
+
imagePosition: {
|
|
75
|
+
type: PropType<LoginProps["imagePosition"]>;
|
|
76
|
+
default: string;
|
|
77
|
+
};
|
|
78
|
+
actions: {
|
|
79
|
+
type: PropType<LoginProps["actions"]>;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
export declare const loginFormProps: {
|
|
83
|
+
title: {
|
|
84
|
+
type: PropType<LoginProps["title"]>;
|
|
85
|
+
default: string;
|
|
86
|
+
};
|
|
87
|
+
subTitle: {
|
|
88
|
+
type: PropType<LoginProps["subTitle"]>;
|
|
89
|
+
default: string;
|
|
90
|
+
};
|
|
91
|
+
forgotUrl: {
|
|
92
|
+
type: PropType<LoginProps["forgotUrl"]>;
|
|
93
|
+
default: string;
|
|
94
|
+
};
|
|
95
|
+
signUpUrl: {
|
|
96
|
+
type: PropType<LoginProps["signUpUrl"]>;
|
|
97
|
+
default: string;
|
|
98
|
+
};
|
|
99
|
+
radius: {
|
|
100
|
+
type: (NumberConstructor | BooleanConstructor)[];
|
|
101
|
+
default: number;
|
|
102
|
+
};
|
|
103
|
+
shadow: {
|
|
104
|
+
type: BooleanConstructor;
|
|
105
|
+
default: boolean;
|
|
106
|
+
};
|
|
107
|
+
actions: {
|
|
108
|
+
type: PropType<LoginProps["actions"]>;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Login';
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require('./index.css');"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("naive-ui"),h=["finish","error","captcha","wechatFinish"],v={title:{type:String,default:"Welcome back"},subTitle:{type:String,default:"Login to your account"},layout:{type:String,default:"simple"},bg:{type:String,default:""},forgotUrl:{type:String,default:""},signUpUrl:{type:String,default:""},bgImageUrl:{type:String,default:""},logo:{type:Function},imagePosition:{type:String,default:"right"},actions:{type:Array}},b={title:{type:String,default:"Welcome back"},subTitle:{type:String,default:"Login to your account"},forgotUrl:{type:String,default:""},signUpUrl:{type:String,default:""},radius:{type:[Number,Boolean],default:8},shadow:{type:Boolean,default:!0},actions:{type:Array}},V=e.defineComponent({name:"LoginForm",props:b,emits:h,setup(l,{emit:i}){const{actions:t,title:m,subTitle:y,signUpUrl:n,forgotUrl:p,shadow:u,radius:c}=l,r=e.reactive({username:"",password:""}),d=e.ref(!1),f={username:[{required:!0,message:"请输入用户名",trigger:"blur"},{min:3,max:10,message:"长度在 3 到 10 个字符",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:6,max:20,message:"长度在 6 到 20 个字符",trigger:"blur"}]},s=e.ref(null),g=()=>{var o;(o=s.value)==null||o.validate(N=>{N?(console.error(N),i("error",N)):i("finish",e.toRaw(r))})},F=()=>{console.error("Weixin login is not supported yet."),i("wechatFinish")};return()=>e.createVNode("div",{class:["login-form",{"login-form-shadow":u}],style:[{borderRadius:c?`${c}px`:"none"}]},[e.createVNode("div",{class:"title"},[m]),e.createVNode("div",{class:"sub-title"},[y]),e.createVNode(a.NForm,{ref:s,model:r,rules:f,size:"large","show-require-mark":!1},{default:()=>[e.createVNode(a.NFormItem,{label:"用户名",path:"username"},{default:()=>[e.createVNode(a.NInput,{value:r.username,"onUpdate:value":o=>r.username=o,placeholder:"请输入用户名"},null)]}),e.createVNode(a.NFormItem,{label:"密码",path:"password"},{default:()=>[e.createVNode(a.NInput,{value:r.password,"onUpdate:value":o=>r.password=o,placeholder:"请输入密码",type:"password"},null)]}),e.createVNode("div",{class:"password-forgot"},[e.createVNode(a.NCheckbox,{checked:d.value,"onUpdate:checked":o=>d.value=o,label:"记住密码"},null),p&&e.createVNode("a",{href:p},[e.createTextVNode("忘记密码?")])]),e.createVNode(a.NFormItem,{showLabel:!1},{default:()=>[e.createVNode(a.NButton,{"attr-type":"button",type:"primary",block:!0,onClick:()=>g()},{default:()=>[e.createTextVNode("登录")]})]}),t&&e.createVNode(a.NFormItem,{showLabel:!1},{default:()=>[e.createVNode(a.NButton,{color:"#02E16E",ghost:!0,block:!0,onClick:()=>F()},{default:()=>[e.createTextVNode("微信登录")]})]})]}),n&&e.createVNode("div",{class:"signUp"},[e.createTextVNode("还没有账号?"),e.createVNode("a",{href:n},[e.createTextVNode("立即注册")])])])}}),w=e.defineComponent({name:"LoginPage",props:v,emits:h,setup(l,{emit:i,slots:t}){const{layout:m,bg:y,bgImageUrl:n,logo:p,...u}=l,c=e.computed(()=>l.imagePosition==="right");return()=>{var r,d,f,s;return m==="column"?e.createVNode("div",{class:["container","column",{"column-reverse":l.imagePosition==="left"}]},[e.createVNode("div",{class:"column-item"},[c.value&&e.createVNode("div",{class:
|
|
1
|
+
require('./index.css');"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("naive-ui"),h=["finish","error","captcha","wechatFinish"],v={title:{type:String,default:"Welcome back"},subTitle:{type:String,default:"Login to your account"},layout:{type:String,default:"simple"},bg:{type:String,default:""},forgotUrl:{type:String,default:""},signUpUrl:{type:String,default:""},bgImageUrl:{type:String,default:""},logo:{type:Function},imagePosition:{type:String,default:"right"},actions:{type:Array}},b={title:{type:String,default:"Welcome back"},subTitle:{type:String,default:"Login to your account"},forgotUrl:{type:String,default:""},signUpUrl:{type:String,default:""},radius:{type:[Number,Boolean],default:8},shadow:{type:Boolean,default:!0},actions:{type:Array}},V=e.defineComponent({name:"LoginForm",props:b,emits:h,setup(l,{emit:i}){const{actions:t,title:m,subTitle:y,signUpUrl:n,forgotUrl:p,shadow:u,radius:c}=l,r=e.reactive({username:"",password:""}),d=e.ref(!1),f={username:[{required:!0,message:"请输入用户名",trigger:"blur"},{min:3,max:10,message:"长度在 3 到 10 个字符",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:6,max:20,message:"长度在 6 到 20 个字符",trigger:"blur"}]},s=e.ref(null),g=()=>{var o;(o=s.value)==null||o.validate(N=>{N?(console.error(N),i("error",N)):i("finish",e.toRaw(r))})},F=()=>{console.error("Weixin login is not supported yet."),i("wechatFinish")};return()=>e.createVNode("div",{class:["login-form",{"login-form-shadow":u}],style:[{borderRadius:c?`${c}px`:"none"}]},[e.createVNode("div",{class:"title"},[m]),e.createVNode("div",{class:"sub-title"},[y]),e.createVNode(a.NForm,{ref:s,model:r,rules:f,size:"large","show-require-mark":!1},{default:()=>[e.createVNode(a.NFormItem,{label:"用户名",path:"username"},{default:()=>[e.createVNode(a.NInput,{value:r.username,"onUpdate:value":o=>r.username=o,placeholder:"请输入用户名"},null)]}),e.createVNode(a.NFormItem,{label:"密码",path:"password"},{default:()=>[e.createVNode(a.NInput,{value:r.password,"onUpdate:value":o=>r.password=o,placeholder:"请输入密码",type:"password"},null)]}),e.createVNode("div",{class:"password-forgot"},[e.createVNode(a.NCheckbox,{checked:d.value,"onUpdate:checked":o=>d.value=o,label:"记住密码"},null),p&&e.createVNode("a",{href:p},[e.createTextVNode("忘记密码?")])]),e.createVNode(a.NFormItem,{showLabel:!1},{default:()=>[e.createVNode(a.NButton,{"attr-type":"button",type:"primary",block:!0,onClick:()=>g()},{default:()=>[e.createTextVNode("登录")]})]}),t&&e.createVNode(a.NFormItem,{showLabel:!1},{default:()=>[e.createVNode(a.NButton,{color:"#02E16E",ghost:!0,block:!0,onClick:()=>F()},{default:()=>[e.createTextVNode("微信登录")]})]})]}),n&&e.createVNode("div",{class:"signUp"},[e.createTextVNode("还没有账号?"),e.createVNode("a",{href:n},[e.createTextVNode("立即注册")])])])}}),w=e.defineComponent({name:"LoginPage",props:v,emits:h,setup(l,{emit:i,slots:t}){const{layout:m,bg:y,bgImageUrl:n,logo:p,...u}=l,c=e.computed(()=>l.imagePosition==="right");return()=>{var r,d,f,s;return m==="column"?e.createVNode("div",{class:["container","column",{"column-reverse":l.imagePosition==="left"}]},[e.createVNode("div",{class:"column-item"},[c.value&&e.createVNode("div",{class:"logo"},[(r=t.logo)==null?void 0:r.call(t)]),e.createVNode(V,e.mergeProps(u,{shadow:!1,radius:!1,onFinish:g=>i("finish",g)}),null)]),e.createVNode("div",{class:"column-muted"},[!c.value&&e.createVNode("div",{class:"logo"},[(d=t.logo)==null?void 0:d.call(t)]),l.bgImageUrl&&e.createVNode("img",{src:l.bgImageUrl,alt:"Image",class:"column-muted-image"},null)])]):m==="card"?e.createVNode("div",{class:["container","flex-center"]},[e.createVNode("div",{class:"logo"},[(f=t.logo)==null?void 0:f.call(t)]),e.createVNode("div",{class:"card"},[e.createVNode("div",{class:["card-column-item","flex-1"]},[e.createVNode(V,e.mergeProps(u,{shadow:!1,radius:!1,onFinish:g=>i("finish",g)}),null)]),e.createVNode("div",{class:["card-column-muted","flex-1"],style:{width:"350px"}},[n&&e.createVNode("img",{src:n,alt:"Image",class:"column-muted-image"},null)])])]):e.createVNode("div",{class:["container","flex-center"],style:{backgroundImage:`url(${n})`,backgroundSize:"cover"}},[e.createVNode("div",{class:["flex-col","space-y-4"]},[(s=t.logo)==null?void 0:s.call(t),e.createVNode(V,u,null)])])}}});exports.Login=w;exports.loginEmits=h;exports.loginFormProps=b;exports.loginProps=v;
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.container{position:relative;width:100%;height:100svh}.flex-center{display:flex;align-items:center;justify-content:center}.flex-col{display:flex;flex-direction:column;justify-content:center;align-items:center}.space-y-4{gap:16px}.login-form{padding:32px 32px 24px;min-width:350px;background:#fffc;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-sizing:border-box}.card .login-form{width:100%}.column .login-form,.dark .column .login-form{background:transparent}
|
|
1
|
+
:root{--color-link: #2563eb;--color-text: #f4f4f5;--color-section-text: #e4e4e7}.container{position:relative;width:100%;height:100svh}.flex-center{display:flex;align-items:center;justify-content:center}.flex-col{display:flex;flex-direction:column;justify-content:center;align-items:center}.space-y-4{gap:16px}.login-form{padding:32px 32px 24px;min-width:350px;background:#fffc;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-sizing:border-box}.card .login-form{width:100%}.column .login-form,.dark .column .login-form{background:transparent}.login-form-shadow{box-shadow:0 2px 12px #0000001a}.title{font-size:20px;font-weight:700;color:var(--color-text)}.sub-title{font-size:16px;color:var(--color-section-text);margin-bottom:32px}.signUp{text-align:center;color:var(--color-text)}.signUp a,.link{color:var(--color-link);text-decoration:none}.password-forgot{width:100%;display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.password-forgot a{color:var(--color-link);text-decoration:none}.column,.grid{display:grid}.column-reverse{direction:rtl}.column-reverse>*{direction:ltr}.card{width:100%;max-width:48rem;display:flex;box-sizing:border-box;box-shadow:0 2px 12px #0000001a;border-radius:.5rem;overflow:hidden}.card-column-item{display:flex;flex-direction:column;justify-content:center;align-items:center}.card-column-muted{width:100%;position:relative;display:none;background-color:#27272a}.flex-1{flex:1}.logo{position:absolute;top:20px;left:20px;z-index:inherit;height:64px;min-width:64px}.column-item{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:1rem}.column-muted{width:100%;position:relative;display:none;background-color:#27272a}.column-muted-image{position:absolute;top:0;right:0;bottom:0;left:0;height:100%;width:100%;object-fit:cover}@media screen and (max-width: 1199px){.column-item{padding:40px}}@media screen and (max-width: 1200){.card{max-width:24rem}}@media screen and (min-width: 1200px){.column{grid-template-columns:repeat(2,minmax(0,1fr))}.column-muted,.card-column-muted{display:block}}.dark .column-muted-image{filter:brightness(.2)}.dark .column-muted-image{filter:grayscale(40%)}.dark .login-form{background-color:#0006}@media (prefers-color-scheme: light){:root{--color-text: #333;--color-section-text: #4f4f4f}.login-form{background:#fffc}.sub-title{color:var(--color-section-text)}}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
package/dist/index.js
CHANGED
|
@@ -212,23 +212,23 @@ const S = ["finish", "error", "captcha", "wechatFinish"], E = {
|
|
|
212
212
|
}, [e("div", {
|
|
213
213
|
class: "column-item"
|
|
214
214
|
}, [n.value && e("div", {
|
|
215
|
-
class:
|
|
215
|
+
class: "logo"
|
|
216
216
|
}, [(l = a.logo) == null ? void 0 : l.call(a)]), e(b, w(i, {
|
|
217
217
|
shadow: !1,
|
|
218
218
|
radius: !1,
|
|
219
219
|
onFinish: (d) => o("finish", d)
|
|
220
220
|
}), null)]), e("div", {
|
|
221
|
-
class:
|
|
221
|
+
class: "column-muted"
|
|
222
222
|
}, [!n.value && e("div", {
|
|
223
|
-
class:
|
|
223
|
+
class: "logo"
|
|
224
224
|
}, [(s = a.logo) == null ? void 0 : s.call(a)]), r.bgImageUrl && e("img", {
|
|
225
225
|
src: r.bgImageUrl,
|
|
226
226
|
alt: "Image",
|
|
227
|
-
class:
|
|
227
|
+
class: "column-muted-image"
|
|
228
228
|
}, null)])]) : m === "card" ? e("div", {
|
|
229
229
|
class: ["container", "flex-center"]
|
|
230
230
|
}, [e("div", {
|
|
231
|
-
class:
|
|
231
|
+
class: "logo"
|
|
232
232
|
}, [(f = a.logo) == null ? void 0 : f.call(a)]), e("div", {
|
|
233
233
|
class: "card"
|
|
234
234
|
}, [e("div", {
|
|
@@ -245,7 +245,7 @@ const S = ["finish", "error", "captcha", "wechatFinish"], E = {
|
|
|
245
245
|
}, [u && e("img", {
|
|
246
246
|
src: u,
|
|
247
247
|
alt: "Image",
|
|
248
|
-
class:
|
|
248
|
+
class: "column-muted-image"
|
|
249
249
|
}, null)])])]) : e("div", {
|
|
250
250
|
class: ["container", "flex-center"],
|
|
251
251
|
style: {
|