@wfrog/vc-ui 1.1.1 → 1.2.1

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 (126) hide show
  1. package/README.md +1 -1
  2. package/dist/es/chunk/{OEa4tYPF.mjs → -ga82G_B.mjs} +1 -1
  3. package/dist/es/chunk/B1BnPYNG.mjs +163 -0
  4. package/dist/es/chunk/{DFOLES4O.mjs → BA2yoAwy.mjs} +403 -502
  5. package/dist/es/chunk/{BpqBBo4z.mjs → BDyXj_90.mjs} +2 -2
  6. package/dist/es/chunk/{BI0vrXwX.mjs → BI-fNJhk.mjs} +6 -3
  7. package/dist/es/chunk/{BsGCX4td.mjs → BK4T_2ha.mjs} +1 -1
  8. package/dist/es/chunk/{73YgKz3H.mjs → BLLKi_0v.mjs} +1 -1
  9. package/dist/es/chunk/{DTLPXrjb.mjs → BTsEMnf_.mjs} +1 -1
  10. package/dist/es/chunk/{B5UQmWXg.mjs → BUf50Y7Y.mjs} +41 -21
  11. package/dist/es/chunk/{BzedaLtg.mjs → BYVaz5Or.mjs} +2 -2
  12. package/dist/es/chunk/{Bp9jXKX0.mjs → BambM7zX.mjs} +2 -2
  13. package/dist/es/chunk/{CizMbf5K.mjs → Bl0WQiki.mjs} +1 -1
  14. package/dist/es/chunk/{CLbj8G-F.mjs → Bnot0Gwc.mjs} +12 -4
  15. package/dist/es/chunk/{4eyJqDa9.mjs → BoGGHTrJ.mjs} +4 -2
  16. package/dist/es/chunk/C7Dgjpd1.mjs +242 -0
  17. package/dist/es/chunk/{D0LB3gF-.mjs → CKbkzlkO.mjs} +104 -72
  18. package/dist/es/chunk/{DrgvuOYH.mjs → CL5WTCB3.mjs} +4 -2
  19. package/dist/es/chunk/{XwSiBVsA.mjs → CM_I1FoA.mjs} +2 -2
  20. package/dist/es/chunk/{DouIsSPi.mjs → CNILa-hz.mjs} +1 -1
  21. package/dist/es/chunk/{DRoyW749.mjs → CcKUdl3e.mjs} +12 -6
  22. package/dist/es/chunk/CidLkmft.mjs +188 -0
  23. package/dist/es/chunk/{HAog8AWU.mjs → CitH0taR.mjs} +816 -539
  24. package/dist/es/chunk/{Cu6erWl4.mjs → CzqeSQn4.mjs} +73 -38
  25. package/dist/es/chunk/{CLCfXfvv.mjs → D7JQbDFE.mjs} +154 -118
  26. package/dist/es/chunk/{cPBw23yt.mjs → DEPZhJ0Z.mjs} +21 -16
  27. package/dist/es/chunk/{CPERtDRX.mjs → DHpbQMGk.mjs} +32 -22
  28. package/dist/es/chunk/{BHsNc7jl.mjs → DKpRXDRE.mjs} +82 -55
  29. package/dist/es/chunk/{CLMc8GzD.mjs → DMYHOxhk.mjs} +462 -311
  30. package/dist/es/chunk/{CBSopeeE.mjs → DQHGjqG5.mjs} +9 -4
  31. package/dist/es/chunk/DTEM_vYZ.mjs +23 -0
  32. package/dist/es/chunk/{NQBKROII.mjs → DWcIzeMM.mjs} +1 -1
  33. package/dist/es/chunk/{FHvLvzEB.mjs → DX38FfmL.mjs} +1088 -697
  34. package/dist/es/chunk/{DZD-YnCt.mjs → Dcm-lOj8.mjs} +4 -4
  35. package/dist/es/chunk/{09Ec85_u.mjs → DdmNdV7I.mjs} +398 -278
  36. package/dist/es/chunk/{f0-vIQGp.mjs → DfHTA5LW.mjs} +3 -3
  37. package/dist/es/chunk/DgFT6snA.mjs +835 -0
  38. package/dist/es/chunk/{DwKWIlzw.mjs → DgSzI6Fw.mjs} +106 -71
  39. package/dist/es/chunk/{BcTuAX8r.mjs → Dsye5ZEp.mjs} +5 -3
  40. package/dist/es/chunk/{BsLJxiSC.mjs → Dw-yyl2m.mjs} +1 -1
  41. package/dist/es/chunk/{DXPWe_a5.mjs → U13Qpiki.mjs} +19 -13
  42. package/dist/es/chunk/{axpwSky6.mjs → _8u_XVHh.mjs} +168 -120
  43. package/dist/es/chunk/egk9EEzo.mjs +66 -0
  44. package/dist/es/chunk/{BUEEWLrd.mjs → ezK_XQQd.mjs} +15 -6
  45. package/dist/es/chunk/{Bl2KlMdP.mjs → oW98L-44.mjs} +8 -3
  46. package/dist/es/chunk/{Dk6Bx0KT.mjs → plK2vnjp.mjs} +8 -5
  47. package/dist/es/components/backbottom/backbottom.mjs +2 -2
  48. package/dist/es/components/button/button.mjs +105 -76
  49. package/dist/es/components/choice/choice.mjs +2 -2
  50. package/dist/es/components/cropper/cropper.mjs +42 -32
  51. package/dist/es/components/currency/currency.mjs +5 -5
  52. package/dist/es/components/daterange-picker/daterange-picker.mjs +2267 -1522
  53. package/dist/es/components/dialog/dialog.mjs +213 -172
  54. package/dist/es/components/dialog/index.css +1 -1
  55. package/dist/es/components/dialog-camera-upload/dialog-camera-upload.mjs +10 -10
  56. package/dist/es/components/dialog-map-point/dialog-map-point.mjs +3 -3
  57. package/dist/es/components/dialog-upload-images/dialog-upload-images.mjs +495 -314
  58. package/dist/es/components/dialog-upload-images/index.css +1 -1
  59. package/dist/es/components/document.vue.d.ts +14 -0
  60. package/dist/es/components/drag-verify/drag-verify.mjs +4 -4
  61. package/dist/es/components/drawer/drawer.mjs +136 -94
  62. package/dist/es/components/drawer/index.css +1 -1
  63. package/dist/es/components/easy-pagination/easy-pagination.mjs +2 -2
  64. package/dist/es/components/el-icon/el-icon.mjs +1 -1
  65. package/dist/es/components/el-icon/index.css +3 -2
  66. package/dist/es/components/example-wrapper.vue.d.ts +19 -0
  67. package/dist/es/components/icon/icon.mjs +10 -31
  68. package/dist/es/components/icon/icon.vue.d.ts +1 -1
  69. package/dist/es/components/icon/icon2.mjs +1 -1
  70. package/dist/es/components/icon/index.mjs +2 -2
  71. package/dist/es/components/icon-picker/components/collections.vue.d.ts +625 -0
  72. package/dist/es/components/icon-picker/components/panel.vue.d.ts +9 -0
  73. package/dist/es/components/icon-picker/icon-picker.d.ts +40 -0
  74. package/dist/es/components/icon-picker/icon-picker.mjs +1375 -0
  75. package/dist/es/components/icon-picker/icon-picker.vue.d.ts +9 -0
  76. package/dist/es/components/icon-picker/index.css +121 -0
  77. package/dist/es/components/icon-picker/index.d.ts +4 -0
  78. package/dist/es/components/icon-picker/index.mjs +6 -0
  79. package/dist/es/components/iconify-icon/iconify-icon.d.ts +5 -0
  80. package/dist/es/components/iconify-icon/iconify-icon.mjs +1860 -0
  81. package/dist/es/components/iconify-icon/iconify-icon.vue.d.ts +6 -0
  82. package/dist/es/components/iconify-icon/index.css +11 -0
  83. package/dist/es/components/iconify-icon/index.d.ts +4 -0
  84. package/dist/es/components/iconify-icon/index.mjs +6 -0
  85. package/dist/es/components/image/image.mjs +5 -5
  86. package/dist/es/components/input/input.mjs +4 -4
  87. package/dist/es/components/input/input.vue.d.ts +63 -54
  88. package/dist/es/components/input-number/input-number.mjs +5 -5
  89. package/dist/es/components/pca-picker/components/c.vue.d.ts +4 -4
  90. package/dist/es/components/pca-picker/index.css +1 -1
  91. package/dist/es/components/pca-picker/pca-picker.mjs +153 -159
  92. package/dist/es/components/pca-picker/pca-picker.vue.d.ts +12 -11
  93. package/dist/es/components/screenfull/screenfull.mjs +4 -4
  94. package/dist/es/components/scrollbar/index.css +18 -0
  95. package/dist/es/components/scrollbar/index.d.ts +4 -0
  96. package/dist/es/components/scrollbar/index.mjs +6 -0
  97. package/dist/es/components/scrollbar/scrollbar.d.ts +4 -0
  98. package/dist/es/components/scrollbar/scrollbar.mjs +65 -0
  99. package/dist/es/components/scrollbar/scrollbar.vue.d.ts +588 -0
  100. package/dist/es/components/select/select.mjs +7 -7
  101. package/dist/es/components/single-player/index.css +1 -1
  102. package/dist/es/components/single-player/single-player.mjs +265 -166
  103. package/dist/es/components/svg-icon/index.css +3 -2
  104. package/dist/es/components/svg-icon/svg-icon.mjs +3 -3
  105. package/dist/es/components/switch/switch.mjs +2 -2
  106. package/dist/es/components/sync-scroll-container/sync-scroll-container.mjs +2 -2
  107. package/dist/es/components/tags/tags.mjs +9 -9
  108. package/dist/es/components/text-ellipsis/text-ellipsis.mjs +4 -4
  109. package/dist/es/components/thousand-input/thousand-input.mjs +3 -3
  110. package/dist/es/components/thousand-input/thousand-input.vue.d.ts +126 -108
  111. package/dist/es/components/tinymce/tinymce.mjs +4 -4
  112. package/dist/es/components/tree-picker/components/popover-cascader.vue.d.ts +179 -141
  113. package/dist/es/components/tree-picker/popover-cascader.css +1 -1
  114. package/dist/es/components/tree-picker/tree-picker.mjs +10 -10
  115. package/dist/es/components/tree-picker/tree-picker.vue.d.ts +12 -11
  116. package/dist/es/components/upload-file/upload-file.mjs +2 -2
  117. package/dist/es/index.d.ts +3 -0
  118. package/dist/es/index.mjs +41 -31
  119. package/dist/global.d.ts +3 -0
  120. package/dist/index.css +165 -21
  121. package/package.json +8 -2
  122. package/dist/es/chunk/BtTIs3tG.mjs +0 -138
  123. package/dist/es/chunk/C7wQNvSS.mjs +0 -728
  124. package/dist/es/chunk/Cbhe4I9Z.mjs +0 -16
  125. package/dist/es/chunk/DihosKp1.mjs +0 -140
  126. package/dist/es/components/icon/index.css +0 -9
