easy-component-ui 3.0.14 → 3.0.15

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 (167) hide show
  1. package/dist/assets/icon.css +1 -0
  2. package/dist/components/Base.js +941 -0
  3. package/dist/components/ea-alert.js +213 -0
  4. package/dist/components/ea-avatar.js +164 -0
  5. package/dist/components/ea-backtop.js +136 -0
  6. package/dist/components/ea-badge.js +144 -0
  7. package/dist/components/ea-breadcrumb.js +148 -0
  8. package/dist/components/ea-button.js +266 -0
  9. package/dist/components/ea-calendar.js +10 -0
  10. package/dist/components/ea-calendar2.js +673 -0
  11. package/dist/components/ea-card.js +121 -0
  12. package/dist/components/ea-carousel.js +415 -0
  13. package/dist/components/ea-checkbox.js +446 -0
  14. package/dist/components/ea-collapse.js +313 -0
  15. package/dist/components/ea-color-picker.js +888 -0
  16. package/dist/components/ea-container.js +206 -0
  17. package/dist/components/ea-countdown.js +142 -0
  18. package/dist/components/ea-date-picker.js +649 -0
  19. package/dist/components/ea-descriptions.js +474 -0
  20. package/dist/components/ea-dialog.js +249 -0
  21. package/dist/components/ea-drawer.js +216 -0
  22. package/dist/components/ea-dropdown.js +228 -0
  23. package/dist/components/ea-empty.js +93 -0
  24. package/dist/components/ea-icon.js +159 -0
  25. package/dist/components/ea-image-preview.js +532 -0
  26. package/dist/components/ea-image.js +327 -0
  27. package/dist/components/ea-infinite-scroll.js +109 -0
  28. package/dist/components/ea-input-number.js +367 -0
  29. package/dist/components/ea-input.js +588 -0
  30. package/dist/components/ea-layout.js +132 -0
  31. package/dist/components/ea-link.js +101 -0
  32. package/dist/components/ea-menu.js +433 -0
  33. package/dist/components/ea-message-box.js +624 -0
  34. package/dist/components/ea-message.js +313 -0
  35. package/dist/components/ea-notification.js +331 -0
  36. package/dist/components/ea-overlay.js +168 -0
  37. package/dist/components/ea-page-header.js +108 -0
  38. package/dist/components/ea-pagination.js +481 -0
  39. package/dist/components/ea-popconfirm.js +275 -0
  40. package/dist/components/ea-popover.js +147 -0
  41. package/dist/components/ea-popper.js +203 -0
  42. package/dist/components/ea-progress.js +286 -0
  43. package/dist/components/ea-radio.js +364 -0
  44. package/dist/components/ea-rate.js +241 -0
  45. package/dist/components/ea-result.js +100 -0
  46. package/dist/components/ea-scrollbar.js +235 -0
  47. package/dist/components/ea-segmented.js +215 -0
  48. package/dist/components/ea-select.js +609 -0
  49. package/dist/components/ea-skeleton.js +263 -0
  50. package/dist/components/ea-slider.js +430 -0
  51. package/dist/components/ea-space.js +123 -0
  52. package/dist/components/ea-splitter.js +233 -0
  53. package/dist/components/ea-statistic.js +74 -0
  54. package/dist/components/ea-steps.js +346 -0
  55. package/dist/components/ea-switch.js +271 -0
  56. package/dist/components/ea-table.js +1137 -0
  57. package/dist/components/ea-tabs.js +503 -0
  58. package/dist/components/ea-tag.js +228 -0
  59. package/dist/components/ea-text.js +113 -0
  60. package/dist/components/ea-time-picker.js +510 -0
  61. package/dist/components/ea-timeline.js +185 -0
  62. package/dist/components/ea-tooltip.js +161 -0
  63. package/dist/components/ea-tour.js +544 -0
  64. package/dist/components/ea-transfer.js +949 -0
  65. package/dist/components/ea-tree.js +1125 -0
  66. package/dist/components/index.js +60 -0
  67. package/dist/core/FormBase.js +238 -0
  68. package/dist/css/ea-alert.style.js +4 -0
  69. package/dist/css/ea-aside.style.js +4 -0
  70. package/dist/css/ea-avatar.style.js +4 -0
  71. package/dist/css/ea-backtop.style.js +4 -0
  72. package/dist/css/ea-badge.style.js +4 -0
  73. package/dist/css/ea-breadcrumb-item.style.js +4 -0
  74. package/dist/css/ea-breadcrumb.style.js +4 -0
  75. package/dist/css/ea-button-group.style.js +4 -0
  76. package/dist/css/ea-button.style.js +4 -0
  77. package/dist/css/ea-calendar.style.js +4 -0
  78. package/dist/css/ea-card.style.js +4 -0
  79. package/dist/css/ea-carousel-item.style.js +4 -0
  80. package/dist/css/ea-carousel.style.js +4 -0
  81. package/dist/css/ea-check-tag.style.js +4 -0
  82. package/dist/css/ea-checkbox-group.style.js +4 -0
  83. package/dist/css/ea-checkbox.style.js +4 -0
  84. package/dist/css/ea-col.style.js +4 -0
  85. package/dist/css/ea-collapse-item.style.js +4 -0
  86. package/dist/css/ea-collapse.style.js +4 -0
  87. package/dist/css/ea-color-picker-panel.style.js +4 -0
  88. package/dist/css/ea-color-picker.style.js +4 -0
  89. package/dist/css/ea-container.style.js +4 -0
  90. package/dist/css/ea-date-picker.style.js +4 -0
  91. package/dist/css/ea-descriptions-item.style.js +4 -0
  92. package/dist/css/ea-descriptions.style.js +4 -0
  93. package/dist/css/ea-dialog.style.js +4 -0
  94. package/dist/css/ea-drawer.style.js +4 -0
  95. package/dist/css/ea-dropdown-item.style.js +4 -0
  96. package/dist/css/ea-dropdown-menu.style.js +4 -0
  97. package/dist/css/ea-dropdown.style.js +4 -0
  98. package/dist/css/ea-empty.style.js +4 -0
  99. package/dist/css/ea-footer.style.js +4 -0
  100. package/dist/css/ea-header.style.js +4 -0
  101. package/dist/css/ea-icon.style.js +4 -0
  102. package/dist/css/ea-image-preview.style.js +4 -0
  103. package/dist/css/ea-image.style.js +4 -0
  104. package/dist/css/ea-infinite-scroll.style.js +4 -0
  105. package/dist/css/ea-input-number.style.js +4 -0
  106. package/dist/css/ea-input.style.js +4 -0
  107. package/dist/css/ea-link.style.js +4 -0
  108. package/dist/css/ea-main.style.js +4 -0
  109. package/dist/css/ea-menu-item-group.style.js +4 -0
  110. package/dist/css/ea-menu-item.style.js +4 -0
  111. package/dist/css/ea-menu.style.js +4 -0
  112. package/dist/css/ea-message-box.style.js +4 -0
  113. package/dist/css/ea-message.style.js +4 -0
  114. package/dist/css/ea-notification.style.js +4 -0
  115. package/dist/css/ea-option-gropu.style.js +4 -0
  116. package/dist/css/ea-option.style.js +4 -0
  117. package/dist/css/ea-overlay.style.js +4 -0
  118. package/dist/css/ea-page-header.style.js +4 -0
  119. package/dist/css/ea-pagination.style.js +4 -0
  120. package/dist/css/ea-popconfirm.style.js +4 -0
  121. package/dist/css/ea-popover.style.js +4 -0
  122. package/dist/css/ea-popper.style.js +4 -0
  123. package/dist/css/ea-progress.style.js +4 -0
  124. package/dist/css/ea-radio-group.style.js +4 -0
  125. package/dist/css/ea-radio.style.js +4 -0
  126. package/dist/css/ea-rate.style.js +4 -0
  127. package/dist/css/ea-result.style.js +4 -0
  128. package/dist/css/ea-row.style.js +4 -0
  129. package/dist/css/ea-scrollbar.style.js +4 -0
  130. package/dist/css/ea-segmented.style.js +4 -0
  131. package/dist/css/ea-select.style.js +4 -0
  132. package/dist/css/ea-skeleton-item.style.js +4 -0
  133. package/dist/css/ea-skeleton.style.js +4 -0
  134. package/dist/css/ea-slider.style.js +4 -0
  135. package/dist/css/ea-space.style.js +4 -0
  136. package/dist/css/ea-splitter-bar.style.js +4 -0
  137. package/dist/css/ea-splitter-panel.style.js +4 -0
  138. package/dist/css/ea-splitter.style.js +4 -0
  139. package/dist/css/ea-statistic.style.js +4 -0
  140. package/dist/css/ea-step.style.js +4 -0
  141. package/dist/css/ea-steps.style.js +4 -0
  142. package/dist/css/ea-sub-menu.style.js +4 -0
  143. package/dist/css/ea-switch.style.js +4 -0
  144. package/dist/css/ea-tab-panel.style.js +4 -0
  145. package/dist/css/ea-tab.style.js +4 -0
  146. package/dist/css/ea-table-column.style.js +4 -0
  147. package/dist/css/ea-table.style.js +4 -0
  148. package/dist/css/ea-tabs.style.js +4 -0
  149. package/dist/css/ea-tag.style.js +4 -0
  150. package/dist/css/ea-text.style.js +4 -0
  151. package/dist/css/ea-time-picker.style.js +4 -0
  152. package/dist/css/ea-timeline-item.style.js +4 -0
  153. package/dist/css/ea-timeline.style.js +4 -0
  154. package/dist/css/ea-tooltip.style.js +4 -0
  155. package/dist/css/ea-tour-step.style.js +4 -0
  156. package/dist/css/ea-tour.style.js +4 -0
  157. package/dist/css/ea-transfer.style.js +5 -0
  158. package/dist/css/ea-tree.style.js +6 -0
  159. package/dist/css/ea-ui-component.style.js +4 -0
  160. package/dist/favicon.ico +0 -0
  161. package/dist/utils/Color.js +439 -0
  162. package/dist/utils/I18nManager.js +218 -0
  163. package/dist/utils/Utils.js +65 -0
  164. package/dist/utils/Variables.js +12 -0
  165. package/dist/utils/parseTime.js +73 -0
  166. package/dist/utils/timeout.js +9 -0
  167. package/package.json +1 -1
