easy-component-ui 3.0.7 → 3.0.8

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.
@@ -1,19 +1,19 @@
1
- var P = Object.defineProperty;
1
+ var N = Object.defineProperty;
2
2
  var z = (i) => {
3
3
  throw TypeError(i);
4
4
  };
5
- var O = (i, o, e) => o in i ? P(i, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[o] = e;
6
- var S = (i, o, e) => O(i, typeof o != "symbol" ? o + "" : o, e), $ = (i, o, e) => o.has(i) || z("Cannot " + e);
7
- var t = (i, o, e) => ($(i, o, "read from private field"), e ? e.call(i) : o.get(i)), n = (i, o, e) => o.has(i) ? z("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(i) : o.set(i, e), v = (i, o, e, r) => ($(i, o, "write to private field"), r ? r.call(i, e) : o.set(i, e), e), c = (i, o, e) => ($(i, o, "access private method"), e);
5
+ var O = (i, o, e) => o in i ? N(i, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[o] = e;
6
+ var M = (i, o, e) => O(i, typeof o != "symbol" ? o + "" : o, e), H = (i, o, e) => o.has(i) || z("Cannot " + e);
7
+ var t = (i, o, e) => (H(i, o, "read from private field"), e ? e.call(i) : o.get(i)), n = (i, o, e) => o.has(i) ? z("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(i) : o.set(i, e), f = (i, o, e, r) => (H(i, o, "write to private field"), r ? r.call(i, e) : o.set(i, e), e), c = (i, o, e) => (H(i, o, "access private method"), e);
8
8
  import { B } from "./Base.js";
9
- import { s as U } from "../css/ea-carousel-item.style.js";
10
- import { s as j } from "../css/ea-carousel.style.js";
9
+ import { s as j } from "../css/ea-carousel-item.style.js";
10
+ import { s as U } from "../css/ea-carousel.style.js";
11
11
  class W extends B {
12
12
  static get observedAttributes() {
13
13
  return [...super.observedAttributes];
14
14
  }
15
15
  constructor() {
16
- super(), this.stylesheet = U, this.$render();
16
+ super(), this.stylesheet = j, this.$render();
17
17
  }
18
18
  $render() {
19
19
  this.shadowRoot.innerHTML = `
@@ -27,23 +27,23 @@ class W extends B {
27
27
  }
28
28
  }
29
29
  window.customElements.get("ea-carousel-item") || window.customElements.define("ea-carousel-item", W);
30
- var f, m, _, A, g, p, h, u, s, L, w, a, N, y, I, x, b, C, E, k, q, R, M, T;
30
+ var v, b, _, L, p, g, h, u, s, S, C, l, $, w, k, A, m, y, E, q, P, R, I, T;
31
31
  class X extends B {
32
32
  constructor() {
33
33
  super();
34
- n(this, a);
34
+ n(this, l);
35
35
  /** @type {HTMLElement} */
36
- n(this, f);
36
+ n(this, v);
37
37
  /** @type {HTMLElement} */
38
- n(this, m);
38
+ n(this, b);
39
39
  /** @type {HTMLElement} */
40
40
  n(this, _);
41
41
  /** @type {HTMLElement} */
42
- n(this, A);
42
+ n(this, L);
43
43
  /** @type {HTMLElement} */
44
- n(this, g);
44
+ n(this, p);
45
45
  /** @type {HTMLElement[]} */
46
- n(this, p, []);
46
+ n(this, g, []);
47
47
  /** @type {AbortController} */
48
48
  n(this, h);
49
49
  n(this, u, {
@@ -55,9 +55,10 @@ class X extends B {
55
55
  timer: null,
56
56
  pause: !1,
57
57
  isMouseEnter: !1,
58
- isEnd: !1
58
+ isEnd: !1,
59
+ isProcessingSlotChange: !1
59
60
  });
60
- S(this, "state", this.properties({
61
+ M(this, "state", this.properties({
61
62
  height: {
62
63
  type: String,
63
64
  default: "100%",
@@ -76,8 +77,8 @@ class X extends B {
76
77
  type: Number,
77
78
  default: 0,
78
79
  observer: (e, r) => {
79
- if (t(this, y).call(this, e), t(this, s).isEnd) return t(this, s).isEnd = !1;
80
- e < 0 ? (e = t(this, p).length - 1, r = 0, t(this, s).isEnd = !0) : e > t(this, p).length - 1 && (r = t(this, p).length - 1, e = 0, t(this, s).isEnd = !0), t(this, s).prevIndex = r, this.emit("change", {
80
+ if (t(this, w).call(this, e), t(this, s).isEnd) return t(this, s).isEnd = !1;
81
+ e < 0 ? (e = t(this, g).length - 1, r = 0, t(this, s).isEnd = !0) : e > t(this, g).length - 1 && (r = t(this, g).length - 1, e = 0, t(this, s).isEnd = !0), t(this, s).prevIndex = r, this.emit("change", {
81
82
  detail: {
82
83
  current: e,
83
84
  prev: r
@@ -91,9 +92,9 @@ class X extends B {
91
92
  /** @param {'click' | 'hover'} newVal */
92
93
  observer: (e) => {
93
94
  var r;
94
- (r = t(this, u).triggerAbortControllers) == null || r.abort(), t(this, u).triggerAbortControllers = new AbortController(), t(this, g).addEventListener(
95
+ (r = t(this, u).triggerAbortControllers) == null || r.abort(), t(this, u).triggerAbortControllers = new AbortController(), t(this, p).addEventListener(
95
96
  e === "hover" ? "mouseover" : "click",
96
- t(this, k),
97
+ t(this, q),
97
98
  {
98
99
  signal: t(this, u).triggerAbortControllers.signal
99
100
  }
@@ -117,7 +118,7 @@ class X extends B {
117
118
  type: Boolean,
118
119
  default: !0,
119
120
  observer: (e) => {
120
- e ? c(this, a, b).call(this) : c(this, a, x).call(this);
121
+ e ? c(this, l, m).call(this) : c(this, l, A).call(this);
121
122
  }
122
123
  },
123
124
  loop: {
@@ -144,42 +145,42 @@ class X extends B {
144
145
  * 处理 index 溢出的情况
145
146
  * @return {number}
146
147
  */
147
- n(this, L, () => this.index === t(this, p).length ? 0 : this.index === -1 ? t(this, p).length - 1 : this.index);
148
+ n(this, S, () => this.index === t(this, g).length ? 0 : this.index === -1 ? t(this, g).length - 1 : this.index);
148
149
  /**
149
150
  * 渲染 轮播图指示器,为了避免vue组件缓存,所以在初始化和组件挂载时都进行渲染
150
151
  */
151
- n(this, w, () => {
152
+ n(this, C, () => {
152
153
  const e = Array.from(
153
- this.querySelectorAll("ea-carousel-item"),
154
- (r, l) => `<button class='ea-carousel__indicator' part='indicator' tabindex="1" data-index="${l}"></button>`
154
+ this.querySelectorAll("ea-carousel-item:not([slot])"),
155
+ (r, a) => `<button class='ea-carousel__indicator' part='indicator' tabindex="1" data-index="${a}"></button>`
155
156
  ).join("");
156
- t(this, g).innerHTML = e, v(this, p, [
157
- ...t(this, g).querySelectorAll(".ea-carousel__indicator")
157
+ t(this, p).innerHTML = e, f(this, g, [
158
+ ...t(this, p).querySelectorAll(".ea-carousel__indicator")
158
159
  ]);
159
160
  });
160
161
  /**
161
162
  * 更新轮播图位置
162
163
  * @param {number} index
163
164
  */
164
- n(this, y, (e = 0) => {
165
- const { width: r, height: l } = t(this, f).getBoundingClientRect(), d = this.direction === "horizontal" ? "X" : "Y", H = this.direction === "horizontal" ? r : l;
165
+ n(this, w, (e = 0) => {
166
+ const { width: r, height: a } = t(this, v).getBoundingClientRect(), d = this.direction === "horizontal" ? "X" : "Y", x = this.direction === "horizontal" ? r : a;
166
167
  this.style.setProperty(
167
168
  "--ea-carousel-transform",
168
- `translate${d}(-${(e + 1) * H}px)`
169
- ), t(this, I).call(this);
169
+ `translate${d}(-${(e + 1) * x}px)`
170
+ ), t(this, k).call(this);
170
171
  });
171
172
  /**
172
173
  * 更新指示器位置
173
174
  */
174
- n(this, I, () => {
175
- t(this, p).forEach((e, r) => {
176
- e.classList.toggle("is-active", r === t(this, L).call(this));
175
+ n(this, k, () => {
176
+ t(this, g).forEach((e, r) => {
177
+ e.classList.toggle("is-active", r === t(this, S).call(this));
177
178
  });
178
179
  });
179
180
  /**
180
181
  * 开启轮播图过渡属性
181
182
  */
182
- n(this, C, () => {
183
+ n(this, y, () => {
183
184
  this.clientHeight, this.style.removeProperty("--ea-carousel-transition");
184
185
  });
185
186
  /**
@@ -192,28 +193,28 @@ class X extends B {
192
193
  * 指示器 处理事件,需要按照 `this.trigger` 来确定事件名
193
194
  * @param {MouseEvent} e
194
195
  */
195
- n(this, k, (e) => {
196
- const r = t(this, g).querySelectorAll(
196
+ n(this, q, (e) => {
197
+ const r = t(this, p).querySelectorAll(
197
198
  ".ea-carousel__indicator"
198
- ), l = e.target.closest(".ea-carousel__indicator");
199
- l && r.forEach((d, H) => {
200
- d.classList.toggle("is-active", d === l), d === l && (this.index = H);
199
+ ), a = e.target.closest(".ea-carousel__indicator");
200
+ a && r.forEach((d, x) => {
201
+ d.classList.toggle("is-active", d === a), d === a && (this.index = x);
201
202
  });
202
203
  });
203
204
  /**
204
205
  * 轮播图切换结束事件,即能确保轮播图在视觉上连续
205
206
  */
206
- n(this, q, () => {
207
- t(this, E).call(this), this.autoplay && !t(this, s).isMouseEnter && c(this, a, x).call(this), this.index = t(this, L).call(this), this.autoplay && !t(this, s).isMouseEnter && c(this, a, b).call(this), t(this, C).call(this), t(this, s).pause = !1;
207
+ n(this, P, () => {
208
+ t(this, E).call(this), this.autoplay && !t(this, s).isMouseEnter && c(this, l, A).call(this), this.index = t(this, S).call(this), this.autoplay && !t(this, s).isMouseEnter && c(this, l, m).call(this), t(this, y).call(this), t(this, s).pause = !1;
208
209
  });
209
210
  /**
210
211
  * 箭头显示事件
211
212
  */
212
213
  n(this, R, () => {
213
214
  const e = () => {
214
- t(this, s).isMouseEnter = !1, this["pause-on-hover"] && c(this, a, b).call(this), this.updateContainerClasslist();
215
+ t(this, s).isMouseEnter = !1, this["pause-on-hover"] && c(this, l, m).call(this), this.updateContainerClasslist();
215
216
  };
216
- t(this, s).isMouseEnter = !0, this["pause-on-hover"] && c(this, a, x).call(this), this.updateContainerClasslist(), t(this, f).addEventListener("mouseleave", e, {
217
+ t(this, s).isMouseEnter = !0, this["pause-on-hover"] && c(this, l, A).call(this), this.updateContainerClasslist(), t(this, v).addEventListener("mouseleave", e, {
217
218
  signal: t(this, h).signal,
218
219
  once: !0
219
220
  });
@@ -221,12 +222,12 @@ class X extends B {
221
222
  /**
222
223
  * 当窗口大小变化时,更新轮播图位置
223
224
  */
224
- n(this, M, () => {
225
+ n(this, I, () => {
225
226
  let e = null;
226
227
  return {
227
228
  listener: () => {
228
229
  clearTimeout(e), e = null, e = setTimeout(() => {
229
- t(this, y).call(this, this.index);
230
+ t(this, w).call(this, this.index);
230
231
  }, 100);
231
232
  },
232
233
  unsetHandler: () => {
@@ -238,23 +239,23 @@ class X extends B {
238
239
  * 处理 slotchange 事件,当 slot 内容变化时重新渲染
239
240
  */
240
241
  n(this, T, () => {
241
- t(this, E).call(this), c(this, a, x).call(this), t(this, s).prevIndex = 0, t(this, s).originLength = 0, t(this, s).pause = !1, t(this, s).isEnd = !1, this.index = 0, t(this, w).call(this), c(this, a, N).call(this), t(this, I).call(this), this.autoplay && c(this, a, b).call(this), queueMicrotask(() => {
242
- t(this, C).call(this);
243
- });
242
+ t(this, s).isProcessingSlotChange || (console.log(1), t(this, s).isProcessingSlotChange = !0, t(this, E).call(this), c(this, l, A).call(this), t(this, s).prevIndex = 0, t(this, s).originLength = 0, t(this, s).pause = !1, t(this, s).isEnd = !1, this.index = 0, t(this, C).call(this), c(this, l, $).call(this), t(this, k).call(this), this.autoplay && c(this, l, m).call(this), queueMicrotask(() => {
243
+ t(this, y).call(this), t(this, s).isProcessingSlotChange = !1;
244
+ }));
244
245
  });
245
246
  /**
246
247
  * 上一张轮播图
247
248
  */
248
- S(this, "prev", () => {
249
+ M(this, "prev", () => {
249
250
  t(this, s).pause || (this.index--, t(this, s).pause = !0);
250
251
  });
251
252
  /**
252
253
  * 下一张轮播图
253
254
  */
254
- S(this, "next", () => {
255
+ M(this, "next", () => {
255
256
  t(this, s).pause || (this.index++, t(this, s).pause = !0);
256
257
  });
257
- this.stylesheet = j, this.$render();
258
+ this.stylesheet = U, this.$render();
258
259
  }
259
260
  static get observedAttributes() {
260
261
  return [
@@ -289,7 +290,7 @@ class X extends B {
289
290
  [this["indicator-position"] + "-indicator"]: this["indicator-position"]
290
291
  }
291
292
  );
292
- return t(this, f).className = e, e;
293
+ return t(this, v).className = e, e;
293
294
  }
294
295
  $render() {
295
296
  this.shadowRoot.innerHTML = `
@@ -301,82 +302,86 @@ class X extends B {
301
302
  <ea-icon icon="icon-angle-right" part="arrow-right-icon"></ea-icon>
302
303
  </button>
303
304
  <ul class="ea-carousel__content" part="content">
305
+ <slot name="clone-last"></slot>
304
306
  <slot></slot>
307
+ <slot name="clone-first"></slot>
305
308
  </ul>
306
309
  <footer class="ea-carousel__indicator-wrap" part="indicator-wrap">
307
310
 
308
311
  </footer>
309
312
  </div>
310
- `, v(this, f, this.shadowRoot.querySelector(".ea-carousel")), v(this, m, this.shadowRoot.querySelector(".ea-carousel__content")), v(this, g, this.shadowRoot.querySelector(
313
+ `, f(this, v, this.shadowRoot.querySelector(".ea-carousel")), f(this, b, this.shadowRoot.querySelector(".ea-carousel__content")), f(this, p, this.shadowRoot.querySelector(
311
314
  ".ea-carousel__indicator-wrap"
312
- )), v(this, _, this.shadowRoot.querySelector(
315
+ )), f(this, _, this.shadowRoot.querySelector(
313
316
  ".ea-carousel__arrow.arrow-left"
314
- )), v(this, A, this.shadowRoot.querySelector(
317
+ )), f(this, L, this.shadowRoot.querySelector(
315
318
  ".ea-carousel__arrow.arrow-right"
316
- )), t(this, w).call(this), this.updateContainerClasslist();
319
+ )), t(this, C).call(this), this.updateContainerClasslist();
317
320
  }
318
321
  connectedCallback() {
319
322
  var e, r;
320
- super.connectedCallback(), (e = t(this, h)) == null || e.abort(), v(this, h, new AbortController());
321
- for (const l in t(this, u))
322
- (r = t(this, u)[l]) == null || r.abort(), t(this, u)[l] = new AbortController();
323
- t(this, E).call(this), t(this, w).call(this), c(this, a, N).call(this), this.autoplay && c(this, a, b).call(this), t(this, g).addEventListener(
323
+ super.connectedCallback(), (e = t(this, h)) == null || e.abort(), f(this, h, new AbortController());
324
+ for (const a in t(this, u))
325
+ (r = t(this, u)[a]) == null || r.abort(), t(this, u)[a] = new AbortController();
326
+ t(this, E).call(this), t(this, C).call(this), c(this, l, $).call(this), this.autoplay && c(this, l, m).call(this), t(this, p).addEventListener(
324
327
  this.trigger === "hover" ? "mouseover" : "click",
325
- t(this, k),
328
+ t(this, q),
326
329
  {
327
330
  signal: t(this, u).triggerAbortControllers.signal
328
331
  }
329
- ), t(this, m).addEventListener(
332
+ ), t(this, b).addEventListener(
330
333
  "transitionend",
331
- t(this, q),
334
+ t(this, P),
332
335
  { signal: t(this, h).signal }
333
336
  ), this.arrow !== "never" && this.direction !== "vertical" && (t(this, _).addEventListener("click", this.prev, {
334
337
  signal: t(this, h).signal
335
- }), t(this, A).addEventListener("click", this.next, {
338
+ }), t(this, L).addEventListener("click", this.next, {
336
339
  signal: t(this, h).signal
337
- })), t(this, f).addEventListener("mouseenter", t(this, R), {
340
+ })), t(this, v).addEventListener("mouseenter", t(this, R), {
338
341
  signal: t(this, h).signal
339
- }), window.addEventListener("resize", t(this, M).call(this).listener, {
342
+ }), window.addEventListener("resize", t(this, I).call(this).listener, {
340
343
  signal: t(this, h).signal
341
- }), t(this, m).querySelector("slot").addEventListener("slotchange", t(this, T), {
344
+ }), t(this, b).querySelector("slot:not([name])").addEventListener("slotchange", t(this, T), {
342
345
  signal: t(this, h).signal
343
346
  }), queueMicrotask(() => {
344
- t(this, C).call(this);
347
+ t(this, y).call(this);
345
348
  });
346
349
  }
347
350
  $beforeUnmounted() {
348
- var e, r, l;
351
+ var e, r, a;
349
352
  (e = t(this, h)) == null || e.abort();
350
353
  for (const d in t(this, u))
351
354
  (r = t(this, u)[d]) == null || r.abort();
352
- (l = t(this, M).call(this)) == null || l.unsetHandler();
355
+ (a = t(this, I).call(this)) == null || a.unsetHandler();
353
356
  }
354
357
  }
355
- f = new WeakMap(), m = new WeakMap(), _ = new WeakMap(), A = new WeakMap(), g = new WeakMap(), p = new WeakMap(), h = new WeakMap(), u = new WeakMap(), s = new WeakMap(), L = new WeakMap(), w = new WeakMap(), a = new WeakSet(), /**
358
+ v = new WeakMap(), b = new WeakMap(), _ = new WeakMap(), L = new WeakMap(), p = new WeakMap(), g = new WeakMap(), h = new WeakMap(), u = new WeakMap(), s = new WeakMap(), S = new WeakMap(), C = new WeakMap(), l = new WeakSet(), /**
356
359
  * 初始化 `轮播图元素` 结构
357
360
  */
358
- N = function() {
361
+ $ = function() {
359
362
  try {
360
- this.childNodes.forEach((d) => {
361
- d.tagName !== "EA-CAROUSEL-ITEM" && d.remove();
362
- });
363
- const e = this.children, r = e[0].cloneNode(!0), l = e[e.length - 1].cloneNode(!0);
364
- t(this, s).originLength = e.length, this.insertBefore(l, this.firstChild), this.appendChild(r), queueMicrotask(() => {
365
- t(this, y).call(this);
363
+ const e = this.querySelectorAll("ea-carousel-item:not([slot])");
364
+ if (e.length === 0) return;
365
+ t(this, s).originLength = e.length, this.querySelectorAll(
366
+ 'ea-carousel-item[slot^="clone-"]'
367
+ ).forEach((x) => x.remove());
368
+ const a = e[0].cloneNode(!0), d = e[e.length - 1].cloneNode(!0);
369
+ a.setAttribute("slot", "clone-first"), d.setAttribute("slot", "clone-last"), this.appendChild(a), this.appendChild(d), queueMicrotask(() => {
370
+ t(this, w).call(this);
366
371
  });
367
372
  } catch {
368
373
  }
369
- }, y = new WeakMap(), I = new WeakMap(), /**
374
+ }, w = new WeakMap(), k = new WeakMap(), /**
370
375
  * 清除轮播图自动播放
371
376
  */
372
- x = function() {
377
+ A = function() {
373
378
  t(this, s).timer && (clearInterval(t(this, s).timer), t(this, s).timer = null);
374
379
  }, /**
375
380
  * 处理轮播图自动播放
376
381
  */
377
- b = function() {
382
+ m = function() {
378
383
  this.autoplay && (t(this, s).timer = setInterval(this.next, this.interval));
379
- }, C = new WeakMap(), E = new WeakMap(), k = new WeakMap(), q = new WeakMap(), R = new WeakMap(), M = new WeakMap(), T = new WeakMap();
384
+ }, y = new WeakMap(), E = new WeakMap(), q = new WeakMap(), P = new WeakMap(), R = new WeakMap(), I = new WeakMap(), T = new WeakMap();
380
385
  window.customElements.get("ea-carousel") || window.customElements.define("ea-carousel", X);
381
386
  export {
382
387
  X as EaCarousel,
package/package.json CHANGED
@@ -1,304 +1,304 @@
1
- {
2
- "name": "easy-component-ui",
3
- "version": "3.0.7",
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.8",
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
+ }