@@ -1,252 +1,14 @@
1
1
  import { inject, computed, getCurrentInstance, watch, nextTick, ref, toRaw, defineComponent, useSlots, createBlock, openBlock, resolveDynamicComponent, unref, normalizeClass, withCtx, createElementVNode, createElementBlock, createCommentVNode, withDirectives, mergeProps, isRef, withModifiers, vModelCheckbox, renderSlot, Fragment, createTextVNode, toDisplayString, normalizeStyle, provide, toRefs, renderList, vModelRadio, onMounted, reactive } from 'vue';
2
- import { u as useSizeProp } from './BsGCX4td.mjs';
3
- import { a as flatRest, u as useAriaProps, p as pick } from './BpqBBo4z.mjs';
2
+ import { u as useSizeProp } from './BK4T_2ha.mjs';
3
+ import { u as useAriaProps, p as pick } from './BDyXj_90.mjs';
4
4
  import { U as UPDATE_MODEL_EVENT, C as CHANGE_EVENT } from './Ct6q2FXg.mjs';
5
- import { h as isString, f as isNumber, q as isBoolean, g as isUndefined, e as debugWarn, i as isArray, v as isPropAbsent, p as isObject, u as useNamespace, c as buildProps, d as definePropType } from './DRoyW749.mjs';
6
- import { _ as _export_sfc, a as withNoopInstall, w as withInstall } from './DTLPXrjb.mjs';
7
- import { b as formContextKey, u as useId } from './CBSopeeE.mjs';
8
- import { b as useFormDisabled, u as useFormItem, c as useFormSize, a as useFormItemInputId } from './DXPWe_a5.mjs';
9
- import { i as isEqual } from './BsLJxiSC.mjs';
10
- import { u as useDeprecated } from './Cbhe4I9Z.mjs';
11
- import { e as isObjectLike, f as baseGetTag, d as baseGet, g as castPath, t as toKey, a as arrayMap } from './NQBKROII.mjs';
12
- import { g as getPrototype, c as copyObject, a as getAllKeysIn, b as baseClone } from './f0-vIQGp.mjs';
13
-
14
- /** `Object#toString` result references. */
15
- var objectTag = '[object Object]';
16
-
17
- /** Used for built-in method references. */
18
- var funcProto = Function.prototype,
19
- objectProto$1 = Object.prototype;
20
-
21
- /** Used to resolve the decompiled source of functions. */
22
- var funcToString = funcProto.toString;
23
-
24
- /** Used to check objects for own properties. */
25
- var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
26
-
27
- /** Used to infer the `Object` constructor. */
28
- var objectCtorString = funcToString.call(Object);
29
-
30
- /**
31
- * Checks if `value` is a plain object, that is, an object created by the
32
- * `Object` constructor or one with a `[[Prototype]]` of `null`.
33
- *
34
- * @static
35
- * @memberOf _
36
- * @since 0.8.0
37
- * @category Lang
38
- * @param {*} value The value to check.
39
- * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
40
- * @example
41
- *
42
- * function Foo() {
43
- * this.a = 1;
44
- * }
45
- *
46
- * _.isPlainObject(new Foo);
47
- * // => false
48
- *
49
- * _.isPlainObject([1, 2, 3]);
50
- * // => false
51
- *
52
- * _.isPlainObject({ 'x': 0, 'y': 0 });
53
- * // => true
54
- *
55
- * _.isPlainObject(Object.create(null));
56
- * // => true
57
- */
58
- function isPlainObject(value) {
59
- if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
60
- return false;
61
- }
62
- var proto = getPrototype(value);
63
- if (proto === null) {
64
- return true;
65
- }
66
- var Ctor = hasOwnProperty$1.call(proto, 'constructor') && proto.constructor;
67
- return typeof Ctor == 'function' && Ctor instanceof Ctor &&
68
- funcToString.call(Ctor) == objectCtorString;
69
- }
70
-
71
- /**
72
- * The base implementation of `_.slice` without an iteratee call guard.
73
- *
74
- * @private
75
- * @param {Array} array The array to slice.
76
- * @param {number} [start=0] The start position.
77
- * @param {number} [end=array.length] The end position.
78
- * @returns {Array} Returns the slice of `array`.
79
- */
80
- function baseSlice(array, start, end) {
81
- var index = -1,
82
- length = array.length;
83
-
84
- if (start < 0) {
85
- start = -start > length ? 0 : (length + start);
86
- }
87
- end = end > length ? length : end;
88
- if (end < 0) {
89
- end += length;
90
- }
91
- length = start > end ? 0 : ((end - start) >>> 0);
92
- start >>>= 0;
93
-
94
- var result = Array(length);
95
- while (++index < length) {
96
- result[index] = array[index + start];
97
- }
98
- return result;
99
- }
100
-
101
- /**
102
- * Gets the last element of `array`.
103
- *
104
- * @static
105
- * @memberOf _
106
- * @since 0.1.0
107
- * @category Array
108
- * @param {Array} array The array to query.
109
- * @returns {*} Returns the last element of `array`.
110
- * @example
111
- *
112
- * _.last([1, 2, 3]);
113
- * // => 3
114
- */
115
- function last(array) {
116
- var length = array == null ? 0 : array.length;
117
- return length ? array[length - 1] : undefined;
118
- }
119
-
120
- /**
121
- * Gets the parent value at `path` of `object`.
122
- *
123
- * @private
124
- * @param {Object} object The object to query.
125
- * @param {Array} path The path to get the parent value of.
126
- * @returns {*} Returns the parent value.
127
- */
128
- function parent(object, path) {
129
- return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
130
- }
131
-
132
- /** Used for built-in method references. */
133
- var objectProto = Object.prototype;
134
-
135
- /** Used to check objects for own properties. */
136
- var hasOwnProperty = objectProto.hasOwnProperty;
137
-
138
- /**
139
- * The base implementation of `_.unset`.
140
- *
141
- * @private
142
- * @param {Object} object The object to modify.
143
- * @param {Array|string} path The property path to unset.
144
- * @returns {boolean} Returns `true` if the property is deleted, else `false`.
145
- */
146
- function baseUnset(object, path) {
147
- path = castPath(path, object);
148
-
149
- // Prevent prototype pollution, see: https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg
150
- var index = -1,
151
- length = path.length;
152
-
153
- if (!length) {
154
- return true;
155
- }
156
-
157
- var isRootPrimitive = object == null || (typeof object !== 'object' && typeof object !== 'function');
158
-
159
- while (++index < length) {
160
- var key = path[index];
161
-
162
- // skip non-string keys (e.g., Symbols, numbers)
163
- if (typeof key !== 'string') {
164
- continue;
165
- }
166
-
167
- // Always block "__proto__" anywhere in the path if it's not expected
168
- if (key === '__proto__' && !hasOwnProperty.call(object, '__proto__')) {
169
- return false;
170
- }
171
-
172
- // Block "constructor.prototype" chains
173
- if (key === 'constructor' &&
174
- (index + 1) < length &&
175
- typeof path[index + 1] === 'string' &&
176
- path[index + 1] === 'prototype') {
177
-
178
- // Allow ONLY when the path starts at a primitive root, e.g., _.unset(0, 'constructor.prototype.a')
179
- if (isRootPrimitive && index === 0) {
180
- continue;
181
- }
182
-
183
- return false;
184
- }
185
- }
186
-
187
- var obj = parent(object, path);
188
- return obj == null || delete obj[toKey(last(path))];
189
- }
190
-
191
- /**
192
- * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
193
- * objects.
194
- *
195
- * @private
196
- * @param {*} value The value to inspect.
197
- * @param {string} key The key of the property to inspect.
198
- * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
199
- */
200
- function customOmitClone(value) {
201
- return isPlainObject(value) ? undefined : value;
202
- }
203
-
204
- /** Used to compose bitmasks for cloning. */
205
- var CLONE_DEEP_FLAG = 1,
206
- CLONE_FLAT_FLAG = 2,
207
- CLONE_SYMBOLS_FLAG = 4;
208
-
209
- /**
210
- * The opposite of `_.pick`; this method creates an object composed of the
211
- * own and inherited enumerable property paths of `object` that are not omitted.
212
- *
213
- * **Note:** This method is considerably slower than `_.pick`.
214
- *
215
- * @static
216
- * @since 0.1.0
217
- * @memberOf _
218
- * @category Object
219
- * @param {Object} object The source object.
220
- * @param {...(string|string[])} [paths] The property paths to omit.
221
- * @returns {Object} Returns the new object.
222
- * @example
223
- *
224
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
225
- *
226
- * _.omit(object, ['a', 'c']);
227
- * // => { 'b': '2' }
228
- */
229
- var omit = flatRest(function(object, paths) {
230
- var result = {};
231
- if (object == null) {
232
- return result;
233
- }
234
- var isDeep = false;
235
- paths = arrayMap(paths, function(path) {
236
- path = castPath(path, object);
237
- isDeep || (isDeep = path.length > 1);
238
- return path;
239
- });
240
- copyObject(object, getAllKeysIn(object), result);
241
- if (isDeep) {
242
- result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
243
- }
244
- var length = paths.length;
245
- while (length--) {
246
- baseUnset(result, paths[length]);
247
- }
248
- return result;
249
- });
5
+ import { h as isString, f as isNumber, q as isBoolean, g as isUndefined, e as debugWarn, i as isArray, v as isPropAbsent, p as isObject, u as useNamespace, c as buildProps, d as definePropType } from './CcKUdl3e.mjs';
6
+ import { _ as _export_sfc, a as withNoopInstall, w as withInstall } from './BTsEMnf_.mjs';
7
+ import { b as formContextKey, u as useId } from './DQHGjqG5.mjs';
8
+ import { b as useFormDisabled, u as useFormItem, c as useFormSize, a as useFormItemInputId } from './U13Qpiki.mjs';
9
+ import { i as isEqual } from './Dw-yyl2m.mjs';
10
+ import { u as useDeprecated } from './DTEM_vYZ.mjs';
11
+ import { o as omit } from './C7Dgjpd1.mjs';
250
12
 
