easy-component-ui 3.0.13 → 3.0.14

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 (168) hide show
  1. package/README.md +162 -162
  2. package/package.json +8 -2
  3. package/dist/assets/icon.css +0 -1
  4. package/dist/components/Base.js +0 -874
  5. package/dist/components/ea-alert.js +0 -213
  6. package/dist/components/ea-avatar.js +0 -164
  7. package/dist/components/ea-backtop.js +0 -136
  8. package/dist/components/ea-badge.js +0 -144
  9. package/dist/components/ea-breadcrumb.js +0 -148
  10. package/dist/components/ea-button.js +0 -266
  11. package/dist/components/ea-calendar.js +0 -10
  12. package/dist/components/ea-calendar2.js +0 -673
  13. package/dist/components/ea-card.js +0 -121
  14. package/dist/components/ea-carousel.js +0 -415
  15. package/dist/components/ea-checkbox.js +0 -446
  16. package/dist/components/ea-collapse.js +0 -313
  17. package/dist/components/ea-color-picker.js +0 -888
  18. package/dist/components/ea-container.js +0 -206
  19. package/dist/components/ea-countdown.js +0 -142
  20. package/dist/components/ea-date-picker.js +0 -649
  21. package/dist/components/ea-descriptions.js +0 -474
  22. package/dist/components/ea-dialog.js +0 -249
  23. package/dist/components/ea-drawer.js +0 -216
  24. package/dist/components/ea-dropdown.js +0 -228
  25. package/dist/components/ea-empty.js +0 -93
  26. package/dist/components/ea-icon.js +0 -158
  27. package/dist/components/ea-image-preview.js +0 -532
  28. package/dist/components/ea-image.js +0 -327
  29. package/dist/components/ea-infinite-scroll.js +0 -109
  30. package/dist/components/ea-input-number.js +0 -367
  31. package/dist/components/ea-input.js +0 -588
  32. package/dist/components/ea-layout.js +0 -132
  33. package/dist/components/ea-link.js +0 -101
  34. package/dist/components/ea-menu.js +0 -433
  35. package/dist/components/ea-message-box.js +0 -624
  36. package/dist/components/ea-message.js +0 -314
  37. package/dist/components/ea-notification.js +0 -331
  38. package/dist/components/ea-overlay.js +0 -168
  39. package/dist/components/ea-page-header.js +0 -108
  40. package/dist/components/ea-pagination.js +0 -481
  41. package/dist/components/ea-popconfirm.js +0 -275
  42. package/dist/components/ea-popover.js +0 -147
  43. package/dist/components/ea-popper.js +0 -203
  44. package/dist/components/ea-progress.js +0 -286
  45. package/dist/components/ea-radio.js +0 -364
  46. package/dist/components/ea-rate.js +0 -241
  47. package/dist/components/ea-result.js +0 -100
  48. package/dist/components/ea-scrollbar.js +0 -235
  49. package/dist/components/ea-segmented.js +0 -215
  50. package/dist/components/ea-select.js +0 -609
  51. package/dist/components/ea-skeleton.js +0 -263
  52. package/dist/components/ea-slider.js +0 -430
  53. package/dist/components/ea-space.js +0 -123
  54. package/dist/components/ea-splitter.js +0 -233
  55. package/dist/components/ea-statistic.js +0 -74
  56. package/dist/components/ea-steps.js +0 -346
  57. package/dist/components/ea-switch.js +0 -271
  58. package/dist/components/ea-table.js +0 -1135
  59. package/dist/components/ea-tabs.js +0 -501
  60. package/dist/components/ea-tag.js +0 -228
  61. package/dist/components/ea-text.js +0 -113
  62. package/dist/components/ea-time-picker.js +0 -510
  63. package/dist/components/ea-timeline.js +0 -185
  64. package/dist/components/ea-tooltip.js +0 -161
  65. package/dist/components/ea-tour.js +0 -544
  66. package/dist/components/ea-transfer.js +0 -949
  67. package/dist/components/ea-tree.js +0 -1125
  68. package/dist/components/index.js +0 -60
  69. package/dist/core/FormBase.js +0 -238
  70. package/dist/css/ea-alert.style.js +0 -4
  71. package/dist/css/ea-aside.style.js +0 -4
  72. package/dist/css/ea-avatar.style.js +0 -4
  73. package/dist/css/ea-backtop.style.js +0 -4
  74. package/dist/css/ea-badge.style.js +0 -4
  75. package/dist/css/ea-breadcrumb-item.style.js +0 -4
  76. package/dist/css/ea-breadcrumb.style.js +0 -4
  77. package/dist/css/ea-button-group.style.js +0 -4
  78. package/dist/css/ea-button.style.js +0 -4
  79. package/dist/css/ea-calendar.style.js +0 -4
  80. package/dist/css/ea-card.style.js +0 -4
  81. package/dist/css/ea-carousel-item.style.js +0 -4
  82. package/dist/css/ea-carousel.style.js +0 -4
  83. package/dist/css/ea-check-tag.style.js +0 -4
  84. package/dist/css/ea-checkbox-group.style.js +0 -4
  85. package/dist/css/ea-checkbox.style.js +0 -4
  86. package/dist/css/ea-col.style.js +0 -4
  87. package/dist/css/ea-collapse-item.style.js +0 -4
  88. package/dist/css/ea-collapse.style.js +0 -4
  89. package/dist/css/ea-color-picker-panel.style.js +0 -4
  90. package/dist/css/ea-color-picker.style.js +0 -4
  91. package/dist/css/ea-container.style.js +0 -4
  92. package/dist/css/ea-date-picker.style.js +0 -4
  93. package/dist/css/ea-descriptions-item.style.js +0 -4
  94. package/dist/css/ea-descriptions.style.js +0 -4
  95. package/dist/css/ea-dialog.style.js +0 -4
  96. package/dist/css/ea-drawer.style.js +0 -4
  97. package/dist/css/ea-dropdown-item.style.js +0 -4
  98. package/dist/css/ea-dropdown-menu.style.js +0 -4
  99. package/dist/css/ea-dropdown.style.js +0 -4
  100. package/dist/css/ea-empty.style.js +0 -4
  101. package/dist/css/ea-footer.style.js +0 -4
  102. package/dist/css/ea-header.style.js +0 -4
  103. package/dist/css/ea-icon.style.js +0 -4
  104. package/dist/css/ea-image-preview.style.js +0 -4
  105. package/dist/css/ea-image.style.js +0 -4
  106. package/dist/css/ea-infinite-scroll.style.js +0 -4
  107. package/dist/css/ea-input-number.style.js +0 -4
  108. package/dist/css/ea-input.style.js +0 -4
  109. package/dist/css/ea-link.style.js +0 -4
  110. package/dist/css/ea-main.style.js +0 -4
  111. package/dist/css/ea-menu-item-group.style.js +0 -4
  112. package/dist/css/ea-menu-item.style.js +0 -4
  113. package/dist/css/ea-menu.style.js +0 -4
  114. package/dist/css/ea-message-box.style.js +0 -4
  115. package/dist/css/ea-message.style.js +0 -4
  116. package/dist/css/ea-notification.style.js +0 -4
  117. package/dist/css/ea-option-gropu.style.js +0 -4
  118. package/dist/css/ea-option.style.js +0 -4
  119. package/dist/css/ea-overlay.style.js +0 -4
  120. package/dist/css/ea-page-header.style.js +0 -4
  121. package/dist/css/ea-pagination.style.js +0 -4
  122. package/dist/css/ea-popconfirm.style.js +0 -4
  123. package/dist/css/ea-popover.style.js +0 -4
  124. package/dist/css/ea-popper.style.js +0 -4
  125. package/dist/css/ea-progress.style.js +0 -4
  126. package/dist/css/ea-radio-group.style.js +0 -4
  127. package/dist/css/ea-radio.style.js +0 -4
  128. package/dist/css/ea-rate.style.js +0 -4
  129. package/dist/css/ea-result.style.js +0 -4
  130. package/dist/css/ea-row.style.js +0 -4
  131. package/dist/css/ea-scrollbar.style.js +0 -4
  132. package/dist/css/ea-segmented.style.js +0 -4
  133. package/dist/css/ea-select.style.js +0 -4
  134. package/dist/css/ea-skeleton-item.style.js +0 -4
  135. package/dist/css/ea-skeleton.style.js +0 -4
  136. package/dist/css/ea-slider.style.js +0 -4
  137. package/dist/css/ea-space.style.js +0 -4
  138. package/dist/css/ea-splitter-bar.style.js +0 -4
  139. package/dist/css/ea-splitter-panel.style.js +0 -4
  140. package/dist/css/ea-splitter.style.js +0 -4
  141. package/dist/css/ea-statistic.style.js +0 -4
  142. package/dist/css/ea-step.style.js +0 -4
  143. package/dist/css/ea-steps.style.js +0 -4
  144. package/dist/css/ea-sub-menu.style.js +0 -4
  145. package/dist/css/ea-switch.style.js +0 -4
  146. package/dist/css/ea-tab-panel.style.js +0 -4
  147. package/dist/css/ea-tab.style.js +0 -4
  148. package/dist/css/ea-table-column.style.js +0 -4
  149. package/dist/css/ea-table.style.js +0 -4
  150. package/dist/css/ea-tabs.style.js +0 -4
  151. package/dist/css/ea-tag.style.js +0 -4
  152. package/dist/css/ea-text.style.js +0 -4
  153. package/dist/css/ea-time-picker.style.js +0 -4
  154. package/dist/css/ea-timeline-item.style.js +0 -4
  155. package/dist/css/ea-timeline.style.js +0 -4
  156. package/dist/css/ea-tooltip.style.js +0 -4
  157. package/dist/css/ea-tour-step.style.js +0 -4
  158. package/dist/css/ea-tour.style.js +0 -4
  159. package/dist/css/ea-transfer.style.js +0 -5
  160. package/dist/css/ea-tree.style.js +0 -6
  161. package/dist/css/ea-ui-component.style.js +0 -4
  162. package/dist/favicon.ico +0 -0
  163. package/dist/utils/Color.js +0 -439
  164. package/dist/utils/I18nManager.js +0 -218
  165. package/dist/utils/Utils.js +0 -65
  166. package/dist/utils/Variables.js +0 -12
  167. package/dist/utils/parseTime.js +0 -73
  168. package/dist/utils/timeout.js +0 -9
