litos-ui 0.12.0 → 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 (56) hide show
  1. package/README.md +48 -0
  2. package/lib/base.d.ts +14 -1
  3. package/lib/base.js +22 -5
  4. package/lib/button/index.d.ts +3 -1
  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.d.ts +28 -0
  9. package/lib/dialog/dialog_container.js +100 -0
  10. package/lib/dialog/index.d.ts +30 -0
  11. package/lib/dialog/index.js +86 -0
  12. package/lib/form/form_inner.d.ts +7 -2
  13. package/lib/form/form_inner.js +26 -20
  14. package/lib/form/form_item.d.ts +0 -2
  15. package/lib/form/form_item.js +5 -9
  16. package/lib/form/index.d.ts +0 -2
  17. package/lib/form/index.js +23 -25
  18. package/lib/icon/base.d.ts +0 -1
  19. package/lib/icon/base.js +15 -17
  20. package/lib/icon/close.d.ts +5 -0
  21. package/lib/icon/close.js +10 -0
  22. package/lib/index.d.ts +26 -2
  23. package/lib/index.js +106 -83
  24. package/lib/input/index.d.ts +1 -2
  25. package/lib/input/index.js +5 -8
  26. package/lib/list/index.d.ts +1 -1
  27. package/lib/litos-ui.css +1 -1
  28. package/lib/loading/index.d.ts +45 -0
  29. package/lib/loading/index.js +141 -0
  30. package/lib/menu/base.js +1 -0
  31. package/lib/menu/index.d.ts +29 -0
  32. package/lib/menu/index.js +90 -0
  33. package/lib/menu/menu_item.d.ts +6 -0
  34. package/lib/menu/menu_item.js +21 -0
  35. package/lib/menu/sub_menu.d.ts +13 -0
  36. package/lib/menu/sub_menu.js +64 -0
  37. package/lib/modal/index.d.ts +40 -0
  38. package/lib/modal/index.js +153 -0
  39. package/lib/modal/modal_box.js +95 -0
  40. package/lib/popover/index.d.ts +1 -4
  41. package/lib/popover/index.js +6 -12
  42. package/lib/radio/index.js +3 -3
  43. package/lib/select_ori/index.d.ts +0 -2
  44. package/lib/select_ori/index.js +11 -15
  45. package/lib/switch/index.d.ts +0 -1
  46. package/lib/switch/index.js +8 -13
  47. package/lib/tabbar/index.d.ts +0 -1
  48. package/lib/tabbar/index.js +55 -63
  49. package/lib/theme/index.d.ts +1 -2
  50. package/lib/theme/index.js +9 -12
  51. package/lib/utils/index.d.ts +0 -5
  52. package/lib/utils/index.js +45 -52
  53. package/lib/utils/transition.js +3 -2
  54. package/package.json +11 -10
  55. package/styles/vars.css +1 -0
  56. package/lib/litos-ui.min.js +0 -1
@@ -1,7 +1,7 @@
1
- import d from "../base.js";
1
+ import n from "../base.js";
2
2
  import { parseAttrValue as u } from "../utils/index.js";
