litos-ui 0.8.0 → 0.9.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 (42) hide show
  1. package/lib/base.js +26 -30
  2. package/lib/button/index.js +55 -59
  3. package/lib/color_picker/index.js +17 -21
  4. package/lib/form/form_events.js +15 -17
  5. package/lib/form/form_inner.js +43 -47
  6. package/lib/form/form_item.js +49 -54
  7. package/lib/form/index.js +62 -66
  8. package/lib/icon/arrow_down.js +4 -7
  9. package/lib/icon/arrow_left.js +4 -7
  10. package/lib/icon/arrow_right.js +4 -7
  11. package/lib/icon/arrow_up.js +4 -7
  12. package/lib/icon/base.js +21 -25
  13. package/lib/icon/caret_bottom.js +4 -7
  14. package/lib/icon/caret_top.js +4 -7
  15. package/lib/icon/font_icon.js +13 -17
  16. package/lib/icon/info.js +4 -7
  17. package/lib/icon/loading.js +4 -7
  18. package/lib/icon/mask_close.js +4 -7
  19. package/lib/icon/moon.js +4 -7
  20. package/lib/icon/reduction.js +4 -7
  21. package/lib/icon/refresh_left.js +4 -7
  22. package/lib/icon/refresh_right.js +4 -7
  23. package/lib/icon/search.js +4 -7
  24. package/lib/icon/sort.js +4 -7
  25. package/lib/icon/success.js +4 -7
  26. package/lib/icon/sun.js +4 -7
  27. package/lib/icon/theme_default.js +4 -7
  28. package/lib/icon/warn.js +4 -7
  29. package/lib/input/index.js +66 -71
  30. package/lib/list/index.js +23 -27
  31. package/lib/polygon/index.js +14 -18
  32. package/lib/popconfirm/index.js +11 -14
  33. package/lib/popover/index.js +107 -113
  34. package/lib/radio/index.js +53 -57
  35. package/lib/select_ori/index.js +23 -27
  36. package/lib/switch/index.js +34 -44
  37. package/lib/tabbar/index.js +117 -126
  38. package/lib/theme/index.js +71 -74
  39. package/lib/theme/theme_color.js +17 -27
  40. package/lib/utils/event.js +16 -18
  41. package/lib/utils/transition.js +23 -27
  42. package/package.json +1 -1
