litos-ui 0.16.1 → 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.
Files changed (44) hide show
  1. package/lib/base.d.ts +11 -2
  2. package/lib/base.js +59 -27
  3. package/lib/button/index.d.ts +18 -3
  4. package/lib/button/index.js +65 -68
  5. package/lib/check/check.d.ts +14 -5
  6. package/lib/check/check.js +67 -29
  7. package/lib/check/checkbox.js +5 -12
  8. package/lib/check/checkbox_group.d.ts +0 -5
  9. package/lib/check/checkbox_group.js +3 -29
  10. package/lib/check/index.d.ts +14 -4
  11. package/lib/check/index.js +48 -28
  12. package/lib/check/radio.js +6 -14
  13. package/lib/check/radio_group.d.ts +1 -2
  14. package/lib/check/radio_group.js +5 -19
  15. package/lib/check-CksURvTv.js +4 -0
  16. package/lib/color_picker/index.js +1 -1
  17. package/lib/form/form_inner.d.ts +17 -10
  18. package/lib/form/form_inner.js +83 -80
  19. package/lib/form/form_item.d.ts +23 -23
  20. package/lib/form/form_item.js +107 -90
  21. package/lib/form/index.d.ts +21 -14
  22. package/lib/form/index.js +92 -70
  23. package/lib/form/types.d.ts +7 -0
  24. package/lib/form/types.js +1 -0
  25. package/lib/index-Blf4-a2-.js +4 -0
  26. package/lib/index-CrMiSe0x.js +249 -0
  27. package/lib/index.js +162 -160
  28. package/lib/input/index.d.ts +24 -25
  29. package/lib/input/index.js +99 -89
  30. package/lib/loading/index.d.ts +2 -0
  31. package/lib/loading/index.js +50 -64
  32. package/lib/message/index.js +9 -9
  33. package/lib/modal/index.d.ts +1 -6
  34. package/lib/modal/index.js +40 -46
  35. package/lib/select_ori/index.js +1 -1
  36. package/lib/utils/context_provide.d.ts +9 -0
  37. package/lib/utils/context_provide.js +22 -0
  38. package/lib/utils/index.d.ts +2 -0
  39. package/lib/utils/index.js +41 -33
  40. package/package.json +8 -8
  41. package/styles/loading.css +5 -3
  42. package/lib/check-C7YSuH60.js +0 -4
  43. package/lib/index-DvcllHRh.js +0 -4
  44. 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 r, kebabToCamel as t, parseAttrValue as a, regist as f, setAttrs as s, tagAttr as l, tagAttrs as m, useId as p } from "./utils/index.js";
