st-comp 0.0.279 → 0.0.281

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 (229) hide show
  1. package/es/ChartLayout.cjs +1 -1
  2. package/es/ChartLayout.js +13 -14
  3. package/es/CustomFunction.cjs +2 -2
  4. package/es/CustomFunction.js +377 -376
  5. package/es/FactorWarning.cjs +1 -1
  6. package/es/FactorWarning.js +294 -294
  7. package/es/Kline.cjs +1 -1
  8. package/es/Kline.js +19 -19
  9. package/es/KlineBasic.cjs +1 -1
  10. package/es/KlineBasic.js +260 -260
  11. package/es/KlineConfig.cjs +1 -1
  12. package/es/KlineConfig.js +579 -553
  13. package/es/KlineNew.cjs +1 -1
  14. package/es/KlineNew.js +17 -17
  15. package/es/KlinePlus.cjs +2 -2
  16. package/es/KlinePlus.js +23 -24
  17. package/es/MonacoEditor.cjs +1 -1
  18. package/es/MonacoEditor.js +30 -29
  19. package/es/Pagination.cjs +1 -1
  20. package/es/Pagination.js +517 -425
  21. package/es/PasswordPrompt.cjs +1 -1
  22. package/es/PasswordPrompt.js +3 -3
  23. package/es/Table.cjs +1 -1
  24. package/es/Table.js +43 -43
  25. package/es/User.cjs +1 -1
  26. package/es/User.js +898 -866
  27. package/es/VarSelectDialog.cjs +3 -3
  28. package/es/VarSelectDialog.js +110 -109
  29. package/es/VarietyAiHelper.cjs +7 -7
  30. package/es/VarietyAiHelper.js +615 -464
  31. package/es/VarietyAutoComplete.cjs +1 -1
  32. package/es/VarietyAutoComplete.js +11 -11
  33. package/es/VarietySearch.cjs +18 -18
  34. package/es/VarietySearch.js +3079 -2913
  35. package/es/{VarietySelect-41daac7b.js → VarietySelect-3fc0f0ce.js} +5 -5
  36. package/es/{VarietySelect-d58eee29.cjs → VarietySelect-d2d25a3d.cjs} +1 -1
  37. package/es/VarietyTextCopy.cjs +3 -3
  38. package/es/VarietyTextCopy.js +51 -51
  39. package/es/VirtualTable.cjs +13 -1
  40. package/es/VirtualTable.js +1927 -2259
  41. package/es/_baseClone-f8e5d3ba.cjs +1 -0
  42. package/es/_baseClone-fb6a3947.js +210 -0
  43. package/es/base-d987e5c9.cjs +5 -0
  44. package/es/base-dd156b8e.js +790 -0
  45. package/es/{castArray-7741a212.js → castArray-18eb6a41.js} +1 -1
  46. package/es/{castArray-35947698.cjs → castArray-d9ffe84a.cjs} +1 -1
  47. package/es/clamp-17c4d8aa.cjs +1 -0
  48. package/es/clamp-c7512966.js +10 -0
  49. package/es/config-provider-06d8207f.js +86 -0
  50. package/es/config-provider-bb61bd3e.cjs +1 -0
  51. package/es/debounce-0a98a9c6.js +57 -0
  52. package/es/debounce-37b17615.cjs +1 -0
  53. package/es/dropdown-8fa21bfd.cjs +1 -0
  54. package/es/dropdown-bcf8d198.js +178 -0
  55. package/es/el-autocomplete-13b9e372.cjs +1 -0
  56. package/es/el-autocomplete-419bfbcf.js +434 -0
  57. package/es/el-button-ee9fe159.js +343 -0
  58. package/es/el-button-fac5e058.cjs +1 -0
  59. package/es/el-checkbox-6cf1a71c.cjs +1 -0
  60. package/es/el-checkbox-b5ac7f04.js +566 -0
  61. package/es/el-dialog-060b3735.js +252 -0
  62. package/es/el-dialog-54aebacd.cjs +1 -0
  63. package/es/el-divider-3f0320be.cjs +1 -0
  64. package/es/el-divider-c5d72961.js +51 -0
  65. package/es/el-empty-552baf04.js +159 -0
  66. package/es/el-empty-58bc2a10.cjs +1 -0
  67. package/es/el-form-item-2be6b683.js +1265 -0
  68. package/es/el-form-item-758dfefa.cjs +12 -0
  69. package/es/el-input-7fe53030.cjs +1 -0
  70. package/es/el-input-d23f5442.js +761 -0
  71. package/es/el-input-number-484fb184.js +390 -0
  72. package/es/el-input-number-f0f4eedb.cjs +1 -0
  73. package/es/el-loading-9d3e405c.js +190 -0
  74. package/es/el-loading-fafaaa7b.cjs +1 -0
  75. package/es/el-menu-item-0ac22681.js +824 -0
  76. package/es/el-menu-item-c91ae430.cjs +1 -0
  77. package/es/el-message-box-568a0aa6.js +481 -0
  78. package/es/el-message-box-ceacb54e.cjs +1 -0
  79. package/es/el-overlay-9f36e73c.cjs +1 -0
  80. package/es/el-overlay-cb5c85aa.js +444 -0
  81. package/es/el-popconfirm-4a8cd35c.cjs +1 -0
  82. package/es/el-popconfirm-6f8e65c8.js +190 -0
  83. package/es/el-popper-0454c8e8.js +2235 -0
  84. package/es/el-popper-acd0ff35.cjs +1 -0
  85. package/es/{el-scrollbar-323542e7.js → el-scrollbar-0a42c1d0.js} +4 -9
  86. package/es/{el-scrollbar-bc3f790d.cjs → el-scrollbar-225c6c9e.cjs} +1 -1
  87. package/es/el-segmented-64dc7258.js +168 -0
  88. package/es/el-segmented-eb3c8e65.cjs +1 -0
  89. package/es/el-select-a573c78b.js +1535 -0
  90. package/es/el-select-c317294a.cjs +1 -0
  91. package/es/el-table-column-1c443963.js +3651 -0
  92. package/es/el-table-column-f555115d.cjs +14 -0
  93. package/es/el-tag-2d8a3fe7.js +77 -0
  94. package/es/el-tag-dca1292c.cjs +1 -0
  95. package/es/el-text-649c986a.cjs +1 -0
  96. package/es/el-text-761e6717.js +84 -0
  97. package/es/index-11181b5f.cjs +1 -0
  98. package/es/index-21a3dc89.cjs +1 -0
  99. package/es/index-33e039e3.cjs +1 -0
  100. package/es/index-3806160e.js +710 -0
  101. package/es/{index-a9246d17.cjs → index-4614e8e9.cjs} +109 -109
  102. package/es/{index-44a382a5.js → index-53beef02.js} +12 -12
  103. package/es/index-5cada1ed.cjs +1 -0
  104. package/es/index-6a36e1fc.cjs +1 -0
  105. package/es/{index-eb96e074.js → index-6a52dc7c.js} +235 -236
  106. package/es/index-71ba4c28.cjs +1 -0
  107. package/es/index-78dab605.js +141 -0
  108. package/es/index-798fec2d.cjs +1 -0
  109. package/es/index-9573f74b.js +372 -0
  110. package/es/index-a181f161.js +429 -0
  111. package/es/{index-a33b2fb8.js → index-ab0ad219.js} +5090 -5090
  112. package/es/index-beb5cb7d.cjs +1 -0
  113. package/es/index-c09fc6f5.js +131 -0
  114. package/es/index-ceae4c47.cjs +1 -0
  115. package/es/index-d372e68f.cjs +5 -0
  116. package/es/index-d9379af4.js +413 -0
  117. package/es/index-dddacf80.js +47 -0
  118. package/es/index-de9ad85c.js +12 -0
  119. package/es/index-e2e58ea9.js +468 -0
  120. package/es/index-f5474dcc.cjs +3 -0
  121. package/es/{python-a3db9620.cjs → python-60e79979.cjs} +1 -1
  122. package/es/{python-8a1664e6.js → python-673bf8b8.js} +32 -31
  123. package/es/{raf-8249652f.cjs → raf-735cc598.cjs} +1 -1
  124. package/es/{raf-80ef0c0a.js → raf-b4fd1e12.js} +1 -1
  125. package/es/scroll-07bade1e.cjs +1 -0
  126. package/es/scroll-70271cb1.js +35 -0
  127. package/es/style.css +1 -1
  128. package/es/toNumber-b47ceb68.cjs +1 -0
  129. package/es/toNumber-f077c66a.js +31 -0
  130. package/es/use-form-item-76516e50.cjs +2 -0
  131. package/es/use-form-item-784142b4.js +422 -0
  132. package/es/use-global-config-7ff9a1c2.cjs +1 -0
  133. package/es/use-global-config-9a4ccf33.js +71 -0
  134. package/es/validator-1926345b.cjs +1 -0
  135. package/es/{validator-c60a8956.js → validator-a66ec4f8.js} +1 -1
  136. package/es/vnode-6f7b84f0.cjs +1 -0
  137. package/es/vnode-8ee9bf4e.js +12 -0
  138. package/es/{zh-cn-b59a0910.js → zh-cn-51c2e528.js} +36 -33
  139. package/es/zh-cn-ad12d9f5.cjs +1 -0
  140. package/lib/bundle.js +1 -1
  141. package/lib/bundle.umd.cjs +265 -246
  142. package/lib/{index-62fa175a.js → index-7282d3be.js} +52335 -50156
  143. package/lib/{python-4a48fa39.js → python-418be57d.js} +1 -1
  144. package/lib/style.css +1 -1
  145. package/package.json +1 -1
  146. package/es/_initCloneObject-5e73c9c8.js +0 -81
  147. package/es/_initCloneObject-a5832933.cjs +0 -1
  148. package/es/base-a5af3db3.js +0 -288
  149. package/es/base-ef747d02.cjs +0 -5
  150. package/es/config-provider-06ea6b42.cjs +0 -1
  151. package/es/config-provider-88b637a8.js +0 -59
  152. package/es/dayjs.min-2c20abe6.cjs +0 -1
  153. package/es/dayjs.min-8313b006.js +0 -299
  154. package/es/debounce-62f5b6e8.cjs +0 -1
  155. package/es/debounce-8d53f4dd.js +0 -83
  156. package/es/dropdown-4ce4c3e2.cjs +0 -1
  157. package/es/dropdown-72fbc15d.js +0 -178
  158. package/es/el-autocomplete-6cafcdf1.js +0 -329
  159. package/es/el-autocomplete-e0857c5b.cjs +0 -1
  160. package/es/el-button-613e0bb2.cjs +0 -1
  161. package/es/el-button-94d3de38.js +0 -272
  162. package/es/el-checkbox-6d4cb393.js +0 -459
  163. package/es/el-checkbox-e90762df.cjs +0 -1
  164. package/es/el-dialog-02942e22.cjs +0 -1
  165. package/es/el-dialog-5e30161f.js +0 -276
  166. package/es/el-divider-4713d74c.cjs +0 -1
  167. package/es/el-divider-4e059794.js +0 -45
  168. package/es/el-empty-1697ded8.cjs +0 -1
  169. package/es/el-empty-33cb66f1.js +0 -183
  170. package/es/el-form-item-44f060d8.cjs +0 -12
  171. package/es/el-form-item-9e8969ea.js +0 -1269
  172. package/es/el-input-342b2def.js +0 -531
  173. package/es/el-input-9a9a7f7f.cjs +0 -1
  174. package/es/el-input-number-65c847d6.cjs +0 -1
  175. package/es/el-input-number-c22b803a.js +0 -311
  176. package/es/el-loading-8179b497.cjs +0 -1
  177. package/es/el-loading-bcc51e3d.js +0 -203
  178. package/es/el-menu-item-339baf6d.js +0 -768
  179. package/es/el-menu-item-83186444.cjs +0 -1
  180. package/es/el-message-box-035b699c.js +0 -489
  181. package/es/el-message-box-c62d3217.cjs +0 -1
  182. package/es/el-overlay-3e17604b.js +0 -324
  183. package/es/el-overlay-8f1da9e8.cjs +0 -1
  184. package/es/el-popconfirm-4e32ec1b.cjs +0 -1
  185. package/es/el-popconfirm-f8a86e2c.js +0 -162
  186. package/es/el-popper-a4f3ae4d.cjs +0 -1
  187. package/es/el-popper-fbd0dcea.js +0 -2094
  188. package/es/el-segmented-56bd58a8.js +0 -142
  189. package/es/el-segmented-833ac177.cjs +0 -1
  190. package/es/el-select-44fa547d.js +0 -1256
  191. package/es/el-select-70806166.cjs +0 -1
  192. package/es/el-table-column-3e2cdfca.cjs +0 -14
  193. package/es/el-table-column-b74a857d.js +0 -3432
  194. package/es/el-tag-66c83156.js +0 -117
  195. package/es/el-tag-9c2f329f.cjs +0 -1
  196. package/es/el-text-034bd3f4.js +0 -67
  197. package/es/el-text-6b2374bb.cjs +0 -1
  198. package/es/index-00f6ca75.cjs +0 -1
  199. package/es/index-185792a7.cjs +0 -1
  200. package/es/index-1e2a38ab.js +0 -113
  201. package/es/index-2e331d74.js +0 -10
  202. package/es/index-3153c1db.cjs +0 -1
  203. package/es/index-5216d5f5.js +0 -406
  204. package/es/index-5c0dd943.cjs +0 -1
  205. package/es/index-657047bb.js +0 -513
  206. package/es/index-870b6c9d.cjs +0 -1
  207. package/es/index-8c2d7e05.js +0 -368
  208. package/es/index-960806da.js +0 -314
  209. package/es/index-9780a537.cjs +0 -1
  210. package/es/index-9d16cea8.cjs +0 -1
  211. package/es/index-ac8dc53d.cjs +0 -1
  212. package/es/index-bb833443.cjs +0 -1
  213. package/es/index-c5f2d372.js +0 -326
  214. package/es/index-c6584658.js +0 -163
  215. package/es/index-d77a7336.js +0 -204
  216. package/es/index-eea0bcb3.cjs +0 -1
  217. package/es/index-f034b910.js +0 -60
  218. package/es/index-f1c702f6.cjs +0 -1
  219. package/es/index-f58b2920.cjs +0 -1
  220. package/es/scroll-679bd6bf.js +0 -35
  221. package/es/scroll-b108dabd.cjs +0 -1
  222. package/es/use-form-common-props-ac666630.cjs +0 -1
  223. package/es/use-form-common-props-ed72e914.js +0 -364
  224. package/es/use-global-config-23472471.cjs +0 -1
  225. package/es/use-global-config-ee406d58.js +0 -72
  226. package/es/validator-366dbf39.cjs +0 -1
  227. package/es/vnode-5ddb7ed1.js +0 -14
  228. package/es/vnode-b906ae6d.cjs +0 -1
  229. package/es/zh-cn-c21d12d8.cjs +0 -1
