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
@@ -2,20 +2,14 @@ import x from "../base.js";
2
2
  import { parseAttrValue as c, initAttr as g } from "../utils/index.js";
3
3
  import { $one as i, transition as s, $$ as a, on as u, off as k, shouldEventNext as y } from "ph-utils/dom";
4
4
  const v = ":host{display:none}:host(.open){display:block}.l-modal-mask{z-index:var(--l-modal-zindex, 100)}.l-modal-wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:calc(var(--l-modal-zindex, 100) + 1)}.l-modal{--l-modal-translate: translate3d(0, 80px, 0);background-color:#fff;border-radius:5px;width:var(--l-modal-width, 27%);margin:auto;box-shadow:0 0 8px #0000001a;position:relative;opacity:1;transform:var(--l-modal-translate) scaleZ(1);transition:opacity .3s,transform .3s}.l-modal-header{display:block;padding:10px;font-size:16px;border-bottom:1px solid var(--l-modal-line-color, rgba(0, 0, 0, .06));font-weight:600;display:flex;align-items:center;gap:5px}.l-modal-footer{padding:10px;border-top:1px solid var(--l-modal-line-color, rgba(0, 0, 0, .06));display:flex;justify-content:flex-end;gap:10px}.l-modal-container{padding:var(--l-modal-container-padding, 15px 10px);font-size:14px}.l-btn-modal-close{--l-form-control-height: auto;position:absolute}.l-modal-close1{right:5px;top:8px}.l-modal-close1::part(default){width:auto;height:auto;padding:5px;border:none;font-size:16px}.l-modal-close2{right:-10px;top:-10px}.l-modal-close2::part(default){width:20px;height:20px;padding:0;background-color:#fff}.mask-transition-enter-from,.mask-transition-leave-to{opacity:0}.modal-transition-enter-from,.modal-transition-leave-to{transform:translateZ(0) scale3d(0,0,0)}.l-modal--mobile{border-radius:10px}.l-modal--mobile .l-modal-header{text-align:center;border-bottom-color:transparent;padding:20px 10px 5px;display:flex;justify-content:center}.l-modal--mobile .l-modal-container{--l-modal-container-padding: 5px 15px 20px;text-align:center}.l-modal--mobile .l-modal-footer{display:flex;justify-content:stretch;align-items:stretch;padding:0;text-align:center;height:50px;gap:0}.l-modal--mobile .l-modal-footer-btn{flex-grow:1;height:100%}.l-modal--mobile .l-modal-footer-btn+.l-modal-footer-btn{border-left:1px solid var(--l-modal-line-color, rgba(0, 0, 0, .06))}.l-modal--middle{--l-modal-translate: translate3d(0, -50%, 0);top:50%}.l-modal--bottom{--l-modal-translate: translate3d(0, -100%, 0);top:100%;width:100%;border-bottom-left-radius:0;border-bottom-right-radius:0}@media screen and (max-width:768px){:host{--l-modal-width: 80%}}", w = ".l-mask{position:fixed;z-index:var(--l-mask-zindex, 100);inset:0;background-color:#0009;transition:opacity .3s;opacity:1}";
