easy-component-ui 3.0.11 → 3.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/README.md +162 -162
  2. package/dist/assets/icon.css +1 -1
  3. package/dist/components/Base.js +190 -188
  4. package/dist/components/ea-alert.js +71 -54
  5. package/dist/components/ea-avatar.js +42 -37
  6. package/dist/components/ea-breadcrumb.js +33 -33
  7. package/dist/components/ea-button.js +53 -52
  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 +93 -73
  11. package/dist/components/ea-color-picker.js +221 -221
  12. package/dist/components/ea-container.js +90 -61
  13. package/dist/components/ea-countdown.js +77 -56
  14. package/dist/components/ea-date-picker.js +1 -1
  15. package/dist/components/ea-descriptions.js +133 -70
  16. package/dist/components/ea-dialog.js +4 -4
  17. package/dist/components/ea-drawer.js +93 -71
  18. package/dist/components/ea-empty.js +31 -23
  19. package/dist/components/ea-icon.js +122 -32
  20. package/dist/components/ea-image-preview.js +237 -193
  21. package/dist/components/ea-image.js +69 -44
  22. package/dist/components/ea-input-number.js +9 -9
  23. package/dist/components/ea-input.js +15 -15
  24. package/dist/components/ea-layout.js +10 -3
  25. package/dist/components/ea-link.js +1 -1
  26. package/dist/components/ea-menu.js +69 -53
  27. package/dist/components/ea-message-box.js +73 -73
  28. package/dist/components/ea-message.js +184 -121
  29. package/dist/components/ea-notification.js +80 -80
  30. package/dist/components/ea-overlay.js +41 -34
  31. package/dist/components/ea-page-header.js +5 -5
  32. package/dist/components/ea-pagination.js +6 -5
  33. package/dist/components/ea-popconfirm.js +133 -78
  34. package/dist/components/ea-popover.js +35 -11
  35. package/dist/components/ea-popper.js +9 -9
  36. package/dist/components/ea-progress.js +88 -71
  37. package/dist/components/ea-rate.js +1 -1
  38. package/dist/components/ea-result.js +20 -20
  39. package/dist/components/ea-select.js +119 -108
  40. package/dist/components/ea-skeleton.js +99 -82
  41. package/dist/components/ea-slider.js +88 -79
  42. package/dist/components/ea-splitter.js +34 -18
  43. package/dist/components/ea-statistic.js +72 -4
  44. package/dist/components/ea-steps.js +108 -74
  45. package/dist/components/ea-table.js +562 -434
  46. package/dist/components/ea-tabs.js +28 -28
  47. package/dist/components/ea-tag.js +37 -43
  48. package/dist/components/ea-time-picker.js +2 -6
  49. package/dist/components/ea-timeline.js +11 -12
  50. package/dist/components/ea-tooltip.js +63 -23
  51. package/dist/components/ea-tour.js +21 -21
  52. package/dist/components/ea-transfer.js +2 -2
  53. package/dist/components/ea-tree.js +1 -1
  54. package/dist/components/index.js +1 -2
  55. package/dist/css/ea-card.style.js +2 -2
  56. package/dist/css/ea-collapse-item.style.js +1 -1
  57. package/dist/css/ea-color-picker-panel.style.js +1 -1
  58. package/dist/css/ea-container.style.js +1 -1
  59. package/dist/css/ea-descriptions-item.style.js +2 -2
  60. package/dist/css/ea-descriptions.style.js +1 -1
  61. package/dist/css/ea-empty.style.js +1 -1
  62. package/dist/css/ea-footer.style.js +1 -1
  63. package/dist/css/ea-progress.style.js +1 -1
  64. package/dist/css/ea-skeleton.style.js +1 -1
  65. package/dist/css/ea-step.style.js +1 -1
  66. package/dist/css/ea-switch.style.js +1 -1
  67. package/dist/css/ea-tab.style.js +1 -1
  68. package/dist/css/ea-table-column.style.js +4 -0
  69. package/dist/css/ea-table.style.js +1 -1
  70. package/dist/css/ea-tabs.style.js +1 -1
  71. package/dist/css/ea-tag.style.js +1 -1
  72. package/dist/css/ea-time-picker.style.js +1 -1
  73. package/dist/css/ea-timeline-item.style.js +1 -1
  74. package/dist/utils/Variables.js +10 -17
  75. package/dist/utils/parseTime.js +73 -0
  76. package/package.json +302 -304
  77. package/dist/components/ea-loading.js +0 -151
  78. package/dist/components/ea-statistic2.js +0 -83