@@ -0,0 +1,343 @@
1
+ import { b as O, c as G, u as I, w as R, n as q } from "./base-dd156b8e.js";
2
+ import { l as H, E as T } from "./index-6a52dc7c.js";
3
+ import { h as J, i as P, d as L, e as Q, g as K } from "./use-form-item-784142b4.js";
4
+ import { u as W } from "./index-de9ad85c.js";
5
+ import { a as X } from "./use-global-config-9a4ccf33.js";
6
+ import { computed as i, inject as Y, ref as Z, useSlots as ee, Text as te, defineComponent as j, openBlock as f, createBlock as k, resolveDynamicComponent as V, mergeProps as oe, unref as d, withCtx as N, createElementBlock as w, Fragment as ae, renderSlot as h, normalizeClass as z, createCommentVNode as D, provide as ne, reactive as le, toRef as F } from "vue";
7
+ import { T as re } from "./index-3806160e.js";
8
+ const se = [
9
+ "default",
10
+ "primary",
11
+ "success",
12
+ "warning",
13
+ "info",
14
+ "danger",
15
+ "text",
16
+ ""
17
+ ], ie = [
18
+ "button",
19
+ "submit",
20
+ "reset"
21
+ ], $ = O({
22
+ /**
23
+ * @description button size
24
+ */
25
+ size: J,
26
+ /**
27
+ * @description disable the button
28
+ */
29
+ disabled: {
30
+ type: Boolean,
31
+ default: void 0
32
+ },
33
+ /**
34
+ * @description button type
35
+ */
36
+ type: {
37
+ type: String,
38
+ values: se,
39
+ default: ""
40
+ },
41
+ /**
42
+ * @description icon component
43
+ */
44
+ icon: { type: P },
45
+ /**
46
+ * @description native button type
47
+ */
48
+ nativeType: {
49
+ type: String,
50
+ values: ie,
51
+ default: "button"
52
+ },
53
+ /**
54
+ * @description determine whether it's loading
55
+ */
56
+ loading: Boolean,
57
+ /**
58
+ * @description customize loading icon component
59
+ */
60
+ loadingIcon: {
61
+ type: P,
62
+ default: () => H
63
+ },
64
+ /**
65
+ * @description determine whether it's a plain button
66
+ */
67
+ plain: {
68
+ type: Boolean,
69
+ default: void 0
70
+ },
71
+ /**
72
+ * @description determine whether it's a text button
73
+ */
74
+ text: {
75
+ type: Boolean,
76
+ default: void 0
77
+ },
78
+ /**
79
+ * @description determine whether it's a link button
80
+ */
81
+ link: Boolean,
82
+ /**
83
+ * @description determine whether the text button background color is always on
84
+ */
85
+ bg: Boolean,
86
+ /**
87
+ * @description native button autofocus
88
+ */
89
+ autofocus: Boolean,
90
+ /**
91
+ * @description determine whether it's a round button
92
+ */
93
+ round: {
94
+ type: Boolean,
95
+ default: void 0
96
+ },
97
+ /**
98
+ * @description determine whether it's a circle button
99
+ */
100
+ circle: Boolean,
101
+ /**
102
+ * @description determine whether it's a dashed button
103
+ */
104
+ dashed: {
105
+ type: Boolean,
106
+ default: void 0
107
+ },
108
+ /**
109
+ * @description custom button color, automatically calculate `hover` and `active` color
110
+ */
111
+ color: String,
112
+ /**
113
+ * @description dark mode, which automatically converts `color` to dark mode colors
114
+ */
115
+ dark: Boolean,
116
+ /**
117
+ * @description automatically insert a space between two chinese characters
118
+ */
119
+ autoInsertSpace: {
120
+ type: Boolean,
121
+ default: void 0
122
+ },
123
+ /**
124
+ * @description custom element tag
125
+ */
126
+ tag: {
127
+ type: G([String, Object]),
128
+ default: "button"
129
+ }
130
+ }), ce = { click: (e) => e instanceof MouseEvent }, A = Symbol("buttonGroupContextKey"), ue = (e, r) => {
131
+ W({
132
+ from: "type.text",
133
+ replacement: "link",
134
+ version: "3.0.0",
135
+ scope: "props",
136
+ ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
137
+ }, i(() => e.type === "text"));
138
+ const o = Y(A, void 0), a = X("button"), { form: l } = L(), g = Q(i(() => o == null ? void 0 : o.size)), t = K(), c = Z(), s = ee(), b = i(() => {
139
+ var n;
140
+ return e.type || (o == null ? void 0 : o.type) || ((n = a.value) == null ? void 0 : n.type) || "";
141
+ }), m = i(() => {
142
+ var n;
143
+ return e.autoInsertSpace ?? ((n = a.value) == null ? void 0 : n.autoInsertSpace) ?? !1;
144
+ }), B = i(() => {
145
+ var n;
146
+ return e.plain ?? ((n = a.value) == null ? void 0 : n.plain) ?? !1;
147
+ }), _ = i(() => {
148
+ var n;
149
+ return e.round ?? ((n = a.value) == null ? void 0 : n.round) ?? !1;
150
+ }), S = i(() => {
151
+ var n;
152
+ return e.text ?? ((n = a.value) == null ? void 0 : n.text) ?? !1;
153
+ }), x = i(() => {
154
+ var n;
155
+ return e.dashed ?? ((n = a.value) == null ? void 0 : n.dashed) ?? !1;
156
+ }), C = i(() => e.tag === "button" ? {
157
+ ariaDisabled: t.value || e.loading,
158
+ disabled: t.value || e.loading,
159
+ autofocus: e.autofocus,
160
+ type: e.nativeType
161
+ } : {}), p = i(() => {
162
+ var v;
163
+ const n = (v = s.default) == null ? void 0 : v.call(s);
164
+ if (m.value && (n == null ? void 0 : n.length) === 1) {
165
+ const y = n[0];
166
+ if ((y == null ? void 0 : y.type) === te) {
167
+ const M = y.children;
168
+ return /^\p{Unified_Ideograph}{2}$/u.test(M.trim());
169
+ }
170
+ }
171
+ return !1;
172
+ });
173
+ return {
174
+ _disabled: t,
175
+ _size: g,
176
+ _type: b,
177
+ _ref: c,
178
+ _props: C,
179
+ _plain: B,
180
+ _round: _,
181
+ _text: S,
182
+ _dashed: x,
183
+ shouldAddSpace: p,
184
+ handleClick: (n) => {
185
+ if (t.value || e.loading) {
186
+ n.stopPropagation();
187
+ return;
188
+ }
189
+ e.nativeType === "reset" && (l == null || l.resetFields()), r("click", n);
190
+ }
191
+ };
192
+ };
193
+ function u(e, r = 20) {
194
+ return e.mix("#141414", r).toString();
195
+ }
196
+ function de(e) {
197
+ const r = K(), o = I("button");
198
+ return i(() => {
199
+ let a = {}, l = e.color;
200
+ if (l) {
201
+ const g = l.match(/var\((.*?)\)/);
202
+ g && (l = window.getComputedStyle(window.document.documentElement).getPropertyValue(g[1]));
203
+ const t = new re(l), c = e.dark ? t.tint(20).toString() : u(t, 20);
204
+ if (e.plain)
205
+ a = o.cssVarBlock({
206
+ "bg-color": e.dark ? u(t, 90) : t.tint(90).toString(),
207
+ "text-color": l,
208
+ "border-color": e.dark ? u(t, 50) : t.tint(50).toString(),
209
+ "hover-text-color": `var(${o.cssVarName("color-white")})`,
210
+ "hover-bg-color": l,
211
+ "hover-border-color": l,
212
+ "active-bg-color": c,
213
+ "active-text-color": `var(${o.cssVarName("color-white")})`,
214
+ "active-border-color": c
215
+ }), r.value && (a[o.cssVarBlockName("disabled-bg-color")] = e.dark ? u(t, 90) : t.tint(90).toString(), a[o.cssVarBlockName("disabled-text-color")] = e.dark ? u(t, 50) : t.tint(50).toString(), a[o.cssVarBlockName("disabled-border-color")] = e.dark ? u(t, 80) : t.tint(80).toString());
216
+ else if (e.link || e.text) {
217
+ const s = e.dark ? u(t, 30) : t.tint(30).toString();
218
+ if (a = o.cssVarBlock({
219
+ "text-color": l,
220
+ "hover-text-color": s,
221
+ "active-text-color": c
222
+ }), e.link && (a[o.cssVarBlockName("hover-link-text-color")] = s, a[o.cssVarBlockName("active-color")] = c), r.value) {
223
+ const b = e.dark ? u(t, 50) : t.tint(50).toString();
224
+ a[o.cssVarBlockName("disabled-bg-color")] = "transparent", a[o.cssVarBlockName("disabled-text-color")] = b, a[o.cssVarBlockName("disabled-border-color")] = "transparent";
225
+ }
226
+ } else {
227
+ const s = e.dark ? u(t, 30) : t.tint(30).toString(), b = t.isDark() ? `var(${o.cssVarName("color-white")})` : `var(${o.cssVarName("color-black")})`;
228
+ if (a = o.cssVarBlock({
229
+ "bg-color": l,
230
+ "text-color": b,
231
+ "border-color": l,
232
+ "hover-bg-color": s,
233
+ "hover-text-color": b,
234
+ "hover-border-color": s,
235
+ "active-bg-color": c,
236
+ "active-border-color": c
237
+ }), r.value) {
238
+ const m = e.dark ? u(t, 50) : t.tint(50).toString();
239
+ a[o.cssVarBlockName("disabled-bg-color")] = m, a[o.cssVarBlockName("disabled-text-color")] = e.dark ? "rgba(255, 255, 255, 0.5)" : `var(${o.cssVarName("color-white")})`, a[o.cssVarBlockName("disabled-border-color")] = m;
240
+ }
241
+ }
242
+ }
243
+ return a;
244
+ });
245
+ }
246
+ var be = /* @__PURE__ */ j({
247
+ name: "ElButton",
248
+ __name: "button",
249
+ props: $,
250
+ emits: ce,
251
+ setup(e, { expose: r, emit: o }) {
252
+ const a = e, l = o, g = de(a), t = I("button"), { _ref: c, _size: s, _type: b, _disabled: m, _props: B, _plain: _, _round: S, _text: x, _dashed: C, shouldAddSpace: p, handleClick: E } = ue(a, l), n = i(() => [
253
+ t.b(),
254
+ t.m(b.value),
255
+ t.m(s.value),
256
+ t.is("disabled", m.value),
257
+ t.is("loading", a.loading),
258
+ t.is("plain", _.value),
259
+ t.is("round", S.value),
260
+ t.is("circle", a.circle),
261
+ t.is("text", x.value),
262
+ t.is("dashed", C.value),
263
+ t.is("link", a.link),
264
+ t.is("has-bg", a.bg)
265
+ ]);
266
+ return r({
267
+ /** @description button html element */
268
+ ref: c,
269
+ /** @description button size */
270
+ size: s,
271
+ /** @description button type */
272
+ type: b,
273
+ /** @description button disabled */
274
+ disabled: m,
275
+ /** @description whether adding space */
276
+ shouldAddSpace: p
277
+ }), (v, y) => (f(), k(V(e.tag), oe({
278
+ ref_key: "_ref",
279
+ ref: c
280
+ }, d(B), {
281
+ class: n.value,
282
+ style: d(g),
283
+ onClick: d(E)
284
+ }), {
285
+ default: N(() => [e.loading ? (f(), w(ae, { key: 0 }, [v.$slots.loading ? h(v.$slots, "loading", { key: 0 }) : (f(), k(d(T), {
286
+ key: 1,
287
+ class: z(d(t).is("loading"))
288
+ }, {
289
+ default: N(() => [(f(), k(V(e.loadingIcon)))]),
290
+ _: 1
291
+ }, 8, ["class"]))], 64)) : e.icon || v.$slots.icon ? (f(), k(d(T), { key: 1 }, {
292
+ default: N(() => [e.icon ? (f(), k(V(e.icon), { key: 0 })) : h(v.$slots, "icon", { key: 1 })]),
293
+ _: 3
294
+ })) : D("v-if", !0), v.$slots.default ? (f(), w("span", {
295
+ key: 2,
296
+ class: z({ [d(t).em("text", "expand")]: d(p) })
297
+ }, [h(v.$slots, "default")], 2)) : D("v-if", !0)]),
298
+ _: 3
299
+ }, 16, [
300
+ "class",
301
+ "style",
302
+ "onClick"
303
+ ]));
304
+ }
305
+ }), ve = be;
306
+ const fe = {
307
+ /**
308
+ * @description control the size of buttons in this button-group
309
+ */
310
+ size: $.size,
311
+ /**
312
+ * @description control the type of buttons in this button-group
313
+ */
314
+ type: $.type,
315
+ /**
316
+ * @description display direction
317
+ */
318
+ direction: {
319
+ type: G(String),
320
+ values: ["horizontal", "vertical"],
321
+ default: "horizontal"
322
+ }
323
+ };
324
+ var me = /* @__PURE__ */ j({
325
+ name: "ElButtonGroup",
326
+ __name: "button-group",
327
+ props: fe,
328
+ setup(e) {
329
+ const r = e;
330
+ ne(A, le({
331
+ size: F(r, "size"),
332
+ type: F(r, "type")
333
+ }));
334
+ const o = I("button");
335
+ return (a, l) => (f(), w("div", { class: z([d(o).b("group"), d(o).bm("group", r.direction)]) }, [h(a.$slots, "default")], 2));
336
+ }
337
+ }), U = me;
338
+ const Se = R(ve, { ButtonGroup: U });
339
+ q(U);
340
+ export {
341
+ Se as E,
342
+ se as b
343
+ };
@@ -0,0 +1 @@
1
+ "use strict";const b=require("./base-d987e5c9.cjs"),C=require("./index-5cada1ed.cjs"),v=require("./use-form-item-76516e50.cjs"),I=require("./index-f5474dcc.cjs"),E=require("./use-global-config-7ff9a1c2.cjs"),e=require("vue"),T=require("./index-71ba4c28.cjs"),V=["default","primary","success","warning","info","danger","text",""],P=["button","submit","reset"],x=b.buildProps({size:v.useSizeProp,disabled:{type:Boolean,default:void 0},type:{type:String,values:V,default:""},icon:{type:v.iconPropType},nativeType:{type:String,values:P,default:"button"},loading:Boolean,loadingIcon:{type:v.iconPropType,default:()=>C.loading_default},plain:{type:Boolean,default:void 0},text:{type:Boolean,default:void 0},link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,dashed:{type:Boolean,default:void 0},color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:b.definePropType([String,Object]),default:"button"}}),D={click:t=>t instanceof MouseEvent},z=Symbol("buttonGroupContextKey"),q=(t,c)=>{I.useDeprecated({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},e.computed(()=>t.type==="text"));const n=e.inject(z,void 0),l=E.useGlobalConfig("button"),{form:r}=v.useFormItem(),g=v.useFormSize(e.computed(()=>n==null?void 0:n.size)),o=v.useFormDisabled(),i=e.ref(),s=e.useSlots(),d=e.computed(()=>{var a;return t.type||(n==null?void 0:n.type)||((a=l.value)==null?void 0:a.type)||""}),f=e.computed(()=>{var a;return t.autoInsertSpace??((a=l.value)==null?void 0:a.autoInsertSpace)??!1}),y=e.computed(()=>{var a;return t.plain??((a=l.value)==null?void 0:a.plain)??!1}),B=e.computed(()=>{var a;return t.round??((a=l.value)==null?void 0:a.round)??!1}),h=e.computed(()=>{var a;return t.text??((a=l.value)==null?void 0:a.text)??!1}),_=e.computed(()=>{var a;return t.dashed??((a=l.value)==null?void 0:a.dashed)??!1}),S=e.computed(()=>t.tag==="button"?{ariaDisabled:o.value||t.loading,disabled:o.value||t.loading,autofocus:t.autofocus,type:t.nativeType}:{}),k=e.computed(()=>{var m;const a=(m=s.default)==null?void 0:m.call(s);if(f.value&&(a==null?void 0:a.length)===1){const p=a[0];if((p==null?void 0:p.type)===e.Text){const $=p.children;return/^\p{Unified_Ideograph}{2}$/u.test($.trim())}}return!1});return{_disabled:o,_size:g,_type:d,_ref:i,_props:S,_plain:y,_round:B,_text:h,_dashed:_,shouldAddSpace:k,handleClick:a=>{if(o.value||t.loading){a.stopPropagation();return}t.nativeType==="reset"&&(r==null||r.resetFields()),c("click",a)}}};function u(t,c=20){return t.mix("#141414",c).toString()}function F(t){const c=v.useFormDisabled(),n=b.useNamespace("button");return e.computed(()=>{let l={},r=t.color;if(r){const g=r.match(/var\((.*?)\)/);g&&(r=window.getComputedStyle(window.document.documentElement).getPropertyValue(g[1]));const o=new T.TinyColor(r),i=t.dark?o.tint(20).toString():u(o,20);if(t.plain)l=n.cssVarBlock({"bg-color":t.dark?u(o,90):o.tint(90).toString(),"text-color":r,"border-color":t.dark?u(o,50):o.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":r,"hover-border-color":r,"active-bg-color":i,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":i}),c.value&&(l[n.cssVarBlockName("disabled-bg-color")]=t.dark?u(o,90):o.tint(90).toString(),l[n.cssVarBlockName("disabled-text-color")]=t.dark?u(o,50):o.tint(50).toString(),l[n.cssVarBlockName("disabled-border-color")]=t.dark?u(o,80):o.tint(80).toString());else if(t.link||t.text){const s=t.dark?u(o,30):o.tint(30).toString();if(l=n.cssVarBlock({"text-color":r,"hover-text-color":s,"active-text-color":i}),t.link&&(l[n.cssVarBlockName("hover-link-text-color")]=s,l[n.cssVarBlockName("active-color")]=i),c.value){const d=t.dark?u(o,50):o.tint(50).toString();l[n.cssVarBlockName("disabled-bg-color")]="transparent",l[n.cssVarBlockName("disabled-text-color")]=d,l[n.cssVarBlockName("disabled-border-color")]="transparent"}}else{const s=t.dark?u(o,30):o.tint(30).toString(),d=o.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(l=n.cssVarBlock({"bg-color":r,"text-color":d,"border-color":r,"hover-bg-color":s,"hover-text-color":d,"hover-border-color":s,"active-bg-color":i,"active-border-color":i}),c.value){const f=t.dark?u(o,50):o.tint(50).toString();l[n.cssVarBlockName("disabled-bg-color")]=f,l[n.cssVarBlockName("disabled-text-color")]=t.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,l[n.cssVarBlockName("disabled-border-color")]=f}}}return l})}var G=e.defineComponent({name:"ElButton",__name:"button",props:x,emits:D,setup(t,{expose:c,emit:n}){const l=t,r=n,g=F(l),o=b.useNamespace("button"),{_ref:i,_size:s,_type:d,_disabled:f,_props:y,_plain:B,_round:h,_text:_,_dashed:S,shouldAddSpace:k,handleClick:N}=q(l,r),a=e.computed(()=>[o.b(),o.m(d.value),o.m(s.value),o.is("disabled",f.value),o.is("loading",l.loading),o.is("plain",B.value),o.is("round",h.value),o.is("circle",l.circle),o.is("text",_.value),o.is("dashed",S.value),o.is("link",l.link),o.is("has-bg",l.bg)]);return c({ref:i,size:s,type:d,disabled:f,shouldAddSpace:k}),(m,p)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),e.mergeProps({ref_key:"_ref",ref:i},e.unref(y),{class:a.value,style:e.unref(g),onClick:e.unref(N)}),{default:e.withCtx(()=>[t.loading?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[m.$slots.loading?e.renderSlot(m.$slots,"loading",{key:0}):(e.openBlock(),e.createBlock(e.unref(C.ElIcon),{key:1,class:e.normalizeClass(e.unref(o).is("loading"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.loadingIcon)))]),_:1},8,["class"]))],64)):t.icon||m.$slots.icon?(e.openBlock(),e.createBlock(e.unref(C.ElIcon),{key:1},{default:e.withCtx(()=>[t.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{key:0})):e.renderSlot(m.$slots,"icon",{key:1})]),_:3})):e.createCommentVNode("v-if",!0),m.$slots.default?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass({[e.unref(o).em("text","expand")]:e.unref(k)})},[e.renderSlot(m.$slots,"default")],2)):e.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}}),K=G;const j={size:x.size,type:x.type,direction:{type:b.definePropType(String),values:["horizontal","vertical"],default:"horizontal"}};var A=e.defineComponent({name:"ElButtonGroup",__name:"button-group",props:j,setup(t){const c=t;e.provide(z,e.reactive({size:e.toRef(c,"size"),type:e.toRef(c,"type")}));const n=b.useNamespace("button");return(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(n).b("group"),e.unref(n).bm("group",c.direction)])},[e.renderSlot(l.$slots,"default")],2))}}),w=A;const R=b.withInstall(K,{ButtonGroup:w});b.withNoopInstall(w);exports.ElButton=R;exports.buttonTypes=V;
@@ -0,0 +1 @@
1
+ "use strict";const i=require("./base-d987e5c9.cjs"),C=require("./el-popper-acd0ff35.cjs"),h=require("./use-form-item-76516e50.cjs"),L=require("./index-f5474dcc.cjs"),e=require("vue"),P=require("./index-6a36e1fc.cjs"),E=require("./index-d372e68f.cjs"),B=require("./_baseClone-f8e5d3ba.cjs");function _(t,l,n){var u=-1,a=t.length;l<0&&(l=-l>a?0:a+l),n=n>a?a:n,n<0&&(n+=a),a=l>n?0:n-l>>>0,l>>>=0;for(var r=Array(a);++u<a;)r[u]=t[u+l];return r}function T(t){var l=t==null?0:t.length;return l?t[l-1]:void 0}function $(t,l){return l.length<2?t:E.baseGet(t,_(l,0,-1))}var M=Object.prototype,U=M.hasOwnProperty;function q(t,l){l=E.castPath(l,t);var n=-1,u=l.length;if(!u)return!0;for(;++n<u;){var a=E.toKey(l[n]);if(a==="__proto__"&&!U.call(t,"__proto__")||(a==="constructor"||a==="prototype")&&n<u-1)return!1}var r=$(t,l);return r==null||delete r[E.toKey(T(l))]}function j(t){return i.isPlainObject(t)?void 0:t}var K=1,R=2,H=4,Y=C.flatRest(function(t,l){var n={};if(t==null)return n;var u=!1;l=E.arrayMap(l,function(r){return r=E.castPath(r,t),u||(u=r.length>1),r}),B.copyObject(t,B.getAllKeysIn(t),n),u&&(n=B.baseClone(n,K|R|H,j));for(var a=l.length;a--;)q(n,l[a]);return n});const D=Y,I={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:{type:Boolean,default:void 0},checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:h.useSizeProp,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},ariaLabel:String,...C.useAriaProps(["ariaControls"])},A={[C.UPDATE_MODEL_EVENT]:t=>i.isString(t)||i.isNumber(t)||i.isBoolean(t),change:t=>i.isString(t)||i.isNumber(t)||i.isBoolean(t)},V=Symbol("checkboxGroupContextKey"),J=i.buildProps({modelValue:{type:i.definePropType(Array),default:()=>[]},disabled:{type:Boolean,default:void 0},min:Number,max:Number,size:h.useSizeProp,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},options:{type:i.definePropType(Array)},props:{type:i.definePropType(Object),default:()=>F},type:{type:String,values:["checkbox","button"],default:"checkbox"},...C.useAriaProps(["ariaLabel"])}),Q={[C.UPDATE_MODEL_EVENT]:t=>i.isArray(t),change:t=>i.isArray(t)},F={label:"label",value:"value",disabled:"disabled"},W=({model:t,isChecked:l})=>{const n=e.inject(V,void 0),u=e.inject(h.formContextKey,void 0),a=e.computed(()=>{var s,v;const r=(s=n==null?void 0:n.max)==null?void 0:s.value,d=(v=n==null?void 0:n.min)==null?void 0:v.value;return!i.isUndefined(r)&&t.value.length>=r&&!l.value||!i.isUndefined(d)&&t.value.length<=d&&l.value});return{isDisabled:h.useFormDisabled(e.computed(()=>{var r;return n===void 0?(u==null?void 0:u.disabled)??a.value:((r=n.disabled)==null?void 0:r.value)||a.value})),isLimitDisabled:a}},X=(t,{model:l,isLimitExceeded:n,hasOwnLabel:u,isDisabled:a,isLabeledByFormItem:r})=>{const d=e.inject(V,void 0),{formItem:s}=h.useFormItem(),{emit:v}=e.getCurrentInstance();function m(o){return[!0,t.trueValue,t.trueLabel].includes(o)?t.trueValue??t.trueLabel??!0:t.falseValue??t.falseLabel??!1}function f(o,c){v(C.CHANGE_EVENT,m(o),c)}function b(o){if(n.value)return;const c=o.target;v(C.CHANGE_EVENT,m(c.checked),o)}async function k(o){n.value||!u.value&&!a.value&&r.value&&(o.composedPath().some(c=>c.tagName==="LABEL")||(l.value=m([!1,t.falseValue,t.falseLabel].includes(l.value)),await e.nextTick(),f(l.value,o)))}const x=e.computed(()=>(d==null?void 0:d.validateEvent)||t.validateEvent);return e.watch(()=>t.modelValue,()=>{x.value&&(s==null||s.validate("change").catch(i.NOOP))}),{handleChange:b,onClickRoot:k}},Z=t=>{const l=e.ref(!1),{emit:n,vnode:u}=e.getCurrentInstance(),a=e.inject(V,void 0),r=e.computed(()=>i.isUndefined(a)===!1),d=e.ref(!1),s=e.computed(()=>{const m=u.props??{};return"modelValue"in m||"model-value"in m}),v=e.computed({get(){var m;return r.value?(m=a==null?void 0:a.modelValue)==null?void 0:m.value:s.value?t.modelValue:l.value},set(m){var f,b;r.value&&i.isArray(m)?(d.value=((f=a==null?void 0:a.max)==null?void 0:f.value)!==void 0&&m.length>(a==null?void 0:a.max.value)&&m.length>v.value.length,d.value===!1&&((b=a==null?void 0:a.changeEvent)==null||b.call(a,m))):(n(C.UPDATE_MODEL_EVENT,m),l.value=m)}});return{model:v,isGroup:r,isLimitExceeded:d}},G=(t,l,{model:n})=>{const u=e.inject(V,void 0),a=e.ref(!1),r=e.computed(()=>i.isPropAbsent(t.value)?t.label:t.value),d=e.computed(()=>{const s=n.value;return i.isBoolean(s)?s:i.isArray(s)?i.isObject(r.value)?s.map(e.toRaw).some(v=>P.isEqual(v,r.value)):s.map(e.toRaw).includes(r.value):s!=null?s===t.trueValue||s===t.trueLabel:!!s});return{checkboxButtonSize:h.useFormSize(e.computed(()=>{var s;return(s=u==null?void 0:u.size)==null?void 0:s.value}),{prop:!0}),isChecked:d,isFocused:a,checkboxSize:h.useFormSize(e.computed(()=>{var s;return(s=u==null?void 0:u.size)==null?void 0:s.value})),hasOwnLabel:e.computed(()=>!!l.default||!i.isPropAbsent(r.value)),actualValue:r}},O=(t,l)=>{const{formItem:n}=h.useFormItem(),{model:u,isGroup:a,isLimitExceeded:r}=Z(t),{isFocused:d,isChecked:s,checkboxButtonSize:v,checkboxSize:m,hasOwnLabel:f,actualValue:b}=G(t,l,{model:u}),{isDisabled:k}=W({model:u,isChecked:s}),{inputId:x,isLabeledByFormItem:o}=h.useFormItemInputId(t,{formItemContext:n,disableIdGeneration:f,disableIdManagement:a}),{handleChange:c,onClickRoot:p}=X(t,{model:u,isLimitExceeded:r,hasOwnLabel:f,isDisabled:k,isLabeledByFormItem:o});return(()=>{function g(){i.isArray(u.value)&&!u.value.includes(b.value)?u.value.push(b.value):u.value=t.trueValue??t.trueLabel??!0}t.checked&&g()})(),L.useDeprecated({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},e.computed(()=>a.value&&i.isPropAbsent(t.value))),L.useDeprecated({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},e.computed(()=>!!t.trueLabel)),L.useDeprecated({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},e.computed(()=>!!t.falseLabel)),{inputId:x,isLabeledByFormItem:o,isChecked:s,isDisabled:k,isFocused:d,checkboxButtonSize:v,checkboxSize:m,hasOwnLabel:f,model:u,actualValue:b,handleChange:c,onClickRoot:p}},ee=["id","indeterminate","name","tabindex","disabled"];var te=e.defineComponent({name:"ElCheckbox",__name:"checkbox",props:I,emits:A,setup(t){const l=t,{inputId:n,isLabeledByFormItem:u,isChecked:a,isDisabled:r,isFocused:d,checkboxSize:s,hasOwnLabel:v,model:m,actualValue:f,handleChange:b,onClickRoot:k}=O(l,e.useSlots()),x=e.computed(()=>l.trueValue||l.falseValue||l.trueLabel||l.falseLabel?{"true-value":l.trueValue??l.trueLabel??!0,"false-value":l.falseValue??l.falseLabel??!1}:{value:f.value}),o=i.useNamespace("checkbox"),c=e.computed(()=>[o.b(),o.m(s.value),o.is("disabled",r.value),o.is("bordered",l.border),o.is("checked",a.value)]),p=e.computed(()=>[o.e("input"),o.is("disabled",r.value),o.is("checked",a.value),o.is("indeterminate",l.indeterminate),o.is("focus",d.value)]);return(y,g)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(!e.unref(v)&&e.unref(u)?"span":"label"),{for:!e.unref(v)&&e.unref(u)?null:e.unref(n),class:e.normalizeClass(c.value),"aria-controls":t.indeterminate?t.ariaControls:null,"aria-checked":t.indeterminate?"mixed":void 0,"aria-label":t.ariaLabel,onClick:e.unref(k)},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(p.value)},[e.withDirectives(e.createElementVNode("input",e.mergeProps({id:e.unref(n),"onUpdate:modelValue":g[0]||(g[0]=S=>e.isRef(m)?m.value=S:null),class:e.unref(o).e("original"),type:"checkbox",indeterminate:t.indeterminate,name:t.name,tabindex:t.tabindex,disabled:e.unref(r)},x.value,{onChange:g[1]||(g[1]=(...S)=>e.unref(b)&&e.unref(b)(...S)),onFocus:g[2]||(g[2]=S=>d.value=!0),onBlur:g[3]||(g[3]=S=>d.value=!1),onClick:g[4]||(g[4]=e.withModifiers(()=>{},["stop"]))}),null,16,ee),[[e.vModelCheckbox,e.unref(m)]]),e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("inner"))},null,2)],2),e.unref(v)?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(o).e("label"))},[e.renderSlot(y.$slots,"default"),y.$slots.default?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.label),1)],64))],2)):e.createCommentVNode("v-if",!0)]),_:3},8,["for","class","aria-controls","aria-checked","aria-label","onClick"]))}}),w=te;const le=["name","tabindex","disabled"];var ne=e.defineComponent({name:"ElCheckboxButton",__name:"checkbox-button",props:I,emits:A,setup(t){const l=t,{isFocused:n,isChecked:u,isDisabled:a,checkboxButtonSize:r,model:d,actualValue:s,handleChange:v}=O(l,e.useSlots()),m=e.computed(()=>l.trueValue||l.falseValue||l.trueLabel||l.falseLabel?{"true-value":l.trueValue??l.trueLabel??!0,"false-value":l.falseValue??l.falseLabel??!1}:{value:s.value}),f=e.inject(V,void 0),b=i.useNamespace("checkbox"),k=e.computed(()=>{var c,p;const o=((c=f==null?void 0:f.fill)==null?void 0:c.value)??"";return{backgroundColor:o,borderColor:o,color:((p=f==null?void 0:f.textColor)==null?void 0:p.value)??"",boxShadow:o?`-1px 0 0 0 ${o}`:void 0}}),x=e.computed(()=>[b.b("button"),b.bm("button",r.value),b.is("disabled",a.value),b.is("checked",u.value),b.is("focus",n.value)]);return(o,c)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(x.value)},[e.withDirectives(e.createElementVNode("input",e.mergeProps({"onUpdate:modelValue":c[0]||(c[0]=p=>e.isRef(d)?d.value=p:null),class:e.unref(b).be("button","original"),type:"checkbox",name:t.name,tabindex:t.tabindex,disabled:e.unref(a)},m.value,{onChange:c[1]||(c[1]=(...p)=>e.unref(v)&&e.unref(v)(...p)),onFocus:c[2]||(c[2]=p=>n.value=!0),onBlur:c[3]||(c[3]=p=>n.value=!1),onClick:c[4]||(c[4]=e.withModifiers(()=>{},["stop"]))}),null,16,le),[[e.vModelCheckbox,e.unref(d)]]),o.$slots.default||t.label?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(b).be("button","inner")),style:e.normalizeStyle(e.unref(u)?k.value:void 0)},[e.renderSlot(o.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],6)):e.createCommentVNode("v-if",!0)],2))}}),N=ne,ae=e.defineComponent({name:"ElCheckboxGroup",__name:"checkbox-group",props:J,emits:Q,setup(t,{emit:l}){const n=t,u=l,a=i.useNamespace("checkbox"),r=h.useFormDisabled(),{formItem:d}=h.useFormItem(),{inputId:s,isLabeledByFormItem:v}=h.useFormItemInputId(n,{formItemContext:d}),m=async o=>{u(C.UPDATE_MODEL_EVENT,o),await e.nextTick(),u(C.CHANGE_EVENT,o)},f=e.computed({get(){return n.modelValue},set(o){m(o)}}),b=e.computed(()=>({...F,...n.props})),k=o=>{const{label:c,value:p,disabled:y}=b.value,g={label:o[c],value:o[p],disabled:o[y]};return{...D(o,[c,p,y]),...g}},x=e.computed(()=>n.type==="button"?N:w);return e.provide(V,{...C.pick(e.toRefs(n),["size","min","max","validateEvent","fill","textColor"]),disabled:r,modelValue:f,changeEvent:m}),e.watch(()=>n.modelValue,(o,c)=>{n.validateEvent&&!P.isEqual(o,c)&&(d==null||d.validate("change").catch(i.NOOP))}),(o,c)=>{var p;return e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),{id:e.unref(s),class:e.normalizeClass(e.unref(a).b("group")),role:"group","aria-label":e.unref(v)?void 0:t.ariaLabel||"checkbox-group","aria-labelledby":e.unref(v)?(p=e.unref(d))==null?void 0:p.labelId:void 0},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,(y,g)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x.value),e.mergeProps({key:g},{ref_for:!0},k(y)),null,16))),128))])]),_:3},8,["id","class","aria-label","aria-labelledby"])}}}),z=ae;const oe=i.withInstall(w,{CheckboxButton:N,CheckboxGroup:z});i.withNoopInstall(N);const ue=i.withNoopInstall(z);exports.ElCheckbox=oe;exports.ElCheckboxGroup=ue;exports.omit=D;