2
- import { set as d, remove as x } from "./utils/clickoutside.js";
3
- import { default as c } from "./base.js";
4
- import { default as i } from "./message/index.js";
5
- import { default as C } from "./dialog/index.js";
6
- import { default as h } from "./dialog/dialog_container.js";
7
- import { default as P } from "./loading/index.js";
8
- import { default as S } from "./tabs/index.js";
9
- import { default as M } from "./modal/index.js";
10
- import { default as D } from "./icon/base.js";
11
- import { default as v } from "./icon/arrow_down.js";
12
- import { default as O } from "./icon/arrow_left.js";
13
- import { default as F } from "./icon/arrow_right.js";
14
- import { default as U } from "./icon/arrow_up.js";
15
- import { default as y } from "./icon/caret_top.js";
16
- import { default as Q } from "./icon/caret_bottom.js";
17
- import { default as W } from "./icon/font_icon.js";
18
- import { default as q } from "./icon/loading.js";
19
- import { default as E } from "./icon/search.js";
20
- import { default as K } from "./icon/sun.js";
21
- import { default as X } from "./icon/moon.js";
22
- import { default as _ } from "./icon/reduction.js";
23
- import { default as oo } from "./icon/refresh_left.js";
24
- import { default as ro } from "./icon/refresh_right.js";
25
- import { default as ao } from "./icon/sort.js";
26
- import { default as so } from "./icon/theme_default.js";
27
- import { default as mo } from "./icon/close.js";
28
- import { default as uo } from "./icon/info.js";
29
- import { default as no } from "./icon/success.js";
30
- import { default as Io } from "./icon/warn.js";
31
- import { default as go } from "./icon/close_filled.js";
32
- import { default as bo } from "./icon/more.js";
33
- import { default as Ao } from "./icon/d_arrow_left.js";
34
- import { default as wo } from "./icon/d_arrow_right.js";
35
- import { default as To } from "./icon/zoom_in.js";
36
- import { default as ko } from "./icon/zoom_out.js";
37
- import { default as Ro } from "./icon/select.js";
38
- import { default as Lo } from "./form/index.js";
39
- import { default as Bo } from "./form/form_item.js";
40
- import { default as Go } from "./check/radio_group.js";
41
- import { default as Zo } from "./check/radio.js";
42
- import { default as Ho } from "./check/checkbox.js";
43
- import { default as Vo } from "./check/checkbox_group.js";
44
- import { default as jo } from "./button/index.js";
45
- import { default as zo } from "./input/index.js";
46
- import { default as Jo } from "./select_ori/index.js";
47
- import { default as No } from "./switch/index.js";
48
- import { default as Yo } from "./md_input/index.js";
49
- import { default as $o } from "./select/index.js";
50
- import { default as ee } from "./list/index.js";
51
- import { default as te } from "./polygon/index.js";
52
- import { default as fe } from "./color_picker/index.js";
53
- import { default as le } from "./tabbar/index.js";
54
- import { default as pe } from "./tabbar/item.js";
55
- import { default as de } from "./theme/index.js";
56
- import { default as ne } from "./theme/theme_color.js";
57
- import { default as Ie } from "./date_picker/index.js";
58
- import { default as ge } from "./menu/index.js";
59
- import { default as be } from "./menu/menu_item.js";
60
- import { default as Ae } from "./menu/sub_menu.js";
61
- import { default as we } from "./carousel/index.js";
62
- import { default as Te } from "./carousel/item.js";
63
- import { default as ke } from "./qrcode/index.js";
64
- import { default as Re } from "./description_panel/index.js";
65
- import { default as Le } from "./pagination/index.js";
66
- import { default as Be } from "./mask/index.js";
67
- import { default as Ge } from "./page_header/index.js";
68
- import { default as Ze } from "./tag/index.js";
69
- import { default as He } from "./collapse/index.js";
70
- import { default as Ve } from "./collapse/item.js";
71
- import { default as je } from "./image/index.js";
72
- import { default as ze } from "./image/image_preview.js";
73
- import { Popover as Je, autoUpdate as Ke, createPopoverObserver as Ne, getOverflowAncestors as Xe, popconfirmProps as Ye, updatePosition as _e } from "./utils/popover.js";
74
- import { default as or } from "./table/index.js";
75
- import { default as rr } from "./space/index.js";
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
- v as ArrowDownIcon,
78
- O as ArrowLeftIcon,
79
- F as ArrowRightIcon,
80
- U as ArrowUpIcon,
81
- c as BaseComponent,
82
- D as BaseIcon,
83
- jo as Button,
84
- Q as CaretBottomIcon,
85
- y as CaretTopIcon,
86
- we as Carousel,
87
- Te as CarouselItem,
88
- Ho as Checkbox,
89
- Vo as CheckboxGroup,
90
- go as CloseFilledIcon,
91
- mo as CloseIcon,
92
- He as Collapse,
93
- Ve as CollapseItem,
94
- fe as ColorPicker,
95
- Ao as DArrowLeftIcon,
96
- wo as DArrowRightIcon,
97
- Ie as DatePicker,
98
- Re as DescriptionPanel,
99
- C as Dialog,
100
- h as DialogContainer,
101
- W as FontIcon,
102
- Lo as Form,
103
- Bo as FormItem,
104
- je as Image,
105
- ze as ImagePreview,
106
- uo as InfoIcon,
107
- zo as Input,
108
- ee as List,
109
- P as Loading,
110
- q as LoadingIcon,
111
- Be as Mask,
112
- Yo as MdInput,
113
- ge as Menu,
114
- be as MenuItem,
115
- i as Message,
116
- M as Modal,
117
- X as MoonIcon,
118
- bo as MoreIcon,
119
- Ge as PageHeader,
120
- Le as Pagination,
121
- te as Polygon,
122
- Je as Popover,
123
- ke as Qrcode,
124
- Zo as Radio,
125
- Go as RadioGroup,
126
- _ as ReductionIcon,
127
- oo as RefreshLeftIcon,
128
- ro as RefreshRightIcon,
129
- E as SearchIcon,
130
- $o as Select,
131
- Ro as SelectIcon,
132
- Jo as SelectOri,
133
- ao as SortIcon,
134
- rr as Space,
135
- Ae as SubMenu,
136
- no as SuccessIcon,
137
- K as SunIcon,
138
- No as Switch,
139
- le as Tabbar,
140
- pe as TabbarItem,
141
- or as Table,
142
- S as Tabs,
143
- Ze as Tag,
144
- de as Theme,
145
- ne as ThemeColor,
146
- so as ThemeDefaultIcon,
147
- Io as WarnIcon,
148
- To as ZoomInIcon,
149
- ko as ZoomOutIcon,
150
- d as addClickOutside,
151
- Ke as autoUpdate,
152
- Ne as createPopoverObserver,
153
- Xe as getOverflowAncestors,
154
- r as initAttr,
155
- t as kebabToCamel,
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
- Ye as popconfirmProps,
157
+ $e as popconfirmProps,
158
158
  f as regist,
159
- x as removeClickOutside,
159
+ c as removeClickOutside,
160
160
  s as setAttrs,
161
- l as tagAttr,
162
- m as tagAttrs,
163
- _e as updatePosition,
164
- p as useId
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
  };
@@ -1,58 +1,57 @@
1
1
  import FormInner from "../form/form_inner";
2
- type InputMode = "text" | "decimal" | "numeric" | "tel" | "search" | "email" | "url" | "none";
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
- private _validateChange;
55
+ protected validResult(msg?: string): void;
57
56
  }
58
57
  export {};