251
13
  const checkboxProps = {
252
14
  modelValue: {
@@ -320,14 +82,16 @@ const useCheckboxDisabled = ({
320
82
  const min = (_b = checkboxGroup == null ? void 0 : checkboxGroup.min) == null ? void 0 : _b.value;
321
83
  return !isUndefined(max) && model.value.length >= max && !isChecked.value || !isUndefined(min) && model.value.length <= min && isChecked.value;
322
84
  });
323
- const isDisabled = useFormDisabled(computed(() => {
324
- var _a, _b;
325
- if (checkboxGroup === void 0) {
326
- return (_a = formContext == null ? void 0 : formContext.disabled) != null ? _a : isLimitDisabled.value;
327
- } else {
328
- return ((_b = checkboxGroup.disabled) == null ? void 0 : _b.value) || isLimitDisabled.value;
329
- }
330
- }));
85
+ const isDisabled = useFormDisabled(
86
+ computed(() => {
87
+ var _a, _b;
88
+ if (checkboxGroup === void 0) {
89
+ return (_a = formContext == null ? void 0 : formContext.disabled) != null ? _a : isLimitDisabled.value;
90
+ } else {
91
+ return ((_b = checkboxGroup.disabled) == null ? void 0 : _b.value) || isLimitDisabled.value;
92
+ }
93
+ })
94
+ );
331
95
  return {
332
96
  isDisabled,
333
97
  isLimitDisabled
@@ -362,20 +126,29 @@ const useCheckboxEvent = (props, {
362
126
  return;
363
127
  if (!hasOwnLabel.value && !isDisabled.value && isLabeledByFormItem.value) {
364
128
  const eventTargets = e.composedPath();
365
- const hasLabel = eventTargets.some((item) => item.tagName === "LABEL");
129
+ const hasLabel = eventTargets.some(
130
+ (item) => item.tagName === "LABEL"
131
+ );
366
132
  if (!hasLabel) {
367
- model.value = getLabeledValue([false, props.falseValue, props.falseLabel].includes(model.value));
133
+ model.value = getLabeledValue(
134
+ [false, props.falseValue, props.falseLabel].includes(model.value)
135
+ );
368
136
  await nextTick();
369
137
  emitChangeEvent(model.value, e);
370
138
  }
371
139
  }
372
140
  }
373
- const validateEvent = computed(() => (checkboxGroup == null ? void 0 : checkboxGroup.validateEvent) || props.validateEvent);
374
- watch(() => props.modelValue, () => {
375
- if (validateEvent.value) {
376
- formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
141
+ const validateEvent = computed(
142
+ () => (checkboxGroup == null ? void 0 : checkboxGroup.validateEvent) || props.validateEvent
143
+ );
144
+ watch(
145
+ () => props.modelValue,
146
+ () => {
147
+ if (validateEvent.value) {
148
+ formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
149
+ }
377
150
  }
378
- });
151
+ );
379
152
  return {
380
153
  handleChange,
381
154
  onClickRoot
@@ -436,12 +209,15 @@ const useCheckboxStatus = (props, slots, { model }) => {
436
209
  return !!value;
437
210
  }
438
211
  });
439
- const checkboxButtonSize = useFormSize(computed(() => {
440
- var _a;
441
- return (_a = checkboxGroup == null ? void 0 : checkboxGroup.size) == null ? void 0 : _a.value;
442
- }), {
443
- prop: true
444
- });
212
+ const checkboxButtonSize = useFormSize(
213
+ computed(() => {
214
+ var _a;
215
+ return (_a = checkboxGroup == null ? void 0 : checkboxGroup.size) == null ? void 0 : _a.value;
216
+ }),
217
+ {
218
+ prop: true
219
+ }
220
+ );
445
221
  const checkboxSize = useFormSize(computed(() => {
446
222
  var _a;
447
223
  return (_a = checkboxGroup == null ? void 0 : checkboxGroup.size) == null ? void 0 : _a.value;
@@ -495,27 +271,36 @@ const useCheckbox = (props, slots) => {
495
271
  props.checked && addToStore();
496
272
  };
497
273
  setStoreValue();
498
- useDeprecated({
499
- from: "label act as value",
500
- replacement: "value",
501
- version: "3.0.0",
502
- scope: "el-checkbox",
503
- ref: "https://element-plus.org/en-US/component/checkbox.html"
504
- }, computed(() => isGroup.value && isPropAbsent(props.value)));
505
- useDeprecated({
506
- from: "true-label",
507
- replacement: "true-value",
508
- version: "3.0.0",
509
- scope: "el-checkbox",
510
- ref: "https://element-plus.org/en-US/component/checkbox.html"
511
- }, computed(() => !!props.trueLabel));
512
- useDeprecated({
513
- from: "false-label",
514
- replacement: "false-value",
515
- version: "3.0.0",
516
- scope: "el-checkbox",
517
- ref: "https://element-plus.org/en-US/component/checkbox.html"
518
- }, computed(() => !!props.falseLabel));
274
+ useDeprecated(
275
+ {
276
+ from: "label act as value",
277
+ replacement: "value",
278
+ version: "3.0.0",
279
+ scope: "el-checkbox",
280
+ ref: "https://element-plus.org/en-US/component/checkbox.html"
281
+ },
282
+ computed(() => isGroup.value && isPropAbsent(props.value))
283
+ );
284
+ useDeprecated(
285
+ {
286
+ from: "true-label",
287
+ replacement: "true-value",
288
+ version: "3.0.0",
289
+ scope: "el-checkbox",
290
+ ref: "https://element-plus.org/en-US/component/checkbox.html"
291
+ },
292
+ computed(() => !!props.trueLabel)
293
+ );
294
+ useDeprecated(
295
+ {
296
+ from: "false-label",
297
+ replacement: "false-value",
298
+ version: "3.0.0",
299
+ scope: "el-checkbox",
300
+ ref: "https://element-plus.org/en-US/component/checkbox.html"
301
+ },
302
+ computed(() => !!props.falseLabel)
303
+ );
519
304
  return {
520
305
  inputId,
521
306
  isLabeledByFormItem,
@@ -532,11 +317,12 @@ const useCheckbox = (props, slots) => {
532
317
  };
533
318
  };
534
319
 
535
- const __default__$5 = defineComponent({
536
- name: "ElCheckbox"
537
- });
538
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
539
- ...__default__$5,
320
+ const _hoisted_1$4 = ["id", "indeterminate", "name", "tabindex", "disabled"];
321
+ const _sfc_main$5 = defineComponent({
322
+ ...{
323
+ name: "ElCheckbox"
324
+ },
325
+ __name: "checkbox",
540
326
  props: checkboxProps,
541
327
  emits: checkboxEmits,
542
328
  setup(__props) {
@@ -589,60 +375,84 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
589
375
  return (_ctx, _cache) => {
590
376
  return openBlock(), createBlock(resolveDynamicComponent(!unref(hasOwnLabel) && unref(isLabeledByFormItem) ? "span" : "label"), {
591
377
  for: !unref(hasOwnLabel) && unref(isLabeledByFormItem) ? null : unref(inputId),
592
- class: normalizeClass(unref(compKls)),
378
+ class: normalizeClass(compKls.value),
593
379
  "aria-controls": _ctx.indeterminate ? _ctx.ariaControls : null,
594
380
  "aria-checked": _ctx.indeterminate ? "mixed" : void 0,
595
381
  "aria-label": _ctx.ariaLabel,
596
382
  onClick: unref(onClickRoot)
597
383
  }, {
598
384
  default: withCtx(() => [
599
- createElementVNode("span", {
600
- class: normalizeClass(unref(spanKls))
601
- }, [
602
- withDirectives(createElementVNode("input", mergeProps({
603
- id: unref(inputId),
604
- "onUpdate:modelValue": ($event) => isRef(model) ? model.value = $event : null,
605
- class: unref(ns).e("original"),
606
- type: "checkbox",
607
- indeterminate: _ctx.indeterminate,
608
- name: _ctx.name,
609
- tabindex: _ctx.tabindex,
610
- disabled: unref(isDisabled)
611
- }, unref(inputBindings), {
612
- onChange: unref(handleChange),
613
- onFocus: ($event) => isFocused.value = true,
614
- onBlur: ($event) => isFocused.value = false,
615
- onClick: withModifiers(() => {
616
- }, ["stop"])
617
- }), null, 16, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "onChange", "onFocus", "onBlur", "onClick"]), [
618
- [vModelCheckbox, unref(model)]
619
- ]),
620
- createElementVNode("span", {
621
- class: normalizeClass(unref(ns).e("inner"))
622
- }, null, 2)
623
- ], 2),
624
- unref(hasOwnLabel) ? (openBlock(), createElementBlock("span", {
625
- key: 0,
626
- class: normalizeClass(unref(ns).e("label"))
627
- }, [
628
- renderSlot(_ctx.$slots, "default"),
629
- !_ctx.$slots.default ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
630
- createTextVNode(toDisplayString(_ctx.label), 1)
631
- ], 64)) : createCommentVNode("v-if", true)
632
- ], 2)) : createCommentVNode("v-if", true)
385
+ createElementVNode(
386
+ "span",
387
+ {
388
+ class: normalizeClass(spanKls.value)
389
+ },
390
+ [
391
+ withDirectives(createElementVNode("input", mergeProps({
392
+ id: unref(inputId),
393
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(model) ? model.value = $event : null),
394
+ class: unref(ns).e("original"),
395
+ type: "checkbox",
396
+ indeterminate: _ctx.indeterminate,
397
+ name: _ctx.name,
398
+ tabindex: _ctx.tabindex,
399
+ disabled: unref(isDisabled)
400
+ }, inputBindings.value, {
401
+ onChange: _cache[1] || (_cache[1] = (...args) => unref(handleChange) && unref(handleChange)(...args)),
402
+ onFocus: _cache[2] || (_cache[2] = ($event) => isFocused.value = true),
403
+ onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false),
404
+ onClick: _cache[4] || (_cache[4] = withModifiers(() => {
405
+ }, ["stop"]))
406
+ }), null, 16, _hoisted_1$4), [
407
+ [vModelCheckbox, unref(model)]
408
+ ]),
409
+ createElementVNode(
410
+ "span",
411
+ {
412
+ class: normalizeClass(unref(ns).e("inner"))
413
+ },
414
+ null,
415
+ 2
416
+ )
417
+ ],
418
+ 2
419
+ ),
420
+ unref(hasOwnLabel) ? (openBlock(), createElementBlock(
421
+ "span",
422
+ {
423
+ key: 0,
424
+ class: normalizeClass(unref(ns).e("label"))
425
+ },
426
+ [
427
+ renderSlot(_ctx.$slots, "default"),
428
+ !_ctx.$slots.default ? (openBlock(), createElementBlock(
429
+ Fragment,
430
+ { key: 0 },
431
+ [
432
+ createTextVNode(
433
+ toDisplayString(_ctx.label),
434
+ 1
435
+ )
436
+ ],
437
+ 64
438
+ )) : createCommentVNode("v-if", true)
439
+ ],
440
+ 2
441
+ )) : createCommentVNode("v-if", true)
633
442
  ]),
634
443
  _: 3
635
444
  }, 8, ["for", "class", "aria-controls", "aria-checked", "aria-label", "onClick"]);
636
445
  };
637
446
  }
638
447
  });
639
- var Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__file", "checkbox.vue"]]);
448
+ var Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox.vue"]]);
640
449
 
641
- const __default__$4 = defineComponent({
642
- name: "ElCheckboxButton"
643
- });
644
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
645
- ...__default__$4,
450
+ const _hoisted_1$3 = ["name", "tabindex", "disabled"];
451
+ const _sfc_main$4 = defineComponent({
452
+ ...{
453
+ name: "ElCheckboxButton"
454
+ },
455
+ __name: "checkbox-button",
646
456
  props: checkboxProps,
647
457
  emits: checkboxEmits,
648
458
  setup(__props) {
@@ -691,39 +501,52 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
691
501
  ];
692
502
  });
693
503
  return (_ctx, _cache) => {
694
- return openBlock(), createElementBlock("label", {
695
- class: normalizeClass(unref(labelKls))
696
- }, [
697
- withDirectives(createElementVNode("input", mergeProps({
698
- "onUpdate:modelValue": ($event) => isRef(model) ? model.value = $event : null,
699
- class: unref(ns).be("button", "original"),
700
- type: "checkbox",
701
- name: _ctx.name,
702
- tabindex: _ctx.tabindex,
703
- disabled: unref(isDisabled)
704
- }, unref(inputBindings), {
705
- onChange: unref(handleChange),
706
- onFocus: ($event) => isFocused.value = true,
707
- onBlur: ($event) => isFocused.value = false,
708
- onClick: withModifiers(() => {
709
- }, ["stop"])
710
- }), null, 16, ["onUpdate:modelValue", "name", "tabindex", "disabled", "onChange", "onFocus", "onBlur", "onClick"]), [
711
- [vModelCheckbox, unref(model)]
712
- ]),
713
- _ctx.$slots.default || _ctx.label ? (openBlock(), createElementBlock("span", {
714
- key: 0,
715
- class: normalizeClass(unref(ns).be("button", "inner")),
716
- style: normalizeStyle(unref(isChecked) ? unref(activeStyle) : void 0)
717
- }, [
718
- renderSlot(_ctx.$slots, "default", {}, () => [
719
- createTextVNode(toDisplayString(_ctx.label), 1)
720
- ])
721
- ], 6)) : createCommentVNode("v-if", true)
722
- ], 2);
504
+ return openBlock(), createElementBlock(
505
+ "label",
506
+ {
507
+ class: normalizeClass(labelKls.value)
508
+ },
509
+ [
510
+ withDirectives(createElementVNode("input", mergeProps({
511
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(model) ? model.value = $event : null),
512
+ class: unref(ns).be("button", "original"),
513
+ type: "checkbox",
514
+ name: _ctx.name,
515
+ tabindex: _ctx.tabindex,
516
+ disabled: unref(isDisabled)
517
+ }, inputBindings.value, {
518
+ onChange: _cache[1] || (_cache[1] = (...args) => unref(handleChange) && unref(handleChange)(...args)),
519
+ onFocus: _cache[2] || (_cache[2] = ($event) => isFocused.value = true),
520
+ onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false),
521
+ onClick: _cache[4] || (_cache[4] = withModifiers(() => {
522
+ }, ["stop"]))
523
+ }), null, 16, _hoisted_1$3), [
524
+ [vModelCheckbox, unref(model)]
525
+ ]),
526
+ _ctx.$slots.default || _ctx.label ? (openBlock(), createElementBlock(
527
+ "span",
528
+ {
529
+ key: 0,
530
+ class: normalizeClass(unref(ns).be("button", "inner")),
531
+ style: normalizeStyle(unref(isChecked) ? activeStyle.value : void 0)
532
+ },
533
+ [
534
+ renderSlot(_ctx.$slots, "default", {}, () => [
535
+ createTextVNode(
536
+ toDisplayString(_ctx.label),
537
+ 1
538
+ )
539
+ ])
540
+ ],
541
+ 6
542
+ )) : createCommentVNode("v-if", true)
543
+ ],
544
+ 2
545
+ );
723
546
  };