@@ -1,24 +1,22 @@
1
- let i;
2
- function w(f, t, o) {
3
- i == null && (i = /* @__PURE__ */ new Map()), i.has(f) || i.set(f, /* @__PURE__ */ new Map([[t, /* @__PURE__ */ new Set()]])), i.get(f).has(t) || i.get(f).set(t, /* @__PURE__ */ new Set()), i.get(f).get(t).add(o);
1
+ let e;
2
+ function s(t, i, f) {
3
+ e == null && (e = /* @__PURE__ */ new Map()), e.has(t) || e.set(t, /* @__PURE__ */ new Map([[i, /* @__PURE__ */ new Set()]])), e.get(t).has(i) || e.get(t).set(i, /* @__PURE__ */ new Set()), e.get(t).get(i).add(f);
4
4
  }
5
- function z(f, t, o) {
6
- var g, d, e, l, u, r;
7
- (d = (g = i == null ? void 0 : i.get(f)) == null ? void 0 : g.get(t)) == null || d.delete(o), ((l = (e = i == null ? void 0 : i.get(f)) == null ? void 0 : e.get(t)) == null ? void 0 : l.size) == 0 && ((u = i.get(f)) == null || u.delete(t)), ((r = i == null ? void 0 : i.get(f)) == null ? void 0 : r.size) == 0 && i.delete(f), (i == null ? void 0 : i.size) == 0 && (i = void 0);
5
+ function d(t, i, f) {
6
+ e?.get(t)?.get(i)?.delete(f), e?.get(t)?.get(i)?.size == 0 && e.get(t)?.delete(i), e?.get(t)?.size == 0 && e.delete(t), e?.size == 0 && (e = void 0);
8
7
  }
9
- function p(f) {
10
- f == null ? i != null && (i.clear(), i = void 0) : i != null && (i.delete(f), i.size === 0 && (i = void 0));
8
+ function l(t) {
9
+ t == null ? e != null && (e.clear(), e = void 0) : e != null && (e.delete(t), e.size === 0 && (e = void 0));
11
10
  }
12
- function m(f, t, ...o) {
13
- var d;
14
- const g = (d = i == null ? void 0 : i.get(f)) == null ? void 0 : d.get(t);
15
- if (g != null)
16
- for (const e of g)
17
- e(...o);
11
+ function u(t, i, ...f) {
12
+ const o = e?.get(t)?.get(i);
13
+ if (o != null)
14
+ for (const g of o)
15
+ g(...f);
18
16
  }
19
17
  export {
20
- w as add,
21
- p as clear,
22
- m as emit,
23
- z as remove
18
+ s as add,
19
+ l as clear,
20
+ u as emit,
21
+ d as remove
24
22
  };
@@ -1,57 +1,53 @@
1
- var c = Object.defineProperty;
2
- var d = (s, e, t) => e in s ? c(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
- var o = (s, e, t) => d(s, typeof e != "symbol" ? e + "" : e, t);
4
- import { initAttr as p } from "./index.js";
5
- import u from "../base.js";
1
+ import { initAttr as h } from "./index.js";
2
+ import a from "../base.js";
6
3
  import "../message/index.js";
7
- import { transition as n } from "ph-utils/dom";
4
+ import { transition as i } from "ph-utils/dom";
8
5
  import "ph-utils";
9
6
  import "ph-utils/validator";
10
7
  import "ph-utils/color";
11
8
  import "ph-utils/theme";
12
- class m extends u {
13
- constructor() {
14
- super();
15
- /** 应用过滤动画的属性值, 例如: opacity: 0; transform: xx; */
16
- o(this, "sheetRec");
17
- o(this, "duration", "0.3s");
18
- p(this), this.sheetRec = this._parseSheets(this.getAttr("sheets", "opacity: 0"));
19
- }
9
+ class C extends a {
10
+ static baseName = "transition";
11
+ /** 应用过滤动画的属性值, 例如: opacity: 0; transform: xx; */
12
+ sheetRec;
13
+ duration = "0.3s";
20
14
  static get observedAttributes() {
21
15
  return ["sheets"];
22
16
  }
17
+ constructor() {
18
+ super(), h(this), this.sheetRec = this._parseSheets(this.getAttr("sheets", "opacity: 0"));
19
+ }
23
20
  connectedCallback() {
24
21
  super.connectedCallback(), this.show();
25
22
  }
26
23
  render() {
27
24
  this.shadow.innerHTML = "<slot></slot>";
28
25
  }
29
- attributeChangedCallback(t, r, i) {
30
- t === "sheets" && (this.sheetRec = this._parseSheets(i));
26
+ attributeChangedCallback(t, e, s) {
27
+ t === "sheets" && (this.sheetRec = this._parseSheets(s));
31
28
  }
32
29
  show() {
33
30
  const t = this._getSlotFirstChild();
34
- t && n(t, this.sheetRec, "enter");
31
+ t && i(t, this.sheetRec, "enter");
35
32
  }
36
33
  hide(t) {
37
- const r = this._getSlotFirstChild();
38
- r && n(r, this.sheetRec, "leave", t);
34
+ const e = this._getSlotFirstChild();
35
+ e && i(e, this.sheetRec, "leave", t);
39
36
  }
40
37
  _parseSheets(t) {
41
- const r = t.split(";"), i = [];
42
- return r.forEach((h) => {
43
- if (h) {
44
- const [a, l] = h.split(":");
45
- i.push([a.trim(), l.trim(), this.duration]);
38
+ const e = t.split(";"), s = [];
39
+ return e.forEach((r) => {
40
+ if (r) {
41
+ const [o, n] = r.split(":");
42
+ s.push([o.trim(), n.trim(), this.duration]);
46
43
  }
47
- }), i;
44
+ }), s;
48
45
  }
49
46
  _getSlotFirstChild() {
50
47
  const t = this.shadow.querySelector("slot");
51
48
  return t != null && t.assignedNodes().length > 0 ? t.assignedNodes()[0] : null;
52
49
  }
53
50
  }
54
- o(m, "baseName", "transition");
55
51
  export {
56
- m as Transition
52
+ C as Transition
57
53
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "litos-ui",
3
3
  "description": "基于 Web Component 的 UI 组件库",
4
- "version": "0.8.0",
4
+ "version": "0.9.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite dev",