easy-component-ui 3.0.14 → 3.0.15
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/dist/assets/icon.css +1 -0
- package/dist/components/Base.js +941 -0
- package/dist/components/ea-alert.js +213 -0
- package/dist/components/ea-avatar.js +164 -0
- package/dist/components/ea-backtop.js +136 -0
- package/dist/components/ea-badge.js +144 -0
- package/dist/components/ea-breadcrumb.js +148 -0
- package/dist/components/ea-button.js +266 -0
- package/dist/components/ea-calendar.js +10 -0
- package/dist/components/ea-calendar2.js +673 -0
- package/dist/components/ea-card.js +121 -0
- package/dist/components/ea-carousel.js +415 -0
- package/dist/components/ea-checkbox.js +446 -0
- package/dist/components/ea-collapse.js +313 -0
- package/dist/components/ea-color-picker.js +888 -0
- package/dist/components/ea-container.js +206 -0
- package/dist/components/ea-countdown.js +142 -0
- package/dist/components/ea-date-picker.js +649 -0
- package/dist/components/ea-descriptions.js +474 -0
- package/dist/components/ea-dialog.js +249 -0
- package/dist/components/ea-drawer.js +216 -0
- package/dist/components/ea-dropdown.js +228 -0
- package/dist/components/ea-empty.js +93 -0
- package/dist/components/ea-icon.js +159 -0
- package/dist/components/ea-image-preview.js +532 -0
- package/dist/components/ea-image.js +327 -0
- package/dist/components/ea-infinite-scroll.js +109 -0
- package/dist/components/ea-input-number.js +367 -0
- package/dist/components/ea-input.js +588 -0
- package/dist/components/ea-layout.js +132 -0
- package/dist/components/ea-link.js +101 -0
- package/dist/components/ea-menu.js +433 -0
- package/dist/components/ea-message-box.js +624 -0
- package/dist/components/ea-message.js +313 -0
- package/dist/components/ea-notification.js +331 -0
- package/dist/components/ea-overlay.js +168 -0
- package/dist/components/ea-page-header.js +108 -0
- package/dist/components/ea-pagination.js +481 -0
- package/dist/components/ea-popconfirm.js +275 -0
- package/dist/components/ea-popover.js +147 -0
- package/dist/components/ea-popper.js +203 -0
- package/dist/components/ea-progress.js +286 -0
- package/dist/components/ea-radio.js +364 -0
- package/dist/components/ea-rate.js +241 -0
- package/dist/components/ea-result.js +100 -0
- package/dist/components/ea-scrollbar.js +235 -0
- package/dist/components/ea-segmented.js +215 -0
- package/dist/components/ea-select.js +609 -0
- package/dist/components/ea-skeleton.js +263 -0
- package/dist/components/ea-slider.js +430 -0
- package/dist/components/ea-space.js +123 -0
- package/dist/components/ea-splitter.js +233 -0
- package/dist/components/ea-statistic.js +74 -0
- package/dist/components/ea-steps.js +346 -0
- package/dist/components/ea-switch.js +271 -0
- package/dist/components/ea-table.js +1137 -0
- package/dist/components/ea-tabs.js +503 -0
- package/dist/components/ea-tag.js +228 -0
- package/dist/components/ea-text.js +113 -0
- package/dist/components/ea-time-picker.js +510 -0
- package/dist/components/ea-timeline.js +185 -0
- package/dist/components/ea-tooltip.js +161 -0
- package/dist/components/ea-tour.js +544 -0
- package/dist/components/ea-transfer.js +949 -0
- package/dist/components/ea-tree.js +1125 -0
- package/dist/components/index.js +60 -0
- package/dist/core/FormBase.js +238 -0
- package/dist/css/ea-alert.style.js +4 -0
- package/dist/css/ea-aside.style.js +4 -0
- package/dist/css/ea-avatar.style.js +4 -0
- package/dist/css/ea-backtop.style.js +4 -0
- package/dist/css/ea-badge.style.js +4 -0
- package/dist/css/ea-breadcrumb-item.style.js +4 -0
- package/dist/css/ea-breadcrumb.style.js +4 -0
- package/dist/css/ea-button-group.style.js +4 -0
- package/dist/css/ea-button.style.js +4 -0
- package/dist/css/ea-calendar.style.js +4 -0
- package/dist/css/ea-card.style.js +4 -0
- package/dist/css/ea-carousel-item.style.js +4 -0
- package/dist/css/ea-carousel.style.js +4 -0
- package/dist/css/ea-check-tag.style.js +4 -0
- package/dist/css/ea-checkbox-group.style.js +4 -0
- package/dist/css/ea-checkbox.style.js +4 -0
- package/dist/css/ea-col.style.js +4 -0
- package/dist/css/ea-collapse-item.style.js +4 -0
- package/dist/css/ea-collapse.style.js +4 -0
- package/dist/css/ea-color-picker-panel.style.js +4 -0
- package/dist/css/ea-color-picker.style.js +4 -0
- package/dist/css/ea-container.style.js +4 -0
- package/dist/css/ea-date-picker.style.js +4 -0
- package/dist/css/ea-descriptions-item.style.js +4 -0
- package/dist/css/ea-descriptions.style.js +4 -0
- package/dist/css/ea-dialog.style.js +4 -0
- package/dist/css/ea-drawer.style.js +4 -0
- package/dist/css/ea-dropdown-item.style.js +4 -0
- package/dist/css/ea-dropdown-menu.style.js +4 -0
- package/dist/css/ea-dropdown.style.js +4 -0
- package/dist/css/ea-empty.style.js +4 -0
- package/dist/css/ea-footer.style.js +4 -0
- package/dist/css/ea-header.style.js +4 -0
- package/dist/css/ea-icon.style.js +4 -0
- package/dist/css/ea-image-preview.style.js +4 -0
- package/dist/css/ea-image.style.js +4 -0
- package/dist/css/ea-infinite-scroll.style.js +4 -0
- package/dist/css/ea-input-number.style.js +4 -0
- package/dist/css/ea-input.style.js +4 -0
- package/dist/css/ea-link.style.js +4 -0
- package/dist/css/ea-main.style.js +4 -0
- package/dist/css/ea-menu-item-group.style.js +4 -0
- package/dist/css/ea-menu-item.style.js +4 -0
- package/dist/css/ea-menu.style.js +4 -0
- package/dist/css/ea-message-box.style.js +4 -0
- package/dist/css/ea-message.style.js +4 -0
- package/dist/css/ea-notification.style.js +4 -0
- package/dist/css/ea-option-gropu.style.js +4 -0
- package/dist/css/ea-option.style.js +4 -0
- package/dist/css/ea-overlay.style.js +4 -0
- package/dist/css/ea-page-header.style.js +4 -0
- package/dist/css/ea-pagination.style.js +4 -0
- package/dist/css/ea-popconfirm.style.js +4 -0
- package/dist/css/ea-popover.style.js +4 -0
- package/dist/css/ea-popper.style.js +4 -0
- package/dist/css/ea-progress.style.js +4 -0
- package/dist/css/ea-radio-group.style.js +4 -0
- package/dist/css/ea-radio.style.js +4 -0
- package/dist/css/ea-rate.style.js +4 -0
- package/dist/css/ea-result.style.js +4 -0
- package/dist/css/ea-row.style.js +4 -0
- package/dist/css/ea-scrollbar.style.js +4 -0
- package/dist/css/ea-segmented.style.js +4 -0
- package/dist/css/ea-select.style.js +4 -0
- package/dist/css/ea-skeleton-item.style.js +4 -0
- package/dist/css/ea-skeleton.style.js +4 -0
- package/dist/css/ea-slider.style.js +4 -0
- package/dist/css/ea-space.style.js +4 -0
- package/dist/css/ea-splitter-bar.style.js +4 -0
- package/dist/css/ea-splitter-panel.style.js +4 -0
- package/dist/css/ea-splitter.style.js +4 -0
- package/dist/css/ea-statistic.style.js +4 -0
- package/dist/css/ea-step.style.js +4 -0
- package/dist/css/ea-steps.style.js +4 -0
- package/dist/css/ea-sub-menu.style.js +4 -0
- package/dist/css/ea-switch.style.js +4 -0
- package/dist/css/ea-tab-panel.style.js +4 -0
- package/dist/css/ea-tab.style.js +4 -0
- package/dist/css/ea-table-column.style.js +4 -0
- package/dist/css/ea-table.style.js +4 -0
- package/dist/css/ea-tabs.style.js +4 -0
- package/dist/css/ea-tag.style.js +4 -0
- package/dist/css/ea-text.style.js +4 -0
- package/dist/css/ea-time-picker.style.js +4 -0
- package/dist/css/ea-timeline-item.style.js +4 -0
- package/dist/css/ea-timeline.style.js +4 -0
- package/dist/css/ea-tooltip.style.js +4 -0
- package/dist/css/ea-tour-step.style.js +4 -0
- package/dist/css/ea-tour.style.js +4 -0
- package/dist/css/ea-transfer.style.js +5 -0
- package/dist/css/ea-tree.style.js +6 -0
- package/dist/css/ea-ui-component.style.js +4 -0
- package/dist/favicon.ico +0 -0
- package/dist/utils/Color.js +439 -0
- package/dist/utils/I18nManager.js +218 -0
- package/dist/utils/Utils.js +65 -0
- package/dist/utils/Variables.js +12 -0
- package/dist/utils/parseTime.js +73 -0
- package/dist/utils/timeout.js +9 -0
- package/package.json +1 -1
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
var b = Object.defineProperty;
|
|
2
|
+
var v = (e) => {
|
|
3
|
+
throw TypeError(e);
|
|
4
|
+
};
|
|
5
|
+
var C = (e, s, t) => s in e ? b(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
|
|
6
|
+
var p = (e, s, t) => C(e, typeof s != "symbol" ? s + "" : s, t), y = (e, s, t) => s.has(e) || v("Cannot " + t);
|
|
7
|
+
var o = (e, s, t) => (y(e, s, "read from private field"), t ? t.call(e) : s.get(e)), r = (e, s, t) => s.has(e) ? v("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), d = (e, s, t, n) => (y(e, s, "write to private field"), n ? n.call(e, t) : s.set(e, t), t);
|
|
8
|
+
import { B as w } from "./Base.js";
|
|
9
|
+
import { s as k } from "../css/ea-overlay.style.js";
|
|
10
|
+
import { t as g } from "../utils/timeout.js";
|
|
11
|
+
var a, u, c, i, l, m, f;
|
|
12
|
+
class E extends w {
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
/** @type {HTMLElement} */
|
|
16
|
+
r(this, a);
|
|
17
|
+
/** @type {HTMLElement} */
|
|
18
|
+
r(this, u);
|
|
19
|
+
/** @type {HTMLElement} */
|
|
20
|
+
r(this, c);
|
|
21
|
+
/** @type {AbortController} */
|
|
22
|
+
r(this, i);
|
|
23
|
+
p(this, "state", this.properties({
|
|
24
|
+
status: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: !1,
|
|
27
|
+
observer: (t) => {
|
|
28
|
+
t ? (o(this, a).className = this.updateContainerClasslist(), o(this, l).call(this, "open"), requestAnimationFrame(() => {
|
|
29
|
+
o(this, a).classList.add("ea-overlay--is-show"), o(this, a).addEventListener(
|
|
30
|
+
"transitionend",
|
|
31
|
+
() => {
|
|
32
|
+
o(this, l).call(this, "opened");
|
|
33
|
+
},
|
|
34
|
+
{ once: !0 }
|
|
35
|
+
);
|
|
36
|
+
})) : (o(this, a).classList.add("ea-overlay--before-close"), o(this, l).call(this, "close"), o(this, a).addEventListener(
|
|
37
|
+
"transitionend",
|
|
38
|
+
() => {
|
|
39
|
+
o(this, a).className = this.updateContainerClasslist(), o(this, l).call(this, "closed");
|
|
40
|
+
},
|
|
41
|
+
{ once: !0 }
|
|
42
|
+
));
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
modal: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: !0,
|
|
48
|
+
observer: (t) => {
|
|
49
|
+
o(this, a).className = this.updateContainerClasslist();
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"before-close": {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: !1,
|
|
55
|
+
observer: (t) => {
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"close-on-click-modal": {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: !1,
|
|
61
|
+
observer: (t) => {
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
...[
|
|
65
|
+
"z-index",
|
|
66
|
+
"background-color",
|
|
67
|
+
"content-width",
|
|
68
|
+
"content-max-width",
|
|
69
|
+
"content-height",
|
|
70
|
+
"content-left",
|
|
71
|
+
"content-top",
|
|
72
|
+
"content-translate-x",
|
|
73
|
+
"content-translate-y",
|
|
74
|
+
"content-transform"
|
|
75
|
+
].reduce((t, n) => (t[n] = {
|
|
76
|
+
type: String,
|
|
77
|
+
default: "",
|
|
78
|
+
observer: (h) => {
|
|
79
|
+
this.style.setProperty(`--ea-overlay-${n}`, h);
|
|
80
|
+
}
|
|
81
|
+
}, t), {})
|
|
82
|
+
}));
|
|
83
|
+
p(this, "funcStates", this.properties({
|
|
84
|
+
beforeClose: {
|
|
85
|
+
rawFunction: !0,
|
|
86
|
+
props: !0,
|
|
87
|
+
type: Function,
|
|
88
|
+
default: null
|
|
89
|
+
}
|
|
90
|
+
}));
|
|
91
|
+
r(this, l, (t, n) => {
|
|
92
|
+
this.emit(t, {
|
|
93
|
+
detail: n,
|
|
94
|
+
bubbles: !0,
|
|
95
|
+
composed: !0
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
r(this, m, () => this.status = !1);
|
|
99
|
+
r(this, f, (t) => {
|
|
100
|
+
[...this.children].find(
|
|
101
|
+
(h) => h === t.target || h.contains(t.target)
|
|
102
|
+
) || o(this, c) === t.target || o(this, c).contains(t.target) || (this.beforeClose ? this.beforeClose(() => this.status = !1) : o(this, m).call(this));
|
|
103
|
+
});
|
|
104
|
+
this.stylesheet = k, this.$render(), document.activeElement.blur(), g(() => {
|
|
105
|
+
this.focus();
|
|
106
|
+
}, 0);
|
|
107
|
+
}
|
|
108
|
+
static get observedAttributes() {
|
|
109
|
+
return [
|
|
110
|
+
"status",
|
|
111
|
+
"modal",
|
|
112
|
+
// "before-close",
|
|
113
|
+
"close-on-click-modal",
|
|
114
|
+
"z-index",
|
|
115
|
+
"background-color",
|
|
116
|
+
"content-width",
|
|
117
|
+
"content-max-width",
|
|
118
|
+
"content-height",
|
|
119
|
+
"content-left",
|
|
120
|
+
"content-top",
|
|
121
|
+
"content-translate-x",
|
|
122
|
+
"content-translate-y",
|
|
123
|
+
"content-transform"
|
|
124
|
+
];
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* 获取 classlist 列表
|
|
128
|
+
* @return {string} 属性值
|
|
129
|
+
*/
|
|
130
|
+
updateContainerClasslist() {
|
|
131
|
+
return this.computedClasslist("ea-overlay", {
|
|
132
|
+
"--open": this.status,
|
|
133
|
+
"--modal": !this.modal
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
show() {
|
|
137
|
+
this.status = !0;
|
|
138
|
+
}
|
|
139
|
+
hide() {
|
|
140
|
+
this.status = !1;
|
|
141
|
+
}
|
|
142
|
+
$render() {
|
|
143
|
+
this.shadowRoot.innerHTML = `
|
|
144
|
+
<div class='ea-overlay' part='container'>
|
|
145
|
+
<div class='ea-overlay__mask' part='mask'></div>
|
|
146
|
+
<div class='ea-overlay__content' part='content'>
|
|
147
|
+
<slot></slot>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
`, d(this, a, this.shadowRoot.querySelector(".ea-overlay")), d(this, u, this.shadowRoot.querySelector(".ea-overlay__mask")), d(this, c, this.shadowRoot.querySelector(
|
|
151
|
+
".ea-overlay__content"
|
|
152
|
+
));
|
|
153
|
+
}
|
|
154
|
+
connectedCallback() {
|
|
155
|
+
var t;
|
|
156
|
+
super.connectedCallback(), (t = o(this, i)) == null || t.abort(), d(this, i, new AbortController()), this["close-on-click-modal"] && this.shadowRoot.addEventListener("click", o(this, f), {
|
|
157
|
+
signal: o(this, i).signal
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
$beforeUnmounted() {
|
|
161
|
+
o(this, i).abort();
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
a = new WeakMap(), u = new WeakMap(), c = new WeakMap(), i = new WeakMap(), l = new WeakMap(), m = new WeakMap(), f = new WeakMap();
|
|
165
|
+
window.customElements.get("ea-overlay") || window.customElements.define("ea-overlay", E);
|
|
166
|
+
export {
|
|
167
|
+
E as EaOverlay
|
|
168
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
var m = Object.defineProperty;
|
|
2
|
+
var b = (t) => {
|
|
3
|
+
throw TypeError(t);
|
|
4
|
+
};
|
|
5
|
+
var u = (t, a, e) => a in t ? m(t, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[a] = e;
|
|
6
|
+
var g = (t, a, e) => u(t, typeof a != "symbol" ? a + "" : a, e), _ = (t, a, e) => a.has(t) || b("Cannot " + e);
|
|
7
|
+
var o = (t, a, e) => (_(t, a, "read from private field"), e ? e.call(t) : a.get(t)), s = (t, a, e) => a.has(t) ? b("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(t) : a.set(t, e), n = (t, a, e, i) => (_(t, a, "write to private field"), i ? i.call(t, e) : a.set(t, e), e);
|
|
8
|
+
import { B as v } from "./Base.js";
|
|
9
|
+
import { s as w } from "../css/ea-page-header.style.js";
|
|
10
|
+
var c, l, d, h, r, p;
|
|
11
|
+
class k extends v {
|
|
12
|
+
constructor() {
|
|
13
|
+
super();
|
|
14
|
+
/** @type {HTMLElement} */
|
|
15
|
+
s(this, c);
|
|
16
|
+
/** @type {HTMLSlotElement} */
|
|
17
|
+
s(this, l);
|
|
18
|
+
/** @type {HTMLSlotElement} */
|
|
19
|
+
s(this, d);
|
|
20
|
+
/** @type {HTMLSlotElement} */
|
|
21
|
+
s(this, h);
|
|
22
|
+
/** @type {AbortController} */
|
|
23
|
+
s(this, r, new AbortController());
|
|
24
|
+
g(this, "state", this.properties({
|
|
25
|
+
icon: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "",
|
|
28
|
+
observer: (e) => {
|
|
29
|
+
const i = o(this, l).querySelector("ea-icon");
|
|
30
|
+
i && i.setAttribute("name", e);
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
title: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: "",
|
|
36
|
+
observer: (e) => {
|
|
37
|
+
o(this, d).textContent = e;
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
content: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: "",
|
|
43
|
+
observer: (e) => {
|
|
44
|
+
o(this, h).textContent = e;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}));
|
|
48
|
+
/**
|
|
49
|
+
* 点击返回按钮时,派发 back 事件
|
|
50
|
+
*/
|
|
51
|
+
s(this, p, () => {
|
|
52
|
+
this.emit("back");
|
|
53
|
+
});
|
|
54
|
+
this.stylesheet = w, this.$render();
|
|
55
|
+
}
|
|
56
|
+
static get observedAttributes() {
|
|
57
|
+
return [...super.observedAttributes, "icon", "title", "content"];
|
|
58
|
+
}
|
|
59
|
+
$render() {
|
|
60
|
+
this.shadowRoot.innerHTML = `
|
|
61
|
+
<div class='ea-page-header' part='container'>
|
|
62
|
+
<section class="ea-page-header__breadcrumb" part="breadcrumb">
|
|
63
|
+
<slot name="breadcrumb"></slot>
|
|
64
|
+
</section>
|
|
65
|
+
<section class="ea-page-header__wrapper" part="header-wrapper">
|
|
66
|
+
<div class="ea-page-header__back" part="back">
|
|
67
|
+
<span class="ea-page-header__icon" part="icon">
|
|
68
|
+
<slot name="icon">
|
|
69
|
+
<ea-icon name="angle-left" part="back-icon"></ea-icon>
|
|
70
|
+
</slot>
|
|
71
|
+
</span>
|
|
72
|
+
<span class="ea-page-header__title" part="title">
|
|
73
|
+
<slot name="title">Back</slot>
|
|
74
|
+
</span>
|
|
75
|
+
</div>
|
|
76
|
+
<ea-icon class="ea-page-header__divider" part="divider">|</ea-icon>
|
|
77
|
+
<div class="ea-page-header__content" part="content">
|
|
78
|
+
<slot name="content"></slot>
|
|
79
|
+
</div>
|
|
80
|
+
<div class="ea-page-header__extra" part="extra">
|
|
81
|
+
<slot name="extra"></slot>
|
|
82
|
+
</div>
|
|
83
|
+
</section>
|
|
84
|
+
<slot></slot>
|
|
85
|
+
</div>
|
|
86
|
+
`, n(this, c, this.shadowRoot.querySelector(".ea-page-header__back")), n(this, l, this.shadowRoot.querySelector(
|
|
87
|
+
".ea-page-header__icon slot[name='icon']"
|
|
88
|
+
)), n(this, d, this.shadowRoot.querySelector(
|
|
89
|
+
".ea-page-header__title slot[name='title']"
|
|
90
|
+
)), n(this, h, this.shadowRoot.querySelector(
|
|
91
|
+
".ea-page-header__content slot[name='content']"
|
|
92
|
+
));
|
|
93
|
+
}
|
|
94
|
+
connectedCallback() {
|
|
95
|
+
var e;
|
|
96
|
+
super.connectedCallback(), (e = o(this, r)) == null || e.abort(), n(this, r, new AbortController()), o(this, c).addEventListener("click", o(this, p), {
|
|
97
|
+
signal: o(this, r).signal
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
$beforeUnmounted() {
|
|
101
|
+
o(this, r).abort();
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
c = new WeakMap(), l = new WeakMap(), d = new WeakMap(), h = new WeakMap(), r = new WeakMap(), p = new WeakMap();
|
|
105
|
+
window.customElements.get("ea-page-header") || window.customElements.define("ea-page-header", k);
|
|
106
|
+
export {
|
|
107
|
+
k as EaPageHeader
|
|
108
|
+
};
|