@@ -1,14 +1,14 @@
1
- var $ = Object.defineProperty;
1
+ var k = Object.defineProperty;
2
2
  var I = (s) => {
3
3
  throw TypeError(s);
4
4
  };
5
- var A = (s, i, t) => i in s ? $(s, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[i] = t;
6
- var C = (s, i, t) => A(s, typeof i != "symbol" ? i + "" : i, t), R = (s, i, t) => i.has(s) || I("Cannot " + t);
7
- var e = (s, i, t) => (R(s, i, "read from private field"), t ? t.call(s) : i.get(s)), n = (s, i, t) => i.has(s) ? I("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, t), c = (s, i, t, o) => (R(s, i, "write to private field"), o ? o.call(s, t) : i.set(s, t), t);
8
- import { t as B } from "../utils/timeout.js";
5
+ var $ = (s, i, e) => i in s ? k(s, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[i] = e;
6
+ var C = (s, i, e) => $(s, typeof i != "symbol" ? i + "" : i, e), R = (s, i, e) => i.has(s) || I("Cannot " + e);
7
+ var t = (s, i, e) => (R(s, i, "read from private field"), e ? e.call(s) : i.get(s)), n = (s, i, e) => i.has(s) ? I("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, e), l = (s, i, e, o) => (R(s, i, "write to private field"), o ? o.call(s, e) : i.set(s, e), e);
8
+ import { t as A } from "../utils/timeout.js";
9
9
  import { E as q } from "../utils/Utils.js";
10
- import { B as P } from "./Base.js";
11
- import { s as k } from "../css/ea-notification.style.js";
10
+ import { B } from "./Base.js";
11
+ import { s as P } from "../css/ea-notification.style.js";
12
12
  var v, E, _, L, S, x;
13
13
  class z {
14
14
  /**
@@ -27,7 +27,7 @@ class z {
27
27
  placement: "top-right",
28
28
  zIndex: 0,
29
29
  showClose: !0,
30
- closeIcon: "icon-cancel",
30
+ closeIcon: "xmark",
31
31
  appendTo: "body"
32
32
  });
33
33
  /**
@@ -37,18 +37,18 @@ class z {
37
37
  * @returns
38
38
  */
39
39
  n(this, L, (i) => {
40
- const t = document.createElement("ea-notification");
40
+ const e = document.createElement("ea-notification");
41
41
  for (const o in i) {
42
- if (e(this, E).includes(o)) continue;
42
+ if (t(this, E).includes(o)) continue;
43
43
  const p = i[o];
44
- if (e(this, v).includes(o))
45
- t[o] = p;
44
+ if (t(this, v).includes(o))
45
+ e[o] = p;
46
46
  else {
47
47
  const w = q.String.toLowerCamelCase(o);
48
- t.setAttribute(w, p);
48
+ e.setAttribute(w, p);
49
49
  }
50
50
  }
51
- return t;
51
+ return e;
52
52
  });
53
53
  /**
54
54
  *
@@ -56,16 +56,16 @@ class z {
56
56
  * @param {HTMLElement | String} appendTo
57
57
  * @returns
58
58
  */
59
- n(this, S, (i, t) => {
60
- if (!t) return document.body.appendChild(i);
61
- if (t instanceof HTMLElement)
62
- t.appendChild(i);
63
- else if (typeof t == "string") {
64
- const o = document.querySelector(t);
59
+ n(this, S, (i, e) => {
60
+ if (!e) return document.body.appendChild(i);
61
+ if (e instanceof HTMLElement)
62
+ e.appendChild(i);
63
+ else if (typeof e == "string") {
64
+ const o = document.querySelector(e);
65
65
  o ? o.appendChild(i) : document.body.appendChild(i);
66
66
  } else
67
67
  console.warn(
68
- `[EaNotification] TypeError: ${t} is not a valid element or selector.`
68
+ `[EaNotification] TypeError: ${e} is not a valid element or selector.`
69
69
  );
70
70
  });
71
71
  /**
@@ -74,17 +74,17 @@ class z {
74
74
  * @param {number} duration
75
75
  * @returns
76
76
  */
77
- n(this, x, (i, t = 3e3) => {
78
- i.visible = !0, i.addEventListener("hidden", () => i.remove()), t > 0 && B(() => {
77
+ n(this, x, (i, e = 3e3) => {
78
+ i.visible = !0, i.addEventListener("hidden", () => i.remove()), e > 0 && A(() => {
79
79
  i.visible = !1;
80
- }, t);
80
+ }, e);
81
81
  });
82
82
  C(this, "close", () => {
83
83
  this.instance.close();
84
84
  });
85
- i = Object.assign({}, e(this, _), i);
86
- const t = e(this, L).call(this, i);
87
- this.instance = t, e(this, S).call(this, t, i.appendTo), e(this, x).call(this, t, i.duration);
85
+ i = Object.assign({}, t(this, _), i);
86
+ const e = t(this, L).call(this, i);
87
+ this.instance = e, t(this, S).call(this, e, i.appendTo), t(this, x).call(this, e, i.duration);
88
88
  }
89
89
  }
90
90
  v = new WeakMap(), E = new WeakMap(), _ = new WeakMap(), L = new WeakMap(), S = new WeakMap(), x = new WeakMap();
@@ -109,8 +109,8 @@ r.error = (s) => r({
109
109
  ...s,
110
110
  type: "error"
111
111
  });
112
- var a, M, y, g, d, m, l, b, f, h, N, T, H;
113
- class V extends P {
112
+ var a, M, y, g, d, m, c, b, f, h, N, T, H;
113
+ class V extends B {
114
114
  constructor() {
115
115
  super();
116
116
  /** @type {HTMLElement} */
@@ -126,7 +126,7 @@ class V extends P {
126
126
  /** @type {HTMLElement} */
127
127
  n(this, m);
128
128
  /** @type {AbortController} */
129
- n(this, l);
129
+ n(this, c);
130
130
  /** @type {AbortController} */
131
131
  n(this, b);
132
132
  n(this, f, {
@@ -137,100 +137,100 @@ class V extends P {
137
137
  type: {
138
138
  type: ["primary", "success", "warning", "info", "error"],
139
139
  default: "info",
140
- observer: (t) => {
140
+ observer: (e) => {
141
141
  const o = {
142
- success: "icon-ok-circled",
143
- error: "icon-cancel-circled",
144
- warning: "icon-attention-alt",
145
- info: "icon-info",
146
- primary: "icon-info"
142
+ success: "circle-check",
143
+ error: "circle-xmark",
144
+ warning: "triangle-exclamation",
145
+ info: "circle-info",
146
+ primary: "circle-info"
147
147
  };
148
- e(this, y).icon = o[t], e(this, a).className = this.updateContainerClasslist();
148
+ t(this, y).name = o[e], t(this, a).className = this.updateContainerClasslist();
149
149
  }
150
150
  },
151
151
  title: {
152
152
  type: String,
153
153
  default: "",
154
- observer: (t) => {
155
- e(this, g).textContent = t;
154
+ observer: (e) => {
155
+ t(this, g).textContent = e;
156
156
  }
157
157
  },
158
158
  visible: {
159
159
  type: Boolean,
160
160
  default: !1,
161
- observer: async (t) => {
161
+ observer: async (e) => {
162
162
  var o;
163
- (o = e(this, l)) == null || o.abort(), c(this, l, new AbortController()), t ? (e(this, N).call(this), e(this, a).className = this.updateContainerClasslist(), e(this, h).call(this, "show"), e(this, a).offsetWidth, e(this, a).classList.add("is-show"), e(this, a).addEventListener(
163
+ (o = t(this, c)) == null || o.abort(), l(this, c, new AbortController()), e ? (t(this, N).call(this), t(this, a).className = this.updateContainerClasslist(), t(this, h).call(this, "show"), t(this, a).offsetWidth, t(this, a).classList.add("is-show"), t(this, a).addEventListener(
164
164
  "transitionend",
165
165
  () => {
166
- e(this, h).call(this, "shown");
166
+ t(this, h).call(this, "shown");
167
167
  },
168
- { once: !0, signal: e(this, l).signal }
169
- )) : (e(this, T).call(this), e(this, a).classList.add("is-before-hide"), e(this, h).call(this, "hide"), e(this, a).addEventListener(
168
+ { once: !0, signal: t(this, c).signal }
169
+ )) : (t(this, T).call(this), t(this, a).classList.add("is-before-hide"), t(this, h).call(this, "hide"), t(this, a).addEventListener(
170
170
  "transitionend",
171
171
  () => {
172
- e(this, a).className = this.updateContainerClasslist(), e(this, h).call(this, "hidden");
172
+ t(this, a).className = this.updateContainerClasslist(), t(this, h).call(this, "hidden");
173
173
  },
174
- { once: !0, signal: e(this, l).signal }
174
+ { once: !0, signal: t(this, c).signal }
175
175
  ));
176
176
  }
177
177
  },
178
178
  showClose: {
179
179
  type: Boolean,
180
180
  default: !1,
181
- observer: (t) => {
182
- e(this, a).className = this.updateContainerClasslist(), e(this, d).icon = this["close-icon"];
181
+ observer: (e) => {
182
+ t(this, a).className = this.updateContainerClasslist(), t(this, d).name = this["close-icon"];
183
183
  }
184
184
  },
185
185
  closeIcon: {
186
186
  type: String,
187
- default: "icon-cancel",
188
- observer: (t) => {
189
- this["show-close"] && (e(this, d).icon = t);
187
+ default: "xmark",
188
+ observer: (e) => {
189
+ this["show-close"] && (t(this, d).name = e);
190
190
  }
191
191
  },
192
192
  placement: {
193
193
  type: ["top-right", "top-left", "bottom-right", "bottom-left"],
194
194
  default: "top-right",
195
- observer: (t) => {
196
- e(this, a).className = this.updateContainerClasslist();
195
+ observer: (e) => {
196
+ t(this, a).className = this.updateContainerClasslist();
197
197
  }
198
198
  },
199
199
  zIndex: {
200
200
  type: Number,
201
201
  default: 0,
202
- observer: (t) => {
203
- e(this, a).style.setProperty("--z-index", t);
202
+ observer: (e) => {
203
+ t(this, a).style.setProperty("--z-index", e);
204
204
  }
205
205
  }
206
206
  }));
207
- n(this, h, (t, o) => {
208
- this.emit(t, {
207
+ n(this, h, (e, o) => {
208
+ this.emit(e, {
209
209
  detail: o,
210
210
  bubbles: !0,
211
211
  composed: !0
212
212
  });
213
213
  });
214
214
  C(this, "close", () => {
215
- this.visible = !1, e(this, h).call(this, "close");
215
+ this.visible = !1, t(this, h).call(this, "close");
216
216
  });
217
217
  n(this, N, () => {
218
- const t = document.querySelectorAll(
218
+ const e = document.querySelectorAll(
219
219
  `ea-notification[placement="${this.placement}"]`
220
220
  );
221
- if (t.length <= 1) return;
222
- const o = t[t.length - 2], p = o.style.getPropertyValue("--ea-notification-y"), u = o.shadowRoot.querySelector(".ea-notification").getBoundingClientRect();
221
+ if (e.length <= 1) return;
222
+ const o = e[e.length - 2], p = o.style.getPropertyValue("--ea-notification-y"), u = o.shadowRoot.querySelector(".ea-notification").getBoundingClientRect();
223
223
  this.style.setProperty(
224
224
  "--ea-notification-y",
225
225
  `${Number(p.replace("px", "")) + u.height + 8}px`
226
226
  );
227
227
  });
228
228
  n(this, T, () => {
229
- const t = [
229
+ const e = [
230
230
  ...document.querySelectorAll(
231
231
  `ea-notification[placement="${this.placement}"]`
232
232
  )
233
- ], o = t.findIndex((u) => u === this), p = t.slice(o + 1), w = e(this, a).getBoundingClientRect().height;
233
+ ], o = e.findIndex((u) => u === this), p = e.slice(o + 1), w = t(this, a).getBoundingClientRect().height;
234
234
  p.forEach((u, O) => {
235
235
  const U = Number(
236
236
  u.style.getPropertyValue("--ea-notification-y").replace("px", "")
@@ -244,25 +244,25 @@ class V extends P {
244
244
  n(this, H, () => {
245
245
  this.visible = !1;
246
246
  });
247
- this.stylesheet = k, this.$render();
247
+ this.stylesheet = P, this.$render();
248
248
  }
249
249
  // ------- dangerouslyUseHTMLString -------
250
250
  // #region
251
251
  get dangerouslyUseHTMLString() {
252
- return e(this, f).dangerouslyUseHTMLString;
252
+ return t(this, f).dangerouslyUseHTMLString;
253
253
  }
254
- set dangerouslyUseHTMLString(t) {
255
- e(this, f).dangerouslyUseHTMLString = t;
254
+ set dangerouslyUseHTMLString(e) {
255
+ t(this, f).dangerouslyUseHTMLString = e;
256
256
  }
257
257
  // #endregion
258
258
  // ------- end -------
259
259
  // ------- message -------
260
260
  // #region
261
261
  get message() {
262
- return e(this, f).message;
262
+ return t(this, f).message;
263
263
  }
264
- set message(t) {
265
- e(this, f).message = t, this.dangerouslyUseHTMLString ? e(this, m).innerHTML = t : e(this, m).innerText = t;
264
+ set message(e) {
265
+ t(this, f).message = e, this.dangerouslyUseHTMLString ? t(this, m).innerHTML = e : t(this, m).innerText = e;
266
266
  }
267
267
  // #endregion
268
268
  // ------- end -------
@@ -299,30 +299,30 @@ class V extends P {
299
299
  <div class="ea-notification__content">
300
300
  <header class="ea-notification__header" part='header'>
301
301
  <h2 class="ea-notification__title" part="title"> </h2>
302
- <ea-icon class="ea-notification__close-icon" part='close-icon'></ea-icon>
302
+ <ea-icon class="ea-notification__close-icon" name="xmark" part='close-icon'></ea-icon>
303
303
  </header>
304
304
  <main class="ea-notification__main" part='main'> </main>
305
305
  </div>
306
306
  </div>
307
- `, c(this, a, this.shadowRoot.querySelector(".ea-notification")), c(this, M, this.shadowRoot.querySelector(".ea-notification__header")), c(this, y, this.shadowRoot.querySelector(
307
+ `, l(this, a, this.shadowRoot.querySelector(".ea-notification")), l(this, M, this.shadowRoot.querySelector(".ea-notification__header")), l(this, y, this.shadowRoot.querySelector(
308
308
  ".ea-notification__icon"
309
- )), c(this, g, this.shadowRoot.querySelector(".ea-notification__title")), c(this, d, this.shadowRoot.querySelector(
309
+ )), l(this, g, this.shadowRoot.querySelector(".ea-notification__title")), l(this, d, this.shadowRoot.querySelector(
310
310
  ".ea-notification__close-icon"
311
- )), c(this, m, this.shadowRoot.querySelector(".ea-notification__main"));
311
+ )), l(this, m, this.shadowRoot.querySelector(".ea-notification__main"));
312
312
  }
313
313
  connectedCallback() {
314
314
  super.connectedCallback();
315
- const t = new AbortController();
316
- c(this, b, t), this["show-close"] && e(this, d).addEventListener("click", e(this, H), {
317
- signal: t.signal
315
+ const e = new AbortController();
316
+ l(this, b, e), this["show-close"] && t(this, d).addEventListener("click", t(this, H), {
317
+ signal: e.signal
318
318
  });
319
319
  }
320
320
  $beforeUnmounted() {
321
- var t, o;
322
- (t = e(this, l)) == null || t.abort(), (o = e(this, b)) == null || o.abort();
321
+ var e, o;
322
+ (e = t(this, c)) == null || e.abort(), (o = t(this, b)) == null || o.abort();
323
323
  }
324
324
  }
325
- a = new WeakMap(), M = new WeakMap(), y = new WeakMap(), g = new WeakMap(), d = new WeakMap(), m = new WeakMap(), l = new WeakMap(), b = new WeakMap(), f = new WeakMap(), h = new WeakMap(), N = new WeakMap(), T = new WeakMap(), H = new WeakMap();
325
+ a = new WeakMap(), M = new WeakMap(), y = new WeakMap(), g = new WeakMap(), d = new WeakMap(), m = new WeakMap(), c = new WeakMap(), b = new WeakMap(), f = new WeakMap(), h = new WeakMap(), N = new WeakMap(), T = new WeakMap(), H = new WeakMap();
326
326
  window.customElements.get("ea-notification") || window.customElements.define("ea-notification", V);
327
327
  window.$notify = r;
328
328
  export {
@@ -1,42 +1,42 @@
1
1
  var b = Object.defineProperty;
2
- var f = (e) => {
2
+ var v = (e) => {
3
3
  throw TypeError(e);
4
4
  };
5
- var w = (e, s, t) => s in e ? b(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
6
- var y = (e, s, t) => w(e, typeof s != "symbol" ? s + "" : s, t), p = (e, s, t) => s.has(e) || f("Cannot " + t);
7
- var o = (e, s, t) => (p(e, s, "read from private field"), t ? t.call(e) : s.get(e)), i = (e, s, t) => s.has(e) ? f("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), d = (e, s, t, n) => (p(e, s, "write to private field"), n ? n.call(e, t) : s.set(e, t), t);
8
- import { B as C } from "./Base.js";
5
+ var C = (e, s, t) => s in e ? b(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
6
+ var p = (e, s, t) => C(e, typeof s != "symbol" ? s + "" : s, t), y = (e, s, t) => s.has(e) || v("Cannot " + t);
7
+ var o = (e, s, t) => (y(e, s, "read from private field"), t ? t.call(e) : s.get(e)), r = (e, s, t) => s.has(e) ? v("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), d = (e, s, t, n) => (y(e, s, "write to private field"), n ? n.call(e, t) : s.set(e, t), t);
8
+ import { B as w } from "./Base.js";
9
9
  import { s as k } from "../css/ea-overlay.style.js";
10
10
  import { t as g } from "../utils/timeout.js";
11
- var a, m, l, c, r, h, v;
12
- class E extends C {
11
+ var a, u, c, i, l, m, f;
12
+ class E extends w {
13
13
  constructor() {
14
14
  super();
15
15
  /** @type {HTMLElement} */
16
- i(this, a);
16
+ r(this, a);
17
17
  /** @type {HTMLElement} */
18
- i(this, m);
18
+ r(this, u);
19
19
  /** @type {HTMLElement} */
20
- i(this, l);
20
+ r(this, c);
21
21
  /** @type {AbortController} */
22
- i(this, c);
23
- y(this, "state", this.properties({
22
+ r(this, i);
23
+ p(this, "state", this.properties({
24
24
  status: {
25
25
  type: Boolean,
26
26
  default: !1,
27
27
  observer: (t) => {
28
- t ? (o(this, a).className = this.updateContainerClasslist(), o(this, r).call(this, "open"), requestAnimationFrame(() => {
28
+ t ? (o(this, a).className = this.updateContainerClasslist(), o(this, l).call(this, "open"), requestAnimationFrame(() => {
29
29
  o(this, a).classList.add("ea-overlay--is-show"), o(this, a).addEventListener(
30
30
  "transitionend",
31
31
  () => {
32
- o(this, r).call(this, "opened");
32
+ o(this, l).call(this, "opened");
33
33
  },
34
34
  { once: !0 }
35
35
  );
36
- })) : (o(this, a).classList.add("ea-overlay--before-close"), o(this, r).call(this, "close"), o(this, a).addEventListener(
36
+ })) : (o(this, a).classList.add("ea-overlay--before-close"), o(this, l).call(this, "close"), o(this, a).addEventListener(
37
37
  "transitionend",
38
38
  () => {
39
- o(this, a).className = this.updateContainerClasslist(), o(this, r).call(this, "closed");
39
+ o(this, a).className = this.updateContainerClasslist(), o(this, l).call(this, "closed");
40
40
  },
41
41
  { once: !0 }
42
42
  ));
@@ -75,25 +75,31 @@ class E extends C {
75
75
  ].reduce((t, n) => (t[n] = {
76
76
  type: String,
77
77
  default: "",
78
- observer: (u) => {
79
- this.style.setProperty(`--ea-overlay-${n}`, u);
78
+ observer: (h) => {
79
+ this.style.setProperty(`--ea-overlay-${n}`, h);
80
80
  }
81
81
  }, t), {})
82
82
  }));
83
- i(this, r, (t, n) => {
83
+ p(this, "funcStates", this.properties({
84
+ beforeClose: {
85
+ rawFunction: !0,
86
+ props: !0,
87
+ type: Function,
88
+ default: null
89
+ }
90
+ }));
91
+ r(this, l, (t, n) => {
84
92
  this.emit(t, {
85
- detail: n
86
- // bubbles: true,
87
- // composed: true,
93
+ detail: n,
94
+ bubbles: !0,
95
+ composed: !0
88
96
  });
89
97
  });
90
- i(this, h, () => this.status = !1);
91
- i(this, v, (t) => {
98
+ r(this, m, () => this.status = !1);
99
+ r(this, f, (t) => {
92
100
  [...this.children].find(
93
- (u) => u === t.target || u.contains(t.target)
94
- ) || o(this, l) === t.target || o(this, l).contains(t.target) || (this["before-close"] ? this.emit("before-close", {
95
- detail: { done: () => o(this, h).call(this) }
96
- }) : o(this, h).call(this));
101
+ (h) => h === t.target || h.contains(t.target)
102
+ ) || o(this, c) === t.target || o(this, c).contains(t.target) || (this.beforeClose ? this.beforeClose(() => this.status = !1) : o(this, m).call(this));
97
103
  });
98
104
  this.stylesheet = k, this.$render(), document.activeElement.blur(), g(() => {
99
105
  this.focus();
@@ -103,7 +109,7 @@ class E extends C {
103
109
  return [
104
110
  "status",
105
111
  "modal",
106
- "before-close",
112
+ // "before-close",
107
113
  "close-on-click-modal",
108
114
  "z-index",
109
115
  "background-color",
@@ -141,20 +147,21 @@ class E extends C {
141
147
  <slot></slot>
142
148
  </div>
143
149
  </div>
144
- `, d(this, a, this.shadowRoot.querySelector(".ea-overlay")), d(this, m, this.shadowRoot.querySelector(".ea-overlay__mask")), d(this, l, this.shadowRoot.querySelector(
150
+ `, d(this, a, this.shadowRoot.querySelector(".ea-overlay")), d(this, u, this.shadowRoot.querySelector(".ea-overlay__mask")), d(this, c, this.shadowRoot.querySelector(
145
151
  ".ea-overlay__content"
146
152
  ));
147
153
  }
148
154
  connectedCallback() {
149
- super.connectedCallback(), d(this, c, new AbortController()), this["close-on-click-modal"] && this.shadowRoot.addEventListener("click", o(this, v), {
150
- signal: o(this, c).signal
155
+ var t;
156
+ super.connectedCallback(), (t = o(this, i)) == null || t.abort(), d(this, i, new AbortController()), this["close-on-click-modal"] && this.shadowRoot.addEventListener("click", o(this, f), {
157
+ signal: o(this, i).signal
151
158
  });
152
159
  }
153
160
  $beforeUnmounted() {
154
- o(this, c).abort();
161
+ o(this, i).abort();
155
162
  }
156
163
  }
157
- a = new WeakMap(), m = new WeakMap(), l = new WeakMap(), c = new WeakMap(), r = new WeakMap(), h = new WeakMap(), v = new WeakMap();
164
+ a = new WeakMap(), u = new WeakMap(), c = new WeakMap(), i = new WeakMap(), l = new WeakMap(), m = new WeakMap(), f = new WeakMap();
158
165
  window.customElements.get("ea-overlay") || window.customElements.define("ea-overlay", E);
159
166
  export {
160
167
  E as EaOverlay
@@ -1,9 +1,9 @@
1
- var u = Object.defineProperty;
1
+ var m = Object.defineProperty;
2
2
  var b = (t) => {
3
3
  throw TypeError(t);
4
4
  };
5
- var m = (t, a, e) => a in t ? u(t, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[a] = e;
6
- var g = (t, a, e) => m(t, typeof a != "symbol" ? a + "" : a, e), _ = (t, a, e) => a.has(t) || b("Cannot " + e);
5
+ var u = (t, a, e) => a in t ? m(t, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[a] = e;
6
+ var g = (t, a, e) => u(t, typeof a != "symbol" ? a + "" : a, e), _ = (t, a, e) => a.has(t) || b("Cannot " + e);
7
7
  var o = (t, a, e) => (_(t, a, "read from private field"), e ? e.call(t) : a.get(t)), s = (t, a, e) => a.has(t) ? b("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(t) : a.set(t, e), n = (t, a, e, i) => (_(t, a, "write to private field"), i ? i.call(t, e) : a.set(t, e), e);
8
8
  import { B as v } from "./Base.js";
9
9
  import { s as w } from "../css/ea-page-header.style.js";
@@ -27,7 +27,7 @@ class k extends v {
27
27
  default: "",
28
28
  observer: (e) => {
29
29
  const i = o(this, l).querySelector("ea-icon");
30
- i && i.setAttribute("icon", e);
30
+ i && i.setAttribute("name", e);
31
31
  }
32
32
  },
33
33
  title: {
@@ -66,7 +66,7 @@ class k extends v {
66
66
  <div class="ea-page-header__back" part="back">
67
67
  <span class="ea-page-header__icon" part="icon">
68
68
  <slot name="icon">
69
- <ea-icon icon="icon-angle-left" part="back-icon"></ea-icon>
69
+ <ea-icon name="angle-left" part="back-icon"></ea-icon>
70
70
  </slot>
71
71
  </span>
72
72
  <span class="ea-page-header__title" part="title">
@@ -159,7 +159,7 @@ class W extends H {
159
159
  type: Boolean,
160
160
  default: !1,
161
161
  observer: () => {
162
- this.updateContainerClasslist();
162
+ console.log(1, this), this.updateContainerClasslist();
163
163
  }
164
164
  },
165
165
  size: {
@@ -186,6 +186,7 @@ class W extends H {
186
186
  }));
187
187
  T(this, "propState", this.properties({
188
188
  pageSizes: {
189
+ props: !0,
189
190
  type: Array,
190
191
  default: [10, 20, 30, 40, 50, 100],
191
192
  /** @param {Array<number>} newVal */
@@ -441,9 +442,9 @@ class W extends H {
441
442
  const e = this.layout.filter(
442
443
  (s) => ["prev", "pager", "next", "jumper", "total", "sizes", "->"].includes(s)
443
444
  ), i = {
444
- prev: `<ea-icon class="ea-pagination__icon prev-icon" icon='icon-angle-left' part='icon prev-icon' tabindex="0"></ea-icon>`,
445
+ prev: `<ea-icon class="ea-pagination__icon prev-icon" name='angle-left' part='icon prev-icon' tabindex="0"></ea-icon>`,
445
446
  pager: "<section class='ea-pagination__pager' part='pager'></section>",
446
- next: `<ea-icon class="ea-pagination__icon next-icon" icon='icon-angle-right' part='icon next-icon' tabindex="0"></ea-icon>`,
447
+ next: `<ea-icon class="ea-pagination__icon next-icon" name='angle-right' part='icon next-icon' tabindex="0"></ea-icon>`,
447
448
  total: "<span class='ea-pagination__total' part='total'></span>",
448
449
  jumper: `<span class="ea-pagination__wrapper" part='jumper-wrap'>Go to <ea-input class='ea-pagination__jumper' part='jumper'></ea-input> </span>`,
449
450
  sizes: "<ea-select class='ea-pagination__sizes' part='sizes'></ea-select>",
@@ -457,10 +458,10 @@ class W extends H {
457
458
  ".ea-pagination__icon.prev-icon"
458
459
  )), u(this, m, this.shadowRoot.querySelector(
459
460
  ".ea-pagination__icon.next-icon"
460
- )), u(this, p, this.shadowRoot.querySelector(".ea-pagination__jumper")), u(this, y, this.shadowRoot.querySelector(".ea-pagination__total")), u(this, d, this.shadowRoot.querySelector(".ea-pagination__sizes")), this.updateContainerClasslist();
461
+ )), u(this, p, this.shadowRoot.querySelector(".ea-pagination__jumper")), u(this, y, this.shadowRoot.querySelector(".ea-pagination__total")), u(this, d, this.shadowRoot.querySelector(".ea-pagination__sizes"));
461
462
  }
462
463
  async connectedCallback() {
463
- super.connectedCallback(), await C(this, v, E).call(this), t(this, g).isFirstRender = !1;
464
+ super.connectedCallback(), await C(this, v, E).call(this), t(this, g).isFirstRender = !1, this.updateContainerClasslist();
464
465
  }
465
466
  $beforeUnmounted() {
466
467
  var e;