litos-ui 0.11.1 → 0.12.1

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 (50) hide show
  1. package/README.md +48 -0
  2. package/lib/base.d.ts +11 -2
  3. package/lib/base.js +18 -7
  4. package/lib/button/index.d.ts +3 -2
  5. package/lib/button/index.js +18 -19
  6. package/lib/date_picker/index.d.ts +22 -0
  7. package/lib/date_picker/index.js +99 -0
  8. package/lib/dialog/dialog_container.js +1 -1
  9. package/lib/form/form_inner.d.ts +7 -2
  10. package/lib/form/form_inner.js +26 -20
  11. package/lib/form/form_item.d.ts +0 -2
  12. package/lib/form/form_item.js +5 -9
  13. package/lib/form/index.d.ts +0 -2
  14. package/lib/form/index.js +23 -25
  15. package/lib/icon/base.d.ts +0 -1
  16. package/lib/icon/base.js +15 -17
  17. package/lib/index.d.ts +10 -0
  18. package/lib/index.js +92 -82
  19. package/lib/input/index.d.ts +1 -3
  20. package/lib/input/index.js +4 -8
  21. package/lib/loading/index.d.ts +9 -4
  22. package/lib/loading/index.js +70 -64
  23. package/lib/menu/base.js +1 -0
  24. package/lib/menu/index.d.ts +29 -0
  25. package/lib/menu/index.js +90 -0
  26. package/lib/menu/menu_item.d.ts +6 -0
  27. package/lib/menu/menu_item.js +21 -0
  28. package/lib/menu/sub_menu.d.ts +13 -0
  29. package/lib/menu/sub_menu.js +64 -0
  30. package/lib/modal/index.d.ts +40 -0
  31. package/lib/modal/index.js +153 -0
  32. package/lib/modal/modal_box.js +95 -0
  33. package/lib/popover/index.d.ts +1 -4
  34. package/lib/popover/index.js +6 -12
  35. package/lib/radio/index.js +2 -2
  36. package/lib/select_ori/index.d.ts +0 -2
  37. package/lib/select_ori/index.js +11 -15
  38. package/lib/switch/index.d.ts +0 -1
  39. package/lib/switch/index.js +8 -13
  40. package/lib/tabbar/index.d.ts +0 -1
  41. package/lib/tabbar/index.js +55 -63
  42. package/lib/theme/index.d.ts +1 -2
  43. package/lib/theme/index.js +9 -12
  44. package/lib/utils/index.js +29 -29
  45. package/lib/utils/transition.js +3 -2
  46. package/package.json +12 -13
  47. package/styles/loading.css +58 -14
  48. package/styles/message.css +1 -1
  49. package/styles/modal_box.css +7 -0
  50. package/styles/vars.css +1 -0
package/lib/form/index.js CHANGED
@@ -1,45 +1,43 @@
1
- import { $one as n, formatClass as o, formatStyle as f } from "ph-utils/dom";
1
+ import { $one as h, formatClass as o, formatStyle as f } from "ph-utils/dom";
2
2
  import m from "../base.js";
3
- import { initAttr as c, parseAttrValue as u } from "../utils/index.js";
3
+ import { parseAttrValue as c, initAttr as u } from "../utils/index.js";
4
4
  import { random as d } from "ph-utils";