724
547
  }
725
548
  });
726
- var CheckboxButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__file", "checkbox-button.vue"]]);
549
+ var CheckboxButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-button.vue"]]);
727
550
 
728
551
  const checkboxGroupProps = buildProps({
729
552
  modelValue: {
@@ -771,15 +594,16 @@ const checkboxDefaultProps = {
771
594
  disabled: "disabled"
772
595
  };
773
596
 
774
- const __default__$3 = defineComponent({
775
- name: "ElCheckboxGroup"
776
- });
777
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
778
- ...__default__$3,
597
+ const _sfc_main$3 = defineComponent({
598
+ ...{
599
+ name: "ElCheckboxGroup"
600
+ },
601
+ __name: "checkbox-group",
779
602
  props: checkboxGroupProps,
780
603
  emits: checkboxGroupEmits,
781
- setup(__props, { emit }) {
604
+ setup(__props, { emit: __emit }) {
782
605
  const props = __props;
606
+ const emit = __emit;
783
607
  const ns = useNamespace("checkbox");
784
608
  const checkboxDisabled = useFormDisabled();
785
609
  const { formItem } = useFormItem();
@@ -812,7 +636,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
812
636
  };
813
637
  return { ...omit(option, [label, value, disabled]), ...base };
814
638
  };
815
- const optionComponent = computed(() => props.type === "button" ? CheckboxButton : Checkbox);
639
+ const optionComponent = computed(
640
+ () => props.type === "button" ? CheckboxButton : Checkbox
641
+ );
816
642
  provide(checkboxGroupContextKey, {
817
643
  ...pick(toRefs(props), [
818
644
  "size",
@@ -826,11 +652,14 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
826
652
  modelValue,
827
653
  changeEvent
828
654
  });
829
- watch(() => props.modelValue, (newVal, oldValue) => {
830
- if (props.validateEvent && !isEqual(newVal, oldValue)) {
831
- formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
655
+ watch(
656
+ () => props.modelValue,
657
+ (newVal, oldValue) => {
658
+ if (props.validateEvent && !isEqual(newVal, oldValue)) {
659
+ formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
660
+ }
832
661
  }
833
- });
662
+ );
834
663
  return (_ctx, _cache) => {
835
664
  var _a;
836
665
  return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
@@ -842,9 +671,19 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
842
671
  }, {
843
672
  default: withCtx(() => [
844
673
  renderSlot(_ctx.$slots, "default", {}, () => [
845
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (item, index) => {
846
- return openBlock(), createBlock(resolveDynamicComponent(unref(optionComponent)), mergeProps({ key: index }, getOptionProps(item)), null, 16);
847
- }), 128))
674
+ (openBlock(true), createElementBlock(
675
+ Fragment,
676
+ null,
677
+ renderList(_ctx.options, (item, index) => {
678
+ return openBlock(), createBlock(
679
+ resolveDynamicComponent(optionComponent.value),
680
+ mergeProps({ key: index }, { ref_for: true }, getOptionProps(item)),
681
+ null,
682
+ 16
683
+ );
684
+ }),
685
+ 128
686
+ ))
848
687
  ])
849
688
  ]),
850
689
  _: 3
@@ -852,7 +691,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
852
691
  };
853
692
  }
854
693
  });
855
- var CheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__file", "checkbox-group.vue"]]);
694
+ var CheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-group.vue"]]);
856
695
 
857
696
  const ElCheckbox = withInstall(Checkbox, {
858
697
  CheckboxButton,
@@ -924,13 +763,16 @@ const useRadio = (props, emit) => {
924
763
  const tabIndex = computed(() => {
925
764
  return disabled.value || isGroup.value && modelValue.value !== actualValue.value ? -1 : 0;
926
765
  });
927
- useDeprecated({
928
- from: "label act as value",
929
- replacement: "value",
930
- version: "3.0.0",
931
- scope: "el-radio",
932
- ref: "https://element-plus.org/en-US/component/radio.html"
933
- }, computed(() => isGroup.value && isPropAbsent(props.value)));
766
+ useDeprecated(
767
+ {
768
+ from: "label act as value",
769
+ replacement: "value",
770
+ version: "3.0.0",
771
+ scope: "el-radio",
772
+ ref: "https://element-plus.org/en-US/component/radio.html"
773
+ },
774
+ computed(() => isGroup.value && isPropAbsent(props.value))
775
+ );
934
776
  return {
935
777
  radioRef,
936
778
  isGroup,
@@ -944,15 +786,17 @@ const useRadio = (props, emit) => {
944
786
  };
945
787
  };
946
788
 
947
- const __default__$2 = defineComponent({
948
- name: "ElRadio"
949
- });
950
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
951
- ...__default__$2,
789
+ const _hoisted_1$2 = ["value", "name", "disabled", "checked"];
790
+ const _sfc_main$2 = defineComponent({
791
+ ...{
792
+ name: "ElRadio"
793
+ },
794
+ __name: "radio",
952
795
  props: radioProps,
953
796
  emits: radioEmits,
954
- setup(__props, { emit }) {
797
+ setup(__props, { emit: __emit }) {
955
798
  const props = __props;
799
+ const emit = __emit;
956
800
  const ns = useNamespace("radio");
957
801
  const { radioRef, radioGroup, focus, size, disabled, modelValue, actualValue } = useRadio(props, emit);
958
802
  function handleChange() {
@@ -960,69 +804,93 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
960
804
  }
961
805
  return (_ctx, _cache) => {
962
806
  var _a;
963
- return openBlock(), createElementBlock("label", {
964
- class: normalizeClass([
965
- unref(ns).b(),
966
- unref(ns).is("disabled", unref(disabled)),
967
- unref(ns).is("focus", unref(focus)),
968
- unref(ns).is("bordered", _ctx.border),
969
- unref(ns).is("checked", unref(modelValue) === unref(actualValue)),
970
- unref(ns).m(unref(size))
971
- ])
972
- }, [
973
- createElementVNode("span", {
807
+ return openBlock(), createElementBlock(
808
+ "label",
809
+ {
974
810
  class: normalizeClass([
975
- unref(ns).e("input"),
811
+ unref(ns).b(),
976
812
  unref(ns).is("disabled", unref(disabled)),
977
- unref(ns).is("checked", unref(modelValue) === unref(actualValue))
978
- ])
979
- }, [
980
- withDirectives(createElementVNode("input", {
981
- ref_key: "radioRef",
982
- ref: radioRef,
983
- "onUpdate:modelValue": ($event) => isRef(modelValue) ? modelValue.value = $event : null,
984
- class: normalizeClass(unref(ns).e("original")),
985
- value: unref(actualValue),
986
- name: _ctx.name || ((_a = unref(radioGroup)) == null ? void 0 : _a.name),
987
- disabled: unref(disabled),
988
- checked: unref(modelValue) === unref(actualValue),
989
- type: "radio",
990
- onFocus: ($event) => focus.value = true,
991
- onBlur: ($event) => focus.value = false,
992
- onChange: handleChange,
993
- onClick: withModifiers(() => {
994
- }, ["stop"])
995
- }, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "checked", "onFocus", "onBlur", "onClick"]), [
996
- [vModelRadio, unref(modelValue)]
997
- ]),
998
- createElementVNode("span", {
999
- class: normalizeClass(unref(ns).e("inner"))
1000
- }, null, 2)
1001
- ], 2),
1002
- createElementVNode("span", {
1003
- class: normalizeClass(unref(ns).e("label")),
1004
- onKeydown: withModifiers(() => {
1005
- }, ["stop"])
1006
- }, [
1007
- renderSlot(_ctx.$slots, "default", {}, () => [
1008
- createTextVNode(toDisplayString(_ctx.label), 1)
813
+ unref(ns).is("focus", unref(focus)),
814
+ unref(ns).is("bordered", _ctx.border),
815
+ unref(ns).is("checked", unref(modelValue) === unref(actualValue)),
816
+ unref(ns).m(unref(size))
1009
817
  ])
1010
- ], 42, ["onKeydown"])
1011
- ], 2);
818
+ },
819
+ [
820
+ createElementVNode(
821
+ "span",
822
+ {
823
+ class: normalizeClass([
824
+ unref(ns).e("input"),
825
+ unref(ns).is("disabled", unref(disabled)),
826
+ unref(ns).is("checked", unref(modelValue) === unref(actualValue))
827
+ ])
828
+ },
829
+ [
830
+ withDirectives(createElementVNode("input", {
831
+ ref_key: "radioRef",
832
+ ref: radioRef,
833
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
834
+ class: normalizeClass(unref(ns).e("original")),
835
+ value: unref(actualValue),
836
+ name: _ctx.name || ((_a = unref(radioGroup)) == null ? void 0 : _a.name),
837
+ disabled: unref(disabled),
838
+ checked: unref(modelValue) === unref(actualValue),
839
+ type: "radio",
840
+ onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true),
841
+ onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false),
842
+ onChange: handleChange,
843
+ onClick: _cache[3] || (_cache[3] = withModifiers(() => {
844
+ }, ["stop"]))
845
+ }, null, 42, _hoisted_1$2), [
846
+ [vModelRadio, unref(modelValue)]
847
+ ]),
848
+ createElementVNode(
849
+ "span",
850
+ {
851
+ class: normalizeClass(unref(ns).e("inner"))
852
+ },
853
+ null,
854
+ 2
855
+ )
856
+ ],
857
+ 2
858
+ ),
859
+ createElementVNode(
860
+ "span",
861
+ {
862
+ class: normalizeClass(unref(ns).e("label")),
863
+ onKeydown: _cache[4] || (_cache[4] = withModifiers(() => {
864
+ }, ["stop"]))
865
+ },
866
+ [
867
+ renderSlot(_ctx.$slots, "default", {}, () => [
868
+ createTextVNode(
869
+ toDisplayString(_ctx.label),
870
+ 1
871
+ )
872
+ ])
873
+ ],
874
+ 34
875
+ )
876
+ ],
877
+ 2
878
+ );
1012
879
  };
1013
880
  }
1014
881
  });
1015
- var Radio = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "radio.vue"]]);
882
+ var Radio = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio.vue"]]);
1016
883
 