@@ -0,0 +1,228 @@
1
+ var C = Object.defineProperty;
2
+ var f = (t) => {
3
+ throw TypeError(t);
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 b = (t, s, e) => y(t, typeof s != "symbol" ? s + "" : s, e), m = (t, s, e) => s.has(t) || f("Cannot " + e);
7
+ var a = (t, s, e) => (m(t, s, "read from private field"), e ? e.call(t) : s.get(t)), o = (t, s, e) => s.has(t) ? f("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, e), l = (t, s, e, h) => (m(t, s, "write to private field"), h ? h.call(t, e) : s.set(t, e), e);
8
+ import { B as g } from "./Base.js";
9
+ import { s as v } from "../css/ea-check-tag.style.js";
10
+ import { s as k } from "../css/ea-tag.style.js";
11
+ import { c as w } from "../utils/Variables.js";
12
+ import { E } from "../utils/Utils.js";
13
+ var c, r, u;
14
+ class A extends g {
15
+ constructor() {
16
+ super();
17
+ /** @type {HTMLElement} */
18
+ o(this, c);
19
+ /** @type {AbortController} */
20
+ o(this, r);
21
+ b(this, "state", this.properties({
22
+ checked: {
23
+ type: Boolean,
24
+ default: !1,
25
+ observer: (e) => {
26
+ this.updateContainerClasslist();
27
+ }
28
+ },
29
+ disabled: {
30
+ type: Boolean,
31
+ default: !1,
32
+ observer: (e) => {
33
+ this.updateContainerClasslist();
34
+ }
35
+ },
36
+ type: {
37
+ type: ["primary", "info", "success", "warning", "danger"],
38
+ default: "primary",
39
+ observer: (e) => {
40
+ this.updateContainerClasslist();
41
+ }
42
+ }
43
+ }));
44
+ /**
45
+ * 点击切换选中状态
46
+ */
47
+ o(this, u, () => {
48
+ this.disabled || (this.checked = !this.checked, this.emit("change", { detail: { checked: this.checked } }));
49
+ });
50
+ this.stylesheet = v, this.$render();
51
+ }
52
+ static get observedAttributes() {
53
+ return [...super.observedAttributes, "checked", "disabled", "type"];
54
+ }
55
+ /**
56
+ * 获取 classlist 列表
57
+ * @return {string} 属性值
58
+ */
59
+ updateContainerClasslist() {
60
+ const e = this.computedClasslist(
61
+ "ea-check-tag",
62
+ {
63
+ ["--" + this.type]: this.type && this.checked
64
+ },
65
+ {
66
+ disabled: this.disabled
67
+ }
68
+ );
69
+ return a(this, c).className = e, e;
70
+ }
71
+ $render() {
72
+ this.shadowRoot.innerHTML = `
73
+ <div class='ea-check-tag' part='container'>
74
+ <slot></slot>
75
+ </div>
76
+ `, l(this, c, this.shadowRoot.querySelector(".ea-check-tag"));
77
+ }
78
+ connectedCallback() {
79
+ var e;
80
+ super.connectedCallback(), (e = a(this, r)) == null || e.abort(), l(this, r, new AbortController()), a(this, c).addEventListener("click", a(this, u), {
81
+ signal: a(this, r).signal
82
+ });
83
+ }
84
+ $beforeUnmounted() {
85
+ var e;
86
+ (e = a(this, r)) == null || e.abort();
87
+ }
88
+ }
89
+ c = new WeakMap(), r = new WeakMap(), u = new WeakMap();
90
+ window.customElements.get("ea-check-tag") || window.customElements.define("ea-check-tag", A);
91
+ class S extends Event {
92
+ constructor(s) {
93
+ super("ea-remove", {
94
+ bubbles: !0,
95
+ composed: !0
96
+ }), this.detail = s;
97
+ }
98
+ }
99
+ var i, d, n, p;
100
+ class $ extends g {
101
+ constructor() {
102
+ super();
103
+ /** @type {HTMLElement} */
104
+ o(this, i);
105
+ /** @type {HTMLElement | null} */
106
+ o(this, d);
107
+ /** @type {AbortController} */
108
+ o(this, n);
109
+ b(this, "state", this.properties({
110
+ type: {
111
+ type: ["primary", "info", "success", "warning", "danger"],
112
+ default: "primary",
113
+ observer: (e) => {
114
+ this.updateContainerClasslist();
115
+ }
116
+ },
117
+ closable: {
118
+ type: Boolean,
119
+ default: !1,
120
+ observer: (e) => {
121
+ var h;
122
+ (h = a(this, n)) == null || h.abort(), a(this, d).setAttribute("closable", e ? "icon-cancel" : ""), this.updateContainerClasslist(), e && (l(this, n, new AbortController()), a(this, d).addEventListener("click", a(this, p), {
123
+ signal: a(this, n).signal
124
+ }));
125
+ }
126
+ },
127
+ "disable-transitions": {
128
+ type: Boolean,
129
+ default: !1,
130
+ observer: (e) => {
131
+ }
132
+ },
133
+ color: {
134
+ type: String,
135
+ default: "",
136
+ observer: (e) => {
137
+ if (e && CSS.supports("background", e) ? a(this, i).style.background = e : a(this, i).style.background = "", !CSS.supports("background", e))
138
+ return console.warn(
139
+ `[EaTag] The color value ${e} is not supported.`
140
+ );
141
+ }
142
+ },
143
+ size: {
144
+ type: w,
145
+ default: "default",
146
+ observer: (e) => {
147
+ this.updateContainerClasslist();
148
+ }
149
+ },
150
+ effect: {
151
+ type: ["dark", "light", "plain"],
152
+ default: "light",
153
+ observer: (e) => {
154
+ this.updateContainerClasslist();
155
+ }
156
+ },
157
+ round: {
158
+ type: Boolean,
159
+ default: !1,
160
+ observer: (e) => {
161
+ this.updateContainerClasslist();
162
+ }
163
+ }
164
+ }));
165
+ /**
166
+ * 标签移除事件
167
+ */
168
+ o(this, p, async () => {
169
+ this["disable-transitions"] || (a(this, i).classList.add("before-close"), await E.EaElement.addAsyncEventListener(
170
+ a(this, i),
171
+ "transitionend"
172
+ )), this.dispatchEvent(new S({ text: this.textContent })), this.remove();
173
+ });
174
+ this.stylesheet = k, this.$render();
175
+ }
176
+ static get observedAttributes() {
177
+ return [
178
+ ...super.observedAttributes,
179
+ "type",
180
+ "closable",
181
+ "disable-transitions",
182
+ "color",
183
+ "size",
184
+ "effect",
185
+ "round"
186
+ ];
187
+ }
188
+ /**
189
+ * 获取 classlist 列表
190
+ * @return {string} 属性值
191
+ */
192
+ updateContainerClasslist() {
193
+ const e = this.computedClasslist(
194
+ "ea-tag",
195
+ {
196
+ ["--" + this.type]: this.type,
197
+ [`--${this.size}-size`]: this.size,
198
+ ["--" + this.effect]: this.effect
199
+ },
200
+ {
201
+ closable: this.closable,
202
+ round: this.round
203
+ }
204
+ );
205
+ return a(this, i).className = e, e;
206
+ }
207
+ $render() {
208
+ this.shadowRoot.innerHTML = `
209
+ <div class='ea-tag' part='container'>
210
+ <slot></slot>
211
+ <ea-icon class="ea-tag__close" part="close-icon" name="xmark"></ea-icon>
212
+ </div>
213
+ `, l(this, i, this.shadowRoot.querySelector(".ea-tag")), l(this, d, this.shadowRoot.querySelector(".ea-tag__close")), this.updateContainerClasslist();
214
+ }
215
+ connectedCallback() {
216
+ super.connectedCallback();
217
+ }
218
+ $beforeUnmounted() {
219
+ var e;
220
+ (e = a(this, n)) == null || e.abort();
221
+ }
222
+ }
223
+ i = new WeakMap(), d = new WeakMap(), n = new WeakMap(), p = new WeakMap();
224
+ window.customElements.get("ea-tag") || window.customElements.define("ea-tag", $);
225
+ export {
226
+ A as EaCheckTag,
227
+ $ as EaTag
228
+ };
@@ -0,0 +1,113 @@
1
+ var y = Object.defineProperty;
2
+ var p = (e) => {
3
+ throw TypeError(e);
4
+ };
5
+ var w = (e, s, t) => s in e ? y(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
6
+ var u = (e, s, t) => w(e, typeof s != "symbol" ? s + "" : s, t), m = (e, s, t) => s.has(e) || p("Cannot " + t);
7
+ var i = (e, s, t) => (m(e, s, "read from private field"), t ? t.call(e) : s.get(e)), o = (e, s, t) => s.has(e) ? p("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), h = (e, s, t, l) => (m(e, s, "write to private field"), l ? l.call(e, t) : s.set(e, t), t);
8
+ import { B as f } from "./Base.js";
9
+ import { s as C } from "../css/ea-text.style.js";
10
+ var a, n, r;
11
+ class g extends f {
12
+ constructor() {
13
+ super();
14
+ /** @type {HTMLElement} */
15
+ o(this, a);
16
+ o(this, n, {
17
+ isOriginalRendered: !1
18
+ });
19
+ o(this, r, new Promise((t) => {
20
+ h(this, n, new Proxy(i(this, n), {
21
+ set: (l, d, c) => (d === "isOriginalRendered" && c && t(!0), Reflect.set(l, d, c))
22
+ }));
23
+ }));
24
+ /**
25
+ * @typedef {Object} State
26
+ * @property {string} title - 标题
27
+ * @property {string} type - 文本类型
28
+ * @property {string} size - 文本大小
29
+ * @property {boolean} truncated - 文本是否截断
30
+ * @property {number} line-clamp - 截断的行数
31
+ * @property {string} tag - 文本标签
32
+ */
33
+ /** @type {State} */
34
+ u(this, "state", this.properties({
35
+ title: {
36
+ type: String,
37
+ default: "",
38
+ observer: (t) => {
39
+ }
40
+ },
41
+ type: {
42
+ type: ["normal", "primary", "success", "warning", "danger", "info"],
43
+ default: "normal",
44
+ observer: async (t) => {
45
+ await i(this, r), this.updateContainerClasslist();
46
+ }
47
+ },
48
+ size: {
49
+ type: ["large", "medium", "small"],
50
+ default: "medium",
51
+ observer: async (t) => {
52
+ await i(this, r), this.updateContainerClasslist();
53
+ }
54
+ },
55
+ truncated: {
56
+ type: Boolean,
57
+ default: !1,
58
+ observer: async (t) => {
59
+ await i(this, r), this.title = this.innerText || "", this.updateContainerClasslist();
60
+ }
61
+ },
62
+ "line-clamp": {
63
+ type: Number,
64
+ default: 0,
65
+ observer: async (t) => {
66
+ await i(this, r), i(this, a).style.setProperty("--ea-text-line-clamp", t), this.title = this.innerText || "", this.updateContainerClasslist();
67
+ }
68
+ },
69
+ tag: {
70
+ type: String,
71
+ default: "span",
72
+ observer: (t) => {
73
+ this.$render(), this.hasAttribute("line-clamp") && i(this, a).style.setProperty(
74
+ "--ea-text-line-clamp",
75
+ this["line-clamp"]
76
+ ), (this.hasAttribute("truncated") || this.hasAttribute("line-clamp")) && (this.title = this.innerText || ""), this.updateContainerClasslist();
77
+ }
78
+ }
79
+ }));
80
+ this.stylesheet = C;
81
+ }
82
+ static get observedAttributes() {
83
+ return ["title", "type", "size", "truncated", "line-clamp", "tag"];
84
+ }
85
+ /**
86
+ * 获取 classlist 列表
87
+ * @return {string} 属性值
88
+ */
89
+ updateContainerClasslist() {
90
+ const t = this.computedClasslist("ea-text", {
91
+ ["--" + this.type]: this.type,
92
+ ["--" + this.size]: this.size,
93
+ "--truncated": this.truncated,
94
+ "--line-clamp": this["line-clamp"] > 0
95
+ });
96
+ return i(this, a).className = t, t;
97
+ }
98
+ $render() {
99
+ this.shadowRoot.innerHTML = `
100
+ <${this.tag} class="ea-text" part="container">
101
+ <slot></slot>
102
+ </${this.tag}>
103
+ `, h(this, a, this.shadowRoot.querySelector(".ea-text")), this.updateContainerClasslist(), i(this, n).isOriginalRendered = !0;
104
+ }
105
+ connectedCallback() {
106
+ super.connectedCallback(), this.$render();
107
+ }
108
+ }
109
+ a = new WeakMap(), n = new WeakMap(), r = new WeakMap();
110
+ window.customElements.get("ea-text") || window.customElements.define("ea-text", g);
111
+ export {
112
+ g as EaText
113
+ };