@element-plus/nightly 0.0.20240513 → 0.0.20240514
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 +2 -2
- package/dist/index.full.min.js +2 -2
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +2 -2
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +2 -2
- 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-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.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/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.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/index.mjs +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-button.mjs +6 -67
- package/es/components/radio/src/radio-button.mjs.map +1 -1
- package/es/components/radio/src/radio-button2.mjs +67 -6
- package/es/components/radio/src/radio-button2.mjs.map +1 -1
- package/es/components/slider/src/button.mjs +93 -21
- package/es/components/slider/src/button.mjs.map +1 -1
- package/es/components/slider/src/button2.mjs +21 -93
- package/es/components/slider/src/button2.mjs.map +1 -1
- package/es/components/slider/src/slider2.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/index.js +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-button.js +6 -67
- package/lib/components/radio/src/radio-button.js.map +1 -1
- package/lib/components/radio/src/radio-button2.js +67 -6
- package/lib/components/radio/src/radio-button2.js.map +1 -1
- package/lib/components/slider/src/button.js +93 -22
- package/lib/components/slider/src/button.js.map +1 -1
- package/lib/components/slider/src/button2.js +22 -93
- package/lib/components/slider/src/button2.js.map +1 -1
- package/lib/components/slider/src/slider2.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 +1 -1
- package/web-types.json +1 -1
|
@@ -1,71 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import '
|
|
3
|
-
import {
|
|
4
|
-
import { radioButtonProps } from './radio-button2.mjs';
|
|
5
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
2
|
+
import { radioPropsBase } from './radio.mjs';
|
|
3
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
7
4
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
name: "ElRadioButton"
|
|
5
|
+
const radioButtonProps = buildProps({
|
|
6
|
+
...radioPropsBase
|
|
11
7
|
});
|
|
12
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
|
-
...__default__,
|
|
14
|
-
props: radioButtonProps,
|
|
15
|
-
setup(__props) {
|
|
16
|
-
const props = __props;
|
|
17
|
-
const ns = useNamespace("radio");
|
|
18
|
-
const { radioRef, focus, size, disabled, modelValue, radioGroup, actualValue } = useRadio(props);
|
|
19
|
-
const activeStyle = computed(() => {
|
|
20
|
-
return {
|
|
21
|
-
backgroundColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
|
|
22
|
-
borderColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
|
|
23
|
-
boxShadow: (radioGroup == null ? void 0 : radioGroup.fill) ? `-1px 0 0 0 ${radioGroup.fill}` : "",
|
|
24
|
-
color: (radioGroup == null ? void 0 : radioGroup.textColor) || ""
|
|
25
|
-
};
|
|
26
|
-
});
|
|
27
|
-
return (_ctx, _cache) => {
|
|
28
|
-
var _a;
|
|
29
|
-
return openBlock(), createElementBlock("label", {
|
|
30
|
-
class: normalizeClass([
|
|
31
|
-
unref(ns).b("button"),
|
|
32
|
-
unref(ns).is("active", unref(modelValue) === unref(actualValue)),
|
|
33
|
-
unref(ns).is("disabled", unref(disabled)),
|
|
34
|
-
unref(ns).is("focus", unref(focus)),
|
|
35
|
-
unref(ns).bm("button", unref(size))
|
|
36
|
-
])
|
|
37
|
-
}, [
|
|
38
|
-
withDirectives(createElementVNode("input", {
|
|
39
|
-
ref_key: "radioRef",
|
|
40
|
-
ref: radioRef,
|
|
41
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
|
|
42
|
-
class: normalizeClass(unref(ns).be("button", "original-radio")),
|
|
43
|
-
value: unref(actualValue),
|
|
44
|
-
type: "radio",
|
|
45
|
-
name: _ctx.name || ((_a = unref(radioGroup)) == null ? void 0 : _a.name),
|
|
46
|
-
disabled: unref(disabled),
|
|
47
|
-
onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true),
|
|
48
|
-
onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false),
|
|
49
|
-
onClick: _cache[3] || (_cache[3] = withModifiers(() => {
|
|
50
|
-
}, ["stop"]))
|
|
51
|
-
}, null, 42, _hoisted_1), [
|
|
52
|
-
[vModelRadio, unref(modelValue)]
|
|
53
|
-
]),
|
|
54
|
-
createElementVNode("span", {
|
|
55
|
-
class: normalizeClass(unref(ns).be("button", "inner")),
|
|
56
|
-
style: normalizeStyle(unref(modelValue) === unref(actualValue) ? unref(activeStyle) : {}),
|
|
57
|
-
onKeydown: _cache[4] || (_cache[4] = withModifiers(() => {
|
|
58
|
-
}, ["stop"]))
|
|
59
|
-
}, [
|
|
60
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
61
|
-
createTextVNode(toDisplayString(_ctx.label), 1)
|
|
62
|
-
])
|
|
63
|
-
], 38)
|
|
64
|
-
], 2);
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
var RadioButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "radio-button.vue"]]);
|
|
69
8
|
|
|
70
|
-
export {
|
|
9
|
+
export { radioButtonProps };
|
|
71
10
|
//# sourceMappingURL=radio-button.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-button.mjs","sources":["../../../../../../packages/components/radio/src/radio-button.
|
|
1
|
+
{"version":3,"file":"radio-button.mjs","sources":["../../../../../../packages/components/radio/src/radio-button.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { radioPropsBase } from './radio'\nimport type { ExtractPropTypes } from 'vue'\nimport type RadioButton from './radio-button.vue'\n\nexport const radioButtonProps = buildProps({\n ...radioPropsBase,\n} as const)\n\nexport type RadioButtonProps = ExtractPropTypes<typeof radioButtonProps>\nexport type RadioButtonInstance = InstanceType<typeof RadioButton>\n"],"names":[],"mappings":";;;;AAEY,MAAC,gBAAgB,GAAG,UAAU,CAAC;AAC3C,EAAE,GAAG,cAAc;AACnB,CAAC;;;;"}
|
|
@@ -1,10 +1,71 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, withDirectives, createElementVNode, isRef, withModifiers, vModelRadio, normalizeStyle, renderSlot, createTextVNode, toDisplayString } from 'vue';
|
|
2
|
+
import '../../../hooks/index.mjs';
|
|
3
|
+
import { useRadio } from './use-radio.mjs';
|
|
4
|
+
import { radioButtonProps } from './radio-button.mjs';
|
|
5
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
4
7
|
|
|
5
|
-
const
|
|
6
|
-
|
|
8
|
+
const _hoisted_1 = ["value", "name", "disabled"];
|
|
9
|
+
const __default__ = defineComponent({
|
|
10
|
+
name: "ElRadioButton"
|
|
7
11
|
});
|
|
12
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
|
+
...__default__,
|
|
14
|
+
props: radioButtonProps,
|
|
15
|
+
setup(__props) {
|
|
16
|
+
const props = __props;
|
|
17
|
+
const ns = useNamespace("radio");
|
|
18
|
+
const { radioRef, focus, size, disabled, modelValue, radioGroup, actualValue } = useRadio(props);
|
|
19
|
+
const activeStyle = computed(() => {
|
|
20
|
+
return {
|
|
21
|
+
backgroundColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
|
|
22
|
+
borderColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
|
|
23
|
+
boxShadow: (radioGroup == null ? void 0 : radioGroup.fill) ? `-1px 0 0 0 ${radioGroup.fill}` : "",
|
|
24
|
+
color: (radioGroup == null ? void 0 : radioGroup.textColor) || ""
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
return (_ctx, _cache) => {
|
|
28
|
+
var _a;
|
|
29
|
+
return openBlock(), createElementBlock("label", {
|
|
30
|
+
class: normalizeClass([
|
|
31
|
+
unref(ns).b("button"),
|
|
32
|
+
unref(ns).is("active", unref(modelValue) === unref(actualValue)),
|
|
33
|
+
unref(ns).is("disabled", unref(disabled)),
|
|
34
|
+
unref(ns).is("focus", unref(focus)),
|
|
35
|
+
unref(ns).bm("button", unref(size))
|
|
36
|
+
])
|
|
37
|
+
}, [
|
|
38
|
+
withDirectives(createElementVNode("input", {
|
|
39
|
+
ref_key: "radioRef",
|
|
40
|
+
ref: radioRef,
|
|
41
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
|
|
42
|
+
class: normalizeClass(unref(ns).be("button", "original-radio")),
|
|
43
|
+
value: unref(actualValue),
|
|
44
|
+
type: "radio",
|
|
45
|
+
name: _ctx.name || ((_a = unref(radioGroup)) == null ? void 0 : _a.name),
|
|
46
|
+
disabled: unref(disabled),
|
|
47
|
+
onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true),
|
|
48
|
+
onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false),
|
|
49
|
+
onClick: _cache[3] || (_cache[3] = withModifiers(() => {
|
|
50
|
+
}, ["stop"]))
|
|
51
|
+
}, null, 42, _hoisted_1), [
|
|
52
|
+
[vModelRadio, unref(modelValue)]
|
|
53
|
+
]),
|
|
54
|
+
createElementVNode("span", {
|
|
55
|
+
class: normalizeClass(unref(ns).be("button", "inner")),
|
|
56
|
+
style: normalizeStyle(unref(modelValue) === unref(actualValue) ? unref(activeStyle) : {}),
|
|
57
|
+
onKeydown: _cache[4] || (_cache[4] = withModifiers(() => {
|
|
58
|
+
}, ["stop"]))
|
|
59
|
+
}, [
|
|
60
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
61
|
+
createTextVNode(toDisplayString(_ctx.label), 1)
|
|
62
|
+
])
|
|
63
|
+
], 38)
|
|
64
|
+
], 2);
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
var RadioButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "radio-button.vue"]]);
|
|
8
69
|
|
|
9
|
-
export {
|
|
70
|
+
export { RadioButton as default };
|
|
10
71
|
//# sourceMappingURL=radio-button2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-button2.mjs","sources":["../../../../../../packages/components/radio/src/radio-button.
|
|
1
|
+
{"version":3,"file":"radio-button2.mjs","sources":["../../../../../../packages/components/radio/src/radio-button.vue"],"sourcesContent":["<template>\n <label\n :class=\"[\n ns.b('button'),\n ns.is('active', modelValue === actualValue),\n ns.is('disabled', disabled),\n ns.is('focus', focus),\n ns.bm('button', size),\n ]\"\n >\n <input\n ref=\"radioRef\"\n v-model=\"modelValue\"\n :class=\"ns.be('button', 'original-radio')\"\n :value=\"actualValue\"\n type=\"radio\"\n :name=\"name || radioGroup?.name\"\n :disabled=\"disabled\"\n @focus=\"focus = true\"\n @blur=\"focus = false\"\n @click.stop\n />\n <span\n :class=\"ns.be('button', 'inner')\"\n :style=\"modelValue === actualValue ? activeStyle : {}\"\n @keydown.stop\n >\n <slot>\n {{ label }}\n </slot>\n </span>\n </label>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useRadio } from './use-radio'\nimport { radioButtonProps } from './radio-button'\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElRadioButton',\n})\n\nconst props = defineProps(radioButtonProps)\n\nconst ns = useNamespace('radio')\nconst { radioRef, focus, size, disabled, modelValue, radioGroup, actualValue } =\n useRadio(props)\n\nconst activeStyle = computed<CSSProperties>(() => {\n return {\n backgroundColor: radioGroup?.fill || '',\n borderColor: radioGroup?.fill || '',\n boxShadow: radioGroup?.fill ? `-1px 0 0 0 ${radioGroup.fill}` : '',\n color: radioGroup?.textColor || '',\n }\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;mCAyCc,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAC/B,IAAM,MAAA,EAAE,UAAU,KAAO,EAAA,IAAA,EAAM,UAAU,UAAY,EAAA,UAAA,EAAY,WAC/D,EAAA,GAAA,QAAA,CAAS,KAAK,CAAA,CAAA;AAEhB,IAAM,MAAA,WAAA,GAAc,SAAwB,MAAM;AAChD,MAAO,OAAA;AAAA,QACL,eAAA,EAAiB,eAAoB,IAAA,GAAA,KAAA,CAAA,GAAA,UAAA,CAAA,IAAA,KAAA,EAAA;AAAA,QACrC,WAAA,EAAa,eAAoB,IAAA,GAAA,KAAA,CAAA,GAAA,UAAA,CAAA,IAAA,KAAA,EAAA;AAAA,QACjC,SAAW,EAAA,CAAA,UAAA,IAAmB,IAAA,GAAA,KAAA,CAAA,GAAA,eAAkC,IAAA,CAAA,WAAA,EAAA,UAAA,CAAA,IAAA,CAAA,CAAA,GAAA,EAAA;AAAA,QAChE,KAAA,EAAO,eAAyB,IAAA,GAAA,KAAA,CAAA,GAAA,UAAA,CAAA,SAAA,KAAA,EAAA;AAAA,OAClC,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,26 +1,98 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import '
|
|
3
|
-
import '../../../
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
1
|
+
import { defineComponent, reactive, toRefs, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, createVNode, withCtx, createElementVNode, toDisplayString } from 'vue';
|
|
2
|
+
import { ElTooltip } from '../../tooltip/index.mjs';
|
|
3
|
+
import '../../../hooks/index.mjs';
|
|
4
|
+
import './composables/index.mjs';
|
|
5
|
+
import { sliderButtonProps, sliderButtonEmits } from './button2.mjs';
|
|
6
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
8
|
+
import { useSliderButton } from './composables/use-slider-button.mjs';
|
|
7
9
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
const _hoisted_1 = ["tabindex"];
|
|
11
|
+
const __default__ = defineComponent({
|
|
12
|
+
name: "ElSliderButton"
|
|
13
|
+
});
|
|
14
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
|
+
...__default__,
|
|
16
|
+
props: sliderButtonProps,
|
|
17
|
+
emits: sliderButtonEmits,
|
|
18
|
+
setup(__props, { expose, emit }) {
|
|
19
|
+
const props = __props;
|
|
20
|
+
const ns = useNamespace("slider");
|
|
21
|
+
const initData = reactive({
|
|
22
|
+
hovering: false,
|
|
23
|
+
dragging: false,
|
|
24
|
+
isClick: false,
|
|
25
|
+
startX: 0,
|
|
26
|
+
currentX: 0,
|
|
27
|
+
startY: 0,
|
|
28
|
+
currentY: 0,
|
|
29
|
+
startPosition: 0,
|
|
30
|
+
newPosition: 0,
|
|
31
|
+
oldValue: props.modelValue
|
|
32
|
+
});
|
|
33
|
+
const {
|
|
34
|
+
disabled,
|
|
35
|
+
button,
|
|
36
|
+
tooltip,
|
|
37
|
+
showTooltip,
|
|
38
|
+
tooltipVisible,
|
|
39
|
+
wrapperStyle,
|
|
40
|
+
formatValue,
|
|
41
|
+
handleMouseEnter,
|
|
42
|
+
handleMouseLeave,
|
|
43
|
+
onButtonDown,
|
|
44
|
+
onKeyDown,
|
|
45
|
+
setPosition
|
|
46
|
+
} = useSliderButton(props, initData, emit);
|
|
47
|
+
const { hovering, dragging } = toRefs(initData);
|
|
48
|
+
expose({
|
|
49
|
+
onButtonDown,
|
|
50
|
+
onKeyDown,
|
|
51
|
+
setPosition,
|
|
52
|
+
hovering,
|
|
53
|
+
dragging
|
|
54
|
+
});
|
|
55
|
+
return (_ctx, _cache) => {
|
|
56
|
+
return openBlock(), createElementBlock("div", {
|
|
57
|
+
ref_key: "button",
|
|
58
|
+
ref: button,
|
|
59
|
+
class: normalizeClass([unref(ns).e("button-wrapper"), { hover: unref(hovering), dragging: unref(dragging) }]),
|
|
60
|
+
style: normalizeStyle(unref(wrapperStyle)),
|
|
61
|
+
tabindex: unref(disabled) ? -1 : 0,
|
|
62
|
+
onMouseenter: _cache[0] || (_cache[0] = (...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args)),
|
|
63
|
+
onMouseleave: _cache[1] || (_cache[1] = (...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args)),
|
|
64
|
+
onMousedown: _cache[2] || (_cache[2] = (...args) => unref(onButtonDown) && unref(onButtonDown)(...args)),
|
|
65
|
+
onTouchstart: _cache[3] || (_cache[3] = (...args) => unref(onButtonDown) && unref(onButtonDown)(...args)),
|
|
66
|
+
onFocus: _cache[4] || (_cache[4] = (...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args)),
|
|
67
|
+
onBlur: _cache[5] || (_cache[5] = (...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args)),
|
|
68
|
+
onKeydown: _cache[6] || (_cache[6] = (...args) => unref(onKeyDown) && unref(onKeyDown)(...args))
|
|
69
|
+
}, [
|
|
70
|
+
createVNode(unref(ElTooltip), {
|
|
71
|
+
ref_key: "tooltip",
|
|
72
|
+
ref: tooltip,
|
|
73
|
+
visible: unref(tooltipVisible),
|
|
74
|
+
placement: _ctx.placement,
|
|
75
|
+
"fallback-placements": ["top", "bottom", "right", "left"],
|
|
76
|
+
"stop-popper-mouse-event": false,
|
|
77
|
+
"popper-class": _ctx.tooltipClass,
|
|
78
|
+
disabled: !unref(showTooltip),
|
|
79
|
+
persistent: ""
|
|
80
|
+
}, {
|
|
81
|
+
content: withCtx(() => [
|
|
82
|
+
createElementVNode("span", null, toDisplayString(unref(formatValue)), 1)
|
|
83
|
+
]),
|
|
84
|
+
default: withCtx(() => [
|
|
85
|
+
createElementVNode("div", {
|
|
86
|
+
class: normalizeClass([unref(ns).e("button"), { hover: unref(hovering), dragging: unref(dragging) }])
|
|
87
|
+
}, null, 2)
|
|
88
|
+
]),
|
|
89
|
+
_: 1
|
|
90
|
+
}, 8, ["visible", "placement", "popper-class", "disabled"])
|
|
91
|
+
], 46, _hoisted_1);
|
|
92
|
+
};
|
|
19
93
|
}
|
|
20
94
|
});
|
|
21
|
-
|
|
22
|
-
[UPDATE_MODEL_EVENT]: (value) => isNumber(value)
|
|
23
|
-
};
|
|
95
|
+
var SliderButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "button.vue"]]);
|
|
24
96
|
|
|
25
|
-
export {
|
|
97
|
+
export { SliderButton as default };
|
|
26
98
|
//# sourceMappingURL=button.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.mjs","sources":["../../../../../../packages/components/slider/src/button.
|
|
1
|
+
{"version":3,"file":"button.mjs","sources":["../../../../../../packages/components/slider/src/button.vue"],"sourcesContent":["<template>\n <div\n ref=\"button\"\n :class=\"[ns.e('button-wrapper'), { hover: hovering, dragging }]\"\n :style=\"wrapperStyle\"\n :tabindex=\"disabled ? -1 : 0\"\n @mouseenter=\"handleMouseEnter\"\n @mouseleave=\"handleMouseLeave\"\n @mousedown=\"onButtonDown\"\n @touchstart=\"onButtonDown\"\n @focus=\"handleMouseEnter\"\n @blur=\"handleMouseLeave\"\n @keydown=\"onKeyDown\"\n >\n <el-tooltip\n ref=\"tooltip\"\n :visible=\"tooltipVisible\"\n :placement=\"placement\"\n :fallback-placements=\"['top', 'bottom', 'right', 'left']\"\n :stop-popper-mouse-event=\"false\"\n :popper-class=\"tooltipClass\"\n :disabled=\"!showTooltip\"\n persistent\n >\n <template #content>\n <span>{{ formatValue }}</span>\n </template>\n <div :class=\"[ns.e('button'), { hover: hovering, dragging }]\" />\n </el-tooltip>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { reactive, toRefs } from 'vue'\nimport { ElTooltip } from '@element-plus/components/tooltip'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useSliderButton } from './composables'\nimport { sliderButtonEmits, sliderButtonProps } from './button'\nimport type { SliderButtonInitData } from './button'\n\ndefineOptions({\n name: 'ElSliderButton',\n})\n\nconst props = defineProps(sliderButtonProps)\nconst emit = defineEmits(sliderButtonEmits)\n\nconst ns = useNamespace('slider')\n\nconst initData = reactive<SliderButtonInitData>({\n hovering: false,\n dragging: false,\n isClick: false,\n startX: 0,\n currentX: 0,\n startY: 0,\n currentY: 0,\n startPosition: 0,\n newPosition: 0,\n oldValue: props.modelValue,\n})\n\nconst {\n disabled,\n button,\n tooltip,\n showTooltip,\n tooltipVisible,\n wrapperStyle,\n formatValue,\n handleMouseEnter,\n handleMouseLeave,\n onButtonDown,\n onKeyDown,\n setPosition,\n} = useSliderButton(props, initData, emit)\n\nconst { hovering, dragging } = toRefs(initData)\n\ndefineExpose({\n onButtonDown,\n onKeyDown,\n setPosition,\n hovering,\n dragging,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;mCAwCc,CAAA;AAAA,EACZ,IAAM,EAAA,gBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAK,aAAa,QAAQ,CAAA,CAAA;AAEhC,IAAA,MAAM,WAAW,QAA+B,CAAA;AAAA,MAC9C,QAAU,EAAA,KAAA;AAAA,MACV,QAAU,EAAA,KAAA;AAAA,MACV,OAAS,EAAA,KAAA;AAAA,MACT,MAAQ,EAAA,CAAA;AAAA,MACR,QAAU,EAAA,CAAA;AAAA,MACV,MAAQ,EAAA,CAAA;AAAA,MACR,QAAU,EAAA,CAAA;AAAA,MACV,aAAe,EAAA,CAAA;AAAA,MACf,WAAa,EAAA,CAAA;AAAA,MACb,UAAU,KAAM,CAAA,UAAA;AAAA,KACjB,CAAA,CAAA;AAED,IAAM,MAAA;AAAA,MACJ,QAAA;AAAA,MACA,MAAA;AAAA,MACA,OAAA;AAAA,MACA,WAAA;AAAA,MACA,cAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,MACA,gBAAA;AAAA,MACA,gBAAA;AAAA,MACA,YAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA;AAAA,KACE,GAAA,eAAA,CAAgB,KAAO,EAAA,QAAA,EAAU,IAAI,CAAA,CAAA;AAEzC,IAAA,MAAM,EAAE,QAAA,EAAU,QAAa,EAAA,GAAA,MAAA,CAAO,QAAQ,CAAA,CAAA;AAE9C,IAAa,MAAA,CAAA;AAAA,MACX,YAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,98 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import '../../../
|
|
4
|
-
import '
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
8
|
-
import { useSliderButton } from './composables/use-slider-button.mjs';
|
|
1
|
+
import { placements } from '@popperjs/core';
|
|
2
|
+
import '../../../utils/index.mjs';
|
|
3
|
+
import '../../../constants/index.mjs';
|
|
4
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
5
|
+
import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
|
|
6
|
+
import { isNumber } from '../../../utils/types.mjs';
|
|
9
7
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const initData = reactive({
|
|
22
|
-
hovering: false,
|
|
23
|
-
dragging: false,
|
|
24
|
-
isClick: false,
|
|
25
|
-
startX: 0,
|
|
26
|
-
currentX: 0,
|
|
27
|
-
startY: 0,
|
|
28
|
-
currentY: 0,
|
|
29
|
-
startPosition: 0,
|
|
30
|
-
newPosition: 0,
|
|
31
|
-
oldValue: props.modelValue
|
|
32
|
-
});
|
|
33
|
-
const {
|
|
34
|
-
disabled,
|
|
35
|
-
button,
|
|
36
|
-
tooltip,
|
|
37
|
-
showTooltip,
|
|
38
|
-
tooltipVisible,
|
|
39
|
-
wrapperStyle,
|
|
40
|
-
formatValue,
|
|
41
|
-
handleMouseEnter,
|
|
42
|
-
handleMouseLeave,
|
|
43
|
-
onButtonDown,
|
|
44
|
-
onKeyDown,
|
|
45
|
-
setPosition
|
|
46
|
-
} = useSliderButton(props, initData, emit);
|
|
47
|
-
const { hovering, dragging } = toRefs(initData);
|
|
48
|
-
expose({
|
|
49
|
-
onButtonDown,
|
|
50
|
-
onKeyDown,
|
|
51
|
-
setPosition,
|
|
52
|
-
hovering,
|
|
53
|
-
dragging
|
|
54
|
-
});
|
|
55
|
-
return (_ctx, _cache) => {
|
|
56
|
-
return openBlock(), createElementBlock("div", {
|
|
57
|
-
ref_key: "button",
|
|
58
|
-
ref: button,
|
|
59
|
-
class: normalizeClass([unref(ns).e("button-wrapper"), { hover: unref(hovering), dragging: unref(dragging) }]),
|
|
60
|
-
style: normalizeStyle(unref(wrapperStyle)),
|
|
61
|
-
tabindex: unref(disabled) ? -1 : 0,
|
|
62
|
-
onMouseenter: _cache[0] || (_cache[0] = (...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args)),
|
|
63
|
-
onMouseleave: _cache[1] || (_cache[1] = (...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args)),
|
|
64
|
-
onMousedown: _cache[2] || (_cache[2] = (...args) => unref(onButtonDown) && unref(onButtonDown)(...args)),
|
|
65
|
-
onTouchstart: _cache[3] || (_cache[3] = (...args) => unref(onButtonDown) && unref(onButtonDown)(...args)),
|
|
66
|
-
onFocus: _cache[4] || (_cache[4] = (...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args)),
|
|
67
|
-
onBlur: _cache[5] || (_cache[5] = (...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args)),
|
|
68
|
-
onKeydown: _cache[6] || (_cache[6] = (...args) => unref(onKeyDown) && unref(onKeyDown)(...args))
|
|
69
|
-
}, [
|
|
70
|
-
createVNode(unref(ElTooltip), {
|
|
71
|
-
ref_key: "tooltip",
|
|
72
|
-
ref: tooltip,
|
|
73
|
-
visible: unref(tooltipVisible),
|
|
74
|
-
placement: _ctx.placement,
|
|
75
|
-
"fallback-placements": ["top", "bottom", "right", "left"],
|
|
76
|
-
"stop-popper-mouse-event": false,
|
|
77
|
-
"popper-class": _ctx.tooltipClass,
|
|
78
|
-
disabled: !unref(showTooltip),
|
|
79
|
-
persistent: ""
|
|
80
|
-
}, {
|
|
81
|
-
content: withCtx(() => [
|
|
82
|
-
createElementVNode("span", null, toDisplayString(unref(formatValue)), 1)
|
|
83
|
-
]),
|
|
84
|
-
default: withCtx(() => [
|
|
85
|
-
createElementVNode("div", {
|
|
86
|
-
class: normalizeClass([unref(ns).e("button"), { hover: unref(hovering), dragging: unref(dragging) }])
|
|
87
|
-
}, null, 2)
|
|
88
|
-
]),
|
|
89
|
-
_: 1
|
|
90
|
-
}, 8, ["visible", "placement", "popper-class", "disabled"])
|
|
91
|
-
], 46, _hoisted_1);
|
|
92
|
-
};
|
|
8
|
+
const sliderButtonProps = buildProps({
|
|
9
|
+
modelValue: {
|
|
10
|
+
type: Number,
|
|
11
|
+
default: 0
|
|
12
|
+
},
|
|
13
|
+
vertical: Boolean,
|
|
14
|
+
tooltipClass: String,
|
|
15
|
+
placement: {
|
|
16
|
+
type: String,
|
|
17
|
+
values: placements,
|
|
18
|
+
default: "top"
|
|
93
19
|
}
|
|
94
20
|
});
|
|
95
|
-
|
|
21
|
+
const sliderButtonEmits = {
|
|
22
|
+
[UPDATE_MODEL_EVENT]: (value) => isNumber(value)
|
|
23
|
+
};
|
|
96
24
|
|
|
97
|
-
export {
|
|
25
|
+
export { sliderButtonEmits, sliderButtonProps };
|
|
98
26
|
//# sourceMappingURL=button2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button2.mjs","sources":["../../../../../../packages/components/slider/src/button.
|
|
1
|
+
{"version":3,"file":"button2.mjs","sources":["../../../../../../packages/components/slider/src/button.ts"],"sourcesContent":["import { placements } from '@popperjs/core'\nimport { buildProps, isNumber } from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type { ExtractPropTypes, Ref } from 'vue'\nimport type Button from './button.vue'\n\nexport const sliderButtonProps = buildProps({\n modelValue: {\n type: Number,\n default: 0,\n },\n vertical: Boolean,\n tooltipClass: String,\n placement: {\n type: String,\n values: placements,\n default: 'top',\n },\n} as const)\nexport type SliderButtonProps = ExtractPropTypes<typeof sliderButtonProps>\n\nexport const sliderButtonEmits = {\n [UPDATE_MODEL_EVENT]: (value: number) => isNumber(value),\n}\nexport type SliderButtonEmits = typeof sliderButtonEmits\n\nexport type SliderButtonInstance = InstanceType<typeof Button>\n\nexport type ButtonRefs = Record<\n 'firstButton' | 'secondButton',\n Ref<SliderButtonInstance | undefined>\n>\n\nexport interface SliderButtonInitData {\n hovering: boolean\n dragging: boolean\n isClick: boolean\n startX: number\n currentX: number\n startY: number\n currentY: number\n startPosition: number\n newPosition: number\n oldValue: number\n}\n"],"names":[],"mappings":";;;;;;;AAGY,MAAC,iBAAiB,GAAG,UAAU,CAAC;AAC5C,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,YAAY,EAAE,MAAM;AACtB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,UAAU;AACtB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,iBAAiB,GAAG;AACjC,EAAE,CAAC,kBAAkB,GAAG,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AAClD;;;;"}
|
|
@@ -4,7 +4,7 @@ import '../../form/index.mjs';
|
|
|
4
4
|
import '../../../hooks/index.mjs';
|
|
5
5
|
import { sliderContextKey } from './constants.mjs';
|
|
6
6
|
import { sliderProps, sliderEmits } from './slider.mjs';
|
|
7
|
-
import SliderButton from './
|
|
7
|
+
import SliderButton from './button.mjs';
|
|
8
8
|
import SliderMarker from './marker.mjs';
|
|
9
9
|
import './composables/index.mjs';
|
|
10
10
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
package/es/index.mjs
CHANGED
|
@@ -125,7 +125,7 @@ export { progressProps } from './components/progress/src/progress.mjs';
|
|
|
125
125
|
export { ElProgress } from './components/progress/index.mjs';
|
|
126
126
|
export { radioEmits, radioProps, radioPropsBase } from './components/radio/src/radio.mjs';
|
|
127
127
|
export { radioGroupEmits, radioGroupProps } from './components/radio/src/radio-group.mjs';
|
|
128
|
-
export { radioButtonProps } from './components/radio/src/radio-
|
|
128
|
+
export { radioButtonProps } from './components/radio/src/radio-button.mjs';
|
|
129
129
|
export { radioGroupKey } from './components/radio/src/constants.mjs';
|
|
130
130
|
export { ElRadio, ElRadioButton, ElRadioGroup } from './components/radio/index.mjs';
|
|
131
131
|
export { rateEmits, rateProps } from './components/rate/src/rate.mjs';
|
package/es/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.20240514";
|
package/es/version.mjs
CHANGED
package/es/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20240514'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
|
package/lib/components/index.js
CHANGED
|
@@ -159,7 +159,7 @@ var content = require('./popper/src/content2.js');
|
|
|
159
159
|
var progress = require('./progress/src/progress.js');
|
|
160
160
|
var radio = require('./radio/src/radio.js');
|
|
161
161
|
var radioGroup = require('./radio/src/radio-group.js');
|
|
162
|
-
var radioButton = require('./radio/src/radio-
|
|
162
|
+
var radioButton = require('./radio/src/radio-button.js');
|
|
163
163
|
var constants$b = require('./radio/src/constants.js');
|
|
164
164
|
var rate = require('./rate/src/rate.js');
|
|
165
165
|
var result = require('./result/src/result.js');
|
|
@@ -4,11 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
6
|
var radio$1 = require('./src/radio2.js');
|
|
7
|
-
var radioButton$1 = require('./src/radio-
|
|
7
|
+
var radioButton$1 = require('./src/radio-button2.js');
|
|
8
8
|
var radioGroup$1 = require('./src/radio-group2.js');
|
|
9
9
|
var radio = require('./src/radio.js');
|
|
10
10
|
var radioGroup = require('./src/radio-group.js');
|
|
11
|
-
var radioButton = require('./src/radio-
|
|
11
|
+
var radioButton = require('./src/radio-button.js');
|
|
12
12
|
var constants = require('./src/constants.js');
|
|
13
13
|
var install = require('../../utils/vue/install.js');
|
|
14
14
|
|
|
@@ -2,74 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
require('
|
|
7
|
-
var
|
|
8
|
-
var radioButton = require('./radio-button2.js');
|
|
9
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
10
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
|
5
|
+
require('../../../utils/index.js');
|
|
6
|
+
var radio = require('./radio.js');
|
|
7
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
11
8
|
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
name: "ElRadioButton"
|
|
9
|
+
const radioButtonProps = runtime.buildProps({
|
|
10
|
+
...radio.radioPropsBase
|
|
15
11
|
});
|
|
16
|
-
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
17
|
-
...__default__,
|
|
18
|
-
props: radioButton.radioButtonProps,
|
|
19
|
-
setup(__props) {
|
|
20
|
-
const props = __props;
|
|
21
|
-
const ns = index.useNamespace("radio");
|
|
22
|
-
const { radioRef, focus, size, disabled, modelValue, radioGroup, actualValue } = useRadio.useRadio(props);
|
|
23
|
-
const activeStyle = vue.computed(() => {
|
|
24
|
-
return {
|
|
25
|
-
backgroundColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
|
|
26
|
-
borderColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
|
|
27
|
-
boxShadow: (radioGroup == null ? void 0 : radioGroup.fill) ? `-1px 0 0 0 ${radioGroup.fill}` : "",
|
|
28
|
-
color: (radioGroup == null ? void 0 : radioGroup.textColor) || ""
|
|
29
|
-
};
|
|
30
|
-
});
|
|
31
|
-
return (_ctx, _cache) => {
|
|
32
|
-
var _a;
|
|
33
|
-
return vue.openBlock(), vue.createElementBlock("label", {
|
|
34
|
-
class: vue.normalizeClass([
|
|
35
|
-
vue.unref(ns).b("button"),
|
|
36
|
-
vue.unref(ns).is("active", vue.unref(modelValue) === vue.unref(actualValue)),
|
|
37
|
-
vue.unref(ns).is("disabled", vue.unref(disabled)),
|
|
38
|
-
vue.unref(ns).is("focus", vue.unref(focus)),
|
|
39
|
-
vue.unref(ns).bm("button", vue.unref(size))
|
|
40
|
-
])
|
|
41
|
-
}, [
|
|
42
|
-
vue.withDirectives(vue.createElementVNode("input", {
|
|
43
|
-
ref_key: "radioRef",
|
|
44
|
-
ref: radioRef,
|
|
45
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(modelValue) ? modelValue.value = $event : null),
|
|
46
|
-
class: vue.normalizeClass(vue.unref(ns).be("button", "original-radio")),
|
|
47
|
-
value: vue.unref(actualValue),
|
|
48
|
-
type: "radio",
|
|
49
|
-
name: _ctx.name || ((_a = vue.unref(radioGroup)) == null ? void 0 : _a.name),
|
|
50
|
-
disabled: vue.unref(disabled),
|
|
51
|
-
onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true),
|
|
52
|
-
onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false),
|
|
53
|
-
onClick: _cache[3] || (_cache[3] = vue.withModifiers(() => {
|
|
54
|
-
}, ["stop"]))
|
|
55
|
-
}, null, 42, _hoisted_1), [
|
|
56
|
-
[vue.vModelRadio, vue.unref(modelValue)]
|
|
57
|
-
]),
|
|
58
|
-
vue.createElementVNode("span", {
|
|
59
|
-
class: vue.normalizeClass(vue.unref(ns).be("button", "inner")),
|
|
60
|
-
style: vue.normalizeStyle(vue.unref(modelValue) === vue.unref(actualValue) ? vue.unref(activeStyle) : {}),
|
|
61
|
-
onKeydown: _cache[4] || (_cache[4] = vue.withModifiers(() => {
|
|
62
|
-
}, ["stop"]))
|
|
63
|
-
}, [
|
|
64
|
-
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
65
|
-
vue.createTextVNode(vue.toDisplayString(_ctx.label), 1)
|
|
66
|
-
])
|
|
67
|
-
], 38)
|
|
68
|
-
], 2);
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
var RadioButton = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "radio-button.vue"]]);
|
|
73
12
|
|
|
74
|
-
exports
|
|
13
|
+
exports.radioButtonProps = radioButtonProps;
|
|
75
14
|
//# sourceMappingURL=radio-button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-button.js","sources":["../../../../../../packages/components/radio/src/radio-button.
|
|
1
|
+
{"version":3,"file":"radio-button.js","sources":["../../../../../../packages/components/radio/src/radio-button.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { radioPropsBase } from './radio'\nimport type { ExtractPropTypes } from 'vue'\nimport type RadioButton from './radio-button.vue'\n\nexport const radioButtonProps = buildProps({\n ...radioPropsBase,\n} as const)\n\nexport type RadioButtonProps = ExtractPropTypes<typeof radioButtonProps>\nexport type RadioButtonInstance = InstanceType<typeof RadioButton>\n"],"names":["buildProps","radioPropsBase"],"mappings":";;;;;;;;AAEY,MAAC,gBAAgB,GAAGA,kBAAU,CAAC;AAC3C,EAAE,GAAGC,oBAAc;AACnB,CAAC;;;;"}
|