5
- import { emit as l, add as h, clear as v } from "../utils/event.js";
6
- import p from "ph-utils/validator";
7
- const b = ":host{display:block}.l-form{display:grid;grid-template-columns:var(--l-form-label-width, auto) 1fr;row-gap:20px}.l-form-inline{display:flex;gap:20px;flex-flow:row wrap}.l-form.l-form-inline{--l-form-item-display: flex}.l-form.l-form--left{--l-form-label-align: left}.l-form.l-form--top{--l-form-item-display: grid;--l-form-label-align: left;--l-form-label-empty-display: none;grid-template-columns:1fr}";
5
+ import { emit as l, add as n, clear as v } from "../utils/event.js";
6
+ import b from "ph-utils/validator";
7
+ const p = ":host{display:block}.l-form{display:grid;grid-template-columns:var(--l-form-label-width, auto) 1fr;row-gap:20px}.l-form-inline{display:flex;gap:20px;flex-flow:row wrap}.l-form.l-form-inline{--l-form-item-display: flex}.l-form.l-form--left{--l-form-label-align: left}.l-form.l-form--top{--l-form-item-display: grid;--l-form-label-align: left;--l-form-label-empty-display: none;grid-template-columns:1fr}";
8
8
  class $ extends m {
9
9
  static baseName = "form";
10
10
  /** 是否行内表单 */
11
11
  inline = !1;
12
12
  labelPosition = "right";
13
13
  labelWidth;
14
- id;
15
14
  disabled = !1;
16
15
  sharedAttrs = ["disabled", "id", "innerBlock"];
17
16
  validator;
18
17
  innerBlock = !1;
19
18
  novalidate = !1;
20
19
  _data;
21
- emit;
22
20
  constructor() {
23
- super(), c(this), this.id == null && (this.id = `l-f${d(3)}-${d(6)}`), this.validator = new p([]), this.emit = new CustomEvent("submit");
21
+ super(), this.validator = new b([]);
24
22
  }
25
23
  static get observedAttributes() {
26
24
  return ["disabled", "label-position"];
27
25
  }
28
- attributeChangedCallback(t, e, a) {
26
+ attributeChangedCallback(t, e, i) {
29
27
  if (t === "disabled") {
30
- const i = u(a, !1, t);
31
- i !== this.disabled && (l(this.id, "attributeChanged", t, i, this.id), this.disabled = i);
28
+ const a = c(i, !1, t);
29
+ a !== this.disabled && (l(this.id, "attributeChanged", t, a, this.id), this.disabled = a);
32
30
  } else if (t === "label-position") {
33
- const i = n("form", this.root);
34
- i && (i.className = o([
31
+ const a = h("form", this.root);
32
+ a && (a.className = o([
35
33
  "l-form",
36
34
  this.inline ? "l-form-inline" : void 0,
37
- `l-form--${a}`
35
+ `l-form--${i}`
38
36
  ]));
39
37
  }
40
38
  }
41
39
  connectedCallback() {
42
- this.loadStyleText([b]), super.connectedCallback(), h(this.id, "ruleChange", this.ruleChange), h(this.id, "valueChange", this._valueChange);
40
+ u(this), this.id == null && (this.id = `l-f${d(3)}-${d(6)}`), this.loadStyleText([p]), super.connectedCallback(), n(this.id, "ruleChange", this.ruleChange), n(this.id, "valueChange", this._valueChange);
43
41
  }
44
42
  disconnectedCallback() {
45
43
  v(this.id), this.validator = void 0;
@@ -57,10 +55,10 @@ class $ extends m {
57
55
  ruleChange = (t) => {
58
56
  this.validator.addSchema(t);
59
57
  };
60
- _valueChange = (t, e, a = !0) => {
58
+ _valueChange = (t, e, i = !0) => {
61
59
  this._data == null && (this._data = {});
62
- const i = Object.hasOwn(this._data, t);
63
- this._data[t] = e, !this.novalidate && i && a && this.validator.validateKey(t, e, this._data).then(() => {
60
+ const a = Object.hasOwn(this._data, t);
61
+ this._data[t] = e, !this.novalidate && a && i && this.validator.validateKey(t, e, this._data).then(() => {
64
62
  l(this.id, "validateChange", !0, t);
65
63
  }).catch((s) => {
66
64
  l(this.id, "validateChange", s.detail, t);
@@ -70,17 +68,17 @@ class $ extends m {
70
68
  const e = [];
71
69
  if (this._data != null) {
72
70
  if (Array.isArray(t))
73
- for (let a = 0, i = t.length; a < i; a++) {
74
- const s = t[a];
71
+ for (let i = 0, a = t.length; i < a; i++) {
72
+ const s = t[i];
75
73
  e.push(this.validator.validateKey(s, this._data[s], this._data));
76
74
  }
77
75
  else
78
76
  e.push(
79
77
  this.validator.validateKey(t, this._data[t], this._data)
80
78
  );
81
- Promise.allSettled(e).then((a) => {
82
- for (let i = 0, s = a.length; i < s; i++) {
83
- const r = a[i];
79
+ Promise.allSettled(e).then((i) => {
80
+ for (let a = 0, s = i.length; a < s; a++) {
81
+ const r = i[a];
84
82
  r.status === "rejected" ? l(
85
83
  this.id,
86
84
  "validateChange",
@@ -98,8 +96,8 @@ class $ extends m {
98
96
  this.clearValidate(), l(this.id, "reset");
99
97
  }
100
98
  submit() {
101
- this.novalidate ? this.dispatchEvent(this.emit) : this.validate().then((t) => {
102
- t && this.dispatchEvent(this.emit);
99
+ this.novalidate ? this.dispatchEvent(new CustomEvent("submit")) : this.validate().then((t) => {
100
+ t && this.dispatchEvent(new CustomEvent("submit"));
103
101
  });
104
102
  }
105
103
  /**
@@ -3,7 +3,6 @@ export default class BaseIcon extends BaseComponent {
3
3
  static baseName: string;
4
4
  useLink: boolean;
5
5
  viewBox: string;
6
- constructor();
7
6
  connectedCallback(): void;
8
7
  render(): void;
9
8
  renderChildren(): string;
package/lib/icon/base.js CHANGED
@@ -1,27 +1,25 @@
1
- import d from "../base.js";
2
- const h = ":host{display:inline-flex}.l-icon{width:1em;height:1em;fill:currentColor;vertical-align:middle;display:inline-block}";
3
- class p extends d {
1
+ import o from "../base.js";
2
+ import { initAttr as c } from "../utils/index.js";
3
+ const d = ":host{display:inline-flex}.l-icon{width:1em;height:1em;fill:currentColor;vertical-align:middle;display:inline-block}";
4
+ class f extends o {
4
5
  static baseName = "base-icon";
5
- useLink;
6
- viewBox;
7
- constructor() {
8
- super(), this.useLink = !1, this.viewBox = "0 0 1024 1024";
9
- }
6
+ useLink = !1;
7
+ viewBox = "0 0 1024 1024";
10
8
  connectedCallback() {
11
- this.loadStyleText([h]), this.render(), this.rendered = !0;
9
+ c(this), this.loadStyleText([d]), this.render(), this.rendered = !0;
12
10
  }
13
11
  render() {
14
- const e = this.createEl("svg"), r = this.getAttr("useLink", this.useLink), l = this.getAttr("viewBox", this.viewBox);
15
- e.classList.add("l-icon"), r || e.setAttribute("viewBox", l);
12
+ const e = this.createEl("svg");
13
+ e.classList.add("l-icon"), this.useLink || e.setAttribute("viewBox", this.viewBox);
16
14
  const t = this.renderChildren();
17
15
  if (typeof t == "string")
18
16
  if (t === "") {
19
- const s = this.children, n = [];
20
- for (let i = 0, o = s.length; i < o; i++) {
21
- const c = s[i];
22
- n.push(c.outerHTML);
17
+ const n = this.children, s = [];
18
+ for (let i = 0, r = n.length; i < r; i++) {
19
+ const l = n[i];
20
+ s.push(l.outerHTML);
23
21
  }
24
- e.innerHTML = n.join("");
22
+ e.innerHTML = s.join("");
25
23
  } else
26
24
  e.innerHTML = t;
27
25
  else
@@ -36,5 +34,5 @@ class p extends d {
36
34
  }
37
35
  }
38
36
  export {
39
- p as default
37
+ f as default
40
38
  };
package/lib/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export { default as Popconfirm } from "./popconfirm";
7
7
  export { default as Dialog } from "./dialog";
8
8
  export { default as DialogContainer } from "./dialog/dialog_container";
9
9
  export { default as Loading } from "./loading";
10
+ export { default as Modal } from "./modal";
10
11
  export { default as BaseIcon } from "./icon/base";
11
12
  export { default as ArrowDownIcon } from "./icon/arrow_down";
12
13
  export { default as ArrowLeftIcon } from "./icon/arrow_left";
@@ -43,6 +44,10 @@ export { default as ColorPicker } from "./color_picker";
43
44
  export { default as Tabbar } from "./tabbar";
44
45
  export { default as Theme } from "./theme";
45
46
  export { default as ThemeColor } from "./theme/theme_color";
47
+ export { default as DatePicker } from "./date_picker";
48
+ export { default as Menu } from "./menu";
49
+ export { default as MenuItem } from "./menu/menu_item";
50
+ export { default as SubMenu } from "./menu/sub_menu";
46
51
 
47
52
  declare global {
48
53
  interface HTMLElementTagNameMap {
@@ -52,6 +57,7 @@ declare global {
52
57
  "l-dialog": import("./dialog").default
53
58
  "l-dialog-container": import("./dialog/dialog_container").default
54
59
  "l-loading": import("./loading").default
60
+ "l-modal": import("./modal").default
55
61
  "l-base-icon": import("./icon/base").default
56
62
  "l-arrow-down-icon": import("./icon/arrow_down").default
57
63
  "l-arrow-left-icon": import("./icon/arrow_left").default
@@ -88,5 +94,9 @@ declare global {
88
94
  "l-tabbar": import("./tabbar").default
89
95
  "l-theme": import("./theme").default
90
96
  "l-theme-color": import("./theme/theme_color").default
97
+ "l-date-picker": import("./date_picker").default
98
+ "l-menu": import("./menu").default
99
+ "l-menu-item": import("./menu/menu_item").default
100
+ "l-sub-menu": import("./menu/sub_menu").default
91
101
  }
92
102
  }
package/lib/index.js CHANGED
@@ -1,92 +1,102 @@
1
- import { createTransition as t, getPopoverOffsetX as r, getPopoverOffsetY as a, impactDetect as f, initAttr as s, parseAttrValue as m, regist as p, setAttrs as l, tagAttr as u, tagAttrs as d, useId as x } from "./utils/index.js";
1
+ import { createTransition as t, getPopoverOffsetX as r, getPopoverOffsetY as a, impactDetect as f, initAttr as s, parseAttrValue as m, regist as u, setAttrs as p, tagAttr as l, tagAttrs as d, useId as x } from "./utils/index.js";
2
2
  import { set as c, remove as I } from "./utils/clickoutside.js";
3
3
  import { default as g } from "./base.js";
4
4
  import { default as C } from "./message/index.js";
5
- import { default as w } from "./popover/index.js";
6
- import { default as R } from "./popconfirm/index.js";
7
- import { default as T } from "./dialog/index.js";
8
- import { default as D } from "./dialog/dialog_container.js";
9
- import { default as O } from "./loading/index.js";
5
+ import { default as M } from "./popover/index.js";
6
+ import { default as S } from "./popconfirm/index.js";
7
+ import { default as D } from "./dialog/index.js";
8
+ import { default as T } from "./dialog/dialog_container.js";
9
+ import { default as v } from "./loading/index.js";
10
+ import { default as O } from "./modal/index.js";
10
11
  import { default as B } from "./icon/base.js";
11
- import { default as F } from "./icon/arrow_down.js";
12
- import { default as y } from "./icon/arrow_left.js";
13
- import { default as V } from "./icon/arrow_right.js";
14
- import { default as X } from "./icon/arrow_up.js";
15
- import { default as j } from "./icon/caret_top.js";
16
- import { default as z } from "./icon/caret_bottom.js";
17
- import { default as G } from "./icon/font_icon.js";
18
- import { default as J } from "./icon/loading.js";
19
- import { default as N } from "./icon/search.js";
20
- import { default as Z } from "./icon/sun.js";
21
- import { default as $ } from "./icon/moon.js";
22
- import { default as eo } from "./icon/reduction.js";
23
- import { default as ro } from "./icon/refresh_left.js";
24
- import { default as fo } from "./icon/refresh_right.js";
25
- import { default as mo } from "./icon/sort.js";
26
- import { default as lo } from "./icon/theme_default.js";
27
- import { default as xo } from "./icon/close.js";
28
- import { default as co } from "./icon/info.js";
29
- import { default as io } from "./icon/success.js";
30
- import { default as ho } from "./icon/warn.js";
31
- import { default as Ao } from "./form/index.js";
32
- import { default as Po } from "./form/form_item.js";
33
- import { default as So } from "./radio/index.js";
34
- import { default as vo } from "./checkbox/index.js";
12
+ import { default as y } from "./icon/arrow_down.js";
13
+ import { default as V } from "./icon/arrow_left.js";
14
+ import { default as X } from "./icon/arrow_right.js";
15
+ import { default as j } from "./icon/arrow_up.js";
16
+ import { default as z } from "./icon/caret_top.js";
17
+ import { default as G } from "./icon/caret_bottom.js";
18
+ import { default as J } from "./icon/font_icon.js";
19
+ import { default as N } from "./icon/loading.js";
20
+ import { default as Z } from "./icon/search.js";
21
+ import { default as $ } from "./icon/sun.js";
22
+ import { default as eo } from "./icon/moon.js";
23
+ import { default as ro } from "./icon/reduction.js";
24
+ import { default as fo } from "./icon/refresh_left.js";
25
+ import { default as mo } from "./icon/refresh_right.js";
26
+ import { default as po } from "./icon/sort.js";
27
+ import { default as xo } from "./icon/theme_default.js";
28
+ import { default as co } from "./icon/close.js";
29
+ import { default as io } from "./icon/info.js";
30
+ import { default as ho } from "./icon/success.js";
31
+ import { default as Ao } from "./icon/warn.js";
32
+ import { default as Po } from "./form/index.js";
33
+ import { default as wo } from "./form/form_item.js";
34
+ import { default as Ro } from "./radio/index.js";
35
+ import { default as ko } from "./checkbox/index.js";
35
36
  import { default as Lo } from "./button/index.js";
36
- import { default as ko } from "./input/index.js";
37
- import { default as bo } from "./select_ori/index.js";
38
- import { default as Mo } from "./switch/index.js";
39
- import { default as Uo } from "./md_input/index.js";
40
- import { default as Wo } from "./list/index.js";
41
- import { default as Yo } from "./polygon/index.js";
42
- import { default as qo } from "./color_picker/index.js";
43
- import { default as Eo } from "./tabbar/index.js";
44
- import { default as Ho } from "./theme/index.js";
45
- import { default as Ko } from "./theme/theme_color.js";
37
+ import { default as bo } from "./input/index.js";
38
+ import { default as Fo } from "./select_ori/index.js";
39
+ import { default as Uo } from "./switch/index.js";
40
+ import { default as Wo } from "./md_input/index.js";
41
+ import { default as Yo } from "./list/index.js";
42
+ import { default as qo } from "./polygon/index.js";
43
+ import { default as Eo } from "./color_picker/index.js";
44
+ import { default as Ho } from "./tabbar/index.js";
45
+ import { default as Ko } from "./theme/index.js";
46
+ import { default as Qo } from "./theme/theme_color.js";
47
+ import { default as _o } from "./date_picker/index.js";
48
+ import { default as oe } from "./menu/index.js";
49
+ import { default as te } from "./menu/menu_item.js";
50
+ import { default as ae } from "./menu/sub_menu.js";
46
51
  export {
47
- F as ArrowDownIcon,
48
- y as ArrowLeftIcon,
49
- V as ArrowRightIcon,
50
- X as ArrowUpIcon,
52
+ y as ArrowDownIcon,
53
+ V as ArrowLeftIcon,
54
+ X as ArrowRightIcon,
55
+ j as ArrowUpIcon,
51
56
  g as BaseComponent,
52
57
  B as BaseIcon,
53
58
  Lo as Button,
54
- z as CaretBottomIcon,
55
- j as CaretTopIcon,
56
- vo as Checkbox,
57
- xo as CloseIcon,
58
- qo as ColorPicker,
59
- T as Dialog,
60
- D as DialogContainer,
61
- G as FontIcon,
62
- Ao as Form,
63
- Po as FormItem,
64
- co as InfoIcon,
65
- ko as Input,
66
- Wo as List,
67
- O as Loading,
68
- J as LoadingIcon,
69
- Uo as MdInput,
59
+ G as CaretBottomIcon,
60
+ z as CaretTopIcon,
61
+ ko as Checkbox,
62
+ co as CloseIcon,
63
+ Eo as ColorPicker,
64
+ _o as DatePicker,
65
+ D as Dialog,
66
+ T as DialogContainer,
67
+ J as FontIcon,
68
+ Po as Form,
69
+ wo as FormItem,
70
+ io as InfoIcon,
71
+ bo as Input,
72
+ Yo as List,
73
+ v as Loading,
74
+ N as LoadingIcon,
75
+ Wo as MdInput,
76
+ oe as Menu,
77
+ te as MenuItem,
70
78
  C as Message,
71
- $ as MoonIcon,
72
- Yo as Polygon,
73
- R as Popconfirm,
74
- w as Popover,
75
- So as Radio,
76
- eo as ReductionIcon,
77
- ro as RefreshLeftIcon,
78
- fo as RefreshRightIcon,
79
- N as SearchIcon,
80
- bo as SelectOri,
81
- mo as SortIcon,
82
- io as SuccessIcon,
83
- Z as SunIcon,
84
- Mo as Switch,
85
- Eo as Tabbar,
86
- Ho as Theme,
87
- Ko as ThemeColor,
88
- lo as ThemeDefaultIcon,
89
- ho as WarnIcon,
79
+ O as Modal,
80
+ eo as MoonIcon,
81
+ qo as Polygon,
82
+ S as Popconfirm,
83
+ M as Popover,
84
+ Ro as Radio,
85
+ ro as ReductionIcon,
86
+ fo as RefreshLeftIcon,
87
+ mo as RefreshRightIcon,
88
+ Z as SearchIcon,
89
+ Fo as SelectOri,
90
+ po as SortIcon,
91
+ ae as SubMenu,
92
+ ho as SuccessIcon,
93
+ $ as SunIcon,
94
+ Uo as Switch,
95
+ Ho as Tabbar,
96
+ Ko as Theme,
97
+ Qo as ThemeColor,
98
+ xo as ThemeDefaultIcon,
99
+ Ao as WarnIcon,
90
100
  c as addClickOutside,
91
101
  t as createTransition,
92
102
  r as getPopoverOffsetX,
@@ -94,10 +104,10 @@ export {
94
104
  f as impactDetect,
95
105
  s as initAttr,
96
106
  m as parseAttrValue,
97
- p as regist,
107
+ u as regist,
98
108
  I as removeClickOutside,
99
- l as setAttrs,
100
- u as tagAttr,
109
+ p as setAttrs,
110
+ l as tagAttr,
101
111
  d as tagAttrs,
102
112
  x as useId
103
113
  };
@@ -14,7 +14,6 @@ import FormInner from "../form/form_inner";
14
14
  */
15
15
  export default class Input extends FormInner {
16
16
  static baseName: string;
17
- static tagName: string;
18
17
  /** 原生 input 的 type */
19
18
  type: string;
20
19
  placeholder: string | undefined;
@@ -29,7 +28,6 @@ export default class Input extends FormInner {
29
28
  block: boolean;
30
29
  error: boolean;
31
30
  private $input;
32
- constructor();
33
31
  set value(value: any);
34
32
  get value(): any;
35
33
  static get observedAttributes(): string[];
@@ -44,7 +42,7 @@ export default class Input extends FormInner {
44
42
  setParser(cb: (value: string) => string): void;
45
43
  focus(): void;
46
44
  _input: (e: Event) => void;
47
- _changeDisabled(): void;
45
+ disabledChange(): void;
48
46
  private _numberInputParse;
49
47
  private _getStyleObj;
50
48
  private _isBlock;
@@ -2,10 +2,9 @@ import { off as u, formatClass as o, $one as h, on as p, formatStyle as d, addCl
2
2
  import { initAttr as m, parseAttrValue as g, tagAttr as n } from "../utils/index.js";
3
3
  import v from "../form/form_inner.js";
4
4
  import { remove as $, add as b } from "../utils/event.js";
5
- import { i as _ } from "../index-391POYEJ.js";
5
+ import { i as w } from "../index-391POYEJ.js";
6
6
  class S extends v {
7
7
  static baseName = "input";
8
- static tagName = "l-input";
9
8
  /** 原生 input 的 type */
10
9
  type = "text";
11
10
  placeholder = void 0;
@@ -20,9 +19,6 @@ class S extends v {
20
19
  block = !1;
21
20
  error = !1;
22
21
  $input = void 0;
23
- constructor() {
24
- super(), m(this);
25
- }
26
22
  set value(e) {
27
23
  this.setValue(e), this.$input != null && (this.$input.value = this.value);
28
24
  }
@@ -33,7 +29,7 @@ class S extends v {
33
29
  return ["disabled", "error"];
34
30
  }
35
31
  connectedCallback() {
36
- super.connectedCallback(), this.loadStyleText([_]);
32
+ m(this), super.connectedCallback(), this.loadStyleText([w]);
37
33
  }
38
34
  disconnectedCallback() {
39
35
  super.disconnectedCallback(), this.formAttrs.id && $(this.formAttrs.id, "validateChange", this._validateChange), u(this.$input, "input", this._input), this.$input = void 0;
@@ -76,7 +72,7 @@ class S extends v {
76
72
  }
77
73
  this.parser != null && (t = this.parser(t), s.value = t), this.setValue(t);
78
74
  };
79
- _changeDisabled() {
75
+ disabledChange() {
80
76
  this.$input != null && (this.$input.disabled = this.isDisabled());
81
77
  }
82
78
  _numberInputParse(e, s) {
@@ -97,7 +93,7 @@ class S extends v {
97
93
  return this._isBlock() && (e["--l-input-width"] = "100%"), this.width && (e["--l-input-width"] = this.width), e;
98
94
  }
99
95
  _isBlock() {
100
- if (this.block === !0 || this.formItemAttrs.innerBlock === !0 || this.formAttrs.innerBlock === !0) return !0;
96
+ return this.block === !0 || this.formItemAttrs.innerBlock === !0 || this.formAttrs.innerBlock === !0;
101
97
  }
102
98
  _updateError() {
103
99
  this.$input && (this.error ? c(this.$input, "is-error") : f(this.$input, "is-error"));
@@ -3,19 +3,24 @@ type LoadingInstanceParams = {
3
3
  fullscreen?: boolean;
4
4
  /** 全屏显示时,是否隐藏滚动条; 默认: true */
5
5
  lock?: boolean;
6
- /** 是否为条形, 默认: false */
7
- bar?: boolean;
6
+ /** 进度条形状, bar - 进度条, circle - 圆形, border - 边框进度 */
7
+ shape?: "circle" | "bar" | "border";
8
8
  /** 进度条挂载容器 */
9
9
  to?: string | HTMLElement | null;
10
10
  /** 显示的文本; 默认: 加载中…… */
11
11
  text?: string;
12
- /** 进度背景色 */
12
+ /** 阴影背景色 */
13
13
  background?: string;
14
+ /** 是否显示阴影, 0 - 不显示, 1 - 显示, 2 - 自动[circle-显示,bar-不显示], 默认: 2 */
15
+ mask?: number;
16
+ zindex?: number;
17
+ /** 前景文字颜色 */
18
+ color?: string;
14
19
  };
15
20
  declare class LoadingInstance {
16
21
  /** 加载容器 */
17
22
  el: HTMLElement;
18
- option: Required<Omit<LoadingInstanceParams, "to">>;
23
+ option: Required<Omit<LoadingInstanceParams, "to" | "zindex">>;
19
24
  constructor(option?: LoadingInstanceParams);
20
25
  /** 显示进度条 */
21
26
  show(): void;