1017
884
  const radioButtonProps = buildProps({
1018
885
  ...radioPropsBase
1019
886
  });
1020
887
 
1021
- const __default__$1 = defineComponent({
1022
- name: "ElRadioButton"
1023
- });
1024
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1025
- ...__default__$1,
888
+ const _hoisted_1$1 = ["value", "name", "disabled"];
889
+ const _sfc_main$1 = defineComponent({
890
+ ...{
891
+ name: "ElRadioButton"
892
+ },
893
+ __name: "radio-button",
1026
894
  props: radioButtonProps,
1027
895
  setup(__props) {
1028
896
  const props = __props;
@@ -1038,46 +906,59 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1038
906
  });
1039
907
  return (_ctx, _cache) => {
1040
908
  var _a;
1041
- return openBlock(), createElementBlock("label", {
1042
- class: normalizeClass([
1043
- unref(ns).b("button"),
1044
- unref(ns).is("active", unref(modelValue) === unref(actualValue)),
1045
- unref(ns).is("disabled", unref(disabled)),
1046
- unref(ns).is("focus", unref(focus)),
1047
- unref(ns).bm("button", unref(size))
1048
- ])
1049
- }, [
1050
- withDirectives(createElementVNode("input", {
1051
- ref_key: "radioRef",
1052
- ref: radioRef,
1053
- "onUpdate:modelValue": ($event) => isRef(modelValue) ? modelValue.value = $event : null,
1054
- class: normalizeClass(unref(ns).be("button", "original-radio")),
1055
- value: unref(actualValue),
1056
- type: "radio",
1057
- name: _ctx.name || ((_a = unref(radioGroup)) == null ? void 0 : _a.name),
1058
- disabled: unref(disabled),
1059
- onFocus: ($event) => focus.value = true,
1060
- onBlur: ($event) => focus.value = false,
1061
- onClick: withModifiers(() => {
1062
- }, ["stop"])
1063
- }, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "onFocus", "onBlur", "onClick"]), [
1064
- [vModelRadio, unref(modelValue)]
1065
- ]),
1066
- createElementVNode("span", {
1067
- class: normalizeClass(unref(ns).be("button", "inner")),
1068
- style: normalizeStyle(unref(modelValue) === unref(actualValue) ? unref(activeStyle) : {}),
1069
- onKeydown: withModifiers(() => {
1070
- }, ["stop"])
1071
- }, [
1072
- renderSlot(_ctx.$slots, "default", {}, () => [
1073
- createTextVNode(toDisplayString(_ctx.label), 1)
909
+ return openBlock(), createElementBlock(
910
+ "label",
911
+ {
912
+ class: normalizeClass([
913
+ unref(ns).b("button"),
914
+ unref(ns).is("active", unref(modelValue) === unref(actualValue)),
915
+ unref(ns).is("disabled", unref(disabled)),
916
+ unref(ns).is("focus", unref(focus)),
917
+ unref(ns).bm("button", unref(size))
1074
918
  ])
1075
- ], 46, ["onKeydown"])
1076
- ], 2);
919
+ },
920
+ [
921
+ withDirectives(createElementVNode("input", {
922
+ ref_key: "radioRef",
923
+ ref: radioRef,
924
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
925
+ class: normalizeClass(unref(ns).be("button", "original-radio")),
926
+ value: unref(actualValue),
927
+ type: "radio",
928
+ name: _ctx.name || ((_a = unref(radioGroup)) == null ? void 0 : _a.name),
929
+ disabled: unref(disabled),
930
+ onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true),
931
+ onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false),
932
+ onClick: _cache[3] || (_cache[3] = withModifiers(() => {
933
+ }, ["stop"]))
934
+ }, null, 42, _hoisted_1$1), [
935
+ [vModelRadio, unref(modelValue)]
936
+ ]),
937
+ createElementVNode(
938
+ "span",
939
+ {
940
+ class: normalizeClass(unref(ns).be("button", "inner")),
941
+ style: normalizeStyle(unref(modelValue) === unref(actualValue) ? activeStyle.value : {}),
942
+ onKeydown: _cache[4] || (_cache[4] = withModifiers(() => {
943
+ }, ["stop"]))
944
+ },
945
+ [
946
+ renderSlot(_ctx.$slots, "default", {}, () => [
947
+ createTextVNode(
948
+ toDisplayString(_ctx.label),
949
+ 1
950
+ )
951
+ ])
952
+ ],
953
+ 38
954
+ )
955
+ ],
956
+ 2
957
+ );
1077
958
  };
