@element-plus/nightly 0.0.20221215 → 0.0.20221217
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.
- package/dist/index.full.js +3 -3
- package/dist/index.full.min.js +3 -3
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +8 -8
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +3 -3
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/color-picker/index.mjs +2 -2
- package/es/components/color-picker/src/color-picker.mjs +320 -38
- package/es/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker2.mjs +38 -320
- package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
- package/es/components/color-picker/src/components/predefine.mjs +1 -1
- package/es/components/index.mjs +1 -1
- package/es/components/input-number/src/input-number2.mjs +1 -1
- package/es/components/input-number/src/input-number2.mjs.map +1 -1
- package/es/components/pagination/src/components/pager.mjs +17 -207
- package/es/components/pagination/src/components/pager.mjs.map +1 -1
- package/es/components/pagination/src/components/pager2.mjs +207 -17
- package/es/components/pagination/src/components/pager2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/color-picker/index.js +2 -2
- package/lib/components/color-picker/src/color-picker.js +318 -38
- package/lib/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/components/color-picker/src/color-picker2.js +38 -318
- package/lib/components/color-picker/src/color-picker2.js.map +1 -1
- package/lib/components/color-picker/src/components/predefine.js +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/input-number/src/input-number2.js +1 -1
- package/lib/components/input-number/src/input-number2.js.map +1 -1
- package/lib/components/pagination/src/components/pager.js +17 -207
- package/lib/components/pagination/src/components/pager.js.map +1 -1
- package/lib/components/pagination/src/components/pager2.js +207 -17
- package/lib/components/pagination/src/components/pager2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +1 -1
- package/lib/index.js +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
|
@@ -2,330 +2,50 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var vue = require('vue');
|
|
6
5
|
var lodashUnified = require('lodash-unified');
|
|
7
|
-
|
|
8
|
-
var index$8 = require('../../icon/index.js');
|
|
9
|
-
require('../../../directives/index.js');
|
|
6
|
+
require('../../../utils/index.js');
|
|
10
7
|
require('../../../hooks/index.js');
|
|
11
|
-
var index$4 = require('../../tooltip/index.js');
|
|
12
|
-
var index$5 = require('../../input/index.js');
|
|
13
8
|
require('../../../constants/index.js');
|
|
14
|
-
require('../../../utils/
|
|
15
|
-
var
|
|
16
|
-
var alphaSlider = require('./components/alpha-slider.js');
|
|
17
|
-
var hueSlider = require('./components/hue-slider.js');
|
|
18
|
-
var predefine = require('./components/predefine.js');
|
|
19
|
-
var svPanel = require('./components/sv-panel.js');
|
|
20
|
-
var color = require('./utils/color.js');
|
|
21
|
-
var colorPicker = require('./color-picker.js');
|
|
22
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
23
|
-
var index = require('../../../hooks/use-locale/index.js');
|
|
24
|
-
var index$1 = require('../../../hooks/use-namespace/index.js');
|
|
25
|
-
var index$2 = require('../../../hooks/use-form-item/index.js');
|
|
26
|
-
var index$3 = require('../../../hooks/use-common-props/index.js');
|
|
9
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
10
|
+
var index = require('../../../hooks/use-common-props/index.js');
|
|
27
11
|
var event = require('../../../constants/event.js');
|
|
28
|
-
var
|
|
29
|
-
var index$7 = require('../../../directives/click-outside/index.js');
|
|
12
|
+
var shared = require('@vue/shared');
|
|
30
13
|
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
format: props.colorFormat || "",
|
|
57
|
-
value: props.modelValue
|
|
58
|
-
}));
|
|
59
|
-
const showPicker = vue.ref(false);
|
|
60
|
-
const showPanelColor = vue.ref(false);
|
|
61
|
-
const customInput = vue.ref("");
|
|
62
|
-
const displayedColor = vue.computed(() => {
|
|
63
|
-
if (!props.modelValue && !showPanelColor.value) {
|
|
64
|
-
return "transparent";
|
|
65
|
-
}
|
|
66
|
-
return displayedRgb(color$1, props.showAlpha);
|
|
67
|
-
});
|
|
68
|
-
const currentColor = vue.computed(() => {
|
|
69
|
-
return !props.modelValue && !showPanelColor.value ? "" : color$1.value;
|
|
70
|
-
});
|
|
71
|
-
const buttonAriaLabel = vue.computed(() => {
|
|
72
|
-
return !isLabeledByFormItem.value ? props.label || t("el.colorpicker.defaultLabel") : void 0;
|
|
73
|
-
});
|
|
74
|
-
const buttonAriaLabelledby = vue.computed(() => {
|
|
75
|
-
return isLabeledByFormItem.value ? formItem == null ? void 0 : formItem.labelId : void 0;
|
|
76
|
-
});
|
|
77
|
-
const btnKls = vue.computed(() => {
|
|
78
|
-
return [
|
|
79
|
-
ns.b("picker"),
|
|
80
|
-
ns.is("disabled", colorDisabled.value),
|
|
81
|
-
ns.bm("picker", colorSize.value)
|
|
82
|
-
];
|
|
83
|
-
});
|
|
84
|
-
function displayedRgb(color2, showAlpha) {
|
|
85
|
-
if (!(color2 instanceof color["default"])) {
|
|
86
|
-
throw new TypeError("color should be instance of _color Class");
|
|
87
|
-
}
|
|
88
|
-
const { r, g, b } = color2.toRgb();
|
|
89
|
-
return showAlpha ? `rgba(${r}, ${g}, ${b}, ${color2.get("alpha") / 100})` : `rgb(${r}, ${g}, ${b})`;
|
|
90
|
-
}
|
|
91
|
-
function setShowPicker(value) {
|
|
92
|
-
showPicker.value = value;
|
|
93
|
-
}
|
|
94
|
-
const debounceSetShowPicker = lodashUnified.debounce(setShowPicker, 100);
|
|
95
|
-
function hide() {
|
|
96
|
-
debounceSetShowPicker(false);
|
|
97
|
-
resetColor();
|
|
98
|
-
}
|
|
99
|
-
function resetColor() {
|
|
100
|
-
vue.nextTick(() => {
|
|
101
|
-
if (props.modelValue) {
|
|
102
|
-
color$1.fromString(props.modelValue);
|
|
103
|
-
} else {
|
|
104
|
-
color$1.value = "";
|
|
105
|
-
vue.nextTick(() => {
|
|
106
|
-
showPanelColor.value = false;
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
function handleTrigger() {
|
|
112
|
-
if (colorDisabled.value)
|
|
113
|
-
return;
|
|
114
|
-
debounceSetShowPicker(!showPicker.value);
|
|
115
|
-
}
|
|
116
|
-
function handleConfirm() {
|
|
117
|
-
color$1.fromString(customInput.value);
|
|
118
|
-
}
|
|
119
|
-
function confirmValue() {
|
|
120
|
-
const value = color$1.value;
|
|
121
|
-
emit(event.UPDATE_MODEL_EVENT, value);
|
|
122
|
-
emit("change", value);
|
|
123
|
-
if (props.validateEvent) {
|
|
124
|
-
formItem == null ? void 0 : formItem.validate("change").catch((err) => error.debugWarn(err));
|
|
125
|
-
}
|
|
126
|
-
debounceSetShowPicker(false);
|
|
127
|
-
vue.nextTick(() => {
|
|
128
|
-
const newColor = new color["default"]({
|
|
129
|
-
enableAlpha: props.showAlpha,
|
|
130
|
-
format: props.colorFormat || "",
|
|
131
|
-
value: props.modelValue
|
|
132
|
-
});
|
|
133
|
-
if (!color$1.compare(newColor)) {
|
|
134
|
-
resetColor();
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
function clear() {
|
|
139
|
-
debounceSetShowPicker(false);
|
|
140
|
-
emit(event.UPDATE_MODEL_EVENT, null);
|
|
141
|
-
emit("change", null);
|
|
142
|
-
if (props.modelValue !== null && props.validateEvent) {
|
|
143
|
-
formItem == null ? void 0 : formItem.validate("change").catch((err) => error.debugWarn(err));
|
|
144
|
-
}
|
|
145
|
-
resetColor();
|
|
146
|
-
}
|
|
147
|
-
vue.onMounted(() => {
|
|
148
|
-
if (props.modelValue) {
|
|
149
|
-
customInput.value = currentColor.value;
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
vue.watch(() => props.modelValue, (newVal) => {
|
|
153
|
-
if (!newVal) {
|
|
154
|
-
showPanelColor.value = false;
|
|
155
|
-
} else if (newVal && newVal !== color$1.value) {
|
|
156
|
-
shouldActiveChange = false;
|
|
157
|
-
color$1.fromString(newVal);
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
vue.watch(() => currentColor.value, (val) => {
|
|
161
|
-
customInput.value = val;
|
|
162
|
-
shouldActiveChange && emit("activeChange", val);
|
|
163
|
-
shouldActiveChange = true;
|
|
164
|
-
});
|
|
165
|
-
vue.watch(() => color$1.value, () => {
|
|
166
|
-
if (!props.modelValue && !showPanelColor.value) {
|
|
167
|
-
showPanelColor.value = true;
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
vue.watch(() => showPicker.value, () => {
|
|
171
|
-
vue.nextTick(() => {
|
|
172
|
-
var _a, _b, _c;
|
|
173
|
-
(_a = hue.value) == null ? void 0 : _a.update();
|
|
174
|
-
(_b = sv.value) == null ? void 0 : _b.update();
|
|
175
|
-
(_c = alpha.value) == null ? void 0 : _c.update();
|
|
176
|
-
});
|
|
177
|
-
});
|
|
178
|
-
vue.provide(colorPicker.colorPickerContextKey, {
|
|
179
|
-
currentColor
|
|
180
|
-
});
|
|
181
|
-
expose({
|
|
182
|
-
color: color$1
|
|
183
|
-
});
|
|
184
|
-
return (_ctx, _cache) => {
|
|
185
|
-
return vue.openBlock(), vue.createBlock(vue.unref(index$4.ElTooltip), {
|
|
186
|
-
ref_key: "popper",
|
|
187
|
-
ref: popper,
|
|
188
|
-
visible: showPicker.value,
|
|
189
|
-
"show-arrow": false,
|
|
190
|
-
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
191
|
-
offset: 0,
|
|
192
|
-
"gpu-acceleration": false,
|
|
193
|
-
"popper-class": [vue.unref(ns).be("picker", "panel"), vue.unref(ns).b("dropdown"), _ctx.popperClass],
|
|
194
|
-
"stop-popper-mouse-event": false,
|
|
195
|
-
effect: "light",
|
|
196
|
-
trigger: "click",
|
|
197
|
-
transition: `${vue.unref(ns).namespace.value}-zoom-in-top`,
|
|
198
|
-
persistent: ""
|
|
199
|
-
}, {
|
|
200
|
-
content: vue.withCtx(() => [
|
|
201
|
-
vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", null, [
|
|
202
|
-
vue.createElementVNode("div", {
|
|
203
|
-
class: vue.normalizeClass(vue.unref(ns).be("dropdown", "main-wrapper"))
|
|
204
|
-
}, [
|
|
205
|
-
vue.createVNode(hueSlider["default"], {
|
|
206
|
-
ref_key: "hue",
|
|
207
|
-
ref: hue,
|
|
208
|
-
class: "hue-slider",
|
|
209
|
-
color: vue.unref(color$1),
|
|
210
|
-
vertical: ""
|
|
211
|
-
}, null, 8, ["color"]),
|
|
212
|
-
vue.createVNode(svPanel["default"], {
|
|
213
|
-
ref: "svPanel",
|
|
214
|
-
color: vue.unref(color$1)
|
|
215
|
-
}, null, 8, ["color"])
|
|
216
|
-
], 2),
|
|
217
|
-
_ctx.showAlpha ? (vue.openBlock(), vue.createBlock(alphaSlider["default"], {
|
|
218
|
-
key: 0,
|
|
219
|
-
ref_key: "alpha",
|
|
220
|
-
ref: alpha,
|
|
221
|
-
color: vue.unref(color$1)
|
|
222
|
-
}, null, 8, ["color"])) : vue.createCommentVNode("v-if", true),
|
|
223
|
-
_ctx.predefine ? (vue.openBlock(), vue.createBlock(predefine["default"], {
|
|
224
|
-
key: 1,
|
|
225
|
-
ref: "predefine",
|
|
226
|
-
color: vue.unref(color$1),
|
|
227
|
-
colors: _ctx.predefine
|
|
228
|
-
}, null, 8, ["color", "colors"])) : vue.createCommentVNode("v-if", true),
|
|
229
|
-
vue.createElementVNode("div", {
|
|
230
|
-
class: vue.normalizeClass(vue.unref(ns).be("dropdown", "btns"))
|
|
231
|
-
}, [
|
|
232
|
-
vue.createElementVNode("span", {
|
|
233
|
-
class: vue.normalizeClass(vue.unref(ns).be("dropdown", "value"))
|
|
234
|
-
}, [
|
|
235
|
-
vue.createVNode(vue.unref(index$5.ElInput), {
|
|
236
|
-
modelValue: customInput.value,
|
|
237
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => customInput.value = $event),
|
|
238
|
-
"validate-event": false,
|
|
239
|
-
size: "small",
|
|
240
|
-
onKeyup: vue.withKeys(handleConfirm, ["enter"]),
|
|
241
|
-
onBlur: handleConfirm
|
|
242
|
-
}, null, 8, ["modelValue", "onKeyup"])
|
|
243
|
-
], 2),
|
|
244
|
-
vue.createVNode(vue.unref(index$6.ElButton), {
|
|
245
|
-
class: vue.normalizeClass(vue.unref(ns).be("dropdown", "link-btn")),
|
|
246
|
-
text: "",
|
|
247
|
-
size: "small",
|
|
248
|
-
onClick: clear
|
|
249
|
-
}, {
|
|
250
|
-
default: vue.withCtx(() => [
|
|
251
|
-
vue.createTextVNode(vue.toDisplayString(vue.unref(t)("el.colorpicker.clear")), 1)
|
|
252
|
-
]),
|
|
253
|
-
_: 1
|
|
254
|
-
}, 8, ["class"]),
|
|
255
|
-
vue.createVNode(vue.unref(index$6.ElButton), {
|
|
256
|
-
plain: "",
|
|
257
|
-
size: "small",
|
|
258
|
-
class: vue.normalizeClass(vue.unref(ns).be("dropdown", "btn")),
|
|
259
|
-
onClick: confirmValue
|
|
260
|
-
}, {
|
|
261
|
-
default: vue.withCtx(() => [
|
|
262
|
-
vue.createTextVNode(vue.toDisplayString(vue.unref(t)("el.colorpicker.confirm")), 1)
|
|
263
|
-
]),
|
|
264
|
-
_: 1
|
|
265
|
-
}, 8, ["class"])
|
|
266
|
-
], 2)
|
|
267
|
-
])), [
|
|
268
|
-
[vue.unref(index$7["default"]), hide]
|
|
269
|
-
])
|
|
270
|
-
]),
|
|
271
|
-
default: vue.withCtx(() => [
|
|
272
|
-
vue.createElementVNode("div", {
|
|
273
|
-
id: vue.unref(buttonId),
|
|
274
|
-
class: vue.normalizeClass(vue.unref(btnKls)),
|
|
275
|
-
role: "button",
|
|
276
|
-
"aria-label": vue.unref(buttonAriaLabel),
|
|
277
|
-
"aria-labelledby": vue.unref(buttonAriaLabelledby),
|
|
278
|
-
"aria-description": vue.unref(t)("el.colorpicker.description", { color: _ctx.modelValue || "" }),
|
|
279
|
-
tabindex: _ctx.tabindex,
|
|
280
|
-
onKeydown: vue.withKeys(handleTrigger, ["enter"])
|
|
281
|
-
}, [
|
|
282
|
-
vue.unref(colorDisabled) ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
283
|
-
key: 0,
|
|
284
|
-
class: vue.normalizeClass(vue.unref(ns).be("picker", "mask"))
|
|
285
|
-
}, null, 2)) : vue.createCommentVNode("v-if", true),
|
|
286
|
-
vue.createElementVNode("div", {
|
|
287
|
-
class: vue.normalizeClass(vue.unref(ns).be("picker", "trigger")),
|
|
288
|
-
onClick: handleTrigger
|
|
289
|
-
}, [
|
|
290
|
-
vue.createElementVNode("span", {
|
|
291
|
-
class: vue.normalizeClass([vue.unref(ns).be("picker", "color"), vue.unref(ns).is("alpha", _ctx.showAlpha)])
|
|
292
|
-
}, [
|
|
293
|
-
vue.createElementVNode("span", {
|
|
294
|
-
class: vue.normalizeClass(vue.unref(ns).be("picker", "color-inner")),
|
|
295
|
-
style: vue.normalizeStyle({
|
|
296
|
-
backgroundColor: vue.unref(displayedColor)
|
|
297
|
-
})
|
|
298
|
-
}, [
|
|
299
|
-
vue.withDirectives(vue.createVNode(vue.unref(index$8.ElIcon), {
|
|
300
|
-
class: vue.normalizeClass([vue.unref(ns).be("picker", "icon"), vue.unref(ns).is("icon-arrow-down")])
|
|
301
|
-
}, {
|
|
302
|
-
default: vue.withCtx(() => [
|
|
303
|
-
vue.createVNode(vue.unref(iconsVue.ArrowDown))
|
|
304
|
-
]),
|
|
305
|
-
_: 1
|
|
306
|
-
}, 8, ["class"]), [
|
|
307
|
-
[vue.vShow, _ctx.modelValue || showPanelColor.value]
|
|
308
|
-
]),
|
|
309
|
-
!_ctx.modelValue && !showPanelColor.value ? (vue.openBlock(), vue.createBlock(vue.unref(index$8.ElIcon), {
|
|
310
|
-
key: 0,
|
|
311
|
-
class: vue.normalizeClass([vue.unref(ns).be("picker", "empty"), vue.unref(ns).is("icon-close")])
|
|
312
|
-
}, {
|
|
313
|
-
default: vue.withCtx(() => [
|
|
314
|
-
vue.createVNode(vue.unref(iconsVue.Close))
|
|
315
|
-
]),
|
|
316
|
-
_: 1
|
|
317
|
-
}, 8, ["class"])) : vue.createCommentVNode("v-if", true)
|
|
318
|
-
], 6)
|
|
319
|
-
], 2)
|
|
320
|
-
], 2)
|
|
321
|
-
], 42, _hoisted_1)
|
|
322
|
-
]),
|
|
323
|
-
_: 1
|
|
324
|
-
}, 8, ["visible", "popper-class", "transition"]);
|
|
325
|
-
};
|
|
14
|
+
const colorPickerProps = runtime.buildProps({
|
|
15
|
+
modelValue: String,
|
|
16
|
+
id: String,
|
|
17
|
+
showAlpha: Boolean,
|
|
18
|
+
colorFormat: String,
|
|
19
|
+
disabled: Boolean,
|
|
20
|
+
size: index.useSizeProp,
|
|
21
|
+
popperClass: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: ""
|
|
24
|
+
},
|
|
25
|
+
label: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: void 0
|
|
28
|
+
},
|
|
29
|
+
tabindex: {
|
|
30
|
+
type: [String, Number],
|
|
31
|
+
default: 0
|
|
32
|
+
},
|
|
33
|
+
predefine: {
|
|
34
|
+
type: runtime.definePropType(Array)
|
|
35
|
+
},
|
|
36
|
+
validateEvent: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: true
|
|
326
39
|
}
|
|
327
40
|
});
|
|
328
|
-
|
|
41
|
+
const colorPickerEmits = {
|
|
42
|
+
[event.UPDATE_MODEL_EVENT]: (val) => shared.isString(val) || lodashUnified.isNil(val),
|
|
43
|
+
[event.CHANGE_EVENT]: (val) => shared.isString(val) || lodashUnified.isNil(val),
|
|
44
|
+
activeChange: (val) => shared.isString(val) || lodashUnified.isNil(val)
|
|
45
|
+
};
|
|
46
|
+
const colorPickerContextKey = Symbol("colorPickerContextKey");
|
|
329
47
|
|
|
330
|
-
exports
|
|
48
|
+
exports.colorPickerContextKey = colorPickerContextKey;
|
|
49
|
+
exports.colorPickerEmits = colorPickerEmits;
|
|
50
|
+
exports.colorPickerProps = colorPickerProps;
|
|
331
51
|
//# sourceMappingURL=color-picker2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-picker2.js","sources":["../../../../../../packages/components/color-picker/src/color-picker.vue"],"sourcesContent":["<template>\n <el-tooltip\n ref=\"popper\"\n :visible=\"showPicker\"\n :show-arrow=\"false\"\n :fallback-placements=\"['bottom', 'top', 'right', 'left']\"\n :offset=\"0\"\n :gpu-acceleration=\"false\"\n :popper-class=\"[ns.be('picker', 'panel'), ns.b('dropdown'), popperClass]\"\n :stop-popper-mouse-event=\"false\"\n effect=\"light\"\n trigger=\"click\"\n :transition=\"`${ns.namespace.value}-zoom-in-top`\"\n persistent\n >\n <template #content>\n <div v-click-outside=\"hide\">\n <div :class=\"ns.be('dropdown', 'main-wrapper')\">\n <hue-slider ref=\"hue\" class=\"hue-slider\" :color=\"color\" vertical />\n <sv-panel ref=\"svPanel\" :color=\"color\" />\n </div>\n <alpha-slider v-if=\"showAlpha\" ref=\"alpha\" :color=\"color\" />\n <predefine\n v-if=\"predefine\"\n ref=\"predefine\"\n :color=\"color\"\n :colors=\"predefine\"\n />\n <div :class=\"ns.be('dropdown', 'btns')\">\n <span :class=\"ns.be('dropdown', 'value')\">\n <el-input\n v-model=\"customInput\"\n :validate-event=\"false\"\n size=\"small\"\n @keyup.enter=\"handleConfirm\"\n @blur=\"handleConfirm\"\n />\n </span>\n <el-button\n :class=\"ns.be('dropdown', 'link-btn')\"\n text\n size=\"small\"\n @click=\"clear\"\n >\n {{ t('el.colorpicker.clear') }}\n </el-button>\n <el-button\n plain\n size=\"small\"\n :class=\"ns.be('dropdown', 'btn')\"\n @click=\"confirmValue\"\n >\n {{ t('el.colorpicker.confirm') }}\n </el-button>\n </div>\n </div>\n </template>\n <template #default>\n <div\n :id=\"buttonId\"\n :class=\"btnKls\"\n role=\"button\"\n :aria-label=\"buttonAriaLabel\"\n :aria-labelledby=\"buttonAriaLabelledby\"\n :aria-description=\"\n t('el.colorpicker.description', { color: modelValue || '' })\n \"\n :tabindex=\"tabindex\"\n @keydown.enter=\"handleTrigger\"\n >\n <div v-if=\"colorDisabled\" :class=\"ns.be('picker', 'mask')\" />\n <div :class=\"ns.be('picker', 'trigger')\" @click=\"handleTrigger\">\n <span :class=\"[ns.be('picker', 'color'), ns.is('alpha', showAlpha)]\">\n <span\n :class=\"ns.be('picker', 'color-inner')\"\n :style=\"{\n backgroundColor: displayedColor,\n }\"\n >\n <el-icon\n v-show=\"modelValue || showPanelColor\"\n :class=\"[ns.be('picker', 'icon'), ns.is('icon-arrow-down')]\"\n >\n <arrow-down />\n </el-icon>\n <el-icon\n v-if=\"!modelValue && !showPanelColor\"\n :class=\"[ns.be('picker', 'empty'), ns.is('icon-close')]\"\n >\n <close />\n </el-icon>\n </span>\n </span>\n </div>\n </div>\n </template>\n </el-tooltip>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n nextTick,\n onMounted,\n provide,\n reactive,\n ref,\n watch,\n} from 'vue'\nimport { debounce } from 'lodash-unified'\nimport { ElButton } from '@element-plus/components/button'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { ClickOutside as vClickOutside } from '@element-plus/directives'\nimport {\n useDisabled,\n useFormItem,\n useFormItemInputId,\n useLocale,\n useNamespace,\n useSize,\n} from '@element-plus/hooks'\nimport { ElTooltip } from '@element-plus/components/tooltip'\nimport { ElInput } from '@element-plus/components/input'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { debugWarn } from '@element-plus/utils'\nimport { ArrowDown, Close } from '@element-plus/icons-vue'\nimport AlphaSlider from './components/alpha-slider.vue'\nimport HueSlider from './components/hue-slider.vue'\nimport Predefine from './components/predefine.vue'\nimport SvPanel from './components/sv-panel.vue'\nimport Color from './utils/color'\nimport {\n colorPickerContextKey,\n colorPickerEmits,\n colorPickerProps,\n} from './color-picker'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\n\ndefineOptions({\n name: 'ElColorPicker',\n})\nconst props = defineProps(colorPickerProps)\nconst emit = defineEmits(colorPickerEmits)\n\nconst { t } = useLocale()\nconst ns = useNamespace('color')\nconst { formItem } = useFormItem()\nconst colorSize = useSize()\nconst colorDisabled = useDisabled()\n\nconst { inputId: buttonId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\n\nconst hue = ref<InstanceType<typeof HueSlider>>()\nconst sv = ref<InstanceType<typeof SvPanel>>()\nconst alpha = ref<InstanceType<typeof AlphaSlider>>()\nconst popper = ref<TooltipInstance>()\n\n// active-change is used to prevent modelValue changes from triggering.\nlet shouldActiveChange = true\n\nconst color = reactive(\n new Color({\n enableAlpha: props.showAlpha,\n format: props.colorFormat || '',\n value: props.modelValue,\n })\n) as Color\n\nconst showPicker = ref(false)\nconst showPanelColor = ref(false)\nconst customInput = ref('')\n\nconst displayedColor = computed(() => {\n if (!props.modelValue && !showPanelColor.value) {\n return 'transparent'\n }\n return displayedRgb(color, props.showAlpha)\n})\n\nconst currentColor = computed(() => {\n return !props.modelValue && !showPanelColor.value ? '' : color.value\n})\n\nconst buttonAriaLabel = computed<string | undefined>(() => {\n return !isLabeledByFormItem.value\n ? props.label || t('el.colorpicker.defaultLabel')\n : undefined\n})\n\nconst buttonAriaLabelledby = computed<string | undefined>(() => {\n return isLabeledByFormItem.value ? formItem?.labelId : undefined\n})\n\nconst btnKls = computed(() => {\n return [\n ns.b('picker'),\n ns.is('disabled', colorDisabled.value),\n ns.bm('picker', colorSize.value),\n ]\n})\n\nfunction displayedRgb(color: Color, showAlpha: boolean) {\n if (!(color instanceof Color)) {\n throw new TypeError('color should be instance of _color Class')\n }\n\n const { r, g, b } = color.toRgb()\n return showAlpha\n ? `rgba(${r}, ${g}, ${b}, ${color.get('alpha') / 100})`\n : `rgb(${r}, ${g}, ${b})`\n}\n\nfunction setShowPicker(value: boolean) {\n showPicker.value = value\n}\n\nconst debounceSetShowPicker = debounce(setShowPicker, 100)\n\nfunction hide() {\n debounceSetShowPicker(false)\n resetColor()\n}\n\nfunction resetColor() {\n nextTick(() => {\n if (props.modelValue) {\n color.fromString(props.modelValue)\n } else {\n color.value = ''\n nextTick(() => {\n showPanelColor.value = false\n })\n }\n })\n}\n\nfunction handleTrigger() {\n if (colorDisabled.value) return\n debounceSetShowPicker(!showPicker.value)\n}\n\nfunction handleConfirm() {\n color.fromString(customInput.value)\n}\n\nfunction confirmValue() {\n const value = color.value\n emit(UPDATE_MODEL_EVENT, value)\n emit('change', value)\n if (props.validateEvent) {\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n debounceSetShowPicker(false)\n // check if modelValue change, if not change, then reset color.\n nextTick(() => {\n const newColor = new Color({\n enableAlpha: props.showAlpha,\n format: props.colorFormat || '',\n value: props.modelValue,\n })\n if (!color.compare(newColor)) {\n resetColor()\n }\n })\n}\n\nfunction clear() {\n debounceSetShowPicker(false)\n emit(UPDATE_MODEL_EVENT, null)\n emit('change', null)\n if (props.modelValue !== null && props.validateEvent) {\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n resetColor()\n}\n\nonMounted(() => {\n if (props.modelValue) {\n customInput.value = currentColor.value\n }\n})\n\nwatch(\n () => props.modelValue,\n (newVal) => {\n if (!newVal) {\n showPanelColor.value = false\n } else if (newVal && newVal !== color.value) {\n shouldActiveChange = false\n color.fromString(newVal)\n }\n }\n)\n\nwatch(\n () => currentColor.value,\n (val) => {\n customInput.value = val\n shouldActiveChange && emit('activeChange', val)\n shouldActiveChange = true\n }\n)\n\nwatch(\n () => color.value,\n () => {\n if (!props.modelValue && !showPanelColor.value) {\n showPanelColor.value = true\n }\n }\n)\n\nwatch(\n () => showPicker.value,\n () => {\n nextTick(() => {\n hue.value?.update()\n sv.value?.update()\n alpha.value?.update()\n })\n }\n)\n\nprovide(colorPickerContextKey, {\n currentColor,\n})\n\ndefineExpose({\n /**\n * @description current color object\n */\n color,\n})\n</script>\n"],"names":["useLocale","useNamespace","useFormItem","useSize","useDisabled","useFormItemInputId","ref","color","reactive","Color","computed","debounce","nextTick","UPDATE_MODEL_EVENT","debugWarn","onMounted","watch","provide","colorPickerContextKey"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCA0Ic,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAM,MAAA,EAAE,MAAMA,eAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAKC,qBAAa,OAAO,CAAA,CAAA;AAC/B,IAAM,MAAA,EAAE,aAAaC,mBAAY,EAAA,CAAA;AACjC,IAAA,MAAM,YAAYC,eAAQ,EAAA,CAAA;AAC1B,IAAA,MAAM,gBAAgBC,mBAAY,EAAA,CAAA;AAElC,IAAA,MAAM,EAAE,OAAA,EAAS,QAAU,EAAA,mBAAA,EAAA,GAAwBC,2BAAmB,KAAO,EAAA;AAAA,MAC3E,eAAiB,EAAA,QAAA;AAAA,KAClB,CAAA,CAAA;AAED,IAAA,MAAM,MAAMC,OAAoC,EAAA,CAAA;AAChD,IAAA,MAAM,KAAKA,OAAkC,EAAA,CAAA;AAC7C,IAAA,MAAM,QAAQA,OAAsC,EAAA,CAAA;AACpD,IAAA,MAAM,SAASA,OAAqB,EAAA,CAAA;AAGpC,IAAA,IAAI,kBAAqB,GAAA,IAAA,CAAA;AAEzB,IAAM,MAAAC,OAAA,GAAQC,YACZ,CAAA,IAAIC,gBAAM,CAAA;AAAA,MACR,aAAa,KAAM,CAAA,SAAA;AAAA,MACnB,MAAA,EAAQ,MAAM,WAAe,IAAA,EAAA;AAAA,MAC7B,OAAO,KAAM,CAAA,UAAA;AAAA,KACd,CACH,CAAA,CAAA;AAEA,IAAM,MAAA,UAAA,GAAaH,QAAI,KAAK,CAAA,CAAA;AAC5B,IAAM,MAAA,cAAA,GAAiBA,QAAI,KAAK,CA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jB,MAAM;AACJ,MAAAJ,YAAA,CAAS,MAAM;AACb,QAAA,IAAI,QAAc,EAAA,CAAA;AAClB,QAAA,CAAA,EAAG,OAAO,KAAO,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,MAAA,EAAA,CAAA;AACjB,QAAA,CAAA,EAAA,GAAM,QAAc,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,MAAA,EAAA,CAAA;AAAA,QACrB,CAAA,EAAA,GAAA,KAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,MAAA,EAAA,CAAA;AAAA,OAEL,CAAA,CAAA;AAEA,KAAA,CAAA,CAAA;AAA+B,IAC7BK,WAAA,CAAAC,iCAAA,EAAA;AAAA,MACD,YAAA;AAED,KAAa,CAAA,CAAA;AAAA,IAIX,MAAA,CAAA;AAAA,aACDX,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"color-picker2.js","sources":["../../../../../../packages/components/color-picker/src/color-picker.ts"],"sourcesContent":["import { isNil } from 'lodash-unified'\nimport { buildProps, definePropType, isString } from '@element-plus/utils'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\n\nimport type { ComputedRef, ExtractPropTypes, InjectionKey } from 'vue'\nimport type ColorPicker from './color-picker.vue'\n\nexport const colorPickerProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: String,\n /**\n * @description ColorPicker id\n */\n id: String,\n /**\n * @description whether to display the alpha slider\n */\n showAlpha: Boolean,\n /**\n * @description color format of v-model\n */\n colorFormat: String,\n /**\n * @description whether to disable the ColorPicker\n */\n disabled: Boolean,\n /**\n * @description size of ColorPicker\n */\n size: useSizeProp,\n /**\n * @description custom class name for ColorPicker's dropdown\n */\n popperClass: {\n type: String,\n default: '',\n },\n /**\n * @description ColorPicker aria-label\n */\n label: {\n type: String,\n default: undefined,\n },\n /**\n * @description ColorPicker tabindex\n */\n tabindex: {\n type: [String, Number],\n default: 0,\n },\n /**\n * @description predefined color options\n */\n predefine: {\n type: definePropType<string[]>(Array),\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport const colorPickerEmits = {\n [UPDATE_MODEL_EVENT]: (val: string | null) => isString(val) || isNil(val),\n [CHANGE_EVENT]: (val: string | null) => isString(val) || isNil(val),\n activeChange: (val: string | null) => isString(val) || isNil(val),\n}\n\nexport type ColorPickerProps = ExtractPropTypes<typeof colorPickerProps>\nexport type ColorPickerEmits = typeof colorPickerEmits\nexport type ColorPickerInstance = InstanceType<typeof ColorPicker>\n\nexport interface ColorPickerContext {\n currentColor: ComputedRef<string>\n}\n\nexport const colorPickerContextKey: InjectionKey<ColorPickerContext> = Symbol(\n 'colorPickerContextKey'\n)\n"],"names":["buildProps","useSizeProp","definePropType","UPDATE_MODEL_EVENT","isString","isNil","CHANGE_EVENT"],"mappings":";;;;;;;;;;;;;AAIY,MAAC,gBAAgB,GAAGA,kBAAU,CAAC;AAC3C,EAAE,UAAU,EAAE,MAAM;AACpB,EAAE,EAAE,EAAE,MAAM;AACZ,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAEC,iBAAW;AACnB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAEC,sBAAc,CAAC,KAAK,CAAC;AAC/B,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,gBAAgB,GAAG;AAChC,EAAE,CAACC,wBAAkB,GAAG,CAAC,GAAG,KAAKC,eAAQ,CAAC,GAAG,CAAC,IAAIC,mBAAK,CAAC,GAAG,CAAC;AAC5D,EAAE,CAACC,kBAAY,GAAG,CAAC,GAAG,KAAKF,eAAQ,CAAC,GAAG,CAAC,IAAIC,mBAAK,CAAC,GAAG,CAAC;AACtD,EAAE,YAAY,EAAE,CAAC,GAAG,KAAKD,eAAQ,CAAC,GAAG,CAAC,IAAIC,mBAAK,CAAC,GAAG,CAAC;AACpD,EAAE;AACU,MAAC,qBAAqB,GAAG,MAAM,CAAC,uBAAuB;;;;;;"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
require('../../../../hooks/index.js');
|
|
7
|
-
var colorPicker = require('../color-
|
|
7
|
+
var colorPicker = require('../color-picker2.js');
|
|
8
8
|
var color = require('../utils/color.js');
|
|
9
9
|
var pluginVue_exportHelper = require('../../../../_virtual/plugin-vue_export-helper.js');
|
|
10
10
|
var index = require('../../../../hooks/use-namespace/index.js');
|
package/lib/components/index.js
CHANGED
|
@@ -99,7 +99,7 @@ var checkbox = require('./checkbox/src/checkbox.js');
|
|
|
99
99
|
var col = require('./col/src/col.js');
|
|
100
100
|
var collapse = require('./collapse/src/collapse.js');
|
|
101
101
|
var collapseItem = require('./collapse/src/collapse-item.js');
|
|
102
|
-
var colorPicker = require('./color-picker/src/color-
|
|
102
|
+
var colorPicker = require('./color-picker/src/color-picker2.js');
|
|
103
103
|
var configProvider = require('./config-provider/src/config-provider.js');
|
|
104
104
|
var countdown = require('./countdown/src/countdown.js');
|
|
105
105
|
var description = require('./descriptions/src/description.js');
|
|
@@ -204,7 +204,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
204
204
|
vue.watch(() => props.modelValue, (value) => {
|
|
205
205
|
const userInput = verifyValue(data.userInput);
|
|
206
206
|
const newValue = verifyValue(value, true);
|
|
207
|
-
if (!userInput || userInput !== newValue) {
|
|
207
|
+
if (!core.isNumber(userInput) && (!userInput || userInput !== newValue)) {
|
|
208
208
|
data.currentValue = newValue;
|
|
209
209
|
data.userInput = null;
|
|
210
210
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-number2.js","sources":["../../../../../../packages/components/input-number/src/input-number.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n ns.b(),\n ns.m(inputNumberSize),\n ns.is('disabled', inputNumberDisabled),\n ns.is('without-controls', !controls),\n ns.is('controls-right', controlsAtRight),\n ]\"\n @dragstart.prevent\n >\n <span\n v-if=\"controls\"\n v-repeat-click=\"decrease\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.decrease')\"\n :class=\"[ns.e('decrease'), ns.is('disabled', minDisabled)]\"\n @keydown.enter=\"decrease\"\n >\n <el-icon>\n <arrow-down v-if=\"controlsAtRight\" />\n <minus v-else />\n </el-icon>\n </span>\n <span\n v-if=\"controls\"\n v-repeat-click=\"increase\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.increase')\"\n :class=\"[ns.e('increase'), ns.is('disabled', maxDisabled)]\"\n @keydown.enter=\"increase\"\n >\n <el-icon>\n <arrow-up v-if=\"controlsAtRight\" />\n <plus v-else />\n </el-icon>\n </span>\n <el-input\n :id=\"id\"\n ref=\"input\"\n type=\"number\"\n :step=\"step\"\n :model-value=\"displayValue\"\n :placeholder=\"placeholder\"\n :readonly=\"readonly\"\n :disabled=\"inputNumberDisabled\"\n :size=\"inputNumberSize\"\n :max=\"max\"\n :min=\"min\"\n :name=\"name\"\n :label=\"label\"\n :validate-event=\"false\"\n @keydown.up.prevent=\"increase\"\n @keydown.down.prevent=\"decrease\"\n @blur=\"handleBlur\"\n @focus=\"handleFocus\"\n @input=\"handleInput\"\n @change=\"handleInputChange\"\n />\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, onMounted, onUpdated, reactive, ref, watch } from 'vue'\nimport { isNil } from 'lodash-unified'\nimport { ElInput } from '@element-plus/components/input'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { vRepeatClick } from '@element-plus/directives'\nimport {\n useDisabled,\n useFormItem,\n useLocale,\n useNamespace,\n useSize,\n} from '@element-plus/hooks'\nimport { debugWarn, isNumber, isString, isUndefined } from '@element-plus/utils'\nimport { ArrowDown, ArrowUp, Minus, Plus } from '@element-plus/icons-vue'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { inputNumberEmits, inputNumberProps } from './input-number'\n\nimport type { InputInstance } from '@element-plus/components/input'\n\ndefineOptions({\n name: 'ElInputNumber',\n})\n\nconst props = defineProps(inputNumberProps)\nconst emit = defineEmits(inputNumberEmits)\n\nconst { t } = useLocale()\nconst ns = useNamespace('input-number')\nconst input = ref<InputInstance>()\n\ninterface Data {\n currentValue: number | null | undefined\n userInput: null | number | string\n}\nconst data = reactive<Data>({\n currentValue: props.modelValue,\n userInput: null,\n})\n\nconst { formItem } = useFormItem()\n\nconst minDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue <= props.min\n)\nconst maxDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue >= props.max\n)\n\nconst numPrecision = computed(() => {\n const stepPrecision = getPrecision(props.step)\n if (!isUndefined(props.precision)) {\n if (stepPrecision > props.precision) {\n debugWarn(\n 'InputNumber',\n 'precision should not be less than the decimal places of step'\n )\n }\n return props.precision\n } else {\n return Math.max(getPrecision(props.modelValue), stepPrecision)\n }\n})\nconst controlsAtRight = computed(() => {\n return props.controls && props.controlsPosition === 'right'\n})\n\nconst inputNumberSize = useSize()\nconst inputNumberDisabled = useDisabled()\n\nconst displayValue = computed(() => {\n if (data.userInput !== null) {\n return data.userInput\n }\n let currentValue: number | string | undefined | null = data.currentValue\n if (isNil(currentValue)) return ''\n if (isNumber(currentValue)) {\n if (Number.isNaN(currentValue)) return ''\n if (!isUndefined(props.precision)) {\n currentValue = currentValue.toFixed(props.precision)\n }\n }\n return currentValue\n})\nconst toPrecision = (num: number, pre?: number) => {\n if (isUndefined(pre)) pre = numPrecision.value\n if (pre === 0) return Math.round(num)\n let snum = String(num)\n const pointPos = snum.indexOf('.')\n if (pointPos === -1) return num\n const nums = snum.replace('.', '').split('')\n const datum = nums[pointPos + pre]\n if (!datum) return num\n const length = snum.length\n if (snum.charAt(length - 1) === '5') {\n snum = `${snum.slice(0, Math.max(0, length - 1))}6`\n }\n return Number.parseFloat(Number(snum).toFixed(pre))\n}\nconst getPrecision = (value: number | null | undefined) => {\n if (isNil(value)) return 0\n const valueString = value.toString()\n const dotPosition = valueString.indexOf('.')\n let precision = 0\n if (dotPosition !== -1) {\n precision = valueString.length - dotPosition - 1\n }\n return precision\n}\nconst ensurePrecision = (val: number, coefficient: 1 | -1 = 1) => {\n if (!isNumber(val)) return data.currentValue\n // Solve the accuracy problem of JS decimal calculation by converting the value to integer.\n return toPrecision(val + props.step * coefficient)\n}\nconst increase = () => {\n if (props.readonly || inputNumberDisabled.value || maxDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n}\nconst decrease = () => {\n if (props.readonly || inputNumberDisabled.value || minDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value, -1)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n}\nconst verifyValue = (\n value: number | string | null | undefined,\n update?: boolean\n): number | null | undefined => {\n const { max, min, step, precision, stepStrictly, valueOnClear } = props\n let newVal = Number(value)\n if (isNil(value) || Number.isNaN(newVal)) {\n return null\n }\n if (value === '') {\n if (valueOnClear === null) {\n return null\n }\n newVal = isString(valueOnClear) ? { min, max }[valueOnClear] : valueOnClear\n }\n if (stepStrictly) {\n newVal = toPrecision(Math.round(newVal / step) * step, precision)\n }\n if (!isUndefined(precision)) {\n newVal = toPrecision(newVal, precision)\n }\n if (newVal > max || newVal < min) {\n newVal = newVal > max ? max : min\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n return newVal\n}\nconst setCurrentValue = (\n value: number | string | null | undefined,\n emitChange = true\n) => {\n const oldVal = data.currentValue\n const newVal = verifyValue(value)\n if (oldVal === newVal) return\n if (!emitChange) {\n emit(UPDATE_MODEL_EVENT, newVal!)\n return\n }\n data.userInput = null\n emit(UPDATE_MODEL_EVENT, newVal!)\n emit(CHANGE_EVENT, newVal!, oldVal!)\n if (props.validateEvent) {\n formItem?.validate?.('change').catch((err) => debugWarn(err))\n }\n data.currentValue = newVal\n}\nconst handleInput = (value: string) => {\n data.userInput = value\n const newVal = value === '' ? null : Number(value)\n emit(INPUT_EVENT, newVal)\n setCurrentValue(newVal, false)\n}\nconst handleInputChange = (value: string) => {\n const newVal = value !== '' ? Number(value) : ''\n if ((isNumber(newVal) && !Number.isNaN(newVal)) || value === '') {\n setCurrentValue(newVal)\n }\n data.userInput = null\n}\n\nconst focus = () => {\n input.value?.focus?.()\n}\n\nconst blur = () => {\n input.value?.blur?.()\n}\n\nconst handleFocus = (event: MouseEvent | FocusEvent) => {\n emit('focus', event)\n}\n\nconst handleBlur = (event: MouseEvent | FocusEvent) => {\n emit('blur', event)\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch((err) => debugWarn(err))\n }\n}\n\nwatch(\n () => props.modelValue,\n (value) => {\n const userInput = verifyValue(data.userInput)\n const newValue = verifyValue(value, true)\n if (!userInput || userInput !== newValue) {\n data.currentValue = newValue\n data.userInput = null\n }\n },\n { immediate: true }\n)\nonMounted(() => {\n const { min, max, modelValue } = props\n const innerInput = input.value?.input as HTMLInputElement\n innerInput.setAttribute('role', 'spinbutton')\n if (Number.isFinite(max)) {\n innerInput.setAttribute('aria-valuemax', String(max))\n } else {\n innerInput.removeAttribute('aria-valuemax')\n }\n if (Number.isFinite(min)) {\n innerInput.setAttribute('aria-valuemin', String(min))\n } else {\n innerInput.removeAttribute('aria-valuemin')\n }\n innerInput.setAttribute('aria-valuenow', String(data.currentValue))\n innerInput.setAttribute('aria-disabled', String(inputNumberDisabled.value))\n if (!isNumber(modelValue) && modelValue != null) {\n let val: number | null = Number(modelValue)\n if (Number.isNaN(val)) {\n val = null\n }\n emit(UPDATE_MODEL_EVENT, val!)\n }\n})\nonUpdated(() => {\n const innerInput = input.value?.input\n innerInput?.setAttribute('aria-valuenow', `${data.currentValue}`)\n})\ndefineExpose({\n /** @description get focus the input component */\n focus,\n /** @description remove focus the input component */\n blur,\n})\n</script>\n"],"names":["useLocale","useNamespace","ref","reactive","useFormItem","computed","isNumber","isUndefined","debugWarn","useSize","useDisabled","isNil","INPUT_EVENT","isString","UPDATE_MODEL_EVENT","watch","onMounted","onUpdated"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAqFc,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAE,MAAMA,eAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAKC,qBAAa,cAAc,CAAA,CAAA;AACtC,IAAA,MAAM,QAAQC,OAAmB,EAAA,CAAA;AAMjC,IAAA,MAAM,OAAOC,YAAe,CAAA;AAAA,MAC1B,cAAc,KAAM,CAAA,UAAA;AAAA,MACpB,SAAW,EAAA,IAAA;AAAA,KACZ,CAAA,CAAA;AAED,IAAM,MAAA,EAAE,aAAaC,mBAAY,EAAA,CAAA;A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,CAAA,KAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"input-number2.js","sources":["../../../../../../packages/components/input-number/src/input-number.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n ns.b(),\n ns.m(inputNumberSize),\n ns.is('disabled', inputNumberDisabled),\n ns.is('without-controls', !controls),\n ns.is('controls-right', controlsAtRight),\n ]\"\n @dragstart.prevent\n >\n <span\n v-if=\"controls\"\n v-repeat-click=\"decrease\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.decrease')\"\n :class=\"[ns.e('decrease'), ns.is('disabled', minDisabled)]\"\n @keydown.enter=\"decrease\"\n >\n <el-icon>\n <arrow-down v-if=\"controlsAtRight\" />\n <minus v-else />\n </el-icon>\n </span>\n <span\n v-if=\"controls\"\n v-repeat-click=\"increase\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.increase')\"\n :class=\"[ns.e('increase'), ns.is('disabled', maxDisabled)]\"\n @keydown.enter=\"increase\"\n >\n <el-icon>\n <arrow-up v-if=\"controlsAtRight\" />\n <plus v-else />\n </el-icon>\n </span>\n <el-input\n :id=\"id\"\n ref=\"input\"\n type=\"number\"\n :step=\"step\"\n :model-value=\"displayValue\"\n :placeholder=\"placeholder\"\n :readonly=\"readonly\"\n :disabled=\"inputNumberDisabled\"\n :size=\"inputNumberSize\"\n :max=\"max\"\n :min=\"min\"\n :name=\"name\"\n :label=\"label\"\n :validate-event=\"false\"\n @keydown.up.prevent=\"increase\"\n @keydown.down.prevent=\"decrease\"\n @blur=\"handleBlur\"\n @focus=\"handleFocus\"\n @input=\"handleInput\"\n @change=\"handleInputChange\"\n />\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, onMounted, onUpdated, reactive, ref, watch } from 'vue'\nimport { isNil } from 'lodash-unified'\nimport { ElInput } from '@element-plus/components/input'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { vRepeatClick } from '@element-plus/directives'\nimport {\n useDisabled,\n useFormItem,\n useLocale,\n useNamespace,\n useSize,\n} from '@element-plus/hooks'\nimport { debugWarn, isNumber, isString, isUndefined } from '@element-plus/utils'\nimport { ArrowDown, ArrowUp, Minus, Plus } from '@element-plus/icons-vue'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { inputNumberEmits, inputNumberProps } from './input-number'\n\nimport type { InputInstance } from '@element-plus/components/input'\n\ndefineOptions({\n name: 'ElInputNumber',\n})\n\nconst props = defineProps(inputNumberProps)\nconst emit = defineEmits(inputNumberEmits)\n\nconst { t } = useLocale()\nconst ns = useNamespace('input-number')\nconst input = ref<InputInstance>()\n\ninterface Data {\n currentValue: number | null | undefined\n userInput: null | number | string\n}\nconst data = reactive<Data>({\n currentValue: props.modelValue,\n userInput: null,\n})\n\nconst { formItem } = useFormItem()\n\nconst minDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue <= props.min\n)\nconst maxDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue >= props.max\n)\n\nconst numPrecision = computed(() => {\n const stepPrecision = getPrecision(props.step)\n if (!isUndefined(props.precision)) {\n if (stepPrecision > props.precision) {\n debugWarn(\n 'InputNumber',\n 'precision should not be less than the decimal places of step'\n )\n }\n return props.precision\n } else {\n return Math.max(getPrecision(props.modelValue), stepPrecision)\n }\n})\nconst controlsAtRight = computed(() => {\n return props.controls && props.controlsPosition === 'right'\n})\n\nconst inputNumberSize = useSize()\nconst inputNumberDisabled = useDisabled()\n\nconst displayValue = computed(() => {\n if (data.userInput !== null) {\n return data.userInput\n }\n let currentValue: number | string | undefined | null = data.currentValue\n if (isNil(currentValue)) return ''\n if (isNumber(currentValue)) {\n if (Number.isNaN(currentValue)) return ''\n if (!isUndefined(props.precision)) {\n currentValue = currentValue.toFixed(props.precision)\n }\n }\n return currentValue\n})\nconst toPrecision = (num: number, pre?: number) => {\n if (isUndefined(pre)) pre = numPrecision.value\n if (pre === 0) return Math.round(num)\n let snum = String(num)\n const pointPos = snum.indexOf('.')\n if (pointPos === -1) return num\n const nums = snum.replace('.', '').split('')\n const datum = nums[pointPos + pre]\n if (!datum) return num\n const length = snum.length\n if (snum.charAt(length - 1) === '5') {\n snum = `${snum.slice(0, Math.max(0, length - 1))}6`\n }\n return Number.parseFloat(Number(snum).toFixed(pre))\n}\nconst getPrecision = (value: number | null | undefined) => {\n if (isNil(value)) return 0\n const valueString = value.toString()\n const dotPosition = valueString.indexOf('.')\n let precision = 0\n if (dotPosition !== -1) {\n precision = valueString.length - dotPosition - 1\n }\n return precision\n}\nconst ensurePrecision = (val: number, coefficient: 1 | -1 = 1) => {\n if (!isNumber(val)) return data.currentValue\n // Solve the accuracy problem of JS decimal calculation by converting the value to integer.\n return toPrecision(val + props.step * coefficient)\n}\nconst increase = () => {\n if (props.readonly || inputNumberDisabled.value || maxDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n}\nconst decrease = () => {\n if (props.readonly || inputNumberDisabled.value || minDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value, -1)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n}\nconst verifyValue = (\n value: number | string | null | undefined,\n update?: boolean\n): number | null | undefined => {\n const { max, min, step, precision, stepStrictly, valueOnClear } = props\n let newVal = Number(value)\n if (isNil(value) || Number.isNaN(newVal)) {\n return null\n }\n if (value === '') {\n if (valueOnClear === null) {\n return null\n }\n newVal = isString(valueOnClear) ? { min, max }[valueOnClear] : valueOnClear\n }\n if (stepStrictly) {\n newVal = toPrecision(Math.round(newVal / step) * step, precision)\n }\n if (!isUndefined(precision)) {\n newVal = toPrecision(newVal, precision)\n }\n if (newVal > max || newVal < min) {\n newVal = newVal > max ? max : min\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n return newVal\n}\nconst setCurrentValue = (\n value: number | string | null | undefined,\n emitChange = true\n) => {\n const oldVal = data.currentValue\n const newVal = verifyValue(value)\n if (oldVal === newVal) return\n if (!emitChange) {\n emit(UPDATE_MODEL_EVENT, newVal!)\n return\n }\n data.userInput = null\n emit(UPDATE_MODEL_EVENT, newVal!)\n emit(CHANGE_EVENT, newVal!, oldVal!)\n if (props.validateEvent) {\n formItem?.validate?.('change').catch((err) => debugWarn(err))\n }\n data.currentValue = newVal\n}\nconst handleInput = (value: string) => {\n data.userInput = value\n const newVal = value === '' ? null : Number(value)\n emit(INPUT_EVENT, newVal)\n setCurrentValue(newVal, false)\n}\nconst handleInputChange = (value: string) => {\n const newVal = value !== '' ? Number(value) : ''\n if ((isNumber(newVal) && !Number.isNaN(newVal)) || value === '') {\n setCurrentValue(newVal)\n }\n data.userInput = null\n}\n\nconst focus = () => {\n input.value?.focus?.()\n}\n\nconst blur = () => {\n input.value?.blur?.()\n}\n\nconst handleFocus = (event: MouseEvent | FocusEvent) => {\n emit('focus', event)\n}\n\nconst handleBlur = (event: MouseEvent | FocusEvent) => {\n emit('blur', event)\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch((err) => debugWarn(err))\n }\n}\n\nwatch(\n () => props.modelValue,\n (value) => {\n const userInput = verifyValue(data.userInput)\n const newValue = verifyValue(value, true)\n if (!isNumber(userInput) && (!userInput || userInput !== newValue)) {\n data.currentValue = newValue\n data.userInput = null\n }\n },\n { immediate: true }\n)\nonMounted(() => {\n const { min, max, modelValue } = props\n const innerInput = input.value?.input as HTMLInputElement\n innerInput.setAttribute('role', 'spinbutton')\n if (Number.isFinite(max)) {\n innerInput.setAttribute('aria-valuemax', String(max))\n } else {\n innerInput.removeAttribute('aria-valuemax')\n }\n if (Number.isFinite(min)) {\n innerInput.setAttribute('aria-valuemin', String(min))\n } else {\n innerInput.removeAttribute('aria-valuemin')\n }\n innerInput.setAttribute('aria-valuenow', String(data.currentValue))\n innerInput.setAttribute('aria-disabled', String(inputNumberDisabled.value))\n if (!isNumber(modelValue) && modelValue != null) {\n let val: number | null = Number(modelValue)\n if (Number.isNaN(val)) {\n val = null\n }\n emit(UPDATE_MODEL_EVENT, val!)\n }\n})\nonUpdated(() => {\n const innerInput = input.value?.input\n innerInput?.setAttribute('aria-valuenow', `${data.currentValue}`)\n})\ndefineExpose({\n /** @description get focus the input component */\n focus,\n /** @description remove focus the input component */\n blur,\n})\n</script>\n"],"names":["useLocale","useNamespace","ref","reactive","useFormItem","computed","isNumber","isUndefined","debugWarn","useSize","useDisabled","isNil","INPUT_EVENT","isString","UPDATE_MODEL_EVENT","watch","onMounted","onUpdated"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAqFc,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAE,MAAMA,eAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAKC,qBAAa,cAAc,CAAA,CAAA;AACtC,IAAA,MAAM,QAAQC,OAAmB,EAAA,CAAA;AAMjC,IAAA,MAAM,OAAOC,YAAe,CAAA;AAAA,MAC1B,cAAc,KAAM,CAAA,UAAA;AAAA,MACpB,SAAW,EAAA,IAAA;AAAA,KACZ,CAAA,CAAA;AAED,IAAM,MAAA,EAAE,aAAaC,mBAAY,EAAA,CAAA;AAEjC,IAAM,MAAA,WAAA,GAAcC,YAClB,CAAA,MAAMC,aAAS,CAAA,KAAA,CAAM,UAAU,CAAK,IAAA,KAAA,CAAM,UAAc,IAAA,KAAA,CAAM,GAChE,CAAA,CAAA;AACA,IAAM,MAAA,WAAA,GAAcD,YAClB,CAAA,MAAMC,aAAS,CAAA,KAAA,CAAM,UAAU,CAAK,IAAA,KAAA,CAAM,UAAc,IAAA,KAAA,CAAM,GAChE,CAAA,CAAA;AAEA,IAAM,MAAA,YAAA,GAAeD,aAAS,MAAM;AAClC,MAAM,MAAA,aAAA,GAAgB,YAA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