litos-ui 0.3.0 → 0.4.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 (45) hide show
  1. package/lib/base.d.ts +3 -3
  2. package/lib/base.js +28 -27
  3. package/lib/browser.d.ts +5 -0
  4. package/lib/color_picker/index.d.ts +14 -0
  5. package/lib/color_picker/index.js +44 -0
  6. package/lib/event.d.ts +30 -0
  7. package/lib/event.js +24 -0
  8. package/lib/form/form_inner.js +15 -15
  9. package/lib/icon/moon.d.ts +6 -0
  10. package/lib/icon/moon.js +16 -0
  11. package/lib/icon/reduction.d.ts +6 -0
  12. package/lib/icon/reduction.js +16 -0
  13. package/lib/icon/refresh_left.d.ts +6 -0
  14. package/lib/icon/refresh_left.js +16 -0
  15. package/lib/icon/refresh_right.d.ts +5 -0
  16. package/lib/icon/refresh_right.js +13 -0
  17. package/lib/icon/sort.d.ts +5 -0
  18. package/lib/icon/sort.js +13 -0
  19. package/lib/icon/sun.d.ts +6 -0
  20. package/lib/icon/sun.js +16 -0
  21. package/lib/index-1Gw78Uze.js +4 -0
  22. package/lib/index-BeOxuMd4.js +4 -0
  23. package/lib/index-BxlGVrX3.js +4 -0
  24. package/lib/index-C98Kx857.js +4 -0
  25. package/lib/index-CMz7GCCH.js +4 -0
  26. package/lib/index-CPpMuwU3.js +4 -0
  27. package/lib/index-DKvzJmsR.js +4 -0
  28. package/lib/index.d.ts +22 -0
  29. package/lib/index.js +51 -27
  30. package/lib/litos-ui.css +1 -1
  31. package/lib/litos-ui.min.js +1 -1
  32. package/lib/message/index.js +13 -13
  33. package/lib/polygon/index.d.ts +9 -0
  34. package/lib/polygon/index.js +30 -0
  35. package/lib/select_ori/index.d.ts +21 -0
  36. package/lib/select_ori/index.js +59 -0
  37. package/lib/switch/index.d.ts +21 -0
  38. package/lib/switch/index.js +67 -0
  39. package/lib/tabbar/index.d.ts +50 -0
  40. package/lib/tabbar/index.js +186 -0
  41. package/lib/util.d.ts +3 -1
  42. package/lib/util.js +26 -15
  43. package/package.json +7 -7
  44. package/lib/index-Boq1Q7q9.js +0 -4
  45. package/lib/index-ColsUDnt.js +0 -4
