easy-component-ui 3.0.12 → 3.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/README.md +162 -162
  2. package/dist/assets/icon.css +1 -1
  3. package/dist/components/Base.js +3 -2
  4. package/dist/components/ea-alert.js +71 -54
  5. package/dist/components/ea-avatar.js +42 -37
  6. package/dist/components/ea-button.js +53 -52
  7. package/dist/components/ea-calendar2.js +329 -327
  8. package/dist/components/ea-card.js +63 -27
  9. package/dist/components/ea-carousel.js +2 -2
  10. package/dist/components/ea-collapse.js +28 -28
  11. package/dist/components/ea-color-picker.js +63 -66
  12. package/dist/components/ea-container.js +90 -61
  13. package/dist/components/ea-date-picker.js +1 -1
  14. package/dist/components/ea-dialog.js +4 -4
  15. package/dist/components/ea-drawer.js +51 -46
  16. package/dist/components/ea-icon.js +122 -32
  17. package/dist/components/ea-image-preview.js +237 -193
  18. package/dist/components/ea-image.js +69 -44
  19. package/dist/components/ea-input-number.js +9 -9
  20. package/dist/components/ea-input.js +15 -15
  21. package/dist/components/ea-layout.js +10 -3
  22. package/dist/components/ea-link.js +1 -1
  23. package/dist/components/ea-menu.js +1 -1
  24. package/dist/components/ea-message-box.js +73 -73
  25. package/dist/components/ea-message.js +184 -121
  26. package/dist/components/ea-notification.js +80 -80
  27. package/dist/components/ea-overlay.js +20 -19
  28. package/dist/components/ea-page-header.js +5 -5
  29. package/dist/components/ea-pagination.js +5 -5
  30. package/dist/components/ea-popconfirm.js +3 -3
  31. package/dist/components/ea-popover.js +35 -11
  32. package/dist/components/ea-progress.js +28 -28
  33. package/dist/components/ea-rate.js +1 -1
  34. package/dist/components/ea-result.js +13 -13
  35. package/dist/components/ea-select.js +12 -12
  36. package/dist/components/ea-slider.js +88 -79
  37. package/dist/components/ea-splitter.js +34 -18
  38. package/dist/components/ea-steps.js +33 -33
  39. package/dist/components/ea-table.js +332 -321
  40. package/dist/components/ea-tabs.js +28 -28
  41. package/dist/components/ea-tag.js +6 -6
  42. package/dist/components/ea-time-picker.js +2 -6
  43. package/dist/components/ea-timeline.js +1 -1
  44. package/dist/components/ea-tooltip.js +63 -23
  45. package/dist/components/ea-tour.js +21 -21
  46. package/dist/components/ea-transfer.js +2 -2
  47. package/dist/components/ea-tree.js +1 -1
  48. package/dist/components/index.js +0 -1
  49. package/dist/css/ea-card.style.js +2 -2
  50. package/dist/css/ea-container.style.js +1 -1
  51. package/dist/css/ea-footer.style.js +1 -1
  52. package/dist/css/ea-progress.style.js +1 -1
  53. package/dist/css/ea-step.style.js +1 -1
  54. package/dist/css/ea-switch.style.js +1 -1
  55. package/dist/css/ea-tab.style.js +1 -1
  56. package/dist/css/ea-tabs.style.js +1 -1
  57. package/dist/css/ea-tag.style.js +1 -1
  58. package/dist/css/ea-time-picker.style.js +1 -1
  59. package/dist/utils/Variables.js +10 -10
  60. package/package.json +302 -304
  61. package/dist/components/ea-loading.js +0 -151
@@ -3,17 +3,17 @@ var B = (a) => {
3
3
  throw TypeError(a);
4
4
  };