1078
959
  }
1079
960
  });
1080
- var RadioButton = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "radio-button.vue"]]);
961
+ var RadioButton = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-button.vue"]]);
1081
962
 
1082
963
  const radioGroupProps = buildProps({
1083
964
  id: {
@@ -1130,15 +1011,17 @@ const radioDefaultProps = {
1130
1011
  disabled: "disabled"
1131
1012
  };
1132
1013
 
1133
- const __default__ = defineComponent({
1134
- name: "ElRadioGroup"
1135
- });
1136
- const _sfc_main = /* @__PURE__ */ defineComponent({
1137
- ...__default__,
1014
+ const _hoisted_1 = ["id", "aria-label", "aria-labelledby"];
1015
+ const _sfc_main = defineComponent({
1016
+ ...{
1017
+ name: "ElRadioGroup"
1018
+ },
1019
+ __name: "radio-group",
1138
1020
  props: radioGroupProps,
1139
1021
  emits: radioGroupEmits,
1140
- setup(__props, { emit }) {
1022
+ setup(__props, { emit: __emit }) {
1141
1023
  const props = __props;
1024
+ const emit = __emit;
1142
1025
  const ns = useNamespace("radio");
1143
1026
  const radioId = useId();
1144
1027
  const radioGroupRef = ref();
@@ -1173,17 +1056,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1173
1056
  };
1174
1057
  return { ...omit(option, [label, value, disabled]), ...base };
1175
1058
  };
1176
- const optionComponent = computed(() => props.type === "button" ? RadioButton : Radio);
1177
- provide(radioGroupKey, reactive({
1178
- ...toRefs(props),
1179
- changeEvent,
1180
- name
1181
- }));
1182
- watch(() => props.modelValue, (newVal, oldValue) => {
1183
- if (props.validateEvent && !isEqual(newVal, oldValue)) {
1184
- formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
1059
+ const optionComponent = computed(
1060
+ () => props.type === "button" ? RadioButton : Radio
1061
+ );
1062
+ provide(
1063
+ radioGroupKey,
1064
+ reactive({
1065
+ ...toRefs(props),
1066
+ changeEvent,
1067
+ name
1068
+ })
1069
+ );
1070
+ watch(
1071
+ () => props.modelValue,
1072
+ (newVal, oldValue) => {
1073
+ if (props.validateEvent && !isEqual(newVal, oldValue)) {
1074
+ formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
1075
+ }
1185
1076
  }
1186
- });
1077
+ );
1187
1078
  return (_ctx, _cache) => {
1188
1079
  return openBlock(), createElementBlock("div", {
1189
1080
  id: unref(groupId),
@@ -1195,15 +1086,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1195
1086
  "aria-labelledby": unref(isLabeledByFormItem) ? unref(formItem).labelId : void 0
1196
1087
  }, [
1197
1088
  renderSlot(_ctx.$slots, "default", {}, () => [
1198
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (item, index) => {
1199
- return openBlock(), createBlock(resolveDynamicComponent(unref(optionComponent)), mergeProps({ key: index }, getOptionProps(item)), null, 16);
1200
- }), 128))
1089
+ (openBlock(true), createElementBlock(
1090
+ Fragment,
1091
+ null,
1092
+ renderList(_ctx.options, (item, index) => {
1093
+ return openBlock(), createBlock(
1094
+ resolveDynamicComponent(optionComponent.value),
1095
+ mergeProps({ key: index }, { ref_for: true }, getOptionProps(item)),
1096
+ null,
1097
+ 16
1098
+ );
1099
+ }),
1100
+ 128
1101
+ ))
1201
1102
  ])
1202
- ], 10, ["id", "aria-label", "aria-labelledby"]);
1103
+ ], 10, _hoisted_1);
1203
1104
  };
1204
1105
  }
1205
1106
  });
1206
- var RadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "radio-group.vue"]]);
1107
+ var RadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-group.vue"]]);
1207
1108
 
1208
1109
  const ElRadio = withInstall(Radio, {
1209
1110
  RadioButton,