@element-plus/nightly 0.0.20240511 → 0.0.20240513
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 +3 -3
- 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-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/popper/src/content2.mjs +1 -1
- package/es/components/popper/src/content2.mjs.map +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-button.mjs +67 -6
- package/es/components/radio/src/radio-button.mjs.map +1 -1
- package/es/components/radio/src/radio-button2.mjs +6 -67
- package/es/components/radio/src/radio-button2.mjs.map +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/popper/src/content2.js +1 -1
- package/lib/components/popper/src/content2.js.map +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-button.js +67 -6
- package/lib/components/radio/src/radio-button.js.map +1 -1
- package/lib/components/radio/src/radio-button2.js +6 -67
- package/lib/components/radio/src/radio-button2.js.map +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/theme-chalk/src/segmented.scss +1 -1
- package/web-types.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
2
|
import Radio from './src/radio2.mjs';
|
|
3
|
-
import RadioButton from './src/radio-
|
|
3
|
+
import RadioButton from './src/radio-button.mjs';
|
|
4
4
|
import RadioGroup from './src/radio-group2.mjs';
|
|
5
5
|
export { radioEmits, radioProps, radioPropsBase } from './src/radio.mjs';
|
|
6
6
|
export { radioGroupEmits, radioGroupProps } from './src/radio-group.mjs';
|
|
7
|
-
export { radioButtonProps } from './src/radio-
|
|
7
|
+
export { radioButtonProps } from './src/radio-button2.mjs';
|
|
8
8
|
export { radioGroupKey } from './src/constants.mjs';
|
|
9
9
|
import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
|
|
10
10
|
|
|
@@ -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-button2.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-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.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,71 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import '
|
|
3
|
-
import {
|
|
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';
|
|
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-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.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;;;;"}
|
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-button2.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.20240513";
|
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.20240513'\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-button2.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');
|
|
@@ -57,7 +57,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
57
57
|
arrowRef,
|
|
58
58
|
arrowOffset
|
|
59
59
|
});
|
|
60
|
-
if (formItemContext
|
|
60
|
+
if (formItemContext) {
|
|
61
61
|
vue.provide(constants.formItemContextKey, {
|
|
62
62
|
...formItemContext,
|
|
63
63
|
addInputId: shared.NOOP,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content2.js","sources":["../../../../../../packages/components/popper/src/content.vue"],"sourcesContent":["<template>\n <div\n ref=\"contentRef\"\n v-bind=\"contentAttrs\"\n :style=\"contentStyle\"\n :class=\"contentClass\"\n tabindex=\"-1\"\n @mouseenter=\"(e) => $emit('mouseenter', e)\"\n @mouseleave=\"(e) => $emit('mouseleave', e)\"\n >\n <el-focus-trap\n :trapped=\"trapped\"\n :trap-on-focus-in=\"true\"\n :focus-trap-el=\"contentRef\"\n :focus-start-el=\"focusStartRef\"\n @focus-after-trapped=\"onFocusAfterTrapped\"\n @focus-after-released=\"onFocusAfterReleased\"\n @focusin=\"onFocusInTrap\"\n @focusout-prevented=\"onFocusoutPrevented\"\n @release-requested=\"onReleaseRequested\"\n >\n <slot />\n </el-focus-trap>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n unref,\n watch,\n} from 'vue'\nimport { NOOP } from '@vue/shared'\nimport { isNil } from 'lodash-unified'\nimport ElFocusTrap from '@element-plus/components/focus-trap'\nimport { formItemContextKey } from '@element-plus/components/form'\nimport { isElement } from '@element-plus/utils'\nimport { POPPER_CONTENT_INJECTION_KEY } from './constants'\nimport { popperContentEmits, popperContentProps } from './content'\nimport {\n usePopperContent,\n usePopperContentDOM,\n usePopperContentFocusTrap,\n} from './composables'\n\nimport type { WatchStopHandle } from 'vue'\n\ndefineOptions({\n name: 'ElPopperContent',\n})\n\nconst emit = defineEmits(popperContentEmits)\n\nconst props = defineProps(popperContentProps)\n\nconst {\n focusStartRef,\n trapped,\n\n onFocusAfterReleased,\n onFocusAfterTrapped,\n onFocusInTrap,\n onFocusoutPrevented,\n onReleaseRequested,\n} = usePopperContentFocusTrap(props, emit)\n\nconst { attributes, arrowRef, contentRef, styles, instanceRef, role, update } =\n usePopperContent(props)\n\nconst {\n ariaModal,\n arrowStyle,\n contentAttrs,\n contentClass,\n contentStyle,\n updateZIndex,\n} = usePopperContentDOM(props, {\n styles,\n attributes,\n role,\n})\n\nconst formItemContext = inject(formItemContextKey, undefined)\nconst arrowOffset = ref<number>()\n\nprovide(POPPER_CONTENT_INJECTION_KEY, {\n arrowStyle,\n arrowRef,\n arrowOffset,\n})\n\nif (
|
|
1
|
+
{"version":3,"file":"content2.js","sources":["../../../../../../packages/components/popper/src/content.vue"],"sourcesContent":["<template>\n <div\n ref=\"contentRef\"\n v-bind=\"contentAttrs\"\n :style=\"contentStyle\"\n :class=\"contentClass\"\n tabindex=\"-1\"\n @mouseenter=\"(e) => $emit('mouseenter', e)\"\n @mouseleave=\"(e) => $emit('mouseleave', e)\"\n >\n <el-focus-trap\n :trapped=\"trapped\"\n :trap-on-focus-in=\"true\"\n :focus-trap-el=\"contentRef\"\n :focus-start-el=\"focusStartRef\"\n @focus-after-trapped=\"onFocusAfterTrapped\"\n @focus-after-released=\"onFocusAfterReleased\"\n @focusin=\"onFocusInTrap\"\n @focusout-prevented=\"onFocusoutPrevented\"\n @release-requested=\"onReleaseRequested\"\n >\n <slot />\n </el-focus-trap>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n unref,\n watch,\n} from 'vue'\nimport { NOOP } from '@vue/shared'\nimport { isNil } from 'lodash-unified'\nimport ElFocusTrap from '@element-plus/components/focus-trap'\nimport { formItemContextKey } from '@element-plus/components/form'\nimport { isElement } from '@element-plus/utils'\nimport { POPPER_CONTENT_INJECTION_KEY } from './constants'\nimport { popperContentEmits, popperContentProps } from './content'\nimport {\n usePopperContent,\n usePopperContentDOM,\n usePopperContentFocusTrap,\n} from './composables'\n\nimport type { WatchStopHandle } from 'vue'\n\ndefineOptions({\n name: 'ElPopperContent',\n})\n\nconst emit = defineEmits(popperContentEmits)\n\nconst props = defineProps(popperContentProps)\n\nconst {\n focusStartRef,\n trapped,\n\n onFocusAfterReleased,\n onFocusAfterTrapped,\n onFocusInTrap,\n onFocusoutPrevented,\n onReleaseRequested,\n} = usePopperContentFocusTrap(props, emit)\n\nconst { attributes, arrowRef, contentRef, styles, instanceRef, role, update } =\n usePopperContent(props)\n\nconst {\n ariaModal,\n arrowStyle,\n contentAttrs,\n contentClass,\n contentStyle,\n updateZIndex,\n} = usePopperContentDOM(props, {\n styles,\n attributes,\n role,\n})\n\nconst formItemContext = inject(formItemContextKey, undefined)\nconst arrowOffset = ref<number>()\n\nprovide(POPPER_CONTENT_INJECTION_KEY, {\n arrowStyle,\n arrowRef,\n arrowOffset,\n})\n\nif (formItemContext) {\n // disallow auto-id from inside popper content\n provide(formItemContextKey, {\n ...formItemContext,\n addInputId: NOOP,\n removeInputId: NOOP,\n })\n}\n\nlet triggerTargetAriaStopWatch: WatchStopHandle | undefined = undefined\n\nconst updatePopper = (shouldUpdateZIndex = true) => {\n update()\n shouldUpdateZIndex && updateZIndex()\n}\n\nconst togglePopperAlive = () => {\n updatePopper(false)\n if (props.visible && props.focusOnShow) {\n trapped.value = true\n } else if (props.visible === false) {\n trapped.value = false\n }\n}\n\nonMounted(() => {\n watch(\n () => props.triggerTargetEl,\n (triggerTargetEl, prevTriggerTargetEl) => {\n triggerTargetAriaStopWatch?.()\n triggerTargetAriaStopWatch = undefined\n\n const el = unref(triggerTargetEl || contentRef.value)\n const prevEl = unref(prevTriggerTargetEl || contentRef.value)\n\n if (isElement(el)) {\n triggerTargetAriaStopWatch = watch(\n [role, () => props.ariaLabel, ariaModal, () => props.id],\n (watches) => {\n ;['role', 'aria-label', 'aria-modal', 'id'].forEach((key, idx) => {\n isNil(watches[idx])\n ? el.removeAttribute(key)\n : el.setAttribute(key, watches[idx]!)\n })\n },\n { immediate: true }\n )\n }\n if (prevEl !== el && isElement(prevEl)) {\n ;['role', 'aria-label', 'aria-modal', 'id'].forEach((key) => {\n prevEl.removeAttribute(key)\n })\n }\n },\n { immediate: true }\n )\n\n watch(() => props.visible, togglePopperAlive, { immediate: true })\n})\n\nonBeforeUnmount(() => {\n triggerTargetAriaStopWatch?.()\n triggerTargetAriaStopWatch = undefined\n})\n\ndefineExpose({\n /**\n * @description popper content element\n */\n popperContentRef: contentRef,\n /**\n * @description popperjs instance\n */\n popperInstanceRef: instanceRef,\n /**\n * @description method for updating popper\n */\n updatePopper,\n\n /**\n * @description content style\n */\n contentStyle,\n})\n</script>\n"],"names":["usePopperContentFocusTrap","usePopperContent","usePopperContentDOM","inject","formItemContextKey","ref","provide","POPPER_CONTENT_INJECTION_KEY","NOOP","onMounted","watch","unref","isElement","isNil","onBeforeUnmount"],"mappings":"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"}
|
|
@@ -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-button.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-button2.js');
|
|
12
12
|
var constants = require('./src/constants.js');
|
|
13
13
|
var install = require('../../utils/vue/install.js');
|
|
14
14
|
|
|
@@ -2,13 +2,74 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('
|
|
6
|
-
|
|
7
|
-
var
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
require('../../../hooks/index.js');
|
|
7
|
+
var useRadio = require('./use-radio.js');
|
|
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');
|
|
8
11
|
|
|
9
|
-
const
|
|
10
|
-
|
|
12
|
+
const _hoisted_1 = ["value", "name", "disabled"];
|
|
13
|
+
const __default__ = vue.defineComponent({
|
|
14
|
+
name: "ElRadioButton"
|
|
11
15
|
});
|
|
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"]]);
|
|
12
73
|
|
|
13
|
-
exports
|
|
74
|
+
exports["default"] = RadioButton;
|
|
14
75
|
//# 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.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":["useNamespace","useRadio","computed"],"mappings":";;;;;;;;;;;;uCAyCc,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAA,GAAKA,mBAAa,OAAO,CAAA,CAAA;AAC/B,IAAM,MAAA,EAAE,UAAU,KAAO,EAAA,IAAA,EAAM,UAAU,UAAY,EAAA,UAAA,EAAY,WAC/D,EAAA,GAAAC,iBAAA,CAAS,KAAK,CAAA,CAAA;AAEhB,IAAM,MAAA,WAAA,GAAcC,aAAwB,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -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-button.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-button2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-button2.js","sources":["../../../../../../packages/components/radio/src/radio-button.
|
|
1
|
+
{"version":3,"file":"radio-button2.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;;;;"}
|
package/lib/index.js
CHANGED
|
@@ -128,7 +128,7 @@ var progress = require('./components/progress/src/progress.js');
|
|
|
128
128
|
var index$G = require('./components/progress/index.js');
|
|
129
129
|
var radio = require('./components/radio/src/radio.js');
|
|
130
130
|
var radioGroup = require('./components/radio/src/radio-group.js');
|
|
131
|
-
var radioButton = require('./components/radio/src/radio-
|
|
131
|
+
var radioButton = require('./components/radio/src/radio-button2.js');
|
|
132
132
|
var constants$b = require('./components/radio/src/constants.js');
|
|
133
133
|
var index$H = require('./components/radio/index.js');
|
|
134
134
|
var rate = require('./components/rate/src/rate.js');
|
package/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.20240513";
|
package/lib/version.js
CHANGED
package/lib/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.
|
|
1
|
+
{"version":3,"file":"version.js","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20240513'\n"],"names":[],"mappings":";;;;AAAY,MAAC,OAAO,GAAG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@element-plus/nightly",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20240513",
|
|
4
4
|
"description": "A Component Library for Vue 3",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"element-plus",
|
|
@@ -112,5 +112,5 @@
|
|
|
112
112
|
"not ie 11",
|
|
113
113
|
"not op_mini all"
|
|
114
114
|
],
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "75b935a97728600f4c4c5196ade74b528fc19ed2"
|
|
116
116
|
}
|