easy-component-ui 3.0.8 → 3.0.10
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/components/ea-carousel.js +138 -113
- package/dist/css/ea-carousel.style.js +1 -1
- package/package.json +304 -304
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
throw TypeError(
|
|
1
|
+
var j = Object.defineProperty;
|
|
2
|
+
var B = (r) => {
|
|
3
|
+
throw TypeError(r);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var t = (
|
|
8
|
-
import { B } from "./Base.js";
|
|
9
|
-
import { s as
|
|
10
|
-
import { s as
|
|
11
|
-
class
|
|
5
|
+
var D = (r, o, e) => o in r ? j(r, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[o] = e;
|
|
6
|
+
var T = (r, o, e) => D(r, typeof o != "symbol" ? o + "" : o, e), $ = (r, o, e) => o.has(r) || B("Cannot " + e);
|
|
7
|
+
var t = (r, o, e) => ($(r, o, "read from private field"), e ? e.call(r) : o.get(r)), n = (r, o, e) => o.has(r) ? B("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(r) : o.set(r, e), g = (r, o, e, s) => ($(r, o, "write to private field"), s ? s.call(r, e) : o.set(r, e), e), c = (r, o, e) => ($(r, o, "access private method"), e);
|
|
8
|
+
import { B as N } from "./Base.js";
|
|
9
|
+
import { s as W } from "../css/ea-carousel-item.style.js";
|
|
10
|
+
import { s as X } from "../css/ea-carousel.style.js";
|
|
11
|
+
class Y extends N {
|
|
12
12
|
static get observedAttributes() {
|
|
13
13
|
return [...super.observedAttributes];
|
|
14
14
|
}
|
|
15
15
|
constructor() {
|
|
16
|
-
super(), this.stylesheet =
|
|
16
|
+
super(), this.stylesheet = W, this.$render();
|
|
17
17
|
}
|
|
18
18
|
$render() {
|
|
19
19
|
this.shadowRoot.innerHTML = `
|
|
@@ -26,30 +26,32 @@ class W extends B {
|
|
|
26
26
|
super.connectedCallback();
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
window.customElements.get("ea-carousel-item") || window.customElements.define("ea-carousel-item",
|
|
30
|
-
var
|
|
31
|
-
class
|
|
29
|
+
window.customElements.get("ea-carousel-item") || window.customElements.define("ea-carousel-item", Y);
|
|
30
|
+
var m, C, _, S, f, p, u, d, v, i, q, w, l, z, O, U, E, M, L, y, A, x, I, H, P, k, R;
|
|
31
|
+
class F extends N {
|
|
32
32
|
constructor() {
|
|
33
33
|
super();
|
|
34
34
|
n(this, l);
|
|
35
35
|
/** @type {HTMLElement} */
|
|
36
|
-
n(this,
|
|
36
|
+
n(this, m);
|
|
37
37
|
/** @type {HTMLElement} */
|
|
38
|
-
n(this,
|
|
38
|
+
n(this, C);
|
|
39
39
|
/** @type {HTMLElement} */
|
|
40
40
|
n(this, _);
|
|
41
41
|
/** @type {HTMLElement} */
|
|
42
|
-
n(this,
|
|
42
|
+
n(this, S);
|
|
43
43
|
/** @type {HTMLElement} */
|
|
44
|
-
n(this,
|
|
44
|
+
n(this, f);
|
|
45
45
|
/** @type {HTMLElement[]} */
|
|
46
|
-
n(this,
|
|
46
|
+
n(this, p, []);
|
|
47
47
|
/** @type {AbortController} */
|
|
48
|
-
n(this,
|
|
49
|
-
n(this,
|
|
48
|
+
n(this, u);
|
|
49
|
+
n(this, d, {
|
|
50
50
|
triggerAbortControllers: new AbortController()
|
|
51
51
|
});
|
|
52
|
-
|
|
52
|
+
/** @type {MutationObserver | null} */
|
|
53
|
+
n(this, v, null);
|
|
54
|
+
n(this, i, {
|
|
53
55
|
prevIndex: 0,
|
|
54
56
|
originLength: 0,
|
|
55
57
|
timer: null,
|
|
@@ -58,7 +60,7 @@ class X extends B {
|
|
|
58
60
|
isEnd: !1,
|
|
59
61
|
isProcessingSlotChange: !1
|
|
60
62
|
});
|
|
61
|
-
|
|
63
|
+
T(this, "state", this.properties({
|
|
62
64
|
height: {
|
|
63
65
|
type: String,
|
|
64
66
|
default: "100%",
|
|
@@ -76,12 +78,12 @@ class X extends B {
|
|
|
76
78
|
index: {
|
|
77
79
|
type: Number,
|
|
78
80
|
default: 0,
|
|
79
|
-
observer: (e,
|
|
80
|
-
if (t(this,
|
|
81
|
-
e < 0 ? (e = t(this,
|
|
81
|
+
observer: (e, s) => {
|
|
82
|
+
if (t(this, E).call(this, e), t(this, i).isEnd) return t(this, i).isEnd = !1;
|
|
83
|
+
e < 0 ? (e = t(this, p).length - 1, s = 0, t(this, i).isEnd = !0) : e > t(this, p).length - 1 && (s = t(this, p).length - 1, e = 0, t(this, i).isEnd = !0), t(this, i).prevIndex = s, this.emit("change", {
|
|
82
84
|
detail: {
|
|
83
85
|
current: e,
|
|
84
|
-
prev:
|
|
86
|
+
prev: s
|
|
85
87
|
}
|
|
86
88
|
});
|
|
87
89
|
}
|
|
@@ -91,12 +93,12 @@ class X extends B {
|
|
|
91
93
|
default: "hover",
|
|
92
94
|
/** @param {'click' | 'hover'} newVal */
|
|
93
95
|
observer: (e) => {
|
|
94
|
-
var
|
|
95
|
-
(
|
|
96
|
+
var s;
|
|
97
|
+
(s = t(this, d).triggerAbortControllers) == null || s.abort(), t(this, d).triggerAbortControllers = new AbortController(), t(this, f).addEventListener(
|
|
96
98
|
e === "hover" ? "mouseover" : "click",
|
|
97
|
-
t(this,
|
|
99
|
+
t(this, I),
|
|
98
100
|
{
|
|
99
|
-
signal: t(this,
|
|
101
|
+
signal: t(this, d).triggerAbortControllers.signal
|
|
100
102
|
}
|
|
101
103
|
);
|
|
102
104
|
}
|
|
@@ -118,7 +120,7 @@ class X extends B {
|
|
|
118
120
|
type: Boolean,
|
|
119
121
|
default: !0,
|
|
120
122
|
observer: (e) => {
|
|
121
|
-
|
|
123
|
+
c(this, l, L).call(this), e && c(this, l, y).call(this);
|
|
122
124
|
}
|
|
123
125
|
},
|
|
124
126
|
loop: {
|
|
@@ -145,89 +147,89 @@ class X extends B {
|
|
|
145
147
|
* 处理 index 溢出的情况
|
|
146
148
|
* @return {number}
|
|
147
149
|
*/
|
|
148
|
-
n(this,
|
|
150
|
+
n(this, q, () => this.index === t(this, p).length ? 0 : this.index === -1 ? t(this, p).length - 1 : this.index);
|
|
149
151
|
/**
|
|
150
152
|
* 渲染 轮播图指示器,为了避免vue组件缓存,所以在初始化和组件挂载时都进行渲染
|
|
151
153
|
*/
|
|
152
|
-
n(this,
|
|
154
|
+
n(this, w, () => {
|
|
153
155
|
const e = Array.from(
|
|
154
156
|
this.querySelectorAll("ea-carousel-item:not([slot])"),
|
|
155
|
-
(
|
|
157
|
+
(s, a) => `<button class='ea-carousel__indicator' part='indicator' tabindex="1" data-index="${a}"></button>`
|
|
156
158
|
).join("");
|
|
157
|
-
t(this,
|
|
158
|
-
...t(this,
|
|
159
|
+
t(this, f).innerHTML = e, g(this, p, [
|
|
160
|
+
...t(this, f).querySelectorAll(".ea-carousel__indicator")
|
|
159
161
|
]);
|
|
160
162
|
});
|
|
161
163
|
/**
|
|
162
164
|
* 更新轮播图位置
|
|
163
165
|
* @param {number} index
|
|
164
166
|
*/
|
|
165
|
-
n(this,
|
|
166
|
-
const { width:
|
|
167
|
+
n(this, E, (e = 0) => {
|
|
168
|
+
const { width: s, height: a } = t(this, m).getBoundingClientRect(), h = this.direction === "horizontal" ? "X" : "Y", b = this.direction === "horizontal" ? s : a;
|
|
167
169
|
this.style.setProperty(
|
|
168
170
|
"--ea-carousel-transform",
|
|
169
|
-
`translate${
|
|
170
|
-
), t(this,
|
|
171
|
+
`translate${h}(-${(e + 1) * b}px)`
|
|
172
|
+
), t(this, M).call(this);
|
|
171
173
|
});
|
|
172
174
|
/**
|
|
173
175
|
* 更新指示器位置
|
|
174
176
|
*/
|
|
175
|
-
n(this,
|
|
176
|
-
t(this,
|
|
177
|
-
e.classList.toggle("is-active",
|
|
177
|
+
n(this, M, () => {
|
|
178
|
+
t(this, p).forEach((e, s) => {
|
|
179
|
+
e.classList.toggle("is-active", s === t(this, q).call(this));
|
|
178
180
|
});
|
|
179
181
|
});
|
|
180
182
|
/**
|
|
181
183
|
* 开启轮播图过渡属性
|
|
182
184
|
*/
|
|
183
|
-
n(this,
|
|
185
|
+
n(this, A, () => {
|
|
184
186
|
this.clientHeight, this.style.removeProperty("--ea-carousel-transition");
|
|
185
187
|
});
|
|
186
188
|
/**
|
|
187
189
|
* 关闭轮播图过渡属性
|
|
188
190
|
*/
|
|
189
|
-
n(this,
|
|
191
|
+
n(this, x, () => {
|
|
190
192
|
this.style.setProperty("--ea-carousel-transition", "none"), this.clientHeight;
|
|
191
193
|
});
|
|
192
194
|
/**
|
|
193
195
|
* 指示器 处理事件,需要按照 `this.trigger` 来确定事件名
|
|
194
196
|
* @param {MouseEvent} e
|
|
195
197
|
*/
|
|
196
|
-
n(this,
|
|
197
|
-
const
|
|
198
|
+
n(this, I, (e) => {
|
|
199
|
+
const s = t(this, f).querySelectorAll(
|
|
198
200
|
".ea-carousel__indicator"
|
|
199
201
|
), a = e.target.closest(".ea-carousel__indicator");
|
|
200
|
-
a &&
|
|
201
|
-
|
|
202
|
+
a && s.forEach((h, b) => {
|
|
203
|
+
h.classList.toggle("is-active", h === a), h === a && (this.index = b);
|
|
202
204
|
});
|
|
203
205
|
});
|
|
204
206
|
/**
|
|
205
207
|
* 轮播图切换结束事件,即能确保轮播图在视觉上连续
|
|
206
208
|
*/
|
|
207
|
-
n(this,
|
|
208
|
-
t(this,
|
|
209
|
+
n(this, H, () => {
|
|
210
|
+
t(this, x).call(this), this.autoplay && !t(this, i).isMouseEnter && c(this, l, L).call(this), this.index = t(this, q).call(this), this.autoplay && !t(this, i).isMouseEnter && c(this, l, y).call(this), t(this, A).call(this), t(this, i).pause = !1;
|
|
209
211
|
});
|
|
210
212
|
/**
|
|
211
213
|
* 箭头显示事件
|
|
212
214
|
*/
|
|
213
|
-
n(this,
|
|
215
|
+
n(this, P, () => {
|
|
214
216
|
const e = () => {
|
|
215
|
-
t(this,
|
|
217
|
+
t(this, i).isMouseEnter = !1, this["pause-on-hover"] && c(this, l, y).call(this), this.updateContainerClasslist();
|
|
216
218
|
};
|
|
217
|
-
t(this,
|
|
218
|
-
signal: t(this,
|
|
219
|
+
t(this, i).isMouseEnter = !0, this["pause-on-hover"] && c(this, l, L).call(this), this.updateContainerClasslist(), t(this, m).addEventListener("mouseleave", e, {
|
|
220
|
+
signal: t(this, u).signal,
|
|
219
221
|
once: !0
|
|
220
222
|
});
|
|
221
223
|
});
|
|
222
224
|
/**
|
|
223
225
|
* 当窗口大小变化时,更新轮播图位置
|
|
224
226
|
*/
|
|
225
|
-
n(this,
|
|
227
|
+
n(this, k, () => {
|
|
226
228
|
let e = null;
|
|
227
229
|
return {
|
|
228
230
|
listener: () => {
|
|
229
231
|
clearTimeout(e), e = null, e = setTimeout(() => {
|
|
230
|
-
t(this,
|
|
232
|
+
t(this, E).call(this, this.index);
|
|
231
233
|
}, 100);
|
|
232
234
|
},
|
|
233
235
|
unsetHandler: () => {
|
|
@@ -238,24 +240,24 @@ class X extends B {
|
|
|
238
240
|
/**
|
|
239
241
|
* 处理 slotchange 事件,当 slot 内容变化时重新渲染
|
|
240
242
|
*/
|
|
241
|
-
n(this,
|
|
242
|
-
t(this,
|
|
243
|
-
t(this,
|
|
243
|
+
n(this, R, () => {
|
|
244
|
+
t(this, i).isProcessingSlotChange || (t(this, i).isProcessingSlotChange = !0, t(this, x).call(this), c(this, l, L).call(this), t(this, i).prevIndex = 0, t(this, i).originLength = 0, t(this, i).pause = !1, t(this, i).isEnd = !1, this.index = 0, t(this, w).call(this), c(this, l, z).call(this), t(this, M).call(this), this.autoplay && c(this, l, y).call(this), queueMicrotask(() => {
|
|
245
|
+
t(this, A).call(this), t(this, i).isProcessingSlotChange = !1;
|
|
244
246
|
}));
|
|
245
247
|
});
|
|
246
248
|
/**
|
|
247
249
|
* 上一张轮播图
|
|
248
250
|
*/
|
|
249
|
-
|
|
250
|
-
t(this,
|
|
251
|
+
T(this, "prev", () => {
|
|
252
|
+
t(this, i).pause || (this.index--, t(this, i).pause = !0);
|
|
251
253
|
});
|
|
252
254
|
/**
|
|
253
255
|
* 下一张轮播图
|
|
254
256
|
*/
|
|
255
|
-
|
|
256
|
-
t(this,
|
|
257
|
+
T(this, "next", () => {
|
|
258
|
+
t(this, i).pause || (this.index++, t(this, i).pause = !0);
|
|
257
259
|
});
|
|
258
|
-
this.stylesheet =
|
|
260
|
+
this.stylesheet = X, this.$render();
|
|
259
261
|
}
|
|
260
262
|
static get observedAttributes() {
|
|
261
263
|
return [
|
|
@@ -286,11 +288,11 @@ class X extends B {
|
|
|
286
288
|
["--" + this.direction]: this.direction
|
|
287
289
|
},
|
|
288
290
|
{
|
|
289
|
-
["arrow-" + this.arrow]: this.arrow === "always" || this.arrow === "never" || t(this,
|
|
291
|
+
["arrow-" + this.arrow]: this.arrow === "always" || this.arrow === "never" || t(this, i).isMouseEnter,
|
|
290
292
|
[this["indicator-position"] + "-indicator"]: this["indicator-position"]
|
|
291
293
|
}
|
|
292
294
|
);
|
|
293
|
-
return t(this,
|
|
295
|
+
return t(this, m).className = e, e;
|
|
294
296
|
}
|
|
295
297
|
$render() {
|
|
296
298
|
this.shadowRoot.innerHTML = `
|
|
@@ -310,80 +312,103 @@ class X extends B {
|
|
|
310
312
|
|
|
311
313
|
</footer>
|
|
312
314
|
</div>
|
|
313
|
-
`,
|
|
315
|
+
`, g(this, m, this.shadowRoot.querySelector(".ea-carousel")), g(this, C, this.shadowRoot.querySelector(".ea-carousel__content")), g(this, f, this.shadowRoot.querySelector(
|
|
314
316
|
".ea-carousel__indicator-wrap"
|
|
315
|
-
)),
|
|
317
|
+
)), g(this, _, this.shadowRoot.querySelector(
|
|
316
318
|
".ea-carousel__arrow.arrow-left"
|
|
317
|
-
)),
|
|
319
|
+
)), g(this, S, this.shadowRoot.querySelector(
|
|
318
320
|
".ea-carousel__arrow.arrow-right"
|
|
319
|
-
)), t(this,
|
|
321
|
+
)), t(this, w).call(this), this.updateContainerClasslist();
|
|
320
322
|
}
|
|
321
323
|
connectedCallback() {
|
|
322
|
-
var e,
|
|
323
|
-
super.connectedCallback(), (e = t(this,
|
|
324
|
-
for (const a in t(this,
|
|
325
|
-
(
|
|
326
|
-
t(this,
|
|
324
|
+
var e, s;
|
|
325
|
+
super.connectedCallback(), (e = t(this, u)) == null || e.abort(), g(this, u, new AbortController());
|
|
326
|
+
for (const a in t(this, d))
|
|
327
|
+
(s = t(this, d)[a]) == null || s.abort(), t(this, d)[a] = new AbortController();
|
|
328
|
+
t(this, x).call(this), t(this, w).call(this), c(this, l, z).call(this), this.autoplay && c(this, l, y).call(this), t(this, f).addEventListener(
|
|
327
329
|
this.trigger === "hover" ? "mouseover" : "click",
|
|
328
|
-
t(this,
|
|
330
|
+
t(this, I),
|
|
329
331
|
{
|
|
330
|
-
signal: t(this,
|
|
332
|
+
signal: t(this, d).triggerAbortControllers.signal
|
|
331
333
|
}
|
|
332
|
-
), t(this,
|
|
334
|
+
), t(this, C).addEventListener(
|
|
333
335
|
"transitionend",
|
|
334
|
-
t(this,
|
|
335
|
-
{ signal: t(this,
|
|
336
|
+
t(this, H),
|
|
337
|
+
{ signal: t(this, u).signal }
|
|
336
338
|
), this.arrow !== "never" && this.direction !== "vertical" && (t(this, _).addEventListener("click", this.prev, {
|
|
337
|
-
signal: t(this,
|
|
338
|
-
}), t(this,
|
|
339
|
-
signal: t(this,
|
|
340
|
-
})), t(this,
|
|
341
|
-
signal: t(this,
|
|
342
|
-
}), window.addEventListener("resize", t(this,
|
|
343
|
-
signal: t(this,
|
|
344
|
-
}), t(this,
|
|
345
|
-
signal: t(this,
|
|
339
|
+
signal: t(this, u).signal
|
|
340
|
+
}), t(this, S).addEventListener("click", this.next, {
|
|
341
|
+
signal: t(this, u).signal
|
|
342
|
+
})), t(this, m).addEventListener("mouseenter", t(this, P), {
|
|
343
|
+
signal: t(this, u).signal
|
|
344
|
+
}), window.addEventListener("resize", t(this, k).call(this).listener, {
|
|
345
|
+
signal: t(this, u).signal
|
|
346
|
+
}), t(this, C).querySelector("slot:not([name])").addEventListener("slotchange", t(this, R), {
|
|
347
|
+
signal: t(this, u).signal
|
|
346
348
|
}), queueMicrotask(() => {
|
|
347
|
-
t(this,
|
|
349
|
+
t(this, A).call(this);
|
|
348
350
|
});
|
|
349
351
|
}
|
|
350
352
|
$beforeUnmounted() {
|
|
351
|
-
var e,
|
|
352
|
-
(e = t(this,
|
|
353
|
-
for (const
|
|
354
|
-
(
|
|
355
|
-
(a = t(this,
|
|
353
|
+
var e, s, a, h;
|
|
354
|
+
(e = t(this, u)) == null || e.abort();
|
|
355
|
+
for (const b in t(this, d))
|
|
356
|
+
(s = t(this, d)[b]) == null || s.abort();
|
|
357
|
+
(a = t(this, k).call(this)) == null || a.unsetHandler(), (h = t(this, v)) == null || h.disconnect(), g(this, v, null);
|
|
356
358
|
}
|
|
357
359
|
}
|
|
358
|
-
|
|
360
|
+
m = new WeakMap(), C = new WeakMap(), _ = new WeakMap(), S = new WeakMap(), f = new WeakMap(), p = new WeakMap(), u = new WeakMap(), d = new WeakMap(), v = new WeakMap(), i = new WeakMap(), q = new WeakMap(), w = new WeakMap(), l = new WeakSet(), /**
|
|
359
361
|
* 初始化 `轮播图元素` 结构
|
|
360
362
|
*/
|
|
361
|
-
|
|
363
|
+
z = function() {
|
|
362
364
|
try {
|
|
363
365
|
const e = this.querySelectorAll("ea-carousel-item:not([slot])");
|
|
364
366
|
if (e.length === 0) return;
|
|
365
|
-
t(this,
|
|
367
|
+
t(this, i).originLength = e.length, this.querySelectorAll(
|
|
366
368
|
'ea-carousel-item[slot^="clone-"]'
|
|
367
|
-
).forEach((
|
|
368
|
-
const a = e[0].cloneNode(!0),
|
|
369
|
-
a.setAttribute("slot", "clone-first"),
|
|
370
|
-
t(this,
|
|
369
|
+
).forEach((b) => b.remove());
|
|
370
|
+
const a = e[0].cloneNode(!0), h = e[e.length - 1].cloneNode(!0);
|
|
371
|
+
a.setAttribute("slot", "clone-first"), h.setAttribute("slot", "clone-last"), this.appendChild(a), this.appendChild(h), c(this, l, O).call(this), queueMicrotask(() => {
|
|
372
|
+
t(this, E).call(this);
|
|
371
373
|
});
|
|
372
374
|
} catch {
|
|
373
375
|
}
|
|
374
|
-
},
|
|
376
|
+
}, /**
|
|
377
|
+
* 设置 MutationObserver 监听 item 内容变化
|
|
378
|
+
*/
|
|
379
|
+
O = function() {
|
|
380
|
+
t(this, v) && t(this, v).disconnect(), g(this, v, new MutationObserver((s) => {
|
|
381
|
+
s.some((h) => h.type === "childList" && h.target.closest("ea-carousel-item:not([slot])")) && c(this, l, U).call(this);
|
|
382
|
+
})), this.querySelectorAll("ea-carousel-item:not([slot])").forEach((s) => {
|
|
383
|
+
t(this, v).observe(s, {
|
|
384
|
+
childList: !0,
|
|
385
|
+
subtree: !0,
|
|
386
|
+
characterData: !0
|
|
387
|
+
});
|
|
388
|
+
});
|
|
389
|
+
}, /**
|
|
390
|
+
* 同步克隆节点的内容
|
|
391
|
+
*/
|
|
392
|
+
U = function() {
|
|
393
|
+
const e = this.querySelectorAll("ea-carousel-item:not([slot])");
|
|
394
|
+
if (e.length === 0) return;
|
|
395
|
+
const s = this.querySelector(
|
|
396
|
+
'ea-carousel-item[slot="clone-first"]'
|
|
397
|
+
), a = this.querySelector('ea-carousel-item[slot="clone-last"]');
|
|
398
|
+
s && e[0] && (s.innerHTML = e[0].innerHTML), a && e[e.length - 1] && (a.innerHTML = e[e.length - 1].innerHTML);
|
|
399
|
+
}, E = new WeakMap(), M = new WeakMap(), /**
|
|
375
400
|
* 清除轮播图自动播放
|
|
376
401
|
*/
|
|
377
|
-
|
|
378
|
-
t(this,
|
|
402
|
+
L = function() {
|
|
403
|
+
t(this, i).timer && (clearInterval(t(this, i).timer), t(this, i).timer = null);
|
|
379
404
|
}, /**
|
|
380
405
|
* 处理轮播图自动播放
|
|
381
406
|
*/
|
|
382
|
-
|
|
383
|
-
this.autoplay && (t(this,
|
|
384
|
-
},
|
|
385
|
-
window.customElements.get("ea-carousel") || window.customElements.define("ea-carousel",
|
|
407
|
+
y = function() {
|
|
408
|
+
this.autoplay && (t(this, i).timer = setInterval(this.next, this.interval));
|
|
409
|
+
}, A = new WeakMap(), x = new WeakMap(), I = new WeakMap(), H = new WeakMap(), P = new WeakMap(), k = new WeakMap(), R = new WeakMap();
|
|
410
|
+
window.customElements.get("ea-carousel") || window.customElements.define("ea-carousel", F);
|
|
386
411
|
export {
|
|
387
|
-
|
|
388
|
-
|
|
412
|
+
F as EaCarousel,
|
|
413
|
+
Y as EaCarouselItem
|
|
389
414
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const r = ":host{--ea-carousel-indicator-x: 50%;--ea-carousel-indicator-y: 8px;--ea-carousel-arrow-x: 8px;--ea-carousel-indicator-spacing: var(--spacing-sm);--ea-carousel-arrow-border-radius: var(--border-radius-circle);--ea-carousel-height: 100%;--ea-carousel-indicator-width: 16px;--ea-carousel-indicator-height: 4px;--ea-carousel-arrow-size: 24px;--ea-carousel-transform: translateX(0);--ea-carousel-indicator-color: rgba(255, 255, 255, .4);--ea-carousel-indicator-outside-color: rgba(208, 208, 208, .4);--ea-carousel-indicator-active-color: var(--grey-400);--ea-carousel-arrow-color: rgba(31, 45, 61, .11);--ea-carousel-arrow-hover-color: rgba(31, 45, 61, .23);--ea-carousel-transition: var(--transition-slow)}.ea-carousel{position:relative;overflow:hidden;display:flex;flex-direction:column;flex-wrap:nowrap;height:var(--ea-carousel-height)}.ea-carousel__content{position:relative;display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;height:100%;width:100%;transform:var(--ea-carousel-transform);transition:transform var(--ea-carousel-transition)}.ea-carousel__arrow{border:none;display:flex;align-items:center;justify-content:center;position:absolute;top:50%;z-index:1;transform:translateY(-50%);opacity:0;width:var(--ea-carousel-arrow-size);height:var(--ea-carousel-arrow-size);line-height:var(--ea-carousel-arrow-size);font-size:var(--font-size-md);font-weight:800;text-align:center;border-radius:var(--ea-carousel-arrow-border-radius);background-color:var(--ea-carousel-arrow-color);color:var(--color-white);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color .3s,transform .3s,opacity .3s}.ea-carousel__arrow.arrow-left{left:var(--ea-carousel-arrow-x);transform:translate(calc(-100% - var(--ea-carousel-arrow-x)),-50%)}.ea-carousel__arrow.arrow-right{right:var(--ea-carousel-arrow-x);transform:translate(calc(100% - var(--ea-carousel-arrow-x)),-50%)}.ea-carousel__arrow:hover{background-color:var(--ea-carousel-arrow-hover-color)}.ea-carousel__arrow ea-icon{color:var(--color-white)}.ea-carousel__indicator-wrap{position:absolute;right:var(--ea-carousel-indicator-x);bottom:var(--ea-carousel-indicator-y);transform:translate(50%);display:flex;flex-direction:row;align-items:center;justify-content:center}.ea-carousel__indicator{box-sizing:border-box;padding:0;border:none;margin:var(--ea-carousel-indicator-spacing);width:var(--ea-carousel-indicator-width);height:var(--ea-carousel-indicator-height);background-color:var(--ea-carousel-indicator-color);transition:background-color .3s}.ea-carousel__indicator.is-active{background-color:var(--ea-carousel-indicator-active-color)}.ea-carousel--vertical .ea-carousel__arrow{display:none}.ea-carousel--vertical .ea-carousel__content{flex-direction:column}.ea-carousel--vertical .ea-carousel__indicator{--ea-carousel-indicator-width: 4px;--ea-carousel-indicator-height: 16px}.ea-carousel--vertical .ea-carousel__indicator-wrap{--ea-carousel-indicator-x: 8px;--ea-carousel-indicator-y: 50%;flex-direction:column;transform:translateY(50%)}.ea-carousel.is-arrow-hover .arrow-left,.ea-carousel.is-arrow-hover .arrow-right,.ea-carousel.is-arrow-always .arrow-left,.ea-carousel.is-arrow-always .arrow-right{opacity:1;transform:translateY(-50%)}.ea-carousel.is-outside-indicator .ea-carousel__indicator-wrap{position:relative;bottom:unset;left:unset}.ea-carousel.is-outside-indicator .ea-carousel__indicator{background-color:var(--ea-carousel-indicator-outside-color)}.ea-carousel.is-outside-indicator .ea-carousel__indicator.is-active{background-color:var(--ea-carousel-indicator-active-color)}";
|
|
1
|
+
const r = ":host{--ea-carousel-indicator-x: 50%;--ea-carousel-indicator-y: 8px;--ea-carousel-arrow-x: 8px;--ea-carousel-indicator-spacing: var(--spacing-sm);--ea-carousel-arrow-border-radius: var(--border-radius-circle);--ea-carousel-height: 100%;--ea-carousel-indicator-width: 16px;--ea-carousel-indicator-height: 4px;--ea-carousel-arrow-size: 24px;--ea-carousel-transform: translateX(0);--ea-carousel-indicator-color: rgba(255, 255, 255, .4);--ea-carousel-indicator-outside-color: rgba(208, 208, 208, .4);--ea-carousel-indicator-active-color: var(--grey-400);--ea-carousel-arrow-color: rgba(31, 45, 61, .11);--ea-carousel-arrow-hover-color: rgba(31, 45, 61, .23);--ea-carousel-transition: var(--transition-slow)}:host{display:block}.ea-carousel{position:relative;overflow:hidden;display:flex;flex-direction:column;flex-wrap:nowrap;height:var(--ea-carousel-height)}.ea-carousel__content{position:relative;display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;height:100%;width:100%;transform:var(--ea-carousel-transform);transition:transform var(--ea-carousel-transition)}.ea-carousel__arrow{border:none;display:flex;align-items:center;justify-content:center;position:absolute;top:50%;z-index:1;transform:translateY(-50%);opacity:0;width:var(--ea-carousel-arrow-size);height:var(--ea-carousel-arrow-size);line-height:var(--ea-carousel-arrow-size);font-size:var(--font-size-md);font-weight:800;text-align:center;border-radius:var(--ea-carousel-arrow-border-radius);background-color:var(--ea-carousel-arrow-color);color:var(--color-white);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color .3s,transform .3s,opacity .3s}.ea-carousel__arrow.arrow-left{left:var(--ea-carousel-arrow-x);transform:translate(calc(-100% - var(--ea-carousel-arrow-x)),-50%)}.ea-carousel__arrow.arrow-right{right:var(--ea-carousel-arrow-x);transform:translate(calc(100% - var(--ea-carousel-arrow-x)),-50%)}.ea-carousel__arrow:hover{background-color:var(--ea-carousel-arrow-hover-color)}.ea-carousel__arrow ea-icon{color:var(--color-white)}.ea-carousel__indicator-wrap{position:absolute;right:var(--ea-carousel-indicator-x);bottom:var(--ea-carousel-indicator-y);transform:translate(50%);display:flex;flex-direction:row;align-items:center;justify-content:center}.ea-carousel__indicator{box-sizing:border-box;padding:0;border:none;margin:var(--ea-carousel-indicator-spacing);width:var(--ea-carousel-indicator-width);height:var(--ea-carousel-indicator-height);background-color:var(--ea-carousel-indicator-color);transition:background-color .3s}.ea-carousel__indicator.is-active{background-color:var(--ea-carousel-indicator-active-color)}.ea-carousel--vertical .ea-carousel__arrow{display:none}.ea-carousel--vertical .ea-carousel__content{flex-direction:column}.ea-carousel--vertical .ea-carousel__indicator{--ea-carousel-indicator-width: 4px;--ea-carousel-indicator-height: 16px}.ea-carousel--vertical .ea-carousel__indicator-wrap{--ea-carousel-indicator-x: 8px;--ea-carousel-indicator-y: 50%;flex-direction:column;transform:translateY(50%)}.ea-carousel.is-arrow-hover .arrow-left,.ea-carousel.is-arrow-hover .arrow-right,.ea-carousel.is-arrow-always .arrow-left,.ea-carousel.is-arrow-always .arrow-right{opacity:1;transform:translateY(-50%)}.ea-carousel.is-outside-indicator .ea-carousel__indicator-wrap{position:relative;bottom:unset;left:unset}.ea-carousel.is-outside-indicator .ea-carousel__indicator{background-color:var(--ea-carousel-indicator-outside-color)}.ea-carousel.is-outside-indicator .ea-carousel__indicator.is-active{background-color:var(--ea-carousel-indicator-active-color)}";
|
|
2
2
|
export {
|
|
3
3
|
r as s
|
|
4
4
|
};
|
package/package.json
CHANGED
|
@@ -1,304 +1,304 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "easy-component-ui",
|
|
3
|
-
"version": "3.0.
|
|
4
|
-
"description": "使用 WebComponent 编写的原生组件库",
|
|
5
|
-
"main": "dist/components/index.js",
|
|
6
|
-
"module": "dist/components/index.js",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"files": [
|
|
9
|
-
"dist",
|
|
10
|
-
"README.md",
|
|
11
|
-
"LICENSE"
|
|
12
|
-
],
|
|
13
|
-
"scripts": {
|
|
14
|
-
"dev": "vite --host 0.0.0.0",
|
|
15
|
-
"dev:doc": "vitepress dev docs --host 0.0.0.0",
|
|
16
|
-
"build": "node tools/index.js && vite build && powershell -Command \"New-Item -ItemType Directory -Force -Path .\\docs\\.vitepress\\public\\dist\\assets | Out-Null; Copy-Item .\\dist\\assets\\icon.css .\\docs\\.vitepress\\public\\dist\\assets\\icon.css -Force | Out-Null\"",
|
|
17
|
-
"build:doc": "xcopy .\\docs\\index.css .\\docs\\.vitepress\\public\\index.css /y >nul && vitepress build docs && xcopy .\\docs\\.vitepress\\public .\\docs\\.vitepress\\dist /s /e /y >nul",
|
|
18
|
-
"preview:doc": "set VITEPRESS_BASE=___EMPTY___&& xcopy .\\docs\\index.css .\\docs\\.vitepress\\public\\index.css /y >nul && vitepress build docs && xcopy .\\docs\\.vitepress\\public .\\docs\\.vitepress\\dist /s /e /y >nul && vitepress preview docs",
|
|
19
|
-
"preview": "vite preview",
|
|
20
|
-
"deploy": "gh-pages -d docs/.vitepress/dist",
|
|
21
|
-
"lint": "eslint . --ext .js",
|
|
22
|
-
"lint:fix": "eslint . --ext .js --fix",
|
|
23
|
-
"format": "prettier --write \"**/*.{js,json,scss,css,md}\"",
|
|
24
|
-
"prepare": "husky install",
|
|
25
|
-
"commit": "git add . && git-cz",
|
|
26
|
-
"patch": "npm version patch && git push --follow-tags",
|
|
27
|
-
"minor": "npm version minor && git push --follow-tags",
|
|
28
|
-
"major": "npm version major && git push --follow-tags",
|
|
29
|
-
"publish:github": "npm run build && npm publish --registry=https://npm.pkg.github.com"
|
|
30
|
-
},
|
|
31
|
-
"repository": {
|
|
32
|
-
"type": "git",
|
|
33
|
-
"url": "git+https://github.com/LuminaQAQ/ea-ui-component.git"
|
|
34
|
-
},
|
|
35
|
-
"keywords": [
|
|
36
|
-
"web-components",
|
|
37
|
-
"ui",
|
|
38
|
-
"shadow-dom",
|
|
39
|
-
"custom-elements",
|
|
40
|
-
"html5",
|
|
41
|
-
"css3",
|
|
42
|
-
"javascript",
|
|
43
|
-
"button",
|
|
44
|
-
"icon",
|
|
45
|
-
"slider",
|
|
46
|
-
"select",
|
|
47
|
-
"loading",
|
|
48
|
-
"switch",
|
|
49
|
-
"checkbox",
|
|
50
|
-
"radio",
|
|
51
|
-
"tab",
|
|
52
|
-
"layout",
|
|
53
|
-
"tips",
|
|
54
|
-
"message",
|
|
55
|
-
"dialog",
|
|
56
|
-
"input",
|
|
57
|
-
"rate",
|
|
58
|
-
"popover",
|
|
59
|
-
"color-picker",
|
|
60
|
-
"form",
|
|
61
|
-
"pagination",
|
|
62
|
-
"date-picker",
|
|
63
|
-
"table",
|
|
64
|
-
"vue",
|
|
65
|
-
"react",
|
|
66
|
-
"angular",
|
|
67
|
-
"cross-framework"
|
|
68
|
-
],
|
|
69
|
-
"author": "LuminaQAQ",
|
|
70
|
-
"license": "MIT",
|
|
71
|
-
"bugs": {
|
|
72
|
-
"url": "https://github.com/LuminaQAQ/ea-ui-component/issues"
|
|
73
|
-
},
|
|
74
|
-
"homepage": "https://luminaqaq.github.io/ea-ui-component/",
|
|
75
|
-
"devDependencies": {
|
|
76
|
-
"@commitlint/cli": "^20.2.0",
|
|
77
|
-
"@commitlint/config-conventional": "^20.2.0",
|
|
78
|
-
"@eslint/js": "^9.39.2",
|
|
79
|
-
"@types/node": "^24.0.14",
|
|
80
|
-
"commitizen": "^4.3.1",
|
|
81
|
-
"cz-conventional-changelog": "^3.3.0",
|
|
82
|
-
"eslint": "^9.39.2",
|
|
83
|
-
"eslint-config-prettier": "^10.1.8",
|
|
84
|
-
"eslint-import-resolver-alias": "^1.1.2",
|
|
85
|
-
"eslint-plugin-import": "^2.32.0",
|
|
86
|
-
"eslint-plugin-prettier": "^5.5.4",
|
|
87
|
-
"gh-pages": "^6.1.1",
|
|
88
|
-
"globals": "^16.5.0",
|
|
89
|
-
"husky": "^9.1.7",
|
|
90
|
-
"nanoid": "^5.0.7",
|
|
91
|
-
"prettier": "^3.7.4",
|
|
92
|
-
"rollup-plugin-visualizer": "^6.0.3",
|
|
93
|
-
"sass": "^1.77.2",
|
|
94
|
-
"sass-embedded": "^1.93.2",
|
|
95
|
-
"scss": "^0.2.4",
|
|
96
|
-
"scss-loader": "^0.0.1",
|
|
97
|
-
"vite": "^5.4.1",
|
|
98
|
-
"vitepress": "^1.2.0"
|
|
99
|
-
},
|
|
100
|
-
"dependencies": {
|
|
101
|
-
"dayjs": "^1.11.19",
|
|
102
|
-
"dompurify": "^3.3.1",
|
|
103
|
-
"path": "^0.12.7",
|
|
104
|
-
"sass": "^1.89.2",
|
|
105
|
-
"sass-loader": "^16.0.5",
|
|
106
|
-
"vite-plugin-dts": "^4.5.4"
|
|
107
|
-
},
|
|
108
|
-
"config": {
|
|
109
|
-
"commitizen": {
|
|
110
|
-
"path": "./node_modules/cz-conventional-changelog"
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
"exports": {
|
|
114
|
-
".": "./dist/components/index.js",
|
|
115
|
-
"./icon-assets": {
|
|
116
|
-
"import": "./dist/assets/icon.css",
|
|
117
|
-
"require": "./dist/assets/icon.css",
|
|
118
|
-
"default": "./dist/assets/icon.css"
|
|
119
|
-
},
|
|
120
|
-
"./ea-alert": {
|
|
121
|
-
"import": "./dist/components/ea-alert.js"
|
|
122
|
-
},
|
|
123
|
-
"./ea-avatar": {
|
|
124
|
-
"import": "./dist/components/ea-avatar.js"
|
|
125
|
-
},
|
|
126
|
-
"./ea-backtop": {
|
|
127
|
-
"import": "./dist/components/ea-backtop.js"
|
|
128
|
-
},
|
|
129
|
-
"./ea-badge": {
|
|
130
|
-
"import": "./dist/components/ea-badge.js"
|
|
131
|
-
},
|
|
132
|
-
"./ea-breadcrumb": {
|
|
133
|
-
"import": "./dist/components/ea-breadcrumb.js"
|
|
134
|
-
},
|
|
135
|
-
"./ea-button": {
|
|
136
|
-
"import": "./dist/components/ea-button.js"
|
|
137
|
-
},
|
|
138
|
-
"./ea-calendar": {
|
|
139
|
-
"import": "./dist/components/ea-calendar.js"
|
|
140
|
-
},
|
|
141
|
-
"./ea-card": {
|
|
142
|
-
"import": "./dist/components/ea-card.js"
|
|
143
|
-
},
|
|
144
|
-
"./ea-carousel": {
|
|
145
|
-
"import": "./dist/components/ea-carousel.js"
|
|
146
|
-
},
|
|
147
|
-
"./ea-checkbox": {
|
|
148
|
-
"import": "./dist/components/ea-checkbox.js"
|
|
149
|
-
},
|
|
150
|
-
"./ea-collapse": {
|
|
151
|
-
"import": "./dist/components/ea-collapse.js"
|
|
152
|
-
},
|
|
153
|
-
"./ea-color-picker": {
|
|
154
|
-
"import": "./dist/components/ea-color-picker.js"
|
|
155
|
-
},
|
|
156
|
-
"./ea-container": {
|
|
157
|
-
"import": "./dist/components/ea-container.js"
|
|
158
|
-
},
|
|
159
|
-
"./ea-countdown": {
|
|
160
|
-
"import": "./dist/components/ea-countdown.js"
|
|
161
|
-
},
|
|
162
|
-
"./ea-date-picker": {
|
|
163
|
-
"import": "./dist/components/ea-date-picker.js"
|
|
164
|
-
},
|
|
165
|
-
"./ea-descriptions": {
|
|
166
|
-
"import": "./dist/components/ea-descriptions.js"
|
|
167
|
-
},
|
|
168
|
-
"./ea-dialog": {
|
|
169
|
-
"import": "./dist/components/ea-dialog.js"
|
|
170
|
-
},
|
|
171
|
-
"./ea-drawer": {
|
|
172
|
-
"import": "./dist/components/ea-drawer.js"
|
|
173
|
-
},
|
|
174
|
-
"./ea-dropdown": {
|
|
175
|
-
"import": "./dist/components/ea-dropdown.js"
|
|
176
|
-
},
|
|
177
|
-
"./ea-empty": {
|
|
178
|
-
"import": "./dist/components/ea-empty.js"
|
|
179
|
-
},
|
|
180
|
-
"./ea-icon": {
|
|
181
|
-
"import": "./dist/components/ea-icon.js"
|
|
182
|
-
},
|
|
183
|
-
"./ea-image": {
|
|
184
|
-
"import": "./dist/components/ea-image.js"
|
|
185
|
-
},
|
|
186
|
-
"./ea-image-preview": {
|
|
187
|
-
"import": "./dist/components/ea-image-preview.js"
|
|
188
|
-
},
|
|
189
|
-
"./ea-infinite-scroll": {
|
|
190
|
-
"import": "./dist/components/ea-infinite-scroll.js"
|
|
191
|
-
},
|
|
192
|
-
"./ea-input": {
|
|
193
|
-
"import": "./dist/components/ea-input.js"
|
|
194
|
-
},
|
|
195
|
-
"./ea-input-number": {
|
|
196
|
-
"import": "./dist/components/ea-input-number.js"
|
|
197
|
-
},
|
|
198
|
-
"./ea-layout": {
|
|
199
|
-
"import": "./dist/components/ea-layout.js"
|
|
200
|
-
},
|
|
201
|
-
"./ea-link": {
|
|
202
|
-
"import": "./dist/components/ea-link.js"
|
|
203
|
-
},
|
|
204
|
-
"./ea-loading": {
|
|
205
|
-
"import": "./dist/components/ea-loading.js"
|
|
206
|
-
},
|
|
207
|
-
"./ea-menu": {
|
|
208
|
-
"import": "./dist/components/ea-menu.js"
|
|
209
|
-
},
|
|
210
|
-
"./ea-message": {
|
|
211
|
-
"import": "./dist/components/ea-message.js"
|
|
212
|
-
},
|
|
213
|
-
"./ea-message-box": {
|
|
214
|
-
"import": "./dist/components/ea-message-box.js"
|
|
215
|
-
},
|
|
216
|
-
"./ea-notification": {
|
|
217
|
-
"import": "./dist/components/ea-notification.js"
|
|
218
|
-
},
|
|
219
|
-
"./ea-page-header": {
|
|
220
|
-
"import": "./dist/components/ea-page-header.js"
|
|
221
|
-
},
|
|
222
|
-
"./ea-pagination": {
|
|
223
|
-
"import": "./dist/components/ea-pagination.js"
|
|
224
|
-
},
|
|
225
|
-
"./ea-popconfirm": {
|
|
226
|
-
"import": "./dist/components/ea-popconfirm.js"
|
|
227
|
-
},
|
|
228
|
-
"./ea-popover": {
|
|
229
|
-
"import": "./dist/components/ea-popover.js"
|
|
230
|
-
},
|
|
231
|
-
"./ea-progress": {
|
|
232
|
-
"import": "./dist/components/ea-progress.js"
|
|
233
|
-
},
|
|
234
|
-
"./ea-radio": {
|
|
235
|
-
"import": "./dist/components/ea-radio.js"
|
|
236
|
-
},
|
|
237
|
-
"./ea-rate": {
|
|
238
|
-
"import": "./dist/components/ea-rate.js"
|
|
239
|
-
},
|
|
240
|
-
"./ea-result": {
|
|
241
|
-
"import": "./dist/components/ea-result.js"
|
|
242
|
-
},
|
|
243
|
-
"./ea-scrollbar": {
|
|
244
|
-
"import": "./dist/components/ea-scrollbar.js"
|
|
245
|
-
},
|
|
246
|
-
"./ea-segmented": {
|
|
247
|
-
"import": "./dist/components/ea-segmented.js"
|
|
248
|
-
},
|
|
249
|
-
"./ea-select": {
|
|
250
|
-
"import": "./dist/components/ea-select.js"
|
|
251
|
-
},
|
|
252
|
-
"./ea-skeleton": {
|
|
253
|
-
"import": "./dist/components/ea-skeleton.js"
|
|
254
|
-
},
|
|
255
|
-
"./ea-slider": {
|
|
256
|
-
"import": "./dist/components/ea-slider.js"
|
|
257
|
-
},
|
|
258
|
-
"./ea-space": {
|
|
259
|
-
"import": "./dist/components/ea-space.js"
|
|
260
|
-
},
|
|
261
|
-
"./ea-splitter": {
|
|
262
|
-
"import": "./dist/components/ea-splitter.js"
|
|
263
|
-
},
|
|
264
|
-
"./ea-statistic": {
|
|
265
|
-
"import": "./dist/components/ea-statistic.js"
|
|
266
|
-
},
|
|
267
|
-
"./ea-steps": {
|
|
268
|
-
"import": "./dist/components/ea-steps.js"
|
|
269
|
-
},
|
|
270
|
-
"./ea-switch": {
|
|
271
|
-
"import": "./dist/components/ea-switch.js"
|
|
272
|
-
},
|
|
273
|
-
"./ea-table": {
|
|
274
|
-
"import": "./dist/components/ea-table.js"
|
|
275
|
-
},
|
|
276
|
-
"./ea-tabs": {
|
|
277
|
-
"import": "./dist/components/ea-tabs.js"
|
|
278
|
-
},
|
|
279
|
-
"./ea-tag": {
|
|
280
|
-
"import": "./dist/components/ea-tag.js"
|
|
281
|
-
},
|
|
282
|
-
"./ea-text": {
|
|
283
|
-
"import": "./dist/components/ea-text.js"
|
|
284
|
-
},
|
|
285
|
-
"./ea-time-picker": {
|
|
286
|
-
"import": "./dist/components/ea-time-picker.js"
|
|
287
|
-
},
|
|
288
|
-
"./ea-timeline": {
|
|
289
|
-
"import": "./dist/components/ea-timeline.js"
|
|
290
|
-
},
|
|
291
|
-
"./ea-tooltip": {
|
|
292
|
-
"import": "./dist/components/ea-tooltip.js"
|
|
293
|
-
},
|
|
294
|
-
"./ea-tour": {
|
|
295
|
-
"import": "./dist/components/ea-tour.js"
|
|
296
|
-
},
|
|
297
|
-
"./ea-transfer": {
|
|
298
|
-
"import": "./dist/components/ea-transfer.js"
|
|
299
|
-
},
|
|
300
|
-
"./ea-tree": {
|
|
301
|
-
"import": "./dist/components/ea-tree.js"
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "easy-component-ui",
|
|
3
|
+
"version": "3.0.10",
|
|
4
|
+
"description": "使用 WebComponent 编写的原生组件库",
|
|
5
|
+
"main": "dist/components/index.js",
|
|
6
|
+
"module": "dist/components/index.js",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"README.md",
|
|
11
|
+
"LICENSE"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"dev": "vite --host 0.0.0.0",
|
|
15
|
+
"dev:doc": "vitepress dev docs --host 0.0.0.0",
|
|
16
|
+
"build": "node tools/index.js && vite build && powershell -Command \"New-Item -ItemType Directory -Force -Path .\\docs\\.vitepress\\public\\dist\\assets | Out-Null; Copy-Item .\\dist\\assets\\icon.css .\\docs\\.vitepress\\public\\dist\\assets\\icon.css -Force | Out-Null\"",
|
|
17
|
+
"build:doc": "xcopy .\\docs\\index.css .\\docs\\.vitepress\\public\\index.css /y >nul && vitepress build docs && xcopy .\\docs\\.vitepress\\public .\\docs\\.vitepress\\dist /s /e /y >nul",
|
|
18
|
+
"preview:doc": "set VITEPRESS_BASE=___EMPTY___&& xcopy .\\docs\\index.css .\\docs\\.vitepress\\public\\index.css /y >nul && vitepress build docs && xcopy .\\docs\\.vitepress\\public .\\docs\\.vitepress\\dist /s /e /y >nul && vitepress preview docs",
|
|
19
|
+
"preview": "vite preview",
|
|
20
|
+
"deploy": "gh-pages -d docs/.vitepress/dist",
|
|
21
|
+
"lint": "eslint . --ext .js",
|
|
22
|
+
"lint:fix": "eslint . --ext .js --fix",
|
|
23
|
+
"format": "prettier --write \"**/*.{js,json,scss,css,md}\"",
|
|
24
|
+
"prepare": "husky install",
|
|
25
|
+
"commit": "git add . && git-cz",
|
|
26
|
+
"patch": "npm version patch && git push --follow-tags",
|
|
27
|
+
"minor": "npm version minor && git push --follow-tags",
|
|
28
|
+
"major": "npm version major && git push --follow-tags",
|
|
29
|
+
"publish:github": "npm run build && npm publish --registry=https://npm.pkg.github.com"
|
|
30
|
+
},
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/LuminaQAQ/ea-ui-component.git"
|
|
34
|
+
},
|
|
35
|
+
"keywords": [
|
|
36
|
+
"web-components",
|
|
37
|
+
"ui",
|
|
38
|
+
"shadow-dom",
|
|
39
|
+
"custom-elements",
|
|
40
|
+
"html5",
|
|
41
|
+
"css3",
|
|
42
|
+
"javascript",
|
|
43
|
+
"button",
|
|
44
|
+
"icon",
|
|
45
|
+
"slider",
|
|
46
|
+
"select",
|
|
47
|
+
"loading",
|
|
48
|
+
"switch",
|
|
49
|
+
"checkbox",
|
|
50
|
+
"radio",
|
|
51
|
+
"tab",
|
|
52
|
+
"layout",
|
|
53
|
+
"tips",
|
|
54
|
+
"message",
|
|
55
|
+
"dialog",
|
|
56
|
+
"input",
|
|
57
|
+
"rate",
|
|
58
|
+
"popover",
|
|
59
|
+
"color-picker",
|
|
60
|
+
"form",
|
|
61
|
+
"pagination",
|
|
62
|
+
"date-picker",
|
|
63
|
+
"table",
|
|
64
|
+
"vue",
|
|
65
|
+
"react",
|
|
66
|
+
"angular",
|
|
67
|
+
"cross-framework"
|
|
68
|
+
],
|
|
69
|
+
"author": "LuminaQAQ",
|
|
70
|
+
"license": "MIT",
|
|
71
|
+
"bugs": {
|
|
72
|
+
"url": "https://github.com/LuminaQAQ/ea-ui-component/issues"
|
|
73
|
+
},
|
|
74
|
+
"homepage": "https://luminaqaq.github.io/ea-ui-component/",
|
|
75
|
+
"devDependencies": {
|
|
76
|
+
"@commitlint/cli": "^20.2.0",
|
|
77
|
+
"@commitlint/config-conventional": "^20.2.0",
|
|
78
|
+
"@eslint/js": "^9.39.2",
|
|
79
|
+
"@types/node": "^24.0.14",
|
|
80
|
+
"commitizen": "^4.3.1",
|
|
81
|
+
"cz-conventional-changelog": "^3.3.0",
|
|
82
|
+
"eslint": "^9.39.2",
|
|
83
|
+
"eslint-config-prettier": "^10.1.8",
|
|
84
|
+
"eslint-import-resolver-alias": "^1.1.2",
|
|
85
|
+
"eslint-plugin-import": "^2.32.0",
|
|
86
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
87
|
+
"gh-pages": "^6.1.1",
|
|
88
|
+
"globals": "^16.5.0",
|
|
89
|
+
"husky": "^9.1.7",
|
|
90
|
+
"nanoid": "^5.0.7",
|
|
91
|
+
"prettier": "^3.7.4",
|
|
92
|
+
"rollup-plugin-visualizer": "^6.0.3",
|
|
93
|
+
"sass": "^1.77.2",
|
|
94
|
+
"sass-embedded": "^1.93.2",
|
|
95
|
+
"scss": "^0.2.4",
|
|
96
|
+
"scss-loader": "^0.0.1",
|
|
97
|
+
"vite": "^5.4.1",
|
|
98
|
+
"vitepress": "^1.2.0"
|
|
99
|
+
},
|
|
100
|
+
"dependencies": {
|
|
101
|
+
"dayjs": "^1.11.19",
|
|
102
|
+
"dompurify": "^3.3.1",
|
|
103
|
+
"path": "^0.12.7",
|
|
104
|
+
"sass": "^1.89.2",
|
|
105
|
+
"sass-loader": "^16.0.5",
|
|
106
|
+
"vite-plugin-dts": "^4.5.4"
|
|
107
|
+
},
|
|
108
|
+
"config": {
|
|
109
|
+
"commitizen": {
|
|
110
|
+
"path": "./node_modules/cz-conventional-changelog"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"exports": {
|
|
114
|
+
".": "./dist/components/index.js",
|
|
115
|
+
"./icon-assets": {
|
|
116
|
+
"import": "./dist/assets/icon.css",
|
|
117
|
+
"require": "./dist/assets/icon.css",
|
|
118
|
+
"default": "./dist/assets/icon.css"
|
|
119
|
+
},
|
|
120
|
+
"./ea-alert": {
|
|
121
|
+
"import": "./dist/components/ea-alert.js"
|
|
122
|
+
},
|
|
123
|
+
"./ea-avatar": {
|
|
124
|
+
"import": "./dist/components/ea-avatar.js"
|
|
125
|
+
},
|
|
126
|
+
"./ea-backtop": {
|
|
127
|
+
"import": "./dist/components/ea-backtop.js"
|
|
128
|
+
},
|
|
129
|
+
"./ea-badge": {
|
|
130
|
+
"import": "./dist/components/ea-badge.js"
|
|
131
|
+
},
|
|
132
|
+
"./ea-breadcrumb": {
|
|
133
|
+
"import": "./dist/components/ea-breadcrumb.js"
|
|
134
|
+
},
|
|
135
|
+
"./ea-button": {
|
|
136
|
+
"import": "./dist/components/ea-button.js"
|
|
137
|
+
},
|
|
138
|
+
"./ea-calendar": {
|
|
139
|
+
"import": "./dist/components/ea-calendar.js"
|
|
140
|
+
},
|
|
141
|
+
"./ea-card": {
|
|
142
|
+
"import": "./dist/components/ea-card.js"
|
|
143
|
+
},
|
|
144
|
+
"./ea-carousel": {
|
|
145
|
+
"import": "./dist/components/ea-carousel.js"
|
|
146
|
+
},
|
|
147
|
+
"./ea-checkbox": {
|
|
148
|
+
"import": "./dist/components/ea-checkbox.js"
|
|
149
|
+
},
|
|
150
|
+
"./ea-collapse": {
|
|
151
|
+
"import": "./dist/components/ea-collapse.js"
|
|
152
|
+
},
|
|
153
|
+
"./ea-color-picker": {
|
|
154
|
+
"import": "./dist/components/ea-color-picker.js"
|
|
155
|
+
},
|
|
156
|
+
"./ea-container": {
|
|
157
|
+
"import": "./dist/components/ea-container.js"
|
|
158
|
+
},
|
|
159
|
+
"./ea-countdown": {
|
|
160
|
+
"import": "./dist/components/ea-countdown.js"
|
|
161
|
+
},
|
|
162
|
+
"./ea-date-picker": {
|
|
163
|
+
"import": "./dist/components/ea-date-picker.js"
|
|
164
|
+
},
|
|
165
|
+
"./ea-descriptions": {
|
|
166
|
+
"import": "./dist/components/ea-descriptions.js"
|
|
167
|
+
},
|
|
168
|
+
"./ea-dialog": {
|
|
169
|
+
"import": "./dist/components/ea-dialog.js"
|
|
170
|
+
},
|
|
171
|
+
"./ea-drawer": {
|
|
172
|
+
"import": "./dist/components/ea-drawer.js"
|
|
173
|
+
},
|
|
174
|
+
"./ea-dropdown": {
|
|
175
|
+
"import": "./dist/components/ea-dropdown.js"
|
|
176
|
+
},
|
|
177
|
+
"./ea-empty": {
|
|
178
|
+
"import": "./dist/components/ea-empty.js"
|
|
179
|
+
},
|
|
180
|
+
"./ea-icon": {
|
|
181
|
+
"import": "./dist/components/ea-icon.js"
|
|
182
|
+
},
|
|
183
|
+
"./ea-image": {
|
|
184
|
+
"import": "./dist/components/ea-image.js"
|
|
185
|
+
},
|
|
186
|
+
"./ea-image-preview": {
|
|
187
|
+
"import": "./dist/components/ea-image-preview.js"
|
|
188
|
+
},
|
|
189
|
+
"./ea-infinite-scroll": {
|
|
190
|
+
"import": "./dist/components/ea-infinite-scroll.js"
|
|
191
|
+
},
|
|
192
|
+
"./ea-input": {
|
|
193
|
+
"import": "./dist/components/ea-input.js"
|
|
194
|
+
},
|
|
195
|
+
"./ea-input-number": {
|
|
196
|
+
"import": "./dist/components/ea-input-number.js"
|
|
197
|
+
},
|
|
198
|
+
"./ea-layout": {
|
|
199
|
+
"import": "./dist/components/ea-layout.js"
|
|
200
|
+
},
|
|
201
|
+
"./ea-link": {
|
|
202
|
+
"import": "./dist/components/ea-link.js"
|
|
203
|
+
},
|
|
204
|
+
"./ea-loading": {
|
|
205
|
+
"import": "./dist/components/ea-loading.js"
|
|
206
|
+
},
|
|
207
|
+
"./ea-menu": {
|
|
208
|
+
"import": "./dist/components/ea-menu.js"
|
|
209
|
+
},
|
|
210
|
+
"./ea-message": {
|
|
211
|
+
"import": "./dist/components/ea-message.js"
|
|
212
|
+
},
|
|
213
|
+
"./ea-message-box": {
|
|
214
|
+
"import": "./dist/components/ea-message-box.js"
|
|
215
|
+
},
|
|
216
|
+
"./ea-notification": {
|
|
217
|
+
"import": "./dist/components/ea-notification.js"
|
|
218
|
+
},
|
|
219
|
+
"./ea-page-header": {
|
|
220
|
+
"import": "./dist/components/ea-page-header.js"
|
|
221
|
+
},
|
|
222
|
+
"./ea-pagination": {
|
|
223
|
+
"import": "./dist/components/ea-pagination.js"
|
|
224
|
+
},
|
|
225
|
+
"./ea-popconfirm": {
|
|
226
|
+
"import": "./dist/components/ea-popconfirm.js"
|
|
227
|
+
},
|
|
228
|
+
"./ea-popover": {
|
|
229
|
+
"import": "./dist/components/ea-popover.js"
|
|
230
|
+
},
|
|
231
|
+
"./ea-progress": {
|
|
232
|
+
"import": "./dist/components/ea-progress.js"
|
|
233
|
+
},
|
|
234
|
+
"./ea-radio": {
|
|
235
|
+
"import": "./dist/components/ea-radio.js"
|
|
236
|
+
},
|
|
237
|
+
"./ea-rate": {
|
|
238
|
+
"import": "./dist/components/ea-rate.js"
|
|
239
|
+
},
|
|
240
|
+
"./ea-result": {
|
|
241
|
+
"import": "./dist/components/ea-result.js"
|
|
242
|
+
},
|
|
243
|
+
"./ea-scrollbar": {
|
|
244
|
+
"import": "./dist/components/ea-scrollbar.js"
|
|
245
|
+
},
|
|
246
|
+
"./ea-segmented": {
|
|
247
|
+
"import": "./dist/components/ea-segmented.js"
|
|
248
|
+
},
|
|
249
|
+
"./ea-select": {
|
|
250
|
+
"import": "./dist/components/ea-select.js"
|
|
251
|
+
},
|
|
252
|
+
"./ea-skeleton": {
|
|
253
|
+
"import": "./dist/components/ea-skeleton.js"
|
|
254
|
+
},
|
|
255
|
+
"./ea-slider": {
|
|
256
|
+
"import": "./dist/components/ea-slider.js"
|
|
257
|
+
},
|
|
258
|
+
"./ea-space": {
|
|
259
|
+
"import": "./dist/components/ea-space.js"
|
|
260
|
+
},
|
|
261
|
+
"./ea-splitter": {
|
|
262
|
+
"import": "./dist/components/ea-splitter.js"
|
|
263
|
+
},
|
|
264
|
+
"./ea-statistic": {
|
|
265
|
+
"import": "./dist/components/ea-statistic.js"
|
|
266
|
+
},
|
|
267
|
+
"./ea-steps": {
|
|
268
|
+
"import": "./dist/components/ea-steps.js"
|
|
269
|
+
},
|
|
270
|
+
"./ea-switch": {
|
|
271
|
+
"import": "./dist/components/ea-switch.js"
|
|
272
|
+
},
|
|
273
|
+
"./ea-table": {
|
|
274
|
+
"import": "./dist/components/ea-table.js"
|
|
275
|
+
},
|
|
276
|
+
"./ea-tabs": {
|
|
277
|
+
"import": "./dist/components/ea-tabs.js"
|
|
278
|
+
},
|
|
279
|
+
"./ea-tag": {
|
|
280
|
+
"import": "./dist/components/ea-tag.js"
|
|
281
|
+
},
|
|
282
|
+
"./ea-text": {
|
|
283
|
+
"import": "./dist/components/ea-text.js"
|
|
284
|
+
},
|
|
285
|
+
"./ea-time-picker": {
|
|
286
|
+
"import": "./dist/components/ea-time-picker.js"
|
|
287
|
+
},
|
|
288
|
+
"./ea-timeline": {
|
|
289
|
+
"import": "./dist/components/ea-timeline.js"
|
|
290
|
+
},
|
|
291
|
+
"./ea-tooltip": {
|
|
292
|
+
"import": "./dist/components/ea-tooltip.js"
|
|
293
|
+
},
|
|
294
|
+
"./ea-tour": {
|
|
295
|
+
"import": "./dist/components/ea-tour.js"
|
|
296
|
+
},
|
|
297
|
+
"./ea-transfer": {
|
|
298
|
+
"import": "./dist/components/ea-transfer.js"
|
|
299
|
+
},
|
|
300
|
+
"./ea-tree": {
|
|
301
|
+
"import": "./dist/components/ea-tree.js"
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|