@wfrog/vc-ui 1.11.10 → 1.11.11

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 (134) hide show
  1. package/dist/es/chunk/Bw0Rhd-r.mjs +110 -0
  2. package/dist/es/chunk/CqTdDZkE.mjs +31 -0
  3. package/dist/es/chunk/{DAnWZLYj.mjs → CzWfBa_8.mjs} +96 -2
  4. package/dist/es/chunk/D229kQ56.mjs +28 -0
  5. package/dist/es/chunk/{Cxx_YWUC.mjs → DcouM6gM.mjs} +6 -548
  6. package/dist/es/chunk/Fo0dZYnz.mjs +128 -0
  7. package/dist/es/chunk/KanuIcmc.mjs +412 -0
  8. package/dist/es/chunk/{B71xEPfK.mjs → uuUHUjSk.mjs} +4 -35
  9. package/dist/es/components/backbottom/backbottom.mjs +3 -2
  10. package/dist/es/components/button/button.mjs +4 -5
  11. package/dist/es/components/choice/choice.mjs +4 -4
  12. package/dist/es/components/choice/index.css +1 -1
  13. package/dist/es/components/color-switch/color-switch.mjs +73 -1046
  14. package/dist/es/components/color-switch/index.css +1 -1
  15. package/dist/es/components/cropper/cropper.mjs +11 -117
  16. package/dist/es/components/cropper/index.css +1 -1
  17. package/dist/es/components/currency/currency.mjs +4 -5
  18. package/dist/es/components/daterange-picker/daterange-picker.mjs +8 -6253
  19. package/dist/es/components/dialog/dialog.mjs +7 -400
  20. package/dist/es/components/dialog/index.css +1 -1
  21. package/dist/es/components/dialog-camera-upload/dialog-camera-upload.mjs +10 -11
  22. package/dist/es/components/dialog-map-point/dialog-map-point.mjs +4 -3
  23. package/dist/es/components/dialog-upload-images/dialog-upload-images.mjs +9 -1374
  24. package/dist/es/components/dialog-upload-images/index.css +1 -1
  25. package/dist/es/components/drag-verify/drag-verify.mjs +3 -2
  26. package/dist/es/components/drawer/drawer.mjs +10 -352
  27. package/dist/es/components/drawer/index.css +1 -1
  28. package/dist/es/components/easy-pagination/easy-pagination.mjs +3 -2
  29. package/dist/es/components/explorer/explorer.mjs +3 -3
  30. package/dist/es/components/explorer-column-table/explorer-column-table.mjs +5 -7
  31. package/dist/es/components/explorer-column-table/index.css +1 -1
  32. package/dist/es/components/explorer-container/explorer-container.d.ts +1 -1
  33. package/dist/es/components/explorer-container/explorer-container.mjs +4 -3
  34. package/dist/es/components/explorer-filter/explorer-filter.mjs +5 -4
  35. package/dist/es/components/explorer-footer/explorer-footer.mjs +4 -8
  36. package/dist/es/components/explorer-form/explorer-form.mjs +4 -3
  37. package/dist/es/components/explorer-list/explorer-list.mjs +5 -4
  38. package/dist/es/components/explorer-modal-form/explorer-modal-form.mjs +4 -3
  39. package/dist/es/components/explorer-panel/explorer-panel.mjs +3 -3
  40. package/dist/es/components/explorer-query/explorer-query.mjs +9 -2201
  41. package/dist/es/components/explorer-query/index.css +1 -1
  42. package/dist/es/components/explorer-table/explorer-table.mjs +5 -8
  43. package/dist/es/components/explorer-tools/explorer-tools.mjs +13 -264
  44. package/dist/es/components/explorer-tools/index.css +1 -1
  45. package/dist/es/components/explorer-tree/explorer-tree.mjs +4 -5
  46. package/dist/es/components/icon-picker/icon-picker.mjs +8 -12
  47. package/dist/es/components/image/image.mjs +4 -4
  48. package/dist/es/components/info-tooltip/info-tooltip.mjs +336 -4
  49. package/dist/es/components/input/input.mjs +3 -2
  50. package/dist/es/components/input-number/input-number.mjs +3 -3
  51. package/dist/es/components/pca-picker/index.css +1 -1
  52. package/dist/es/components/pca-picker/pca-picker.mjs +443 -601
  53. package/dist/es/components/screenfull/screenfull.mjs +4 -3
  54. package/dist/es/components/scrollbar/scrollbar.mjs +3 -2
  55. package/dist/es/components/select/select.mjs +3 -5
  56. package/dist/es/components/single-player/index.css +1 -1
  57. package/dist/es/components/single-player/single-player.mjs +10 -1087
  58. package/dist/es/components/splitter/splitter.mjs +3 -3
  59. package/dist/es/components/splitter-panel/splitter-panel.mjs +3 -3
  60. package/dist/es/components/switch/index.css +1 -1
  61. package/dist/es/components/switch/switch.mjs +9 -395
  62. package/dist/es/components/tags/tags.mjs +7 -9
  63. package/dist/es/components/text-ellipsis/text-ellipsis.mjs +3 -3
  64. package/dist/es/components/thousand-input/thousand-input.mjs +33 -1
  65. package/dist/es/components/tinymce/tinymce.mjs +4 -3
  66. package/dist/es/components/transfer/transfer.mjs +3 -4
  67. package/dist/es/components/transfer-panel/transfer-panel.mjs +5 -4
  68. package/dist/es/components/tree-picker/popover-cascader.css +1 -1
  69. package/dist/es/components/tree-picker/tree-picker.mjs +5 -10
  70. package/dist/es/index.mjs +1 -1
  71. package/dist/index.css +13 -40
  72. package/package.json +1 -1
  73. package/dist/es/chunk/B-rxnVJv.mjs +0 -3
  74. package/dist/es/chunk/B5HpgPRt.mjs +0 -69
  75. package/dist/es/chunk/BBhZKpIc.mjs +0 -2179
  76. package/dist/es/chunk/BDcsaNYa.mjs +0 -59
  77. package/dist/es/chunk/BTSSEFfD.mjs +0 -319
  78. package/dist/es/chunk/BTpNRPQW.mjs +0 -55
  79. package/dist/es/chunk/BVBK1U57.mjs +0 -96
  80. package/dist/es/chunk/Bc6yUGLs.mjs +0 -45
  81. package/dist/es/chunk/BjVI1XMz.mjs +0 -40
  82. package/dist/es/chunk/BlzQCBDu.mjs +0 -5741
  83. package/dist/es/chunk/BpJKnxlF.mjs +0 -476
  84. package/dist/es/chunk/Brp-qSBw.mjs +0 -2003
  85. package/dist/es/chunk/BunQI8Jb.mjs +0 -390
  86. package/dist/es/chunk/C0XgBrDz.mjs +0 -775
  87. package/dist/es/chunk/C0pTANRX.mjs +0 -109
  88. package/dist/es/chunk/CBMjhoFP.mjs +0 -101
  89. package/dist/es/chunk/CBiNtNvQ.mjs +0 -242
  90. package/dist/es/chunk/CBlJeNBO.mjs +0 -890
  91. package/dist/es/chunk/CCVL_Zj-.mjs +0 -427
  92. package/dist/es/chunk/CEl4MyfJ.mjs +0 -252
  93. package/dist/es/chunk/CJK5_jsA.mjs +0 -53
  94. package/dist/es/chunk/CKOcwq5V.mjs +0 -44
  95. package/dist/es/chunk/COs9dJZa.mjs +0 -66
  96. package/dist/es/chunk/CPt6MxJW.mjs +0 -375
  97. package/dist/es/chunk/CVqW0jzp.mjs +0 -107
  98. package/dist/es/chunk/CccIsEqA.mjs +0 -128
  99. package/dist/es/chunk/CjLR27-a.mjs +0 -582
  100. package/dist/es/chunk/CoGexPPD.mjs +0 -2192
  101. package/dist/es/chunk/CsLIbnzG.mjs +0 -64
  102. package/dist/es/chunk/Ct6q2FXg.mjs +0 -5
  103. package/dist/es/chunk/Cuq5meQh.mjs +0 -184
  104. package/dist/es/chunk/CvYIOfT1.mjs +0 -23
  105. package/dist/es/chunk/CxHJBf4l.mjs +0 -31
  106. package/dist/es/chunk/CzdaOBtA.mjs +0 -66
  107. package/dist/es/chunk/D0QTifnI.mjs +0 -54
  108. package/dist/es/chunk/D1QnA2iT.mjs +0 -229
  109. package/dist/es/chunk/D3AvJlVX.mjs +0 -188
  110. package/dist/es/chunk/D9Lr0Bzb.mjs +0 -1136
  111. package/dist/es/chunk/DCkPv0hy.mjs +0 -29
  112. package/dist/es/chunk/DRwwUUhy.mjs +0 -49
  113. package/dist/es/chunk/DX-2VRY2.mjs +0 -836
  114. package/dist/es/chunk/DZ2oTFad.mjs +0 -687
  115. package/dist/es/chunk/D_bou1py.mjs +0 -55
  116. package/dist/es/chunk/Da199A5L.mjs +0 -314
  117. package/dist/es/chunk/DbhQlaOz.mjs +0 -94
  118. package/dist/es/chunk/Dgu95mOy.mjs +0 -237
  119. package/dist/es/chunk/DhGOsWxx.mjs +0 -6
  120. package/dist/es/chunk/Dm_Sj5aH.mjs +0 -487
  121. package/dist/es/chunk/Dmi-1GRO.mjs +0 -163
  122. package/dist/es/chunk/DodoD9a9.mjs +0 -52
  123. package/dist/es/chunk/DrrVDcwm.mjs +0 -955
  124. package/dist/es/chunk/Du_zJ1Fz.mjs +0 -49
  125. package/dist/es/chunk/DxxbB5jY.mjs +0 -34
  126. package/dist/es/chunk/Gk1J52Yw.mjs +0 -207
  127. package/dist/es/chunk/NsldgdCh.mjs +0 -704
  128. package/dist/es/chunk/V6KjsUQN.mjs +0 -35
  129. package/dist/es/chunk/eEsLFV3s.mjs +0 -76
  130. package/dist/es/chunk/fqiLhk0V.mjs +0 -2065
  131. package/dist/es/chunk/nxVM7re4.mjs +0 -35
  132. package/dist/es/chunk/s7HLrANj.mjs +0 -215
  133. package/dist/es/chunk/vPhxogl3.mjs +0 -19
  134. package/dist/es/components/icon/icon2.mjs +0 -27