3
- import { add as l, remove as n, emit as o } from "../utils/event.js";
4
- class b extends d {
3
+ import { add as l, remove as d, emit as o } from "../utils/event.js";
4
+ class A extends n {
5
5
  disabled = !1;
6
6
  name = void 0;
7
7
  formAttrs = {};
@@ -32,15 +32,15 @@ class b extends d {
32
32
  static get observedAttributes() {
33
33
  return ["disabled"];
34
34
  }
35
- attributeChangedCallback(t, e, r) {
35
+ attributeChangedCallback(t, e, s) {
36
36
  if (this.rendered)
37
37
  if (t === "disabled") {
38
- const i = u(r, !1, t);
39
- i !== this.disabled && (this._changeDisabled(), this.disabled = i);
38
+ const i = u(s, !1, t);
39
+ i !== this.disabled && (this._changeDisabled(), this.disabledChange(), this.disabled = i);
40
40
  } else
41
- this.attributeChange(t, e, r);
41
+ this.attributeChange(t, e, s);
42
42
  }
43
- attributeChange(t, e, r) {
43
+ attributeChange(t, e, s) {
44
44
  }
45
45
  connectedCallback() {
46
46
  const t = this._getForm();
@@ -51,7 +51,7 @@ class b extends d {
51
51
  ), super.connectedCallback();
52
52
  }
53
53
  disconnectedCallback() {
54
- this.formAttrs.id && (n(this.formAttrs.id, "attributeChanged", this._formAttributeChanged), n(this.formAttrs.id, "reset", this._resetFieldValue)), this.formItemAttrs.id && n(
54
+ this.formAttrs.id && (d(this.formAttrs.id, "attributeChanged", this._formAttributeChanged), d(this.formAttrs.id, "reset", this._resetFieldValue)), this.formItemAttrs.id && d(
55
55
  this.formItemAttrs.id,
56
56
  "attributeChanged",
57
57
  this._formAttributeChanged
@@ -64,13 +64,13 @@ class b extends d {
64
64
  return this.name ? this.name : this.formItemAttrs.name;
65
65
  }
66
66
  _getForm() {
67
- let t = this.parentElement, e = {}, r = {};
67
+ let t = this.parentElement, e = {}, s = {};
68
68
  for (; t != null; ) {
69
69
  const i = t.tagName;
70
70
  if (i === "L-FORM") {
71
71
  const a = t.sharedAttrs;
72
- for (let s = 0; s < a.length; s++) {
73
- const h = a[s];
72
+ for (let r = 0; r < a.length; r++) {
73
+ const h = a[r];
74
74
  e[h] = t[h];
75
75
  }
76
76
  break;
@@ -78,24 +78,30 @@ class b extends d {
78
78
  if (i === "BODY") break;
79
79
  if (i === "L-FORM-ITEM") {
80
80
  const a = t.sharedAttrs;
81
- for (let s = 0; s < a.length; s++) {
82
- const h = a[s];
83
- r[h] = t[h];
81
+ for (let r = 0; r < a.length; r++) {
82
+ const h = a[r];
83
+ s[h] = t[h];
84
84
  }
85
85
  }
86
86
  t = t.parentElement;
87
87
  }
88
88
  return t = null, {
89
89
  formAttr: e,
90
- formItemAttr: r
90
+ formItemAttr: s
91
91
  };
92
92
  }
93
- _formAttributeChanged = (t, e, r) => {
94
- r === this.formAttrs.formId ? this.formAttrs[t] = e : this.formItemAttrs[t] = e, t === "disabled" && this._changeDisabled();
93
+ _formAttributeChanged = (t, e, s) => {
94
+ s === this.formAttrs.formId ? this.formAttrs[t] = e : this.formItemAttrs[t] = e, t === "disabled" && (this._changeDisabled(), this.disabledChange());
95
95
  };
96
- /** disable 属性改变时回调 */
96
+ /** */
97
+ /**
98
+ * disable 属性改变时回调
99
+ * @deprecated 使用 disabledChange 代替
100
+ */
97
101
  _changeDisabled() {
98
102
  }
103
+ disabledChange() {
104
+ }
99
105
  pushValueChange() {
100
106
  const t = this.getName();
101
107
  this.formAttrs.id && t && o(
@@ -114,5 +120,5 @@ class b extends d {
114
120
  }
115
121
  }
116
122
  export {
117
- b as default
123
+ A as default
118
124
  };
@@ -9,7 +9,6 @@ export default class FormItem extends BaseComponent {
9
9
  error?: string;
10
10
  /** 标签文本 */
11
11
  label?: string;
12
- id: string;
13
12
  /** 内置验证规则: required - 必填, same:password - 一般用于验证确认密码和密码, phone - 验证电话号码 */
14
13
  verify?: string;
15
14
  /** 验证失败错误信息 */
@@ -20,7 +19,6 @@ export default class FormItem extends BaseComponent {
20
19
  innerBlock: boolean;
21
20
  labelPosition?: "left" | "right" | "top";
22
21
  private formId?;
23
- constructor();
24
22
  static get observedAttributes(): string[];
25
23
  attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
26
24
  connectedCallback(): void;
@@ -1,5 +1,5 @@
1
- import { formatClass as a, $one as i, addClass as n, removeClass as m } from "ph-utils/dom";
2
- import { initAttr as d, parseAttrValue as f } from "../utils/index.js";
1
+ import { formatClass as a, $one as i, addClass as m, removeClass as n } from "ph-utils/dom";
2
+ import { parseAttrValue as d, initAttr as f } from "../utils/index.js";
3
3
  import h from "../base.js";
4
4
  import { emit as o, add as c, clear as p, remove as b } from "../utils/event.js";
5
5
  import { random as s } from "ph-utils";
@@ -13,7 +13,6 @@ class $ extends h {
13
13
  error;
14
14
  /** 标签文本 */
15
15
  label;
16
- id;
17
16
  /** 内置验证规则: required - 必填, same:password - 一般用于验证确认密码和密码, phone - 验证电话号码 */
18
17
  verify;
19
18
  /** 验证失败错误信息 */
@@ -24,9 +23,6 @@ class $ extends h {
24
23
  innerBlock = !1;
25
24
  labelPosition = "right";
26
25
  formId;
27
- constructor() {
28
- super(), d(this), this.id == null && (this.id = `l-fi${s(3)}-${s(6)}`);
29
- }
30
26
  static get observedAttributes() {
31
27
  return ["error", "label", "disabled"];
32
28
  }
@@ -36,12 +32,12 @@ class $ extends h {
36
32
  else if (e === "label")
37
33
  this.label = r, this._updateLabel();
38
34
  else if (e === "disabled") {
39
- const l = f(r, !1, e);
35
+ const l = d(r, !1, e);
40
36
  l !== this.disabled && (o(this.id, "attributeChanged", e, l, this.id), this.disabled = l);
41
37
  }
42
38
  }
43
39
  connectedCallback() {
44
- if (super.connectedCallback(), this.loadStyleText([u]), this.formId = this._getFormId(), this.name && this.formId) {
40
+ if (f(this), this.id == null && (this.id = `l-fi${s(3)}-${s(6)}`), this.loadStyleText([u]), super.connectedCallback(), this.formId = this._getFormId(), this.name && this.formId) {
45
41
  let e = this.verify?.split("|") || [];
46
42
  this.pattern && e.push(new RegExp(this.pattern));
47
43
  const t = {
@@ -91,7 +87,7 @@ class $ extends h {
91
87
  r && r.appendChild(e);
92
88
  }
93
89
  const t = i(".l-form-item", this.root);
94
- t && (this.error ? n(t, "is-error") : m(t, "is-error"));
90
+ t && (this.error ? m(t, "is-error") : n(t, "is-error"));
95
91
  }
96
92
  _updateLabel() {
97
93
  if (!this.rendered) return;
@@ -7,14 +7,12 @@ export default class Form extends BaseComponent {
7
7
  inline: boolean;
8
8
  labelPosition?: "left" | "right" | "top";
9
9
  labelWidth?: string;
10
- id: string;
11
10
  disabled: boolean;
12
11
  sharedAttrs: string[];
13
12
  validator: Validator;
14
13
  innerBlock: boolean;
15
14
  novalidate: boolean;
16
15
  private _data?;
17
- private emit;
18
16
  constructor();
19
17
  static get observedAttributes(): string[];
20
18
  attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
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
  };
@@ -0,0 +1,5 @@
1
+ import BaseIcon from "./base";
2
+ export default class Close extends BaseIcon {
3
+ static baseName: string;
4
+ renderChildren(): string;
5
+ }
@@ -0,0 +1,10 @@
1
+ import e from "./base.js";
2
+ class l extends e {
3
+ static baseName = "close-icon";
4
+ renderChildren() {
5
+ return '<path fill="currentColor" d="M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"></path>';
6
+ }
7
+ }
8
+ export {
9
+ l as default
10
+ };
package/lib/index.d.ts CHANGED
@@ -4,6 +4,10 @@ export { default as BaseComponent } from "./base";
4
4
  export { default as Message } from "./message";
5
5
  export { default as Popover } from "./popover";
6
6
  export { default as Popconfirm } from "./popconfirm";
7
+ export { default as Dialog } from "./dialog";
8
+ export { default as DialogContainer } from "./dialog/dialog_container";
9
+ export { default as Loading } from "./loading";
10
+ export { default as Modal } from "./modal";
7
11
  export { default as BaseIcon } from "./icon/base";
8
12
  export { default as ArrowDownIcon } from "./icon/arrow_down";
9
13
  export { default as ArrowLeftIcon } from "./icon/arrow_left";
@@ -21,6 +25,10 @@ export { default as RefreshLeftIcon } from "./icon/refresh_left";
21
25
  export { default as RefreshRightIcon } from "./icon/refresh_right";
22
26
  export { default as SortIcon } from "./icon/sort";
23
27
  export { default as ThemeDefaultIcon } from "./icon/theme_default";
28
+ export { default as CloseIcon } from "./icon/close";
29
+ export { default as InfoIcon } from "./icon/info";
30
+ export { default as SuccessIcon } from "./icon/success";
31
+ export { default as WarnIcon } from "./icon/warn";
24
32
  export { default as Form } from "./form";
25
33
  export { default as FormItem } from "./form/form_item";
26
34
  export { default as Radio } from "./radio";
@@ -29,19 +37,27 @@ export { default as Button } from "./button";
29
37
  export { default as Input } from "./input";
30
38
  export { default as SelectOri } from "./select_ori";
31
39
  export { default as Switch } from "./switch";
40
+ export { default as MdInput } from "./md_input";
32
41
  export { default as List } from "./list";
33
42
  export { default as Polygon } from "./polygon";
34
43
  export { default as ColorPicker } from "./color_picker";
35
44
  export { default as Tabbar } from "./tabbar";
36
45
  export { default as Theme } from "./theme";
37
46
  export { default as ThemeColor } from "./theme/theme_color";
38
- export { default as MdInput } from "./md_input";
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";
39
51
 
40
52
  declare global {
41
53
  interface HTMLElementTagNameMap {
42
54
  "l-base-component": import("./base").default
43
55
  "l-popover": import("./popover").default
44
56
  "l-popconfirm": import("./popconfirm").default
57
+ "l-dialog": import("./dialog").default
58
+ "l-dialog-container": import("./dialog/dialog_container").default
59
+ "l-loading": import("./loading").default
60
+ "l-modal": import("./modal").default
45
61
  "l-base-icon": import("./icon/base").default
46
62
  "l-arrow-down-icon": import("./icon/arrow_down").default
47
63
  "l-arrow-left-icon": import("./icon/arrow_left").default
@@ -59,6 +75,10 @@ declare global {
59
75
  "l-refresh-right-icon": import("./icon/refresh_right").default
60
76
  "l-sort-icon": import("./icon/sort").default
61
77
  "l-theme-default-icon": import("./icon/theme_default").default
78
+ "l-close-icon": import("./icon/close").default
79
+ "l-info-icon": import("./icon/info").default
80
+ "l-success-icon": import("./icon/success").default
81
+ "l-warn-icon": import("./icon/warn").default
62
82
  "l-form": import("./form").default
63
83
  "l-form-item": import("./form/form_item").default
64
84
  "l-radio": import("./radio").default
@@ -67,12 +87,16 @@ declare global {
67
87
  "l-input": import("./input").default
68
88
  "l-select-ori": import("./select_ori").default
69
89
  "l-switch": import("./switch").default
90
+ "l-md-input": import("./md_input").default
70
91
  "l-list": import("./list").default
71
92
  "l-polygon": import("./polygon").default
72
93
  "l-color-picker": import("./color_picker").default
73
94
  "l-tabbar": import("./tabbar").default
74
95
  "l-theme": import("./theme").default
75
96
  "l-theme-color": import("./theme/theme_color").default
76
- "l-md-input": import("./md_input").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
77
101
  }
78
102
  }
package/lib/index.js CHANGED
@@ -1,90 +1,113 @@
1
- import { config as t, createTransition as r, getPopoverOffsetX as a, getPopoverOffsetY as f, impactDetect as s, initAttr as m, parseAttrValue as p, regist as u, setAttrs as d, tagAttr as l, tagAttrs as x, useId as n } from "./utils/index.js";
2
- import { set as i, remove as I } from "./utils/clickoutside.js";
3
- import { default as h } from "./base.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
+ import { set as c, remove as I } from "./utils/clickoutside.js";
3
+ import { default as g } from "./base.js";
4
4
  import { default as C } from "./message/index.js";
5
- import { default as P } from "./popover/index.js";
6
- import { default as T } from "./popconfirm/index.js";
7
- import { default as O } from "./icon/base.js";
8
- import { default as k } from "./icon/arrow_down.js";
9
- import { default as L } from "./icon/arrow_left.js";
10
- import { default as D } from "./icon/arrow_right.js";
11
- import { default as M } from "./icon/arrow_up.js";
12
- import { default as U } from "./icon/caret_top.js";
13
- import { default as X } from "./icon/caret_bottom.js";
14
- import { default as j } from "./icon/font_icon.js";
15
- import { default as z } from "./icon/loading.js";
16
- import { default as G } from "./icon/search.js";
17
- import { default as J } from "./icon/sun.js";
18
- import { default as N } from "./icon/moon.js";
19
- import { default as W } from "./icon/reduction.js";
20
- import { default as _ } from "./icon/refresh_left.js";
21
- import { default as oo } from "./icon/refresh_right.js";
22
- import { default as to } from "./icon/sort.js";
23
- import { default as ao } from "./icon/theme_default.js";
24
- import { default as so } from "./form/index.js";
25
- import { default as po } from "./form/form_item.js";
26
- import { default as lo } from "./radio/index.js";
27
- import { default as no } from "./checkbox/index.js";
28
- import { default as io } from "./button/index.js";
29
- import { default as go } from "./input/index.js";
30
- import { default as Ao } from "./select_ori/index.js";
31
- import { default as wo } from "./switch/index.js";
32
- import { default as Ro } from "./list/index.js";
33
- import { default as vo } from "./polygon/index.js";
34
- import { default as So } from "./color_picker/index.js";
35
- import { default as Bo } from "./tabbar/index.js";
36
- import { default as bo } from "./theme/index.js";
37
- import { default as Fo } from "./theme/theme_color.js";
38
- import { default as yo } from "./md_input/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";
11
+ import { default as B } from "./icon/base.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";
36
+ import { default as Lo } from "./button/index.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";
39
51
  export {
40
- k as ArrowDownIcon,
41
- L as ArrowLeftIcon,
42
- D as ArrowRightIcon,
43
- M as ArrowUpIcon,
44
- h as BaseComponent,
45
- O as BaseIcon,
46
- io as Button,
47
- X as CaretBottomIcon,
48
- U as CaretTopIcon,
49
- no as Checkbox,
50
- So as ColorPicker,
51
- j as FontIcon,
52
- so as Form,
53
- po as FormItem,
54
- go as Input,
55
- Ro as List,
56
- z as LoadingIcon,
57
- yo as MdInput,
52
+ y as ArrowDownIcon,
53
+ V as ArrowLeftIcon,
54
+ X as ArrowRightIcon,
55
+ j as ArrowUpIcon,
56
+ g as BaseComponent,
57
+ B as BaseIcon,
58
+ Lo as Button,
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,
58
78
  C as Message,
59
- N as MoonIcon,
60
- vo as Polygon,
61
- T as Popconfirm,
62
- P as Popover,
63
- lo as Radio,
64
- W as ReductionIcon,
65
- _ as RefreshLeftIcon,
66
- oo as RefreshRightIcon,
67
- G as SearchIcon,
68
- Ao as SelectOri,
69
- to as SortIcon,
70
- J as SunIcon,
71
- wo as Switch,
72
- Bo as Tabbar,
73
- bo as Theme,
74
- Fo as ThemeColor,
75
- ao as ThemeDefaultIcon,
76
- i as addClickOutside,
77
- t as config,
78
- r as createTransition,
79
- a as getPopoverOffsetX,
80
- f as getPopoverOffsetY,
81
- s as impactDetect,
82
- m as initAttr,
83
- p as parseAttrValue,
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,
100
+ c as addClickOutside,
101
+ t as createTransition,
102
+ r as getPopoverOffsetX,
103
+ a as getPopoverOffsetY,
104
+ f as impactDetect,
105
+ s as initAttr,
106
+ m as parseAttrValue,
84
107
  u as regist,
85
108
  I as removeClickOutside,
86
- d as setAttrs,
109
+ p as setAttrs,
87
110
  l as tagAttr,
88
- x as tagAttrs,
89
- n as useId
111
+ d as tagAttrs,
112
+ x as useId
90
113
  };