litos-ui 0.15.8 → 0.16.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.
- package/lib/button/index.d.ts +4 -0
- package/lib/button/index.js +48 -40
- package/lib/check/checkbox.js +1 -1
- package/lib/check/index.d.ts +2 -1
- package/lib/check/index.js +25 -12
- package/lib/check/radio.js +1 -1
- package/lib/check-C7YSuH60.js +4 -0
- package/lib/color_picker/index.js +1 -1
- package/lib/description_panel/index.js +4 -9
- package/lib/dialog/dialog_container.js +4 -6
- package/lib/index-DvcllHRh.js +4 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +163 -164
- package/lib/input/index.js +1 -1
- package/lib/mask/index.js +1 -6
- package/lib/message/index.d.ts +11 -12
- package/lib/message/index.js +38 -39
- package/lib/modal/index.js +1 -1
- package/lib/select/index.js +1 -6
- package/lib/select_ori/index.js +1 -1
- package/lib/space/index.d.ts +8 -0
- package/lib/space/index.js +35 -0
- package/lib/table/index.d.ts +2 -2
- package/lib/table/index.js +109 -100
- package/lib/table/types.d.ts +1 -1
- package/lib/utils/index.d.ts +0 -25
- package/lib/utils/index.js +40 -87
- package/lib/utils/popover.js +24 -17
- package/package.json +72 -71
- package/styles/container.css +1 -0
- package/styles/dark.css +13 -0
- package/styles/reset.css +3 -5
- package/styles/vars.css +10 -12
- package/lib/check-A86JxUfd.js +0 -4
- package/lib/index-D4II9KsF.js +0 -4
package/lib/button/index.d.ts
CHANGED
|
@@ -6,10 +6,14 @@ export default class Button extends BaseComponent {
|
|
|
6
6
|
loadingText: string;
|
|
7
7
|
_height?: string | number;
|
|
8
8
|
_disabled: boolean;
|
|
9
|
+
_loading: boolean;
|
|
9
10
|
get height(): string | number | undefined;
|
|
10
11
|
set height(height: string | number | undefined);
|
|
11
12
|
get disabled(): boolean;
|
|
12
13
|
set disabled(value: boolean);
|
|
14
|
+
get loading(): boolean;
|
|
15
|
+
set loading(value: boolean);
|
|
16
|
+
setLoading(value: boolean): void;
|
|
13
17
|
setDisabled(value: boolean): void;
|
|
14
18
|
static get observedAttributes(): string[];
|
|
15
19
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
package/lib/button/index.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { parseAttrValue as i, initAttr as c } from "../utils/index.js";
|
|
2
2
|
import h from "../base.js";
|
|
3
|
-
import { $one as
|
|
3
|
+
import { $one as b, addClass as g, removeClass as f, on as p, off as v, formatClass as u, formatStyle as m, getAttr as k } from "ph-utils/dom";
|
|
4
4
|
import { adjust as d } from "ph-utils/color";
|
|
5
5
|
import { a as x } from "../animation-DttknHkX.js";
|
|
6
6
|
const y = ":host{--l-btn-padding: 0 15px;--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;--l-btn-height: var(--l-form-control-height, 32px);display:inline-flex;width:auto;height:var(--l-btn-height);text-indent:0;box-sizing:border-box;border-radius:var(--l-border-radius, 3px)}:host([block]){width:100%}.l-btn{width:100%;display:inline-flex;justify-content:center;align-items:center;cursor:pointer;outline:none;box-sizing:border-box;vertical-align:middle;padding:var(--l-btn-padding);line-height:1;height:100%;border-radius:inherit;color:var(--l-btn-text-color);background:var(--l-btn-background);border:1px solid var(--l-btn-border-color);position:relative;gap:var(--l-btn-gap, 5px);font-size:inherit;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-disabled-border-color: var(--l-primary-color-light2, #b37feb);--l-btn-disabled-background: var(--l-primary-color-light2, #b37feb);--l-btn-disabled-color: #ffffff}.l-btn: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.l-btn-loading{cursor:default}.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;--l-btn-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-control-height, 32px) / 2)}.l-btn-circle{border-radius:50%;width:var(--l-form-control-height, 32px);padding:0}.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)}";
|
|
7
|
-
class
|
|
7
|
+
class H extends h {
|
|
8
8
|
static baseName = "button";
|
|
9
9
|
htmlType = "button";
|
|
10
10
|
/** 加载中文本 */
|
|
11
11
|
loadingText = "";
|
|
12
12
|
_height;
|
|
13
13
|
_disabled = !1;
|
|
14
|
+
_loading = !1;
|
|
14
15
|
get height() {
|
|
15
16
|
return this._height;
|
|
16
17
|
}
|
|
@@ -23,9 +24,20 @@ class B extends h {
|
|
|
23
24
|
set disabled(t) {
|
|
24
25
|
this.setDisabled(t);
|
|
25
26
|
}
|
|
27
|
+
get loading() {
|
|
28
|
+
return this._loading;
|
|
29
|
+
}
|
|
30
|
+
set loading(t) {
|
|
31
|
+
this.setLoading(t);
|
|
32
|
+
}
|
|
33
|
+
setLoading(t) {
|
|
34
|
+
this._loading = t;
|
|
35
|
+
const r = b(".l-btn", this.root);
|
|
36
|
+
r && (t ? (g(r, "l-btn-loading"), r.disabled = !0, r.innerHTML = this.loadingBody()) : (f(r, "l-btn-loading"), r.disabled = this.disabled, r.innerHTML = "<slot></slot>"));
|
|
37
|
+
}
|
|
26
38
|
setDisabled(t) {
|
|
27
39
|
this._disabled = t;
|
|
28
|
-
const r =
|
|
40
|
+
const r = b(".l-btn", this.root);
|
|
29
41
|
r && (r.disabled = t);
|
|
30
42
|
}
|
|
31
43
|
// 初始化属性观察器
|
|
@@ -33,33 +45,29 @@ class B extends h {
|
|
|
33
45
|
return ["loading", "color", "disabled", "height"];
|
|
34
46
|
}
|
|
35
47
|
// 当属性发生变化时调用的回调函数
|
|
36
|
-
attributeChangedCallback(t, r,
|
|
37
|
-
const
|
|
38
|
-
if (
|
|
48
|
+
attributeChangedCallback(t, r, o) {
|
|
49
|
+
const e = b(".l-btn", this.root);
|
|
50
|
+
if (e) {
|
|
39
51
|
if (t === "loading") {
|
|
40
|
-
|
|
52
|
+
const n = i(o, !1, t);
|
|
53
|
+
this.setLoading(n);
|
|
41
54
|
return;
|
|
42
55
|
} else if (t === "color") {
|
|
43
56
|
const n = this.getAttr("text", !1), a = this.getAttr("ghost", !1);
|
|
44
|
-
|
|
57
|
+
e.style.cssText = this.applyColor(o, n, a);
|
|
45
58
|
return;
|
|
46
59
|
} else if (t === "disabled") {
|
|
47
|
-
const n = i(
|
|
60
|
+
const n = i(o, !1, "disabled");
|
|
48
61
|
this.setDisabled(n);
|
|
49
62
|
return;
|
|
50
63
|
}
|
|
51
64
|
}
|
|
52
65
|
const l = i(
|
|
53
|
-
|
|
66
|
+
o,
|
|
54
67
|
this[t],
|
|
55
68
|
t
|
|
56
69
|
);
|
|
57
|
-
|
|
58
|
-
switch (this[t] = l, t) {
|
|
59
|
-
case "height":
|
|
60
|
-
this.rendered && this._updateHeight();
|
|
61
|
-
break;
|
|
62
|
-
}
|
|
70
|
+
l !== this[t] && (this[t] = l, t === "height" && this.rendered && this._updateHeight());
|
|
63
71
|
}
|
|
64
72
|
connectedCallback() {
|
|
65
73
|
c(this), this.loadStyleText([x, y]), this.render(), (this.htmlType === "reset" || this.htmlType === "submit") && p(this, "click", this._handleClick), this._updateHeight();
|
|
@@ -68,35 +76,35 @@ class B extends h {
|
|
|
68
76
|
super.disconnectedCallback(), (this.htmlType === "reset" || this.htmlType === "submit") && v(this, "click", this._handleClick);
|
|
69
77
|
}
|
|
70
78
|
render() {
|
|
71
|
-
const t = this.getAttr("type", "normal"), r = document.createElement("button"),
|
|
79
|
+
const t = this.getAttr("type", "normal"), r = document.createElement("button"), o = this.getAttr("loading", !1), e = this.getAttr("shape", "default"), l = this.getAttr("text", !1), n = this.getAttr("ghost", !1), a = [
|
|
72
80
|
"l-btn",
|
|
73
81
|
`l-btn-${t}`,
|
|
74
|
-
|
|
75
|
-
|
|
82
|
+
e === "round" ? "l-btn-round" : "",
|
|
83
|
+
e === "circle" ? "l-btn-circle" : "",
|
|
76
84
|
n ? "l-btn-ghost" : "",
|
|
77
85
|
l ? "l-btn-text" : "",
|
|
78
|
-
|
|
86
|
+
o ? "l-btn-loading" : ""
|
|
79
87
|
];
|
|
80
|
-
r.className = u(a), (this.disabled ||
|
|
81
|
-
const
|
|
82
|
-
|
|
88
|
+
r.className = u(a), (this.disabled || o) && (r.disabled = !0), r.type = this.getAttr("html-type", "button");
|
|
89
|
+
const s = this.applyColor(this.getAttr("color"), l, n);
|
|
90
|
+
s && (r.style.cssText = s), o ? r.innerHTML = this.loadingBody() : r.innerHTML = "<slot></slot>", r.setAttribute("part", "default"), this.root.appendChild(r);
|
|
83
91
|
}
|
|
84
92
|
loadingBody() {
|
|
85
93
|
const t = this.getAttr("loading-text", ""), r = ['<l-loading-icon class="l-rotate-anim"></l-loading-icon>'];
|
|
86
94
|
return t ? r.push(`<span>${t}</span>`) : r.push("<slot></slot>"), r.join("");
|
|
87
95
|
}
|
|
88
|
-
applyColor(t, r = !1,
|
|
96
|
+
applyColor(t, r = !1, o = !1) {
|
|
89
97
|
if (!t) return "";
|
|
90
|
-
const
|
|
98
|
+
const e = d(t, 1, !0), l = d(t, 3, !1);
|
|
91
99
|
return m({
|
|
92
100
|
"--l-btn-border-color": r ? "transparent" : t,
|
|
93
|
-
"--l-btn-text-color":
|
|
94
|
-
"--l-btn-hover-text-color":
|
|
95
|
-
"--l-btn-background":
|
|
96
|
-
"--l-btn-active-text-color":
|
|
97
|
-
"--l-btn-hover-border-color": r ? "transparent" :
|
|
98
|
-
"--l-btn-hover-background":
|
|
99
|
-
"--l-btn-active-background":
|
|
101
|
+
"--l-btn-text-color": o || r ? t : "#ffffff",
|
|
102
|
+
"--l-btn-hover-text-color": o || r ? e : "#ffffff",
|
|
103
|
+
"--l-btn-background": o || r ? "transparent" : t,
|
|
104
|
+
"--l-btn-active-text-color": o || r ? l : "#ffffff",
|
|
105
|
+
"--l-btn-hover-border-color": r ? "transparent" : e,
|
|
106
|
+
"--l-btn-hover-background": o || r ? "transparent" : e,
|
|
107
|
+
"--l-btn-active-background": o || r ? "transparent" : l,
|
|
100
108
|
"--l-btn-active-border-color": r ? "transparent" : l
|
|
101
109
|
});
|
|
102
110
|
}
|
|
@@ -107,26 +115,26 @@ class B extends h {
|
|
|
107
115
|
}
|
|
108
116
|
}
|
|
109
117
|
_handleClick = (t) => {
|
|
110
|
-
const r = t.target,
|
|
111
|
-
if (
|
|
112
|
-
const
|
|
113
|
-
|
|
118
|
+
const r = t.target, o = k(r, "html-type");
|
|
119
|
+
if (o === "reset" || o === "submit") {
|
|
120
|
+
const e = this._getForm();
|
|
121
|
+
e && (o === "reset" ? e.reset() : o === "submit" && e.submit());
|
|
114
122
|
}
|
|
115
123
|
};
|
|
116
124
|
_getForm() {
|
|
117
125
|
let t = this.parentElement, r;
|
|
118
126
|
for (; t != null; ) {
|
|
119
|
-
const
|
|
120
|
-
if (
|
|
127
|
+
const o = t.tagName;
|
|
128
|
+
if (o === "L-FORM") {
|
|
121
129
|
r = t;
|
|
122
130
|
break;
|
|
123
131
|
}
|
|
124
|
-
if (
|
|
132
|
+
if (o === "BODY") break;
|
|
125
133
|
t = t.parentElement;
|
|
126
134
|
}
|
|
127
135
|
return t = null, r;
|
|
128
136
|
}
|
|
129
137
|
}
|
|
130
138
|
export {
|
|
131
|
-
|
|
139
|
+
H as default
|
|
132
140
|
};
|
package/lib/check/checkbox.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import e from "./check.js";
|
|
2
|
-
import { c as r } from "../check-
|
|
2
|
+
import { c as r } from "../check-C7YSuH60.js";
|
|
3
3
|
const o = '.l-check__inner:after{content:"";width:calc(var(--l-check-size) * .6);height:calc(var(--l-check-size) * .3);display:block;border:solid 1px transparent;border-right:none;border-top:none;transform:rotate(-45deg);transition:border-color .2s ease-in-out;margin-top:-3px}:host([indeterminate]) .l-check__inner{background-color:var(--l-primary-color, #722ed1)}:host([indeterminate]) .l-check__inner:after{content:"";width:calc(var(--l-check-size) * .4);height:1px;display:block;border:1px solid #fff;border-right:none;border-top:none;border-left:none;transform:rotate(0);margin-top:0}:host(.is-checked) .l-check__inner{background-color:var(--l-primary-color, #722ed1)}:host(.is-checked) .l-check__inner:after{border-color:#fff}:host(.is-disabled) .l-check__inner{background-color:var(--l-disabled-color, #e6e6e6);border-color:var(--l-disabled-color, #e6e6e6)}';
|
|
4
4
|
class a extends e {
|
|
5
5
|
static baseName = "checkbox";
|
package/lib/check/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import FormInner from "../form/form_inner";
|
|
2
2
|
export default class CheckGroup extends FormInner {
|
|
3
3
|
#private;
|
|
4
|
-
button: boolean;
|
|
5
4
|
checkedValues: string[];
|
|
6
5
|
constructor();
|
|
6
|
+
static get observedAttributes(): string[];
|
|
7
|
+
attributeChange(name: string, oldValue: any, newValue: any): void;
|
|
7
8
|
connectedCallback(): void;
|
|
8
9
|
afterInit(): void;
|
|
9
10
|
beforeDestroy(): void;
|
package/lib/check/index.js
CHANGED
|
@@ -1,25 +1,38 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { on as
|
|
3
|
-
import { initAttr as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// 是否为按钮样式
|
|
1
|
+
import r from "../form/form_inner.js";
|
|
2
|
+
import { on as o, off as l, $$ as c } from "ph-utils/dom";
|
|
3
|
+
import { parseAttrValue as i, initAttr as h } from "../utils/index.js";
|
|
4
|
+
import { isNumeric as n } from "ph-utils";
|
|
5
|
+
const p = ":host{display:flex;align-items:center;gap:var(--l-check-gap, 0px)}";
|
|
6
|
+
class v extends r {
|
|
8
7
|
checkedValues;
|
|
9
8
|
constructor() {
|
|
10
9
|
super(!1), this.checkedValues = [];
|
|
11
10
|
}
|
|
11
|
+
static get observedAttributes() {
|
|
12
|
+
return ["gap", "value"];
|
|
13
|
+
}
|
|
14
|
+
attributeChange(e, g, a) {
|
|
15
|
+
if (console.log(e), e === "gap") {
|
|
16
|
+
const t = i(a, void 0);
|
|
17
|
+
if (t) {
|
|
18
|
+
const s = n(t) ? `${t}px` : t;
|
|
19
|
+
this.style.setProperty("--l-check-gap", s);
|
|
20
|
+
} else
|
|
21
|
+
this.style.removeProperty("--l-check-gap");
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
12
25
|
connectedCallback() {
|
|
13
|
-
|
|
26
|
+
h(this), this.loadStyleText([p]), super.connectedCallback();
|
|
14
27
|
}
|
|
15
28
|
afterInit() {
|
|
16
|
-
|
|
29
|
+
o(this.root, "change", this.#e);
|
|
17
30
|
}
|
|
18
31
|
beforeDestroy() {
|
|
19
|
-
|
|
32
|
+
l(this.root, "change", this.#e), this.checkedValues = [];
|
|
20
33
|
}
|
|
21
34
|
render() {
|
|
22
|
-
return
|
|
35
|
+
return c("slot");
|
|
23
36
|
}
|
|
24
37
|
#e = (e) => {
|
|
25
38
|
this.valueChange(e.detail.value), e.stopPropagation(), this.emit("change", {
|
|
@@ -31,5 +44,5 @@ class u extends t {
|
|
|
31
44
|
}
|
|
32
45
|
}
|
|
33
46
|
export {
|
|
34
|
-
|
|
47
|
+
v as default
|
|
35
48
|
};
|
package/lib/check/radio.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import e from "./check.js";
|
|
2
|
-
import { c as o } from "../check-
|
|
2
|
+
import { c as o } from "../check-C7YSuH60.js";
|
|
3
3
|
import { $one as c } from "ph-utils/dom";
|
|
4
4
|
const t = '.l-check__inner{border-radius:50%}.l-check__inner:after{content:"";display:block;width:60%;height:60%;background-color:transparent;border-radius:50%;transition:background-color .3s ease-in-out}:host(.is-checked) .l-check__inner:after{background-color:var(--l-primary-color, #722ed1)}:host(.is-disabled) .l-check__inner{border-color:var(--l-disabled-color, #e6e6e6)}:host(.is-disabled) .l-check__inner:after{background-color:var(--l-disabled-color, #e6e6e6)}';
|
|
5
5
|
class n extends e {
|
|
@@ -0,0 +1,4 @@
|
|
|
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,7 +1,7 @@
|
|
|
1
1
|
import { $one as i, on as s, off as a } from "ph-utils/dom";
|
|
2
2
|
import r from "../form/form_inner.js";
|
|
3
3
|
import { initAttr as c, setAttrs as n } from "../utils/index.js";
|
|
4
|
-
import { i as l } from "../index-
|
|
4
|
+
import { i as l } from "../index-DvcllHRh.js";
|
|
5
5
|
const o = ":host{--l-input-width: 60px}";
|
|
6
6
|
class m extends r {
|
|
7
7
|
static baseName = "color-picker";
|
|
@@ -12,15 +12,10 @@ class y extends i {
|
|
|
12
12
|
attributeChangedCallback(e, t, a) {
|
|
13
13
|
e = r(e);
|
|
14
14
|
const o = c(a, this[e]);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"--l-desc-panel-min-height",
|
|
20
|
-
`${this.collapseHeight}px`
|
|
21
|
-
) : this.style.removeProperty("--l-desc-panel-min-height");
|
|
22
|
-
break;
|
|
23
|
-
}
|
|
15
|
+
o !== this[e] && (this[e] = o, e === "collapseHeight" && (this.collapseHeight !== 100 ? this.style.setProperty(
|
|
16
|
+
"--l-desc-panel-min-height",
|
|
17
|
+
`${this.collapseHeight}px`
|
|
18
|
+
) : this.style.removeProperty("--l-desc-panel-min-height")));
|
|
24
19
|
}
|
|
25
20
|
connectedCallback() {
|
|
26
21
|
this.loadStyleText(b), super.connectedCallback();
|
|
@@ -49,12 +49,10 @@ class k extends p {
|
|
|
49
49
|
return ["show-close"];
|
|
50
50
|
}
|
|
51
51
|
attributeChangedCallback(t, o, i) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
this.showClose === 0 && s ? (h(s, "click", this.#t), s.remove()) : s ? s.className = this.#o() : (s = this.#e(), r(s, "click", this.#t), this.root.appendChild(s));
|
|
57
|
-
break;
|
|
52
|
+
if (t === "show-close") {
|
|
53
|
+
this.showClose = Number(i), this.showClose === 2 ? this.classList.add("l-container-close-outside") : this.classList.remove("l-container-close-outside");
|
|
54
|
+
let s = f(".l-btn-dialog-close", this.root);
|
|
55
|
+
this.showClose === 0 && s ? (h(s, "click", this.#t), s.remove()) : s ? s.className = this.#o() : (s = this.#e(), r(s, "click", this.#t), this.root.appendChild(s));
|
|
58
56
|
}
|
|
59
57
|
}
|
|
60
58
|
#o() {
|
|
@@ -0,0 +1,4 @@
|
|
|
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
|
+
};
|
package/lib/index.d.ts
CHANGED
|
@@ -73,6 +73,7 @@ export { default as ImagePreview } from "./image/image_preview";
|
|
|
73
73
|
export * from "./utils/popover";
|
|
74
74
|
export { default as Table } from "./table";
|
|
75
75
|
export type { Column } from "./table/types";
|
|
76
|
+
export { default as Space } from "./space";
|
|
76
77
|
|
|
77
78
|
declare global {
|
|
78
79
|
interface HTMLElementTagNameMap {
|
|
@@ -146,5 +147,6 @@ declare global {
|
|
|
146
147
|
"l-image": import("./image").default
|
|
147
148
|
"l-image-preview": import("./image/image_preview").default
|
|
148
149
|
"l-table": import("./table").default
|
|
150
|
+
"l-space": import("./space").default
|
|
149
151
|
}
|
|
150
152
|
}
|