@@ -1,168 +0,0 @@
1
- var b = Object.defineProperty;
2
- var v = (e) => {
3
- throw TypeError(e);
4
- };
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
- import { s as k } from "../css/ea-overlay.style.js";
10
- import { t as g } from "../utils/timeout.js";
11
- var a, u, c, i, l, m, f;
12
- class E extends w {
13
- constructor() {
14
- super();
15
- /** @type {HTMLElement} */
16
- r(this, a);
17
- /** @type {HTMLElement} */
18
- r(this, u);
19
- /** @type {HTMLElement} */
20
- r(this, c);
21
- /** @type {AbortController} */
22
- r(this, i);
23
- p(this, "state", this.properties({
24
- status: {
25
- type: Boolean,
26
- default: !1,
27
- observer: (t) => {
28
- t ? (o(this, a).className = this.updateContainerClasslist(), o(this, l).call(this, "open"), requestAnimationFrame(() => {
29
- o(this, a).classList.add("ea-overlay--is-show"), o(this, a).addEventListener(
30
- "transitionend",
31
- () => {
32
- o(this, l).call(this, "opened");
33
- },
34
- { once: !0 }
35
- );
36
- })) : (o(this, a).classList.add("ea-overlay--before-close"), o(this, l).call(this, "close"), o(this, a).addEventListener(
37
- "transitionend",
38
- () => {
39
- o(this, a).className = this.updateContainerClasslist(), o(this, l).call(this, "closed");
40
- },
41
- { once: !0 }
42
- ));
43
- }
44
- },
45
- modal: {
46
- type: Boolean,
47
- default: !0,
48
- observer: (t) => {
49
- o(this, a).className = this.updateContainerClasslist();
50
- }
51
- },
52
- "before-close": {
53
- type: Boolean,
54
- default: !1,
55
- observer: (t) => {
56
- }
57
- },
58
- "close-on-click-modal": {
59
- type: Boolean,
60
- default: !1,
61
- observer: (t) => {
62
- }
63
- },
64
- ...[
65
- "z-index",
66
- "background-color",
67
- "content-width",
68
- "content-max-width",
69
- "content-height",
70
- "content-left",
71
- "content-top",
72
- "content-translate-x",
73
- "content-translate-y",
74
- "content-transform"
75
- ].reduce((t, n) => (t[n] = {
76
- type: String,
77
- default: "",
78
- observer: (h) => {
79
- this.style.setProperty(`--ea-overlay-${n}`, h);
80
- }
81
- }, t), {})
82
- }));
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) => {
92
- this.emit(t, {
93
- detail: n,
94
- bubbles: !0,
95
- composed: !0
96
- });
97
- });
98
- r(this, m, () => this.status = !1);
99
- r(this, f, (t) => {
100
- [...this.children].find(
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));
103
- });
104
- this.stylesheet = k, this.$render(), document.activeElement.blur(), g(() => {
105
- this.focus();
106
- }, 0);
107
- }
108
- static get observedAttributes() {
109
- return [
110
- "status",
111
- "modal",
112
- // "before-close",
113
- "close-on-click-modal",
114
- "z-index",
115
- "background-color",
116
- "content-width",
117
- "content-max-width",
118
- "content-height",
119
- "content-left",
120
- "content-top",
121
- "content-translate-x",
122
- "content-translate-y",
123
- "content-transform"
124
- ];
125
- }
126
- /**
127
- * 获取 classlist 列表
128
- * @return {string} 属性值
129
- */
130
- updateContainerClasslist() {
131
- return this.computedClasslist("ea-overlay", {
132
- "--open": this.status,
133
- "--modal": !this.modal
134
- });
135
- }
136
- show() {
137
- this.status = !0;
138
- }
139
- hide() {
140
- this.status = !1;
141
- }
142
- $render() {
143
- this.shadowRoot.innerHTML = `
144
- <div class='ea-overlay' part='container'>
145
- <div class='ea-overlay__mask' part='mask'></div>
146
- <div class='ea-overlay__content' part='content'>
147
- <slot></slot>
148
- </div>
149
- </div>
150
- `, d(this, a, this.shadowRoot.querySelector(".ea-overlay")), d(this, u, this.shadowRoot.querySelector(".ea-overlay__mask")), d(this, c, this.shadowRoot.querySelector(
151
- ".ea-overlay__content"
152
- ));
153
- }
154
- connectedCallback() {
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
158
- });
159
- }
160
- $beforeUnmounted() {
161
- o(this, i).abort();
162
- }
163
- }
164
- a = new WeakMap(), u = new WeakMap(), c = new WeakMap(), i = new WeakMap(), l = new WeakMap(), m = new WeakMap(), f = new WeakMap();
165
- window.customElements.get("ea-overlay") || window.customElements.define("ea-overlay", E);
166
- export {
167
- E as EaOverlay
168
- };
@@ -1,108 +0,0 @@
1
- var m = Object.defineProperty;
2
- var b = (t) => {
3
- throw TypeError(t);
4
- };
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
- 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
- import { B as v } from "./Base.js";
9
- import { s as w } from "../css/ea-page-header.style.js";
10
- var c, l, d, h, r, p;
11
- class k extends v {
12
- constructor() {
13
- super();
14
- /** @type {HTMLElement} */
15
- s(this, c);
16
- /** @type {HTMLSlotElement} */
17
- s(this, l);
18
- /** @type {HTMLSlotElement} */
19
- s(this, d);
20
- /** @type {HTMLSlotElement} */
21
- s(this, h);
22
- /** @type {AbortController} */
23
- s(this, r, new AbortController());
24
- g(this, "state", this.properties({
25
- icon: {
26
- type: String,
27
- default: "",
28
- observer: (e) => {
29
- const i = o(this, l).querySelector("ea-icon");
30
- i && i.setAttribute("name", e);
31
- }
32
- },
33
- title: {
34
- type: String,
35
- default: "",
36
- observer: (e) => {
37
- o(this, d).textContent = e;
38
- }
39
- },
40
- content: {
41
- type: String,
42
- default: "",
43
- observer: (e) => {
44
- o(this, h).textContent = e;
45
- }
46
- }
47
- }));
48
- /**
49
- * 点击返回按钮时,派发 back 事件
50
- */
51
- s(this, p, () => {
52
- this.emit("back");
53
- });
54
- this.stylesheet = w, this.$render();
55
- }
56
- static get observedAttributes() {
57
- return [...super.observedAttributes, "icon", "title", "content"];
58
- }
59
- $render() {
60
- this.shadowRoot.innerHTML = `
61
- <div class='ea-page-header' part='container'>
62
- <section class="ea-page-header__breadcrumb" part="breadcrumb">
63
- <slot name="breadcrumb"></slot>
64
- </section>
65
- <section class="ea-page-header__wrapper" part="header-wrapper">
66
- <div class="ea-page-header__back" part="back">
67
- <span class="ea-page-header__icon" part="icon">
68
- <slot name="icon">
69
- <ea-icon name="angle-left" part="back-icon"></ea-icon>
70
- </slot>
71
- </span>
72
- <span class="ea-page-header__title" part="title">
73
- <slot name="title">Back</slot>
74
- </span>
75
- </div>
76
- <ea-icon class="ea-page-header__divider" part="divider">|</ea-icon>
77
- <div class="ea-page-header__content" part="content">
78
- <slot name="content"></slot>
79
- </div>
80
- <div class="ea-page-header__extra" part="extra">
81
- <slot name="extra"></slot>
82
- </div>
83
- </section>
84
- <slot></slot>
85
- </div>
86
- `, n(this, c, this.shadowRoot.querySelector(".ea-page-header__back")), n(this, l, this.shadowRoot.querySelector(
87
- ".ea-page-header__icon slot[name='icon']"
88
- )), n(this, d, this.shadowRoot.querySelector(
89
- ".ea-page-header__title slot[name='title']"
90
- )), n(this, h, this.shadowRoot.querySelector(
91
- ".ea-page-header__content slot[name='content']"
92
- ));
93
- }
94
- connectedCallback() {
95
- var e;
96
- super.connectedCallback(), (e = o(this, r)) == null || e.abort(), n(this, r, new AbortController()), o(this, c).addEventListener("click", o(this, p), {
97
- signal: o(this, r).signal
98
- });
99
- }
100
- $beforeUnmounted() {
101
- o(this, r).abort();
102
- }
103
- }
104
- c = new WeakMap(), l = new WeakMap(), d = new WeakMap(), h = new WeakMap(), r = new WeakMap(), p = new WeakMap();
105
- window.customElements.get("ea-page-header") || window.customElements.define("ea-page-header", k);
106
- export {
107
- k as EaPageHeader
108
- };