5
- class L extends x {
5
+ class S extends x {
6
6
  static baseName = "modal";
7
- /** 是否显示对话框 */
8
- show = !1;
9
7
  /** 关闭时销毁 Modal 里的子元素 */
10
8
  destroyOnClose = !1;
11
9
  /** 点击蒙层是否允许关闭 */
12
10
  maskClosable = !0;
13
11
  /** 是否展示遮罩 */
14
12
  mask = !0;
15
- /** 标题 */
16
- title = "";
17
- /** 是否展示底部 */
18
- footer = !0;
19
13
  /** 是否显示取消按钮 */
20
14
  cancel = !0;
21
15
  /** 取消按钮文本 */
@@ -34,45 +28,45 @@ class L extends x {
34
28
  mobile = !1;
35
29
  /** 设置 Modal 的 z-index */
36
30
  zIndex;
37
- #t = "";
31
+ _bodyOverflow = "";
38
32
  static get observedAttributes() {
39
33
  return ["show", "width", "confirm-loading"];
40
34
  }
41
- attributeChangedCallback(t, e, o) {
35
+ attributeChangedCallback(t, l, o) {
42
36
  if (this.rendered) {
43
37
  if (t === "show")
44
- this.show = c(o, !1), this.show ? this.#e() : this.#i();
38
+ c(o, !1, "show") ? this.#o() : this.#a();
45
39
  else if (t === "width")
46
- this.width = c(o, void 0), this.#o();
40
+ this.width = c(o, void 0), this.#t();
47
41
  else if (t === "confirm-loading") {
48
42
  this.confirmLoading = c(o, !1, "confirm-loading");
49
- const l = i('l-button[modal-action="ok"]', this.root);
50
- l && l.setAttribute("loading", this.confirmLoading.toString());
43
+ const e = i('l-button[modal-action="ok"]', this.root);
44
+ e && e.setAttribute("loading", this.confirmLoading.toString());
51
45
  }
52
46
  }
53
47
  }
54
48
  connectedCallback() {
55
- g(this), this.loadStyleText([w, v]), super.connectedCallback(), this.#o(), this.zIndex && this.style.setProperty("--l-modal-zindex", this.zIndex);
49
+ g(this), this.loadStyleText([w, v]), super.connectedCallback(), this.#t(), this.zIndex && this.style.setProperty("--l-modal-zindex", this.zIndex);
56
50
  }
57
51
  render() {
58
- this.show && this.#e();
52
+ this.getAttr("show", !1) && this.#o();
59
53
  }
60
- #o() {
54
+ #t() {
61
55
  this.width ? this.style.setProperty("--l-modal-width", this.width) : this.style.removeProperty("--l-modal-width");
62
56
  }
63
- #e() {
64
- this.#t = getComputedStyle(document.body).overflow, this.classList.add("open"), document.body.style.overflow = "hidden";
57
+ #o() {
58
+ this._bodyOverflow = getComputedStyle(document.body).overflow, this.classList.add("open"), document.body.style.overflow = "hidden";
65
59
  let t = i(".l-modal-wrapper", this.root);
66
60
  if (t) {
67
- const e = i(".l-mask", this.root);
68
- e && s(e, "mask-transition");
61
+ const l = i(".l-mask", this.root);
62
+ l && s(l, "mask-transition");
69
63
  const o = i(".l-modal", this.root);
70
64
  s(o, "modal-transition");
71
65
  } else {
72
- const e = document.createDocumentFragment();
66
+ const l = document.createDocumentFragment();
73
67
  let o = null;
74
- this.mask && (o = a("div", { class: "l-mask l-modal-mask", part: "mask" }), e.appendChild(o)), t = a("div", { class: "l-modal-wrapper", part: "wrapper" });
75
- const l = a("div", {
68
+ this.mask && (o = a("div", { class: "l-mask l-modal-mask", part: "mask" }), l.appendChild(o)), t = a("div", { class: "l-modal-wrapper", part: "wrapper" });
69
+ const e = a("div", {
76
70
  class: [
77
71
  "l-modal",
78
72
  `l-modal--${this.mobile ? "mobile" : "pc"}`,
@@ -80,22 +74,22 @@ class L extends x {
80
74
  ],
81
75
  part: "default"
82
76
  });
83
- if (l.setAttribute("modal-action", "modal"), this.close !== 0) {
77
+ if (e.setAttribute("modal-action", "modal"), this.close !== 0) {
84
78
  const d = a("l-button", {
85
79
  shape: "circle",
86
80
  type: "normal",
87
81
  class: `l-btn-modal-close l-modal-close${this.close}`,
88
82
  "modal-action": "close"
89
83
  }), n = a("l-close-icon");
90
- d.appendChild(n), l.appendChild(d);
84
+ d.appendChild(n), e.appendChild(d);
91
85
  }
92
86
  const p = a("header", { class: "l-modal-header", part: "header" }), h = a("slot", { name: "header" });
93
- h.textContent = this.title || "", p.appendChild(h), l.appendChild(p);
87
+ h.textContent = this.getAttr("header", ""), p.appendChild(h), e.appendChild(p);
94
88
  const f = a("div", {
95
89
  class: "l-modal-container",
96
90
  part: "container"
97
91
  }), b = a("slot");
98
- if (f.appendChild(b), l.appendChild(f), this.footer) {
92
+ if (f.appendChild(b), e.appendChild(f), this.getAttr("footer", !0)) {
99
93
  const d = a("footer", {
100
94
  class: "l-modal-footer",
101
95
  part: "footer"
@@ -113,35 +107,35 @@ class L extends x {
113
107
  loading: this.confirmLoading,
114
108
  text: this.mobile
115
109
  });
116
- r.textContent = this.okText, r.setAttribute("modal-action", "ok"), n.appendChild(r), d.appendChild(n), l.appendChild(d);
110
+ r.textContent = this.okText, r.setAttribute("modal-action", "ok"), n.appendChild(r), d.appendChild(n), e.appendChild(d);
117
111
  }
118
- t.appendChild(l), t.setAttribute("role", "dialog"), t.setAttribute("modal-action", "mask"), u(t, "click", this.#a), e.appendChild(t), this.appendToRoot(e), s(l, "modal-transition"), o && s(o, "mask-transition");
112
+ t.appendChild(e), t.setAttribute("role", "dialog"), t.setAttribute("modal-action", "mask"), u(t, "click", this.#l), l.appendChild(t), this.appendToRoot(l), s(e, "modal-transition"), o && s(o, "mask-transition");
119
113
  }
120
114
  }
121
- #i() {
122
- document.body.style.setProperty("overflow", this.#t);
115
+ #a() {
116
+ document.body.style.setProperty("overflow", this._bodyOverflow);
123
117
  const t = i(".l-modal", this.root);
124
118
  s(t, "modal-transition", "leave", () => {
125
- this.destroyOnClose && this.#l(), this.classList.remove("open"), this.dispatchEvent(new CustomEvent("close"));
119
+ this.destroyOnClose && this.#e(), this.classList.remove("open"), this.dispatchEvent(new CustomEvent("close"));
126
120
  });
127
- const e = i(".l-mask", this.root);
128
- e && s(e, "mask-transition", "leave");
121
+ const l = i(".l-mask", this.root);
122
+ l && s(l, "mask-transition", "leave");
129
123
  }
130
124
  disconnectedCallback() {
131
- this.#l(), super.disconnectedCallback();
125
+ this.#e(), super.disconnectedCallback();
132
126
  }
133
- #l() {
127
+ #e() {
134
128
  const t = i(".l-modal-wrapper", this.root);
135
- t && (k(t, "click", this.#a), this.root.removeChild(t));
136
- const e = i(".l-mask", this.root);
137
- e && this.root.removeChild(e);
129
+ t && (k(t, "click", this.#l), this.root.removeChild(t));
130
+ const l = i(".l-mask", this.root);
131
+ l && this.root.removeChild(l);
138
132
  }
139
- #a = (t) => {
140
- const [e, o] = y(t, "modal-action", this.root);
141
- if (e) {
142
- let l = "";
143
- this.maskClosable && o === "mask" || o === "cancel" || o === "close" ? l = "cancel" : o === "ok" && (l = "ok"), l && this.dispatchEvent(
144
- new CustomEvent(l, {
133
+ #l = (t) => {
134
+ const [l, o] = y(t, "modal-action", this.root);
135
+ if (l) {
136
+ let e = "";
137
+ this.maskClosable && o === "mask" || o === "cancel" || o === "close" ? e = "cancel" : o === "ok" && (e = "ok"), e && this.dispatchEvent(
138
+ new CustomEvent(e, {
145
139
  detail: { action: o }
146
140
  })
147
141
  );
@@ -149,5 +143,5 @@ class L extends x {
149
143
  };
150
144
  }
151
145
  export {
152
- L as default
146
+ S as default
153
147
  };
@@ -1,7 +1,7 @@
1
1
  import a from "../form/form_inner.js";
2
2
  import { tagAttrs as c } from "../utils/index.js";
3
3
  import { $one as r, on as h, off as o } from "ph-utils/dom";
4
- import { i as d } from "../index-DvcllHRh.js";
4
+ import { i as d } from "../index-Blf4-a2-.js";
5
5
  class v extends a {
6
6
  static baseName = "select-ori";
7
7
  $select;
@@ -0,0 +1,9 @@
1
+ import BaseComponent from "../base";
2
+ export default class ContextProvide<T, V> extends BaseComponent<V> {
3
+ context: Signal<T>;
4
+ contextEventName: string;
5
+ constructor();
6
+ connectedCallback(): void;
7
+ disconnectedCallback(): void;
8
+ private contextProvideHandler;
9
+ }
@@ -0,0 +1,22 @@
1
+ import o from "../base.js";
2
+ import { on as c, off as a } from "ph-utils/dom";
3
+ class d extends o {
4
+ context;
5
+ contextEventName;
6
+ constructor() {
7
+ super(), this.contextEventName = "context-request";
8
+ }
9
+ connectedCallback() {
10
+ super.connectedCallback(), c(this, this.contextEventName, this.contextProvideHandler);
11
+ }
12
+ disconnectedCallback() {
13
+ super.disconnectedCallback(), a(this, this.contextEventName, this.contextProvideHandler);
14
+ }
15
+ contextProvideHandler(t) {
16
+ const { context: e, callback: n } = t.detail;
17
+ e === this.contextEventName && n(this.context);
18
+ }
19
+ }
20
+ export {
21
+ d as default
22
+ };
@@ -34,3 +34,5 @@ export declare function setAttrs(el: HTMLElement, attrs: [string, string | undef
34
34
  * @returns
35
35
  */
36
36
  export declare function kebabToCamel(attr: string): string;
37
+ export declare function stopSignal(fn?: SignalStop): undefined;
38
+ export declare function unitNumberStr(value?: string, unit?: string): string | undefined;
@@ -1,60 +1,68 @@
1
- import { isBlank as u } from "ph-utils";
2
- let m = -1;
3
- function b(t, e) {
4
- const s = Array.isArray(t) ? t : [t];
5
- for (const n of s) {
6
- const r = e || `l-${n.baseName}`;
7
- customElements.get(r) || customElements.define(r, n);
1
+ import { isNumeric as m, isBlank as a } from "ph-utils";
2
+ let p = -1;
3
+ function y(t, e) {
4
+ const n = Array.isArray(t) ? t : [t];
5
+ for (const r of n) {
6
+ const s = e || `l-${r.baseName}`;
7
+ customElements.get(s) || customElements.define(s, r);
8
8
  }
9
9
  }
10
- function y() {
11
- return `l-${++m}`;
10
+ function $() {
11
+ return `l-${++p}`;
12
12
  }
13
- function l(t, e, s) {
13
+ function l(t, e, n) {
14
14
  if (t == null) return e;
15
15
  switch (typeof e) {
16
16
  case "boolean":
17
- return ["", "true", "1", "on", s].includes(t);
17
+ return ["", "true", "1", "on", n].includes(t);
18
18
  case "number":
19
19
  return Number(t);
20
20
  default:
21
21
  return t;
22
22
  }
23
23
  }
24
- function $(t) {
24
+ function h(t) {
25
25
  const e = t.attributes;
26
- for (const s of e) {
27
- const { name: n, value: r } = s;
28
- if (n.startsWith("data-") || n.startsWith("aria-") || n.startsWith("_") || n.startsWith("$") || ["id", "class", "style"].includes(n))
26
+ for (const n of e) {
27
+ const { name: r, value: s } = n;
28
+ if (r.startsWith("data-") || r.startsWith("aria-") || r.startsWith("_") || r.startsWith("$") || ["id", "class", "style"].includes(r))
29
29
  continue;
30
- const i = n.split("-").map((c, f) => f === 0 ? c : c[0].toUpperCase() + c.slice(1)).join(""), o = l(r, t[i], n), a = Object.getOwnPropertyNames(t);
31
- (t._ignoreInitAttrs || []).includes(i) || (n === "value" ? (t[i] = o, t._resetValue = o) : (a.includes(i) || a.includes(`_${i}`)) && (t[i] = o));
30
+ const i = r.split("-").map((c, f) => f === 0 ? c : c[0].toUpperCase() + c.slice(1)).join(""), o = l(s, t[i], r), u = Object.getOwnPropertyNames(t);
31
+ (t._ignoreInitAttrs || []).includes(i) || (r === "value" ? (t[i] = o, t._resetValue = o) : (u.includes(i) || u.includes(`_${i}`)) && (t[i] = o));
32
32
  }
33
33
  }
34
- function p(t, e) {
35
- let s = "";
36
- return e === !0 ? s = ` ${t}` : typeof e == "string" && !u(e) && (s = ` ${t}="${e}"`), s;
34
+ function g(t, e) {
35
+ let n = "";
36
+ return e === !0 ? n = ` ${t}` : typeof e == "string" && !a(e) && (n = ` ${t}="${e}"`), n;
37
37
  }
38
- function h(t) {
39
- const e = t.map((s) => p(s[0], s[1]));
38
+ function N(t) {
39
+ const e = t.map((n) => g(n[0], n[1]));
40
40
  return e.length > 0 ? ` ${e.join("")}` : "";
41
41
  }
42
42
  function I(t, e) {
43
- for (const s of e) {
44
- const n = s[1], r = s[0];
45
- n === !0 ? t.setAttribute(r, "") : typeof n == "string" && !u(n) && t.setAttribute(r, n);
43
+ for (const n of e) {
44
+ const r = n[1], s = n[0];
45
+ r === !0 ? t.setAttribute(s, "") : typeof r == "string" && !a(r) && t.setAttribute(s, r);
46
46
  }
47
47
  }
48
- function N(t) {
49
- return t.replace(/-(\w)/g, (e, s) => s.toUpperCase());
48
+ function W(t) {
49
+ return t.replace(/-(\w)/g, (e, n) => n.toUpperCase());
50
+ }
51
+ function _(t) {
52
+ t && t();
53
+ }
54
+ function j(t, e = "px") {
55
+ return t && (m(t) ? `${t}${e}` : t);
50
56
  }
51
57
  export {
52
- $ as initAttr,
53
- N as kebabToCamel,
58
+ h as initAttr,
59
+ W as kebabToCamel,
54
60
  l as parseAttrValue,
55
- b as regist,
61
+ y as regist,
56
62
  I as setAttrs,
57
- p as tagAttr,
58
- h as tagAttrs,
59
- y as useId
63
+ _ as stopSignal,
64
+ g as tagAttr,
65
+ N as tagAttrs,
66
+ j as unitNumberStr,
67
+ $ as useId
60
68
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "litos-ui",
3
- "version": "0.16.1",
3
+ "version": "0.17.0",
4
4
  "description": "基于 Web Component 的 UI 组件库",
5
5
  "keywords": [
6
6
  "component library",
@@ -42,26 +42,26 @@
42
42
  "docs:dev": "vitepress dev docs --force --host 0.0.0.0",
43
43
  "docs:build": "vitepress build docs",
44
44
  "docs:preview": "vitepress preview docs",
45
- "inspect:eslint": "eslint --inspect-config",
46
45
  "create": "node scripts/index.js create",
47
46
  "dts:build": "tsc -p tsconfig.build.json && node scripts/dts.js",
48
47
  "lib:build": "pnpm build && pnpm dts:build"
49
48
  },
50
49
  "dependencies": {
50
+ "alien-signals": "^3.1.2",
51
51
  "iconify-icon": "^3.0.2",
52
- "ph-utils": "^0.16.5",
52
+ "ph-utils": "^0.17.2",
53
53
  "qrcode-generator-es": "^2.1.2",
54
- "shiki": "^3.21.0"
54
+ "shiki": "^3.23.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@types/node": "^25.0.10",
57
+ "@types/node": "^25.3.1",
58
58
  "less": "^4.5.1",
59
59
  "lightningcss": "^1.31.1",
60
- "oxfmt": "^0.26.0",
61
- "oxlint": "^1.41.0",
60
+ "oxfmt": "^0.35.0",
61
+ "oxlint": "^1.50.0",
62
62
  "typescript": "^5.9.3",
63
63
  "vite": "^7.3.1",
64
64
  "vite-plugin-dts": "^4.5.4",
65
65
  "vitepress": "^1.6.4"
66
66
  }
67
- }
67
+ }
@@ -8,7 +8,7 @@
8
8
  bottom: 0;
9
9
  left: 0;
10
10
  z-index: var(--l-loading-zindex, 10);
11
- background: rgba(0, 0, 0, 0.4);
11
+ background: rgba(0, 0, 0, 0.7);
12
12
  border-radius: inherit;
13
13
  transition: opacity 0.3s;
14
14
  opacity: 0;
@@ -50,10 +50,12 @@
50
50
  margin: 0;
51
51
  font-size: 14px;
52
52
  }
53
+ .l-loading.l-loading-lock {
54
+ overflow: hidden;
55
+ }
53
56
 
54
57
  /* 全屏组件 */
55
- .l-loading-fullscreen.l-loading-lock {
56
- overflow: hidden;
58
+ .l-loading-fullscreen {
57
59
  --l-loading-zindex: 50;
58
60
  }
59
61
  .l-loading-fullscreen > .l-loading-mask {
@@ -1,4 +0,0 @@
1
- const r = ":host{--l-check-size: 16px;display:inline-flex;align-items:center;position:relative;cursor:pointer;width:auto;transition:color .3s,border-color .3s,background-color .3s}.l-check__input{margin:0;position:absolute;z-index:-1;width:0;height:0;opacity:0}.l-check__inner{width:var(--l-check-size);height:var(--l-check-size);display:flex;justify-content:center;align-items:center;border-radius:3px;border:1px solid #dcddd9;box-sizing:border-box;transition:border-color .3s ease-in-out;position:relative;margin-right:5px}.l-check__label{transition:color .3s;cursor:inherit;line-height:1}:host(.is-checked){color:var(--l-primary-color, #722ed1)}:host(.is-checked) .l-check__inner{border-color:var(--l-primary-color, #722ed1)}:host(.is-disabled){cursor:not-allowed}:host(.is-disabled) .l-check__label{color:var(--l-disabled-color, #e6e6e6)}:host([button]){height:var(--l-form-control-height, 32px);justify-content:center;padding:0 15px;border:1px solid #c0c4cc;border-left-width:0;margin-left:0;border-radius:inherit}:host([button]:first-child){border-left-width:1px;border-top-left-radius:3px;border-bottom-left-radius:3px}:host([button]:last-child){border-top-right-radius:3px;border-bottom-right-radius:3px}:host([button].is-checked){background-color:var(--l-primary-color, #722ed1);color:#fff;border-color:var(--l-primary-color, #722ed1);border-right-color:#fff}:host([button].is-checked:last-child){border-right-color:var(--l-primary-color, #722ed1)}";
2
- export {
3
- r as c
4
- };
@@ -1,4 +0,0 @@
1
- const r = ":host{--l-input-border-color: var(--l-border-color, #dedede);display:inline-flex;width:var(--l-input-width, 170px);height:var(--l-form-control-height, 32px);align-items:center;padding:0 7px;border:1px solid var(--l-input-border-color, #dedede);transition:border-color .3s;border-radius:var(--l-border-radius, 3px);vertical-align:middle;box-sizing:border-box;background-color:transparent}:host(:focus){--l-input-border-color: var(--l-primary-color, #722ed1)}:host(.is-disabled){background-color:var(--l-disabled-color, #f5f7fa)}:host(.is-error){--l-input-border-color: #ed3f13}.l-input__prefix,.l-input__suffix{color:#a8abb2;font-size:14px;display:inline-flex;flex-shrink:0}.l-input__prefix{margin-right:5px}.l-input__suffix{margin-left:5px}.l-clearable{cursor:pointer}.l-clearable:hover{color:#999}.l-input__inner{outline:none;border:none;box-sizing:border-box;width:100%;max-width:100%;height:100%;flex-grow:1;text-align:inherit;font-size:inherit}.l-input__inner:disabled{background-color:transparent}";
2
- export {
3
- r as i
4
- };
@@ -1,30 +0,0 @@
1
- /**
2
- * 添加表单事件监听器。
3
- * @param formId - 表单的唯一标识符。
4
- * @param event - 要监听的事件类型
5
- * @param cb - 当事件触发时调用的回调函数,接收两个参数:属性名和属性值。
6
- * 该函数用于将回调函数添加到指定表单ID的事件监听器集合中。
7
- */
8
- export declare function add(channel: string, event: string, cb: (...param: any) => void): void;
9
- /**
10
- * 移除指定表单的事件监听器。
11
- * @param formId - 表单的唯一标识符。
12
- * @param event - 要移除的事件类型,可以是 'attributeChanged' 或 'formSubmitted'。
13
- * @param cb - 要移除的事件回调函数,该函数接收两个参数:属性名和属性值。
14
- * 该函数会从事件存储中移除指定的回调函数,如果某个事件类型下没有更多的回调函数,则删除该事件类型;
15
- * 如果表单下没有更多的事件类型,则删除该表单;如果事件存储为空,则重置事件存储。
16
- */
17
- export declare function remove(channel: string, event: string, cb: (...params: any) => void): void;
18
- /**
19
- * 清除事件存储。如果提供了ID,则删除特定ID的事件;如果没有提供ID,则清除所有事件。
20
- * 当事件存储为空时,将其设置为undefined。
21
- * @param id 可选参数,指定要删除的事件ID。
22
- */
23
- export declare function clear(channel?: string): void;
24
- /**
25
- * 触发指定表单的事件,并执行所有注册的回调函数。
26
- * @param id - 表单的唯一标识符。
27
- * @param event - 要触发的事件名称。
28
- * @param params - 要传递给回调函数的参数列表。
29
- */
30
- export declare function emit(channel: string, event: string, ...params: any): void;