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
@@ -3,56 +3,58 @@ var y = (t) => {
3
3
  throw TypeError(t);
4
4
  };
5
5
  var C = (t, s, e) => s in t ? w(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
6
- var m = (t, s, e) => C(t, typeof s != "symbol" ? s + "" : s, e), _ = (t, s, e) => s.has(t) || y("Cannot " + e);
7
- var o = (t, s, e) => (_(t, s, "read from private field"), e ? e.call(t) : s.get(t)), i = (t, s, e) => s.has(t) ? y("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, e), r = (t, s, e, c) => (_(t, s, "write to private field"), c ? c.call(t, e) : s.set(t, e), e);
6
+ var _ = (t, s, e) => C(t, typeof s != "symbol" ? s + "" : s, e), v = (t, s, e) => s.has(t) || y("Cannot " + e);
7
+ var a = (t, s, e) => (v(t, s, "read from private field"), e ? e.call(t) : s.get(t)), i = (t, s, e) => s.has(t) ? y("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, e), r = (t, s, e, c) => (v(t, s, "write to private field"), c ? c.call(t, e) : s.set(t, e), e);
8
8
  import { B as g } from "./Base.js";
9
- import { s as S } from "../css/ea-alert.style.js";
9
+ import { s as x } from "../css/ea-alert.style.js";
10
10
  import { t as b } from "../utils/timeout.js";
11
- var a, h, f, p, d, l, n, u;
11
+ var l, d, u, m, p, f, n, o, h;
12
12
  class L extends g {
13
13
  constructor() {
14
14
  super();
15
15
  /** @type {HTMLElement} */
16
- i(this, a);
16
+ i(this, l);
17
17
  /** @type {HTMLElement} */
18
- i(this, h);
18
+ i(this, d);
19
19
  /** @type {HTMLElement} */
20
- i(this, f);
20
+ i(this, u);
21
+ /** @type {HTMLSlotElement} */
22
+ i(this, m);
21
23
  /** @type {HTMLElement} */
22
24
  i(this, p);
23
25
  /** @type {HTMLElement} */
24
- i(this, d);
26
+ i(this, f);
25
27
  /** @type {HTMLElement} */
26
- i(this, l);
27
- /** @type {AbortController} */
28
28
  i(this, n);
29
- m(this, "state", this.properties({
29
+ /** @type {AbortController} */
30
+ i(this, o);
31
+ _(this, "state", this.properties({
30
32
  title: {
31
33
  type: String,
32
34
  default: "",
33
35
  observer: (e) => {
34
- o(this, p).innerHTML = e || '<slot name="title"></slot>';
36
+ a(this, p).innerHTML = e;
35
37
  }
36
38
  },
37
39
  description: {
38
40
  type: String,
39
41
  default: "",
40
42
  observer: (e) => {
41
- o(this, d).innerHTML = e || "<slot></slot>";
43
+ a(this, f).innerHTML = e || "<slot></slot>";
42
44
  }
43
45
  },
44
46
  type: {
45
47
  type: ["primary", "info", "success", "warning", "error"],
46
48
  default: "info",
47
49
  observer: (e) => {
48
- o(this, a).className = this.updateContainerClasslist();
50
+ this.updateContainerClasslist();
49
51
  }
50
52
  },
51
53
  effect: {
52
54
  type: ["light", "dark"],
53
55
  default: "light",
54
56
  observer: (e) => {
55
- o(this, a).className = this.updateContainerClasslist();
57
+ this.updateContainerClasslist();
56
58
  }
57
59
  },
58
60
  "close-text": {
@@ -60,7 +62,7 @@ class L extends g {
60
62
  default: "",
61
63
  observer: (e) => {
62
64
  try {
63
- o(this, l).textContent = e;
65
+ a(this, n).textContent = e;
64
66
  } catch {
65
67
  }
66
68
  }
@@ -69,36 +71,39 @@ class L extends g {
69
71
  type: Boolean,
70
72
  default: !0,
71
73
  observer: (e) => {
72
- o(this, l).innerHTML = e ? this["close-text"] ? this["close-text"] : '<ea-icon class="ea-alert__close-icon" icon="icon-cancel" part="close-icon"></ea-icon>' : "";
74
+ var c;
75
+ (c = a(this, o)) == null || c.abort(), a(this, n).innerHTML = e ? this["close-text"] ? this["close-text"] : '<ea-icon class="ea-alert__close-icon" name="xmark" part="close-icon"></ea-icon>' : "", e && (r(this, o, new AbortController()), a(this, n).addEventListener("click", a(this, h), {
76
+ signal: a(this, o).signal
77
+ }));
73
78
  }
74
79
  },
75
80
  "show-icon": {
76
81
  type: Boolean,
77
82
  default: !1,
78
- observer: (e) => {
79
- const c = {
80
- primary: "info",
81
- success: "ok-circled",
82
- info: "info",
83
- warning: "attention-alt",
84
- error: "cancel-circled"
85
- }, v = this.querySelector("[slot=icon]");
86
- o(this, h).innerHTML = e && !v ? `<ea-icon class="ea-alert__icon" icon="icon-${c[this.type]}" part="icon"></ea-icon>` : '<slot name="icon"></slot>';
83
+ observer: () => {
84
+ const e = {
85
+ primary: "circle-info",
86
+ success: "circle-check",
87
+ info: "circle-info",
88
+ warning: "triangle-exclamation",
89
+ error: "circle-xmark"
90
+ };
91
+ a(this, d).innerHTML = `<ea-icon class="ea-alert__icon" name="${e[this.type]}" part="icon"></ea-icon>`;
87
92
  }
88
93
  },
89
94
  center: {
90
95
  type: Boolean,
91
96
  default: !1,
92
97
  observer: () => {
93
- o(this, a).className = this.updateContainerClasslist();
98
+ this.updateContainerClasslist();
94
99
  }
95
100
  },
96
101
  "show-after": {
97
102
  type: Number,
98
103
  default: 0,
99
104
  observer: (e) => {
100
- e = Math.abs(e), o(this, a).classList.toggle("ea-alert--hide", e > 0), b(() => {
101
- this.emit("open"), o(this, a).classList.remove("ea-alert--hide");
105
+ e = Math.abs(e), a(this, l).classList.toggle("ea-alert--hide", e > 0), b(() => {
106
+ this.emit("open"), a(this, l).classList.remove("ea-alert--hide");
102
107
  }, e);
103
108
  }
104
109
  },
@@ -112,26 +117,29 @@ class L extends g {
112
117
  type: Number,
113
118
  default: 0,
114
119
  observer: (e) => {
115
- e && this.isMounted && b(() => o(this, u).call(this), this["auto-close"]);
120
+ e && this.isMounted && b(() => a(this, h).call(this), this["auto-close"]);
116
121
  }
117
122
  }
118
123
  }));
119
- i(this, u, (e) => {
124
+ /**
125
+ * 关闭事件
126
+ */
127
+ i(this, h, () => {
120
128
  b(() => {
121
- o(this, n).abort(), o(this, a).classList.add("ea-alert--before-close"), o(this, a).addEventListener(
122
- "transitionend",
123
- () => {
124
- this.emit("close", {
125
- detail: {
126
- visible: !1
127
- }
128
- }), this.remove();
129
- },
130
- { once: !0 }
131
- );
129
+ a(this, l).classList.add("ea-alert--before-close");
130
+ const e = () => {
131
+ this.emit("close", {
132
+ detail: {
133
+ visible: !1
134
+ }
135
+ }), this.remove();
136
+ };
137
+ a(this, l).addEventListener("transitionend", e, {
138
+ once: !0
139
+ });
132
140
  }, this["hide-after"]);
133
141
  });
134
- this.$render(), this.stylesheet = S;
142
+ this.$render(), this.stylesheet = x;
135
143
  }
136
144
  static get observedAttributes() {
137
145
  return [
@@ -154,11 +162,12 @@ class L extends g {
154
162
  * @return {string} 属性值
155
163
  */
156
164
  updateContainerClasslist() {
157
- return this.computedClasslist("ea-alert", {
165
+ const e = this.computedClasslist("ea-alert", {
158
166
  ["--" + this.type]: this.type,
159
167
  ["--" + this.effect]: this.effect,
160
168
  "--center": this.center
161
169
  });
170
+ return a(this, l).className = e, e;
162
171
  }
163
172
  $render() {
164
173
  this.shadowRoot.innerHTML = `
@@ -167,29 +176,37 @@ class L extends g {
167
176
  <slot name='icon'></slot>
168
177
  </span>
169
178
  <div class="ea-alert__content" part='content-wrap'>
170
- <span class="ea-alert__title" part='title'></span>
179
+ <span class="ea-alert__title" part='title'>
180
+ <slot name="title"></slot>
181
+ </span>
171
182
  <p class="ea-alert__description" part='description'>
172
183
  <slot></slot>
173
184
  </p>
174
185
  <span class="ea-alert__close-btn" part="close-btn">
175
- ${this.closable ? this["close-text"] ? this["close-text"] : '<ea-icon class="ea-alert__close-icon" icon="icon-cancel" part="close-icon"></ea-icon>' : ""}
186
+ ${this.closable ? this["close-text"] ? this["close-text"] : '<ea-icon class="ea-alert__close-icon" name="xmark" part="close-icon"></ea-icon>' : ""}
176
187
  </span>
177
188
  </div>
178
189
  </div>
179
- `, r(this, a, this.shadowRoot.querySelector(".ea-alert")), r(this, h, this.shadowRoot.querySelector(".ea-alert__icon-wrap")), r(this, f, this.shadowRoot.querySelector(".ea-alert__content")), r(this, p, this.shadowRoot.querySelector(".ea-alert__title")), r(this, d, this.shadowRoot.querySelector(
180
- ".ea-alert__description"
181
- )), r(this, l, this.shadowRoot.querySelector(".ea-alert__close-btn"));
190
+ `, r(this, l, this.shadowRoot.querySelector(".ea-alert")), r(this, d, this.shadowRoot.querySelector(
191
+ ".ea-alert__icon-wrap slot[name=icon]"
192
+ )), r(this, u, this.shadowRoot.querySelector(".ea-alert__content")), r(this, p, this.shadowRoot.querySelector(
193
+ ".ea-alert__title slot[name=title]"
194
+ )), r(this, f, this.shadowRoot.querySelector(
195
+ ".ea-alert__description slot"
196
+ )), r(this, n, this.shadowRoot.querySelector(".ea-alert__close-btn"));
182
197
  }
183
198
  connectedCallback() {
184
- super.connectedCallback(), r(this, n, new AbortController()), this.closable && o(this, l).addEventListener("click", o(this, u), {
185
- signal: o(this, n).signal
186
- });
199
+ var e;
200
+ super.connectedCallback(), (e = a(this, o)) == null || e.abort(), this.closable && (r(this, o, new AbortController()), a(this, n).addEventListener("click", a(this, h), {
201
+ signal: a(this, o).signal
202
+ }));
187
203
  }
188
204
  $beforeUnmounted() {
189
- o(this, n).abort();
205
+ var e;
206
+ (e = a(this, o)) == null || e.abort();
190
207
  }
191
208
  }
192
- a = new WeakMap(), h = new WeakMap(), f = new WeakMap(), p = new WeakMap(), d = new WeakMap(), l = new WeakMap(), n = new WeakMap(), u = new WeakMap();
209
+ l = new WeakMap(), d = new WeakMap(), u = new WeakMap(), m = new WeakMap(), p = new WeakMap(), f = new WeakMap(), n = new WeakMap(), o = new WeakMap(), h = new WeakMap();
193
210
  window.customElements.get("ea-alert") || window.customElements.define("ea-alert", L);
194
211
  export {
195
212
  L as EaAlert
@@ -1,14 +1,14 @@
1
- var u = Object.defineProperty;
1
+ var m = Object.defineProperty;
2
2
  var v = (e) => {
3
3
  throw TypeError(e);
4
4
  };
5
- var g = (e, a, t) => a in e ? u(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t;
6
- var f = (e, a, t) => g(e, typeof a != "symbol" ? a + "" : a, t), p = (e, a, t) => a.has(e) || v("Cannot " + t);
7
- var r = (e, a, t) => (p(e, a, "read from private field"), t ? t.call(e) : a.get(e)), n = (e, a, t) => a.has(e) ? v("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(e) : a.set(e, t), h = (e, a, t, s) => (p(e, a, "write to private field"), s ? s.call(e, t) : a.set(e, t), t);
8
- import { B as m } from "./Base.js";
9
- import { E as w } from "../utils/Utils.js";
10
- import { s as y } from "../css/ea-avatar.style.js";
11
- const b = `
5
+ var g = (e, s, t) => s in e ? m(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
6
+ var f = (e, s, t) => g(e, typeof s != "symbol" ? s + "" : s, t), p = (e, s, t) => s.has(e) || v("Cannot " + t);
7
+ var r = (e, s, t) => (p(e, s, "read from private field"), t ? t.call(e) : s.get(e)), n = (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), h = (e, s, t, a) => (p(e, s, "write to private field"), a ? a.call(e, t) : s.set(e, t), t);
8
+ import { B as y } from "./Base.js";
9
+ import { E as b } from "../utils/Utils.js";
10
+ import { s as w } from "../css/ea-avatar.style.js";
11
+ const u = `
12
12
  <svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
13
13
  <defs>
14
14
  <clipPath id="a">
@@ -28,44 +28,44 @@ const b = `
28
28
  <path d="M55 45L40 70h5 30z" fill="#c0c4cc" />
29
29
  </svg>
30
30
  `;
31
- var i, l;
32
- class C extends m {
31
+ var o, i;
32
+ class C extends y {
33
33
  constructor() {
34
34
  super();
35
35
  /** @type {HTMLElement} */
36
- n(this, i);
36
+ n(this, o);
37
37
  /** @type {AbortController} */
38
- n(this, l);
38
+ n(this, i);
39
39
  f(this, "state", this.properties({
40
40
  icon: {
41
41
  type: String,
42
42
  default: "",
43
43
  observer: (t) => {
44
- r(this, i).innerHTML = `<ea-icon class="ea-avatar__icon" icon="${t}" part="icon-avatar"></ea-icon>`;
44
+ t ? r(this, o).innerHTML = `<ea-icon class="ea-avatar__icon" name="${t}" part="icon-avatar"></ea-icon>` : r(this, o).innerHTML = `<slot>${u}</slot>`;
45
45
  }
46
46
  },
47
47
  shape: {
48
48
  type: ["circle", "square"],
49
49
  default: "circle",
50
50
  observer: () => {
51
- r(this, i).className = this.updateContainerClasslist();
51
+ this.updateContainerClasslist();
52
52
  }
53
53
  },
54
54
  size: {
55
55
  type: String,
56
56
  default: "default",
57
57
  observer: (t) => {
58
- const s = w.Enum.hasEnum(
58
+ const a = b.Enum.hasEnum(
59
59
  ["default", "small", "large"],
60
60
  t
61
61
  ), c = CSS.supports("width", t);
62
- if (!s && !c)
62
+ if (!a && !c)
63
63
  return this.size = "default", console.warn(
64
64
  "[ea-avatar] Please set size to one of [default, small, large] or a valid CSS width value"
65
65
  );
66
66
  this.style.setProperty(
67
67
  "--ea-avatar-size",
68
- s ? `var(--ea-avatar-size-${t})` : t
68
+ a ? `var(--ea-avatar-size-${t})` : t
69
69
  );
70
70
  }
71
71
  },
@@ -74,23 +74,23 @@ class C extends m {
74
74
  default: "",
75
75
  observer: (t) => {
76
76
  var c;
77
- (c = r(this, l)) == null || c.abort(), h(this, l, new AbortController());
78
- const s = new Image();
79
- s.src = t, s.addEventListener(
77
+ (c = r(this, i)) == null || c.abort(), h(this, i, new AbortController());
78
+ const a = new Image();
79
+ a.src = t, a.addEventListener(
80
80
  "load",
81
81
  () => {
82
- var o;
83
- r(this, i).innerHTML = `<img class="ea-avatar__img" src="${t}" alt="${this.alt}" srcset="${this["src-set"]}" part="img-avatar" />`, (o = r(this, l)) == null || o.abort();
82
+ var l;
83
+ r(this, o).innerHTML = `<img class="ea-avatar__img" src="${t}" alt="${this.alt}" srcset="${this["src-set"]}" part="img-avatar" />`, (l = r(this, i)) == null || l.abort();
84
84
  },
85
- { signal: r(this, l).signal }
86
- ), s.addEventListener(
85
+ { signal: r(this, i).signal }
86
+ ), a.addEventListener(
87
87
  "error",
88
88
  () => {
89
89
  var d;
90
- const o = r(this, i).querySelector("slot");
91
- o && (o.innerHTML = S), this.emit("error"), (d = r(this, l)) == null || d.abort();
90
+ const l = r(this, o).querySelector("slot");
91
+ l && (l.innerHTML = S), this.emit("error"), (d = r(this, i)) == null || d.abort();
92
92
  },
93
- { signal: r(this, l).signal }
93
+ { signal: r(this, i).signal }
94
94
  );
95
95
  }
96
96
  },
@@ -98,16 +98,16 @@ class C extends m {
98
98
  type: String,
99
99
  default: "",
100
100
  observer: (t) => {
101
- const s = this.shadowRoot.querySelector(".ea-avatar__img");
102
- s && (s.srcset = t);
101
+ const a = this.shadowRoot.querySelector(".ea-avatar__img");
102
+ a && (a.srcset = t);
103
103
  }
104
104
  },
105
105
  alt: {
106
106
  type: String,
107
107
  default: "",
108
108
  observer: (t) => {
109
- const s = this.shadowRoot.querySelector(".ea-avatar__img");
110
- s && (s.alt = t);
109
+ const a = this.shadowRoot.querySelector(".ea-avatar__img");
110
+ a && (a.alt = t);
111
111
  }
112
112
  },
113
113
  fit: {
@@ -118,7 +118,7 @@ class C extends m {
118
118
  }
119
119
  }
120
120
  }));
121
- this.stylesheet = y, this.$render();
121
+ this.stylesheet = w, this.$render();
122
122
  }
123
123
  static get observedAttributes() {
124
124
  return [
@@ -137,22 +137,27 @@ class C extends m {
137
137
  * @return {string} 属性值
138
138
  */
139
139
  updateContainerClasslist() {
140
- return this.computedClasslist("ea-avatar", {
140
+ const t = this.computedClasslist("ea-avatar", {
141
141
  ["--" + this.shape]: this.shape
142
142
  });
143
+ return r(this, o).className = t, t;
143
144
  }
144
145
  $render() {
145
146
  this.shadowRoot.innerHTML = `
146
147
  <div class="ea-avatar" part='container'>
147
- <slot>${b}</slot>
148
+ <slot>${u}</slot>
148
149
  </div>
149
- `, h(this, i, this.shadowRoot.querySelector(".ea-avatar"));
150
+ `, h(this, o, this.shadowRoot.querySelector(".ea-avatar")), this.updateContainerClasslist();
150
151
  }
151
152
  connectedCallback() {
152
- super.connectedCallback(), r(this, i).className = this.updateContainerClasslist();
153
+ super.connectedCallback();
154
+ }
155
+ $beforeUnmounted() {
156
+ var t;
157
+ (t = r(this, i)) == null || t.abort();
153
158
  }
154
159
  }
155
- i = new WeakMap(), l = new WeakMap();
160
+ o = new WeakMap(), i = new WeakMap();
156
161
  window.customElements.get("ea-avatar") || window.customElements.define("ea-avatar", C);
157
162
  export {
158
163
  C as EaAvatar
@@ -1,24 +1,24 @@
1
- var C = Object.defineProperty;
1
+ var E = Object.defineProperty;
2
2
  var S = (t) => {
3
3
  throw TypeError(t);
4
4
  };
5
- var y = (t, s, e) => s in t ? C(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
6
- var f = (t, s, e) => y(t, typeof s != "symbol" ? s + "" : s, e), w = (t, s, e) => s.has(t) || S("Cannot " + e);
7
- var r = (t, s, e) => (w(t, s, "read from private field"), e ? e.call(t) : s.get(t)), a = (t, s, e) => s.has(t) ? S("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, e), l = (t, s, e, n) => (w(t, s, "write to private field"), n ? n.call(t, e) : s.set(t, e), e);
8
- import { B as E } from "./Base.js";
5
+ var y = (t, r, e) => r in t ? E(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
6
+ var f = (t, r, e) => y(t, typeof r != "symbol" ? r + "" : r, e), w = (t, r, e) => r.has(t) || S("Cannot " + e);
7
+ var s = (t, r, e) => (w(t, r, "read from private field"), e ? e.call(t) : r.get(t)), a = (t, r, e) => r.has(t) ? S("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(t) : r.set(t, e), i = (t, r, e, n) => (w(t, r, "write to private field"), n ? n.call(t, e) : r.set(t, e), e);
8
+ import { B as C } from "./Base.js";
9
9
  import { s as v } from "../css/ea-breadcrumb.style.js";
10
10
  import { s as R } from "../css/ea-breadcrumb-item.style.js";
11
11
  import { E as _ } from "../utils/Utils.js";
12
- var c, d, u, b, p;
13
- class q extends E {
12
+ var l, c, d, b, p;
13
+ class $ extends C {
14
14
  constructor() {
15
15
  super();
16
16
  /** @type {HTMLElement} */
17
- a(this, c);
17
+ a(this, l);
18
18
  /** @type {HTMLSlotElement} */
19
- a(this, d);
19
+ a(this, c);
20
20
  /** @type {AbortController} */
21
- a(this, u, new AbortController());
21
+ a(this, d, new AbortController());
22
22
  f(this, "state", this.properties({
23
23
  separator: {
24
24
  type: String,
@@ -41,10 +41,10 @@ class q extends E {
41
41
  */
42
42
  a(this, p, () => {
43
43
  const n = [...this.shadowRoot.querySelector("#defaultSlot").assignedElements()].filter(
44
- (h) => h.tagName.toLowerCase() === "ea-breadcrumb-item"
45
- ), o = r(this, b).call(this, this.separator);
46
- n.forEach((h, g) => {
47
- g < n.length - 1 && !h.querySelector("[slot='separator']") && h.appendChild(o.cloneNode(!0));
44
+ (m) => m.tagName.toLowerCase() === "ea-breadcrumb-item"
45
+ ), o = s(this, b).call(this, this.separator);
46
+ n.forEach((m, g) => {
47
+ g < n.length - 1 && !m.querySelector("[slot='separator']") && m.appendChild(o.cloneNode(!0));
48
48
  });
49
49
  });
50
50
  this.stylesheet = v, this.$render();
@@ -60,7 +60,7 @@ class q extends E {
60
60
  const e = this.computedClasslist("ea-breadcrumb", {
61
61
  // ['--' + this.type]: this.type,
62
62
  });
63
- return r(this, c).className = e, e;
63
+ return s(this, l).className = e, e;
64
64
  }
65
65
  $render() {
66
66
  this.shadowRoot.innerHTML = `
@@ -68,34 +68,34 @@ class q extends E {
68
68
  <slot id="defaultSlot"></slot>
69
69
  </nav>
70
70
  <slot id="separatorSlot" name="separator"></slot>
71
- `, l(this, c, this.shadowRoot.querySelector(".ea-breadcrumb")), l(this, d, this.shadowRoot.querySelector("#defaultSlot"));
71
+ `, i(this, l, this.shadowRoot.querySelector(".ea-breadcrumb")), i(this, c, this.shadowRoot.querySelector("#defaultSlot"));
72
72
  }
73
73
  connectedCallback() {
74
- super.connectedCallback(), r(this, d).addEventListener("slotchange", r(this, p), {
75
- signal: r(this, u).signal
74
+ super.connectedCallback(), s(this, c).addEventListener("slotchange", s(this, p), {
75
+ signal: s(this, d).signal
76
76
  });
77
77
  }
78
78
  $beforeUnmounted() {
79
79
  var e;
80
- (e = r(this, u)) == null || e.abort();
80
+ (e = s(this, d)) == null || e.abort();
81
81
  }
82
82
  }
83
- c = new WeakMap(), d = new WeakMap(), u = new WeakMap(), b = new WeakMap(), p = new WeakMap();
84
- window.customElements.get("ea-breadcrumb") || window.customElements.define("ea-breadcrumb", q);
85
- var m, i;
86
- class A extends E {
83
+ l = new WeakMap(), c = new WeakMap(), d = new WeakMap(), b = new WeakMap(), p = new WeakMap();
84
+ window.customElements.get("ea-breadcrumb") || window.customElements.define("ea-breadcrumb", $);
85
+ var u, h;
86
+ class q extends C {
87
87
  constructor() {
88
88
  super();
89
89
  /** @type {HTMLElement} */
90
- a(this, m);
90
+ a(this, u);
91
91
  /** @type {HTMLElement} */
92
- a(this, i);
92
+ a(this, h);
93
93
  f(this, "state", this.properties({
94
94
  href: {
95
95
  type: String,
96
96
  default: "",
97
97
  observer: (e) => {
98
- r(this, i).setAttribute("href", e), r(this, i).classList.add("is-link");
98
+ this.$render(), s(this, h).href = this.getAttribute("href");
99
99
  }
100
100
  }
101
101
  }));
@@ -112,7 +112,7 @@ class A extends E {
112
112
  const e = this.computedClasslist("ea-breadcrumb-item", {
113
113
  // ['--' + this.type]: this.type,
114
114
  });
115
- return r(this, m).className = e, e;
115
+ return s(this, u).className = e, e;
116
116
  }
117
117
  $render() {
118
118
  const e = _.EaElement.h(
@@ -132,17 +132,17 @@ class A extends E {
132
132
  <slot name="separator"></slot>
133
133
  </span>
134
134
  </div>
135
- `, l(this, m, this.shadowRoot.querySelector(".ea-breadcrumb-item")), l(this, i, this.shadowRoot.querySelector(
135
+ `, i(this, u, this.shadowRoot.querySelector(".ea-breadcrumb-item")), i(this, h, this.shadowRoot.querySelector(
136
136
  ".ea-breadcrumb-item__content"
137
- ));
137
+ )), this.updateContainerClasslist();
138
138
  }
139
139
  connectedCallback() {
140
140
  super.connectedCallback();
141
141
  }
142
142
  }
143
- m = new WeakMap(), i = new WeakMap();
144
- window.customElements.get("ea-breadcrumb-item") || window.customElements.define("ea-breadcrumb-item", A);
143
+ u = new WeakMap(), h = new WeakMap();
144
+ window.customElements.get("ea-breadcrumb-item") || window.customElements.define("ea-breadcrumb-item", q);
145
145
  export {
146
- q as EaBreadcrumb,
147
- A as EaBreadcrumbItem
146
+ $ as EaBreadcrumb,
147
+ q as EaBreadcrumbItem
148
148
  };