easy-component-ui 3.0.11 → 3.0.13
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/README.md +162 -162
- package/dist/assets/icon.css +1 -1
- package/dist/components/Base.js +190 -188
- package/dist/components/ea-alert.js +71 -54
- package/dist/components/ea-avatar.js +42 -37
- package/dist/components/ea-breadcrumb.js +33 -33
- package/dist/components/ea-button.js +53 -52
- package/dist/components/ea-card.js +63 -27
- package/dist/components/ea-carousel.js +2 -2
- package/dist/components/ea-collapse.js +93 -73
- package/dist/components/ea-color-picker.js +221 -221
- package/dist/components/ea-container.js +90 -61
- package/dist/components/ea-countdown.js +77 -56
- package/dist/components/ea-date-picker.js +1 -1
- package/dist/components/ea-descriptions.js +133 -70
- package/dist/components/ea-dialog.js +4 -4
- package/dist/components/ea-drawer.js +93 -71
- package/dist/components/ea-empty.js +31 -23
- package/dist/components/ea-icon.js +122 -32
- package/dist/components/ea-image-preview.js +237 -193
- package/dist/components/ea-image.js +69 -44
- package/dist/components/ea-input-number.js +9 -9
- package/dist/components/ea-input.js +15 -15
- package/dist/components/ea-layout.js +10 -3
- package/dist/components/ea-link.js +1 -1
- package/dist/components/ea-menu.js +69 -53
- package/dist/components/ea-message-box.js +73 -73
- package/dist/components/ea-message.js +184 -121
- package/dist/components/ea-notification.js +80 -80
- package/dist/components/ea-overlay.js +41 -34
- package/dist/components/ea-page-header.js +5 -5
- package/dist/components/ea-pagination.js +6 -5
- package/dist/components/ea-popconfirm.js +133 -78
- package/dist/components/ea-popover.js +35 -11
- package/dist/components/ea-popper.js +9 -9
- package/dist/components/ea-progress.js +88 -71
- package/dist/components/ea-rate.js +1 -1
- package/dist/components/ea-result.js +20 -20
- package/dist/components/ea-select.js +119 -108
- package/dist/components/ea-skeleton.js +99 -82
- package/dist/components/ea-slider.js +88 -79
- package/dist/components/ea-splitter.js +34 -18
- package/dist/components/ea-statistic.js +72 -4
- package/dist/components/ea-steps.js +108 -74
- package/dist/components/ea-table.js +562 -434
- package/dist/components/ea-tabs.js +28 -28
- package/dist/components/ea-tag.js +37 -43
- package/dist/components/ea-time-picker.js +2 -6
- package/dist/components/ea-timeline.js +11 -12
- package/dist/components/ea-tooltip.js +63 -23
- package/dist/components/ea-tour.js +21 -21
- package/dist/components/ea-transfer.js +2 -2
- package/dist/components/ea-tree.js +1 -1
- package/dist/components/index.js +1 -2
- package/dist/css/ea-card.style.js +2 -2
- package/dist/css/ea-collapse-item.style.js +1 -1
- package/dist/css/ea-color-picker-panel.style.js +1 -1
- package/dist/css/ea-container.style.js +1 -1
- package/dist/css/ea-descriptions-item.style.js +2 -2
- package/dist/css/ea-descriptions.style.js +1 -1
- package/dist/css/ea-empty.style.js +1 -1
- package/dist/css/ea-footer.style.js +1 -1
- package/dist/css/ea-progress.style.js +1 -1
- package/dist/css/ea-skeleton.style.js +1 -1
- package/dist/css/ea-step.style.js +1 -1
- package/dist/css/ea-switch.style.js +1 -1
- package/dist/css/ea-tab.style.js +1 -1
- package/dist/css/ea-table-column.style.js +4 -0
- package/dist/css/ea-table.style.js +1 -1
- package/dist/css/ea-tabs.style.js +1 -1
- package/dist/css/ea-tag.style.js +1 -1
- package/dist/css/ea-time-picker.style.js +1 -1
- package/dist/css/ea-timeline-item.style.js +1 -1
- package/dist/utils/Variables.js +10 -17
- package/dist/utils/parseTime.js +73 -0
- package/package.json +302 -304
- package/dist/components/ea-loading.js +0 -151
- package/dist/components/ea-statistic2.js +0 -83
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
var p = (t) => {
|
|
2
|
-
throw TypeError(t);
|
|
3
|
-
};
|
|
4
|
-
var c = (t, i, e) => i.has(t) || p("Cannot " + e);
|
|
5
|
-
var n = (t, i, e) => (c(t, i, "read from private field"), e ? e.call(t) : i.get(t)), l = (t, i, e) => i.has(t) ? p("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(t) : i.set(t, e), d = (t, i, e, o) => (c(t, i, "write to private field"), o ? o.call(t, e) : i.set(t, e), e), h = (t, i, e) => (c(t, i, "access private method"), e);
|
|
6
|
-
import { B as _ } from "./Base.js";
|
|
7
|
-
import "./ea-icon.js";
|
|
8
|
-
const b = `
|
|
9
|
-
.ea-loading_wrap {
|
|
10
|
-
position: relative;
|
|
11
|
-
}
|
|
12
|
-
.ea-loading_wrap .ea-loading_mask {
|
|
13
|
-
position: absolute;
|
|
14
|
-
top: 0;
|
|
15
|
-
left: 0;
|
|
16
|
-
display: none;
|
|
17
|
-
justify-content: center;
|
|
18
|
-
align-items: center;
|
|
19
|
-
width: 100%;
|
|
20
|
-
height: 100%;
|
|
21
|
-
background-color: hsla(0, 0%, 100%, 0.9);
|
|
22
|
-
z-index: 1;
|
|
23
|
-
transition: background-color 0.2s;
|
|
24
|
-
}
|
|
25
|
-
.ea-loading_wrap .ea-loading_spinner,
|
|
26
|
-
.ea-loading_wrap .ea-loading_text {
|
|
27
|
-
color: #409eff;
|
|
28
|
-
}
|
|
29
|
-
.ea-loading_wrap .ea-loading_spinner {
|
|
30
|
-
font-size: 2rem;
|
|
31
|
-
}
|
|
32
|
-
.ea-loading_wrap .ea-loading_text {
|
|
33
|
-
margin-left: 0.5rem;
|
|
34
|
-
}
|
|
35
|
-
.ea-loading_wrap.ea-loading_wrap--fullscreen {
|
|
36
|
-
position: fixed;
|
|
37
|
-
left: 0;
|
|
38
|
-
top: 0;
|
|
39
|
-
z-index: 3000;
|
|
40
|
-
width: 100%;
|
|
41
|
-
height: 100%;
|
|
42
|
-
overflow: hidden;
|
|
43
|
-
}
|
|
44
|
-
.ea-loading_wrap.ea-loading_wrap--loading .ea-loading_mask {
|
|
45
|
-
display: flex;
|
|
46
|
-
}
|
|
47
|
-
`;
|
|
48
|
-
var s, a, r, g, u;
|
|
49
|
-
class m extends _ {
|
|
50
|
-
constructor() {
|
|
51
|
-
super();
|
|
52
|
-
l(this, g);
|
|
53
|
-
l(this, s);
|
|
54
|
-
l(this, a);
|
|
55
|
-
l(this, r);
|
|
56
|
-
const e = this.attachShadow({ mode: "open" });
|
|
57
|
-
e.innerHTML = `
|
|
58
|
-
<div class="ea-loading_wrap" part="container">
|
|
59
|
-
<div class="ea-loading_mask" part="mask-wrap">
|
|
60
|
-
<ea-icon icon="icon-spin6 animate-spin" class="ea-loading_spinner" part="icon"></ea-icon>
|
|
61
|
-
</div>
|
|
62
|
-
<div class="ea-loading_content" part="content-wrap">
|
|
63
|
-
<slot></slot>
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
`, d(this, s, e.querySelector(".ea-loading_wrap")), d(this, a, e.querySelector(".ea-loading_mask")), d(this, r, e.querySelector(".ea-loading_spinner")), this.build(e, b);
|
|
67
|
-
}
|
|
68
|
-
// ------- loading 加载状态 -------
|
|
69
|
-
// #region
|
|
70
|
-
get loading() {
|
|
71
|
-
return this.getAttrBoolean("loading") || !1;
|
|
72
|
-
}
|
|
73
|
-
set loading(e) {
|
|
74
|
-
this.setAttribute("loading", e), n(this, s).classList.toggle("ea-loading_wrap--loading", e), h(this, g, u).call(this, this.fullscreen, e, this.lock);
|
|
75
|
-
}
|
|
76
|
-
// #endregion
|
|
77
|
-
// ------- end -------
|
|
78
|
-
// ------- spinner 加载图标 -------
|
|
79
|
-
// #region
|
|
80
|
-
get spinner() {
|
|
81
|
-
return this.getAttribute("spinner") || "icon-spin6";
|
|
82
|
-
}
|
|
83
|
-
set spinner(e) {
|
|
84
|
-
this.setAttribute("spinner", e), n(this, r).icon = `${e} animate-spin`;
|
|
85
|
-
}
|
|
86
|
-
// #endregion
|
|
87
|
-
// ------- end -------
|
|
88
|
-
// ------- spinner-size 加载图标大小 -------
|
|
89
|
-
// #region
|
|
90
|
-
get spinnerSize() {
|
|
91
|
-
return this.getAttrNumber("spinner-size") || 16;
|
|
92
|
-
}
|
|
93
|
-
set spinnerSize(e) {
|
|
94
|
-
this.setAttribute("spinner-size", e), n(this, r).style.fontSize = `${e}px`;
|
|
95
|
-
}
|
|
96
|
-
// #endregion
|
|
97
|
-
// ------- end -------
|
|
98
|
-
// ------- background 背景颜色 -------
|
|
99
|
-
// #region
|
|
100
|
-
get background() {
|
|
101
|
-
return this.getAttribute("background") || "hsla(0, 0%, 100%, 0.9)";
|
|
102
|
-
}
|
|
103
|
-
set background(e) {
|
|
104
|
-
this.setAttribute("background", e), n(this, a).style.backgroundColor = e;
|
|
105
|
-
}
|
|
106
|
-
// #endregion
|
|
107
|
-
// ------- end -------
|
|
108
|
-
// ------- text 文本 -------
|
|
109
|
-
// #region
|
|
110
|
-
get text() {
|
|
111
|
-
return this.getAttribute("text") || "";
|
|
112
|
-
}
|
|
113
|
-
set text(e) {
|
|
114
|
-
e && this.setAttribute("text", e);
|
|
115
|
-
}
|
|
116
|
-
// #endregion
|
|
117
|
-
// ------- end -------
|
|
118
|
-
// ------- fullscreen 全屏 -------
|
|
119
|
-
// #region
|
|
120
|
-
get fullscreen() {
|
|
121
|
-
return this.getAttrBoolean("fullscreen") || !1;
|
|
122
|
-
}
|
|
123
|
-
set fullscreen(e) {
|
|
124
|
-
e && this.setAttribute("fullscreen", e);
|
|
125
|
-
}
|
|
126
|
-
// #endregion
|
|
127
|
-
// ------- end -------
|
|
128
|
-
// ------- lock 全屏是否锁定 -------
|
|
129
|
-
// #region
|
|
130
|
-
get lock() {
|
|
131
|
-
return this.getAttrBoolean("lock") || !1;
|
|
132
|
-
}
|
|
133
|
-
set lock(e) {
|
|
134
|
-
e && this.setAttribute("lock", e);
|
|
135
|
-
}
|
|
136
|
-
connectedCallback() {
|
|
137
|
-
if (this.fullscreen = this.fullscreen, this.loading = this.loading, this.spinnerSize = this.spinnerSize, this.spinner = this.spinner, this.background = this.background, this.text) {
|
|
138
|
-
const e = document.createElement("div");
|
|
139
|
-
e.className = "ea-loading_text", e.innerHTML = this.text, n(this, a).appendChild(e);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
s = new WeakMap(), a = new WeakMap(), r = new WeakMap(), g = new WeakSet(), // #endregion
|
|
144
|
-
// ------- end -------
|
|
145
|
-
u = function(e, o, f) {
|
|
146
|
-
e && (n(this, s).classList.toggle("ea-loading_wrap--fullscreen", o), f && (document.body.style.overflow = o ? "hidden" : "auto"));
|
|
147
|
-
};
|
|
148
|
-
customElements.get("ea-loading") || customElements.define("ea-loading", m);
|
|
149
|
-
export {
|
|
150
|
-
m as EaLoading
|
|
151
|
-
};
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
var m = Object.defineProperty;
|
|
2
|
-
var p = (t) => {
|
|
3
|
-
throw TypeError(t);
|
|
4
|
-
};
|
|
5
|
-
var _ = (t, e, s) => e in t ? m(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
|
|
6
|
-
var d = (t, e, s) => _(t, typeof e != "symbol" ? e + "" : e, s), f = (t, e, s) => e.has(t) || p("Cannot " + s);
|
|
7
|
-
var u = (t, e, s) => (f(t, e, "read from private field"), s ? s.call(t) : e.get(t)), a = (t, e, s) => e.has(t) ? p("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), i = (t, e, s, h) => (f(t, e, "write to private field"), h ? h.call(t, s) : e.set(t, s), s);
|
|
8
|
-
import { B as b } from "./Base.js";
|
|
9
|
-
import { s as x } from "../css/ea-statistic.style.js";
|
|
10
|
-
class E extends Event {
|
|
11
|
-
constructor(e) {
|
|
12
|
-
super("ea-finish", {
|
|
13
|
-
bubbles: !0,
|
|
14
|
-
composed: !0
|
|
15
|
-
}), this.detail = e;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
var n, o, r, c, l;
|
|
19
|
-
class w extends b {
|
|
20
|
-
constructor() {
|
|
21
|
-
super();
|
|
22
|
-
/** @type {HTMLElement} */
|
|
23
|
-
a(this, n);
|
|
24
|
-
/** @type {HTMLElement} */
|
|
25
|
-
a(this, o);
|
|
26
|
-
/** @type {HTMLElement} */
|
|
27
|
-
a(this, r);
|
|
28
|
-
/** @type {HTMLElement} */
|
|
29
|
-
a(this, c);
|
|
30
|
-
/** @type {HTMLElement} */
|
|
31
|
-
a(this, l);
|
|
32
|
-
d(this, "state", this.properties({
|
|
33
|
-
title: {
|
|
34
|
-
type: String,
|
|
35
|
-
default: "",
|
|
36
|
-
observer: (s) => {
|
|
37
|
-
u(this, o).textContent = s;
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
value: {
|
|
41
|
-
type: Number,
|
|
42
|
-
default: 0,
|
|
43
|
-
/** @param {Number} newVal */
|
|
44
|
-
observer: (s) => {
|
|
45
|
-
u(this, r).textContent = s.toLocaleString();
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}));
|
|
49
|
-
this.stylesheet = x, this.$render();
|
|
50
|
-
}
|
|
51
|
-
static get observedAttributes() {
|
|
52
|
-
return [...super.observedAttributes, "title", "value"];
|
|
53
|
-
}
|
|
54
|
-
$render() {
|
|
55
|
-
this.shadowRoot.innerHTML = `
|
|
56
|
-
<div class='ea-statistic' part='container'>
|
|
57
|
-
<header class='ea-statistic__header' part='title'>
|
|
58
|
-
<slot name='title'></slot>
|
|
59
|
-
</header>
|
|
60
|
-
<main class='ea-statistic__content' part='content'>
|
|
61
|
-
<span class='ea-statistic__prefix' part='prefix'>
|
|
62
|
-
<slot name='prefix'></slot>
|
|
63
|
-
</span>
|
|
64
|
-
<span class='ea-statistic__number' part='number'>
|
|
65
|
-
<slot></slot>
|
|
66
|
-
</span>
|
|
67
|
-
<span class='ea-statistic__suffix' part='suffix'>
|
|
68
|
-
<slot name='suffix'></slot>
|
|
69
|
-
</span>
|
|
70
|
-
</main>
|
|
71
|
-
</div>
|
|
72
|
-
`, i(this, n, this.shadowRoot.querySelector(".ea-statistic")), i(this, o, this.shadowRoot.querySelector(".ea-statistic__header slot")), i(this, r, this.shadowRoot.querySelector(".ea-statistic__number")), i(this, c, this.shadowRoot.querySelector(".ea-statistic__prefix slot")), i(this, l, this.shadowRoot.querySelector(".ea-statistic__suffix slot"));
|
|
73
|
-
}
|
|
74
|
-
connectedCallback() {
|
|
75
|
-
super.connectedCallback();
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
n = new WeakMap(), o = new WeakMap(), r = new WeakMap(), c = new WeakMap(), l = new WeakMap();
|
|
79
|
-
window.customElements.get("ea-statistic") || window.customElements.define("ea-statistic", w);
|
|
80
|
-
export {
|
|
81
|
-
w as E,
|
|
82
|
-
E as a
|
|
83
|
-
};
|