@@ -0,0 +1,67 @@
1
+ var o = Object.defineProperty;
2
+ var a = (c, i, t) => i in c ? o(c, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[i] = t;
3
+ var s = (c, i, t) => a(c, typeof i != "symbol" ? i + "" : i, t);
4
+ import { $one as n, on as l, off as r, formatClass as d, toggleClass as u } from "ph-utils/dom";
5
+ import k from "../form/form_inner.js";
6
+ import { initAttr as f, parseAttrValue as _ } from "../util.js";
7
+ class m extends k {
8
+ constructor() {
9
+ super(!1);
10
+ s(this, "actionRender");
11
+ s(this, "checkedText");
12
+ s(this, "uncheckedText");
13
+ s(this, "_changeEmit");
14
+ s(this, "_$root");
15
+ s(this, "_handleClick", (t) => {
16
+ this.isDisabled() || (this.setValue(!this.value), this.dispatchEvent(this._changeEmit));
17
+ });
18
+ f(this);
19
+ const t = this.value ? _(this.value, !1, "value") : !1;
20
+ this._resetValue = t, this.value = t, this._changeEmit = new CustomEvent("change");
21
+ }
22
+ connectedCallback() {
23
+ this.loadStyle(["switch"]), super.connectedCallback(), this.pushValueChange(), this._$root = n(".l-switch", this.root), this._renderAction(), l(this._$root, "click", this._handleClick);
24
+ }
25
+ disconnectedCallback() {
26
+ super.disconnectedCallback(), this._$root && r(this._$root, "click", this._handleClick), this.actionRender = void 0;
27
+ }
28
+ render() {
29
+ const t = document.createElement("div");
30
+ t.className = d({
31
+ "l-switch": !0,
32
+ "l-switch--disabled": this.isDisabled(),
33
+ "l-switch--checked": this.value
34
+ });
35
+ const e = ['<div class="l-switch-action"></div>'];
36
+ if (this.checkedText || this.uncheckedText) {
37
+ const h = this.value ? this.checkedText || "" : this.uncheckedText || "";
38
+ e.push(`<span class="l-switch-text">${h}</span>`);
39
+ }
40
+ return t.innerHTML = e.join(""), t;
41
+ }
42
+ setValue(t) {
43
+ if (super.setValue(t), this._$root) {
44
+ u(this._$root, "l-switch--checked");
45
+ const e = n(".l-switch-text", this._$root);
46
+ e && (e.textContent = this.value ? this.checkedText || "" : this.uncheckedText || ""), this._renderAction();
47
+ }
48
+ }
49
+ setActionRender(t) {
50
+ this.actionRender = t, this._renderAction();
51
+ }
52
+ _renderAction() {
53
+ if (!this._$root) return;
54
+ const t = n(".l-switch-action", this._$root);
55
+ if (this.actionRender) {
56
+ const e = this.actionRender({ checked: this.value });
57
+ typeof e == "string" ? t.innerHTML = e : t.innerHTML = e.outerHTML;
58
+ } else {
59
+ const e = n('[slot="checked-action"]', this), h = n('[slot="unchecked-action"]', this);
60
+ this.value && e ? t.innerHTML = '<slot name="checked-action"></slot>' : !this.value && h && (t.innerHTML = '<slot name="unchecked-action"></slot>');
61
+ }
62
+ }
63
+ }
64
+ s(m, "baseName", "switch");
65
+ export {
66
+ m as default
67
+ };
@@ -0,0 +1,50 @@
1
+ import BaseComponent from "../base";
2
+ type TabbarItem = {
3
+ name: string;
4
+ text?: string | (() => string | HTMLElement);
5
+ icon?: string | (() => string | HTMLElement);
6
+ };
7
+ export declare function shouldEventNext(e: Event, eventFlag: string, endRoot?: HTMLElement | ShadowRoot): [boolean, string, HTMLElement];
8
+ export default class Tabbar extends BaseComponent {
9
+ #private;
10
+ static baseName: string;
11
+ /**
12
+ * 标签类型:
13
+ * 1. nav - 每一项等分排列, 类似于移动端底部的标签栏
14
+ * 2. bar - 选项卡
15
+ * 3. card - 卡片
16
+ */
17
+ type: "nav" | "bar" | "card";
18
+ name?: string;
19
+ justifyContent?: string;
20
+ gap?: string;
21
+ private $line?;
22
+ constructor();
23
+ connectedCallback(): void;
24
+ static get observedAttributes(): string[] | null | undefined;
25
+ attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
26
+ disconnectedCallback(): void;
27
+ render(): any;
28
+ /**
29
+ * 设置选项卡栏的项目列表。
30
+ * @param items - 选项卡栏项目的数组。
31
+ * 该方法首先清空选项卡栏的包装器元素,然后根据传入的项目数组创建并追加新的选项卡项目。
32
+ */
33
+ setItems(items: TabbarItem[]): void;
34
+ /**
35
+ * 向标签栏添加项目。
36
+ * @param items 要添加的标签栏项目数组。
37
+ * @returns 无返回值。
38
+ */
39
+ addItems(items: TabbarItem[]): void;
40
+ private _init;
41
+ private _destroy;
42
+ private _handleClick;
43
+ private _updateActive;
44
+ /**
45
+ * 初始化线条的方法,在微任务队列中执行。
46
+ * 该方法用于设置或更新标签栏中的线条位置或样式。
47
+ */
48
+ private _updateLine;
49
+ }
50
+ export {};
@@ -0,0 +1,186 @@
1
+ var A = Object.defineProperty;
2
+ var k = (s) => {
3
+ throw TypeError(s);
4
+ };
5
+ var N = (s, a, t) => a in s ? A(s, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[a] = t;
6
+ var p = (s, a, t) => N(s, typeof a != "symbol" ? a + "" : a, t), w = (s, a, t) => a.has(s) || k("Cannot " + t);
7
+ var x = (s, a, t) => a.has(s) ? k("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(s) : a.set(s, t);
8
+ var m = (s, a, t) => (w(s, a, "access private method"), t);
9
+ import { isBlank as u, isNumeric as T } from "ph-utils";
10
+ import W from "../base.js";
11
+ import { initAttr as j, parseAttrValue as C } from "../util.js";
12
+ import { addClass as g, removeClass as v, $one as c, create as b, $ as L, iterate as E, on as S, off as B, isVisible as D, formatStyle as I, formatClass as M } from "ph-utils/dom";
13
+ function R(s, a, t) {
14
+ let e = s.target, i = "";
15
+ do
16
+ if (t && t.isSameNode(e) || e.tagName === "BODY" || (e.getAttribute && (i = e.getAttribute(a) || ""), i === "" && (e = e.parentNode), !e)) break;
17
+ while (i === "");
18
+ return [i !== "__stop__" && i !== "", i, e];
19
+ }
20
+ var h, y, _;
21
+ class F extends W {
22
+ constructor() {
23
+ super();
24
+ x(this, h);
25
+ /**
26
+ * 标签类型:
27
+ * 1. nav - 每一项等分排列, 类似于移动端底部的标签栏
28
+ * 2. bar - 选项卡
29
+ * 3. card - 卡片
30
+ */
31
+ p(this, "type", "nav");
32
+ p(this, "name");
33
+ p(this, "justifyContent");
34
+ p(this, "gap");
35
+ p(this, "$line");
36
+ p(this, "_handleClick", (t) => {
37
+ const [e, i] = R(t, "l-name", this.root);
38
+ e && i !== this.name && (this.name = i, this.dispatchEvent(
39
+ new CustomEvent("change", {
40
+ detail: {
41
+ name: i
42
+ }
43
+ })
44
+ ), this._updateActive(), this._updateLine());
45
+ });
46
+ j(this), this.root;
47
+ }
48
+ connectedCallback() {
49
+ this.loadStyle(["tabbar"]), g(this, `l-tabbar--${this.type}`), !u(this.gap) && !this.gap.startsWith("0") && g(this, "l-tabbar-gap"), super.connectedCallback(), this._init();
50
+ }
51
+ static get observedAttributes() {
52
+ return ["name", "type", "justify-content", "gap"];
53
+ }
54
+ attributeChangedCallback(t, e, i) {
55
+ if (t === "name") {
56
+ const r = C(i, void 0);
57
+ this.name = r, this._updateActive(), this._updateLine();
58
+ } else if (t === "type") {
59
+ const r = C(i, "nav");
60
+ if (r !== this.type && (v(this, `l-tabbar--${this.type}`), this.type = r, v(this, `l-tabbar--${r}`), r === "card")) {
61
+ let n = c(".l-tabbar-card-border", this.root);
62
+ n || (n = b("div", { class: "l-tabbar-card-border" }), this.root.appendChild(n));
63
+ }
64
+ } else {
65
+ const r = C(i, void 0);
66
+ this[t] = r;
67
+ const n = c(".l-tabbar-wrapper", this.root);
68
+ n && (n.style.cssText = m(this, h, y).call(this)), t === "gap" && (!u(this.gap) && !this.gap.startsWith("0") ? g(this, "l-tabbar-gap") : v(this, "l-tabbar-gap"));
69
+ }
70
+ }
71
+ disconnectedCallback() {
72
+ super.disconnectedCallback(), this._destroy();
73
+ }
74
+ render() {
75
+ const t = L("[l-name]", this), e = document.createDocumentFragment(), i = document.createElement("div");
76
+ if (i.className = "l-tabbar-wrapper", i.style.cssText = m(this, h, y).call(this), i.setAttribute("part", "default"), t.length > 0 && E(t, (r) => {
77
+ const n = r.getAttribute("l-name");
78
+ if (n) {
79
+ const o = r.cloneNode(!0);
80
+ o.classList.add("l-tabbar-item"), n === this.name && o.classList.add("active");
81
+ const d = c("[l-icon]", o), f = L(":not([l-icon])", o);
82
+ if (d) {
83
+ const l = b("div", {
84
+ class: [
85
+ "l-tabbar-item-icon",
86
+ f.length === 0 ? "only" : void 0
87
+ ]
88
+ });
89
+ l.appendChild(d.cloneNode(!0)), d.replaceWith(l);
90
+ }
91
+ i.appendChild(o);
92
+ }
93
+ }), e.appendChild(i), this.type === "card") {
94
+ const r = b("div", { class: "l-tabbar-card-border" });
95
+ e.appendChild(r);
96
+ }
97
+ return e;
98
+ }
99
+ /**
100
+ * 设置选项卡栏的项目列表。
101
+ * @param items - 选项卡栏项目的数组。
102
+ * 该方法首先清空选项卡栏的包装器元素,然后根据传入的项目数组创建并追加新的选项卡项目。
103
+ */
104
+ setItems(t) {
105
+ const e = c(".l-tabbar-wrapper", this.root);
106
+ e && (e.innerHTML = "", e.appendChild(m(this, h, _).call(this, t)));
107
+ }
108
+ /**
109
+ * 向标签栏添加项目。
110
+ * @param items 要添加的标签栏项目数组。
111
+ * @returns 无返回值。
112
+ */
113
+ addItems(t) {
114
+ const e = c(".l-tabbar-wrapper", this.root);
115
+ e && e.appendChild(m(this, h, _).call(this, t));
116
+ }
117
+ _init() {
118
+ S(this.root, "click", this._handleClick), setTimeout(() => {
119
+ this._updateLine();
120
+ }, 300);
121
+ }
122
+ _destroy() {
123
+ B(this.root, "click", this._handleClick), this.$line = void 0;
124
+ }
125
+ _updateActive() {
126
+ const t = c(".active", this.root);
127
+ t && v(t, "active");
128
+ const e = c(`[l-name="${this.name}"]`, this.root);
129
+ e && g(e, "active");
130
+ }
131
+ /**
132
+ * 初始化线条的方法,在微任务队列中执行。
133
+ * 该方法用于设置或更新标签栏中的线条位置或样式。
134
+ */
135
+ _updateLine() {
136
+ queueMicrotask(() => {
137
+ if (!this.name || this.type === "nav" || !this.rendered) return;
138
+ const t = c(".active", this.root);
139
+ if (!t) return;
140
+ const e = t.offsetLeft;
141
+ if (!this.$line) {
142
+ const i = b("div", { class: "l-tabbar--bar-line" });
143
+ this.root.appendChild(i), this.$line = c(".l-tabbar--bar-line", this.root);
144
+ }
145
+ this.$line.style.cssText = `width:${t.offsetWidth}px;left:${e}px`, D(t, this) || this.scrollTo({
146
+ left: e,
147
+ behavior: "smooth"
148
+ });
149
+ });
150
+ }
151
+ }
152
+ h = new WeakSet(), y = function() {
153
+ const t = {};
154
+ if (u(this.justifyContent) || (t["justify-content"] = this.justifyContent), !u(this.gap)) {
155
+ let e = this.gap;
156
+ T(e, { isPositive: !0 }) && (e = `${e}px`), t["--l-tabbar-item-gap"] = e;
157
+ }
158
+ return I(t);
159
+ }, _ = function(t) {
160
+ const e = document.createDocumentFragment();
161
+ for (let i = 0, r = t.length; i < r; i++) {
162
+ const n = t[i], o = b("div", {
163
+ class: M([
164
+ "l-tabbar-item",
165
+ this.name === n.name ? "active" : void 0
166
+ ]),
167
+ "l-name": n.name
168
+ }), d = n.icon;
169
+ if (d) {
170
+ const l = b("div", { class: "l-tabbar-item-icon" });
171
+ let $ = typeof d == "string" ? d : d();
172
+ typeof $ == "string" ? l.innerHTML = $ : l.appendChild($), o.appendChild(l);
173
+ }
174
+ const f = n.text;
175
+ if (f) {
176
+ let l = typeof f == "string" ? f : f();
177
+ typeof l == "string" ? o.appendChild(b(l)) : o.appendChild(l);
178
+ }
179
+ e.appendChild(o);
180
+ }
181
+ return e;
182
+ }, p(F, "baseName", "tabbar");
183
+ export {
184
+ F as default,
185
+ R as shouldEventNext
186
+ };
package/lib/util.d.ts CHANGED
@@ -21,9 +21,9 @@ export declare function hideTransition(el?: string | HTMLElement, remove?: boole
21
21
  * @returns {string} 唯一标识符字符串
22
22
  */
23
23
  export declare function useId(): string;
24
+ export declare function parseAttrValue(value: string, defaultValue?: string): string;
24
25
  export declare function parseAttrValue(value: string, defaultValue?: boolean, key?: string): boolean;
25
26
  export declare function parseAttrValue(value: string, defaultValue?: number, key?: string): number;
26
- export declare function parseAttrValue(value: string, defaultValue: string, key?: string): string;
27
27
  /**
28
28
  * 初始化元素的属性值。
29
29
  * 遍历元素的所有属性,并对每个属性的值进行解析,然后将解析后的值赋给元素的相应属性。
@@ -37,4 +37,6 @@ export declare function initAttr(el: HTMLElement): void;
37
37
  * @returns 返回拼接好的属性字符串。
38
38
  */
39
39
  export declare function tagAttr(attr: string, value: string | undefined | boolean): string;
40
+ export declare function tagAttrs(attr: [string, string | undefined | boolean][]): string;
41
+ export declare function setAttrs(el: HTMLElement, attrs: [string, string | undefined | boolean][]): void;
40
42
  export {};
package/lib/util.js CHANGED
@@ -3,21 +3,21 @@ let m = -1, i = {
3
3
  /** 注册应用的前缀 */
4
4
  prefix: "l"
5
5
  };
6
- function g(t) {
6
+ function y(t) {
7
7
  i = { ...i, ...t };
8
8
  }
9
- function h(t, n) {
9
+ function b(t, n) {
10
10
  const e = n || `${i.prefix}-${t.baseName}`;
11
11
  customElements.get(e) || customElements.define(e, t);
12
12
  }
13
- function l(t, n = !1) {
13
+ function h(t, n = !1) {
14
14
  t = t || "l-transition";
15
15
  let e = t;
16
16
  typeof t == "string" && (e = document.querySelector(t)), e && e.hide(() => {
17
17
  n && e.remove();
18
18
  });
19
19
  }
20
- function y() {
20
+ function l() {
21
21
  return `${i.prefix}-${++m}`;
22
22
  }
23
23
  function p(t, n, e) {
@@ -31,26 +31,37 @@ function p(t, n, e) {
31
31
  return t;
32
32
  }
33
33
  }
34
- function b(t) {
34
+ function A(t) {
35
35
  const n = t.attributes;
36
36
  for (const e of n) {
37
- const { name: r, value: c } = e;
37
+ const { name: r, value: s } = e;
38
38
  if (r.startsWith("data-") || r.startsWith("aria-") || r.startsWith("_") || r.startsWith("$"))
39
39
  continue;
40
- const o = r.split("-").map((s, a) => a === 0 ? s : s[0].toUpperCase() + s.slice(1)).join(""), f = p(c, t[o], r);
41
- t[o] = f, r === "value" && (t._resetValue = f);
40
+ const f = r.split("-").map((o, a) => a === 0 ? o : o[0].toUpperCase() + o.slice(1)).join(""), c = p(s, t[f], r);
41
+ t[f] = c, r === "value" && (t._resetValue = c);
42
42
  }
43
43
  }
44
- function x(t, n) {
44
+ function g(t, n) {
45
45
  let e = " ";
46
46
  return n === !0 ? e = ` ${t}` : typeof n == "string" && !u(n) && (e = ` ${t}="${n}"`), e;
47
47
  }
48
+ function x(t) {
49
+ return t.map((e) => g(e[0], e[1])).join("");
50
+ }
51
+ function N(t, n) {
52
+ for (const e of n) {
53
+ const r = e[1], s = e[0];
54
+ r === !0 ? t.setAttribute(s, "") : typeof r == "string" && !u(r) && t.setAttribute(s, r);
55
+ }
56
+ }
48
57
  export {
49
- g as config,
50
- l as hideTransition,
51
- b as initAttr,
58
+ y as config,
59
+ h as hideTransition,
60
+ A as initAttr,
52
61
  p as parseAttrValue,
53
- h as regist,
54
- x as tagAttr,
55
- y as useId
62
+ b as regist,
63
+ N as setAttrs,
64
+ g as tagAttr,
65
+ x as tagAttrs,
66
+ l as useId
56
67
  };
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "litos-ui",
3
3
  "description": "基于 Web Component 的 UI 组件库",
4
- "version": "0.3.0",
4
+ "version": "0.4.0",
5
5
  "type": "module",
6
6
  "devDependencies": {
7
- "@eslint/js": "^9.16.0",
8
- "@types/node": "^22.10.1",
9
- "eslint": "^9.16.0",
7
+ "@eslint/js": "^9.17.0",
8
+ "@types/node": "^22.10.2",
9
+ "eslint": "^9.17.0",
10
10
  "globals": "^15.13.0",
11
11
  "less": "^4.2.1",
12
12
  "lightningcss": "^1.28.2",
13
13
  "prettier": "^3.4.2",
14
14
  "typescript": "^5.7.2",
15
- "typescript-eslint": "^8.18.0",
15
+ "typescript-eslint": "^8.18.1",
16
16
  "vite": "^6.0.3",
17
17
  "vitepress": "^1.5.0"
18
18
  },
@@ -50,8 +50,8 @@
50
50
  },
51
51
  "license": "MIT",
52
52
  "dependencies": {
53
- "ph-utils": "^0.11.4",
54
- "shiki": "^1.24.1"
53
+ "ph-utils": "^0.12.4",
54
+ "shiki": "^1.24.2"
55
55
  },
56
56
  "scripts": {
57
57
  "docs:dev": "vitepress dev docs",
@@ -1,4 +0,0 @@
1
- const r = ":host{display:contents}:host{display:inline-block}.l-btn{--l-btn-text-color: #ffffff;--l-btn-hover-text-color: var(--l-btn-text-color);--l-btn-active-text-color: var(--l-btn-text-color);--l-btn-border-color: var(--l-primary-color, #722ed1);--l-btn-background: var(--l-btn-border-color);--l-btn-hover-border-color: var(--l-primary-color-light1, #9254de);--l-btn-hover-background: var(--l-btn-hover-border-color);--l-btn-active-border-color: var(--l-primary-color-dark1, #531dab);--l-btn-active-background: var(--l-btn-active-border-color);--l-btn-disabled-color: #c9c9c9;--l-btn-disabled-background: #fbfbfb;--l-btn-disabled-border-color: #e6e6e6;display:inline-flex;justify-content:center;align-items:center;cursor:pointer;outline:none;box-sizing:border-box;vertical-align:middle;padding:0 15px;line-height:1;height:var(--l-form-edit-height, 32px);border-radius:3px;font-size:14px;color:var(--l-btn-text-color);background:var(--l-btn-background);border:1px solid var(--l-btn-border-color);position:relative;gap:5px;transition:border-color .3s,background-color .3s,color .3s}.l-btn:hover{border-color:var(--l-btn-hover-border-color, var(--l-btn-hover-background));color:var(--l-btn-hover-text-color);background:var(--l-btn-hover-background)}.l-btn:active{border-color:var(--l-btn-active-border-color, var(--l-btn-active-background));color:var(--l-btn-active-text-color);background:var(--l-btn-active-background)}.l-btn-normal{--l-btn-text-color: auto;--l-btn-background: transparent;--l-btn-border-color: #d9d9d9;--l-btn-hover-text-color: var(--l-primary-color-light1, #9254de);--l-btn-active-text-color: var(--l-primary-color-dark1, #531dab);--l-btn-hover-background: #fff;--l-btn-active-background: #fff;--l-btn-hover-border-color: var(--l-btn-hover-text-color);--l-btn-active-border-color: var(--l-btn-active-text-color)}.l-btn-primary{--l-btn-background: var(--l-primary-color, #722ed1);--l-btn-hover-background: var(--l-primary-color-light1, #9254de);--l-btn-active-background: var(--l-primary-color-dark1, #531dab)}.l-btn:not(.l-btn-loading):disabled{border-color:var(--l-btn-disabled-border-color);background:var(--l-btn-disabled-background);color:var(--l-btn-disabled-color);cursor:not-allowed;opacity:1}.l-btn-text{--l-btn-background: transparent;--l-btn-border-color: transparent;--l-btn-hover-border-color: transparent;--l-btn-active-border-color: transparent;--l-btn-disabled-background: transparent;--l-btn-disabled-border-color: transparent;--l-btn-hover-background: transparent;--l-btn-active-background: transparent;height:auto;padding:5px}.l-btn-primary.l-btn-text{--l-btn-text-color: var(--l-primary-color, #722ed1);--l-btn-hover-text-color: var(--l-primary-color-light1, #9254de);--l-btn-active-text-color: var(--l-primary-color-dark1, #531dab)}.l-btn-ghost{--l-btn-text-color: var(--l-btn-border-color);--l-btn-background: transparent;--l-btn-hover-background: transparent;--l-btn-active-background: transparent;--l-btn-hover-text-color: var(--l-btn-hover-border-color);--l-btn-active-text-color: var(--l-btn-active-border-color)}.l-btn-round{border-radius:calc(var(--l-form-edit-height, 32px) / 2)}.l-btn-circle{border-radius:50%;width:var(--l-form-edit-height, 32px);padding:0}.l-btn-block{width:100%}.l-btn:not(.l-btn-text)+.l-btn{margin-left:10px}html.dark .l-btn:disabled{--l-btn-disabled-background: rgba(255, 255, 255, .08);--l-btn-disabled-color: rgba(255, 255, 255, .3);--l-btn-disabled-border-color: rgba(255, 255, 255, .3)}";
2
- export {
3
- r as default
4
- };
@@ -1,4 +0,0 @@
1
- const l = ':host{display:contents}.l-form{display:grid;grid-template-columns:var(--l-form-label-width, auto) 1fr;row-gap:20px}.l-form-item{display:var(--l-form-item-display, contents);font-size:14px;grid-template-columns:1fr}.l-form-item__label{text-align:var(--l-form-label-align, right);display:inline-block;width:var(--l-form-label-width, auto);height:var(--l-form-edit-height, 32px);line-height:var(--l-form-edit-height, 32px);color:#606266;padding:0 10px 0 0}.l-form-item__label:empty{display:var(--l-form-label-empty-display, inline-block)}.l-form-item.is-required .l-form-item__label:before{content:"*";margin-right:4px;color:var(--l-warn-color, #f56c6c);vertical-align:middle}.l-form-item__content{flex:1;position:relative;display:flex;align-items:center}.l-form-item__error{font-size:12px;line-height:1;position:absolute;top:100%;left:0;color:var(--nt-error-color, #ed3f13);padding-top:3px}.l-form--left .l-form-item__label{text-align:left}.l-form--top{grid-template-columns:1fr}.l-form--top .l-form-item{display:grid;grid-template-columns:1fr}.l-form--top .l-form-item__label{text-align:left}.l-form--top .l-form-item__label:empty{display:none}.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-item.l-form-item--left{--l-form-label-align: left}.l-form.l-form--top,.l-form-item.l-form-item--top{--l-form-item-display: grid;--l-form-label-align: left;--l-form-label-empty-display: none;grid-template-columns:1fr}';
2
- export {
3
- l as default
4
- };