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,17 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var I = Object.defineProperty;
|
|
2
|
+
var R = (s) => {
|
|
3
3
|
throw TypeError(s);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var p = (s, i, e) =>
|
|
7
|
-
var t = (s, i, e) => (
|
|
8
|
-
import { B as
|
|
9
|
-
import { s as
|
|
10
|
-
import { s as
|
|
11
|
-
import { s as
|
|
12
|
-
import { s as
|
|
13
|
-
var u, c,
|
|
14
|
-
class
|
|
5
|
+
var N = (s, i, e) => i in s ? I(s, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[i] = e;
|
|
6
|
+
var p = (s, i, e) => N(s, typeof i != "symbol" ? i + "" : i, e), H = (s, i, e) => i.has(s) || R("Cannot " + e);
|
|
7
|
+
var t = (s, i, e) => (H(s, i, "read from private field"), e ? e.call(s) : i.get(s)), r = (s, i, e) => i.has(s) ? R("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, e), a = (s, i, e, o) => (H(s, i, "write to private field"), o ? o.call(s, e) : i.set(s, e), e);
|
|
8
|
+
import { B as q } from "./Base.js";
|
|
9
|
+
import { s as P } from "../css/ea-menu.style.js";
|
|
10
|
+
import { s as T } from "../css/ea-menu-item.style.js";
|
|
11
|
+
import { s as U } from "../css/ea-menu-item-group.style.js";
|
|
12
|
+
import { s as z } from "../css/ea-sub-menu.style.js";
|
|
13
|
+
var u, c, E, v, x;
|
|
14
|
+
class D extends q {
|
|
15
15
|
constructor() {
|
|
16
16
|
super();
|
|
17
17
|
/** @type {HTMLElement} */
|
|
@@ -23,7 +23,7 @@ class z extends _ {
|
|
|
23
23
|
type: ["horizontal", "vertical"],
|
|
24
24
|
default: "vertical",
|
|
25
25
|
observer: (e) => {
|
|
26
|
-
t(this,
|
|
26
|
+
t(this, E).call(this, e), this.updateContainerClasslist();
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
"background-color": {
|
|
@@ -69,7 +69,7 @@ class z extends _ {
|
|
|
69
69
|
* 更新子菜单模式
|
|
70
70
|
* @param {string} mode
|
|
71
71
|
*/
|
|
72
|
-
r(this,
|
|
72
|
+
r(this, E, (e) => {
|
|
73
73
|
this.querySelectorAll("ea-sub-menu").forEach((o) => {
|
|
74
74
|
o.setAttribute("mode", e);
|
|
75
75
|
});
|
|
@@ -81,7 +81,7 @@ class z extends _ {
|
|
|
81
81
|
r(this, v, (e) => {
|
|
82
82
|
const o = [...this.querySelectorAll("ea-menu-item")], l = [...this.querySelectorAll("ea-sub-menu")], b = e.target.closest("ea-menu-item");
|
|
83
83
|
if (e.target.closest("ea-sub-menu") || b) {
|
|
84
|
-
const L = (
|
|
84
|
+
const L = (B) => B.removeAttribute("active");
|
|
85
85
|
o.forEach(L), l.forEach(L);
|
|
86
86
|
}
|
|
87
87
|
b && (b.toggleAttribute("active", !0), this.emit("select", {
|
|
@@ -94,13 +94,13 @@ class z extends _ {
|
|
|
94
94
|
/**
|
|
95
95
|
* 初始化默认激活项
|
|
96
96
|
*/
|
|
97
|
-
r(this,
|
|
97
|
+
r(this, x, () => {
|
|
98
98
|
const e = this.querySelector(
|
|
99
99
|
`ea-menu-item[index="${this["default-active"]}"]`
|
|
100
100
|
);
|
|
101
101
|
e && e.click();
|
|
102
102
|
});
|
|
103
|
-
this.stylesheet =
|
|
103
|
+
this.stylesheet = P, this.$render();
|
|
104
104
|
}
|
|
105
105
|
static get observedAttributes() {
|
|
106
106
|
return [
|
|
@@ -140,16 +140,16 @@ class z extends _ {
|
|
|
140
140
|
signal: t(this, c).signal
|
|
141
141
|
}), this.addEventListener("ea-sub-menu-click", t(this, v), {
|
|
142
142
|
signal: t(this, c).signal
|
|
143
|
-
}), t(this,
|
|
143
|
+
}), t(this, x).call(this);
|
|
144
144
|
}
|
|
145
145
|
$beforeUnmounted() {
|
|
146
146
|
t(this, c).abort();
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
u = new WeakMap(), c = new WeakMap(),
|
|
150
|
-
window.customElements.get("ea-menu") || window.customElements.define("ea-menu",
|
|
149
|
+
u = new WeakMap(), c = new WeakMap(), E = new WeakMap(), v = new WeakMap(), x = new WeakMap();
|
|
150
|
+
window.customElements.get("ea-menu") || window.customElements.define("ea-menu", D);
|
|
151
151
|
var f;
|
|
152
|
-
class
|
|
152
|
+
class G extends q {
|
|
153
153
|
constructor() {
|
|
154
154
|
super();
|
|
155
155
|
/** @type {HTMLElement} */
|
|
@@ -176,7 +176,7 @@ class D extends _ {
|
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
}));
|
|
179
|
-
this.stylesheet =
|
|
179
|
+
this.stylesheet = T, this.$render();
|
|
180
180
|
}
|
|
181
181
|
static get observedAttributes() {
|
|
182
182
|
return [...super.observedAttributes, "index", "disabled", "active"];
|
|
@@ -208,17 +208,17 @@ class D extends _ {
|
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
f = new WeakMap();
|
|
211
|
-
window.customElements.get("ea-menu-item") || window.customElements.define("ea-menu-item",
|
|
212
|
-
var
|
|
213
|
-
class
|
|
211
|
+
window.customElements.get("ea-menu-item") || window.customElements.define("ea-menu-item", G);
|
|
212
|
+
var S, C, $;
|
|
213
|
+
class V extends q {
|
|
214
214
|
constructor() {
|
|
215
215
|
super();
|
|
216
216
|
/** @type {HTMLElement} */
|
|
217
|
-
r(this,
|
|
217
|
+
r(this, S);
|
|
218
218
|
/** @type {HTMLSlotElement} */
|
|
219
219
|
r(this, C);
|
|
220
220
|
/** @type {AbortController} */
|
|
221
|
-
r(this,
|
|
221
|
+
r(this, $, new AbortController());
|
|
222
222
|
p(this, "state", this.properties({
|
|
223
223
|
title: {
|
|
224
224
|
type: String,
|
|
@@ -228,7 +228,7 @@ class G extends _ {
|
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
}));
|
|
231
|
-
this.stylesheet =
|
|
231
|
+
this.stylesheet = U, this.$render();
|
|
232
232
|
}
|
|
233
233
|
static get observedAttributes() {
|
|
234
234
|
return [...super.observedAttributes, "title"];
|
|
@@ -243,25 +243,27 @@ class G extends _ {
|
|
|
243
243
|
<slot></slot>
|
|
244
244
|
</div>
|
|
245
245
|
</div>
|
|
246
|
-
`, a(this,
|
|
246
|
+
`, a(this, S, this.shadowRoot.querySelector(".ea-menu-item-group")), a(this, C, this.shadowRoot.querySelector("slot[name='title']"));
|
|
247
247
|
}
|
|
248
248
|
connectedCallback() {
|
|
249
249
|
super.connectedCallback();
|
|
250
250
|
}
|
|
251
251
|
$beforeUnmounted() {
|
|
252
|
-
t(this,
|
|
252
|
+
t(this, $).abort();
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
|
-
|
|
256
|
-
window.customElements.get("ea-menu-item-group") || window.customElements.define("ea-menu-item-group",
|
|
257
|
-
var g, y, n, m, h, d,
|
|
258
|
-
class
|
|
255
|
+
S = new WeakMap(), C = new WeakMap(), $ = new WeakMap();
|
|
256
|
+
window.customElements.get("ea-menu-item-group") || window.customElements.define("ea-menu-item-group", V);
|
|
257
|
+
var g, y, w, n, m, h, d, k, M, _, A;
|
|
258
|
+
class j extends q {
|
|
259
259
|
constructor() {
|
|
260
260
|
super();
|
|
261
261
|
/** @type {HTMLElement} */
|
|
262
262
|
r(this, g);
|
|
263
263
|
/** @type {HTMLElement} */
|
|
264
264
|
r(this, y);
|
|
265
|
+
/** @type {HTMLSlotElement} */
|
|
266
|
+
r(this, w);
|
|
265
267
|
/** @type {HTMLElement} */
|
|
266
268
|
r(this, n);
|
|
267
269
|
/** @type {AbortController} */
|
|
@@ -303,7 +305,14 @@ class V extends _ {
|
|
|
303
305
|
type: ["horizontal", "vertical"],
|
|
304
306
|
default: "vertical",
|
|
305
307
|
observer: (e) => {
|
|
306
|
-
t(this,
|
|
308
|
+
t(this, A).call(this, e), this.updateContainerClasslist();
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
label: {
|
|
312
|
+
type: String,
|
|
313
|
+
default: "",
|
|
314
|
+
observer: (e) => {
|
|
315
|
+
t(this, w).textContent = e;
|
|
307
316
|
}
|
|
308
317
|
}
|
|
309
318
|
}));
|
|
@@ -311,7 +320,7 @@ class V extends _ {
|
|
|
311
320
|
* 菜单项点击事件
|
|
312
321
|
* @param {MouseEvent} e
|
|
313
322
|
*/
|
|
314
|
-
r(this,
|
|
323
|
+
r(this, k, (e) => {
|
|
315
324
|
e.stopImmediatePropagation(), e.preventDefault();
|
|
316
325
|
const o = e.target.closest("ea-menu-item"), l = this.closest("ea-sub-menu") === this ? this.parentElement.closest("ea-sub-menu") : this.closest("ea-sub-menu");
|
|
317
326
|
o && (this.emit("ea-sub-menu-click", {
|
|
@@ -323,7 +332,7 @@ class V extends _ {
|
|
|
323
332
|
* 鼠标悬停事件
|
|
324
333
|
* @param {MouseEvent} e
|
|
325
334
|
*/
|
|
326
|
-
r(this,
|
|
335
|
+
r(this, M, () => {
|
|
327
336
|
var o;
|
|
328
337
|
(o = t(this, h)) == null || o.abort(), a(this, h, new AbortController()), this.open = !0;
|
|
329
338
|
const e = () => {
|
|
@@ -337,7 +346,7 @@ class V extends _ {
|
|
|
337
346
|
/**
|
|
338
347
|
* 垂直菜单折叠事件
|
|
339
348
|
*/
|
|
340
|
-
r(this,
|
|
349
|
+
r(this, _, () => {
|
|
341
350
|
this.open = !this.open, this.open || (t(this, n).style.setProperty("--ea-sub-menu-transition", "none"), t(this, n).offsetHeight, t(this, n).style.height = `${t(this, n).scrollHeight}px`, t(this, n).offsetHeight, t(this, n).style.removeProperty("--ea-sub-menu-transition")), t(this, n).style.height = `${this.open ? t(this, n).scrollHeight : 0}px`, t(this, n).addEventListener(
|
|
342
351
|
"transitionend",
|
|
343
352
|
() => {
|
|
@@ -350,18 +359,25 @@ class V extends _ {
|
|
|
350
359
|
* 菜单模式切换
|
|
351
360
|
* @param {string} [mode]
|
|
352
361
|
*/
|
|
353
|
-
r(this,
|
|
362
|
+
r(this, A, (e = this.mode) => {
|
|
354
363
|
var o;
|
|
355
|
-
(o = t(this, d)) == null || o.abort(), a(this, d, new AbortController()), e === "vertical" ? t(this, y).addEventListener("click", t(this,
|
|
364
|
+
(o = t(this, d)) == null || o.abort(), a(this, d, new AbortController()), e === "vertical" ? t(this, y).addEventListener("click", t(this, _), {
|
|
356
365
|
signal: t(this, d).signal
|
|
357
|
-
}) : this.addEventListener("mouseenter", t(this,
|
|
366
|
+
}) : this.addEventListener("mouseenter", t(this, M), {
|
|
358
367
|
signal: t(this, d).signal
|
|
359
368
|
});
|
|
360
369
|
});
|
|
361
|
-
this.stylesheet =
|
|
370
|
+
this.stylesheet = z, this.$render();
|
|
362
371
|
}
|
|
363
372
|
static get observedAttributes() {
|
|
364
|
-
return [
|
|
373
|
+
return [
|
|
374
|
+
...super.observedAttributes,
|
|
375
|
+
"active",
|
|
376
|
+
"index",
|
|
377
|
+
"disabled",
|
|
378
|
+
"mode",
|
|
379
|
+
"label"
|
|
380
|
+
];
|
|
365
381
|
}
|
|
366
382
|
/**
|
|
367
383
|
* 获取 classlist 列表
|
|
@@ -388,30 +404,30 @@ class V extends _ {
|
|
|
388
404
|
<div class='ea-sub-menu' part='container'>
|
|
389
405
|
<header class='ea-sub-menu__title' part='title'>
|
|
390
406
|
<slot name='title'></slot>
|
|
391
|
-
<ea-icon
|
|
407
|
+
<ea-icon name="${e ? "angle-right" : "angle-down"}" class='ea-sub-menu__arrow' part='arrow'></ea-icon>
|
|
392
408
|
</header>
|
|
393
409
|
<ul class='ea-sub-menu__content' part='content'>
|
|
394
410
|
<slot></slot>
|
|
395
411
|
</ul>
|
|
396
412
|
</div>
|
|
397
|
-
`, a(this, g, this.shadowRoot.querySelector(".ea-sub-menu")), a(this, y, this.shadowRoot.querySelector(".ea-sub-menu__title")), a(this, n, this.shadowRoot.querySelector(".ea-sub-menu__content")), this.updateContainerClasslist();
|
|
413
|
+
`, a(this, g, this.shadowRoot.querySelector(".ea-sub-menu")), a(this, y, this.shadowRoot.querySelector(".ea-sub-menu__title")), a(this, w, this.shadowRoot.querySelector("slot[name='title']")), a(this, n, this.shadowRoot.querySelector(".ea-sub-menu__content")), this.updateContainerClasslist();
|
|
398
414
|
}
|
|
399
415
|
connectedCallback() {
|
|
400
416
|
var e;
|
|
401
|
-
super.connectedCallback(), (e = t(this, m)) == null || e.abort(), a(this, m, new AbortController()), this.addEventListener("click", t(this,
|
|
417
|
+
super.connectedCallback(), (e = t(this, m)) == null || e.abort(), a(this, m, new AbortController()), this.addEventListener("click", t(this, k), {
|
|
402
418
|
signal: t(this, m).signal
|
|
403
|
-
}), t(this,
|
|
419
|
+
}), t(this, A).call(this), this.updateContainerClasslist();
|
|
404
420
|
}
|
|
405
421
|
$beforeUnmounted() {
|
|
406
422
|
var e, o, l;
|
|
407
423
|
(e = t(this, m)) == null || e.abort(), (o = t(this, h)) == null || o.abort(), (l = t(this, d)) == null || l.abort();
|
|
408
424
|
}
|
|
409
425
|
}
|
|
410
|
-
g = new WeakMap(), y = new WeakMap(), n = new WeakMap(), m = new WeakMap(), h = new WeakMap(), d = new WeakMap(),
|
|
411
|
-
window.customElements.get("ea-sub-menu") || window.customElements.define("ea-sub-menu",
|
|
426
|
+
g = new WeakMap(), y = new WeakMap(), w = new WeakMap(), n = new WeakMap(), m = new WeakMap(), h = new WeakMap(), d = new WeakMap(), k = new WeakMap(), M = new WeakMap(), _ = new WeakMap(), A = new WeakMap();
|
|
427
|
+
window.customElements.get("ea-sub-menu") || window.customElements.define("ea-sub-menu", j);
|
|
412
428
|
export {
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
429
|
+
D as EaMenu,
|
|
430
|
+
G as EaMenuItem,
|
|
431
|
+
V as EaMenuItemGroup,
|
|
432
|
+
j as EaSubMenu
|
|
417
433
|
};
|