@huntflow/ui 0.0.23 → 0.0.24
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/button/button.vue.d.ts +5 -5
- package/dist/components/button/index.d.ts +3 -0
- package/dist/main.d.ts +1 -2
- package/dist/ui.es.js +133 -134
- package/dist/ui.umd.js +2 -2
- package/package.json +1 -1
|
@@ -129,14 +129,14 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
129
129
|
onClick?: (() => any) | undefined;
|
|
130
130
|
}>, {
|
|
131
131
|
name: string;
|
|
132
|
-
|
|
133
|
-
disabled: boolean;
|
|
134
|
-
loading: boolean;
|
|
132
|
+
htmlType: import('./types').BaseButtonHTMLType;
|
|
135
133
|
size: BaseButtonSize;
|
|
136
134
|
className: string | undefined;
|
|
137
|
-
|
|
138
|
-
htmlType: import('./types').BaseButtonHTMLType;
|
|
135
|
+
type: BaseButtonType;
|
|
139
136
|
bordered: boolean;
|
|
137
|
+
loading: boolean;
|
|
138
|
+
disabled: boolean;
|
|
139
|
+
circle: boolean;
|
|
140
140
|
active: boolean;
|
|
141
141
|
block: boolean;
|
|
142
142
|
rightIcon: import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
package/dist/main.d.ts
CHANGED
package/dist/ui.es.js
CHANGED
|
@@ -1,128 +1,28 @@
|
|
|
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(".
|
|
2
|
-
import { defineComponent as h,
|
|
3
|
-
const N = "
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
xs: C,
|
|
9
|
-
s: X,
|
|
10
|
-
m: A,
|
|
11
|
-
l: D,
|
|
12
|
-
xl: F,
|
|
13
|
-
disabled: S,
|
|
14
|
-
error: j,
|
|
15
|
-
prefix: K,
|
|
16
|
-
suffix: O,
|
|
17
|
-
loading: P,
|
|
18
|
-
spinner: T,
|
|
19
|
-
spin: U
|
|
20
|
-
};
|
|
21
|
-
var v = /* @__PURE__ */ ((e) => (e.XS = "xs", e.S = "s", e.M = "m", e.L = "l", e.XL = "xl", e))(v || {});
|
|
22
|
-
const G = ["for"], Y = ["id", "value", "name", "type", "disabled", "placeholder"], fe = /* @__PURE__ */ h({
|
|
23
|
-
name: "BaseInput",
|
|
24
|
-
__name: "input",
|
|
25
|
-
props: /* @__PURE__ */ y({
|
|
26
|
-
value: {},
|
|
27
|
-
type: {},
|
|
28
|
-
id: {},
|
|
29
|
-
name: {},
|
|
30
|
-
disabled: { type: Boolean },
|
|
31
|
-
label: {},
|
|
32
|
-
placeholder: {},
|
|
33
|
-
loading: { type: Boolean },
|
|
34
|
-
error: {},
|
|
35
|
-
size: {},
|
|
36
|
-
className: {}
|
|
37
|
-
}, {
|
|
38
|
-
modelValue: {},
|
|
39
|
-
modelModifiers: {}
|
|
40
|
-
}),
|
|
41
|
-
emits: /* @__PURE__ */ y(["update:modelValue", "enter"], ["update:modelValue"]),
|
|
42
|
-
setup(e, { emit: m }) {
|
|
43
|
-
const n = e, f = I(e, "modelValue"), p = m, c = (o) => {
|
|
44
|
-
const b = o.target;
|
|
45
|
-
p("update:modelValue", b.value);
|
|
46
|
-
}, u = (o) => {
|
|
47
|
-
o.key === "Enter" && p("enter");
|
|
48
|
-
}, L = k(() => [
|
|
49
|
-
a.input,
|
|
50
|
-
a[n.size || v.M],
|
|
51
|
-
{
|
|
52
|
-
[a.disabled]: n.disabled,
|
|
53
|
-
[a.error]: n.error,
|
|
54
|
-
[a.loading]: n.loading
|
|
55
|
-
},
|
|
56
|
-
n.className
|
|
57
|
-
]);
|
|
58
|
-
return (o, b) => (i(), d("div", {
|
|
59
|
-
class: t(l(a).wrapper)
|
|
60
|
-
}, [
|
|
61
|
-
o.label ? (i(), d("label", {
|
|
62
|
-
key: 0,
|
|
63
|
-
for: o.id,
|
|
64
|
-
class: t(l(a).label)
|
|
65
|
-
}, g(o.label), 11, G)) : r("", !0),
|
|
66
|
-
w("div", {
|
|
67
|
-
class: t(l(a).container)
|
|
68
|
-
}, [
|
|
69
|
-
o.$slots.prefix ? (i(), d("span", {
|
|
70
|
-
key: 0,
|
|
71
|
-
class: t(l(a).prefix)
|
|
72
|
-
}, [
|
|
73
|
-
_(o.$slots, "prefix")
|
|
74
|
-
], 2)) : r("", !0),
|
|
75
|
-
w("input", {
|
|
76
|
-
id: o.id,
|
|
77
|
-
value: f.value,
|
|
78
|
-
name: o.name,
|
|
79
|
-
type: o.type || "text",
|
|
80
|
-
disabled: o.disabled || o.loading,
|
|
81
|
-
placeholder: o.placeholder,
|
|
82
|
-
class: t(L.value),
|
|
83
|
-
onInput: c,
|
|
84
|
-
onKeydown: u
|
|
85
|
-
}, null, 42, Y),
|
|
86
|
-
o.$slots.suffix ? (i(), d("span", {
|
|
87
|
-
key: 1,
|
|
88
|
-
class: t(l(a).suffix)
|
|
89
|
-
}, [
|
|
90
|
-
_(o.$slots, "suffix")
|
|
91
|
-
], 2)) : r("", !0),
|
|
92
|
-
o.loading ? (i(), d("span", {
|
|
93
|
-
key: 2,
|
|
94
|
-
class: t(l(a).spinner)
|
|
95
|
-
}, null, 2)) : r("", !0)
|
|
96
|
-
], 2),
|
|
97
|
-
o.error ? (i(), d("p", {
|
|
98
|
-
key: 1,
|
|
99
|
-
class: t(l(a).error)
|
|
100
|
-
}, g(o.error), 3)) : r("", !0)
|
|
101
|
-
], 2));
|
|
102
|
-
}
|
|
103
|
-
}), q = "_button_den84_1", B = "_primary_den84_19", H = "_bordered_den84_34", J = "_danger_den84_40", Q = "_text_den84_73", W = "_link_den84_78", Z = "_block_den84_84", z = "_disabled_den84_88", ee = "_loading_den84_94", ne = "_circle_den84_98", oe = "_icon_den84_107", se = "_iconLeft_den84_112", te = "_iconRight_den84_116", le = "_xs_den84_120", ae = "_s_den84_125", ie = "_m_den84_131", de = "_l_den84_78", re = "_xl_den84_142", ce = "_spinner_den84_147", _e = "_spin_den84_147", s = {
|
|
104
|
-
button: q,
|
|
105
|
-
primary: B,
|
|
106
|
-
bordered: H,
|
|
107
|
-
danger: J,
|
|
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 h, computed as k, openBlock as i, createElementBlock as d, normalizeClass as t, unref as l, Fragment as I, renderSlot as _, createCommentVNode as r, mergeModels as y, useModel as M, toDisplayString as g, createElementVNode as w } from "vue";
|
|
3
|
+
const N = "_button_den84_1", E = "_primary_den84_19", R = "_bordered_den84_34", V = "_danger_den84_40", C = "_text_den84_73", X = "_link_den84_78", A = "_block_den84_84", D = "_disabled_den84_88", F = "_loading_den84_94", S = "_circle_den84_98", j = "_icon_den84_107", K = "_iconLeft_den84_112", O = "_iconRight_den84_116", P = "_xs_den84_120", T = "_s_den84_125", U = "_m_den84_131", G = "_l_den84_78", Y = "_xl_den84_142", q = "_spinner_den84_147", B = "_spin_den84_147", s = {
|
|
4
|
+
button: N,
|
|
5
|
+
primary: E,
|
|
6
|
+
bordered: R,
|
|
7
|
+
danger: V,
|
|
108
8
|
default: "_default_den84_59",
|
|
109
|
-
text:
|
|
110
|
-
link:
|
|
111
|
-
block:
|
|
112
|
-
disabled:
|
|
113
|
-
loading:
|
|
114
|
-
circle:
|
|
115
|
-
icon:
|
|
116
|
-
iconLeft:
|
|
117
|
-
iconRight:
|
|
118
|
-
xs:
|
|
119
|
-
s:
|
|
120
|
-
m:
|
|
121
|
-
l:
|
|
122
|
-
xl:
|
|
123
|
-
spinner:
|
|
124
|
-
spin:
|
|
125
|
-
},
|
|
9
|
+
text: C,
|
|
10
|
+
link: X,
|
|
11
|
+
block: A,
|
|
12
|
+
disabled: D,
|
|
13
|
+
loading: F,
|
|
14
|
+
circle: S,
|
|
15
|
+
icon: j,
|
|
16
|
+
iconLeft: K,
|
|
17
|
+
iconRight: O,
|
|
18
|
+
xs: P,
|
|
19
|
+
s: T,
|
|
20
|
+
m: U,
|
|
21
|
+
l: G,
|
|
22
|
+
xl: Y,
|
|
23
|
+
spinner: q,
|
|
24
|
+
spin: B
|
|
25
|
+
}, H = () => ({
|
|
126
26
|
name: {
|
|
127
27
|
type: String,
|
|
128
28
|
default: void 0
|
|
@@ -179,17 +79,17 @@ const G = ["for"], Y = ["id", "value", "name", "type", "disabled", "placeholder"
|
|
|
179
79
|
default: void 0
|
|
180
80
|
}
|
|
181
81
|
});
|
|
182
|
-
var
|
|
183
|
-
const
|
|
82
|
+
var v = /* @__PURE__ */ ((e) => (e.XS = "xs", e.S = "s", e.M = "m", e.L = "l", e.XL = "xl", e))(v || {}), $ = /* @__PURE__ */ ((e) => (e.PRIMARY = "primary", e.DANGER = "danger", e.DEFAULT = "default", e.TEXT = "text", e.LINK = "link", e))($ || {});
|
|
83
|
+
const J = ["name", "type", "disabled"], fe = /* @__PURE__ */ h({
|
|
184
84
|
name: "BaseButton",
|
|
185
85
|
__name: "button",
|
|
186
|
-
props:
|
|
86
|
+
props: H(),
|
|
187
87
|
emits: ["click"],
|
|
188
88
|
setup(e, { emit: m }) {
|
|
189
89
|
const n = e, f = m, p = k(() => [
|
|
190
90
|
s.button,
|
|
191
|
-
s[n.size ||
|
|
192
|
-
s[n.type ||
|
|
91
|
+
s[n.size || v.M],
|
|
92
|
+
s[n.type || $.DEFAULT],
|
|
193
93
|
{
|
|
194
94
|
[s.block]: n.block,
|
|
195
95
|
[s.disabled]: n.disabled || n.loading,
|
|
@@ -210,7 +110,7 @@ const ue = ["name", "type", "disabled"], be = /* @__PURE__ */ h({
|
|
|
210
110
|
n.loading ? (i(), d("span", {
|
|
211
111
|
key: 0,
|
|
212
112
|
class: t(l(s).spinner)
|
|
213
|
-
}, null, 2)) : (i(), d(
|
|
113
|
+
}, null, 2)) : (i(), d(I, { key: 1 }, [
|
|
214
114
|
n.leftIcon ? (i(), d("span", {
|
|
215
115
|
key: 0,
|
|
216
116
|
class: t([l(s).icon, l(s).iconLeft])
|
|
@@ -234,11 +134,110 @@ const ue = ["name", "type", "disabled"], be = /* @__PURE__ */ h({
|
|
|
234
134
|
})
|
|
235
135
|
], 2)) : r("", !0)
|
|
236
136
|
], 64))
|
|
237
|
-
], 10,
|
|
137
|
+
], 10, J));
|
|
138
|
+
}
|
|
139
|
+
}), Q = "_wrapper_hww12_1", W = "_label_hww12_6", Z = "_container_hww12_12", z = "_input_hww12_18", ee = "_xs_hww12_28", ne = "_s_hww12_33", oe = "_m_hww12_38", se = "_l_hww12_6", te = "_xl_hww12_48", le = "_disabled_hww12_57", ae = "_error_hww12_62", ie = "_prefix_hww12_72", de = "_suffix_hww12_73", re = "_loading_hww12_88", ce = "_spinner_hww12_92", _e = "_spin_hww12_92", a = {
|
|
140
|
+
wrapper: Q,
|
|
141
|
+
label: W,
|
|
142
|
+
container: Z,
|
|
143
|
+
input: z,
|
|
144
|
+
xs: ee,
|
|
145
|
+
s: ne,
|
|
146
|
+
m: oe,
|
|
147
|
+
l: se,
|
|
148
|
+
xl: te,
|
|
149
|
+
disabled: le,
|
|
150
|
+
error: ae,
|
|
151
|
+
prefix: ie,
|
|
152
|
+
suffix: de,
|
|
153
|
+
loading: re,
|
|
154
|
+
spinner: ce,
|
|
155
|
+
spin: _e
|
|
156
|
+
};
|
|
157
|
+
var x = /* @__PURE__ */ ((e) => (e.XS = "xs", e.S = "s", e.M = "m", e.L = "l", e.XL = "xl", e))(x || {});
|
|
158
|
+
const pe = ["for"], ue = ["id", "value", "name", "type", "disabled", "placeholder"], be = /* @__PURE__ */ h({
|
|
159
|
+
name: "BaseInput",
|
|
160
|
+
__name: "input",
|
|
161
|
+
props: /* @__PURE__ */ y({
|
|
162
|
+
value: {},
|
|
163
|
+
type: {},
|
|
164
|
+
id: {},
|
|
165
|
+
name: {},
|
|
166
|
+
disabled: { type: Boolean },
|
|
167
|
+
label: {},
|
|
168
|
+
placeholder: {},
|
|
169
|
+
loading: { type: Boolean },
|
|
170
|
+
error: {},
|
|
171
|
+
size: {},
|
|
172
|
+
className: {}
|
|
173
|
+
}, {
|
|
174
|
+
modelValue: {},
|
|
175
|
+
modelModifiers: {}
|
|
176
|
+
}),
|
|
177
|
+
emits: /* @__PURE__ */ y(["update:modelValue", "enter"], ["update:modelValue"]),
|
|
178
|
+
setup(e, { emit: m }) {
|
|
179
|
+
const n = e, f = M(e, "modelValue"), p = m, c = (o) => {
|
|
180
|
+
const b = o.target;
|
|
181
|
+
p("update:modelValue", b.value);
|
|
182
|
+
}, u = (o) => {
|
|
183
|
+
o.key === "Enter" && p("enter");
|
|
184
|
+
}, L = k(() => [
|
|
185
|
+
a.input,
|
|
186
|
+
a[n.size || x.M],
|
|
187
|
+
{
|
|
188
|
+
[a.disabled]: n.disabled,
|
|
189
|
+
[a.error]: n.error,
|
|
190
|
+
[a.loading]: n.loading
|
|
191
|
+
},
|
|
192
|
+
n.className
|
|
193
|
+
]);
|
|
194
|
+
return (o, b) => (i(), d("div", {
|
|
195
|
+
class: t(l(a).wrapper)
|
|
196
|
+
}, [
|
|
197
|
+
o.label ? (i(), d("label", {
|
|
198
|
+
key: 0,
|
|
199
|
+
for: o.id,
|
|
200
|
+
class: t(l(a).label)
|
|
201
|
+
}, g(o.label), 11, pe)) : r("", !0),
|
|
202
|
+
w("div", {
|
|
203
|
+
class: t(l(a).container)
|
|
204
|
+
}, [
|
|
205
|
+
o.$slots.prefix ? (i(), d("span", {
|
|
206
|
+
key: 0,
|
|
207
|
+
class: t(l(a).prefix)
|
|
208
|
+
}, [
|
|
209
|
+
_(o.$slots, "prefix")
|
|
210
|
+
], 2)) : r("", !0),
|
|
211
|
+
w("input", {
|
|
212
|
+
id: o.id,
|
|
213
|
+
value: f.value,
|
|
214
|
+
name: o.name,
|
|
215
|
+
type: o.type || "text",
|
|
216
|
+
disabled: o.disabled || o.loading,
|
|
217
|
+
placeholder: o.placeholder,
|
|
218
|
+
class: t(L.value),
|
|
219
|
+
onInput: c,
|
|
220
|
+
onKeydown: u
|
|
221
|
+
}, null, 42, ue),
|
|
222
|
+
o.$slots.suffix ? (i(), d("span", {
|
|
223
|
+
key: 1,
|
|
224
|
+
class: t(l(a).suffix)
|
|
225
|
+
}, [
|
|
226
|
+
_(o.$slots, "suffix")
|
|
227
|
+
], 2)) : r("", !0),
|
|
228
|
+
o.loading ? (i(), d("span", {
|
|
229
|
+
key: 2,
|
|
230
|
+
class: t(l(a).spinner)
|
|
231
|
+
}, null, 2)) : r("", !0)
|
|
232
|
+
], 2),
|
|
233
|
+
o.error ? (i(), d("p", {
|
|
234
|
+
key: 1,
|
|
235
|
+
class: t(l(a).error)
|
|
236
|
+
}, g(o.error), 3)) : r("", !0)
|
|
237
|
+
], 2));
|
|
238
238
|
}
|
|
239
239
|
});
|
|
240
240
|
export {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
pe as buttonProps
|
|
241
|
+
fe as BaseButton,
|
|
242
|
+
be as BaseInput
|
|
244
243
|
};
|
package/dist/ui.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(d,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(d=typeof globalThis<"u"?globalThis:d||self,e(d.ui={},d.Vue))})(this,function(d,e){"use strict";var p=document.createElement("style");p.textContent=`.
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(p);const
|
|
1
|
+
(function(d,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(d=typeof globalThis<"u"?globalThis:d||self,e(d.ui={},d.Vue))})(this,function(d,e){"use strict";var p=document.createElement("style");p.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(p);const t={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"},u=()=>({name:{type:String,default:void 0},htmlType:{type:String,default:"button"},size:{type:String,default:"m"},className:{type:String,default:void 0},type:{type:String,default:"default"},bordered:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},circle:{type:Boolean,default:void 0},active:{type:Boolean,default:void 0},block:{type:Boolean,default:void 0},rightIcon:{type:Object,default:void 0},leftIcon:{type:Object,default:void 0}});var f=(o=>(o.XS="xs",o.S="s",o.M="m",o.L="l",o.XL="xl",o))(f||{}),b=(o=>(o.PRIMARY="primary",o.DANGER="danger",o.DEFAULT="default",o.TEXT="text",o.LINK="link",o))(b||{});const x=["name","type","disabled"],h=e.defineComponent({name:"BaseButton",__name:"button",props:u(),emits:["click"],setup(o,{emit:c}){const n=o,_=c,i=e.computed(()=>[t.button,t[n.size||f.M],t[n.type||b.DEFAULT],{[t.block]:n.block,[t.disabled]:n.disabled||n.loading,[t.loading]:n.loading,[t.active]:n.active,[t.circle]:n.circle,[t.bordered]:n.bordered},n.className]);return(a,s)=>(e.openBlock(),e.createElementBlock("button",{name:n.name,class:e.normalizeClass(i.value),type:n.htmlType,disabled:n.disabled||n.loading,onClick:s[0]||(s[0]=()=>_("click"))},[n.loading?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(t).spinner)},null,2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.leftIcon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([e.unref(t).icon,e.unref(t).iconLeft])},[e.renderSlot(a.$slots,"leftIcon",{icon:n.leftIcon})],2)):e.createCommentVNode("",!0),a.$slots.default?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(t).content)},[e.renderSlot(a.$slots,"default")],2)):e.createCommentVNode("",!0),n.rightIcon?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass([e.unref(t).icon,e.unref(t).iconRight])},[e.renderSlot(a.$slots,"rightIcon",{icon:n.rightIcon})],2)):e.createCommentVNode("",!0)],64))],10,x))}}),l={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"};var m=(o=>(o.XS="xs",o.S="s",o.M="m",o.L="l",o.XL="xl",o))(m||{});const w=["for"],k=["id","value","name","type","disabled","placeholder"],y=e.defineComponent({name:"BaseInput",__name:"input",props:e.mergeModels({value:{},type:{},id:{},name:{},disabled:{type:Boolean},label:{},placeholder:{},loading:{type:Boolean},error:{},size:{},className:{}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["update:modelValue","enter"],["update:modelValue"]),setup(o,{emit:c}){const n=o,_=e.useModel(o,"modelValue"),i=c,a=r=>{const g=r.target;i("update:modelValue",g.value)},s=r=>{r.key==="Enter"&&i("enter")},$=e.computed(()=>[l.input,l[n.size||m.M],{[l.disabled]:n.disabled,[l.error]:n.error,[l.loading]:n.loading},n.className]);return(r,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(l).wrapper)},[r.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:r.id,class:e.normalizeClass(e.unref(l).label)},e.toDisplayString(r.label),11,w)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).container)},[r.$slots.prefix?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(l).prefix)},[e.renderSlot(r.$slots,"prefix")],2)):e.createCommentVNode("",!0),e.createElementVNode("input",{id:r.id,value:_.value,name:r.name,type:r.type||"text",disabled:r.disabled||r.loading,placeholder:r.placeholder,class:e.normalizeClass($.value),onInput:a,onKeydown:s},null,42,k),r.$slots.suffix?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(l).suffix)},[e.renderSlot(r.$slots,"suffix")],2)):e.createCommentVNode("",!0),r.loading?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(e.unref(l).spinner)},null,2)):e.createCommentVNode("",!0)],2),r.error?(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(e.unref(l).error)},e.toDisplayString(r.error),3)):e.createCommentVNode("",!0)],2))}});d.BaseButton=h,d.BaseInput=y,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
|