litos-ui 0.20.0 → 0.21.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/{animation-DStAHzod.js → animation-Bo4jbSGK.js} +4 -3
- package/lib/base.d.ts +3 -2
- package/lib/base.js +7 -7
- package/lib/button/index.d.ts +2 -2
- package/lib/button/index.js +152 -2
- package/lib/button/style.d.ts +2 -0
- package/lib/button/style.js +2 -0
- package/lib/calendar/index.d.ts +2 -2
- package/lib/card/index.d.ts +23 -0
- package/lib/card/index.js +2 -0
- package/lib/card-3DM-lJQV.js +63 -0
- package/lib/date_picker/index.d.ts +2 -2
- package/lib/dialog/dialog_box.d.ts +22 -0
- package/lib/dialog/dialog_box.js +98 -0
- package/lib/dialog/dialog_container.d.ts +7 -3
- package/lib/dialog/dialog_container.js +156 -2
- package/lib/dialog/dialog_container_style.d.ts +2 -0
- package/lib/dialog/dialog_container_style.js +2 -0
- package/lib/dialog/index.d.ts +33 -11
- package/lib/dialog/index.js +45 -47
- package/lib/dialog_container_style-C1s0aBf7.js +5 -0
- package/lib/form/form_item.d.ts +2 -2
- package/lib/form/form_item.js +1 -1
- package/lib/{form_item-CFIkfH29.js → form_item-BqPMRABd.js} +5 -5
- package/lib/icon/arrow_down.js +1 -1
- package/lib/icon/arrow_left.js +1 -1
- package/lib/icon/arrow_right.js +1 -1
- package/lib/icon/arrow_up.js +1 -1
- package/lib/icon/base.d.ts +3 -2
- package/lib/icon/base.js +63 -2
- package/lib/icon/calendar.js +1 -1
- package/lib/icon/caret_bottom.js +1 -1
- package/lib/icon/caret_top.js +1 -1
- package/lib/icon/close.js +1 -1
- package/lib/icon/close_filled.js +1 -1
- package/lib/icon/copy.d.ts +6 -0
- package/lib/icon/copy.js +13 -0
- package/lib/icon/d_arrow_left.js +1 -1
- package/lib/icon/d_arrow_right.js +1 -1
- package/lib/icon/font_icon.js +1 -1
- package/lib/icon/icon_style.d.ts +2 -0
- package/lib/icon/icon_style.js +2 -0
- package/lib/icon/info.js +1 -1
- package/lib/icon/loading.js +1 -1
- package/lib/icon/moon.js +1 -1
- package/lib/icon/more.js +1 -1
- package/lib/icon/reduction.js +1 -1
- package/lib/icon/refresh.js +1 -1
- package/lib/icon/refresh_left.js +1 -1
- package/lib/icon/refresh_right.js +1 -1
- package/lib/icon/search.js +1 -1
- package/lib/icon/select.js +1 -1
- package/lib/icon/sort.js +1 -1
- package/lib/icon/success.js +1 -1
- package/lib/icon/sun.js +1 -1
- package/lib/icon/theme_default.js +1 -1
- package/lib/icon/warn.js +1 -1
- package/lib/icon/zoom_in.js +1 -1
- package/lib/icon/zoom_out.js +1 -1
- package/lib/icon_style-J7iiDS_a.js +5 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.js +74 -69
- package/lib/input/index.d.ts +2 -2
- package/lib/input_number/index.d.ts +59 -0
- package/lib/input_number/index.js +203 -0
- package/lib/input_number/style.d.ts +2 -0
- package/lib/input_number/style.js +2 -0
- package/lib/list/index.js +1 -1
- package/lib/{list-Dg5u5dgr.js → list-MG8PRzos.js} +2 -2
- package/lib/mask-Ox6CoyFB.js +5 -0
- package/lib/menu/index.d.ts +2 -2
- package/lib/modal/index.d.ts +2 -2
- package/lib/modal/index.js +1 -1
- package/lib/modal/modal_box.d.ts +22 -0
- package/lib/modal/modal_box.js +12 -12
- package/lib/{modal-iwxqmAqW.js → modal-Cwi3qlEf.js} +36 -32
- package/lib/pagination/index.d.ts +2 -2
- package/lib/qrcode/index.d.ts +2 -2
- package/lib/select/index.d.ts +2 -2
- package/lib/select_ori/index.d.ts +2 -2
- package/lib/style-C5wUmE2b.js +5 -0
- package/lib/style-gKR_qwzm.js +5 -0
- package/lib/styles/animation/index.d.ts +2 -0
- package/lib/styles/animation/index.js +2 -0
- package/lib/styles/mask/index.d.ts +2 -0
- package/lib/styles/mask/index.js +2 -0
- package/lib/theme/theme_color.d.ts +1 -2
- package/package.json +1 -1
- package/lib/base-Dyj1rzaK.js +0 -61
- package/lib/button-CDYYpQu6.js +0 -151
- package/lib/dialog_container-Bq6HsKey.js +0 -127
package/lib/dialog/index.d.ts
CHANGED
|
@@ -10,21 +10,43 @@ type DialogProps = {
|
|
|
10
10
|
/** 是否可以通过点击 mask 关闭对话框 */
|
|
11
11
|
maskClosable?: boolean;
|
|
12
12
|
/** 是否显示右上角关闭按钮, 1 - 显示在框内, 2 - 显示在框角, 0 - 不显示 */
|
|
13
|
-
|
|
13
|
+
close?: number;
|
|
14
14
|
};
|
|
15
15
|
/** 初始化对话框配置 */
|
|
16
16
|
type DialogInitialParams = DialogProps & {
|
|
17
17
|
/** dialog 节点 */
|
|
18
18
|
el: HTMLDialogElement | string;
|
|
19
19
|
/** 返回 true 表明手动调用 done 关闭 */
|
|
20
|
-
onAction?: (action: string, done: () => void) =>
|
|
20
|
+
onAction?: (action: string, done: () => void) => void;
|
|
21
21
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
export default class Dialog {
|
|
23
|
+
private $dialog;
|
|
24
|
+
private $container;
|
|
25
|
+
private config;
|
|
26
|
+
constructor(option?: DialogInitialParams);
|
|
27
|
+
private handleKeydown;
|
|
28
|
+
private handleClick;
|
|
29
|
+
private handleContainerAction;
|
|
30
|
+
/**
|
|
31
|
+
* 初始化对话框
|
|
32
|
+
* @param option 配置项
|
|
33
|
+
*/
|
|
34
|
+
init(option: DialogInitialParams): void;
|
|
35
|
+
/**
|
|
36
|
+
* 打开对话框
|
|
37
|
+
*/
|
|
38
|
+
open(): void;
|
|
39
|
+
/**
|
|
40
|
+
* 关闭对话框
|
|
41
|
+
*/
|
|
42
|
+
close(): void;
|
|
43
|
+
destroy(): void;
|
|
44
|
+
setProp(key: keyof DialogProps, value: DialogProps[keyof DialogProps]): void;
|
|
45
|
+
setProps(props: DialogProps): void;
|
|
46
|
+
/**
|
|
47
|
+
* 设置确定按钮 loading 状态
|
|
48
|
+
* @param loading 是否 loading
|
|
49
|
+
*/
|
|
50
|
+
setConfirmLoading(loading: boolean): void;
|
|
51
|
+
}
|
|
52
|
+
export {};
|
package/lib/dialog/index.js
CHANGED
|
@@ -1,70 +1,68 @@
|
|
|
1
1
|
import { $one as e, addClass as t, getAttr as n, hasClass as r, off as i, on as a, removeClass as o } from "ph-utils/browser";
|
|
2
2
|
//#region src/components/dialog/index.ts
|
|
3
|
-
var s =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
var s = class {
|
|
4
|
+
$dialog;
|
|
5
|
+
$container;
|
|
6
|
+
config;
|
|
7
|
+
constructor(e) {
|
|
8
|
+
e != null && this.init(e);
|
|
7
9
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
10
|
+
handleKeydown = (e) => {
|
|
11
|
+
e.code === "Escape" && (e.preventDefault(), this.close());
|
|
12
|
+
};
|
|
13
|
+
handleClick = (e) => {
|
|
14
|
+
this.$dialog.isSameNode(e.target) && this.config && this.config.maskClosable && this.close();
|
|
15
|
+
};
|
|
16
|
+
handleContainerAction = (e) => {
|
|
12
17
|
let t = e.detail.action;
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
if (!
|
|
18
|
+
t === "ok" && this.$container?.hasAttribute("confirm-loading") || this.config.onAction != null && this.config.onAction(t, () => this.close());
|
|
19
|
+
};
|
|
20
|
+
init(i) {
|
|
21
|
+
if (!this.config) {
|
|
17
22
|
let o = {
|
|
18
23
|
escClose: !0,
|
|
19
24
|
verticalAlign: "top",
|
|
20
25
|
maskClosable: !0,
|
|
21
|
-
|
|
26
|
+
close: 1,
|
|
22
27
|
...i
|
|
23
28
|
};
|
|
24
|
-
if (
|
|
25
|
-
r(
|
|
26
|
-
let i = n(
|
|
27
|
-
i &&
|
|
28
|
-
let s = n(
|
|
29
|
-
s &&
|
|
30
|
-
let
|
|
31
|
-
|
|
29
|
+
if (this.$dialog = e(i.el), this.$dialog) {
|
|
30
|
+
r(this.$dialog, "l-dialog") || t(this.$dialog, "l-dialog"), this.$container = e("l-dialog-container", this.$dialog), o.verticalAlign = n(this.$dialog, "vertical-align") || "top", t(this.$dialog, `l-dialog--vertical-${o.verticalAlign}`);
|
|
31
|
+
let i = n(this.$dialog, "translate") || o.translate;
|
|
32
|
+
i && this.$dialog.style.setProperty("--l-dialog-translate", `translate3d(${i})`);
|
|
33
|
+
let s = n(this.$dialog, "width") || o.width;
|
|
34
|
+
s && this.$dialog.style.setProperty("--l-dialog-width", s);
|
|
35
|
+
let c = n(this.$dialog, "close", 1);
|
|
36
|
+
c === 2 && t(this.$dialog, "l-dialog-close-outside"), this.$container && this.$container.setAttribute("close", `${c}`), o.close = c, a(this.$dialog, "keydown", this.handleKeydown), a(this.$dialog, "click", this.handleClick), this.$container && a(this.$container, "dialogAction", this.handleContainerAction);
|
|
32
37
|
}
|
|
33
|
-
|
|
38
|
+
this.config = o;
|
|
34
39
|
}
|
|
35
40
|
}
|
|
36
|
-
|
|
37
|
-
|
|
41
|
+
open() {
|
|
42
|
+
this.$dialog && (this.$dialog.showModal(), t(this.$dialog, "l-dialog--open"), t(document.body, "l-body--dialog-open"));
|
|
38
43
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}, { once: !0 }), o(
|
|
44
|
+
close() {
|
|
45
|
+
this.$dialog && r(this.$dialog, "l-dialog--open") && (a(this.$dialog, "transitionend", () => {
|
|
46
|
+
this.$dialog.close(), o(document.body, "l-body--dialog-open");
|
|
47
|
+
}, { once: !0 }), o(this.$dialog, "l-dialog--open"));
|
|
43
48
|
}
|
|
44
|
-
|
|
45
|
-
|
|
49
|
+
destroy() {
|
|
50
|
+
this.$dialog &&= (this.close(), i(this.$dialog, "keydown", this.handleKeydown), i(this.$dialog, "click", this.handleClick), this.$container && i(this.$container, "dialogAction", this.handleContainerAction), this.$container = void 0, void 0);
|
|
46
51
|
}
|
|
47
|
-
|
|
48
|
-
if (
|
|
52
|
+
setProp(e, t) {
|
|
53
|
+
if (this.config && (this.config[e] = t, this.$dialog)) {
|
|
49
54
|
if (e === "verticalAlign") {
|
|
50
|
-
let e =
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
c.className = e;
|
|
54
|
-
} else e === "translate" ? t ? c.style.setProperty("--l-dialog-translate", `translate3d(${t})`) : c.style.removeProperty("--l-dialog-translate") : e === "width" ? t ? c.style.setProperty("--l-dialog-width", t) : c.style.removeProperty("--l-dialog-width") : e === "showClose" && l && l.setAttribute("show-close", `${t}`);
|
|
55
|
+
let e = this.$dialog.className.replace(/l-dialog--vertical-\w+/g, () => `l-dialog--vertical-${t || "top"}`);
|
|
56
|
+
this.$dialog.className = e;
|
|
57
|
+
} else e === "translate" ? t ? this.$dialog.style.setProperty("--l-dialog-translate", `translate3d(${t})`) : this.$dialog.style.removeProperty("--l-dialog-translate") : e === "width" ? t ? this.$dialog.style.setProperty("--l-dialog-width", t) : this.$dialog.style.removeProperty("--l-dialog-width") : e === "close" && this.$container && this.$container.setAttribute("close", `${t}`);
|
|
55
58
|
}
|
|
56
59
|
}
|
|
57
|
-
|
|
58
|
-
for (let t in e)
|
|
60
|
+
setProps(e) {
|
|
61
|
+
for (let t in e) this.setProp(t, e[t]);
|
|
62
|
+
}
|
|
63
|
+
setConfirmLoading(e) {
|
|
64
|
+
this.$container && (e ? this.$container.setAttribute("confirm-loading", "") : this.$container.removeAttribute("confirm-loading"));
|
|
59
65
|
}
|
|
60
|
-
return s != null && m(s), {
|
|
61
|
-
init: m,
|
|
62
|
-
open: h,
|
|
63
|
-
close: g,
|
|
64
|
-
destroy: _,
|
|
65
|
-
setProp: v,
|
|
66
|
-
setProps: y
|
|
67
|
-
};
|
|
68
66
|
};
|
|
69
67
|
//#endregion
|
|
70
68
|
export { s as default };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/components/dialog/dialog_container.css?inline
|
|
2
|
+
var e = ":host{display:block;position:relative}:host(.l-container-close-outside){padding-top:10px;padding-right:10px}.l-dialog-main{padding:var(--l-dialog-main-padding,0);background-color:#fff;border-radius:5px;box-shadow:0 0 8px #0000001a}.l-dialog-header{padding:var(--l-dialog-header-padding,10px);border-bottom:1px solid var(--l-dialog-line-color,#0000000f);align-items:center;gap:5px;font-size:16px;font-weight:600;display:flex}.l-dialog-footer{padding:var(--l-dialog-footer-padding,10px);border-top:1px solid var(--l-dialog-line-color,#0000000f);justify-content:flex-end;gap:10px;display:flex}.l-dialog-container{padding:var(--l-dialog-container-padding,15px 10px);font-size:14px}.l-btn-dialog-close{--l-form-control-height:auto;position:absolute}.l-dialog-close1{right:var(--l-dialog-close-right,5px);top:var(--l-dialog-close-top,6px)}.l-dialog-close1::part(default){border:none;width:auto;height:auto;padding:5px;font-size:16px}.l-dialog-close2{right:var(--l-dialog-close-right,0);top:var(--l-dialog-close-top,0)}.l-dialog-close2::part(default){background-color:#fff;width:20px;height:20px;padding:0}.l-dialog-main--mobile{border-radius:10px}.l-dialog-main--mobile .l-dialog-header{text-align:center;border-bottom-color:#0000;justify-content:center;padding:20px 10px 5px;display:flex}.l-dialog-main--mobile .l-dialog-container{text-align:center;padding:5px 15px 20px}.l-dialog-main--mobile .l-dialog-footer{text-align:center;justify-content:stretch;align-items:stretch;gap:0;height:50px;padding:0;display:flex}.l-dialog-main--mobile .l-dialog-footer l-button{flex-grow:1;height:100%}.l-dialog-main--mobile .l-dialog-footer l-button+l-button{border-left:1px solid var(--l-dialog-line-color,#0000000f)}", t = new CSSStyleSheet();
|
|
3
|
+
t.replaceSync(e);
|
|
4
|
+
//#endregion
|
|
5
|
+
export { t };
|
package/lib/form/form_item.d.ts
CHANGED
|
@@ -33,8 +33,8 @@ export default class FormItem extends ContextProvide<FormItemSignal, FormItemSta
|
|
|
33
33
|
message?: string;
|
|
34
34
|
}): void;
|
|
35
35
|
render_v2(): {
|
|
36
|
-
template
|
|
37
|
-
style
|
|
36
|
+
template: DocumentFragment;
|
|
37
|
+
style: string[];
|
|
38
38
|
};
|
|
39
39
|
render(): DocumentFragment;
|
|
40
40
|
private _updateRequired;
|
package/lib/form/form_item.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../form_item-
|
|
1
|
+
import { t as e } from "../form_item-BqPMRABd.js";
|
|
2
2
|
export { e as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { kebabToCamel as e, parseAttrValue as t, stopSignal as n, unitNumberStr as r } from "./utils/index.js";
|
|
2
|
-
import
|
|
3
|
-
import o from "./
|
|
2
|
+
import i from "./utils/context_provide.js";
|
|
3
|
+
import { n as a, t as o } from "./esm-DAha108i.js";
|
|
4
4
|
import { $$ as s, $one as c, addClass as l, removeClass as u } from "ph-utils/browser";
|
|
5
5
|
//#region src/components/form/form_item.less?inline
|
|
6
|
-
var d = ":host{display:var(--l-form-item-display,flex);font-size:14px}.l-form-item__label{text-align:var(--l-form-label-align,right);width:var(--l-form-label-width,auto);height:var(--l-form-label-height,var(--l-form-control-height,32px));line-height:var(--l-form-label-height,var(--l-form-control-height,32px));color:#606266;box-sizing:border-box;padding:0 10px 0 0;display:inline-block}.l-form-item__label:empty{display:var(--l-form-label-empty-display,inline-block)}:host(.is-required) .l-form-item__label:before{content:\"*\";color:var(--l-warn-color,#f56c6c);vertical-align:middle;margin-right:4px}.l-form-item__content{flex:1;align-items:center;display:flex;position:relative}.l-form-item__error{color:var(--nt-error-color,#ed3f13);padding-top:3px;font-size:12px;line-height:1;position:absolute;top:100%;left:0}:host(.l-form-item--left){--l-form-label-align:left}:host(.l-form-item--top){--l-form-item-display:grid;--l-form-label-align:left;--l-form-label-empty-display:none;grid-template-columns:1fr}", f = class extends
|
|
6
|
+
var d = ":host{display:var(--l-form-item-display,flex);font-size:14px}.l-form-item__label{text-align:var(--l-form-label-align,right);width:var(--l-form-label-width,auto);height:var(--l-form-label-height,var(--l-form-control-height,32px));line-height:var(--l-form-label-height,var(--l-form-control-height,32px));color:#606266;box-sizing:border-box;padding:0 10px 0 0;display:inline-block}.l-form-item__label:empty{display:var(--l-form-label-empty-display,inline-block)}:host(.is-required) .l-form-item__label:before{content:\"*\";color:var(--l-warn-color,#f56c6c);vertical-align:middle;margin-right:4px}.l-form-item__content{flex:1;align-items:center;display:flex;position:relative}.l-form-item__error{color:var(--nt-error-color,#ed3f13);padding-top:3px;font-size:12px;line-height:1;position:absolute;top:100%;left:0}:host(.l-form-item--left){--l-form-label-align:left}:host(.l-form-item--top){--l-form-item-display:grid;--l-form-label-align:left;--l-form-label-empty-display:none;grid-template-columns:1fr}", f = class extends i {
|
|
7
7
|
static baseName = "form-item";
|
|
8
8
|
formErrors;
|
|
9
9
|
_errorSignalStop;
|
|
@@ -11,7 +11,7 @@ var d = ":host{display:var(--l-form-item-display,flex);font-size:14px}.l-form-it
|
|
|
11
11
|
super(), this.version = 2, this.contextEventName = "form-item-context-request", this._state = {
|
|
12
12
|
labelPosition: "right",
|
|
13
13
|
required: !1
|
|
14
|
-
}, this.context =
|
|
14
|
+
}, this.context = a({ innerBlock: !1 });
|
|
15
15
|
}
|
|
16
16
|
static get observedAttributes() {
|
|
17
17
|
return [
|
|
@@ -64,7 +64,7 @@ var d = ":host{display:var(--l-form-item-display,flex);font-size:14px}.l-form-it
|
|
|
64
64
|
connectedCallback() {
|
|
65
65
|
super.connectedCallback(), this._updateRequired(), this._parseSchema(), this.emitInject("form-context-request", ((e, t) => {
|
|
66
66
|
this.formErrors = t;
|
|
67
|
-
})), this._errorSignalStop =
|
|
67
|
+
})), this._errorSignalStop = o(() => {
|
|
68
68
|
let e = this.context().prop, t = this.formErrors ? this.formErrors() : null;
|
|
69
69
|
e && t && (this._state.error = t[e], this._updateError());
|
|
70
70
|
});
|
package/lib/icon/arrow_down.js
CHANGED
package/lib/icon/arrow_left.js
CHANGED
package/lib/icon/arrow_right.js
CHANGED
package/lib/icon/arrow_up.js
CHANGED
package/lib/icon/base.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export default class BaseIcon extends BaseComponent<ColorState> {
|
|
|
7
7
|
static baseName: string;
|
|
8
8
|
useLink: boolean;
|
|
9
9
|
viewBox: string;
|
|
10
|
+
strokeIcon: boolean;
|
|
10
11
|
constructor();
|
|
11
12
|
static get observedAttributes(): string[] | null | undefined;
|
|
12
13
|
protected attributeChanged(name: string, oldValue: string, newValue: string): void;
|
|
@@ -15,8 +16,8 @@ export default class BaseIcon extends BaseComponent<ColorState> {
|
|
|
15
16
|
private _updateSize;
|
|
16
17
|
private _updateColor;
|
|
17
18
|
render_v2(): {
|
|
18
|
-
template
|
|
19
|
-
|
|
19
|
+
template: any;
|
|
20
|
+
styleSheets: CSSStyleSheet[];
|
|
20
21
|
};
|
|
21
22
|
renderChildren(): string;
|
|
22
23
|
createEl(tagName: string): SVGElement;
|
package/lib/icon/base.js
CHANGED
|
@@ -1,2 +1,63 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import e from "../base.js";
|
|
2
|
+
import { unitNumberStr as t } from "../utils/index.js";
|
|
3
|
+
import { t as n } from "../icon_style-J7iiDS_a.js";
|
|
4
|
+
//#region src/components/icon/base.ts
|
|
5
|
+
var r = class extends e {
|
|
6
|
+
static baseName = "base-icon";
|
|
7
|
+
useLink;
|
|
8
|
+
viewBox;
|
|
9
|
+
strokeIcon;
|
|
10
|
+
constructor() {
|
|
11
|
+
super(), this.useLink = !1, this.viewBox = "0 0 1024 1024", this.strokeIcon = !1, this.version = 2, this._state = {};
|
|
12
|
+
}
|
|
13
|
+
static get observedAttributes() {
|
|
14
|
+
return ["color", "size"];
|
|
15
|
+
}
|
|
16
|
+
attributeChanged(e, n, r) {
|
|
17
|
+
switch (e) {
|
|
18
|
+
case "color":
|
|
19
|
+
this._state.color = r;
|
|
20
|
+
break;
|
|
21
|
+
case "size": this._state.size = t(r);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
connectedCallback() {
|
|
25
|
+
super.connectedCallback(), this._updateColor(), this._updateSize();
|
|
26
|
+
}
|
|
27
|
+
updateDOM(e) {
|
|
28
|
+
e.has("color") && this._updateColor(), e.has("size") && this._updateSize();
|
|
29
|
+
}
|
|
30
|
+
_updateSize() {
|
|
31
|
+
this._state.size ? this.style.setProperty("--l-icon-size", this._state.size) : this.style.removeProperty("--l-icon-size");
|
|
32
|
+
}
|
|
33
|
+
_updateColor() {
|
|
34
|
+
this._state.color ? this.style.setProperty("--l-icon-color", this._state.color) : this.style.removeProperty("--l-icon-color");
|
|
35
|
+
}
|
|
36
|
+
render_v2() {
|
|
37
|
+
let e = this.createEl("svg");
|
|
38
|
+
e.classList.add("l-icon"), this.strokeIcon && e.classList.add("l-stroke-icon"), this.useLink || e.setAttribute("viewBox", this.viewBox);
|
|
39
|
+
let t = this.renderChildren();
|
|
40
|
+
if (typeof t == "string") {
|
|
41
|
+
if (t === "") {
|
|
42
|
+
let t = this.children, n = [];
|
|
43
|
+
for (let e = 0, r = t.length; e < r; e++) {
|
|
44
|
+
let r = t[e];
|
|
45
|
+
n.push(r.outerHTML);
|
|
46
|
+
}
|
|
47
|
+
e.innerHTML = n.join("");
|
|
48
|
+
} else e.innerHTML = t;
|
|
49
|
+
} else e.append(t);
|
|
50
|
+
return {
|
|
51
|
+
template: e,
|
|
52
|
+
styleSheets: [n]
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
renderChildren() {
|
|
56
|
+
return "";
|
|
57
|
+
}
|
|
58
|
+
createEl(e) {
|
|
59
|
+
return document.createElementNS("http://www.w3.org/2000/svg", e);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
//#endregion
|
|
63
|
+
export { r as default };
|
package/lib/icon/calendar.js
CHANGED
package/lib/icon/caret_bottom.js
CHANGED
package/lib/icon/caret_top.js
CHANGED
package/lib/icon/close.js
CHANGED
package/lib/icon/close_filled.js
CHANGED
package/lib/icon/copy.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import e from "./base.js";
|
|
2
|
+
//#region src/components/icon/copy.ts
|
|
3
|
+
var t = class extends e {
|
|
4
|
+
static baseName = "copy-icon";
|
|
5
|
+
constructor() {
|
|
6
|
+
super(), this.viewBox = "0 0 24 24", this.strokeIcon = !0;
|
|
7
|
+
}
|
|
8
|
+
renderChildren() {
|
|
9
|
+
return "<rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\" /><path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\" />";
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { t as default };
|
package/lib/icon/d_arrow_left.js
CHANGED
package/lib/icon/font_icon.js
CHANGED
package/lib/icon/info.js
CHANGED
package/lib/icon/loading.js
CHANGED
package/lib/icon/moon.js
CHANGED
package/lib/icon/more.js
CHANGED
package/lib/icon/reduction.js
CHANGED
package/lib/icon/refresh.js
CHANGED
package/lib/icon/refresh_left.js
CHANGED
package/lib/icon/search.js
CHANGED
package/lib/icon/select.js
CHANGED
package/lib/icon/sort.js
CHANGED
package/lib/icon/success.js
CHANGED
package/lib/icon/sun.js
CHANGED
package/lib/icon/warn.js
CHANGED
package/lib/icon/zoom_in.js
CHANGED
package/lib/icon/zoom_out.js
CHANGED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/components/icon/index.less?inline
|
|
2
|
+
var e = ":host{display:inline-flex}.l-icon{fill:currentColor;vertical-align:middle;width:1em;height:1em;color:var(--l-icon-color,inherit);font-size:var(--l-icon-size,inherit);display:inline-block}.l-stroke-icon{fill:none;stroke:currentColor;stroke-width:2px;stroke-linecap:round;stroke-linejoin:round}", t = new CSSStyleSheet();
|
|
3
|
+
t.replaceSync(e);
|
|
4
|
+
//#endregion
|
|
5
|
+
export { t };
|
package/lib/index.d.ts
CHANGED
|
@@ -4,9 +4,11 @@ export { default as BaseComponent } from "./base";
|
|
|
4
4
|
export { default as Message } from "./message";
|
|
5
5
|
export { default as Dialog } from "./dialog";
|
|
6
6
|
export { default as DialogContainer } from "./dialog/dialog_container";
|
|
7
|
+
export { default as DialogBox } from "./dialog/dialog_box";
|
|
7
8
|
export { default as Loading } from "./loading";
|
|
8
9
|
export { default as Tabs } from "./tabs";
|
|
9
10
|
export { default as Modal } from "./modal";
|
|
11
|
+
export { default as ModalBox } from "./modal/modal_box";
|
|
10
12
|
export { default as BaseIcon } from "./icon/base";
|
|
11
13
|
export { default as ArrowDownIcon } from "./icon/arrow_down";
|
|
12
14
|
export { default as ArrowLeftIcon } from "./icon/arrow_left";
|
|
@@ -37,6 +39,7 @@ export { default as ZoomOutIcon } from "./icon/zoom_out";
|
|
|
37
39
|
export { default as SelectIcon } from "./icon/select";
|
|
38
40
|
export { default as CalendarIcon } from "./icon/calendar";
|
|
39
41
|
export { default as RefreshIcon } from "./icon/refresh";
|
|
42
|
+
export { default as CopyIcon } from "./icon/copy";
|
|
40
43
|
export { default as Form } from "./form";
|
|
41
44
|
export { default as FormItem } from "./form/form_item";
|
|
42
45
|
export { default as RadioGroup } from "./check/radio_group";
|
|
@@ -45,6 +48,7 @@ export { default as Checkbox } from "./check/checkbox";
|
|
|
45
48
|
export { default as CheckboxGroup } from "./check/checkbox_group";
|
|
46
49
|
export { default as Button } from "./button";
|
|
47
50
|
export { default as Input } from "./input";
|
|
51
|
+
export { default as InputNumber } from "./input_number";
|
|
48
52
|
export { default as SelectOri } from "./select_ori";
|
|
49
53
|
export { default as Switch } from "./switch";
|
|
50
54
|
export { default as MdInput } from "./md_input";
|
|
@@ -75,4 +79,5 @@ export * from "./utils/popover";
|
|
|
75
79
|
export { default as Table } from "./table";
|
|
76
80
|
export type { Column } from "./table/types";
|
|
77
81
|
export { default as Space } from "./space";
|
|
82
|
+
export { default as Card } from "./card";
|
|
78
83
|
export { default as Calendar } from "./calendar";
|