litos-ui 0.16.0 → 0.16.2

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.
@@ -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", !1)) {
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
  };
@@ -2,15 +2,12 @@ import BaseComponent from "../base";
2
2
  export default class Tag extends BaseComponent {
3
3
  #private;
4
4
  static baseName: string;
5
- type: string;
6
- color?: string;
7
- closeable?: boolean;
8
5
  connectedCallback(): void;
9
6
  static get observedAttributes(): string[];
10
7
  attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
11
8
  render(): DocumentFragment;
12
9
  afterInit(): void;
13
- _toggleTypeClass(): void;
14
- _toggleColorStyle(): void;
10
+ _toggleTypeClass(type: string): void;
11
+ _toggleColorStyle(color?: string | null): void;
15
12
  beforeDestroy(): void;
16
13
  }
package/lib/tag/index.js CHANGED
@@ -1,80 +1,72 @@
1
- import s from "../base.js";
2
- import { parseAttrValue as i } from "../utils/index.js";
3
- import { isBlank as c } from "ph-utils";
4
- import { adjust as n } from "ph-utils/color";
5
- import { $one as g, $$ as l, shouldEventNext as d, on as f, off as h } from "ph-utils/dom";
6
- const p = ":host{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;height:var(--l-tag-height, 22px);padding:0 8px;font-size:12px;line-height:1;border:1px solid var(--l-tag-border-color, var(--l-border-color, #dedede));border-radius:4px;background:var(--l-tag-background, #fff);white-space:nowrap;color:var(--l-tag-color, #333)}:host(.l-tag--primary){--l-tag-border-color: var(--l-primary-color-light3, #d3adf7);--l-tag-background: var(--l-primary-color-light5, #f9f0ff);--l-tag-color: var(--l-primary-color-light3, #d3adf7)}:host(.l-tag--error){--l-tag-color: var(--l-error-color, #ed3f13);--l-tag-background: var(--l-error-color-light5, #fff1f0);--l-tag-border-color: var(--l-error-color, #ed3f13)}:host(.l-tag--success){--l-tag-color: var(--l-success-color, #a0d911);--l-tag-background: var(--l-success-color-light5, #fcffe6);--l-tag-border-color: var(--l-success-color, #a0d911)}:host(.l-tag--info){--l-tag-color: var(--l-info-color, #999999);--l-tag-background: var(--l-info-color-light9, #f5f5f5);--l-tag-border-color: var(--l-border-color, #dedede)}:host(.l-tag--warning){--l-tag-color: var(--l-warning-color, #ff9900);--l-tag-background: var(--l-warning-color-light5, #fff5e6);--l-tag-border-color: var(--l-warning-color, #ff9900)}.l-tag-close{margin-left:3px;font-size:12px;width:14px;height:14px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;transition:color .3s,background-color .3s;cursor:pointer}.l-tag-close:hover{background-color:var(--l-tag-color, #1890ff);color:#fff}";
7
- class x extends s {
1
+ import i from "../base.js";
2
+ import { parseAttrValue as c } from "../utils/index.js";
3
+ import { isBlank as n } from "ph-utils";
4
+ import { adjust as g } from "ph-utils/color";
5
+ import { $one as d, $$ as l, shouldEventNext as f, on as h, off as p } from "ph-utils/dom";
6
+ const b = ":host{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;height:var(--l-tag-height, 22px);padding:0 5px;font-size:12px;line-height:1;border:1px solid var(--l-tag-border-color, var(--l-border-color, #dedede));border-radius:4px;background:var(--l-tag-background, #fff);white-space:nowrap;color:var(--l-tag-color, #333)}:host(.l-tag--primary){--l-tag-border-color: var(--l-primary-color-light3, #d3adf7);--l-tag-background: var(--l-primary-color-light5, #f9f0ff);--l-tag-color: var(--l-primary-color-light3, #d3adf7)}:host(.l-tag--error){--l-tag-color: var(--l-error-color, #ed3f13);--l-tag-background: var(--l-error-color-light5, #fff1f0);--l-tag-border-color: var(--l-error-color, #ed3f13)}:host(.l-tag--success){--l-tag-color: var(--l-success-color, #a0d911);--l-tag-background: var(--l-success-color-light5, #fcffe6);--l-tag-border-color: var(--l-success-color, #a0d911)}:host(.l-tag--info){--l-tag-color: var(--l-info-color, #999999);--l-tag-background: var(--l-info-color-light9, #f5f5f5);--l-tag-border-color: var(--l-border-color, #dedede)}:host(.l-tag--warning){--l-tag-color: var(--l-warning-color, #ff9900);--l-tag-background: var(--l-warning-color-light5, #fff5e6);--l-tag-border-color: var(--l-warning-color, #ff9900)}.l-tag-close{margin-left:3px;font-size:12px;width:14px;height:14px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;transition:color .3s,background-color .3s;cursor:pointer}.l-tag-close:hover{background-color:var(--l-tag-color, #1890ff);color:#fff}";
7
+ class C extends i {
8
8
  static baseName = "tag";
9
- type = "primary";
10
- color;
11
- closeable = !1;
12
9
  connectedCallback() {
13
- this.loadStyleText(p), super.connectedCallback();
10
+ this.loadStyleText(b), super.connectedCallback();
14
11
  }
15
12
  static get observedAttributes() {
16
13
  return ["type", "color", "closeable"];
17
14
  }
18
- attributeChangedCallback(o, t, e) {
19
- const r = i(
20
- e,
21
- this[o],
22
- o
23
- );
24
- switch (r !== this[o] && (this[o] = r), o) {
15
+ attributeChangedCallback(t, o, r) {
16
+ const e = r.trim();
17
+ switch (t) {
25
18
  case "type":
26
- this._toggleTypeClass();
19
+ this._toggleTypeClass(e);
27
20
  break;
28
21
  case "color":
29
- this._toggleColorStyle();
22
+ this._toggleColorStyle(e);
30
23
  break;
31
24
  case "closable":
32
25
  if (!this.rendered) return;
33
- const a = g(".l-tag-close", this.root);
34
- a ? a.remove() : this.root.appendChild(this.#o());
26
+ const a = c(e, !1, "closeable"), s = d(".l-tag-close", this.root);
27
+ if (s) {
28
+ if (a) return;
29
+ s.remove();
30
+ } else
31
+ a && this.root.appendChild(this.#t());
35
32
  break;
36
33
  }
37
34
  }
38
35
  render() {
39
- const o = document.createDocumentFragment();
40
- return o.appendChild(
41
- l("div", { class: "l-tag-content", innerHTML: "<slot></slot>" })
42
- ), this.closeable && o.appendChild(this.#o()), o.appendChild(l("slot", { name: "suffix" })), o;
36
+ const t = document.createDocumentFragment();
37
+ return t.appendChild(l("div", { class: "l-tag-content", innerHTML: "<slot></slot>" })), this.getAttr("closeable", !1) && t.appendChild(this.#t()), t.appendChild(l("slot", { name: "suffix" })), t;
43
38
  }
44
- #o() {
39
+ #t() {
45
40
  return l("div", {
46
41
  class: "l-tag-close",
47
42
  innerHTML: "<l-close-icon></l-close-icon>",
48
43
  "data-action": "close"
49
44
  });
50
45
  }
51
- #t = (o) => {
52
- const [t, e, r] = d(o, "data-action", this);
53
- t && e === "close" && this.emit("close", { detail: { ...r.dataset } });
46
+ #r = (t) => {
47
+ const [o, r, e] = f(t, "data-action", this);
48
+ o && r === "close" && this.emit("close", { detail: { ...e.dataset } });
54
49
  };
55
50
  afterInit() {
56
- this._toggleTypeClass(), this._toggleColorStyle(), f(this.root, "click", this.#t);
51
+ this.classList.add(`l-tag--${this.getAttr("type", "info")}`), this._toggleColorStyle(), h(this.root, "click", this.#r);
57
52
  }
58
- _toggleTypeClass() {
53
+ _toggleTypeClass(t) {
59
54
  if (!this.rendered) return;
60
55
  let o = !1;
61
- for (const t of this.classList)
62
- if (t.startsWith("l-tag--")) {
63
- this.classList.replace(t, `l-tag--${this.type}`), o = !0;
56
+ for (const r of this.classList)
57
+ if (r.startsWith("l-tag--")) {
58
+ this.classList.replace(r, `l-tag--${t}`), o = !0;
64
59
  break;
65
60
  }
66
- o || this.classList.add(`l-tag--${this.type}`);
61
+ o || this.classList.add(`l-tag--${t}`);
67
62
  }
68
- _toggleColorStyle() {
69
- this.rendered && (c(this.color) ? (this.style.removeProperty("--l-tag-color"), this.style.removeProperty("--l-tag-border-color"), this.style.removeProperty("--l-tag-background")) : (this.style.setProperty("--l-tag-color", this.color), this.style.setProperty("--l-tag-border-color", this.color), this.style.setProperty(
70
- "--l-tag-background",
71
- n(this.color, 5, !0)
72
- )));
63
+ _toggleColorStyle(t) {
64
+ this.rendered && (n(t) ? (this.style.removeProperty("--l-tag-color"), this.style.removeProperty("--l-tag-border-color"), this.style.removeProperty("--l-tag-background")) : (this.style.setProperty("--l-tag-color", t), this.style.setProperty("--l-tag-border-color", t), this.style.setProperty("--l-tag-background", g(t, 5, !0))));
73
65
  }
74
66
  beforeDestroy() {
75
- h(this.root, "click", this.#t);
67
+ p(this.root, "click", this.#r);
76
68
  }
77
69
  }
78
70
  export {
79
- x as default
71
+ C as default
80
72
  };
package/package.json CHANGED
@@ -1,72 +1,67 @@
1
- {
2
- "name": "litos-ui",
3
- "version": "0.16.0",
4
- "description": "基于 Web Component 的 UI 组件库",
5
- "keywords": [
6
- "component library",
7
- "litos-ui",
8
- "ui framework",
9
- "web component"
10
- ],
11
- "homepage": "https://dvshu.github.io/litos-ui/",
12
- "bugs": {
13
- "url": "https://github.com/DvShu/litos-ui/issues"
14
- },
15
- "license": "MIT",
16
- "repository": {
17
- "type": "git",
18
- "url": "git+https://github.com/DvShu/litos-ui.git"
19
- },
20
- "files": [
21
- "lib",
22
- "styles"
23
- ],
24
- "type": "module",
25
- "main": "./lib/index.js",
26
- "module": "./lib/index.js",
27
- "types": "./lib/index.d.ts",
28
- "unpkg": "./lib/litos-ui.min.js",
29
- "jsdelivr": "./lib/litos-ui.min.js",
30
- "exports": {
31
- "./styles/*": "./styles/*",
32
- "./lib/*": "./lib/*",
33
- ".": {
34
- "types": "./lib/index.d.ts",
35
- "import": "./lib/index.js",
36
- "require": "./lib/index.js"
37
- }
38
- },
39
- "scripts": {
40
- "dev": "vite dev",
41
- "build": "vite build",
42
- "docs:dev": "vitepress dev docs --force --host 0.0.0.0",
43
- "docs:build": "vitepress build docs",
44
- "docs:preview": "vitepress preview docs",
45
- "inspect:eslint": "eslint --inspect-config",
46
- "create": "node scripts/index.js create",
47
- "dts:build": "tsc -p tsconfig.build.json && node scripts/dts.js",
48
- "lib:build": "pnpm build && pnpm dts:build"
49
- },
50
- "dependencies": {
51
- "iconify-icon": "^3.0.2",
52
- "ph-utils": "^0.16.5",
53
- "qrcode-generator-es": "^2.1.2",
54
- "shiki": "^3.21.0"
55
- },
56
- "devDependencies": {
57
- "@eslint/js": "^9.39.2",
58
- "@eslint/markdown": "^7.5.1",
59
- "@types/node": "^25.0.8",
60
- "eslint": "^9.39.2",
61
- "globals": "^17.0.0",
62
- "less": "^4.5.1",
63
- "lightningcss": "^1.30.2",
64
- "oxfmt": "^0.24.0",
65
- "oxlint": "^1.39.0",
66
- "typescript": "^5.9.3",
67
- "typescript-eslint": "^8.53.0",
68
- "vite": "^7.3.1",
69
- "vite-plugin-dts": "^4.5.4",
70
- "vitepress": "^1.6.4"
71
- }
72
- }
1
+ {
2
+ "name": "litos-ui",
3
+ "version": "0.16.2",
4
+ "description": "基于 Web Component 的 UI 组件库",
5
+ "keywords": [
6
+ "component library",
7
+ "litos-ui",
8
+ "ui framework",
9
+ "web component"
10
+ ],
11
+ "homepage": "https://dvshu.github.io/litos-ui/",
12
+ "bugs": {
13
+ "url": "https://github.com/DvShu/litos-ui/issues"
14
+ },
15
+ "license": "MIT",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/DvShu/litos-ui.git"
19
+ },
20
+ "files": [
21
+ "lib",
22
+ "styles"
23
+ ],
24
+ "type": "module",
25
+ "main": "./lib/index.js",
26
+ "module": "./lib/index.js",
27
+ "types": "./lib/index.d.ts",
28
+ "unpkg": "./lib/litos-ui.min.js",
29
+ "jsdelivr": "./lib/litos-ui.min.js",
30
+ "exports": {
31
+ "./styles/*": "./styles/*",
32
+ "./lib/*": "./lib/*",
33
+ ".": {
34
+ "types": "./lib/index.d.ts",
35
+ "import": "./lib/index.js",
36
+ "require": "./lib/index.js"
37
+ }
38
+ },
39
+ "scripts": {
40
+ "dev": "vite dev",
41
+ "build": "vite build",
42
+ "docs:dev": "vitepress dev docs --force --host 0.0.0.0",
43
+ "docs:build": "vitepress build docs",
44
+ "docs:preview": "vitepress preview docs",
45
+ "inspect:eslint": "eslint --inspect-config",
46
+ "create": "node scripts/index.js create",
47
+ "dts:build": "tsc -p tsconfig.build.json && node scripts/dts.js",
48
+ "lib:build": "pnpm build && pnpm dts:build"
49
+ },
50
+ "dependencies": {
51
+ "iconify-icon": "^3.0.2",
52
+ "ph-utils": "^0.16.5",
53
+ "qrcode-generator-es": "^2.1.2",
54
+ "shiki": "^3.21.0"
55
+ },
56
+ "devDependencies": {
57
+ "@types/node": "^25.0.10",
58
+ "less": "^4.5.1",
59
+ "lightningcss": "^1.31.1",
60
+ "oxfmt": "^0.27.0",
61
+ "oxlint": "^1.42.0",
62
+ "typescript": "^5.9.3",
63
+ "vite": "^7.3.1",
64
+ "vite-plugin-dts": "^4.5.4",
65
+ "vitepress": "^1.6.4"
66
+ }
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
- };