@huntflow/ui 0.0.40 → 0.0.42
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/base-button/button.vue.d.ts +29 -51
- package/dist/components/base-input/input.vue.d.ts +21 -45
- package/dist/ui.es.js +169 -272
- package/dist/ui.umd.js +2 -2
- package/package.json +1 -1
|
@@ -1,53 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
size?: BaseButtonSize | undefined;
|
|
24
|
-
className?: string | undefined;
|
|
25
|
-
type?: BaseButtonType | undefined;
|
|
26
|
-
leftIcon?: import('vue').VNode | undefined;
|
|
27
|
-
rightIcon?: import('vue').VNode | undefined;
|
|
28
|
-
block?: boolean | undefined;
|
|
29
|
-
disabled?: boolean | undefined;
|
|
30
|
-
loading?: boolean | undefined;
|
|
31
|
-
active?: boolean | undefined;
|
|
32
|
-
name?: string | undefined;
|
|
33
|
-
circle?: boolean | undefined;
|
|
34
|
-
bordered?: boolean | undefined;
|
|
35
|
-
htmlType?: BaseButtonHTMLType | undefined;
|
|
36
|
-
}> & Readonly<{
|
|
1
|
+
import { BaseButtonProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
slots: {
|
|
4
|
+
leftIcon?(_: {
|
|
5
|
+
icon: import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}>;
|
|
8
|
+
}): any;
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
rightIcon?(_: {
|
|
11
|
+
icon: import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}>;
|
|
14
|
+
}): any;
|
|
15
|
+
};
|
|
16
|
+
refs: {};
|
|
17
|
+
attrs: Partial<{}>;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
20
|
+
declare const __VLS_component: import('vue').DefineComponent<BaseButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
21
|
+
click: (...args: any[]) => void;
|
|
22
|
+
}, string, import('vue').PublicProps, Readonly<BaseButtonProps> & Readonly<{
|
|
37
23
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
38
|
-
}>, {
|
|
39
|
-
|
|
40
|
-
size: BaseButtonSize;
|
|
41
|
-
className: string;
|
|
42
|
-
type: BaseButtonType;
|
|
43
|
-
leftIcon: Record<string, any>;
|
|
44
|
-
rightIcon: Record<string, any>;
|
|
45
|
-
block: boolean;
|
|
46
|
-
disabled: boolean;
|
|
47
|
-
loading: boolean;
|
|
48
|
-
active: boolean;
|
|
49
|
-
circle: boolean;
|
|
50
|
-
bordered: boolean;
|
|
51
|
-
htmlType: BaseButtonHTMLType;
|
|
52
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
24
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
53
26
|
export default _default;
|
|
27
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -1,48 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}, {
|
|
15
|
-
styles: CSSModuleClasses;
|
|
16
|
-
onInput: () => void;
|
|
17
|
-
onKeydown: (event: KeyboardEvent) => void;
|
|
18
|
-
inputClass: import('vue').ComputedRef<(string | {
|
|
19
|
-
[x: string]: string | boolean | void | null;
|
|
20
|
-
} | undefined)[]>;
|
|
21
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("update:value" | "enter")[], "update:value" | "enter", import('vue').PublicProps, Readonly<{
|
|
22
|
-
value: string;
|
|
23
|
-
type?: BaseInputType | undefined;
|
|
24
|
-
id?: string | undefined;
|
|
25
|
-
name?: string | undefined;
|
|
26
|
-
disabled?: boolean | undefined;
|
|
27
|
-
label?: string | undefined;
|
|
28
|
-
placeholder?: string | undefined;
|
|
29
|
-
loading?: boolean | undefined;
|
|
30
|
-
error?: string | null | void;
|
|
31
|
-
size?: BaseInputSize | undefined;
|
|
32
|
-
className?: string | undefined;
|
|
33
|
-
}> & Readonly<{
|
|
1
|
+
import { BaseInputProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
slots: {
|
|
4
|
+
prefix?(_: {}): any;
|
|
5
|
+
suffix?(_: {}): any;
|
|
6
|
+
};
|
|
7
|
+
refs: {};
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
+
declare const __VLS_component: import('vue').DefineComponent<BaseInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
12
|
+
"update:value": (...args: any[]) => void;
|
|
13
|
+
enter: (...args: any[]) => void;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<BaseInputProps> & Readonly<{
|
|
34
15
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
35
16
|
onEnter?: ((...args: any[]) => any) | undefined;
|
|
36
|
-
}>, {
|
|
37
|
-
|
|
38
|
-
size: BaseInputSize;
|
|
39
|
-
className: string;
|
|
40
|
-
type: BaseInputType;
|
|
41
|
-
disabled: boolean;
|
|
42
|
-
loading: boolean;
|
|
43
|
-
label: string;
|
|
44
|
-
id: string;
|
|
45
|
-
placeholder: string;
|
|
46
|
-
error: string;
|
|
47
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
17
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
48
19
|
export default _default;
|
|
20
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
package/dist/ui.es.js
CHANGED
|
@@ -1,292 +1,189 @@
|
|
|
1
|
-
(function(){"use strict";
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
const
|
|
4
|
-
button:
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode("._button_den84_1{position:relative;display:inline-flex;align-items:center;font-weight:500;justify-content:center;border:none;border-radius:var(--hf-button-border-radius);cursor:pointer;transition:background-color .3s,box-shadow .3s}._button_den84_1:focus{outline:none}._primary_den84_19{color:var(--hf-button-primary-text-color);border:1px solid var(--hf-button-primary-background-color);background-color:var(--hf-button-primary-background-color)}._primary_den84_19:hover{background-color:var(--hf-button-primary-hover-background-color)}._primary_den84_19:focus{box-shadow:0 0 0 3px var(--hf-button-primary-focus-color)}._primary_den84_19._bordered_den84_34{background-color:#fff;color:var(--hf-button-primary-background-color);border:1px solid var(--hf-button-primary-background-color)}._danger_den84_40{color:var(--hf-button-danger-text-color);background-color:var(--hf-button-danger-background-color)}._danger_den84_40:hover{background-color:var(--hf-button-danger-hover-background-color)}._danger_den84_40:focus{box-shadow:0 0 0 3px var(--hf-button-danger-focus-color)}._danger_den84_40._bordered_den84_34{background-color:#fff;color:var(--hf-button-danger-background-color);border:1px solid var(--hf-button-danger-background-color)}._default_den84_59{background-color:#fff;color:var(--hf-button-default-text-color);border:1px solid var(--hf-button-default-border-color)}._default_den84_59:hover{background-color:var(--hf-button-default-hover-background-color)}._default_den84_59:focus{box-shadow:0 0 0 3px var(--hf-button-default-focus-color)}._text_den84_73{background-color:#fff;color:#000}._link_den84_78{background-color:#fff;color:#007bff;text-decoration:underline}._block_den84_84{width:100%}._disabled_den84_88{background-color:#e9ecef;color:#6c757d;cursor:not-allowed}._loading_den84_94{cursor:wait}._circle_den84_98{border-radius:100%;padding:0!important}._bordered_den84_34{border:1px solid currentColor}._icon_den84_107{display:flex;align-items:center}._iconLeft_den84_112{margin-right:8px}._iconRight_den84_116{margin-left:8px}._xs_den84_120{padding:4px 8px;font-size:12px}._s_den84_125{padding:6px 12px;font-size:14px;line-height:20px}._m_den84_131{padding:6px 12px;font-size:15px;line-height:24px}._l_den84_78{padding:16px 32px;font-size:18px}._xl_den84_142{padding:20px 40px;font-size:20px}._spinner_den84_147{display:inline-block;position:absolute;right:0;left:0;margin:0 auto;width:16px;height:16px;border:2px solid rgba(0,0,0,.2);border-top-color:#007bff;border-radius:50%;animation:_spin_den84_147 .6s linear infinite}@keyframes _spin_den84_147{to{transform:rotate(360deg)}}._wrapper_hww12_1{display:flex;flex-direction:column}._label_hww12_6{margin-bottom:4px;font-size:14px;color:#333}._container_hww12_12{position:relative;display:flex;align-items:center}._input_hww12_18{flex:1;padding:8px 12px;font-size:14px;border:1px solid #ced4da;border-radius:12px;outline:none;transition:border-color .3s}._xs_hww12_28{padding:4px 8px;font-size:12px}._s_hww12_33{padding:6px 10px;font-size:13px}._m_hww12_38{padding:8px 12px;font-size:14px}._l_hww12_6{padding:10px 14px;font-size:16px}._xl_hww12_48{padding:12px 16px;font-size:18px}input:focus{border-color:#007bff}._disabled_hww12_57{background-color:#e9ecef;cursor:not-allowed}._error_hww12_62{border-color:#dc3545}._error_hww12_62{margin-top:4px;font-size:12px;color:#dc3545}._prefix_hww12_72,._suffix_hww12_73{position:absolute;display:flex;align-items:center;color:#6c757d}._prefix_hww12_72{left:8px}._suffix_hww12_73{right:8px}._loading_hww12_88{cursor:wait}._spinner_hww12_92{position:absolute;right:8px;width:16px;height:16px;border:2px solid rgba(0,0,0,.2);border-top-color:#007bff;border-radius:50%;animation:_spin_hww12_92 .6s linear infinite}@keyframes _spin_hww12_92{to{transform:rotate(360deg)}}")),document.head.appendChild(o)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
2
|
+
import { defineComponent as h, computed as y, openBlock as i, createElementBlock as r, normalizeClass as l, unref as t, Fragment as g, renderSlot as c, createCommentVNode as d, toDisplayString as f, createElementVNode as w } from "vue";
|
|
3
|
+
const k = "_button_den84_1", $ = "_primary_den84_19", v = "_bordered_den84_34", B = "_danger_den84_40", I = "_text_den84_73", C = "_link_den84_78", N = "_block_den84_84", z = "_disabled_den84_88", L = "_loading_den84_94", R = "_circle_den84_98", E = "_icon_den84_107", S = "_iconLeft_den84_112", T = "_iconRight_den84_116", V = "_xs_den84_120", x = "_s_den84_125", D = "_m_den84_131", F = "_l_den84_78", K = "_xl_den84_142", j = "_spinner_den84_147", q = "_spin_den84_147", o = {
|
|
4
|
+
button: k,
|
|
5
5
|
primary: $,
|
|
6
|
-
bordered:
|
|
7
|
-
danger:
|
|
6
|
+
bordered: v,
|
|
7
|
+
danger: B,
|
|
8
8
|
default: "_default_den84_59",
|
|
9
|
-
text:
|
|
10
|
-
link:
|
|
11
|
-
block:
|
|
12
|
-
disabled:
|
|
13
|
-
loading:
|
|
14
|
-
circle:
|
|
15
|
-
icon:
|
|
16
|
-
iconLeft:
|
|
17
|
-
iconRight:
|
|
18
|
-
xs:
|
|
19
|
-
s:
|
|
20
|
-
m:
|
|
21
|
-
l:
|
|
22
|
-
xl:
|
|
23
|
-
spinner:
|
|
24
|
-
spin:
|
|
25
|
-
},
|
|
26
|
-
|
|
9
|
+
text: I,
|
|
10
|
+
link: C,
|
|
11
|
+
block: N,
|
|
12
|
+
disabled: z,
|
|
13
|
+
loading: L,
|
|
14
|
+
circle: R,
|
|
15
|
+
icon: E,
|
|
16
|
+
iconLeft: S,
|
|
17
|
+
iconRight: T,
|
|
18
|
+
xs: V,
|
|
19
|
+
s: x,
|
|
20
|
+
m: D,
|
|
21
|
+
l: F,
|
|
22
|
+
xl: K,
|
|
23
|
+
spinner: j,
|
|
24
|
+
spin: q
|
|
25
|
+
}, A = ["name", "type", "disabled"], re = /* @__PURE__ */ h({
|
|
26
|
+
__name: "button",
|
|
27
27
|
props: {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
},
|
|
42
|
-
type: {
|
|
43
|
-
type: String,
|
|
44
|
-
default: "default"
|
|
45
|
-
},
|
|
46
|
-
leftIcon: {
|
|
47
|
-
type: Object,
|
|
48
|
-
required: !1,
|
|
49
|
-
default: void 0
|
|
50
|
-
},
|
|
51
|
-
rightIcon: {
|
|
52
|
-
type: Object,
|
|
53
|
-
required: !1,
|
|
54
|
-
default: void 0
|
|
55
|
-
},
|
|
56
|
-
block: {
|
|
57
|
-
type: Boolean,
|
|
58
|
-
default: !1
|
|
59
|
-
},
|
|
60
|
-
disabled: {
|
|
61
|
-
type: Boolean,
|
|
62
|
-
default: !1
|
|
63
|
-
},
|
|
64
|
-
loading: {
|
|
65
|
-
type: Boolean,
|
|
66
|
-
default: !1
|
|
67
|
-
},
|
|
68
|
-
active: {
|
|
69
|
-
type: Boolean,
|
|
70
|
-
default: !1
|
|
71
|
-
},
|
|
72
|
-
circle: {
|
|
73
|
-
type: Boolean,
|
|
74
|
-
default: !1
|
|
75
|
-
},
|
|
76
|
-
bordered: {
|
|
77
|
-
type: Boolean,
|
|
78
|
-
default: !1
|
|
79
|
-
},
|
|
80
|
-
htmlType: {
|
|
81
|
-
type: String,
|
|
82
|
-
default: "button"
|
|
83
|
-
}
|
|
28
|
+
size: {},
|
|
29
|
+
className: {},
|
|
30
|
+
type: {},
|
|
31
|
+
leftIcon: {},
|
|
32
|
+
rightIcon: {},
|
|
33
|
+
block: { type: Boolean },
|
|
34
|
+
disabled: { type: Boolean },
|
|
35
|
+
loading: { type: Boolean },
|
|
36
|
+
active: { type: Boolean },
|
|
37
|
+
name: {},
|
|
38
|
+
circle: { type: Boolean },
|
|
39
|
+
bordered: { type: Boolean },
|
|
40
|
+
htmlType: {}
|
|
84
41
|
},
|
|
85
42
|
emits: ["click"],
|
|
86
|
-
setup(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
[o.bordered]: e.bordered
|
|
99
|
-
},
|
|
100
|
-
e.className
|
|
101
|
-
]),
|
|
102
|
-
handleClick: () => {
|
|
103
|
-
n("click");
|
|
43
|
+
setup(p, { emit: u }) {
|
|
44
|
+
const n = p, _ = u, m = y(() => [
|
|
45
|
+
o.button,
|
|
46
|
+
o[n.size || "m"],
|
|
47
|
+
o[n.type || "default"],
|
|
48
|
+
{
|
|
49
|
+
[o.block]: n.block,
|
|
50
|
+
[o.disabled]: n.disabled || n.loading,
|
|
51
|
+
[o.loading]: n.loading,
|
|
52
|
+
[o.active]: n.active,
|
|
53
|
+
[o.circle]: n.circle,
|
|
54
|
+
[o.bordered]: n.bordered
|
|
104
55
|
},
|
|
105
|
-
|
|
56
|
+
n.className
|
|
57
|
+
]), b = () => {
|
|
58
|
+
_("click");
|
|
106
59
|
};
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
return t(), l("button", {
|
|
116
|
-
name: e.name,
|
|
117
|
-
class: s(e.classList),
|
|
118
|
-
type: e.htmlType,
|
|
119
|
-
disabled: e.disabled || e.loading,
|
|
120
|
-
onClick: n[0] || (n[0] = (...c) => e.handleClick && e.handleClick(...c))
|
|
121
|
-
}, [
|
|
122
|
-
e.loading ? (t(), l("span", {
|
|
123
|
-
key: 0,
|
|
124
|
-
class: s(e.styles.spinner)
|
|
125
|
-
}, null, 2)) : (t(), l(w, { key: 1 }, [
|
|
126
|
-
e.leftIcon ? (t(), l("span", {
|
|
60
|
+
return (s, e) => (i(), r("button", {
|
|
61
|
+
name: s.name,
|
|
62
|
+
class: l(m.value),
|
|
63
|
+
type: s.htmlType,
|
|
64
|
+
disabled: s.disabled || s.loading,
|
|
65
|
+
onClick: b
|
|
66
|
+
}, [
|
|
67
|
+
s.loading ? (i(), r("span", {
|
|
127
68
|
key: 0,
|
|
128
|
-
class:
|
|
129
|
-
}, [
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
69
|
+
class: l(t(o).spinner)
|
|
70
|
+
}, null, 2)) : (i(), r(g, { key: 1 }, [
|
|
71
|
+
s.leftIcon ? (i(), r("span", {
|
|
72
|
+
key: 0,
|
|
73
|
+
class: l([t(o).icon, t(o).iconLeft])
|
|
74
|
+
}, [
|
|
75
|
+
c(s.$slots, "leftIcon", { icon: s.leftIcon })
|
|
76
|
+
], 2)) : d("", !0),
|
|
77
|
+
s.$slots.default ? (i(), r("span", {
|
|
78
|
+
key: 1,
|
|
79
|
+
class: l(t(o).content)
|
|
80
|
+
}, [
|
|
81
|
+
c(s.$slots, "default")
|
|
82
|
+
], 2)) : d("", !0),
|
|
83
|
+
s.rightIcon ? (i(), r("span", {
|
|
84
|
+
key: 2,
|
|
85
|
+
class: l([t(o).icon, t(o).iconRight])
|
|
86
|
+
}, [
|
|
87
|
+
c(s.$slots, "rightIcon", { icon: s.rightIcon })
|
|
88
|
+
], 2)) : d("", !0)
|
|
89
|
+
], 64))
|
|
90
|
+
], 10, A));
|
|
91
|
+
}
|
|
92
|
+
}), G = "_wrapper_hww12_1", H = "_label_hww12_6", J = "_container_hww12_12", M = "_input_hww12_18", O = "_xs_hww12_28", P = "_s_hww12_33", Q = "_m_hww12_38", U = "_l_hww12_6", W = "_xl_hww12_48", X = "_disabled_hww12_57", Y = "_error_hww12_62", Z = "_prefix_hww12_72", ee = "_suffix_hww12_73", ne = "_loading_hww12_88", se = "_spinner_hww12_92", oe = "_spin_hww12_92", a = {
|
|
93
|
+
wrapper: G,
|
|
94
|
+
label: H,
|
|
95
|
+
container: J,
|
|
96
|
+
input: M,
|
|
97
|
+
xs: O,
|
|
98
|
+
s: P,
|
|
99
|
+
m: Q,
|
|
100
|
+
l: U,
|
|
101
|
+
xl: W,
|
|
102
|
+
disabled: X,
|
|
103
|
+
error: Y,
|
|
104
|
+
prefix: Z,
|
|
105
|
+
suffix: ee,
|
|
106
|
+
loading: ne,
|
|
107
|
+
spinner: se,
|
|
108
|
+
spin: oe
|
|
109
|
+
}, le = ["for"], te = ["id", "value", "name", "type", "disabled", "placeholder"], de = /* @__PURE__ */ h({
|
|
110
|
+
__name: "input",
|
|
166
111
|
props: {
|
|
167
|
-
value: {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
},
|
|
171
|
-
type:
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
},
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
default: void 0
|
|
179
|
-
},
|
|
180
|
-
name: {
|
|
181
|
-
type: String,
|
|
182
|
-
required: !1,
|
|
183
|
-
default: void 0
|
|
184
|
-
},
|
|
185
|
-
disabled: {
|
|
186
|
-
type: Boolean,
|
|
187
|
-
default: !1
|
|
188
|
-
},
|
|
189
|
-
label: {
|
|
190
|
-
type: String,
|
|
191
|
-
required: !1,
|
|
192
|
-
default: void 0
|
|
193
|
-
},
|
|
194
|
-
placeholder: {
|
|
195
|
-
type: String,
|
|
196
|
-
required: !1,
|
|
197
|
-
default: void 0
|
|
198
|
-
},
|
|
199
|
-
loading: {
|
|
200
|
-
type: Boolean,
|
|
201
|
-
default: !1
|
|
202
|
-
},
|
|
203
|
-
error: {
|
|
204
|
-
type: String,
|
|
205
|
-
required: !1,
|
|
206
|
-
default: void 0
|
|
207
|
-
},
|
|
208
|
-
size: {
|
|
209
|
-
type: String,
|
|
210
|
-
default: "m"
|
|
211
|
-
},
|
|
212
|
-
className: {
|
|
213
|
-
type: String,
|
|
214
|
-
required: !1,
|
|
215
|
-
default: void 0
|
|
216
|
-
}
|
|
112
|
+
value: {},
|
|
113
|
+
type: {},
|
|
114
|
+
id: {},
|
|
115
|
+
name: {},
|
|
116
|
+
disabled: { type: Boolean },
|
|
117
|
+
label: {},
|
|
118
|
+
placeholder: {},
|
|
119
|
+
loading: { type: Boolean },
|
|
120
|
+
error: {},
|
|
121
|
+
size: {},
|
|
122
|
+
className: {}
|
|
217
123
|
},
|
|
218
124
|
emits: ["update:value", "enter"],
|
|
219
|
-
setup(
|
|
220
|
-
const
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
f.key === "Enter" && n("enter");
|
|
224
|
-
}, u = g(() => [
|
|
225
|
-
r.input,
|
|
226
|
-
r[e.size || "m"],
|
|
125
|
+
setup(p, { emit: u }) {
|
|
126
|
+
const n = p, _ = u, m = y(() => [
|
|
127
|
+
a.input,
|
|
128
|
+
a[n.size || "m"],
|
|
227
129
|
{
|
|
228
|
-
[
|
|
229
|
-
[
|
|
230
|
-
[
|
|
130
|
+
[a.disabled]: n.disabled,
|
|
131
|
+
[a.error]: n.error,
|
|
132
|
+
[a.loading]: n.loading
|
|
231
133
|
},
|
|
232
|
-
|
|
233
|
-
])
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
onKeydown: d,
|
|
238
|
-
inputClass: u
|
|
134
|
+
n.className
|
|
135
|
+
]), b = (e) => {
|
|
136
|
+
_("update:value", e.target.value);
|
|
137
|
+
}, s = (e) => {
|
|
138
|
+
e.key === "Enter" && _("enter");
|
|
239
139
|
};
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
function de(e, n, i, d, u, f) {
|
|
243
|
-
return t(), l("div", {
|
|
244
|
-
class: s(e.styles.wrapper)
|
|
245
|
-
}, [
|
|
246
|
-
e.label ? (t(), l("label", {
|
|
247
|
-
key: 0,
|
|
248
|
-
for: e.id,
|
|
249
|
-
class: s(e.styles.label)
|
|
250
|
-
}, _(e.label), 11, ae)) : a("", !0),
|
|
251
|
-
y("div", {
|
|
252
|
-
class: s(e.styles.container)
|
|
140
|
+
return (e, ae) => (i(), r("div", {
|
|
141
|
+
class: l(t(a).wrapper)
|
|
253
142
|
}, [
|
|
254
|
-
e
|
|
143
|
+
e.label ? (i(), r("label", {
|
|
255
144
|
key: 0,
|
|
256
|
-
|
|
145
|
+
for: e.id,
|
|
146
|
+
class: l(t(a).label)
|
|
147
|
+
}, f(e.label), 11, le)) : d("", !0),
|
|
148
|
+
w("div", {
|
|
149
|
+
class: l(t(a).container)
|
|
257
150
|
}, [
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
151
|
+
e.$slots.prefix ? (i(), r("span", {
|
|
152
|
+
key: 0,
|
|
153
|
+
class: l(t(a).prefix)
|
|
154
|
+
}, [
|
|
155
|
+
c(e.$slots, "prefix")
|
|
156
|
+
], 2)) : d("", !0),
|
|
157
|
+
w("input", {
|
|
158
|
+
id: e.id,
|
|
159
|
+
value: e.value,
|
|
160
|
+
name: e.name,
|
|
161
|
+
type: e.type || "text",
|
|
162
|
+
disabled: e.disabled || e.loading,
|
|
163
|
+
placeholder: e.placeholder,
|
|
164
|
+
class: l(m.value),
|
|
165
|
+
onInput: b,
|
|
166
|
+
onKeydown: s
|
|
167
|
+
}, null, 42, te),
|
|
168
|
+
e.$slots.suffix ? (i(), r("span", {
|
|
169
|
+
key: 1,
|
|
170
|
+
class: l(t(a).suffix)
|
|
171
|
+
}, [
|
|
172
|
+
c(e.$slots, "suffix")
|
|
173
|
+
], 2)) : d("", !0),
|
|
174
|
+
e.loading ? (i(), r("span", {
|
|
175
|
+
key: 2,
|
|
176
|
+
class: l(t(a).spinner)
|
|
177
|
+
}, null, 2)) : d("", !0)
|
|
178
|
+
], 2),
|
|
179
|
+
e.error ? (i(), r("p", {
|
|
272
180
|
key: 1,
|
|
273
|
-
class:
|
|
274
|
-
},
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
key: 2,
|
|
279
|
-
class: s(e.styles.spinner)
|
|
280
|
-
}, null, 2)) : a("", !0)
|
|
281
|
-
], 2),
|
|
282
|
-
e.error ? (t(), l("p", {
|
|
283
|
-
key: 1,
|
|
284
|
-
class: s(e.styles.error)
|
|
285
|
-
}, _(e.error), 3)) : a("", !0)
|
|
286
|
-
], 2);
|
|
287
|
-
}
|
|
288
|
-
const ce = /* @__PURE__ */ m(oe, [["render", de]]);
|
|
181
|
+
class: l(t(a).error)
|
|
182
|
+
}, f(e.error), 3)) : d("", !0)
|
|
183
|
+
], 2));
|
|
184
|
+
}
|
|
185
|
+
});
|
|
289
186
|
export {
|
|
290
|
-
|
|
291
|
-
|
|
187
|
+
re as BaseButton,
|
|
188
|
+
de as BaseInput
|
|
292
189
|
};
|
package/dist/ui.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode("._button_den84_1{position:relative;display:inline-flex;align-items:center;font-weight:500;justify-content:center;border:none;border-radius:var(--hf-button-border-radius);cursor:pointer;transition:background-color .3s,box-shadow .3s}._button_den84_1:focus{outline:none}._primary_den84_19{color:var(--hf-button-primary-text-color);border:1px solid var(--hf-button-primary-background-color);background-color:var(--hf-button-primary-background-color)}._primary_den84_19:hover{background-color:var(--hf-button-primary-hover-background-color)}._primary_den84_19:focus{box-shadow:0 0 0 3px var(--hf-button-primary-focus-color)}._primary_den84_19._bordered_den84_34{background-color:#fff;color:var(--hf-button-primary-background-color);border:1px solid var(--hf-button-primary-background-color)}._danger_den84_40{color:var(--hf-button-danger-text-color);background-color:var(--hf-button-danger-background-color)}._danger_den84_40:hover{background-color:var(--hf-button-danger-hover-background-color)}._danger_den84_40:focus{box-shadow:0 0 0 3px var(--hf-button-danger-focus-color)}._danger_den84_40._bordered_den84_34{background-color:#fff;color:var(--hf-button-danger-background-color);border:1px solid var(--hf-button-danger-background-color)}._default_den84_59{background-color:#fff;color:var(--hf-button-default-text-color);border:1px solid var(--hf-button-default-border-color)}._default_den84_59:hover{background-color:var(--hf-button-default-hover-background-color)}._default_den84_59:focus{box-shadow:0 0 0 3px var(--hf-button-default-focus-color)}._text_den84_73{background-color:#fff;color:#000}._link_den84_78{background-color:#fff;color:#007bff;text-decoration:underline}._block_den84_84{width:100%}._disabled_den84_88{background-color:#e9ecef;color:#6c757d;cursor:not-allowed}._loading_den84_94{cursor:wait}._circle_den84_98{border-radius:100%;padding:0!important}._bordered_den84_34{border:1px solid currentColor}._icon_den84_107{display:flex;align-items:center}._iconLeft_den84_112{margin-right:8px}._iconRight_den84_116{margin-left:8px}._xs_den84_120{padding:4px 8px;font-size:12px}._s_den84_125{padding:6px 12px;font-size:14px;line-height:20px}._m_den84_131{padding:6px 12px;font-size:15px;line-height:24px}._l_den84_78{padding:16px 32px;font-size:18px}._xl_den84_142{padding:20px 40px;font-size:20px}._spinner_den84_147{display:inline-block;position:absolute;right:0;left:0;margin:0 auto;width:16px;height:16px;border:2px solid rgba(0,0,0,.2);border-top-color:#007bff;border-radius:50%;animation:_spin_den84_147 .6s linear infinite}@keyframes _spin_den84_147{to{transform:rotate(360deg)}}._wrapper_hww12_1{display:flex;flex-direction:column}._label_hww12_6{margin-bottom:4px;font-size:14px;color:#333}._container_hww12_12{position:relative;display:flex;align-items:center}._input_hww12_18{flex:1;padding:8px 12px;font-size:14px;border:1px solid #ced4da;border-radius:12px;outline:none;transition:border-color .3s}._xs_hww12_28{padding:4px 8px;font-size:12px}._s_hww12_33{padding:6px 10px;font-size:13px}._m_hww12_38{padding:8px 12px;font-size:14px}._l_hww12_6{padding:10px 14px;font-size:16px}._xl_hww12_48{padding:12px 16px;font-size:18px}input:focus{border-color:#007bff}._disabled_hww12_57{background-color:#e9ecef;cursor:not-allowed}._error_hww12_62{border-color:#dc3545}._error_hww12_62{margin-top:4px;font-size:12px;color:#dc3545}._prefix_hww12_72,._suffix_hww12_73{position:absolute;display:flex;align-items:center;color:#6c757d}._prefix_hww12_72{left:8px}._suffix_hww12_73{right:8px}._loading_hww12_88{cursor:wait}._spinner_hww12_92{position:absolute;right:8px;width:16px;height:16px;border:2px solid rgba(0,0,0,.2);border-top-color:#007bff;border-radius:50%;animation:_spin_hww12_92 .6s linear infinite}@keyframes _spin_hww12_92{to{transform:rotate(360deg)}}")),document.head.appendChild(o)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
2
|
+
(function(r,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(r=typeof globalThis<"u"?globalThis:r||self,e(r.ui={},r.Vue))})(this,function(r,e){"use strict";const l={button:"_button_den84_1",primary:"_primary_den84_19",bordered:"_bordered_den84_34",danger:"_danger_den84_40",default:"_default_den84_59",text:"_text_den84_73",link:"_link_den84_78",block:"_block_den84_84",disabled:"_disabled_den84_88",loading:"_loading_den84_94",circle:"_circle_den84_98",icon:"_icon_den84_107",iconLeft:"_iconLeft_den84_112",iconRight:"_iconRight_den84_116",xs:"_xs_den84_120",s:"_s_den84_125",m:"_m_den84_131",l:"_l_den84_78",xl:"_xl_den84_142",spinner:"_spinner_den84_147",spin:"_spin_den84_147"},_=["name","type","disabled"],m=e.defineComponent({__name:"button",props:{size:{},className:{},type:{},leftIcon:{},rightIcon:{},block:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean},active:{type:Boolean},name:{},circle:{type:Boolean},bordered:{type:Boolean},htmlType:{}},emits:["click"],setup(i,{emit:c}){const o=i,a=c,d=e.computed(()=>[l.button,l[o.size||"m"],l[o.type||"default"],{[l.block]:o.block,[l.disabled]:o.disabled||o.loading,[l.loading]:o.loading,[l.active]:o.active,[l.circle]:o.circle,[l.bordered]:o.bordered},o.className]),p=()=>{a("click")};return(s,n)=>(e.openBlock(),e.createElementBlock("button",{name:s.name,class:e.normalizeClass(d.value),type:s.htmlType,disabled:s.disabled||s.loading,onClick:p},[s.loading?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(l).spinner)},null,2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[s.leftIcon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([e.unref(l).icon,e.unref(l).iconLeft])},[e.renderSlot(s.$slots,"leftIcon",{icon:s.leftIcon})],2)):e.createCommentVNode("",!0),s.$slots.default?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(l).content)},[e.renderSlot(s.$slots,"default")],2)):e.createCommentVNode("",!0),s.rightIcon?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass([e.unref(l).icon,e.unref(l).iconRight])},[e.renderSlot(s.$slots,"rightIcon",{icon:s.rightIcon})],2)):e.createCommentVNode("",!0)],64))],10,_))}}),t={wrapper:"_wrapper_hww12_1",label:"_label_hww12_6",container:"_container_hww12_12",input:"_input_hww12_18",xs:"_xs_hww12_28",s:"_s_hww12_33",m:"_m_hww12_38",l:"_l_hww12_6",xl:"_xl_hww12_48",disabled:"_disabled_hww12_57",error:"_error_hww12_62",prefix:"_prefix_hww12_72",suffix:"_suffix_hww12_73",loading:"_loading_hww12_88",spinner:"_spinner_hww12_92",spin:"_spin_hww12_92"},f=["for"],b=["id","value","name","type","disabled","placeholder"],k=e.defineComponent({__name:"input",props:{value:{},type:{},id:{},name:{},disabled:{type:Boolean},label:{},placeholder:{},loading:{type:Boolean},error:{},size:{},className:{}},emits:["update:value","enter"],setup(i,{emit:c}){const o=i,a=c,d=e.computed(()=>[t.input,t[o.size||"m"],{[t.disabled]:o.disabled,[t.error]:o.error,[t.loading]:o.loading},o.className]),p=n=>{a("update:value",n.target.value)},s=n=>{n.key==="Enter"&&a("enter")};return(n,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(t).wrapper)},[n.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:n.id,class:e.normalizeClass(e.unref(t).label)},e.toDisplayString(n.label),11,f)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(t).container)},[n.$slots.prefix?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(t).prefix)},[e.renderSlot(n.$slots,"prefix")],2)):e.createCommentVNode("",!0),e.createElementVNode("input",{id:n.id,value:n.value,name:n.name,type:n.type||"text",disabled:n.disabled||n.loading,placeholder:n.placeholder,class:e.normalizeClass(d.value),onInput:p,onKeydown:s},null,42,b),n.$slots.suffix?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(t).suffix)},[e.renderSlot(n.$slots,"suffix")],2)):e.createCommentVNode("",!0),n.loading?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(e.unref(t).spinner)},null,2)):e.createCommentVNode("",!0)],2),n.error?(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(e.unref(t).error)},e.toDisplayString(n.error),3)):e.createCommentVNode("",!0)],2))}});r.BaseButton=m,r.BaseInput=k,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
|