@huntflow/ui 0.0.38 → 0.0.39
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/types.d.ts +3 -19
- package/dist/components/base-input/types.d.ts +2 -14
- package/dist/ui.es.js +104 -108
- package/dist/ui.umd.js +2 -2
- package/package.json +1 -1
|
@@ -14,22 +14,6 @@ export type BaseButtonProps = {
|
|
|
14
14
|
bordered?: boolean;
|
|
15
15
|
htmlType?: BaseButtonHTMLType;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
M = "m",
|
|
21
|
-
L = "l",
|
|
22
|
-
XL = "xl"
|
|
23
|
-
}
|
|
24
|
-
export declare enum BaseButtonType {
|
|
25
|
-
PRIMARY = "primary",
|
|
26
|
-
DANGER = "danger",
|
|
27
|
-
DEFAULT = "default",
|
|
28
|
-
TEXT = "text",
|
|
29
|
-
LINK = "link"
|
|
30
|
-
}
|
|
31
|
-
export declare enum BaseButtonHTMLType {
|
|
32
|
-
SUBMIT = "submit",
|
|
33
|
-
BUTTON = "button",
|
|
34
|
-
RESET = "reset"
|
|
35
|
-
}
|
|
17
|
+
export type BaseButtonSize = 'xs' | 's' | 'm' | 'l' | 'xl';
|
|
18
|
+
export type BaseButtonType = 'primary' | 'danger' | 'default';
|
|
19
|
+
export type BaseButtonHTMLType = 'button' | 'submit' | 'reset';
|
|
@@ -11,17 +11,5 @@ export type BaseInputProps = {
|
|
|
11
11
|
size?: BaseInputSize;
|
|
12
12
|
className?: string;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
S = "s",
|
|
17
|
-
M = "m",
|
|
18
|
-
L = "l",
|
|
19
|
-
XL = "xl"
|
|
20
|
-
}
|
|
21
|
-
export declare enum BaseInputType {
|
|
22
|
-
TEXT = "text",
|
|
23
|
-
PASSWORD = "password",
|
|
24
|
-
EMAIL = "email",
|
|
25
|
-
TEL = "tel",
|
|
26
|
-
SEARCH = "search"
|
|
27
|
-
}
|
|
14
|
+
export type BaseInputSize = 'xs' | 's' | 'm' | 'l' | 'xl';
|
|
15
|
+
export type BaseInputType = 'text' | 'password' | 'email' | 'tel' | 'search';
|
package/dist/ui.es.js
CHANGED
|
@@ -1,30 +1,28 @@
|
|
|
1
1
|
(function(){"use strict";var r;try{if(typeof document<"u"){var o=document.createElement("style");o.nonce=(r=document.head.querySelector("meta[property=csp-nonce]"))==null?void 0:r.content,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(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
const
|
|
4
|
-
button:
|
|
5
|
-
primary:
|
|
6
|
-
bordered:
|
|
7
|
-
danger:
|
|
2
|
+
import { defineComponent as b, computed as g, openBlock as t, createElementBlock as l, normalizeClass as s, Fragment as w, renderSlot as p, createCommentVNode as a, toDisplayString as _, createElementVNode as y } from "vue";
|
|
3
|
+
const h = "_button_den84_1", $ = "_primary_den84_19", k = "_bordered_den84_34", v = "_danger_den84_40", B = "_text_den84_73", S = "_link_den84_78", I = "_block_den84_84", q = "_disabled_den84_88", C = "_loading_den84_94", L = "_circle_den84_98", N = "_icon_den84_107", z = "_iconLeft_den84_112", K = "_iconRight_den84_116", R = "_xs_den84_120", E = "_s_den84_125", O = "_m_den84_131", j = "_l_den84_78", T = "_xl_den84_142", V = "_spinner_den84_147", D = "_spin_den84_147", o = {
|
|
4
|
+
button: h,
|
|
5
|
+
primary: $,
|
|
6
|
+
bordered: k,
|
|
7
|
+
danger: v,
|
|
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:
|
|
9
|
+
text: B,
|
|
10
|
+
link: S,
|
|
11
|
+
block: I,
|
|
12
|
+
disabled: q,
|
|
13
|
+
loading: C,
|
|
14
|
+
circle: L,
|
|
15
|
+
icon: N,
|
|
16
|
+
iconLeft: z,
|
|
17
|
+
iconRight: K,
|
|
18
|
+
xs: R,
|
|
19
|
+
s: E,
|
|
20
|
+
m: O,
|
|
21
21
|
l: j,
|
|
22
|
-
xl:
|
|
22
|
+
xl: T,
|
|
23
23
|
spinner: V,
|
|
24
|
-
spin:
|
|
25
|
-
}
|
|
26
|
-
var p = /* @__PURE__ */ ((e) => (e.XS = "xs", e.S = "s", e.M = "m", e.L = "l", e.XL = "xl", e))(p || {}), y = /* @__PURE__ */ ((e) => (e.PRIMARY = "primary", e.DANGER = "danger", e.DEFAULT = "default", e.TEXT = "text", e.LINK = "link", e))(y || {}), k = /* @__PURE__ */ ((e) => (e.SUBMIT = "submit", e.BUTTON = "button", e.RESET = "reset", e))(k || {});
|
|
27
|
-
const W = w({
|
|
24
|
+
spin: D
|
|
25
|
+
}, F = b({
|
|
28
26
|
name: "BaseButton",
|
|
29
27
|
props: {
|
|
30
28
|
name: {
|
|
@@ -34,7 +32,7 @@ const W = w({
|
|
|
34
32
|
},
|
|
35
33
|
size: {
|
|
36
34
|
type: String,
|
|
37
|
-
default:
|
|
35
|
+
default: "m"
|
|
38
36
|
},
|
|
39
37
|
className: {
|
|
40
38
|
type: String,
|
|
@@ -43,7 +41,7 @@ const W = w({
|
|
|
43
41
|
},
|
|
44
42
|
type: {
|
|
45
43
|
type: String,
|
|
46
|
-
default:
|
|
44
|
+
default: "default"
|
|
47
45
|
},
|
|
48
46
|
leftIcon: {
|
|
49
47
|
type: Object,
|
|
@@ -81,16 +79,16 @@ const W = w({
|
|
|
81
79
|
},
|
|
82
80
|
htmlType: {
|
|
83
81
|
type: String,
|
|
84
|
-
default:
|
|
82
|
+
default: "button"
|
|
85
83
|
}
|
|
86
84
|
},
|
|
87
85
|
emits: ["click"],
|
|
88
86
|
setup(e, { emit: n }) {
|
|
89
87
|
return {
|
|
90
|
-
classList:
|
|
88
|
+
classList: g(() => [
|
|
91
89
|
o.button,
|
|
92
|
-
o[e.size ||
|
|
93
|
-
o[e.type ||
|
|
90
|
+
o[e.size || "m"],
|
|
91
|
+
o[e.type || "default"],
|
|
94
92
|
{
|
|
95
93
|
[o.block]: e.block,
|
|
96
94
|
[o.disabled]: e.disabled || e.loading,
|
|
@@ -107,65 +105,63 @@ const W = w({
|
|
|
107
105
|
styles: o
|
|
108
106
|
};
|
|
109
107
|
}
|
|
110
|
-
}),
|
|
111
|
-
const
|
|
112
|
-
for (const [
|
|
113
|
-
|
|
114
|
-
return
|
|
115
|
-
},
|
|
116
|
-
function
|
|
117
|
-
return
|
|
108
|
+
}), m = (e, n) => {
|
|
109
|
+
const i = e.__vccOpts || e;
|
|
110
|
+
for (const [d, u] of n)
|
|
111
|
+
i[d] = u;
|
|
112
|
+
return i;
|
|
113
|
+
}, A = ["name", "type", "disabled"];
|
|
114
|
+
function G(e, n, i, d, u, f) {
|
|
115
|
+
return t(), l("button", {
|
|
118
116
|
name: e.name,
|
|
119
117
|
class: s(e.classList),
|
|
120
118
|
type: e.htmlType,
|
|
121
119
|
disabled: e.disabled || e.loading,
|
|
122
|
-
onClick: n[0] || (n[0] = (...
|
|
120
|
+
onClick: n[0] || (n[0] = (...c) => e.handleClick && e.handleClick(...c))
|
|
123
121
|
}, [
|
|
124
|
-
e.loading ? (
|
|
122
|
+
e.loading ? (t(), l("span", {
|
|
125
123
|
key: 0,
|
|
126
124
|
class: s(e.styles.spinner)
|
|
127
|
-
}, null, 2)) : (
|
|
128
|
-
e.leftIcon ? (
|
|
125
|
+
}, null, 2)) : (t(), l(w, { key: 1 }, [
|
|
126
|
+
e.leftIcon ? (t(), l("span", {
|
|
129
127
|
key: 0,
|
|
130
128
|
class: s([e.styles.icon, e.styles.iconLeft])
|
|
131
129
|
}, [
|
|
132
|
-
|
|
133
|
-
], 2)) :
|
|
134
|
-
e.$slots.default ? (
|
|
130
|
+
p(e.$slots, "leftIcon", { icon: e.leftIcon })
|
|
131
|
+
], 2)) : a("", !0),
|
|
132
|
+
e.$slots.default ? (t(), l("span", {
|
|
135
133
|
key: 1,
|
|
136
134
|
class: s(e.styles.content)
|
|
137
135
|
}, [
|
|
138
|
-
|
|
139
|
-
], 2)) :
|
|
140
|
-
e.rightIcon ? (
|
|
136
|
+
p(e.$slots, "default")
|
|
137
|
+
], 2)) : a("", !0),
|
|
138
|
+
e.rightIcon ? (t(), l("span", {
|
|
141
139
|
key: 2,
|
|
142
140
|
class: s([e.styles.icon, e.styles.iconRight])
|
|
143
141
|
}, [
|
|
144
|
-
|
|
145
|
-
], 2)) :
|
|
142
|
+
p(e.$slots, "rightIcon", { icon: e.rightIcon })
|
|
143
|
+
], 2)) : a("", !0)
|
|
146
144
|
], 64))
|
|
147
|
-
], 10,
|
|
145
|
+
], 10, A);
|
|
148
146
|
}
|
|
149
|
-
const
|
|
150
|
-
wrapper:
|
|
151
|
-
label:
|
|
152
|
-
container:
|
|
153
|
-
input:
|
|
154
|
-
xs:
|
|
155
|
-
s:
|
|
156
|
-
m:
|
|
157
|
-
l:
|
|
158
|
-
xl:
|
|
159
|
-
disabled:
|
|
160
|
-
error:
|
|
161
|
-
prefix:
|
|
162
|
-
suffix:
|
|
163
|
-
loading:
|
|
164
|
-
spinner:
|
|
165
|
-
spin:
|
|
166
|
-
}
|
|
167
|
-
var b = /* @__PURE__ */ ((e) => (e.XS = "xs", e.S = "s", e.M = "m", e.L = "l", e.XL = "xl", e))(b || {}), v = /* @__PURE__ */ ((e) => (e.TEXT = "text", e.PASSWORD = "password", e.EMAIL = "email", e.TEL = "tel", e.SEARCH = "search", e))(v || {});
|
|
168
|
-
const ce = w({
|
|
147
|
+
const ue = /* @__PURE__ */ m(F, [["render", G]]), H = "_wrapper_hww12_1", J = "_label_hww12_6", M = "_container_hww12_12", P = "_input_hww12_18", Q = "_xs_hww12_28", U = "_s_hww12_33", W = "_m_hww12_38", X = "_l_hww12_6", Y = "_xl_hww12_48", Z = "_disabled_hww12_57", x = "_error_hww12_62", ee = "_prefix_hww12_72", ne = "_suffix_hww12_73", se = "_loading_hww12_88", te = "_spinner_hww12_92", le = "_spin_hww12_92", r = {
|
|
148
|
+
wrapper: H,
|
|
149
|
+
label: J,
|
|
150
|
+
container: M,
|
|
151
|
+
input: P,
|
|
152
|
+
xs: Q,
|
|
153
|
+
s: U,
|
|
154
|
+
m: W,
|
|
155
|
+
l: X,
|
|
156
|
+
xl: Y,
|
|
157
|
+
disabled: Z,
|
|
158
|
+
error: x,
|
|
159
|
+
prefix: ee,
|
|
160
|
+
suffix: ne,
|
|
161
|
+
loading: se,
|
|
162
|
+
spinner: te,
|
|
163
|
+
spin: le
|
|
164
|
+
}, oe = b({
|
|
169
165
|
name: "BaseInput",
|
|
170
166
|
props: {
|
|
171
167
|
value: {
|
|
@@ -174,7 +170,7 @@ const ce = w({
|
|
|
174
170
|
},
|
|
175
171
|
type: {
|
|
176
172
|
type: String,
|
|
177
|
-
default:
|
|
173
|
+
default: "text"
|
|
178
174
|
},
|
|
179
175
|
id: {
|
|
180
176
|
type: String,
|
|
@@ -211,7 +207,7 @@ const ce = w({
|
|
|
211
207
|
},
|
|
212
208
|
size: {
|
|
213
209
|
type: String,
|
|
214
|
-
default:
|
|
210
|
+
default: "m"
|
|
215
211
|
},
|
|
216
212
|
className: {
|
|
217
213
|
type: String,
|
|
@@ -221,47 +217,47 @@ const ce = w({
|
|
|
221
217
|
},
|
|
222
218
|
emits: ["update:value", "enter"],
|
|
223
219
|
setup(e, { emit: n }) {
|
|
224
|
-
const
|
|
220
|
+
const i = () => {
|
|
225
221
|
n("update:value");
|
|
226
|
-
},
|
|
227
|
-
|
|
228
|
-
},
|
|
229
|
-
|
|
230
|
-
|
|
222
|
+
}, d = (f) => {
|
|
223
|
+
f.key === "Enter" && n("enter");
|
|
224
|
+
}, u = g(() => [
|
|
225
|
+
r.input,
|
|
226
|
+
r[e.size || "m"],
|
|
231
227
|
{
|
|
232
|
-
[
|
|
233
|
-
[
|
|
234
|
-
[
|
|
228
|
+
[r.disabled]: e.disabled,
|
|
229
|
+
[r.error]: e.error,
|
|
230
|
+
[r.loading]: e.loading
|
|
235
231
|
},
|
|
236
232
|
e.className
|
|
237
233
|
]);
|
|
238
234
|
return {
|
|
239
|
-
styles:
|
|
240
|
-
onInput:
|
|
241
|
-
onKeydown:
|
|
242
|
-
inputClass:
|
|
235
|
+
styles: r,
|
|
236
|
+
onInput: i,
|
|
237
|
+
onKeydown: d,
|
|
238
|
+
inputClass: u
|
|
243
239
|
};
|
|
244
240
|
}
|
|
245
|
-
}),
|
|
246
|
-
function
|
|
247
|
-
return
|
|
241
|
+
}), ae = ["for"], ie = ["id", "value", "name", "type", "disabled", "placeholder"];
|
|
242
|
+
function de(e, n, i, d, u, f) {
|
|
243
|
+
return t(), l("div", {
|
|
248
244
|
class: s(e.styles.wrapper)
|
|
249
245
|
}, [
|
|
250
|
-
e.label ? (
|
|
246
|
+
e.label ? (t(), l("label", {
|
|
251
247
|
key: 0,
|
|
252
248
|
for: e.id,
|
|
253
249
|
class: s(e.styles.label)
|
|
254
|
-
},
|
|
255
|
-
|
|
250
|
+
}, _(e.label), 11, ae)) : a("", !0),
|
|
251
|
+
y("div", {
|
|
256
252
|
class: s(e.styles.container)
|
|
257
253
|
}, [
|
|
258
|
-
e.$slots.prefix ? (
|
|
254
|
+
e.$slots.prefix ? (t(), l("span", {
|
|
259
255
|
key: 0,
|
|
260
256
|
class: s(e.styles.prefix)
|
|
261
257
|
}, [
|
|
262
|
-
|
|
263
|
-
], 2)) :
|
|
264
|
-
|
|
258
|
+
p(e.$slots, "prefix")
|
|
259
|
+
], 2)) : a("", !0),
|
|
260
|
+
y("input", {
|
|
265
261
|
id: e.id,
|
|
266
262
|
value: e.value,
|
|
267
263
|
name: e.name,
|
|
@@ -269,28 +265,28 @@ function _e(e, n, a, i, c, _) {
|
|
|
269
265
|
disabled: e.disabled || e.loading,
|
|
270
266
|
placeholder: e.placeholder,
|
|
271
267
|
class: s(e.inputClass),
|
|
272
|
-
onInput: n[0] || (n[0] = (...
|
|
273
|
-
onKeydown: n[1] || (n[1] = (...
|
|
274
|
-
}, null, 42,
|
|
275
|
-
e.$slots.suffix ? (
|
|
268
|
+
onInput: n[0] || (n[0] = (...c) => e.onInput && e.onInput(...c)),
|
|
269
|
+
onKeydown: n[1] || (n[1] = (...c) => e.onKeydown && e.onKeydown(...c))
|
|
270
|
+
}, null, 42, ie),
|
|
271
|
+
e.$slots.suffix ? (t(), l("span", {
|
|
276
272
|
key: 1,
|
|
277
273
|
class: s(e.styles.suffix)
|
|
278
274
|
}, [
|
|
279
|
-
|
|
280
|
-
], 2)) :
|
|
281
|
-
e.loading ? (
|
|
275
|
+
p(e.$slots, "suffix")
|
|
276
|
+
], 2)) : a("", !0),
|
|
277
|
+
e.loading ? (t(), l("span", {
|
|
282
278
|
key: 2,
|
|
283
279
|
class: s(e.styles.spinner)
|
|
284
|
-
}, null, 2)) :
|
|
280
|
+
}, null, 2)) : a("", !0)
|
|
285
281
|
], 2),
|
|
286
|
-
e.error ? (
|
|
282
|
+
e.error ? (t(), l("p", {
|
|
287
283
|
key: 1,
|
|
288
284
|
class: s(e.styles.error)
|
|
289
|
-
},
|
|
285
|
+
}, _(e.error), 3)) : a("", !0)
|
|
290
286
|
], 2);
|
|
291
287
|
}
|
|
292
|
-
const
|
|
288
|
+
const ce = /* @__PURE__ */ m(oe, [["render", de]]);
|
|
293
289
|
export {
|
|
294
|
-
|
|
295
|
-
|
|
290
|
+
ue as BaseButton,
|
|
291
|
+
ce as BaseInput
|
|
296
292
|
};
|
package/dist/ui.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(t,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(t=typeof globalThis<"u"?globalThis:t||self,o(t.ui={},t.Vue))})(this,function(t,o){"use strict";var
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(
|
|
1
|
+
(function(t,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(t=typeof globalThis<"u"?globalThis:t||self,o(t.ui={},t.Vue))})(this,function(t,o){"use strict";var _=document.createElement("style");_.textContent=`._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)}}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(_);const r={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"},f=o.defineComponent({name:"BaseButton",props:{name:{type:String,required:!1,default:void 0},size:{type:String,default:"m"},className:{type:String,required:!1,default:void 0},type:{type:String,default:"default"},leftIcon:{type:Object,required:!1,default:void 0},rightIcon:{type:Object,required:!1,default:void 0},block:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},active:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},bordered:{type:Boolean,default:!1},htmlType:{type:String,default:"button"}},emits:["click"],setup(e,{emit:n}){return{classList:o.computed(()=>[r.button,r[e.size||"m"],r[e.type||"default"],{[r.block]:e.block,[r.disabled]:e.disabled||e.loading,[r.loading]:e.loading,[r.active]:e.active,[r.circle]:e.circle,[r.bordered]:e.bordered},e.className]),handleClick:()=>{n("click")},styles:r}}}),p=(e,n)=>{const l=e.__vccOpts||e;for(const[i,d]of n)l[i]=d;return l},u=["name","type","disabled"];function b(e,n,l,i,d,c){return o.openBlock(),o.createElementBlock("button",{name:e.name,class:o.normalizeClass(e.classList),type:e.htmlType,disabled:e.disabled||e.loading,onClick:n[0]||(n[0]=(...s)=>e.handleClick&&e.handleClick(...s))},[e.loading?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(e.styles.spinner)},null,2)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[e.leftIcon?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass([e.styles.icon,e.styles.iconLeft])},[o.renderSlot(e.$slots,"leftIcon",{icon:e.leftIcon})],2)):o.createCommentVNode("",!0),e.$slots.default?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(e.styles.content)},[o.renderSlot(e.$slots,"default")],2)):o.createCommentVNode("",!0),e.rightIcon?(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass([e.styles.icon,e.styles.iconRight])},[o.renderSlot(e.$slots,"rightIcon",{icon:e.rightIcon})],2)):o.createCommentVNode("",!0)],64))],10,u)}const g=p(f,[["render",b]]),a={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"},m=o.defineComponent({name:"BaseInput",props:{value:{type:String,required:!0},type:{type:String,default:"text"},id:{type:String,required:!1,default:void 0},name:{type:String,required:!1,default:void 0},disabled:{type:Boolean,default:!1},label:{type:String,required:!1,default:void 0},placeholder:{type:String,required:!1,default:void 0},loading:{type:Boolean,default:!1},error:{type:String,required:!1,default:void 0},size:{type:String,default:"m"},className:{type:String,required:!1,default:void 0}},emits:["update:value","enter"],setup(e,{emit:n}){const l=()=>{n("update:value")},i=c=>{c.key==="Enter"&&n("enter")},d=o.computed(()=>[a.input,a[e.size||"m"],{[a.disabled]:e.disabled,[a.error]:e.error,[a.loading]:e.loading},e.className]);return{styles:a,onInput:l,onKeydown:i,inputClass:d}}}),h=["for"],y=["id","value","name","type","disabled","placeholder"];function w(e,n,l,i,d,c){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.styles.wrapper)},[e.label?(o.openBlock(),o.createElementBlock("label",{key:0,for:e.id,class:o.normalizeClass(e.styles.label)},o.toDisplayString(e.label),11,h)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(e.styles.container)},[e.$slots.prefix?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(e.styles.prefix)},[o.renderSlot(e.$slots,"prefix")],2)):o.createCommentVNode("",!0),o.createElementVNode("input",{id:e.id,value:e.value,name:e.name,type:e.type||"text",disabled:e.disabled||e.loading,placeholder:e.placeholder,class:o.normalizeClass(e.inputClass),onInput:n[0]||(n[0]=(...s)=>e.onInput&&e.onInput(...s)),onKeydown:n[1]||(n[1]=(...s)=>e.onKeydown&&e.onKeydown(...s))},null,42,y),e.$slots.suffix?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(e.styles.suffix)},[o.renderSlot(e.$slots,"suffix")],2)):o.createCommentVNode("",!0),e.loading?(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass(e.styles.spinner)},null,2)):o.createCommentVNode("",!0)],2),e.error?(o.openBlock(),o.createElementBlock("p",{key:1,class:o.normalizeClass(e.styles.error)},o.toDisplayString(e.error),3)):o.createCommentVNode("",!0)],2)}const k=p(m,[["render",w]]);t.BaseButton=g,t.BaseInput=k,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
|