@@ -1,487 +0,0 @@
1
- import { defineComponent, ref, reactive, computed, watch, onMounted, onUpdated, createElementBlock, openBlock, withModifiers, normalizeClass, unref, withDirectives, createCommentVNode, createVNode, withKeys, renderSlot, withCtx, createBlock, createSlots } from 'vue';
2
- import { E as ElInput } from './DX-2VRY2.mjs';
3
- import { E as ElIcon } from './D0QTifnI.mjs';
4
- import { ArrowDown, Minus, ArrowUp, Plus } from '@element-plus/icons-vue';
5
- import { b as buildProps, d as definePropType, u as useNamespace, a as debugWarn, t as throwError, i as isString } from './Gk1J52Yw.mjs';
6
- import { u as useSizeProp } from './vPhxogl3.mjs';
7
- import { b as isNumber, i as isNil, c as isUndefined } from './Bc6yUGLs.mjs';
8
- import { u as useAriaProps } from './BunQI8Jb.mjs';
9
- import { U as UPDATE_MODEL_EVENT, I as INPUT_EVENT, C as CHANGE_EVENT } from './Ct6q2FXg.mjs';
10
- import { _ as _export_sfc, w as withInstall } from './V6KjsUQN.mjs';
11
- import { v as vRepeatClick } from './D_bou1py.mjs';
12
- import { g as getEventCode, a as getEventKey, E as EVENT_CODE } from './BTpNRPQW.mjs';
13
- import { u as useLocale } from './CEl4MyfJ.mjs';
14
- import { u as useFormItem, c as useFormSize, a as useFormDisabled } from './CBMjhoFP.mjs';
15
-
16
- const inputNumberProps = buildProps({
17
- id: {
18
- type: String,
19
- default: void 0
20
- },
21
- step: {
22
- type: Number,
23
- default: 1
24
- },
25
- stepStrictly: Boolean,
26
- max: {
27
- type: Number,
28
- default: Number.MAX_SAFE_INTEGER
29
- },
30
- min: {
31
- type: Number,
32
- default: Number.MIN_SAFE_INTEGER
33
- },
34
- modelValue: {
35
- type: [Number, null]
36
- },
37
- readonly: Boolean,
38
- disabled: {
39
- type: Boolean,
40
- default: void 0
41
- },
42
- size: useSizeProp,
43
- controls: {
44
- type: Boolean,
45
- default: true
46
- },
47
- controlsPosition: {
48
- type: String,
49
- default: "",
50
- values: ["", "right"]
51
- },
52
- valueOnClear: {
53
- type: definePropType([String, Number, null]),
54
- validator: (val) => val === null || isNumber(val) || ["min", "max"].includes(val),
55
- default: null
56
- },
57
- name: String,
58
- placeholder: String,
59
- precision: {
60
- type: Number,
61
- validator: (val) => val >= 0 && val === Number.parseInt(`${val}`, 10)
62
- },
63
- validateEvent: {
64
- type: Boolean,
65
- default: true
66
- },
67
- ...useAriaProps(["ariaLabel"]),
68
- inputmode: {
69
- type: definePropType(String),
70
- default: void 0
71
- },
72
- align: {
73
- type: definePropType(String),
74
- default: "center"
75
- },
76
- disabledScientific: Boolean
77
- });
78
- const inputNumberEmits = {
79
- [CHANGE_EVENT]: (cur, prev) => prev !== cur,
80
- blur: (e) => e instanceof FocusEvent,
81
- focus: (e) => e instanceof FocusEvent,
82
- [INPUT_EVENT]: (val) => isNumber(val) || isNil(val),
83
- [UPDATE_MODEL_EVENT]: (val) => isNumber(val) || isNil(val)
84
- };
85
-
86
- const _hoisted_1 = ["aria-label"];
87
- const _hoisted_2 = ["aria-label"];
88
- const _sfc_main = defineComponent({
89
- ...{
90
- name: "ElInputNumber"
91
- },
92
- __name: "input-number",
93
- props: inputNumberProps,
94
- emits: inputNumberEmits,
95
- setup(__props, { expose: __expose, emit: __emit }) {
96
- const props = __props;
97
- const emit = __emit;
98
- const { t } = useLocale();
99
- const ns = useNamespace("input-number");
100
- const input = ref();
101
- const data = reactive({
102
- currentValue: props.modelValue,
103
- userInput: null
104
- });
105
- const { formItem } = useFormItem();
106
- const minDisabled = computed(
107
- () => isNumber(props.modelValue) && props.modelValue <= props.min
108
- );
109
- const maxDisabled = computed(
110
- () => isNumber(props.modelValue) && props.modelValue >= props.max
111
- );
112
- const numPrecision = computed(() => {
113
- const stepPrecision = getPrecision(props.step);
114
- if (!isUndefined(props.precision)) {
115
- if (stepPrecision > props.precision) {
116
- debugWarn(
117
- "InputNumber",
118
- "precision should not be less than the decimal places of step"
119
- );
120
- }
121
- return props.precision;
122
- } else {
123
- return Math.max(getPrecision(props.modelValue), stepPrecision);
124
- }
125
- });
126
- const controlsAtRight = computed(() => {
127
- return props.controls && props.controlsPosition === "right";
128
- });
129
- const inputNumberSize = useFormSize();
130
- const inputNumberDisabled = useFormDisabled();
131
- const displayValue = computed(() => {
132
- if (data.userInput !== null) {
133
- return data.userInput;
134
- }
135
- let currentValue = data.currentValue;
136
- if (isNil(currentValue))
137
- return "";
138
- if (isNumber(currentValue)) {
139
- if (Number.isNaN(currentValue))
140
- return "";
141
- if (!isUndefined(props.precision)) {
142
- currentValue = currentValue.toFixed(props.precision);
143
- }
144
- }
145
- return currentValue;
146
- });
147
- const toPrecision = (num, pre) => {
148
- if (isUndefined(pre))
149
- pre = numPrecision.value;
150
- if (pre === 0)
151
- return Math.round(num);
152
- let snum = String(num);
153
- const pointPos = snum.indexOf(".");
154
- if (pointPos === -1)
155
- return num;
156
- const nums = snum.replace(".", "").split("");
157
- const datum = nums[pointPos + pre];
158
- if (!datum)
159
- return num;
160
- const length = snum.length;
161
- if (snum.charAt(length - 1) === "5") {
162
- snum = `${snum.slice(0, Math.max(0, length - 1))}6`;
163
- }
164
- return Number.parseFloat(Number(snum).toFixed(pre));
165
- };
166
- const getPrecision = (value) => {
167
- if (isNil(value))
168
- return 0;
169
- const valueString = value.toString();
170
- const dotPosition = valueString.indexOf(".");
171
- let precision = 0;
172
- if (dotPosition !== -1) {
173
- precision = valueString.length - dotPosition - 1;
174
- }
175
- return precision;
176
- };
177
- const ensurePrecision = (val, coefficient = 1) => {
178
- if (!isNumber(val))
179
- return data.currentValue;
180
- if (val >= Number.MAX_SAFE_INTEGER && coefficient === 1) {
181
- debugWarn(
182
- "InputNumber",
183
- "The value has reached the maximum safe integer limit."
184
- );
185
- return val;
186
- } else if (val <= Number.MIN_SAFE_INTEGER && coefficient === -1) {
187
- debugWarn(
188
- "InputNumber",
189
- "The value has reached the minimum safe integer limit."
190
- );
191
- return val;
192
- }
193
- return toPrecision(val + props.step * coefficient);
194
- };
195
- const handleKeydown = (event) => {
196
- const code = getEventCode(event);
197
- const key = getEventKey(event);
198
- if (props.disabledScientific && ["e", "E"].includes(key)) {
199
- event.preventDefault();
200
- return;
201
- }
202
- switch (code) {
203
- case EVENT_CODE.up: {
204
- event.preventDefault();
205
- increase();
206
- break;
207
- }
208
- case EVENT_CODE.down: {
209
- event.preventDefault();
210
- decrease();
211
- break;
212
- }
213
- }
214
- };
215
- const increase = () => {
216
- if (props.readonly || inputNumberDisabled.value || maxDisabled.value)
217
- return;
218
- const value = Number(displayValue.value) || 0;
219
- const newVal = ensurePrecision(value);
220
- setCurrentValue(newVal);
221
- emit(INPUT_EVENT, data.currentValue);
222
- setCurrentValueToModelValue();
223
- };
224
- const decrease = () => {
225
- if (props.readonly || inputNumberDisabled.value || minDisabled.value)
226
- return;
227
- const value = Number(displayValue.value) || 0;
228
- const newVal = ensurePrecision(value, -1);
229
- setCurrentValue(newVal);
230
- emit(INPUT_EVENT, data.currentValue);
231
- setCurrentValueToModelValue();
232
- };
233
- const verifyValue = (value, update) => {
234
- const { max, min, step, precision, stepStrictly, valueOnClear } = props;
235
- if (max < min) {
236
- throwError("InputNumber", "min should not be greater than max.");
237
- }
238
- let newVal = Number(value);
239
- if (isNil(value) || Number.isNaN(newVal)) {
240
- return null;
241
- }
242
- if (value === "") {
243
- if (valueOnClear === null) {
244
- return null;
245
- }
246
- newVal = isString(valueOnClear) ? { min, max }[valueOnClear] : valueOnClear;
247
- }
248
- if (stepStrictly) {
249
- newVal = toPrecision(
250
- Math.round(toPrecision(newVal / step)) * step,
251
- precision
252
- );
253
- if (newVal !== value) {
254
- update && emit(UPDATE_MODEL_EVENT, newVal);
255
- }
256
- }
257
- if (!isUndefined(precision)) {
258
- newVal = toPrecision(newVal, precision);
259
- }
260
- if (newVal > max || newVal < min) {
261
- newVal = newVal > max ? max : min;
262
- update && emit(UPDATE_MODEL_EVENT, newVal);
263
- }
264
- return newVal;
265
- };
266
- const setCurrentValue = (value, emitChange = true) => {
267
- var _a;
268
- const oldVal = data.currentValue;
269
- const newVal = verifyValue(value);
270
- if (!emitChange) {
271
- emit(UPDATE_MODEL_EVENT, newVal);
272
- return;
273
- }
274
- data.userInput = null;
275
- if (oldVal === newVal && value)
276
- return;
277
- emit(UPDATE_MODEL_EVENT, newVal);
278
- if (oldVal !== newVal) {
279
- emit(CHANGE_EVENT, newVal, oldVal);
280
- }
281
- if (props.validateEvent) {
282
- (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change").catch((err) => debugWarn(err));
283
- }
284
- data.currentValue = newVal;
285
- };
286
- const handleInput = (value) => {
287
- data.userInput = value;
288
- const newVal = value === "" ? null : Number(value);
289
- emit(INPUT_EVENT, newVal);
290
- setCurrentValue(newVal, false);
291
- };
292
- const handleInputChange = (value) => {
293
- const newVal = value !== "" ? Number(value) : "";
294
- if (isNumber(newVal) && !Number.isNaN(newVal) || value === "") {
295
- setCurrentValue(newVal);
296
- }
297
- setCurrentValueToModelValue();
298
- data.userInput = null;
299
- };
300
- const focus = () => {
301
- var _a, _b;
302
- (_b = (_a = input.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);
303
- };
304
- const blur = () => {
305
- var _a, _b;
306
- (_b = (_a = input.value) == null ? void 0 : _a.blur) == null ? void 0 : _b.call(_a);
307
- };
308
- const handleFocus = (event) => {
309
- emit("focus", event);
310
- };
311
- const handleBlur = (event) => {
312
- var _a, _b;
313
- data.userInput = null;
314
- if (data.currentValue === null && ((_a = input.value) == null ? void 0 : _a.input)) {
315
- input.value.input.value = "";
316
- }
317
- emit("blur", event);
318
- if (props.validateEvent) {
319
- (_b = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _b.call(formItem, "blur").catch((err) => debugWarn(err));
320
- }
321
- };
322
- const setCurrentValueToModelValue = () => {
323
- if (data.currentValue !== props.modelValue) {
324
- data.currentValue = props.modelValue;
325
- }
326
- };
327
- const handleWheel = (e) => {
328
- if (document.activeElement === e.target)
329
- e.preventDefault();
330
- };
331
- watch(
332
- () => props.modelValue,
333
- (value, oldValue) => {
334
- const newValue = verifyValue(value, true);
335
- if (data.userInput === null && newValue !== oldValue) {
336
- data.currentValue = newValue;
337
- }
338
- },
339
- { immediate: true }
340
- );
341
- watch(
342
- () => props.precision,
343
- () => {
344
- data.currentValue = verifyValue(props.modelValue);
345
- }
346
- );
347
- onMounted(() => {
348
- var _a;
349
- const { min, max, modelValue } = props;
350
- const innerInput = (_a = input.value) == null ? void 0 : _a.input;
351
- innerInput.setAttribute("role", "spinbutton");
352
- if (Number.isFinite(max)) {
353
- innerInput.setAttribute("aria-valuemax", String(max));
354
- } else {
355
- innerInput.removeAttribute("aria-valuemax");
356
- }
357
- if (Number.isFinite(min)) {
358
- innerInput.setAttribute("aria-valuemin", String(min));
359
- } else {
360
- innerInput.removeAttribute("aria-valuemin");
361
- }
362
- innerInput.setAttribute(
363
- "aria-valuenow",
364
- data.currentValue || data.currentValue === 0 ? String(data.currentValue) : ""
365
- );
366
- innerInput.setAttribute("aria-disabled", String(inputNumberDisabled.value));
367
- if (!isNumber(modelValue) && modelValue != null) {
368
- let val = Number(modelValue);
369
- if (Number.isNaN(val)) {
370
- val = null;
371
- }
372
- emit(UPDATE_MODEL_EVENT, val);
373
- }
374
- innerInput.addEventListener("wheel", handleWheel, { passive: false });
375
- });
376
- onUpdated(() => {
377
- var _a, _b;
378
- const innerInput = (_a = input.value) == null ? void 0 : _a.input;
379
- innerInput == null ? void 0 : innerInput.setAttribute("aria-valuenow", `${(_b = data.currentValue) != null ? _b : ""}`);
380
- });
381
- __expose({
382
- focus,
383
- blur
384
- });
385
- return (_ctx, _cache) => {
386
- return openBlock(), createElementBlock(
387
- "div",
388
- {
389
- class: normalizeClass([
390
- unref(ns).b(),
391
- unref(ns).m(unref(inputNumberSize)),
392
- unref(ns).is("disabled", unref(inputNumberDisabled)),
393
- unref(ns).is("without-controls", !_ctx.controls),
394
- unref(ns).is("controls-right", controlsAtRight.value),
395
- unref(ns).is(_ctx.align, !!_ctx.align)
396
- ]),
397
- onDragstart: _cache[0] || (_cache[0] = withModifiers(() => {
398
- }, ["prevent"]))
399
- },
400
- [
401
- _ctx.controls ? withDirectives((openBlock(), createElementBlock("span", {
402
- key: 0,
403
- role: "button",
404
- "aria-label": unref(t)("el.inputNumber.decrease"),
405
- class: normalizeClass([unref(ns).e("decrease"), unref(ns).is("disabled", minDisabled.value)]),
406
- onKeydown: withKeys(decrease, ["enter"])
407
- }, [
408
- renderSlot(_ctx.$slots, "decrease-icon", {}, () => [
409
- createVNode(unref(ElIcon), null, {
410
- default: withCtx(() => [
411
- controlsAtRight.value ? (openBlock(), createBlock(unref(ArrowDown), { key: 0 })) : (openBlock(), createBlock(unref(Minus), { key: 1 }))
412
- ]),
413
- _: 1
414
- })
415
- ])
416
- ], 42, _hoisted_1)), [
417
- [unref(vRepeatClick), decrease]
418
- ]) : createCommentVNode("v-if", true),
419
- _ctx.controls ? withDirectives((openBlock(), createElementBlock("span", {
420
- key: 1,
421
- role: "button",
422
- "aria-label": unref(t)("el.inputNumber.increase"),
423
- class: normalizeClass([unref(ns).e("increase"), unref(ns).is("disabled", maxDisabled.value)]),
424
- onKeydown: withKeys(increase, ["enter"])
425
- }, [
426
- renderSlot(_ctx.$slots, "increase-icon", {}, () => [
427
- createVNode(unref(ElIcon), null, {
428
- default: withCtx(() => [
429
- controlsAtRight.value ? (openBlock(), createBlock(unref(ArrowUp), { key: 0 })) : (openBlock(), createBlock(unref(Plus), { key: 1 }))
430
- ]),
431
- _: 1
432
- })
433
- ])
434
- ], 42, _hoisted_2)), [
435
- [unref(vRepeatClick), increase]
436
- ]) : createCommentVNode("v-if", true),
437
- createVNode(unref(ElInput), {
438
- id: _ctx.id,
439
- ref_key: "input",
440
- ref: input,
441
- type: "number",
442
- step: _ctx.step,
443
- "model-value": displayValue.value,
444
- placeholder: _ctx.placeholder,
445
- readonly: _ctx.readonly,
446
- disabled: unref(inputNumberDisabled),
447
- size: unref(inputNumberSize),
448
- max: _ctx.max,
449
- min: _ctx.min,
450
- name: _ctx.name,
451
- "aria-label": _ctx.ariaLabel,
452
- "validate-event": false,
453
- inputmode: _ctx.inputmode,
454
- onKeydown: handleKeydown,
455
- onBlur: handleBlur,
456
- onFocus: handleFocus,
457
- onInput: handleInput,
458
- onChange: handleInputChange
459
- }, createSlots({
460
- _: 2
461
- }, [
462
- _ctx.$slots.prefix ? {
463
- name: "prefix",
464
- fn: withCtx(() => [
465
- renderSlot(_ctx.$slots, "prefix")
466
- ]),
467
- key: "0"
468
- } : void 0,
469
- _ctx.$slots.suffix ? {
470
- name: "suffix",
471
- fn: withCtx(() => [
472
- renderSlot(_ctx.$slots, "suffix")
473
- ]),
474
- key: "1"
475
- } : void 0
476
- ]), 1032, ["id", "step", "model-value", "placeholder", "readonly", "disabled", "size", "max", "min", "name", "aria-label", "inputmode"])
477
- ],
478
- 34
479
- );
480
- };
481
- }
482
- });
483
- var InputNumber = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/input-number/src/input-number.vue"]]);
484
-
485
- const ElInputNumber = withInstall(InputNumber);
486
-
487
- export { ElInputNumber as E };
@@ -1,163 +0,0 @@
1
- import { defineComponent, computed, createElementBlock, createBlock, openBlock, normalizeStyle, normalizeClass, createElementVNode, createCommentVNode, unref, renderSlot, withModifiers, createVNode, withCtx, Transition } from 'vue';
2
- import { E as ElIcon } from './D0QTifnI.mjs';
3
- import { Close } from '@element-plus/icons-vue';
4
- import { b as buildProps, u as useNamespace } from './Gk1J52Yw.mjs';
5
- import { c as componentSizes } from './vPhxogl3.mjs';
6
- import { _ as _export_sfc, w as withInstall } from './V6KjsUQN.mjs';
7
- import { c as useFormSize } from './CBMjhoFP.mjs';
8
- import { u as useLocale } from './CEl4MyfJ.mjs';
9
-
10
- const tagProps = buildProps({
11
- type: {
12
- type: String,
13
- values: ["primary", "success", "info", "warning", "danger"],
14
- default: "primary"
15
- },
16
- closable: Boolean,
17
- disableTransitions: Boolean,
18
- hit: Boolean,
19
- color: String,
20
- size: {
21
- type: String,
22
- values: componentSizes
23
- },
24
- effect: {
25
- type: String,
26
- values: ["dark", "light", "plain"],
27
- default: "light"
28
- },
29
- round: Boolean
30
- });
31
- const tagEmits = {
32
- close: (evt) => evt instanceof MouseEvent,
33
- click: (evt) => evt instanceof MouseEvent
34
- };
35
-
36
- const _hoisted_1 = ["aria-label"];
37
- const _hoisted_2 = ["aria-label"];
38
- const _sfc_main = defineComponent({
39
- ...{
40
- name: "ElTag"
41
- },
42
- __name: "tag",
43
- props: tagProps,
44
- emits: tagEmits,
45
- setup(__props, { emit: __emit }) {
46
- const props = __props;
47
- const emit = __emit;
48
- const tagSize = useFormSize();
49
- const { t } = useLocale();
50
- const ns = useNamespace("tag");
51
- const containerKls = computed(() => {
52
- const { type, hit, effect, closable, round } = props;
53
- return [
54
- ns.b(),
55
- ns.is("closable", closable),
56
- ns.m(type || "primary"),
57
- ns.m(tagSize.value),
58
- ns.m(effect),
59
- ns.is("hit", hit),
60
- ns.is("round", round)
61
- ];
62
- });
63
- const handleClose = (event) => {
64
- emit("close", event);
65
- };
66
- const handleClick = (event) => {
67
- emit("click", event);
68
- };
69
- const handleVNodeMounted = (vnode) => {
70
- var _a, _b, _c;
71
- if ((_c = (_b = (_a = vnode == null ? void 0 : vnode.component) == null ? void 0 : _a.subTree) == null ? void 0 : _b.component) == null ? void 0 : _c.bum) {
72
- vnode.component.subTree.component.bum = null;
73
- }
74
- };
75
- return (_ctx, _cache) => {
76
- return _ctx.disableTransitions ? (openBlock(), createElementBlock(
77
- "span",
78
- {
79
- key: 0,
80
- class: normalizeClass(containerKls.value),
81
- style: normalizeStyle({ backgroundColor: _ctx.color }),
82
- onClick: handleClick
83
- },
84
- [
85
- createElementVNode(
86
- "span",
87
- {
88
- class: normalizeClass(unref(ns).e("content"))
89
- },
90
- [
91
- renderSlot(_ctx.$slots, "default")
92
- ],
93
- 2
94
- ),
95
- _ctx.closable ? (openBlock(), createElementBlock("button", {
96
- key: 0,
97
- "aria-label": unref(t)("el.tag.close"),
98
- class: normalizeClass(unref(ns).e("close")),
99
- type: "button",
100
- onClick: withModifiers(handleClose, ["stop"])
101
- }, [
102
- createVNode(unref(ElIcon), null, {
103
- default: withCtx(() => [
104
- createVNode(unref(Close))
105
- ]),
106
- _: 1
107
- })
108
- ], 10, _hoisted_1)) : createCommentVNode("v-if", true)
109
- ],
110
- 6
111
- )) : (openBlock(), createBlock(Transition, {
112
- key: 1,
113
- name: `${unref(ns).namespace.value}-zoom-in-center`,
114
- appear: "",
115
- onVnodeMounted: handleVNodeMounted
116
- }, {
117
- default: withCtx(() => [
118
- createElementVNode(
119
- "span",
120
- {
121
- class: normalizeClass(containerKls.value),
122
- style: normalizeStyle({ backgroundColor: _ctx.color }),
123
- onClick: handleClick
124
- },
125
- [
126
- createElementVNode(
127
- "span",
128
- {
129
- class: normalizeClass(unref(ns).e("content"))
130
- },
131
- [
132
- renderSlot(_ctx.$slots, "default")
133
- ],
134
- 2
135
- ),
136
- _ctx.closable ? (openBlock(), createElementBlock("button", {
137
- key: 0,
138
- "aria-label": unref(t)("el.tag.close"),
139
- class: normalizeClass(unref(ns).e("close")),
140
- type: "button",
141
- onClick: withModifiers(handleClose, ["stop"])
142
- }, [
143
- createVNode(unref(ElIcon), null, {
144
- default: withCtx(() => [
145
- createVNode(unref(Close))
146
- ]),
147
- _: 1
148
- })
149
- ], 10, _hoisted_2)) : createCommentVNode("v-if", true)
150
- ],
151
- 6
152
- )
153
- ]),
154
- _: 3
155
- }, 8, ["name"]));
156
- };
157
- }
158
- });
159
- var Tag = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tag/src/tag.vue"]]);
160
-
161
- const ElTag = withInstall(Tag);
162
-
163
- export { ElTag as E, tagProps as t };
@@ -1,52 +0,0 @@
1
- import { b as isNumber, h as isStringNumber } from './Bc6yUGLs.mjs';
2
- import { isClient } from '@vueuse/core';
3
- import { i as isString, a as debugWarn, q as camelize } from './Gk1J52Yw.mjs';
4
-
5
- const SCOPE = "utils/dom/style";
6
- const classNameToArray = (cls = "") => cls.split(" ").filter((item) => !!item.trim());
7
- const hasClass = (el, cls) => {
8
- if (!el || !cls)
9
- return false;
10
- if (cls.includes(" "))
11
- throw new Error("className should not contain space.");
12
- return el.classList.contains(cls);
13
- };
14
- const addClass = (el, cls) => {
15
- if (!el || !cls.trim())
16
- return;
17
- el.classList.add(...classNameToArray(cls));
18
- };
19
- const removeClass = (el, cls) => {
20
- if (!el || !cls.trim())
21
- return;
22
- el.classList.remove(...classNameToArray(cls));
23
- };
24
- const getStyle = (element, styleName) => {
25
- var _a;
26
- if (!isClient || !element || !styleName)
27
- return "";
28
- let key = camelize(styleName);
29
- if (key === "float")
30
- key = "cssFloat";
31
- try {
32
- const style = element.style[key];
33
- if (style)
34
- return style;
35
- const computed = (_a = document.defaultView) == null ? void 0 : _a.getComputedStyle(element, "");
36
- return computed ? computed[key] : "";
37
- } catch (e) {
38
- return element.style[key];
39
- }
40
- };
41
- function addUnit(value, defaultUnit = "px") {
42
- if (!value && value !== 0)
43
- return "";
44
- if (isNumber(value) || isStringNumber(value)) {
45
- return `${value}${defaultUnit}`;
46
- } else if (isString(value)) {
47
- return value;
48
- }
49
- debugWarn(SCOPE, "binding value must be a string or number");
50
- }
51
-
52
- export { addUnit as a, addClass as b, getStyle as g, hasClass as h, removeClass as r };