5
5
  var I = (a, r, t) => r in a ? z(a, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[r] = t;
6
- var E = (a, r, t) => I(a, typeof r != "symbol" ? r + "" : r, t), F = (a, r, t) => r.has(a) || B("Cannot " + t);
7
- var e = (a, r, t) => (F(a, r, "read from private field"), t ? t.call(a) : r.get(a)), i = (a, r, t) => r.has(a) ? B("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(a) : r.set(a, t), c = (a, r, t, s) => (F(a, r, "write to private field"), s ? s.call(a, t) : r.set(a, t), t);
8
- import { F as P } from "../core/FormBase.js";
9
- import { s as H } from "../css/ea-slider.style.js";
10
- import { E as X } from "../utils/Variables.js";
6
+ var E = (a, r, t) => I(a, typeof r != "symbol" ? r + "" : r, t), P = (a, r, t) => r.has(a) || B("Cannot " + t);
7
+ var e = (a, r, t) => (P(a, r, "read from private field"), t ? t.call(a) : r.get(a)), i = (a, r, t) => r.has(a) ? B("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(a) : r.set(a, t), c = (a, r, t, s) => (P(a, r, "write to private field"), s ? s.call(a, t) : r.set(a, t), t);
8
+ import { F as H } from "../core/FormBase.js";
9
+ import { s as X } from "../css/ea-slider.style.js";
10
+ import { E as Y } from "../utils/Variables.js";
11
11
  import "./ea-tooltip.js";
12
12
  import "./ea-input-number.js";
13
- import { n as Y } from "./ea-calendar2.js";
14
- import { E as O } from "../utils/Utils.js";
15
- var k, v, l, b, g, y, p, $, h, w, u, C, V, N, x, d, M, S, A, D, L, q, R;
16
- class U extends P {
13
+ import { n as O } from "./ea-calendar2.js";
14
+ import { E as U } from "../utils/Utils.js";
15
+ var k, v, l, b, g, y, d, x, u, w, p, $, V, S, N, C, m, M, A, D, L, q, F, R;
16
+ class j extends H {
17
17
  constructor() {
18
18
  super();
19
19
  /** @type {HTMLElement} */
@@ -29,16 +29,16 @@ class U extends P {
29
29
  /** @type {HTMLElement} */
30
30
  i(this, y);
31
31
  /** @type {HTMLElement} */
32
- i(this, p);
32
+ i(this, d);
33
33
  /** @type {HTMLElement} */
34
- i(this, $);
34
+ i(this, x);
35
35
  /** @type {AbortController} */
36
- i(this, h, new AbortController());
36
+ i(this, u, new AbortController());
37
37
  i(this, w, {
38
38
  /** @type {AbortController} */
39
39
  input: null
40
40
  });
41
- i(this, u, {
41
+ i(this, p, {
42
42
  isInputNumberDefined: !1,
43
43
  isDragging: !1,
44
44
  startX: 0,
@@ -49,7 +49,7 @@ class U extends P {
49
49
  type: String,
50
50
  default: "",
51
51
  observer: async (t) => {
52
- e(this, $).textContent = t;
52
+ e(this, x).textContent = t;
53
53
  }
54
54
  },
55
55
  value: {
@@ -57,35 +57,35 @@ class U extends P {
57
57
  default: 0,
58
58
  observer: (t) => {
59
59
  const s = Math.max(this.min, Math.min(this.max, t));
60
- this.setValue(s), e(this, d).call(this);
60
+ this.setValue(s), e(this, m).call(this);
61
61
  }
62
62
  },
63
63
  min: {
64
64
  type: Number,
65
65
  default: 0,
66
66
  observer: () => {
67
- e(this, d).call(this);
67
+ e(this, m).call(this);
68
68
  }
69
69
  },
70
70
  max: {
71
71
  type: Number,
72
72
  default: 100,
73
73
  observer: () => {
74
- e(this, d).call(this);
74
+ e(this, m).call(this);
75
75
  }
76
76
  },
77
77
  "show-stops": {
78
78
  type: Boolean,
79
79
  default: !1,
80
80
  observer: (t) => {
81
- this.updateContainerClasslist(), t && e(this, C).call(this);
81
+ this.updateContainerClasslist(), t && e(this, $).call(this);
82
82
  }
83
83
  },
84
84
  step: {
85
85
  type: Number,
86
86
  default: 1,
87
87
  observer: (t) => {
88
- e(this, d).call(this);
88
+ e(this, m).call(this);
89
89
  }
90
90
  },
91
91
  disabled: {
@@ -99,7 +99,7 @@ class U extends P {
99
99
  type: Boolean,
100
100
  default: !1,
101
101
  observer: () => {
102
- e(this, d).call(this);
102
+ e(this, m).call(this);
103
103
  }
104
104
  },
105
105
  "show-tooltip": {
@@ -134,16 +134,16 @@ class U extends P {
134
134
  default: !1,
135
135
  observer: async (t) => {
136
136
  var s;
137
- e(this, u).isInputNumberDefined || (await customElements.whenDefined("ea-input-number"), e(this, u).isInputNumberDefined = !0), (s = e(this, w).input) == null || s.abort(), e(this, d).call(this), t && (e(this, w).input = new AbortController(), e(this, p).addEventListener("ea-change", e(this, D), {
137
+ e(this, p).isInputNumberDefined || (await customElements.whenDefined("ea-input-number"), e(this, p).isInputNumberDefined = !0), (s = e(this, w).input) == null || s.abort(), e(this, m).call(this), t && (e(this, w).input = new AbortController(), e(this, d).addEventListener("ea-change", e(this, L), {
138
138
  signal: e(this, w).input.signal
139
139
  }));
140
140
  }
141
141
  },
142
142
  size: {
143
- type: X,
143
+ type: Y,
144
144
  default: "",
145
145
  observer: async (t) => {
146
- this.updateContainerClasslist(), this["show-input"] && e(this, p).setAttribute("size", t);
146
+ this.updateContainerClasslist(), this["show-input"] && e(this, d).setAttribute("size", t);
147
147
  }
148
148
  },
149
149
  required: {
@@ -157,7 +157,7 @@ class U extends P {
157
157
  type: Object,
158
158
  default: null,
159
159
  observer: () => {
160
- e(this, N).call(this);
160
+ e(this, S).call(this);
161
161
  }
162
162
  }
163
163
  }));
@@ -168,20 +168,20 @@ class U extends P {
168
168
  type: Function,
169
169
  default: (t) => (s) => s,
170
170
  observer: () => {
171
- e(this, d).call(this);
171
+ e(this, m).call(this);
172
172
  }
173
173
  }
174
174
  }));
175
175
  /**
176
176
  * 渲染 stop 元素(包括步长节点和 marks 节点)
177
177
  */
178
- i(this, C, () => {
179
- const t = [], s = this.step, m = (this.max - this.min) / s + 1;
178
+ i(this, $, () => {
179
+ const t = [], s = this.step, o = (this.max - this.min) / s + 1;
180
180
  if (this["show-stops"])
181
- for (let n = 0; n < m; n++) {
182
- const o = this.min + s * n, T = (o - this.min) / (this.max - this.min) * 100;
181
+ for (let n = 0; n < o; n++) {
182
+ const h = this.min + s * n, T = (h - this.min) / (this.max - this.min) * 100;
183
183
  t.push({
184
- value: o,
184
+ value: h,
185
185
  percentage: T,
186
186
  type: "stop",
187
187
  className: this.ns.e("stop"),
@@ -190,11 +190,11 @@ class U extends P {
190
190
  }
191
191
  if (this.marks)
192
192
  for (const n in this.marks) {
193
- const o = parseFloat(n);
194
- if (isNaN(o) || o < this.min || o > this.max) continue;
195
- const T = (o - this.min) / (this.max - this.min) * 100;
193
+ const h = parseFloat(n);
194
+ if (isNaN(h) || h < this.min || h > this.max) continue;
195
+ const T = (h - this.min) / (this.max - this.min) * 100;
196
196
  t.push({
197
- value: o,
197
+ value: h,
198
198
  percentage: T,
199
199
  type: "mark-stop",
200
200
  className: `${this.ns.e("stop")} ${this.ns.e("mark-stop")}`,
@@ -202,9 +202,9 @@ class U extends P {
202
202
  label: this.marks[n]
203
203
  });
204
204
  }
205
- t.sort((n, o) => n.value - o.value);
205
+ t.sort((n, h) => n.value - h.value);
206
206
  const f = t.map(
207
- (n) => O.EaElement.h("div", n.className, {
207
+ (n) => U.EaElement.h("div", n.className, {
208
208
  part: n.part,
209
209
  style: [`${this.vertical ? "top" : "left"}: ${n.percentage}%;`]
210
210
  })
@@ -221,9 +221,9 @@ class U extends P {
221
221
  }
222
222
  let t = "";
223
223
  for (const s in this.marks) {
224
- const m = parseFloat(s);
225
- if (isNaN(m) || m < this.min || m > this.max) continue;
226
- const f = (m - this.min) / (this.max - this.min) * 100, n = this.marks[s];
224
+ const o = parseFloat(s);
225
+ if (isNaN(o) || o < this.min || o > this.max) continue;
226
+ const f = (o - this.min) / (this.max - this.min) * 100, n = this.marks[s];
227
227
  this.vertical ? t += `
228
228
  <div class='${this.ns.e("mark")}' style="top: ${f}%;">
229
229
  <div class='${this.ns.e("mark-label")}'>${n}</div>
@@ -239,24 +239,33 @@ class U extends P {
239
239
  /**
240
240
  * 统一渲染 marks 和 stops
241
241
  */
242
- i(this, N, () => {
243
- e(this, C).call(this), e(this, V).call(this);
242
+ i(this, S, () => {
243
+ e(this, $).call(this), e(this, V).call(this);
244
+ });
245
+ /**
246
+ * 修复浮点数精度问题
247
+ * @param {number} value 原始值
248
+ * @returns {number} 修复精度后的值
249
+ */
250
+ i(this, N, (t) => {
251
+ const s = this.step.toString(), o = s.includes(".") ? s.split(".")[1].length : 0;
252
+ return parseFloat(t.toFixed(o));
244
253
  });
245
254
  /**
246
255
  * 根据鼠标位置计算滑块值
247
256
  * @param {number} position 鼠标位置
248
257
  * @returns {number} 滑块值
249
258
  */
250
- i(this, x, (t) => {
251
- const s = e(this, v).getBoundingClientRect(), m = this.vertical ? (t - s.top) / s.height : (t - s.left) / s.width, f = Math.max(0, Math.min(1, m)), n = this.min + f * (this.max - this.min), o = Math.round(n / this.step) * this.step;
252
- return Math.max(this.min, Math.min(this.max, o));
259
+ i(this, C, (t) => {
260
+ const s = e(this, v).getBoundingClientRect(), o = this.vertical ? (t - s.top) / s.height : (t - s.left) / s.width, f = Math.max(0, Math.min(1, o)), n = this.min + f * (this.max - this.min), h = Math.round(n / this.step) * this.step;
261
+ return e(this, N).call(this, Math.max(this.min, Math.min(this.max, h)));
253
262
  });
254
263
  /**
255
264
  * 更新滑块位置和 tooltip 内容
256
265
  */
257
- i(this, d, () => {
266
+ i(this, m, () => {
258
267
  const t = this.value, s = (t - this.min) / (this.max - this.min) * 100;
259
- this.vertical ? (e(this, l).style.top = `${s}%`, e(this, l).style.left = "50%") : (e(this, l).style.left = `${s}%`, e(this, l).style.top = "50%"), e(this, g).textContent = this.formatTooltip(t), e(this, g).style.display = this["show-tooltip"] ? "block" : "none", this["show-input"] && (e(this, p).value = t, e(this, p).min = this.min, e(this, p).max = this.max, e(this, p).step = this.step), this.updateContainerClasslist();
268
+ this.vertical ? (e(this, l).style.top = `${s}%`, e(this, l).style.left = "50%") : (e(this, l).style.left = `${s}%`, e(this, l).style.top = "50%"), e(this, g).textContent = this.formatTooltip(t), e(this, g).style.display = this["show-tooltip"] ? "block" : "none", this["show-input"] && (e(this, d).value = t, e(this, d).min = this.min, e(this, d).max = this.max, e(this, d).step = this.step), this.updateContainerClasslist();
260
269
  });
261
270
  /**
262
271
  * 鼠标按下时,更新滑块值
@@ -264,64 +273,64 @@ class U extends P {
264
273
  */
265
274
  i(this, M, (t) => {
266
275
  if (this.disabled) return;
267
- t.preventDefault(), t.stopPropagation(), e(this, u).isDragging = !0, e(this, u).startX = t.clientX, e(this, u).startY = t.clientY, e(this, l).setAttribute("visible", "true");
268
- const s = e(this, x).call(this, this.vertical ? t.clientY : t.clientX);
276
+ t.preventDefault(), t.stopPropagation(), e(this, p).isDragging = !0, e(this, p).startX = t.clientX, e(this, p).startY = t.clientY, e(this, l).setAttribute("visible", "true");
277
+ const s = e(this, C).call(this, this.vertical ? t.clientY : t.clientX);
269
278
  this.value = s, this.emit("input", { detail: { value: this.value } });
270
279
  });
271
280
  /**
272
281
  * 鼠标移动时,更新滑块值
273
282
  * @param {MouseEvent} e
274
283
  */
275
- i(this, S, (t) => {
276
- if (!e(this, u).isDragging || this.disabled) return;
284
+ i(this, A, (t) => {
285
+ if (!e(this, p).isDragging || this.disabled) return;
277
286
  t.preventDefault(), t.stopPropagation();
278
- const s = e(this, x).call(this, this.vertical ? t.clientY : t.clientX);
287
+ const s = e(this, C).call(this, this.vertical ? t.clientY : t.clientX);
279
288
  this.value = s, this.emit("input", { detail: { value: this.value } });
280
289
  });
281
290
  /**
282
291
  * 鼠标松开时,更新滑块值
283
292
  */
284
- i(this, A, () => {
285
- e(this, u).isDragging && (e(this, u).isDragging = !1, e(this, l).setAttribute("visible", "false"), this.emit("change", { detail: { value: this.value } }));
293
+ i(this, D, () => {
294
+ e(this, p).isDragging && (e(this, p).isDragging = !1, e(this, l).setAttribute("visible", "false"), this.emit("change", { detail: { value: this.value } }));
286
295
  });
287
296
  /**
288
297
  * 输入框值改变时,更新滑块值
289
298
  * @param {CustomEvent} e
290
299
  */
291
- i(this, D, (t) => {
300
+ i(this, L, (t) => {
292
301
  t.preventDefault(), t.stopImmediatePropagation();
293
- const s = parseFloat(t.detail.currentValue), m = Math.max(this.min, Math.min(this.max, s));
294
- this.value = m, this.emit("change", { detail: { value: this.value } });
302
+ const s = parseFloat(t.detail.currentValue), o = Math.max(this.min, Math.min(this.max, s));
303
+ this.value = o, this.emit("change", { detail: { value: this.value } });
295
304
  });
296
305
  /**
297
306
  * 鼠标进入滑块时,显示 tooltip 的 触发 元素
298
307
  */
299
- i(this, L, () => {
308
+ i(this, q, () => {
300
309
  this.disabled || e(this, l).setAttribute("visible", "true");
301
310
  });
302
311
  /**
303
312
  * 鼠标离开滑块时,隐藏 tooltip 的 触发 元素
304
313
  */
305
- i(this, q, () => {
306
- this.disabled || e(this, u).isDragging || e(this, l).setAttribute("visible", "false");
314
+ i(this, F, () => {
315
+ this.disabled || e(this, p).isDragging || e(this, l).setAttribute("visible", "false");
307
316
  });
308
317
  i(this, R, () => {
309
318
  var t;
310
- (t = e(this, h)) == null || t.abort(), c(this, h, new AbortController()), e(this, v).addEventListener("mousedown", e(this, M), {
311
- signal: e(this, h).signal
319
+ (t = e(this, u)) == null || t.abort(), c(this, u, new AbortController()), e(this, v).addEventListener("mousedown", e(this, M), {
320
+ signal: e(this, u).signal
312
321
  }), e(this, b).addEventListener("mousedown", e(this, M), {
313
- signal: e(this, h).signal
314
- }), e(this, b).addEventListener("mouseenter", e(this, L), {
315
- signal: e(this, h).signal
316
- }), e(this, b).addEventListener("mouseleave", e(this, q), {
317
- signal: e(this, h).signal
318
- }), document.addEventListener("mousemove", e(this, S), {
319
- signal: e(this, h).signal
320
- }), document.addEventListener("mouseup", e(this, A), {
321
- signal: e(this, h).signal
322
+ signal: e(this, u).signal
323
+ }), e(this, b).addEventListener("mouseenter", e(this, q), {
324
+ signal: e(this, u).signal
325
+ }), e(this, b).addEventListener("mouseleave", e(this, F), {
326
+ signal: e(this, u).signal
327
+ }), document.addEventListener("mousemove", e(this, A), {
328
+ signal: e(this, u).signal
329
+ }), document.addEventListener("mouseup", e(this, D), {
330
+ signal: e(this, u).signal
322
331
  });
323
332
  });
324
- this.stylesheet = H, this.$render();
333
+ this.stylesheet = X, this.$render();
325
334
  }
326
335
  static get observedAttributes() {
327
336
  return [
@@ -362,7 +371,7 @@ class U extends P {
362
371
  return e(this, k).className = t, t;
363
372
  }
364
373
  $render() {
365
- const t = Y("slider");
374
+ const t = O("slider");
366
375
  this.ns = t, this.shadowRoot.innerHTML = `
367
376
  <label class='${t.e("form-label")}' part='form-label'></label>
368
377
  <div class='${t.b()}' part='container'>
@@ -376,14 +385,14 @@ class U extends P {
376
385
  </div>
377
386
  <ea-input-number class='${t.e("input")}' part='input'></ea-input-number>
378
387
  </div>
379
- `, c(this, $, this.shadowRoot.querySelector(t.ce("form-label"))), c(this, k, this.shadowRoot.querySelector(t.cb())), c(this, v, this.shadowRoot.querySelector(t.ce("rail"))), c(this, l, this.shadowRoot.querySelector(t.ce("trigger"))), c(this, b, this.shadowRoot.querySelector(t.ce("thumb"))), c(this, g, this.shadowRoot.querySelector(t.ce("tooltip"))), c(this, y, this.shadowRoot.querySelector(t.ce("marks"))), c(this, p, this.shadowRoot.querySelector(t.ce("input")));
388
+ `, c(this, x, this.shadowRoot.querySelector(t.ce("form-label"))), c(this, k, this.shadowRoot.querySelector(t.cb())), c(this, v, this.shadowRoot.querySelector(t.ce("rail"))), c(this, l, this.shadowRoot.querySelector(t.ce("trigger"))), c(this, b, this.shadowRoot.querySelector(t.ce("thumb"))), c(this, g, this.shadowRoot.querySelector(t.ce("tooltip"))), c(this, y, this.shadowRoot.querySelector(t.ce("marks"))), c(this, d, this.shadowRoot.querySelector(t.ce("input")));
380
389
  }
381
390
  /**
382
391
  * 获取验证目标元素
383
392
  * @returns {HTMLElement}
384
393
  */
385
394
  get validationTarget() {
386
- return e(this, p);
395
+ return e(this, d);
387
396
  }
388
397
  /**
389
398
  * 更新表单验证状态
@@ -407,15 +416,15 @@ class U extends P {
407
416
  return this.updateValidity(), this.internals.reportValidity();
408
417
  }
409
418
  connectedCallback() {
410
- super.connectedCallback(), e(this, R).call(this), e(this, d).call(this);
419
+ super.connectedCallback(), e(this, R).call(this), e(this, m).call(this);
411
420
  }
412
421
  $beforeUnmounted() {
413
422
  var t;
414
- (t = e(this, h)) == null || t.abort();
423
+ (t = e(this, u)) == null || t.abort();
415
424
  }
416
425
  }
417
- k = new WeakMap(), v = new WeakMap(), l = new WeakMap(), b = new WeakMap(), g = new WeakMap(), y = new WeakMap(), p = new WeakMap(), $ = new WeakMap(), h = new WeakMap(), w = new WeakMap(), u = new WeakMap(), C = new WeakMap(), V = new WeakMap(), N = new WeakMap(), x = new WeakMap(), d = new WeakMap(), M = new WeakMap(), S = new WeakMap(), A = new WeakMap(), D = new WeakMap(), L = new WeakMap(), q = new WeakMap(), R = new WeakMap();
418
- window.customElements.get("ea-slider") || window.customElements.define("ea-slider", U);
426
+ k = new WeakMap(), v = new WeakMap(), l = new WeakMap(), b = new WeakMap(), g = new WeakMap(), y = new WeakMap(), d = new WeakMap(), x = new WeakMap(), u = new WeakMap(), w = new WeakMap(), p = new WeakMap(), $ = new WeakMap(), V = new WeakMap(), S = new WeakMap(), N = new WeakMap(), C = new WeakMap(), m = new WeakMap(), M = new WeakMap(), A = new WeakMap(), D = new WeakMap(), L = new WeakMap(), q = new WeakMap(), F = new WeakMap(), R = new WeakMap();
427
+ window.customElements.get("ea-slider") || window.customElements.define("ea-slider", j);
419
428
  export {
420
- U as EaSlider
429
+ j as EaSlider
421
430
  };
@@ -23,7 +23,10 @@ class D extends N {
23
23
  type: ["horizontal", "vertical"],
24
24
  default: "horizontal",
25
25
  observer: (t) => {
26
- n(this, a).style.setProperty("--ea-splitter-direction", t === "vertical" ? "column" : "row"), n(this, a).className = this.updateContainerClasslist();
26
+ n(this, a).style.setProperty(
27
+ "--ea-splitter-direction",
28
+ t === "vertical" ? "column" : "row"
29
+ ), n(this, a).className = this.updateContainerClasslist();
27
30
  }
28
31
  }
29
32
  }));
@@ -32,14 +35,18 @@ class D extends N {
32
35
  * @param {string} eventName 事件名称
33
36
  */
34
37
  c(this, h, (t) => {
35
- this.dispatchEvent(new CustomEvent(t, {
36
- detail: {
37
- size: [...this.children].filter((i) => i.tagName === "EA-SPLITTER-PANEL").map((i) => {
38
- var o;
39
- return (o = i.getBoundingClientRect()) == null ? void 0 : o[this.layout === "vertical" ? "height" : "width"];
40
- })
41
- }
42
- }));
38
+ this.dispatchEvent(
39
+ new CustomEvent(t, {
40
+ detail: {
41
+ size: [...this.children].filter((i) => i.tagName === "EA-SPLITTER-PANEL").map(
42
+ (i) => {
43
+ var o;
44
+ return (o = i.getBoundingClientRect()) == null ? void 0 : o[this.layout === "vertical" ? "height" : "width"];
45
+ }
46
+ )
47
+ }
48
+ })
49
+ );
43
50
  });
44
51
  /**
45
52
  * `layout="horizontal"` 时的 `resize` 事件监听
@@ -57,7 +64,11 @@ class D extends N {
57
64
  }, A = () => {
58
65
  i.abort(), n(this, h).call(this, "panel-resize-end");
59
66
  };
60
- window.addEventListener("mousemove", S, { signal: i.signal }), window.addEventListener("mouseup", A, { signal: i.signal });
67
+ window.addEventListener("mousemove", S, {
68
+ signal: i.signal
69
+ }), window.addEventListener("mouseup", A, {
70
+ signal: i.signal
71
+ });
61
72
  });
62
73
  /**
63
74
  * `layout="vertical"` 时的 `resize` 事件监听
@@ -75,7 +86,11 @@ class D extends N {
75
86
  }, A = () => {
76
87
  i.abort(), n(this, h).call(this, "panel-resize-end");
77
88
  };
78
- window.addEventListener("mousemove", S, { signal: i.signal }), window.addEventListener("mouseup", A, { signal: i.signal });
89
+ window.addEventListener("mousemove", S, {
90
+ signal: i.signal
91
+ }), window.addEventListener("mouseup", A, {
92
+ signal: i.signal
93
+ });
79
94
  });
80
95
  this.stylesheet = I, this.$render();
81
96
  }
@@ -107,7 +122,11 @@ class D extends N {
107
122
  this.insertBefore(r, i.nextSibling);
108
123
  }
109
124
  }), t = [...this.children], t.forEach((i, o) => {
110
- i.tagName === "EA-SPLITTER-BAR" && (i.setAttribute("data-index", o), i.layout = this.layout, i.addEventListener("mousedown", this.layout === "horizontal" ? n(this, y) : n(this, v), { signal: n(this, m).signal }));
125
+ i.tagName === "EA-SPLITTER-BAR" && (i.setAttribute("data-index", o), i.layout = this.layout, i.addEventListener(
126
+ "mousedown",
127
+ this.layout === "horizontal" ? n(this, y) : n(this, v),
128
+ { signal: n(this, m).signal }
129
+ ));
111
130
  });
112
131
  });
113
132
  }
@@ -156,12 +175,9 @@ class X extends N {
156
175
  * @return {string} 属性值
157
176
  */
158
177
  updateContainerClasslist() {
159
- return this.computedClasslist(
160
- "ea-splitter-panel",
161
- {
162
- // ['--' + this.state.type]: this.state.type,
163
- }
164
- );
178
+ return this.computedClasslist("ea-splitter-panel", {
179
+ // ['--' + this.state.type]: this.state.type,
180
+ });
165
181
  }
166
182
  $render() {
167
183
  this.shadowRoot.innerHTML = `
@@ -4,47 +4,47 @@ var q = (s) => {
4
4
  };
5
5
  var B = (s, i, t) => i in s ? $(s, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[i] = t;
6
6
  var x = (s, i, t) => B(s, typeof i != "symbol" ? i + "" : i, t), E = (s, i, t) => i.has(s) || q("Cannot " + t);
7
- var e = (s, i, t) => (E(s, i, "read from private field"), t ? t.call(s) : i.get(s)), a = (s, i, t) => i.has(s) ? q("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, t), n = (s, i, t, r) => (E(s, i, "write to private field"), r ? r.call(s, t) : i.set(s, t), t);
7
+ var e = (s, i, t) => (E(s, i, "read from private field"), t ? t.call(s) : i.get(s)), o = (s, i, t) => i.has(s) ? q("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, t), n = (s, i, t, r) => (E(s, i, "write to private field"), r ? r.call(s, t) : i.set(s, t), t);
8
8
  import { B as R } from "./Base.js";
9
9
  import { s as N } from "../css/ea-step.style.js";
10
10
  import { s as k } from "../css/ea-steps.style.js";
11
- var l, p, u, C, c, b, m, S, A;
11
+ var l, p, u, C, c, m, b, S, A;
12
12
  class I extends R {
13
13
  constructor() {
14
14
  super();
15
- a(this, l);
15
+ o(this, l);
16
16
  /** @type {HTMLElement} */
17
- a(this, u);
17
+ o(this, u);
18
18
  /** @type {HTMLElement} */
19
- a(this, C);
19
+ o(this, C);
20
20
  /** @type {HTMLElement} */
21
- a(this, c);
21
+ o(this, c);
22
22
  /** @type {HTMLElement} */
23
- a(this, b);
23
+ o(this, m);
24
24
  /** @type {HTMLElement} */
25
- a(this, m);
25
+ o(this, b);
26
26
  /** @type {AbortController} */
27
- a(this, S, new AbortController());
27
+ o(this, S, new AbortController());
28
28
  x(this, "state", this.properties({
29
29
  title: {
30
30
  type: String,
31
31
  default: "",
32
32
  observer: (t) => {
33
- e(this, b).textContent = t;
33
+ e(this, m).textContent = t;
34
34
  }
35
35
  },
36
36
  description: {
37
37
  type: String,
38
38
  default: "",
39
39
  observer: (t) => {
40
- e(this, m).textContent = t;
40
+ e(this, b).textContent = t;
41
41
  }
42
42
  },
43
43
  icon: {
44
44
  type: String,
45
45
  default: "",
46
46
  observer: (t) => {
47
- e(this, c).setAttribute("icon", t);
47
+ e(this, c).setAttribute("name", t);
48
48
  }
49
49
  },
50
50
  status: {
@@ -98,9 +98,9 @@ class I extends R {
98
98
  * 更新步骤状态
99
99
  * @param {string} status 活动步骤状态
100
100
  */
101
- a(this, A, (t = this.status) => {
101
+ o(this, A, (t = this.status) => {
102
102
  var r;
103
- t === ((r = e(this, l, p)) == null ? void 0 : r.getAttribute("finish-status")) ? (e(this, c).setAttribute("icon", "icon-ok"), e(this, c).textContent = "") : (e(this, c).setAttribute("icon", ""), e(this, c).textContent = this.index + 1);
103
+ t === ((r = e(this, l, p)) == null ? void 0 : r.getAttribute("finish-status")) ? (e(this, c).setAttribute("name", "check"), e(this, c).textContent = "") : (e(this, c).setAttribute("name", ""), e(this, c).textContent = this.index + 1);
104
104
  });
105
105
  this.stylesheet = N, this.$render();
106
106
  }
@@ -131,8 +131,8 @@ class I extends R {
131
131
  icon: this.icon,
132
132
  simple: this.simple,
133
133
  last: (() => {
134
- var o;
135
- const r = (o = e(this, l, p)) == null ? void 0 : o.querySelectorAll("ea-step");
134
+ var a;
135
+ const r = (a = e(this, l, p)) == null ? void 0 : a.querySelectorAll("ea-step");
136
136
  return r ? r.length - 1 === this.index : !1;
137
137
  })(),
138
138
  first: this.index === 0
@@ -163,7 +163,7 @@ class I extends R {
163
163
  <slot name="simple-arrow"></slot>
164
164
  </span>
165
165
  </div>
166
- `, n(this, u, this.shadowRoot.querySelector(".ea-step")), n(this, C, this.shadowRoot.querySelector('slot[name="icon"]')), n(this, c, this.shadowRoot.querySelector(".ea-step__icon")), n(this, b, this.shadowRoot.querySelector('slot[name="title"]')), n(this, m, this.shadowRoot.querySelector(
166
+ `, n(this, u, this.shadowRoot.querySelector(".ea-step")), n(this, C, this.shadowRoot.querySelector('slot[name="icon"]')), n(this, c, this.shadowRoot.querySelector(".ea-step__icon")), n(this, m, this.shadowRoot.querySelector('slot[name="title"]')), n(this, b, this.shadowRoot.querySelector(
167
167
  'slot[name="description"]'
168
168
  )), this.updateContainerClasslist();
169
169
  }
@@ -180,18 +180,18 @@ l = new WeakSet(), p = function() {
180
180
  } catch {
181
181
  return null;
182
182
  }
183
- }, u = new WeakMap(), C = new WeakMap(), c = new WeakMap(), b = new WeakMap(), m = new WeakMap(), S = new WeakMap(), A = new WeakMap();
183
+ }, u = new WeakMap(), C = new WeakMap(), c = new WeakMap(), m = new WeakMap(), b = new WeakMap(), S = new WeakMap(), A = new WeakMap();
184
184
  window.customElements.get("ea-step") || window.customElements.define("ea-step", I);
185
185
  var f, y, h, v, w, _;
186
186
  class L extends R {
187
187
  constructor() {
188
188
  super();
189
189
  /** @type {HTMLElement} */
190
- a(this, f);
190
+ o(this, f);
191
191
  /** @type {HTMLSlotElement} */
192
- a(this, y);
192
+ o(this, y);
193
193
  /** @type {AbortController} */
194
- a(this, h, new AbortController());
194
+ o(this, h, new AbortController());
195
195
  x(this, "state", this.properties({
196
196
  space: {
197
197
  type: String,
@@ -245,32 +245,32 @@ class L extends R {
245
245
  * 更新步骤状态
246
246
  * @param {number} active
247
247
  */
248
- a(this, v, (t) => {
249
- [...this.querySelectorAll("ea-step")].forEach((o) => {
250
- o.index < t ? o.setAttribute("status", this["finish-status"]) : o.index > t ? o.setAttribute("status", "wait") : o.setAttribute("status", this["process-status"]);
248
+ o(this, v, (t) => {
249
+ [...this.querySelectorAll("ea-step")].forEach((a) => {
250
+ a.index < t ? a.setAttribute("status", this["finish-status"]) : a.index > t ? a.setAttribute("status", "wait") : a.setAttribute("status", this["process-status"]);
251
251
  });
252
252
  });
253
253
  /**
254
254
  * 更新简单步骤状态
255
255
  * @param {boolean} isSimple
256
256
  */
257
- a(this, w, (t = this.simple) => {
257
+ o(this, w, (t = this.simple) => {
258
258
  const r = [...this.querySelectorAll("ea-step")];
259
- t ? r.forEach((o) => {
259
+ t ? r.forEach((a) => {
260
260
  var d;
261
261
  try {
262
- (d = o.querySelector('[slot="simple-arrow"]')) == null || d.remove();
262
+ (d = a.querySelector('[slot="simple-arrow"]')) == null || d.remove();
263
263
  } catch {
264
264
  }
265
265
  try {
266
266
  const g = document.createElement("ea-icon");
267
- g.setAttribute("slot", "simple-arrow"), g.setAttribute("icon", "icon-angle-right"), g.part = "simple-arrow", o.appendChild(g);
267
+ g.setAttribute("slot", "simple-arrow"), g.setAttribute("name", "angle-right"), g.part = "simple-arrow", a.appendChild(g);
268
268
  } catch {
269
269
  }
270
- }) : r.forEach((o) => {
270
+ }) : r.forEach((a) => {
271
271
  var d;
272
272
  try {
273
- (d = o.querySelector('[slot="simple-arrow"]')) == null || d.remove();
273
+ (d = a.querySelector('[slot="simple-arrow"]')) == null || d.remove();
274
274
  } catch {
275
275
  }
276
276
  });
@@ -279,10 +279,10 @@ class L extends R {
279
279
  * 处理 slot 变化
280
280
  * 更新所有子 ea-step 组件的 index、first、last 状态和 status
281
281
  */
282
- a(this, _, () => {
282
+ o(this, _, () => {
283
283
  const t = [...this.querySelectorAll("ea-step")];
284
- t.forEach((r, o) => {
285
- r.index = o, r.toggleAttribute("first", o === 0), r.toggleAttribute("last", o === t.length - 1);
284
+ t.forEach((r, a) => {
285
+ r.index = a, r.toggleAttribute("first", a === 0), r.toggleAttribute("last", a === t.length - 1);
286
286
  }), e(this, v).call(this, this.active), e(this, w).call(this);
287
287
  });
288
288
  this.stylesheet = k, this.$render();