litos-ui 0.16.2 → 0.17.0
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/lib/base.d.ts +11 -2
- package/lib/base.js +59 -27
- package/lib/button/index.d.ts +18 -3
- package/lib/button/index.js +65 -67
- package/lib/check/check.d.ts +13 -5
- package/lib/check/check.js +61 -33
- package/lib/check/checkbox.js +3 -3
- package/lib/check/checkbox_group.d.ts +0 -1
- package/lib/check/checkbox_group.js +3 -7
- package/lib/check/index.d.ts +12 -8
- package/lib/check/index.js +40 -47
- package/lib/check/radio.js +6 -6
- package/lib/check/radio_group.d.ts +0 -2
- package/lib/check/radio_group.js +3 -10
- package/lib/check-CksURvTv.js +4 -0
- package/lib/color_picker/index.js +1 -1
- package/lib/form/form_inner.d.ts +17 -10
- package/lib/form/form_inner.js +82 -65
- package/lib/form/form_item.d.ts +23 -23
- package/lib/form/form_item.js +108 -89
- package/lib/form/index.d.ts +21 -14
- package/lib/form/index.js +92 -70
- package/lib/form/types.d.ts +7 -0
- package/lib/form/types.js +1 -0
- package/lib/index-Blf4-a2-.js +4 -0
- package/lib/index-CrMiSe0x.js +249 -0
- package/lib/index.js +162 -160
- package/lib/input/index.d.ts +24 -25
- package/lib/input/index.js +113 -99
- package/lib/modal/index.js +1 -1
- package/lib/select_ori/index.js +1 -1
- package/lib/utils/context_provide.d.ts +9 -0
- package/lib/utils/context_provide.js +22 -0
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/index.js +41 -33
- package/package.json +8 -8
- package/lib/check-D-KVLA1z.js +0 -4
- package/lib/index-DvcllHRh.js +0 -4
- package/lib/utils/event.d.ts +0 -30
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
function P({ update: e, notify: s, unwatched: d }) {
|
|
2
|
+
return {
|
|
3
|
+
link: h,
|
|
4
|
+
unlink: L,
|
|
5
|
+
propagate: O,
|
|
6
|
+
checkDirty: m,
|
|
7
|
+
shallowPropagate: S
|
|
8
|
+
};
|
|
9
|
+
function h(n, i, u) {
|
|
10
|
+
const f = i.depsTail;
|
|
11
|
+
if (f !== void 0 && f.dep === n)
|
|
12
|
+
return;
|
|
13
|
+
const t = f !== void 0 ? f.nextDep : i.deps;
|
|
14
|
+
if (t !== void 0 && t.dep === n) {
|
|
15
|
+
t.version = u, i.depsTail = t;
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
const l = n.subsTail;
|
|
19
|
+
if (l !== void 0 && l.version === u && l.sub === i)
|
|
20
|
+
return;
|
|
21
|
+
const a = i.depsTail = n.subsTail = {
|
|
22
|
+
version: u,
|
|
23
|
+
dep: n,
|
|
24
|
+
sub: i,
|
|
25
|
+
prevDep: f,
|
|
26
|
+
nextDep: t,
|
|
27
|
+
prevSub: l,
|
|
28
|
+
nextSub: void 0
|
|
29
|
+
};
|
|
30
|
+
t !== void 0 && (t.prevDep = a), f !== void 0 ? f.nextDep = a : i.deps = a, l !== void 0 ? l.nextSub = a : n.subs = a;
|
|
31
|
+
}
|
|
32
|
+
function L(n, i = n.sub) {
|
|
33
|
+
const u = n.dep, f = n.prevDep, t = n.nextDep, l = n.nextSub, a = n.prevSub;
|
|
34
|
+
return t !== void 0 ? t.prevDep = f : i.depsTail = f, f !== void 0 ? f.nextDep = t : i.deps = t, l !== void 0 ? l.prevSub = a : u.subsTail = a, a !== void 0 ? a.nextSub = l : (u.subs = l) === void 0 && d(u), t;
|
|
35
|
+
}
|
|
36
|
+
function O(n) {
|
|
37
|
+
let i = n.nextSub, u;
|
|
38
|
+
e: do {
|
|
39
|
+
const f = n.sub;
|
|
40
|
+
let t = f.flags;
|
|
41
|
+
if (t & 60 ? t & 12 ? t & 4 ? !(t & 48) && q(n, f) ? (f.flags = t | 40, t &= 1) : t = 0 : f.flags = t & -9 | 32 : t = 0 : f.flags = t | 32, t & 2 && s(f), t & 1) {
|
|
42
|
+
const l = f.subs;
|
|
43
|
+
if (l !== void 0) {
|
|
44
|
+
const a = (n = l).nextSub;
|
|
45
|
+
a !== void 0 && (u = { value: i, prev: u }, i = a);
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if ((n = i) !== void 0) {
|
|
50
|
+
i = n.nextSub;
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
for (; u !== void 0; )
|
|
54
|
+
if (n = u.value, u = u.prev, n !== void 0) {
|
|
55
|
+
i = n.nextSub;
|
|
56
|
+
continue e;
|
|
57
|
+
}
|
|
58
|
+
break;
|
|
59
|
+
} while (!0);
|
|
60
|
+
}
|
|
61
|
+
function m(n, i) {
|
|
62
|
+
let u, f = 0, t = !1;
|
|
63
|
+
e: do {
|
|
64
|
+
const l = n.dep, a = l.flags;
|
|
65
|
+
if (i.flags & 16)
|
|
66
|
+
t = !0;
|
|
67
|
+
else if ((a & 17) === 17) {
|
|
68
|
+
if (e(l)) {
|
|
69
|
+
const r = l.subs;
|
|
70
|
+
r.nextSub !== void 0 && S(r), t = !0;
|
|
71
|
+
}
|
|
72
|
+
} else if ((a & 33) === 33) {
|
|
73
|
+
(n.nextSub !== void 0 || n.prevSub !== void 0) && (u = { value: n, prev: u }), n = l.deps, i = l, ++f;
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
if (!t) {
|
|
77
|
+
const r = n.nextDep;
|
|
78
|
+
if (r !== void 0) {
|
|
79
|
+
n = r;
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
for (; f--; ) {
|
|
84
|
+
const r = i.subs, D = r.nextSub !== void 0;
|
|
85
|
+
if (D ? (n = u.value, u = u.prev) : n = r, t) {
|
|
86
|
+
if (e(i)) {
|
|
87
|
+
D && S(r), i = n.sub;
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
t = !1;
|
|
91
|
+
} else
|
|
92
|
+
i.flags &= -33;
|
|
93
|
+
i = n.sub;
|
|
94
|
+
const T = n.nextDep;
|
|
95
|
+
if (T !== void 0) {
|
|
96
|
+
n = T;
|
|
97
|
+
continue e;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return t;
|
|
101
|
+
} while (!0);
|
|
102
|
+
}
|
|
103
|
+
function S(n) {
|
|
104
|
+
do {
|
|
105
|
+
const i = n.sub, u = i.flags;
|
|
106
|
+
(u & 48) === 32 && (i.flags = u | 16, (u & 6) === 2 && s(i));
|
|
107
|
+
} while ((n = n.nextSub) !== void 0);
|
|
108
|
+
}
|
|
109
|
+
function q(n, i) {
|
|
110
|
+
let u = i.depsTail;
|
|
111
|
+
for (; u !== void 0; ) {
|
|
112
|
+
if (u === n)
|
|
113
|
+
return !0;
|
|
114
|
+
u = u.prevDep;
|
|
115
|
+
}
|
|
116
|
+
return !1;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
let x = 0, c = 0, b = 0, o;
|
|
120
|
+
const p = [], { link: w, unlink: y, propagate: A, checkDirty: C, shallowPropagate: M } = P({
|
|
121
|
+
update(e) {
|
|
122
|
+
return e.depsTail !== void 0 ? R(e) : V(e);
|
|
123
|
+
},
|
|
124
|
+
notify(e) {
|
|
125
|
+
let s = b, d = s;
|
|
126
|
+
do
|
|
127
|
+
if (p[s++] = e, e.flags &= -3, e = e.subs?.sub, e === void 0 || !(e.flags & 2))
|
|
128
|
+
break;
|
|
129
|
+
while (!0);
|
|
130
|
+
for (b = s; d < --s; ) {
|
|
131
|
+
const h = p[d];
|
|
132
|
+
p[d++] = p[s], p[s] = h;
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
unwatched(e) {
|
|
136
|
+
e.flags & 1 ? e.depsTail !== void 0 && (e.depsTail = void 0, e.flags = 17, g(e)) : I.call(e);
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
function v(e) {
|
|
140
|
+
const s = o;
|
|
141
|
+
return o = e, s;
|
|
142
|
+
}
|
|
143
|
+
function F(e) {
|
|
144
|
+
return B.bind({
|
|
145
|
+
currentValue: e,
|
|
146
|
+
pendingValue: e,
|
|
147
|
+
subs: void 0,
|
|
148
|
+
subsTail: void 0,
|
|
149
|
+
flags: 1
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
function G(e) {
|
|
153
|
+
const s = {
|
|
154
|
+
fn: e,
|
|
155
|
+
subs: void 0,
|
|
156
|
+
subsTail: void 0,
|
|
157
|
+
deps: void 0,
|
|
158
|
+
depsTail: void 0,
|
|
159
|
+
flags: 6
|
|
160
|
+
}, d = v(s);
|
|
161
|
+
d !== void 0 && w(s, d, 0);
|
|
162
|
+
try {
|
|
163
|
+
s.fn();
|
|
164
|
+
} finally {
|
|
165
|
+
o = d, s.flags &= -5;
|
|
166
|
+
}
|
|
167
|
+
return E.bind(s);
|
|
168
|
+
}
|
|
169
|
+
function R(e) {
|
|
170
|
+
++x, e.depsTail = void 0, e.flags = 5;
|
|
171
|
+
const s = v(e);
|
|
172
|
+
try {
|
|
173
|
+
const d = e.value;
|
|
174
|
+
return d !== (e.value = e.getter(d));
|
|
175
|
+
} finally {
|
|
176
|
+
o = s, e.flags &= -5, g(e);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
function V(e) {
|
|
180
|
+
return e.flags = 1, e.currentValue !== (e.currentValue = e.pendingValue);
|
|
181
|
+
}
|
|
182
|
+
function j(e) {
|
|
183
|
+
const s = e.flags;
|
|
184
|
+
if (s & 16 || s & 32 && C(e.deps, e)) {
|
|
185
|
+
++x, e.depsTail = void 0, e.flags = 6;
|
|
186
|
+
const d = v(e);
|
|
187
|
+
try {
|
|
188
|
+
e.fn();
|
|
189
|
+
} finally {
|
|
190
|
+
o = d, e.flags &= -5, g(e);
|
|
191
|
+
}
|
|
192
|
+
} else
|
|
193
|
+
e.flags = 2;
|
|
194
|
+
}
|
|
195
|
+
function z() {
|
|
196
|
+
try {
|
|
197
|
+
for (; c < b; ) {
|
|
198
|
+
const e = p[c];
|
|
199
|
+
p[c++] = void 0, j(e);
|
|
200
|
+
}
|
|
201
|
+
} finally {
|
|
202
|
+
for (; c < b; ) {
|
|
203
|
+
const e = p[c];
|
|
204
|
+
p[c++] = void 0, e.flags |= 10;
|
|
205
|
+
}
|
|
206
|
+
c = 0, b = 0;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
function B(...e) {
|
|
210
|
+
if (e.length) {
|
|
211
|
+
if (this.pendingValue !== (this.pendingValue = e[0])) {
|
|
212
|
+
this.flags = 17;
|
|
213
|
+
const s = this.subs;
|
|
214
|
+
s !== void 0 && (A(s), z());
|
|
215
|
+
}
|
|
216
|
+
} else {
|
|
217
|
+
if (this.flags & 16 && V(this)) {
|
|
218
|
+
const d = this.subs;
|
|
219
|
+
d !== void 0 && M(d);
|
|
220
|
+
}
|
|
221
|
+
let s = o;
|
|
222
|
+
for (; s !== void 0; ) {
|
|
223
|
+
if (s.flags & 3) {
|
|
224
|
+
w(this, s, x);
|
|
225
|
+
break;
|
|
226
|
+
}
|
|
227
|
+
s = s.subs?.sub;
|
|
228
|
+
}
|
|
229
|
+
return this.currentValue;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
function E() {
|
|
233
|
+
I.call(this);
|
|
234
|
+
}
|
|
235
|
+
function I() {
|
|
236
|
+
this.depsTail = void 0, this.flags = 0, g(this);
|
|
237
|
+
const e = this.subs;
|
|
238
|
+
e !== void 0 && y(e);
|
|
239
|
+
}
|
|
240
|
+
function g(e) {
|
|
241
|
+
const s = e.depsTail;
|
|
242
|
+
let d = s !== void 0 ? s.nextDep : e.deps;
|
|
243
|
+
for (; d !== void 0; )
|
|
244
|
+
d = y(d, e);
|
|
245
|
+
}
|
|
246
|
+
export {
|
|
247
|
+
G as e,
|
|
248
|
+
F as s
|
|
249
|
+
};
|
package/lib/index.js
CHANGED
|
@@ -1,165 +1,167 @@
|
|
|
1
|
-
import { initAttr as
|
|
2
|
-
import { set as
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
25
|
-
import { default as
|
|
26
|
-
import { default as
|
|
27
|
-
import { default as
|
|
28
|
-
import { default as
|
|
29
|
-
import { default as
|
|
30
|
-
import { default as
|
|
31
|
-
import { default as
|
|
32
|
-
import { default as
|
|
33
|
-
import { default as
|
|
34
|
-
import { default as
|
|
35
|
-
import { default as
|
|
36
|
-
import { default as
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as
|
|
39
|
-
import { default as
|
|
40
|
-
import { default as
|
|
41
|
-
import { default as
|
|
42
|
-
import { default as
|
|
43
|
-
import { default as
|
|
44
|
-
import { default as
|
|
45
|
-
import { default as
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
48
|
-
import { default as
|
|
49
|
-
import { default as
|
|
50
|
-
import { default as
|
|
51
|
-
import { default as
|
|
52
|
-
import { default as
|
|
53
|
-
import { default as
|
|
54
|
-
import { default as
|
|
55
|
-
import { default as
|
|
56
|
-
import { default as
|
|
57
|
-
import { default as
|
|
58
|
-
import { default as
|
|
59
|
-
import { default as
|
|
60
|
-
import { default as
|
|
61
|
-
import { default as
|
|
62
|
-
import { default as
|
|
63
|
-
import { default as
|
|
64
|
-
import { default as
|
|
65
|
-
import { default as
|
|
66
|
-
import { default as
|
|
67
|
-
import { default as
|
|
68
|
-
import { default as
|
|
69
|
-
import { default as
|
|
70
|
-
import { default as
|
|
71
|
-
import { default as
|
|
72
|
-
import { default as
|
|
73
|
-
import { Popover as
|
|
74
|
-
import { default as
|
|
75
|
-
import { default as
|
|
1
|
+
import { initAttr as t, kebabToCamel as r, parseAttrValue as a, regist as f, setAttrs as s, stopSignal as l, tagAttr as m, tagAttrs as u, unitNumberStr as p, useId as d } from "./utils/index.js";
|
|
2
|
+
import { set as n, remove as c } from "./utils/clickoutside.js";
|
|
3
|
+
import { default as i } from "./base.js";
|
|
4
|
+
import { default as C } from "./message/index.js";
|
|
5
|
+
import { default as h } from "./dialog/index.js";
|
|
6
|
+
import { default as S } from "./dialog/dialog_container.js";
|
|
7
|
+
import { default as w } from "./loading/index.js";
|
|
8
|
+
import { default as M } from "./tabs/index.js";
|
|
9
|
+
import { default as D } from "./modal/index.js";
|
|
10
|
+
import { default as v } from "./icon/base.js";
|
|
11
|
+
import { default as O } from "./icon/arrow_down.js";
|
|
12
|
+
import { default as F } from "./icon/arrow_left.js";
|
|
13
|
+
import { default as U } from "./icon/arrow_right.js";
|
|
14
|
+
import { default as y } from "./icon/arrow_up.js";
|
|
15
|
+
import { default as N } from "./icon/caret_top.js";
|
|
16
|
+
import { default as V } from "./icon/caret_bottom.js";
|
|
17
|
+
import { default as j } from "./icon/font_icon.js";
|
|
18
|
+
import { default as z } from "./icon/loading.js";
|
|
19
|
+
import { default as J } from "./icon/search.js";
|
|
20
|
+
import { default as X } from "./icon/sun.js";
|
|
21
|
+
import { default as _ } from "./icon/moon.js";
|
|
22
|
+
import { default as oo } from "./icon/reduction.js";
|
|
23
|
+
import { default as to } from "./icon/refresh_left.js";
|
|
24
|
+
import { default as ao } from "./icon/refresh_right.js";
|
|
25
|
+
import { default as so } from "./icon/sort.js";
|
|
26
|
+
import { default as mo } from "./icon/theme_default.js";
|
|
27
|
+
import { default as po } from "./icon/close.js";
|
|
28
|
+
import { default as no } from "./icon/info.js";
|
|
29
|
+
import { default as Io } from "./icon/success.js";
|
|
30
|
+
import { default as go } from "./icon/warn.js";
|
|
31
|
+
import { default as bo } from "./icon/close_filled.js";
|
|
32
|
+
import { default as Ao } from "./icon/more.js";
|
|
33
|
+
import { default as Po } from "./icon/d_arrow_left.js";
|
|
34
|
+
import { default as To } from "./icon/d_arrow_right.js";
|
|
35
|
+
import { default as ko } from "./icon/zoom_in.js";
|
|
36
|
+
import { default as Ro } from "./icon/zoom_out.js";
|
|
37
|
+
import { default as Lo } from "./icon/select.js";
|
|
38
|
+
import { default as Bo } from "./form/index.js";
|
|
39
|
+
import { default as Go } from "./form/form_item.js";
|
|
40
|
+
import { default as Zo } from "./check/radio_group.js";
|
|
41
|
+
import { default as Ho } from "./check/radio.js";
|
|
42
|
+
import { default as Qo } from "./check/checkbox.js";
|
|
43
|
+
import { default as Wo } from "./check/checkbox_group.js";
|
|
44
|
+
import { default as qo } from "./button/index.js";
|
|
45
|
+
import { default as Eo } from "./input/index.js";
|
|
46
|
+
import { default as Ko } from "./select_ori/index.js";
|
|
47
|
+
import { default as Yo } from "./switch/index.js";
|
|
48
|
+
import { default as $o } from "./md_input/index.js";
|
|
49
|
+
import { default as ee } from "./select/index.js";
|
|
50
|
+
import { default as re } from "./list/index.js";
|
|
51
|
+
import { default as fe } from "./polygon/index.js";
|
|
52
|
+
import { default as le } from "./color_picker/index.js";
|
|
53
|
+
import { default as ue } from "./tabbar/index.js";
|
|
54
|
+
import { default as de } from "./tabbar/item.js";
|
|
55
|
+
import { default as ne } from "./theme/index.js";
|
|
56
|
+
import { default as Ie } from "./theme/theme_color.js";
|
|
57
|
+
import { default as ge } from "./date_picker/index.js";
|
|
58
|
+
import { default as be } from "./menu/index.js";
|
|
59
|
+
import { default as Ae } from "./menu/menu_item.js";
|
|
60
|
+
import { default as Pe } from "./menu/sub_menu.js";
|
|
61
|
+
import { default as Te } from "./carousel/index.js";
|
|
62
|
+
import { default as ke } from "./carousel/item.js";
|
|
63
|
+
import { default as Re } from "./qrcode/index.js";
|
|
64
|
+
import { default as Le } from "./description_panel/index.js";
|
|
65
|
+
import { default as Be } from "./pagination/index.js";
|
|
66
|
+
import { default as Ge } from "./mask/index.js";
|
|
67
|
+
import { default as Ze } from "./page_header/index.js";
|
|
68
|
+
import { default as He } from "./tag/index.js";
|
|
69
|
+
import { default as Qe } from "./collapse/index.js";
|
|
70
|
+
import { default as We } from "./collapse/item.js";
|
|
71
|
+
import { default as qe } from "./image/index.js";
|
|
72
|
+
import { default as Ee } from "./image/image_preview.js";
|
|
73
|
+
import { Popover as Ke, autoUpdate as Xe, createPopoverObserver as Ye, getOverflowAncestors as _e, popconfirmProps as $e, updatePosition as ot } from "./utils/popover.js";
|
|
74
|
+
import { default as tt } from "./table/index.js";
|
|
75
|
+
import { default as at } from "./space/index.js";
|
|
76
76
|
export {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
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
|
-
|
|
77
|
+
O as ArrowDownIcon,
|
|
78
|
+
F as ArrowLeftIcon,
|
|
79
|
+
U as ArrowRightIcon,
|
|
80
|
+
y as ArrowUpIcon,
|
|
81
|
+
i as BaseComponent,
|
|
82
|
+
v as BaseIcon,
|
|
83
|
+
qo as Button,
|
|
84
|
+
V as CaretBottomIcon,
|
|
85
|
+
N as CaretTopIcon,
|
|
86
|
+
Te as Carousel,
|
|
87
|
+
ke as CarouselItem,
|
|
88
|
+
Qo as Checkbox,
|
|
89
|
+
Wo as CheckboxGroup,
|
|
90
|
+
bo as CloseFilledIcon,
|
|
91
|
+
po as CloseIcon,
|
|
92
|
+
Qe as Collapse,
|
|
93
|
+
We as CollapseItem,
|
|
94
|
+
le as ColorPicker,
|
|
95
|
+
Po as DArrowLeftIcon,
|
|
96
|
+
To as DArrowRightIcon,
|
|
97
|
+
ge as DatePicker,
|
|
98
|
+
Le as DescriptionPanel,
|
|
99
|
+
h as Dialog,
|
|
100
|
+
S as DialogContainer,
|
|
101
|
+
j as FontIcon,
|
|
102
|
+
Bo as Form,
|
|
103
|
+
Go as FormItem,
|
|
104
|
+
qe as Image,
|
|
105
|
+
Ee as ImagePreview,
|
|
106
|
+
no as InfoIcon,
|
|
107
|
+
Eo as Input,
|
|
108
|
+
re as List,
|
|
109
|
+
w as Loading,
|
|
110
|
+
z as LoadingIcon,
|
|
111
|
+
Ge as Mask,
|
|
112
|
+
$o as MdInput,
|
|
113
|
+
be as Menu,
|
|
114
|
+
Ae as MenuItem,
|
|
115
|
+
C as Message,
|
|
116
|
+
D as Modal,
|
|
117
|
+
_ as MoonIcon,
|
|
118
|
+
Ao as MoreIcon,
|
|
119
|
+
Ze as PageHeader,
|
|
120
|
+
Be as Pagination,
|
|
121
|
+
fe as Polygon,
|
|
122
|
+
Ke as Popover,
|
|
123
|
+
Re as Qrcode,
|
|
124
|
+
Ho as Radio,
|
|
125
|
+
Zo as RadioGroup,
|
|
126
|
+
oo as ReductionIcon,
|
|
127
|
+
to as RefreshLeftIcon,
|
|
128
|
+
ao as RefreshRightIcon,
|
|
129
|
+
J as SearchIcon,
|
|
130
|
+
ee as Select,
|
|
131
|
+
Lo as SelectIcon,
|
|
132
|
+
Ko as SelectOri,
|
|
133
|
+
so as SortIcon,
|
|
134
|
+
at as Space,
|
|
135
|
+
Pe as SubMenu,
|
|
136
|
+
Io as SuccessIcon,
|
|
137
|
+
X as SunIcon,
|
|
138
|
+
Yo as Switch,
|
|
139
|
+
ue as Tabbar,
|
|
140
|
+
de as TabbarItem,
|
|
141
|
+
tt as Table,
|
|
142
|
+
M as Tabs,
|
|
143
|
+
He as Tag,
|
|
144
|
+
ne as Theme,
|
|
145
|
+
Ie as ThemeColor,
|
|
146
|
+
mo as ThemeDefaultIcon,
|
|
147
|
+
go as WarnIcon,
|
|
148
|
+
ko as ZoomInIcon,
|
|
149
|
+
Ro as ZoomOutIcon,
|
|
150
|
+
n as addClickOutside,
|
|
151
|
+
Xe as autoUpdate,
|
|
152
|
+
Ye as createPopoverObserver,
|
|
153
|
+
_e as getOverflowAncestors,
|
|
154
|
+
t as initAttr,
|
|
155
|
+
r as kebabToCamel,
|
|
156
156
|
a as parseAttrValue,
|
|
157
|
-
|
|
157
|
+
$e as popconfirmProps,
|
|
158
158
|
f as regist,
|
|
159
|
-
|
|
159
|
+
c as removeClickOutside,
|
|
160
160
|
s as setAttrs,
|
|
161
|
-
l as
|
|
162
|
-
m as
|
|
163
|
-
|
|
164
|
-
p as
|
|
161
|
+
l as stopSignal,
|
|
162
|
+
m as tagAttr,
|
|
163
|
+
u as tagAttrs,
|
|
164
|
+
p as unitNumberStr,
|
|
165
|
+
ot as updatePosition,
|
|
166
|
+
d as useId
|
|
165
167
|
};
|
package/lib/input/index.d.ts
CHANGED
|
@@ -1,58 +1,57 @@
|
|
|
1
1
|
import FormInner from "../form/form_inner";
|
|
2
|
-
|
|
2
|
+
interface InputState {
|
|
3
|
+
/** 原生 input 的类型,默认为 "text" */
|
|
4
|
+
type: string;
|
|
5
|
+
/** 输入框占位符 */
|
|
6
|
+
placeholder: string;
|
|
7
|
+
/** 是否自动调整大小 */
|
|
8
|
+
autosize: boolean;
|
|
9
|
+
/** 限制输入类型, number, integer */
|
|
10
|
+
allowInput: string | undefined;
|
|
11
|
+
clearable: boolean;
|
|
12
|
+
error?: string;
|
|
13
|
+
maxlength?: string;
|
|
14
|
+
minlength?: string;
|
|
15
|
+
inputmode?: string;
|
|
16
|
+
block: boolean;
|
|
17
|
+
width?: string;
|
|
18
|
+
}
|
|
3
19
|
/**
|
|
4
20
|
* 输入组件,提供基本的输入功能,并支持自定义输入解析器和表单联动。
|
|
5
21
|
*
|
|
6
|
-
* @property {string} type - 原生 input 的类型,默认为 "text"。
|
|
7
|
-
* @property {string | undefined} placeholder - 输入框占位符。
|
|
8
|
-
* @property {boolean} autosize - 是否自动调整大小。
|
|
9
|
-
* @property {boolean} disabled - 是否禁用输入框。
|
|
10
|
-
* @property {string | undefined} allowInput - 限制输入类型,如 "number", "integer"。
|
|
11
22
|
* @property {(value: string) => string | undefined} parser - 自定义输入解析器。
|
|
12
23
|
*
|
|
13
24
|
* @method setParser - 设置自定义输入解析器。
|
|
14
25
|
* @method focus - 输入框获取焦点
|
|
15
26
|
*/
|
|
16
|
-
export default class Input extends FormInner {
|
|
27
|
+
export default class Input extends FormInner<InputState> {
|
|
17
28
|
#private;
|
|
18
29
|
static baseName: string;
|
|
19
|
-
/** 原生 input 的 type */
|
|
20
|
-
type: string;
|
|
21
|
-
placeholder: string | undefined;
|
|
22
|
-
autosize: boolean;
|
|
23
|
-
/** 限制输入类型, number, integer */
|
|
24
|
-
allowInput: string | undefined;
|
|
25
30
|
/** 自定义输入解析器 */
|
|
26
31
|
parser?: (value: string) => string;
|
|
27
|
-
/** 宽度 */
|
|
28
|
-
width?: string;
|
|
29
|
-
/** 宽度铺满 */
|
|
30
|
-
block: boolean;
|
|
31
|
-
error: boolean;
|
|
32
|
-
maxlength?: string;
|
|
33
|
-
minlength?: string;
|
|
34
|
-
inputmode: InputMode;
|
|
35
32
|
$inner?: HTMLInputElement;
|
|
33
|
+
constructor();
|
|
36
34
|
set value(value: any);
|
|
37
35
|
get value(): any;
|
|
38
|
-
get clearable(): boolean;
|
|
39
|
-
set clearable(value: boolean);
|
|
40
36
|
static get observedAttributes(): string[];
|
|
41
37
|
connectedCallback(): void;
|
|
42
38
|
disconnectedCallback(): void;
|
|
43
39
|
protected attributeChange(name: string, oldValue: string, newValue: string): void;
|
|
40
|
+
protected updateDOM(changedProps: Set<string>): void;
|
|
41
|
+
_updateAttr(key: string, value: any): void;
|
|
44
42
|
render(): DocumentFragment;
|
|
45
43
|
/**
|
|
46
44
|
* 设置自定义的输入解析器
|
|
47
45
|
* @param cb
|
|
48
46
|
*/
|
|
49
47
|
setParser(cb: (value: string) => string): void;
|
|
48
|
+
_calcCurosorPosition(target: HTMLInputElement, newValue: string): void;
|
|
50
49
|
_input: (e: Event) => void;
|
|
51
50
|
disabledChange(): void;
|
|
52
51
|
private _numberInputParse;
|
|
52
|
+
protected innerBlockChange(innerBlock: boolean): void;
|
|
53
53
|
private _getStyleObj;
|
|
54
|
-
private _isBlock;
|
|
55
54
|
private _updateError;
|
|
56
|
-
|
|
55
|
+
protected validResult(msg?: string): void;
|
|
57
56
|
}
|
|
58
57
|
export {};
|